(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[888],{39386:function(e,t,r){"use strict";t._O=t.Jq=t.KB=t.u8=t.cv=void 0,t.Ik=t.A9=t.n_=t.gM=void 0;let n=r(48764);function i(e){if(!(e instanceof Uint8Array))throw TypeError("b must be a Uint8Array")}function o(e){return i(e),n.Buffer.from(e.buffer,e.byteOffset,e.length)}class s{constructor(e,t){if(!Number.isInteger(e))throw TypeError("span must be an integer");this.span=e,this.property=t}makeDestinationObject(){return{}}getSpan(e,t){if(0>this.span)throw RangeError("indeterminate span");return this.span}replicate(e){let t=Object.create(this.constructor.prototype);return Object.assign(t,this),t.property=e,t}fromArray(e){}}function a(e,t){return t.property?e+"["+t.property+"]":e}class l extends s{isCount(){throw Error("ExternalLayout is abstract")}}class u extends l{constructor(e,t=0,r){if(!(e instanceof s))throw TypeError("layout must be a Layout");if(!Number.isInteger(t))throw TypeError("offset must be integer or undefined");super(e.span,r||e.property),this.layout=e,this.offset=t}isCount(){return this.layout instanceof c||this.layout instanceof d}decode(e,t=0){return this.layout.decode(e,t+this.offset)}encode(e,t,r=0){return this.layout.encode(e,t,r+this.offset)}}class c extends s{constructor(e,t){if(super(e,t),6<this.span)throw RangeError("span must not exceed 6 bytes")}decode(e,t=0){return o(e).readUIntLE(t,this.span)}encode(e,t,r=0){return o(t).writeUIntLE(e,r,this.span),this.span}}class d extends s{constructor(e,t){if(super(e,t),6<this.span)throw RangeError("span must not exceed 6 bytes")}decode(e,t=0){return o(e).readUIntBE(t,this.span)}encode(e,t,r=0){return o(t).writeUIntBE(e,r,this.span),this.span}}function h(e){let t=Math.floor(e/4294967296);return{hi32:t,lo32:e-4294967296*t}}function f(e,t){return 4294967296*e+t}class p extends s{constructor(e){super(8,e)}decode(e,t=0){let r=o(e),n=r.readUInt32LE(t);return f(r.readUInt32LE(t+4),n)}encode(e,t,r=0){let n=h(e),i=o(t);return i.writeUInt32LE(n.lo32,r),i.writeUInt32LE(n.hi32,r+4),8}}class g extends s{constructor(e){super(8,e)}decode(e,t=0){let r=o(e),n=r.readUInt32LE(t);return f(r.readInt32LE(t+4),n)}encode(e,t,r=0){let n=h(e),i=o(t);return i.writeUInt32LE(n.lo32,r),i.writeInt32LE(n.hi32,r+4),8}}class m extends s{constructor(e,t,r){if(!(e instanceof s))throw TypeError("elementLayout must be a Layout");if(!(t instanceof l&&t.isCount()||Number.isInteger(t)&&0<=t))throw TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let n=-1;t instanceof l||!(0<e.span)||(n=t*e.span),super(n,r),this.elementLayout=e,this.count=t}getSpan(e,t=0){if(0<=this.span)return this.span;let r=0,n=this.count;if(n instanceof l&&(n=n.decode(e,t)),0<this.elementLayout.span)r=n*this.elementLayout.span;else{let i=0;for(;i<n;)r+=this.elementLayout.getSpan(e,t+r),++i}return r}decode(e,t=0){let r=[],n=0,i=this.count;for(i instanceof l&&(i=i.decode(e,t));n<i;)r.push(this.elementLayout.decode(e,t)),t+=this.elementLayout.getSpan(e,t),n+=1;return r}encode(e,t,r=0){let n=this.elementLayout,i=e.reduce((e,i)=>e+n.encode(i,t,r+e),0);return this.count instanceof l&&this.count.encode(e.length,t,r),i}}class y extends s{constructor(e,t,r){if(!(Array.isArray(e)&&e.reduce((e,t)=>e&&t instanceof s,!0)))throw TypeError("fields must be array of Layout instances");for(let n of("boolean"==typeof t&&void 0===r&&(r=t,t=void 0),e))if(0>n.span&&void 0===n.property)throw Error("fields cannot contain unnamed variable-length layout");let n=-1;try{n=e.reduce((e,t)=>e+t.getSpan(),0)}catch(e){}super(n,t),this.fields=e,this.decodePrefixes=!!r}getSpan(e,t=0){if(0<=this.span)return this.span;let r=0;try{r=this.fields.reduce((r,n)=>{let i=n.getSpan(e,t);return t+=i,r+i},0)}catch(e){throw RangeError("indeterminate span")}return r}decode(e,t=0){i(e);let r=this.makeDestinationObject();for(let n of this.fields)if(void 0!==n.property&&(r[n.property]=n.decode(e,t)),t+=n.getSpan(e,t),this.decodePrefixes&&e.length===t)break;return r}encode(e,t,r=0){let n=r,i=0,o=0;for(let n of this.fields){let s=n.span;if(o=0<s?s:0,void 0!==n.property){let i=e[n.property];void 0!==i&&(o=n.encode(i,t,r),0>s&&(s=n.getSpan(t,r)))}i=r,r+=s}return i+o-n}fromArray(e){let t=this.makeDestinationObject();for(let r of this.fields)void 0!==r.property&&0<e.length&&(t[r.property]=e.shift());return t}layoutFor(e){if("string"!=typeof e)throw TypeError("property must be string");for(let t of this.fields)if(t.property===e)return t}offsetOf(e){if("string"!=typeof e)throw TypeError("property must be string");let t=0;for(let r of this.fields){if(r.property===e)return t;0>r.span?t=-1:0<=t&&(t+=r.span)}}}class v{constructor(e){this.property=e}decode(e,t){throw Error("UnionDiscriminator is abstract")}encode(e,t,r){throw Error("UnionDiscriminator is abstract")}}class b extends v{constructor(e,t){if(!(e instanceof l&&e.isCount()))throw TypeError("layout must be an unsigned integer ExternalLayout");super(t||e.property||"variant"),this.layout=e}decode(e,t){return this.layout.decode(e,t)}encode(e,t,r){return this.layout.encode(e,t,r)}}class w extends s{constructor(e,t,r){let n;if(e instanceof c||e instanceof d)n=new b(new u(e));else if(e instanceof l&&e.isCount())n=new b(e);else if(e instanceof v)n=e;else throw TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(void 0===t&&(t=null),!(null===t||t instanceof s))throw TypeError("defaultLayout must be null or a Layout");if(null!==t){if(0>t.span)throw Error("defaultLayout must have constant span");void 0===t.property&&(t=t.replicate("content"))}let i=-1;t&&0<=(i=t.span)&&(e instanceof c||e instanceof d)&&(i+=n.layout.span),super(i,r),this.discriminator=n,this.usesPrefixDiscriminator=e instanceof c||e instanceof d,this.defaultLayout=t,this.registry={};let o=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(e){return o(e)},this.configGetSourceVariant=function(e){o=e.bind(this)}}getSpan(e,t=0){if(0<=this.span)return this.span;let r=this.getVariant(e,t);if(!r)throw Error("unable to determine span for unrecognized variant");return r.getSpan(e,t)}defaultGetSourceVariant(e){if(Object.prototype.hasOwnProperty.call(e,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(e,this.defaultLayout.property))return;let t=this.registry[e[this.discriminator.property]];if(t&&(!t.layout||t.property&&Object.prototype.hasOwnProperty.call(e,t.property)))return t}else for(let t in this.registry){let r=this.registry[t];if(r.property&&Object.prototype.hasOwnProperty.call(e,r.property))return r}throw Error("unable to infer src variant")}decode(e,t=0){let r;let n=this.discriminator,i=n.decode(e,t),o=this.registry[i];if(void 0===o){let o=this.defaultLayout,s=0;this.usesPrefixDiscriminator&&(s=n.layout.span),(r=this.makeDestinationObject())[n.property]=i,r[o.property]=o.decode(e,t+s)}else r=o.decode(e,t);return r}encode(e,t,r=0){let n=this.getSourceVariant(e);if(void 0===n){let n=this.discriminator,i=this.defaultLayout,o=0;return this.usesPrefixDiscriminator&&(o=n.layout.span),n.encode(e[n.property],t,r),o+i.encode(e[i.property],t,r+o)}return n.encode(e,t,r)}addVariant(e,t,r){let n=new x(this,e,t,r);return this.registry[e]=n,n}getVariant(e,t=0){let r;return e instanceof Uint8Array?r=this.discriminator.decode(e,t):r=e,this.registry[r]}}class x extends s{constructor(e,t,r,n){if(!(e instanceof w))throw TypeError("union must be a Union");if(!Number.isInteger(t)||0>t)throw TypeError("variant must be a (non-negative) integer");if("string"==typeof r&&void 0===n&&(n=r,r=null),r){if(!(r instanceof s))throw TypeError("layout must be a Layout");if(null!==e.defaultLayout&&0<=r.span&&r.span>e.defaultLayout.span)throw Error("variant span exceeds span of containing union");if("string"!=typeof n)throw TypeError("variant must have a String property")}let i=e.span;0>e.span&&0<=(i=r?r.span:0)&&e.usesPrefixDiscriminator&&(i+=e.discriminator.layout.span),super(i,n),this.union=e,this.variant=t,this.layout=r||null}getSpan(e,t=0){if(0<=this.span)return this.span;let r=0;this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span);let n=0;return this.layout&&(n=this.layout.getSpan(e,t+r)),r+n}decode(e,t=0){let r=this.makeDestinationObject();if(this!==this.union.getVariant(e,t))throw Error("variant mismatch");let n=0;return this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout?r[this.property]=this.layout.decode(e,t+n):this.property?r[this.property]=!0:this.union.usesPrefixDiscriminator&&(r[this.union.discriminator.property]=this.variant),r}encode(e,t,r=0){let n=0;if(this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout&&!Object.prototype.hasOwnProperty.call(e,this.property))throw TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,t,r);let i=n;if(this.layout&&(this.layout.encode(e[this.property],t,r+n),i+=this.layout.getSpan(t,r+n),0<=this.union.span&&i>this.union.span))throw Error("encoded variant overruns containing union");return i}fromArray(e){if(this.layout)return this.layout.fromArray(e)}}function E(e){return 0>e&&(e+=4294967296),e}class k extends s{constructor(e,t,r){if(!(e instanceof c||e instanceof d))throw TypeError("word must be a UInt or UIntBE layout");if("string"==typeof t&&void 0===r&&(r=t,t=!1),4<e.span)throw RangeError("word cannot exceed 32 bits");super(e.span,r),this.word=e,this.msb=!!t,this.fields=[];let n=0;this._packedSetValue=function(e){return n=E(e),this},this._packedGetValue=function(){return n}}decode(e,t=0){let r=this.makeDestinationObject(),n=this.word.decode(e,t);for(let t of(this._packedSetValue(n),this.fields))void 0!==t.property&&(r[t.property]=t.decode(e));return r}encode(e,t,r=0){let n=this.word.decode(t,r);for(let t of(this._packedSetValue(n),this.fields))if(void 0!==t.property){let r=e[t.property];void 0!==r&&t.encode(r)}return this.word.encode(this._packedGetValue(),t,r)}addField(e,t){let r=new S(this,e,t);return this.fields.push(r),r}addBoolean(e){let t=new T(this,e);return this.fields.push(t),t}fieldFor(e){if("string"!=typeof e)throw TypeError("property must be string");for(let t of this.fields)if(t.property===e)return t}}class S{constructor(e,t,r){if(!(e instanceof k))throw TypeError("container must be a BitStructure");if(!Number.isInteger(t)||0>=t)throw TypeError("bits must be positive integer");let n=8*e.span,i=e.fields.reduce((e,t)=>e+t.bits,0);if(t+i>n)throw Error("bits too long for span remainder ("+(n-i)+" of "+n+" remain)");this.container=e,this.bits=t,this.valueMask=(1<<t)-1,32===t&&(this.valueMask=4294967295),this.start=i,this.container.msb&&(this.start=n-i-t),this.wordMask=E(this.valueMask<<this.start),this.property=r}decode(e,t){return E(this.container._packedGetValue()&this.wordMask)>>>this.start}encode(e){if("number"!=typeof e||!Number.isInteger(e)||e!==E(e&this.valueMask))throw TypeError(a("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);let t=this.container._packedGetValue(),r=E(e<<this.start);this.container._packedSetValue(E(t&~this.wordMask)|r)}}class T extends S{constructor(e,t){super(e,1,t)}decode(e,t){return!!super.decode(e,t)}encode(e){"boolean"==typeof e&&(e=+e),super.encode(e)}}class M extends s{constructor(e,t){if(!(e instanceof l&&e.isCount()||Number.isInteger(e)&&0<=e))throw TypeError("length must be positive integer or an unsigned integer ExternalLayout");let r=-1;e instanceof l||(r=e),super(r,t),this.length=e}getSpan(e,t){let r=this.span;return 0>r&&(r=this.length.decode(e,t)),r}decode(e,t=0){let r=this.span;return 0>r&&(r=this.length.decode(e,t)),o(e).slice(t,t+r)}encode(e,t,r){let n=this.length;if(this.length instanceof l&&(n=e.length),!(e instanceof Uint8Array&&n===e.length))throw TypeError(a("Blob.encode",this)+" requires (length "+n+") Uint8Array as src");if(r+n>t.length)throw RangeError("encoding overruns Uint8Array");let i=o(e);return o(t).write(i.toString("hex"),r,n,"hex"),this.length instanceof l&&this.length.encode(n,t,r),n}}t.cv=(e,t,r)=>new u(e,t,r),t.u8=e=>new c(1,e),t.KB=e=>new c(2,e),t.Jq=e=>new c(4,e),t._O=e=>new p(e),t.gM=e=>new g(e),t.n_=(e,t,r)=>new y(e,t,r),t.A9=(e,t,r)=>new m(e,t,r),t.Ik=(e,t)=>new M(e,t)},13100:function(e,t,r){"use strict";r.r(t),r.d(t,{Account:function(){return rO},AddressLookupTableAccount:function(){return nO},AddressLookupTableInstruction:function(){return ol},AddressLookupTableProgram:function(){return ou},Authorized:function(){return ow},BLOCKHASH_CACHE_TIMEOUT_MS:function(){return nD},BPF_LOADER_DEPRECATED_PROGRAM_ID:function(){return rL},BPF_LOADER_PROGRAM_ID:function(){return nk},BpfLoader:function(){return nS},COMPUTE_BUDGET_INSTRUCTION_LAYOUTS:function(){return od},ComputeBudgetInstruction:function(){return oc},ComputeBudgetProgram:function(){return oh},Connection:function(){return oo},Ed25519Program:function(){return op},Enum:function(){return rM},EpochSchedule:function(){return nC},FeeCalculatorLayout:function(){return nh},Keypair:function(){return os},LAMPORTS_PER_SOL:function(){return oF},LOOKUP_TABLE_INSTRUCTION_LAYOUTS:function(){return oa},Loader:function(){return nE},Lockup:function(){return ox},MAX_SEED_LENGTH:function(){return rP},Message:function(){return rY},MessageAccountKeys:function(){return rU},MessageV0:function(){return rX},NONCE_ACCOUNT_LENGTH:function(){return np},NonceAccount:function(){return ng},PACKET_DATA_SIZE:function(){return rR},PUBLIC_KEY_LENGTH:function(){return rC},PublicKey:function(){return rI},SIGNATURE_LENGTH_IN_BYTES:function(){return rB},SOLANA_SCHEMA:function(){return rA},STAKE_CONFIG_ID:function(){return ob},STAKE_INSTRUCTION_LAYOUTS:function(){return ok},SYSTEM_INSTRUCTION_LAYOUTS:function(){return nb},SYSVAR_CLOCK_PUBKEY:function(){return r4},SYSVAR_EPOCH_SCHEDULE_PUBKEY:function(){return r8},SYSVAR_INSTRUCTIONS_PUBKEY:function(){return r7},SYSVAR_RECENT_BLOCKHASHES_PUBKEY:function(){return r9},SYSVAR_RENT_PUBKEY:function(){return ne},SYSVAR_REWARDS_PUBKEY:function(){return nt},SYSVAR_SLOT_HASHES_PUBKEY:function(){return nr},SYSVAR_SLOT_HISTORY_PUBKEY:function(){return nn},SYSVAR_STAKE_HISTORY_PUBKEY:function(){return ni},Secp256k1Program:function(){return ov},SendTransactionError:function(){return no},SolanaJSONRPCError:function(){return na},SolanaJSONRPCErrorCode:function(){return ns},StakeAuthorizationLayout:function(){return oS},StakeInstruction:function(){return oE},StakeProgram:function(){return oT},Struct:function(){return rT},SystemInstruction:function(){return nv},SystemProgram:function(){return nw},Transaction:function(){return r5},TransactionExpiredBlockheightExceededError:function(){return rN},TransactionExpiredNonceInvalidError:function(){return rK},TransactionExpiredTimeoutError:function(){return rD},TransactionInstruction:function(){return r2},TransactionMessage:function(){return r6},TransactionStatus:function(){return r0},VALIDATOR_INFO_KEY:function(){return oI},VERSION_PREFIX_MASK:function(){return rj},VOTE_PROGRAM_ID:function(){return oR},ValidatorInfo:function(){return oL},VersionedMessage:function(){return rQ},VersionedTransaction:function(){return r3},VoteAccount:function(){return oB},VoteAuthorizationLayout:function(){return oC},VoteInit:function(){return oM},VoteInstruction:function(){return oA},VoteProgram:function(){return o_},clusterApiUrl:function(){return oU},sendAndConfirmRawTransaction:function(){return oz},sendAndConfirmTransaction:function(){return nl}});var n,i,o={};r.r(o),r.d(o,{gk:function(){return O},dQ:function(){return $},ci:function(){return R},bytesToNumberBE:function(){return K},ty:function(){return U},eV:function(){return V},n$:function(){return Z},ql:function(){return W},hexToBytes:function(){return D},_t:function(){return I},tL:function(){return z},S5:function(){return F},FF:function(){return J}});var s=r(48764);function a(e){if(!Number.isSafeInteger(e)||e<0)throw Error(`positive integer expected, not ${e}`)}function l(e,...t){if(!(e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function u(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}let c="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,d=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),h=(e,t)=>e<<32-t|e>>>t;function f(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}(e)),l(e),e}new Uint8Array(new Uint32Array([287454020]).buffer)[0];class p{clone(){return this._cloneInto()}}function g(e){let t=t=>e().update(f(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function m(e=32){if(c&&"function"==typeof c.getRandomValues)return c.getRandomValues(new Uint8Array(e));throw Error("crypto.getRandomValues must be defined")}let y=(e,t,r)=>e&t^~e&r,v=(e,t,r)=>e&t^e&r^t&r;class b extends p{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=d(this.buffer)}update(e){u(this);let{view:t,buffer:r,blockLen:n}=this,i=(e=f(e)).length;for(let o=0;o<i;){let s=Math.min(n-this.pos,i-o);if(s===n){let t=d(e);for(;n<=i-o;o+=n)this.process(t,o);continue}r.set(e.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===n&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){u(this),function(e,t){l(e);let r=t.outputLen;if(e.length<r)throw Error(`digestInto() expects output buffer of length at least ${r}`)}(e,this),this.finished=!0;let{buffer:t,view:r,blockLen:n,isLE:i}=this,{pos:o}=this;t[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>n-o&&(this.process(r,0),o=0);for(let e=o;e<n;e++)t[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);let i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),l=n?4:0,u=n?0:4;e.setUint32(t+l,s,n),e.setUint32(t+u,a,n)}(r,n-8,BigInt(8*this.length),i),this.process(r,0);let s=d(e),a=this.outputLen;if(a%4)throw Error("_sha2: outputLen should be aligned to 32bit");let c=a/4,h=this.get();if(c>h.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)s.setUint32(4*e,h[e],i)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return e.length=n,e.pos=s,e.finished=i,e.destroyed=o,n%t&&e.buffer.set(r),e}}let w=BigInt(4294967296-1),x=BigInt(32);var E={split:function(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;i<e.length;i++){let{h:o,l:s}=function(e,t=!1){return t?{h:Number(e&w),l:Number(e>>x&w)}:{h:0|Number(e>>x&w),l:0|Number(e&w)}}(e[i],t);[r[i],n[i]]=[o,s]}return[r,n]},shrSH:(e,t,r)=>e>>>r,shrSL:(e,t,r)=>e<<32-r|t>>>r,rotrSH:(e,t,r)=>e>>>r|t<<32-r,rotrSL:(e,t,r)=>e<<32-r|t>>>r,rotrBH:(e,t,r)=>e<<64-r|t>>>r-32,rotrBL:(e,t,r)=>e>>>r-32|t<<64-r,add:function(e,t,r,n){let i=(t>>>0)+(n>>>0);return{h:e+r+(i/4294967296|0)|0,l:0|i}},add3L:(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),add3H:(e,t,r,n)=>t+r+n+(e/4294967296|0)|0,add4L:(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),add4H:(e,t,r,n,i)=>t+r+n+i+(e/4294967296|0)|0,add5H:(e,t,r,n,i,o)=>t+r+n+i+o+(e/4294967296|0)|0,add5L:(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0)};let[k,S]=E.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),T=new Uint32Array(80),M=new Uint32Array(80);class A extends b{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){let{Ah:e,Al:t,Bh:r,Bl:n,Ch:i,Cl:o,Dh:s,Dl:a,Eh:l,El:u,Fh:c,Fl:d,Gh:h,Gl:f,Hh:p,Hl:g}=this;return[e,t,r,n,i,o,s,a,l,u,c,d,h,f,p,g]}set(e,t,r,n,i,o,s,a,l,u,c,d,h,f,p,g){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|n,this.Ch=0|i,this.Cl=0|o,this.Dh=0|s,this.Dl=0|a,this.Eh=0|l,this.El=0|u,this.Fh=0|c,this.Fl=0|d,this.Gh=0|h,this.Gl=0|f,this.Hh=0|p,this.Hl=0|g}process(e,t){for(let r=0;r<16;r++,t+=4)T[r]=e.getUint32(t),M[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){let t=0|T[e-15],r=0|M[e-15],n=E.rotrSH(t,r,1)^E.rotrSH(t,r,8)^E.shrSH(t,r,7),i=E.rotrSL(t,r,1)^E.rotrSL(t,r,8)^E.shrSL(t,r,7),o=0|T[e-2],s=0|M[e-2],a=E.rotrSH(o,s,19)^E.rotrBH(o,s,61)^E.shrSH(o,s,6),l=E.rotrSL(o,s,19)^E.rotrBL(o,s,61)^E.shrSL(o,s,6),u=E.add4L(i,l,M[e-7],M[e-16]),c=E.add4H(u,n,a,T[e-7],T[e-16]);T[e]=0|c,M[e]=0|u}let{Ah:r,Al:n,Bh:i,Bl:o,Ch:s,Cl:a,Dh:l,Dl:u,Eh:c,El:d,Fh:h,Fl:f,Gh:p,Gl:g,Hh:m,Hl:y}=this;for(let e=0;e<80;e++){let t=E.rotrSH(c,d,14)^E.rotrSH(c,d,18)^E.rotrBH(c,d,41),v=E.rotrSL(c,d,14)^E.rotrSL(c,d,18)^E.rotrBL(c,d,41),b=c&h^~c&p,w=d&f^~d&g,x=E.add5L(y,v,w,S[e],M[e]),A=E.add5H(x,m,t,b,k[e],T[e]),P=0|x,C=E.rotrSH(r,n,28)^E.rotrBH(r,n,34)^E.rotrBH(r,n,39),_=E.rotrSL(r,n,28)^E.rotrBL(r,n,34)^E.rotrBL(r,n,39),I=r&i^r&s^i&s,O=n&o^n&a^o&a;m=0|p,y=0|g,p=0|h,g=0|f,h=0|c,f=0|d,({h:c,l:d}=E.add(0|l,0|u,0|A,0|P)),l=0|s,u=0|a,s=0|i,a=0|o,i=0|r,o=0|n;let L=E.add3L(P,_,O);r=E.add3H(L,A,C,I),n=0|L}({h:r,l:n}=E.add(0|this.Ah,0|this.Al,0|r,0|n)),({h:i,l:o}=E.add(0|this.Bh,0|this.Bl,0|i,0|o)),({h:s,l:a}=E.add(0|this.Ch,0|this.Cl,0|s,0|a)),({h:l,l:u}=E.add(0|this.Dh,0|this.Dl,0|l,0|u)),({h:c,l:d}=E.add(0|this.Eh,0|this.El,0|c,0|d)),({h:h,l:f}=E.add(0|this.Fh,0|this.Fl,0|h,0|f)),({h:p,l:g}=E.add(0|this.Gh,0|this.Gl,0|p,0|g)),({h:m,l:y}=E.add(0|this.Hh,0|this.Hl,0|m,0|y)),this.set(r,n,i,o,s,a,l,u,c,d,h,f,p,g,m,y)}roundClean(){T.fill(0),M.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}let P=g(()=>new A);BigInt(0);let C=BigInt(1),_=BigInt(2);function I(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function O(e){if(!I(e))throw Error("Uint8Array expected")}let L=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function R(e){O(e);let t="";for(let r=0;r<e.length;r++)t+=L[e[r]];return t}function j(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);return BigInt(""===e?"0":`0x${e}`)}let B={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function N(e){return e>=B._0&&e<=B._9?e-B._0:e>=B._A&&e<=B._F?e-(B._A-10):e>=B._a&&e<=B._f?e-(B._a-10):void 0}function D(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);let t=e.length,r=t/2;if(t%2)throw Error("padded hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let t=0,i=0;t<r;t++,i+=2){let r=N(e.charCodeAt(i)),o=N(e.charCodeAt(i+1));if(void 0===r||void 0===o)throw Error('hex string expected, got non-hex character "'+(e[i]+e[i+1])+'" at index '+i);n[t]=16*r+o}return n}function K(e){return j(R(e))}function U(e){return O(e),j(R(Uint8Array.from(e).reverse()))}function z(e,t){return D(e.toString(16).padStart(2*t,"0"))}function F(e,t){return z(e,t).reverse()}function W(e,t,r){let n;if("string"==typeof t)try{n=D(t)}catch(r){throw Error(`${e} must be valid hex string, got "${t}". Cause: ${r}`)}else if(I(t))n=Uint8Array.from(t);else throw Error(`${e} must be hex string or Uint8Array`);let i=n.length;if("number"==typeof r&&i!==r)throw Error(`${e} expected ${r} bytes, got ${i}`);return n}function V(...e){let t=0;for(let r=0;r<e.length;r++){let n=e[r];O(n),t+=n.length}let r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){let i=e[t];r.set(i,n),n+=i.length}return r}let $=e=>(_<<BigInt(e-1))-C,H=e=>new Uint8Array(e),q=e=>Uint8Array.from(e);function Z(e,t,r){if("number"!=typeof e||e<2)throw Error("hashLen must be a number");if("number"!=typeof t||t<2)throw Error("qByteLen must be a number");if("function"!=typeof r)throw Error("hmacFn must be a function");let n=H(e),i=H(e),o=0,s=()=>{n.fill(1),i.fill(0),o=0},a=(...e)=>r(i,n,...e),l=(e=H())=>{i=a(q([0]),e),n=a(),0!==e.length&&(i=a(q([1]),e),n=a())},u=()=>{if(o++>=1e3)throw Error("drbg: tried 1000 values");let e=0,r=[];for(;e<t;){let t=(n=a()).slice();r.push(t),e+=n.length}return V(...r)};return(e,t)=>{let r;for(s(),l(e);!(r=t(u()));)l();return s(),r}}let G={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||I(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};function J(e,t,r={}){let n=(t,r,n)=>{let i=G[r];if("function"!=typeof i)throw Error(`Invalid validator "${r}", expected function`);let o=e[t];if((!n||void 0!==o)&&!i(o,e))throw Error(`Invalid param ${String(t)}=${o} (${typeof o}), expected ${r}`)};for(let[e,r]of Object.entries(t))n(e,r,!1);for(let[e,t]of Object.entries(r))n(e,t,!0);return e}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */let Y=BigInt(0),X=BigInt(1),Q=BigInt(2),ee=BigInt(3),et=BigInt(4),er=BigInt(5),en=BigInt(8);function ei(e,t){let r=e%t;return r>=Y?r:t+r}function eo(e,t,r){let n=e;for(;t-- >Y;)n*=n,n%=r;return n}function es(e,t){if(e===Y||t<=Y)throw Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=ei(e,t),n=t,i=Y,o=X,s=X,a=Y;for(;r!==Y;){let e=n/r,t=n%r,l=i-s*e,u=o-a*e;n=r,r=t,i=s,o=a,s=l,a=u}if(n!==X)throw Error("invert: does not exist");return ei(i,t)}BigInt(9),BigInt(16);let ea=(e,t)=>(ei(e,t)&X)===X,el=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function eu(e,t){let r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function ec(e,t,r=!1,n={}){if(e<=Y)throw Error(`Expected Field ORDER > 0, got ${e}`);let{nBitLength:i,nByteLength:o}=eu(e,t);if(o>2048)throw Error("Field lengths over 2048 bytes are not supported");let s=function(e){if(e%et===ee){let t=(e+X)/et;return function(e,r){let n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw Error("Cannot find square root");return n}}if(e%en===er){let t=(e-er)/en;return function(e,r){let n=e.mul(r,Q),i=e.pow(n,t),o=e.mul(r,i),s=e.mul(e.mul(o,Q),i),a=e.mul(o,e.sub(s,e.ONE));if(!e.eql(e.sqr(a),r))throw Error("Cannot find square root");return a}}return function(e){let t,r,n;let i=(e-X)/Q;for(t=e-X,r=0;t%Q===Y;t/=Q,r++);for(n=Q;n<e&&function(e,t,r){if(r<=Y||t<Y)throw Error("Expected power/modulo > 0");if(r===X)return Y;let n=X;for(;t>Y;)t&X&&(n=n*e%r),e=e*e%r,t>>=X;return n}(n,i,e)!==e-X;n++);if(1===r){let t=(e+X)/et;return function(e,r){let n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw Error("Cannot find square root");return n}}let o=(t+X)/Q;return function(e,s){if(e.pow(s,i)===e.neg(e.ONE))throw Error("Cannot find square root");let a=r,l=e.pow(e.mul(e.ONE,n),t),u=e.pow(s,o),c=e.pow(s,t);for(;!e.eql(c,e.ONE);){if(e.eql(c,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(c);t<a&&!e.eql(r,e.ONE);t++)r=e.sqr(r);let r=e.pow(l,X<<BigInt(a-t-1));l=e.sqr(r),u=e.mul(u,r),c=e.mul(c,l),a=t}return u}}(e)}(e),a=Object.freeze({ORDER:e,BITS:i,BYTES:o,MASK:$(i),ZERO:Y,ONE:X,create:t=>ei(t,e),isValid:t=>{if("bigint"!=typeof t)throw Error(`Invalid field element: expected bigint, got ${typeof t}`);return Y<=t&&t<e},is0:e=>e===Y,isOdd:e=>(e&X)===X,neg:t=>ei(-t,e),eql:(e,t)=>e===t,sqr:t=>ei(t*t,e),add:(t,r)=>ei(t+r,e),sub:(t,r)=>ei(t-r,e),mul:(t,r)=>ei(t*r,e),pow:(e,t)=>(function(e,t,r){if(r<Y)throw Error("Expected power > 0");if(r===Y)return e.ONE;if(r===X)return t;let n=e.ONE,i=t;for(;r>Y;)r&X&&(n=e.mul(n,i)),i=e.sqr(i),r>>=X;return n})(a,e,t),div:(t,r)=>ei(t*es(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>es(t,e),sqrt:n.sqrt||(e=>s(a,e)),invertBatch:e=>(function(e,t){let r=Array(t.length),n=t.reduce((t,n,i)=>e.is0(n)?t:(r[i]=t,e.mul(t,n)),e.ONE),i=e.inv(n);return t.reduceRight((t,n,i)=>e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n)),i),r})(a,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?F(e,o):z(e,o),fromBytes:e=>{if(e.length!==o)throw Error(`Fp.fromBytes: expected ${o}, got ${e.length}`);return r?U(e):K(e)}});return Object.freeze(a)}function ed(e){if("bigint"!=typeof e)throw Error("field order must be bigint");return Math.ceil(e.toString(2).length/8)}function eh(e){let t=ed(e);return t+Math.ceil(t/2)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */let ef=BigInt(0),ep=BigInt(1);function eg(e,t){let r=(e,t)=>{let r=t.negate();return e?r:t},n=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:r,unsafeLadder(t,r){let n=e.ZERO,i=t;for(;r>ef;)r&ep&&(n=n.add(i)),i=i.double(),r>>=ep;return n},precomputeWindow(e,t){let{windows:r,windowSize:i}=n(t),o=[],s=e,a=s;for(let e=0;e<r;e++){a=s,o.push(a);for(let e=1;e<i;e++)a=a.add(s),o.push(a);s=a.double()}return o},wNAF(t,i,o){let{windows:s,windowSize:a}=n(t),l=e.ZERO,u=e.BASE,c=BigInt(2**t-1),d=2**t,h=BigInt(t);for(let e=0;e<s;e++){let t=e*a,n=Number(o&c);o>>=h,n>a&&(n-=d,o+=ep);let s=t+Math.abs(n)-1,f=e%2!=0,p=n<0;0===n?u=u.add(r(f,i[t])):l=l.add(r(p,i[s]))}return{p:l,f:u}},wNAFCached(e,t,r,n){let i=e._WINDOW_SIZE||1,o=t.get(e);return o||(o=this.precomputeWindow(e,i),1!==i&&t.set(e,n(o))),this.wNAF(i,o,r)}}}function em(e){return J(e.Fp,el.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"})),J(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...eu(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */let ey=BigInt(0),ev=BigInt(1),eb=BigInt(2),ew=BigInt(8),ex={zip215:!0},eE=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),ek=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752"),eS=BigInt(0),eT=BigInt(1),eM=BigInt(2),eA=BigInt(5),eP=BigInt(10),eC=BigInt(20),e_=BigInt(40),eI=BigInt(80);function eO(e,t){let r=ei(t*t*t,eE),n=function(e){let t=e*e%eE*e%eE,r=eo(t,eM,eE)*t%eE,n=eo(r,eT,eE)*e%eE,i=eo(n,eA,eE)*n%eE,o=eo(i,eP,eE)*i%eE,s=eo(o,eC,eE)*o%eE,a=eo(s,e_,eE)*s%eE,l=eo(a,eI,eE)*a%eE,u=eo(l,eI,eE)*a%eE,c=eo(u,eP,eE)*i%eE;return{pow_p_5_8:eo(c,eM,eE)*e%eE,b2:t}}(e*ei(r*r*t,eE)).pow_p_5_8,i=ei(e*r*n,eE),o=ei(t*i*i,eE),s=i,a=ei(i*ek,eE),l=o===e,u=o===ei(-e,eE),c=o===ei(-e*ek,eE);return l&&(i=s),(u||c)&&(i=a),ea(i,eE)&&(i=ei(-i,eE)),{isValid:l||u,value:i}}let eL=ec(eE,void 0,!0),eR={a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:eL,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:BigInt(8),Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:P,randomBytes:m,adjustScalarBytes:function(e){return e[0]&=248,e[31]&=127,e[31]|=64,e},uvRatio:eO},ej=function(e){let t=function(e){let t=em(e);return J(e,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...t})}(e),{Fp:r,n:n,prehash:i,hash:o,randomBytes:s,nByteLength:a,h:l}=t,u=eb<<BigInt(8*a)-ev,c=r.create,d=t.uvRatio||((e,t)=>{try{return{isValid:!0,value:r.sqrt(e*r.inv(t))}}catch(e){return{isValid:!1,value:ey}}}),h=t.adjustScalarBytes||(e=>e),f=t.domain||((e,t,r)=>{if(t.length||r)throw Error("Contexts/pre-hash are not supported");return e}),p=e=>"bigint"==typeof e&&ey<e,g=(e,t)=>p(e)&&p(t)&&e<t,m=e=>e===ey||g(e,u);function y(e,t){if(g(e,t))return e;throw Error(`Expected valid scalar < ${t}, got ${typeof e} ${e}`)}function v(e){return e===ey?e:y(e,n)}let b=new Map;function w(e){if(!(e instanceof x))throw Error("ExtendedPoint expected")}class x{constructor(e,t,r,n){if(this.ex=e,this.ey=t,this.ez=r,this.et=n,!m(e))throw Error("x required");if(!m(t))throw Error("y required");if(!m(r))throw Error("z required");if(!m(n))throw Error("t required")}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(e){if(e instanceof x)throw Error("extended point not allowed");let{x:t,y:r}=e||{};if(!m(t)||!m(r))throw Error("invalid affine point");return new x(t,r,ev,c(t*r))}static normalizeZ(e){let t=r.invertBatch(e.map(e=>e.ez));return e.map((e,r)=>e.toAffine(t[r])).map(x.fromAffine)}_setWindowSize(e){this._WINDOW_SIZE=e,b.delete(this)}assertValidity(){let{a:e,d:r}=t;if(this.is0())throw Error("bad point: ZERO");let{ex:n,ey:i,ez:o,et:s}=this,a=c(n*n),l=c(i*i),u=c(o*o),d=c(u*u),h=c(a*e);if(c(u*c(h+l))!==c(d+c(r*c(a*l))))throw Error("bad point: equation left != right (1)");if(c(n*i)!==c(o*s))throw Error("bad point: equation left != right (2)")}equals(e){w(e);let{ex:t,ey:r,ez:n}=this,{ex:i,ey:o,ez:s}=e,a=c(t*s),l=c(i*n),u=c(r*s),d=c(o*n);return a===l&&u===d}is0(){return this.equals(x.ZERO)}negate(){return new x(c(-this.ex),this.ey,this.ez,c(-this.et))}double(){let{a:e}=t,{ex:r,ey:n,ez:i}=this,o=c(r*r),s=c(n*n),a=c(eb*c(i*i)),l=c(e*o),u=r+n,d=c(c(u*u)-o-s),h=l+s,f=h-a,p=l-s,g=c(d*f),m=c(h*p),y=c(d*p);return new x(g,m,c(f*h),y)}add(e){w(e);let{a:r,d:n}=t,{ex:i,ey:o,ez:s,et:a}=this,{ex:l,ey:u,ez:d,et:h}=e;if(r===BigInt(-1)){let e=c((o-i)*(u+l)),t=c((o+i)*(u-l)),r=c(t-e);if(r===ey)return this.double();let n=c(s*eb*h),f=c(a*eb*d),p=f+n,g=t+e,m=f-n,y=c(p*r),v=c(g*m),b=c(p*m);return new x(y,v,c(r*g),b)}let f=c(i*l),p=c(o*u),g=c(a*n*h),m=c(s*d),y=c((i+o)*(l+u)-f-p),v=m-g,b=m+g,E=c(p-r*f),k=c(y*v),S=c(b*E),T=c(y*E);return new x(k,S,c(v*b),T)}subtract(e){return this.add(e.negate())}wNAF(e){return S.wNAFCached(this,b,e,x.normalizeZ)}multiply(e){let{p:t,f:r}=this.wNAF(y(e,n));return x.normalizeZ([t,r])[0]}multiplyUnsafe(e){let t=v(e);return t===ey?k:this.equals(k)||t===ev?this:this.equals(E)?this.wNAF(t).p:S.unsafeLadder(this,t)}isSmallOrder(){return this.multiplyUnsafe(l).is0()}isTorsionFree(){return S.unsafeLadder(this,n).is0()}toAffine(e){let{ex:t,ey:n,ez:i}=this,o=this.is0();null==e&&(e=o?ew:r.inv(i));let s=c(t*e),a=c(n*e),l=c(i*e);if(o)return{x:ey,y:ev};if(l!==ev)throw Error("invZ was invalid");return{x:s,y:a}}clearCofactor(){let{h:e}=t;return e===ev?this:this.multiplyUnsafe(e)}static fromHex(e,n=!1){let{d:i,a:o}=t,s=r.BYTES,a=(e=W("pointHex",e,s)).slice(),l=e[s-1];a[s-1]=-129&l;let h=U(a);h===ey||(n?y(h,u):y(h,r.ORDER));let f=c(h*h),{isValid:p,value:g}=d(c(f-ev),c(i*f-o));if(!p)throw Error("Point.fromHex: invalid y coordinate");let m=(g&ev)===ev,v=(128&l)!=0;if(!n&&g===ey&&v)throw Error("Point.fromHex: x=0 and x_0=1");return v!==m&&(g=c(-g)),x.fromAffine({x:g,y:h})}static fromPrivateKey(e){return T(e).point}toRawBytes(){let{x:e,y:t}=this.toAffine(),n=F(t,r.BYTES);return n[n.length-1]|=e&ev?128:0,n}toHex(){return R(this.toRawBytes())}}x.BASE=new x(t.Gx,t.Gy,ev,c(t.Gx*t.Gy)),x.ZERO=new x(ey,ev,ev,ey);let{BASE:E,ZERO:k}=x,S=eg(x,8*a);function T(e){e=W("private key",e,a);let t=W("hashed private key",o(e),2*a),r=h(t.slice(0,a)),i=t.slice(a,2*a),s=ei(U(r),n),l=E.multiply(s),u=l.toRawBytes();return{head:r,prefix:i,scalar:s,point:l,pointBytes:u}}function M(e=new Uint8Array,...t){return ei(U(o(f(V(...t),W("context",e),!!i))),n)}return E._setWindowSize(8),{CURVE:t,getPublicKey:function(e){return T(e).pointBytes},sign:function(e,t,o={}){e=W("message",e),i&&(e=i(e));let{prefix:s,scalar:l,pointBytes:u}=T(t),c=M(o.context,s,e),d=E.multiply(c).toRawBytes(),h=ei(c+M(o.context,d,u,e)*l,n);return v(h),W("result",V(d,F(h,r.BYTES)),2*a)},verify:function(e,t,n,o=ex){let s,a,l;let{context:u,zip215:c}=o,d=r.BYTES;e=W("signature",e,2*d),t=W("message",t),i&&(t=i(t));let h=U(e.slice(d,2*d));try{s=x.fromHex(n,c),a=x.fromHex(e.slice(0,d),c),l=E.multiplyUnsafe(h)}catch(e){return!1}if(!c&&s.isSmallOrder())return!1;let f=M(u,a.toRawBytes(),s.toRawBytes(),t);return a.add(s.multiplyUnsafe(f)).subtract(l).clearCofactor().equals(x.ZERO)},ExtendedPoint:x,utils:{getExtendedPublicKey:T,randomPrivateKey:()=>s(r.BYTES),precompute:(e=8,t=x.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)}}}(eR);({...eR});let eB=(eL.ORDER+BigInt(3))/BigInt(8);function eN(e){if(!(e instanceof eH))throw Error("RistrettoPoint expected")}eL.pow(eM,eB),eL.sqrt(eL.neg(eL.ONE)),eL.ORDER,BigInt(5),BigInt(8),BigInt(486662),function(e,t){if(!e.isOdd)throw Error("Field doesn't have isOdd");let r=e.sqrt(t);e.isOdd(r)&&e.neg(r)}(eL,eL.neg(BigInt(486664)));let eD=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),eK=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),eU=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),ez=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),eF=e=>eO(eT,e),eW=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),eV=e=>ej.CURVE.Fp.create(bytesToNumberLE(e)&eW);function e$(e){let{d:t}=ej.CURVE,r=ej.CURVE.Fp.ORDER,n=ej.CURVE.Fp.create,i=n(null*e*e),o=n((i+eT)*eU),s=BigInt(-1),a=n((s-t*i)*n(i+t)),{isValid:l,value:u}=eO(o,a),c=n(u*e);isNegativeLE(c,r)||(c=n(-c)),l||(u=c),l||(s=i);let d=n(s*(i-eT)*ez-a),h=u*u,f=n((u+u)*a),p=n(d*eD),g=n(eT-h),m=n(eT+h);return new ej.ExtendedPoint(n(f*m),n(g*p),n(p*m),n(f*g))}class eH{constructor(e){this.ep=e}static fromAffine(e){return new eH(ej.ExtendedPoint.fromAffine(e))}static hashToCurve(e){let t=e$(eV((e=ensureBytes("ristrettoHash",e,64)).slice(0,32))),r=e$(eV(e.slice(32,64)));return new eH(t.add(r))}static fromHex(e){e=ensureBytes("ristrettoHex",e,32);let{a:t,d:r}=ej.CURVE,n=ej.CURVE.Fp.ORDER,i=ej.CURVE.Fp.create,o="RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint",s=eV(e);if(!equalBytes(numberToBytesLE(s,32),e)||isNegativeLE(s,n))throw Error(o);let a=i(s*s),l=i(eT+t*a),u=i(eT-t*a),c=i(l*l),d=i(u*u),h=i(t*r*c-d),{isValid:f,value:p}=eF(i(h*d)),g=i(p*u),m=i(p*g*h),y=i((s+s)*g);isNegativeLE(y,n)&&(y=i(-y));let v=i(l*m),b=i(y*v);if(!f||isNegativeLE(b,n)||v===eS)throw Error(o);return new eH(new ej.ExtendedPoint(y,v,eT,b))}toRawBytes(){let e,{ex:t,ey:r,ez:n,et:i}=this.ep,o=ej.CURVE.Fp.ORDER,s=ej.CURVE.Fp.create,a=s(s(n+r)*s(n-r)),l=s(t*r),u=s(l*l),{value:c}=eF(s(a*u)),d=s(c*a),h=s(c*l),f=s(d*h*i);if(isNegativeLE(i*f,o)){let n=s(null*r),i=s(null*t);t=n,r=i,e=s(d*eK)}else e=h;isNegativeLE(t*f,o)&&(r=s(-r));let p=s((n-r)*e);return isNegativeLE(p,o)&&(p=s(-p)),numberToBytesLE(p,32)}toHex(){return bytesToHex(this.toRawBytes())}toString(){return this.toHex()}equals(e){eN(e);let{ex:t,ey:r}=this.ep,{ex:n,ey:i}=e.ep,o=ej.CURVE.Fp.create,s=o(t*i)===o(r*n),a=o(r*i)===o(t*n);return s||a}add(e){return eN(e),new eH(this.ep.add(e.ep))}subtract(e){return eN(e),new eH(this.ep.subtract(e.ep))}multiply(e){return new eH(this.ep.multiply(e))}multiplyUnsafe(e){return new eH(this.ep.multiplyUnsafe(e))}double(){return new eH(this.ep.double())}negate(){return new eH(this.ep.negate())}}var eq=r(13384),eZ=r.n(eq),eG=r(10011),eJ=r.n(eG);function eY(e){if(!Number.isSafeInteger(e)||e<0)throw Error(`positive integer expected, not ${e}`)}function eX(e,...t){if(!(e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function eQ(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function e0(e,t){eX(e);let r=t.outputLen;if(e.length<r)throw Error(`digestInto() expects output buffer of length at least ${r}`)}let e1=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),e2=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),e5=(e,t)=>e<<32-t|e>>>t,e6=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],e3=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255;function e4(e){for(let t=0;t<e.length;t++)e[t]=e3(e[t])}function e8(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}(e)),eX(e),e}class e7{clone(){return this._cloneInto()}}function e9(e){let t=t=>e().update(e8(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}let te=(e,t,r)=>e&t^~e&r,tt=(e,t,r)=>e&t^e&r^t&r;class tr extends e7{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=e2(this.buffer)}update(e){eQ(this);let{view:t,buffer:r,blockLen:n}=this,i=(e=e8(e)).length;for(let o=0;o<i;){let s=Math.min(n-this.pos,i-o);if(s===n){let t=e2(e);for(;n<=i-o;o+=n)this.process(t,o);continue}r.set(e.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===n&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){eQ(this),e0(e,this),this.finished=!0;let{buffer:t,view:r,blockLen:n,isLE:i}=this,{pos:o}=this;t[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>n-o&&(this.process(r,0),o=0);for(let e=o;e<n;e++)t[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);let i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),l=n?4:0,u=n?0:4;e.setUint32(t+l,s,n),e.setUint32(t+u,a,n)}(r,n-8,BigInt(8*this.length),i),this.process(r,0);let s=e2(e),a=this.outputLen;if(a%4)throw Error("_sha2: outputLen should be aligned to 32bit");let l=a/4,u=this.get();if(l>u.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<l;e++)s.setUint32(4*e,u[e],i)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return e.length=n,e.pos=s,e.finished=i,e.destroyed=o,n%t&&e.buffer.set(r),e}}let tn=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),ti=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),to=new Uint32Array(64);class ts extends tr{constructor(){super(64,32,8,!1),this.A=0|ti[0],this.B=0|ti[1],this.C=0|ti[2],this.D=0|ti[3],this.E=0|ti[4],this.F=0|ti[5],this.G=0|ti[6],this.H=0|ti[7]}get(){let{A:e,B:t,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[e,t,r,n,i,o,s,a]}set(e,t,r,n,i,o,s,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)to[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=to[e-15],r=to[e-2],n=e5(t,7)^e5(t,18)^t>>>3,i=e5(r,17)^e5(r,19)^r>>>10;to[e]=i+to[e-7]+n+to[e-16]|0}let{A:r,B:n,C:i,D:o,E:s,F:a,G:l,H:u}=this;for(let e=0;e<64;e++){let t=u+(e5(s,6)^e5(s,11)^e5(s,25))+te(s,a,l)+tn[e]+to[e]|0,c=(e5(r,2)^e5(r,13)^e5(r,22))+tt(r,n,i)|0;u=l,l=a,a=s,s=o+t|0,o=i,i=n,n=r,r=t+c|0}r=r+this.A|0,n=n+this.B|0,i=i+this.C|0,o=o+this.D|0,s=s+this.E|0,a=a+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(r,n,i,o,s,a,l,u)}roundClean(){to.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}let ta=e9(()=>new ts);var tl=r(25532),tu=r(39386),tc=r(40475);class td extends TypeError{constructor(e,t){let r;let{message:n,explanation:i,...o}=e,{path:s}=e,a=0===s.length?n:`At path: ${s.join(".")} -- ${n}`;super(i??a),null!=i&&(this.cause=a),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...t()])}}function th(e){return"object"==typeof e&&null!=e}function tf(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function*tp(e,t,r,n){var i;for(let o of(th(i=e)&&"function"==typeof i[Symbol.iterator]||(e=[e]),e)){let e=function(e,t,r,n){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});let{path:i,branch:o}=t,{type:s}=r,{refinement:a,message:l=`Expected a value of type \`${s}\`${a?` with refinement \`${a}\``:""}, but received: \`${tf(n)}\``}=e;return{value:n,type:s,refinement:a,key:i[i.length-1],path:i,branch:o,...e,message:l}}(o,t,r,n);e&&(yield e)}}function*tg(e,t,r={}){let{path:n=[],branch:i=[e],coerce:o=!1,mask:s=!1}=r,a={path:n,branch:i};if(o&&(e=t.coercer(e,a),s&&"type"!==t.type&&th(t.schema)&&th(e)&&!Array.isArray(e)))for(let r in e)void 0===t.schema[r]&&delete e[r];let l="valid";for(let n of t.validator(e,a))n.explanation=r.message,l="not_valid",yield[n,void 0];for(let[u,c,d]of t.entries(e,a))for(let t of tg(c,d,{path:void 0===u?n:[...n,u],branch:void 0===u?i:[...i,c],coerce:o,mask:s,message:r.message}))t[0]?(l=null!=t[0].refinement?"not_refined":"not_valid",yield[t[0],void 0]):o&&(c=t[1],void 0===u?e=c:e instanceof Map?e.set(u,c):e instanceof Set?e.add(c):th(e)&&(void 0!==c||u in e)&&(e[u]=c));if("not_valid"!==l)for(let n of t.refiner(e,a))n.explanation=r.message,l="not_refined",yield[n,void 0];"valid"===l&&(yield[void 0,e])}class tm{constructor(e){let{type:t,schema:r,validator:n,refiner:i,coercer:o=e=>e,entries:s=function*(){}}=e;this.type=t,this.schema=r,this.entries=s,this.coercer=o,n?this.validator=(e,t)=>tp(n(e,t),t,this,e):this.validator=()=>[],i?this.refiner=(e,t)=>tp(i(e,t),t,this,e):this.refiner=()=>[]}assert(e,t){return ty(e,this,t)}create(e,t){return tv(e,this,t)}is(e){return!tb(e,this)[0]}mask(e,t){return function(e,t,r){let n=tb(e,t,{coerce:!0,mask:!0,message:r});if(!n[0])return n[1];throw n[0]}(e,this,t)}validate(e,t={}){return tb(e,this,t)}}function ty(e,t,r){let n=tb(e,t,{message:r});if(n[0])throw n[0]}function tv(e,t,r){let n=tb(e,t,{coerce:!0,message:r});if(!n[0])return n[1];throw n[0]}function tb(e,t,r={}){let n=tg(e,t,r),i=function(e){let{done:t,value:r}=e.next();return t?void 0:r}(n);return i[0]?[new td(i[0],function*(){for(let e of n)e[0]&&(yield e[0])}),void 0]:[void 0,i[1]]}function tw(e,t){return new tm({type:e,schema:null,validator:t})}function tx(e){return new tm({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(let[r,n]of t.entries())yield[r,n,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${tf(e)}`})}function tE(){return tw("boolean",e=>"boolean"==typeof e)}function tk(e){return tw("instance",t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${tf(t)}`)}function tS(e){let t=tf(e),r=typeof e;return new tm({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?e:null,validator:r=>r===e||`Expected the literal \`${t}\`, but received: ${tf(r)}`})}function tT(e){return new tm({...e,validator:(t,r)=>null===t||e.validator(t,r),refiner:(t,r)=>null===t||e.refiner(t,r)})}function tM(){return tw("number",e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${tf(e)}`)}function tA(e){return new tm({...e,validator:(t,r)=>void 0===t||e.validator(t,r),refiner:(t,r)=>void 0===t||e.refiner(t,r)})}function tP(e,t){return new tm({type:"record",schema:null,*entries(r){if(th(r))for(let n in r){let i=r[n];yield[n,n,e],yield[n,i,t]}},validator:e=>th(e)||`Expected an object, but received: ${tf(e)}`})}function tC(){return tw("string",e=>"string"==typeof e||`Expected a string, but received: ${tf(e)}`)}function t_(e){let t=tw("never",()=>!1);return new tm({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){let n=Math.max(e.length,r.length);for(let i=0;i<n;i++)yield[i,r[i],e[i]||t]}},validator:e=>Array.isArray(e)||`Expected an array, but received: ${tf(e)}`})}function tI(e){let t=Object.keys(e);return new tm({type:"type",schema:e,*entries(r){if(th(r))for(let n of t)yield[n,r[n],e[n]]},validator:e=>th(e)||`Expected an object, but received: ${tf(e)}`,coercer:e=>th(e)?{...e}:e})}function tO(e){let t=e.map(e=>e.type).join(" | ");return new tm({type:"union",schema:null,coercer(t){for(let r of e){let[e,n]=r.validate(t,{coerce:!0});if(!e)return n}return t},validator(r,n){let i=[];for(let t of e){let[...e]=tg(r,t,n),[o]=e;if(!o[0])return[];for(let[t]of e)t&&i.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${tf(r)}`,...i]}})}function tL(){return tw("unknown",()=>!0)}function tR(e,t,r){return new tm({...e,coercer:(n,i)=>tb(n,t)[0]?e.coercer(n,i):e.coercer(r(n,i),i)})}var tj=r(31198),tB=r.n(tj),tN=r(84790),tD=class extends tN{socket;constructor(e,t,r){super(),this.socket=new window.WebSocket(e,r),this.socket.onopen=()=>this.emit("open"),this.socket.onmessage=e=>this.emit("message",e.data),this.socket.onerror=e=>this.emit("error",e),this.socket.onclose=e=>{this.emit("close",e.code,e.reason)}}send(e,t,r){let n=r||t;try{this.socket.send(e),n()}catch(e){n(e)}}close(e,t){this.socket.close(e,t)}addEventListener(e,t,r){this.socket.addEventListener(e,t,r)}},tK=class{encode(e){return JSON.stringify(e)}decode(e){return JSON.parse(e)}},tU=class extends tN{address;rpc_id;queue;options;autoconnect;ready;reconnect;reconnect_timer_id;reconnect_interval;max_reconnects;rest_options;current_reconnects;generate_request_id;socket;webSocketFactory;dataPack;constructor(e,t="ws://localhost:8080",{autoconnect:r=!0,reconnect:n=!0,reconnect_interval:i=1e3,max_reconnects:o=5,...s}={},a,l){super(),this.webSocketFactory=e,this.queue={},this.rpc_id=0,this.address=t,this.autoconnect=r,this.ready=!1,this.reconnect=n,this.reconnect_timer_id=void 0,this.reconnect_interval=i,this.max_reconnects=o,this.rest_options=s,this.current_reconnects=0,this.generate_request_id=a||(()=>++this.rpc_id),l?this.dataPack=l:this.dataPack=new tK,this.autoconnect&&this._connect(this.address,{autoconnect:this.autoconnect,reconnect:this.reconnect,reconnect_interval:this.reconnect_interval,max_reconnects:this.max_reconnects,...this.rest_options})}connect(){this.socket||this._connect(this.address,{autoconnect:this.autoconnect,reconnect:this.reconnect,reconnect_interval:this.reconnect_interval,max_reconnects:this.max_reconnects,...this.rest_options})}call(e,t,r,n){return n||"object"!=typeof r||(n=r,r=null),new Promise((i,o)=>{if(!this.ready)return o(Error("socket not ready"));let s=this.generate_request_id(e,t);this.socket.send(this.dataPack.encode({jsonrpc:"2.0",method:e,params:t||void 0,id:s}),n,e=>{if(e)return o(e);this.queue[s]={promise:[i,o]},r&&(this.queue[s].timeout=setTimeout(()=>{delete this.queue[s],o(Error("reply timeout"))},r))})})}async login(e){let t=await this.call("rpc.login",e);if(!t)throw Error("authentication failed");return t}async listMethods(){return await this.call("__listMethods")}notify(e,t){return new Promise((r,n)=>{if(!this.ready)return n(Error("socket not ready"));this.socket.send(this.dataPack.encode({jsonrpc:"2.0",method:e,params:t}),e=>{if(e)return n(e);r()})})}async subscribe(e){"string"==typeof e&&(e=[e]);let t=await this.call("rpc.on",e);if("string"==typeof e&&"ok"!==t[e])throw Error("Failed subscribing to an event '"+e+"' with: "+t[e]);return t}async unsubscribe(e){"string"==typeof e&&(e=[e]);let t=await this.call("rpc.off",e);if("string"==typeof e&&"ok"!==t[e])throw Error("Failed unsubscribing from an event with: "+t);return t}close(e,t){this.socket.close(e||1e3,t)}setAutoReconnect(e){this.reconnect=e}setReconnectInterval(e){this.reconnect_interval=e}setMaxReconnects(e){this.max_reconnects=e}_connect(e,t){clearTimeout(this.reconnect_timer_id),this.socket=this.webSocketFactory(e,t),this.socket.addEventListener("open",()=>{this.ready=!0,this.emit("open"),this.current_reconnects=0}),this.socket.addEventListener("message",({data:e})=>{e instanceof ArrayBuffer&&(e=s.Buffer.from(e).toString());try{e=this.dataPack.decode(e)}catch(e){return}if(e.notification&&this.listeners(e.notification).length){if(!Object.keys(e.params).length)return this.emit(e.notification);let t=[e.notification];if(e.params.constructor===Object)t.push(e.params);else for(let r=0;r<e.params.length;r++)t.push(e.params[r]);return Promise.resolve().then(()=>{this.emit.apply(this,t)})}if(!this.queue[e.id])return e.method?Promise.resolve().then(()=>{this.emit(e.method,e?.params)}):void 0;"error"in e=="result"in e&&this.queue[e.id].promise[1](Error('Server response malformed. Response must include either "result" or "error", but not both.')),this.queue[e.id].timeout&&clearTimeout(this.queue[e.id].timeout),e.error?this.queue[e.id].promise[1](e.error):this.queue[e.id].promise[0](e.result),delete this.queue[e.id]}),this.socket.addEventListener("error",e=>this.emit("error",e)),this.socket.addEventListener("close",({code:r,reason:n})=>{this.ready&&setTimeout(()=>this.emit("close",r,n),0),this.ready=!1,this.socket=void 0,1e3!==r&&(this.current_reconnects++,this.reconnect&&(this.max_reconnects>this.current_reconnects||0===this.max_reconnects)&&(this.reconnect_timer_id=setTimeout(()=>this._connect(e,t),this.reconnect_interval)))})}};let tz=BigInt(4294967296-1),tF=BigInt(32),tW=(e,t,r)=>e<<r|t>>>32-r,tV=(e,t,r)=>t<<r|e>>>32-r,t$=(e,t,r)=>t<<r-32|e>>>64-r,tH=(e,t,r)=>e<<r-32|t>>>64-r,tq=[],tZ=[],tG=[],tJ=BigInt(0),tY=BigInt(1),tX=BigInt(2),tQ=BigInt(7),t0=BigInt(256),t1=BigInt(113);for(let e=0,t=tY,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],tq.push(2*(5*n+r)),tZ.push((e+1)*(e+2)/2%64);let i=tJ;for(let e=0;e<7;e++)(t=(t<<tY^(t>>tQ)*t1)%t0)&tX&&(i^=tY<<(tY<<BigInt(e))-tY);tG.push(i)}let[t2,t5]=function(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;i<e.length;i++){let{h:o,l:s}=function(e,t=!1){return t?{h:Number(e&tz),l:Number(e>>tF&tz)}:{h:0|Number(e>>tF&tz),l:0|Number(e&tz)}}(e[i],t);[r[i],n[i]]=[o,s]}return[r,n]}(tG,!0),t6=(e,t,r)=>r>32?t$(e,t,r):tW(e,t,r),t3=(e,t,r)=>r>32?tH(e,t,r):tV(e,t,r);class t4 extends e7{constructor(e,t,r,n=!1,i=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=n,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,eY(r),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=e1(this.state)}keccak(){e6||e4(this.state32),function(e,t=24){let r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let n=(t+8)%10,i=(t+2)%10,o=r[i],s=r[i+1],a=t6(o,s,1)^r[n],l=t3(o,s,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=a,e[t+r+1]^=l}let t=e[2],i=e[3];for(let r=0;r<24;r++){let n=tZ[r],o=t6(t,i,n),s=t3(t,i,n),a=tq[r];t=e[a],i=e[a+1],e[a]=o,e[a+1]=s}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=t2[n],e[1]^=t5[n]}r.fill(0)}(this.state32,this.rounds),e6||e4(this.state32),this.posOut=0,this.pos=0}update(e){eQ(this);let{blockLen:t,state:r}=this,n=(e=e8(e)).length;for(let i=0;i<n;){let o=Math.min(t-this.pos,n-i);for(let t=0;t<o;t++)r[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,(128&t)!=0&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){eQ(this,!1),eX(e),this.finish();let t=this.state,{blockLen:r}=this;for(let n=0,i=e.length;n<i;){this.posOut>=r&&this.keccak();let o=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return eY(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(e0(e,this),this.finished)throw Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){let{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return e||(e=new t4(t,r,n,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=o,e.destroyed=this.destroyed,e}}let t8=e9(()=>new t4(136,1,32)),t7=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),t9=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),re=new Uint32Array(64);class rt extends b{constructor(){super(64,32,8,!1),this.A=0|t9[0],this.B=0|t9[1],this.C=0|t9[2],this.D=0|t9[3],this.E=0|t9[4],this.F=0|t9[5],this.G=0|t9[6],this.H=0|t9[7]}get(){let{A:e,B:t,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[e,t,r,n,i,o,s,a]}set(e,t,r,n,i,o,s,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)re[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=re[e-15],r=re[e-2],n=h(t,7)^h(t,18)^t>>>3,i=h(r,17)^h(r,19)^r>>>10;re[e]=i+re[e-7]+n+re[e-16]|0}let{A:r,B:n,C:i,D:o,E:s,F:a,G:l,H:u}=this;for(let e=0;e<64;e++){let t=u+(h(s,6)^h(s,11)^h(s,25))+y(s,a,l)+t7[e]+re[e]|0,c=(h(r,2)^h(r,13)^h(r,22))+v(r,n,i)|0;u=l,l=a,a=s,s=o+t|0,o=i,i=n,n=r,r=t+c|0}r=r+this.A|0,n=n+this.B|0,i=i+this.C|0,o=o+this.D|0,s=s+this.E|0,a=a+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(r,n,i,o,s,a,l,u)}roundClean(){re.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}let rr=g(()=>new rt);class rn extends p{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,function(e){if("function"!=typeof e||"function"!=typeof e.create)throw Error("Hash should be wrapped by utils.wrapConstructor");a(e.outputLen),a(e.blockLen)}(e);let r=f(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let n=this.blockLen,i=new Uint8Array(n);i.set(r.length>n?e.create().update(r).digest():r);for(let e=0;e<i.length;e++)i[e]^=54;this.iHash.update(i),this.oHash=e.create();for(let e=0;e<i.length;e++)i[e]^=106;this.oHash.update(i),i.fill(0)}update(e){return u(this),this.iHash.update(e),this}digestInto(e){u(this),l(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));let{oHash:t,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:s}=this;return e.finished=n,e.destroyed=i,e.blockLen=o,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}let ri=(e,t,r)=>new rn(e,t).update(r).digest();ri.create=(e,t)=>new rn(e,t);let{bytesToNumberBE:ro,hexToBytes:rs}=o,ra={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(e){let{Err:t}=ra;if(e.length<2||2!==e[0])throw new t("Invalid signature integer tag");let r=e[1],n=e.subarray(2,r+2);if(!r||n.length!==r)throw new t("Invalid signature integer: wrong length");if(128&n[0])throw new t("Invalid signature integer: negative");if(0===n[0]&&!(128&n[1]))throw new t("Invalid signature integer: unnecessary leading zero");return{d:ro(n),l:e.subarray(r+2)}},toSig(e){let{Err:t}=ra,r="string"==typeof e?rs(e):e;O(r);let n=r.length;if(n<2||48!=r[0])throw new t("Invalid signature tag");if(r[1]!==n-2)throw new t("Invalid signature: incorrect length");let{d:i,l:o}=ra._parseInt(r.subarray(2)),{d:s,l:a}=ra._parseInt(o);if(a.length)throw new t("Invalid signature: left bytes after parsing");return{r:i,s}},hexFromSig(e){let t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,r=e=>{let t=e.toString(16);return 1&t.length?`0${t}`:t},n=t(r(e.s)),i=t(r(e.r)),o=n.length/2,s=i.length/2,a=r(o),l=r(s);return`30${r(s+o+4)}02${l}${i}02${a}${n}`}},rl=BigInt(0),ru=BigInt(1),rc=(BigInt(2),BigInt(3));BigInt(4);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */let rd=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),rh=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),rf=BigInt(1),rp=BigInt(2),rg=(e,t)=>(e+t/rp)/t,rm=ec(rd,void 0,void 0,{sqrt:function(e){let t=BigInt(3),r=BigInt(6),n=BigInt(11),i=BigInt(22),o=BigInt(23),s=BigInt(44),a=BigInt(88),l=e*e*e%rd,u=l*l*e%rd,c=eo(u,t,rd)*u%rd,d=eo(c,t,rd)*u%rd,h=eo(d,rp,rd)*l%rd,f=eo(h,n,rd)*h%rd,p=eo(f,i,rd)*f%rd,g=eo(p,s,rd)*p%rd,m=eo(g,a,rd)*g%rd,y=eo(m,s,rd)*p%rd,v=eo(y,t,rd)*u%rd,b=eo(v,o,rd)*f%rd,w=eo(b,r,rd)*l%rd,x=eo(w,rp,rd);if(!rm.eql(rm.sqr(x),e))throw Error("Cannot find square root");return x}}),ry=function(e,t){let r=t=>(function(e){let t=function(e){let t=em(e);return J(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:r,n:n}=t,i=r.BYTES+1,o=2*r.BYTES+1;function s(e){return ei(e,n)}let{ProjectivePoint:a,normPrivateKeyToScalar:l,weierstrassEquation:u,isWithinCurveOrder:c}=function(e){let t=/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function(e){let t=em(e);J(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:r,Fp:n,a:i}=t;if(r){if(!n.eql(i,n.ZERO))throw Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:r}=t,n=t.toBytes||((e,t,n)=>{let i=t.toAffine();return V(Uint8Array.from([4]),r.toBytes(i.x),r.toBytes(i.y))}),i=t.fromBytes||(e=>{let t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function o(e){let{a:n,b:i}=t,o=r.sqr(e),s=r.mul(o,e);return r.add(r.add(s,r.mul(e,n)),i)}if(!r.eql(r.sqr(t.Gy),o(t.Gx)))throw Error("bad generator point: equation left != right");function s(e){return"bigint"==typeof e&&rl<e&&e<t.n}function a(e){if(!s(e))throw Error("Expected valid bigint: 0 < bigint < curve.n")}function l(e){let r;let{allowedPrivateKeyLengths:n,nByteLength:i,wrapPrivateKey:o,n:s}=t;if(n&&"bigint"!=typeof e){if(I(e)&&(e=R(e)),"string"!=typeof e||!n.includes(e.length))throw Error("Invalid key");e=e.padStart(2*i,"0")}try{r="bigint"==typeof e?e:K(W("private key",e,i))}catch(t){throw Error(`private key must be ${i} bytes, hex or bigint, not ${typeof e}`)}return o&&(r=ei(r,s)),a(r),r}let u=new Map;function c(e){if(!(e instanceof d))throw Error("ProjectivePoint expected")}class d{constructor(e,t,n){if(this.px=e,this.py=t,this.pz=n,null==e||!r.isValid(e))throw Error("x required");if(null==t||!r.isValid(t))throw Error("y required");if(null==n||!r.isValid(n))throw Error("z required")}static fromAffine(e){let{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw Error("invalid affine point");if(e instanceof d)throw Error("projective point not allowed");let i=e=>r.eql(e,r.ZERO);return i(t)&&i(n)?d.ZERO:new d(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){let t=r.invertBatch(e.map(e=>e.pz));return e.map((e,r)=>e.toAffine(t[r])).map(d.fromAffine)}static fromHex(e){let t=d.fromAffine(i(W("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return d.BASE.multiply(l(e))}_setWindowSize(e){this._WINDOW_SIZE=e,u.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!r.is0(this.py))return;throw Error("bad point: ZERO")}let{x:e,y:n}=this.toAffine();if(!r.isValid(e)||!r.isValid(n))throw Error("bad point: x or y not FE");let i=r.sqr(n),s=o(e);if(!r.eql(i,s))throw Error("bad point: equation left != right");if(!this.isTorsionFree())throw Error("bad point: not in prime-order subgroup")}hasEvenY(){let{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw Error("Field doesn't support isOdd")}equals(e){c(e);let{px:t,py:n,pz:i}=this,{px:o,py:s,pz:a}=e,l=r.eql(r.mul(t,a),r.mul(o,i)),u=r.eql(r.mul(n,a),r.mul(s,i));return l&&u}negate(){return new d(this.px,r.neg(this.py),this.pz)}double(){let{a:e,b:n}=t,i=r.mul(n,rc),{px:o,py:s,pz:a}=this,l=r.ZERO,u=r.ZERO,c=r.ZERO,h=r.mul(o,o),f=r.mul(s,s),p=r.mul(a,a),g=r.mul(o,s);return g=r.add(g,g),c=r.mul(o,a),c=r.add(c,c),l=r.mul(e,c),u=r.mul(i,p),u=r.add(l,u),l=r.sub(f,u),u=r.add(f,u),u=r.mul(l,u),l=r.mul(g,l),c=r.mul(i,c),p=r.mul(e,p),g=r.sub(h,p),g=r.mul(e,g),g=r.add(g,c),c=r.add(h,h),h=r.add(c,h),h=r.add(h,p),h=r.mul(h,g),u=r.add(u,h),p=r.mul(s,a),p=r.add(p,p),h=r.mul(p,g),l=r.sub(l,h),c=r.mul(p,f),c=r.add(c,c),new d(l,u,c=r.add(c,c))}add(e){c(e);let{px:n,py:i,pz:o}=this,{px:s,py:a,pz:l}=e,u=r.ZERO,h=r.ZERO,f=r.ZERO,p=t.a,g=r.mul(t.b,rc),m=r.mul(n,s),y=r.mul(i,a),v=r.mul(o,l),b=r.add(n,i),w=r.add(s,a);b=r.mul(b,w),w=r.add(m,y),b=r.sub(b,w),w=r.add(n,o);let x=r.add(s,l);return w=r.mul(w,x),x=r.add(m,v),w=r.sub(w,x),x=r.add(i,o),u=r.add(a,l),x=r.mul(x,u),u=r.add(y,v),x=r.sub(x,u),f=r.mul(p,w),u=r.mul(g,v),f=r.add(u,f),u=r.sub(y,f),f=r.add(y,f),h=r.mul(u,f),y=r.add(m,m),y=r.add(y,m),v=r.mul(p,v),w=r.mul(g,w),y=r.add(y,v),v=r.sub(m,v),v=r.mul(p,v),w=r.add(w,v),m=r.mul(y,w),h=r.add(h,m),m=r.mul(x,w),u=r.mul(b,u),u=r.sub(u,m),m=r.mul(b,y),f=r.mul(x,f),new d(u,h,f=r.add(f,m))}subtract(e){return this.add(e.negate())}is0(){return this.equals(d.ZERO)}wNAF(e){return f.wNAFCached(this,u,e,e=>{let t=r.invertBatch(e.map(e=>e.pz));return e.map((e,r)=>e.toAffine(t[r])).map(d.fromAffine)})}multiplyUnsafe(e){let n=d.ZERO;if(e===rl)return n;if(a(e),e===ru)return this;let{endo:i}=t;if(!i)return f.unsafeLadder(this,e);let{k1neg:o,k1:s,k2neg:l,k2:u}=i.splitScalar(e),c=n,h=n,p=this;for(;s>rl||u>rl;)s&ru&&(c=c.add(p)),u&ru&&(h=h.add(p)),p=p.double(),s>>=ru,u>>=ru;return o&&(c=c.negate()),l&&(h=h.negate()),h=new d(r.mul(h.px,i.beta),h.py,h.pz),c.add(h)}multiply(e){let n,i;a(e);let{endo:o}=t;if(o){let{k1neg:t,k1:s,k2neg:a,k2:l}=o.splitScalar(e),{p:u,f:c}=this.wNAF(s),{p:h,f:p}=this.wNAF(l);u=f.constTimeNegate(t,u),h=f.constTimeNegate(a,h),h=new d(r.mul(h.px,o.beta),h.py,h.pz),n=u.add(h),i=c.add(p)}else{let{p:t,f:r}=this.wNAF(e);n=t,i=r}return d.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(e,t,r){let n=d.BASE,i=(e,t)=>t!==rl&&t!==ru&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),o=i(this,t).add(i(e,r));return o.is0()?void 0:o}toAffine(e){let{px:t,py:n,pz:i}=this,o=this.is0();null==e&&(e=o?r.ONE:r.inv(i));let s=r.mul(t,e),a=r.mul(n,e),l=r.mul(i,e);if(o)return{x:r.ZERO,y:r.ZERO};if(!r.eql(l,r.ONE))throw Error("invZ was invalid");return{x:s,y:a}}isTorsionFree(){let{h:e,isTorsionFree:r}=t;if(e===ru)return!0;if(r)return r(d,this);throw Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:e,clearCofactor:r}=t;return e===ru?this:r?r(d,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),n(d,this,e)}toHex(e=!0){return R(this.toRawBytes(e))}}d.BASE=new d(t.Gx,t.Gy,r.ONE),d.ZERO=new d(r.ZERO,r.ONE,r.ZERO);let h=t.nBitLength,f=eg(d,t.endo?Math.ceil(h/2):h);return{CURVE:t,ProjectivePoint:d,normPrivateKeyToScalar:l,weierstrassEquation:o,isWithinCurveOrder:s}}({...t,toBytes(e,t,n){let i=t.toAffine(),o=r.toBytes(i.x),s=V;return n?s(Uint8Array.from([t.hasEvenY()?2:3]),o):s(Uint8Array.from([4]),o,r.toBytes(i.y))},fromBytes(e){let t=e.length,n=e[0],s=e.subarray(1);if(t===i&&(2===n||3===n)){let e;let t=K(s);if(!(rl<t&&t<r.ORDER))throw Error("Point is not on curve");let i=u(t);try{e=r.sqrt(i)}catch(e){throw Error("Point is not on curve"+(e instanceof Error?": "+e.message:""))}return(1&n)==1!=((e&ru)===ru)&&(e=r.neg(e)),{x:t,y:e}}if(t===o&&4===n)return{x:r.fromBytes(s.subarray(0,r.BYTES)),y:r.fromBytes(s.subarray(r.BYTES,2*r.BYTES))};throw Error(`Point of length ${t} was invalid. Expected ${i} compressed bytes or ${o} uncompressed bytes`)}}),d=e=>R(z(e,t.nByteLength)),h=(e,t,r)=>K(e.slice(t,r));class f{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){let r=t.nByteLength;return new f(h(e=W("compactSignature",e,2*r),0,r),h(e,r,2*r))}static fromDER(e){let{r:t,s:r}=ra.toSig(W("DER",e));return new f(t,r)}assertValidity(){if(!c(this.r))throw Error("r must be 0 < r < CURVE.n");if(!c(this.s))throw Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new f(this.r,this.s,e)}recoverPublicKey(e){let{r:i,s:o,recovery:l}=this,u=m(W("msgHash",e));if(null==l||![0,1,2,3].includes(l))throw Error("recovery id invalid");let c=2===l||3===l?i+t.n:i;if(c>=r.ORDER)throw Error("recovery id 2 or 3 invalid");let h=(1&l)==0?"02":"03",f=a.fromHex(h+d(c)),p=es(c,n),g=s(-u*p),y=s(o*p),v=a.BASE.multiplyAndAddUnsafe(f,g,y);if(!v)throw Error("point at infinify");return v.assertValidity(),v}hasHighS(){return this.s>n>>ru}normalizeS(){return this.hasHighS()?new f(this.r,s(-this.s),this.recovery):this}toDERRawBytes(){return D(this.toDERHex())}toDERHex(){return ra.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return D(this.toCompactHex())}toCompactHex(){return d(this.r)+d(this.s)}}function p(e){let t=I(e),r="string"==typeof e,n=(t||r)&&e.length;return t?n===i||n===o:r?n===2*i||n===2*o:e instanceof a}let g=t.bits2int||function(e){let r=K(e),n=8*e.length-t.nBitLength;return n>0?r>>BigInt(n):r},m=t.bits2int_modN||function(e){return s(g(e))},y=$(t.nBitLength);function v(e){if("bigint"!=typeof e)throw Error("bigint expected");if(!(rl<=e&&e<y))throw Error(`bigint expected < 2^${t.nBitLength}`);return z(e,t.nByteLength)}let b={lowS:t.lowS,prehash:!1},w={lowS:t.lowS,prehash:!1};return a.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function(e,t=!0){return a.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(p(e))throw Error("first arg must be private key");if(!p(t))throw Error("second arg must be public key");return a.fromHex(t).multiply(l(e)).toRawBytes(r)},sign:function(e,i,o=b){let{seed:u,k2sig:d}=function(e,i,o=b){if(["recovered","canonical"].some(e=>e in o))throw Error("sign() legacy options not supported");let{hash:u,randomBytes:d}=t,{lowS:h,prehash:p,extraEntropy:y}=o;null==h&&(h=!0),e=W("msgHash",e),p&&(e=W("prehashed msgHash",u(e)));let w=m(e),x=l(i),E=[v(x),v(w)];if(null!=y&&!1!==y){let e=!0===y?d(r.BYTES):y;E.push(W("extraEntropy",e))}return{seed:V(...E),k2sig:function(e){let t=g(e);if(!c(t))return;let r=es(t,n),i=a.BASE.multiply(t).toAffine(),o=s(i.x);if(o===rl)return;let l=s(r*s(w+o*x));if(l===rl)return;let u=(i.x===o?0:2)|Number(i.y&ru),d=l;if(h&&l>n>>ru)d=l>n>>ru?s(-l):l,u^=1;return new f(o,d,u)}}}(e,i,o);return Z(t.hash.outputLen,t.nByteLength,t.hmac)(u,d)},verify:function(e,r,i,o=w){let l,u;if(r=W("msgHash",r),i=W("publicKey",i),"strict"in o)throw Error("options.strict was renamed to lowS");let{lowS:c,prehash:d}=o;try{if("string"==typeof e||I(e))try{u=f.fromDER(e)}catch(t){if(!(t instanceof ra.Err))throw t;u=f.fromCompact(e)}else if("object"==typeof e&&"bigint"==typeof e.r&&"bigint"==typeof e.s){let{r:t,s:r}=e;u=new f(t,r)}else throw Error("PARSE");l=a.fromHex(i)}catch(e){if("PARSE"===e.message)throw Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(c&&u.hasHighS())return!1;d&&(r=t.hash(r));let{r:h,s:p}=u,g=m(r),y=es(p,n),v=s(g*y),b=s(h*y),x=a.BASE.multiplyAndAddUnsafe(l,v,b)?.toAffine();return!!x&&s(x.x)===h},ProjectivePoint:a,Signature:f,utils:{isValidPrivateKey(e){try{return l(e),!0}catch(e){return!1}},normPrivateKeyToScalar:l,randomPrivateKey:()=>{let e=eh(t.n);return function(e,t,r=!1){let n=e.length,i=ed(t),o=eh(t);if(n<16||n<o||n>1024)throw Error(`expected ${o}-1024 bytes of input, got ${n}`);let s=ei(r?K(e):U(e),t-X)+X;return r?F(s,i):z(s,i)}(t.randomBytes(e),t.n)},precompute:(e=8,t=a.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)}}})({...e,hash:t,hmac:(e,...r)=>ri(t,e,function(...e){let t=0;for(let r=0;r<e.length;r++){let n=e[r];l(n),t+=n.length}let r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){let i=e[t];r.set(i,n),n+=i.length}return r}(...r)),randomBytes:m});return Object.freeze({...r(t),create:r})}({a:BigInt(0),b:BigInt(7),Fp:rm,n:rh,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{let t=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-rf*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),n=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=BigInt("0x100000000000000000000000000000000"),o=rg(t*e,rh),s=rg(-r*e,rh),a=ei(e-o*t-s*n,rh),l=ei(-o*r-s*t,rh),u=a>i,c=l>i;if(u&&(a=rh-a),c&&(l=rh-l),a>i||l>i)throw Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:u,k1:a,k2neg:c,k2:l}}}},rr),rv=(BigInt(0),ry.ProjectivePoint,ej.utils.randomPrivateKey),rb=()=>{let e=ej.utils.randomPrivateKey(),t=rw(e),r=new Uint8Array(64);return r.set(e),r.set(t,32),{publicKey:t,secretKey:r}},rw=ej.getPublicKey;function rx(e){try{return ej.ExtendedPoint.fromHex(e),!0}catch{return!1}}let rE=(e,t)=>ej.sign(e,t.slice(0,32)),rk=ej.verify,rS=e=>s.Buffer.isBuffer(e)?e:e instanceof Uint8Array?s.Buffer.from(e.buffer,e.byteOffset,e.byteLength):s.Buffer.from(e);class rT{constructor(e){Object.assign(this,e)}encode(){return s.Buffer.from((0,tl.serialize)(rA,this))}static decode(e){return(0,tl.deserialize)(rA,this,e)}static decodeUnchecked(e){return(0,tl.deserializeUnchecked)(rA,this,e)}}class rM extends rT{constructor(e){if(super(e),this.enum="",1!==Object.keys(e).length)throw Error("Enum can only take single value");Object.keys(e).map(e=>{this.enum=e})}}let rA=new Map,rP=32,rC=32,r_=1;class rI extends rT{constructor(e){if(super({}),this._bn=void 0,void 0!==e._bn)this._bn=e._bn;else{if("string"==typeof e){let t=eJ().decode(e);if(t.length!=rC)throw Error("Invalid public key input");this._bn=new(eZ())(t)}else this._bn=new(eZ())(e);if(this._bn.byteLength()>rC)throw Error("Invalid public key input")}}static unique(){let e=new rI(r_);return r_+=1,new rI(e.toBuffer())}equals(e){return this._bn.eq(e._bn)}toBase58(){return eJ().encode(this.toBytes())}toJSON(){return this.toBase58()}toBytes(){let e=this.toBuffer();return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}toBuffer(){let e=this._bn.toArrayLike(s.Buffer);if(e.length===rC)return e;let t=s.Buffer.alloc(32);return e.copy(t,32-e.length),t}get[Symbol.toStringTag](){return`PublicKey(${this.toString()})`}toString(){return this.toBase58()}static async createWithSeed(e,t,r){return new rI(ta(s.Buffer.concat([e.toBuffer(),s.Buffer.from(t),r.toBuffer()])))}static createProgramAddressSync(e,t){let r=s.Buffer.alloc(0);e.forEach(function(e){if(e.length>rP)throw TypeError("Max seed length exceeded");r=s.Buffer.concat([r,rS(e)])});let n=ta(r=s.Buffer.concat([r,t.toBuffer(),s.Buffer.from("ProgramDerivedAddress")]));if(rx(n))throw Error("Invalid seeds, address must fall off the curve");return new rI(n)}static async createProgramAddress(e,t){return this.createProgramAddressSync(e,t)}static findProgramAddressSync(e,t){let r,n=255;for(;0!=n;){try{let i=e.concat(s.Buffer.from([n]));r=this.createProgramAddressSync(i,t)}catch(e){if(e instanceof TypeError)throw e;n--;continue}return[r,n]}throw Error("Unable to find a viable program address nonce")}static async findProgramAddress(e,t){return this.findProgramAddressSync(e,t)}static isOnCurve(e){return rx(new rI(e).toBytes())}}rI.default=new rI("11111111111111111111111111111111"),rA.set(rI,{kind:"struct",fields:[["_bn","u256"]]});class rO{constructor(e){if(this._publicKey=void 0,this._secretKey=void 0,e){let t=rS(e);if(64!==e.length)throw Error("bad secret key size");this._publicKey=t.slice(32,64),this._secretKey=t.slice(0,32)}else this._secretKey=rS(rv()),this._publicKey=rS(rw(this._secretKey))}get publicKey(){return new rI(this._publicKey)}get secretKey(){return s.Buffer.concat([this._secretKey,this._publicKey],64)}}let rL=new rI("BPFLoader1111111111111111111111111111111111"),rR=1232,rj=127,rB=64;class rN extends Error{constructor(e){super(`Signature ${e} has expired: block height exceeded.`),this.signature=void 0,this.signature=e}}Object.defineProperty(rN.prototype,"name",{value:"TransactionExpiredBlockheightExceededError"});class rD extends Error{constructor(e,t){super(`Transaction was not confirmed in ${t.toFixed(2)} seconds. It is unknown if it succeeded or failed. Check signature ${e} using the Solana Explorer or CLI tools.`),this.signature=void 0,this.signature=e}}Object.defineProperty(rD.prototype,"name",{value:"TransactionExpiredTimeoutError"});class rK extends Error{constructor(e){super(`Signature ${e} has expired: the nonce is no longer valid.`),this.signature=void 0,this.signature=e}}Object.defineProperty(rK.prototype,"name",{value:"TransactionExpiredNonceInvalidError"});class rU{constructor(e,t){this.staticAccountKeys=void 0,this.accountKeysFromLookups=void 0,this.staticAccountKeys=e,this.accountKeysFromLookups=t}keySegments(){let e=[this.staticAccountKeys];return this.accountKeysFromLookups&&(e.push(this.accountKeysFromLookups.writable),e.push(this.accountKeysFromLookups.readonly)),e}get(e){for(let t of this.keySegments()){if(e<t.length)return t[e];e-=t.length}}get length(){return this.keySegments().flat().length}compileInstructions(e){if(this.length>256)throw Error("Account index overflow encountered during compilation");let t=new Map;this.keySegments().flat().forEach((e,r)=>{t.set(e.toBase58(),r)});let r=e=>{let r=t.get(e.toBase58());if(void 0===r)throw Error("Encountered an unknown instruction account key during compilation");return r};return e.map(e=>({programIdIndex:r(e.programId),accountKeyIndexes:e.keys.map(e=>r(e.pubkey)),data:e.data}))}}let rz=(e="publicKey")=>tu.Ik(32,e),rF=(e="signature")=>tu.Ik(64,e),rW=(e="string")=>{let t=tu.n_([tu.Jq("length"),tu.Jq("lengthPadding"),tu.Ik(tu.cv(tu.Jq(),-8),"chars")],e),r=t.decode.bind(t),n=t.encode.bind(t);return t.decode=(e,t)=>r(e,t).chars.toString(),t.encode=(e,t,r)=>n({chars:s.Buffer.from(e,"utf8")},t,r),t.alloc=e=>tu.Jq().span+tu.Jq().span+s.Buffer.from(e,"utf8").length,t};function rV(e){let t=0,r=0;for(;;){let n=e.shift();if(t|=(127&n)<<7*r,r+=1,(128&n)==0)break}return t}function r$(e,t){let r=t;for(;;){let t=127&r;if(0==(r>>=7)){e.push(t);break}t|=128,e.push(t)}}function rH(e,t){if(!e)throw Error(t||"Assertion failed")}class rq{constructor(e,t){this.payer=void 0,this.keyMetaMap=void 0,this.payer=e,this.keyMetaMap=t}static compile(e,t){let r=new Map,n=e=>{let t=e.toBase58(),n=r.get(t);return void 0===n&&(n={isSigner:!1,isWritable:!1,isInvoked:!1},r.set(t,n)),n},i=n(t);for(let t of(i.isSigner=!0,i.isWritable=!0,e))for(let e of(n(t.programId).isInvoked=!0,t.keys)){let t=n(e.pubkey);t.isSigner||=e.isSigner,t.isWritable||=e.isWritable}return new rq(t,r)}getMessageComponents(){let e=[...this.keyMetaMap.entries()];rH(e.length<=256,"Max static account keys length exceeded");let t=e.filter(([,e])=>e.isSigner&&e.isWritable),r=e.filter(([,e])=>e.isSigner&&!e.isWritable),n=e.filter(([,e])=>!e.isSigner&&e.isWritable),i=e.filter(([,e])=>!e.isSigner&&!e.isWritable),o={numRequiredSignatures:t.length+r.length,numReadonlySignedAccounts:r.length,numReadonlyUnsignedAccounts:i.length};{rH(t.length>0,"Expected at least one writable signer key");let[e]=t[0];rH(e===this.payer.toBase58(),"Expected first writable signer key to be the fee payer")}return[o,[...t.map(([e])=>new rI(e)),...r.map(([e])=>new rI(e)),...n.map(([e])=>new rI(e)),...i.map(([e])=>new rI(e))]]}extractTableLookup(e){let[t,r]=this.drainKeysFoundInLookupTable(e.state.addresses,e=>!e.isSigner&&!e.isInvoked&&e.isWritable),[n,i]=this.drainKeysFoundInLookupTable(e.state.addresses,e=>!e.isSigner&&!e.isInvoked&&!e.isWritable);if(0!==t.length||0!==n.length)return[{accountKey:e.key,writableIndexes:t,readonlyIndexes:n},{writable:r,readonly:i}]}drainKeysFoundInLookupTable(e,t){let r=[],n=[];for(let[i,o]of this.keyMetaMap.entries())if(t(o)){let t=new rI(i),o=e.findIndex(e=>e.equals(t));o>=0&&(rH(o<256,"Max lookup table index exceeded"),r.push(o),n.push(t),this.keyMetaMap.delete(i))}return[r,n]}}let rZ="Reached end of buffer unexpectedly";function rG(e){if(0===e.length)throw Error(rZ);return e.shift()}function rJ(e,...t){let[r]=t;if(2===t.length?r+(t[1]??0)>e.length:r>=e.length)throw Error(rZ);return e.splice(...t)}class rY{constructor(e){this.header=void 0,this.accountKeys=void 0,this.recentBlockhash=void 0,this.instructions=void 0,this.indexToProgramIds=new Map,this.header=e.header,this.accountKeys=e.accountKeys.map(e=>new rI(e)),this.recentBlockhash=e.recentBlockhash,this.instructions=e.instructions,this.instructions.forEach(e=>this.indexToProgramIds.set(e.programIdIndex,this.accountKeys[e.programIdIndex]))}get version(){return"legacy"}get staticAccountKeys(){return this.accountKeys}get compiledInstructions(){return this.instructions.map(e=>({programIdIndex:e.programIdIndex,accountKeyIndexes:e.accounts,data:eJ().decode(e.data)}))}get addressTableLookups(){return[]}getAccountKeys(){return new rU(this.staticAccountKeys)}static compile(e){let[t,r]=rq.compile(e.instructions,e.payerKey).getMessageComponents(),n=new rU(r).compileInstructions(e.instructions).map(e=>({programIdIndex:e.programIdIndex,accounts:e.accountKeyIndexes,data:eJ().encode(e.data)}));return new rY({header:t,accountKeys:r,recentBlockhash:e.recentBlockhash,instructions:n})}isAccountSigner(e){return e<this.header.numRequiredSignatures}isAccountWritable(e){let t=this.header.numRequiredSignatures;if(!(e>=this.header.numRequiredSignatures))return e<t-this.header.numReadonlySignedAccounts;{let r=this.accountKeys.length-t-this.header.numReadonlyUnsignedAccounts;return e-t<r}}isProgramId(e){return this.indexToProgramIds.has(e)}programIds(){return[...this.indexToProgramIds.values()]}nonProgramIds(){return this.accountKeys.filter((e,t)=>!this.isProgramId(t))}serialize(){let e=this.accountKeys.length,t=[];r$(t,e);let r=this.instructions.map(e=>{let{accounts:t,programIdIndex:r}=e,n=Array.from(eJ().decode(e.data)),i=[];r$(i,t.length);let o=[];return r$(o,n.length),{programIdIndex:r,keyIndicesCount:s.Buffer.from(i),keyIndices:t,dataLength:s.Buffer.from(o),data:n}}),n=[];r$(n,r.length);let i=s.Buffer.alloc(rR);s.Buffer.from(n).copy(i);let o=n.length;r.forEach(e=>{let t=tu.n_([tu.u8("programIdIndex"),tu.Ik(e.keyIndicesCount.length,"keyIndicesCount"),tu.A9(tu.u8("keyIndex"),e.keyIndices.length,"keyIndices"),tu.Ik(e.dataLength.length,"dataLength"),tu.A9(tu.u8("userdatum"),e.data.length,"data")]).encode(e,i,o);o+=t}),i=i.slice(0,o);let a=tu.n_([tu.Ik(1,"numRequiredSignatures"),tu.Ik(1,"numReadonlySignedAccounts"),tu.Ik(1,"numReadonlyUnsignedAccounts"),tu.Ik(t.length,"keyCount"),tu.A9(rz("key"),e,"keys"),rz("recentBlockhash")]),l={numRequiredSignatures:s.Buffer.from([this.header.numRequiredSignatures]),numReadonlySignedAccounts:s.Buffer.from([this.header.numReadonlySignedAccounts]),numReadonlyUnsignedAccounts:s.Buffer.from([this.header.numReadonlyUnsignedAccounts]),keyCount:s.Buffer.from(t),keys:this.accountKeys.map(e=>rS(e.toBytes())),recentBlockhash:eJ().decode(this.recentBlockhash)},u=s.Buffer.alloc(2048),c=a.encode(l,u);return i.copy(u,c),u.slice(0,c+i.length)}static from(e){let t=[...e],r=rG(t);if(r!==(r&rj))throw Error("Versioned messages must be deserialized with VersionedMessage.deserialize()");let n=rG(t),i=rG(t),o=rV(t),a=[];for(let e=0;e<o;e++){let e=rJ(t,0,rC);a.push(new rI(s.Buffer.from(e)))}let l=rJ(t,0,rC),u=rV(t),c=[];for(let e=0;e<u;e++){let e=rG(t),r=rV(t),n=rJ(t,0,r),i=rV(t),o=rJ(t,0,i),a=eJ().encode(s.Buffer.from(o));c.push({programIdIndex:e,accounts:n,data:a})}return new rY({header:{numRequiredSignatures:r,numReadonlySignedAccounts:n,numReadonlyUnsignedAccounts:i},recentBlockhash:eJ().encode(s.Buffer.from(l)),accountKeys:a,instructions:c})}}class rX{constructor(e){this.header=void 0,this.staticAccountKeys=void 0,this.recentBlockhash=void 0,this.compiledInstructions=void 0,this.addressTableLookups=void 0,this.header=e.header,this.staticAccountKeys=e.staticAccountKeys,this.recentBlockhash=e.recentBlockhash,this.compiledInstructions=e.compiledInstructions,this.addressTableLookups=e.addressTableLookups}get version(){return 0}get numAccountKeysFromLookups(){let e=0;for(let t of this.addressTableLookups)e+=t.readonlyIndexes.length+t.writableIndexes.length;return e}getAccountKeys(e){let t;if(e&&"accountKeysFromLookups"in e&&e.accountKeysFromLookups){if(this.numAccountKeysFromLookups!=e.accountKeysFromLookups.writable.length+e.accountKeysFromLookups.readonly.length)throw Error("Failed to get account keys because of a mismatch in the number of account keys from lookups");t=e.accountKeysFromLookups}else if(e&&"addressLookupTableAccounts"in e&&e.addressLookupTableAccounts)t=this.resolveAddressTableLookups(e.addressLookupTableAccounts);else if(this.addressTableLookups.length>0)throw Error("Failed to get account keys because address table lookups were not resolved");return new rU(this.staticAccountKeys,t)}isAccountSigner(e){return e<this.header.numRequiredSignatures}isAccountWritable(e){let t=this.header.numRequiredSignatures,r=this.staticAccountKeys.length;if(e>=r)return e-r<this.addressTableLookups.reduce((e,t)=>e+t.writableIndexes.length,0);if(!(e>=this.header.numRequiredSignatures))return e<t-this.header.numReadonlySignedAccounts;{let n=r-t-this.header.numReadonlyUnsignedAccounts;return e-t<n}}resolveAddressTableLookups(e){let t={writable:[],readonly:[]};for(let r of this.addressTableLookups){let n=e.find(e=>e.key.equals(r.accountKey));if(!n)throw Error(`Failed to find address lookup table account for table key ${r.accountKey.toBase58()}`);for(let e of r.writableIndexes)if(e<n.state.addresses.length)t.writable.push(n.state.addresses[e]);else throw Error(`Failed to find address for index ${e} in address lookup table ${r.accountKey.toBase58()}`);for(let e of r.readonlyIndexes)if(e<n.state.addresses.length)t.readonly.push(n.state.addresses[e]);else throw Error(`Failed to find address for index ${e} in address lookup table ${r.accountKey.toBase58()}`)}return t}static compile(e){let t=rq.compile(e.instructions,e.payerKey),r=[],n={writable:[],readonly:[]};for(let i of e.addressLookupTableAccounts||[]){let e=t.extractTableLookup(i);if(void 0!==e){let[t,{writable:i,readonly:o}]=e;r.push(t),n.writable.push(...i),n.readonly.push(...o)}}let[i,o]=t.getMessageComponents(),s=new rU(o,n).compileInstructions(e.instructions);return new rX({header:i,staticAccountKeys:o,recentBlockhash:e.recentBlockhash,compiledInstructions:s,addressTableLookups:r})}serialize(){let e=[];r$(e,this.staticAccountKeys.length);let t=this.serializeInstructions(),r=[];r$(r,this.compiledInstructions.length);let n=this.serializeAddressTableLookups(),i=[];r$(i,this.addressTableLookups.length);let o=tu.n_([tu.u8("prefix"),tu.n_([tu.u8("numRequiredSignatures"),tu.u8("numReadonlySignedAccounts"),tu.u8("numReadonlyUnsignedAccounts")],"header"),tu.Ik(e.length,"staticAccountKeysLength"),tu.A9(rz(),this.staticAccountKeys.length,"staticAccountKeys"),rz("recentBlockhash"),tu.Ik(r.length,"instructionsLength"),tu.Ik(t.length,"serializedInstructions"),tu.Ik(i.length,"addressTableLookupsLength"),tu.Ik(n.length,"serializedAddressTableLookups")]),s=new Uint8Array(rR),a=o.encode({prefix:128,header:this.header,staticAccountKeysLength:new Uint8Array(e),staticAccountKeys:this.staticAccountKeys.map(e=>e.toBytes()),recentBlockhash:eJ().decode(this.recentBlockhash),instructionsLength:new Uint8Array(r),serializedInstructions:t,addressTableLookupsLength:new Uint8Array(i),serializedAddressTableLookups:n},s);return s.slice(0,a)}serializeInstructions(){let e=0,t=new Uint8Array(rR);for(let r of this.compiledInstructions){let n=[];r$(n,r.accountKeyIndexes.length);let i=[];r$(i,r.data.length);let o=tu.n_([tu.u8("programIdIndex"),tu.Ik(n.length,"encodedAccountKeyIndexesLength"),tu.A9(tu.u8(),r.accountKeyIndexes.length,"accountKeyIndexes"),tu.Ik(i.length,"encodedDataLength"),tu.Ik(r.data.length,"data")]);e+=o.encode({programIdIndex:r.programIdIndex,encodedAccountKeyIndexesLength:new Uint8Array(n),accountKeyIndexes:r.accountKeyIndexes,encodedDataLength:new Uint8Array(i),data:r.data},t,e)}return t.slice(0,e)}serializeAddressTableLookups(){let e=0,t=new Uint8Array(rR);for(let r of this.addressTableLookups){let n=[];r$(n,r.writableIndexes.length);let i=[];r$(i,r.readonlyIndexes.length);let o=tu.n_([rz("accountKey"),tu.Ik(n.length,"encodedWritableIndexesLength"),tu.A9(tu.u8(),r.writableIndexes.length,"writableIndexes"),tu.Ik(i.length,"encodedReadonlyIndexesLength"),tu.A9(tu.u8(),r.readonlyIndexes.length,"readonlyIndexes")]);e+=o.encode({accountKey:r.accountKey.toBytes(),encodedWritableIndexesLength:new Uint8Array(n),writableIndexes:r.writableIndexes,encodedReadonlyIndexesLength:new Uint8Array(i),readonlyIndexes:r.readonlyIndexes},t,e)}return t.slice(0,e)}static deserialize(e){let t=[...e],r=rG(t),n=r&rj;rH(r!==n,"Expected versioned message but received legacy message"),rH(0===n,`Expected versioned message with version 0 but found version ${n}`);let i={numRequiredSignatures:rG(t),numReadonlySignedAccounts:rG(t),numReadonlyUnsignedAccounts:rG(t)},o=[],s=rV(t);for(let e=0;e<s;e++)o.push(new rI(rJ(t,0,rC)));let a=eJ().encode(rJ(t,0,rC)),l=rV(t),u=[];for(let e=0;e<l;e++){let e=rG(t),r=rV(t),n=rJ(t,0,r),i=rV(t),o=new Uint8Array(rJ(t,0,i));u.push({programIdIndex:e,accountKeyIndexes:n,data:o})}let c=rV(t),d=[];for(let e=0;e<c;e++){let e=new rI(rJ(t,0,rC)),r=rV(t),n=rJ(t,0,r),i=rV(t),o=rJ(t,0,i);d.push({accountKey:e,writableIndexes:n,readonlyIndexes:o})}return new rX({header:i,staticAccountKeys:o,recentBlockhash:a,compiledInstructions:u,addressTableLookups:d})}}let rQ={deserializeMessageVersion(e){let t=e[0],r=t&rj;return r===t?"legacy":r},deserialize:e=>{let t=rQ.deserializeMessageVersion(e);if("legacy"===t)return rY.from(e);if(0===t)return rX.deserialize(e);throw Error(`Transaction message version ${t} deserialization is not supported`)}},r0=((n={})[n.BLOCKHEIGHT_EXCEEDED=0]="BLOCKHEIGHT_EXCEEDED",n[n.PROCESSED=1]="PROCESSED",n[n.TIMED_OUT=2]="TIMED_OUT",n[n.NONCE_INVALID=3]="NONCE_INVALID",n),r1=s.Buffer.alloc(rB).fill(0);class r2{constructor(e){this.keys=void 0,this.programId=void 0,this.data=s.Buffer.alloc(0),this.programId=e.programId,this.keys=e.keys,e.data&&(this.data=e.data)}toJSON(){return{keys:this.keys.map(({pubkey:e,isSigner:t,isWritable:r})=>({pubkey:e.toJSON(),isSigner:t,isWritable:r})),programId:this.programId.toJSON(),data:[...this.data]}}}class r5{get signature(){return this.signatures.length>0?this.signatures[0].signature:null}constructor(e){if(this.signatures=[],this.feePayer=void 0,this.instructions=[],this.recentBlockhash=void 0,this.lastValidBlockHeight=void 0,this.nonceInfo=void 0,this.minNonceContextSlot=void 0,this._message=void 0,this._json=void 0,!e)return;if(e.feePayer&&(this.feePayer=e.feePayer),e.signatures&&(this.signatures=e.signatures),Object.prototype.hasOwnProperty.call(e,"nonceInfo")){let{minContextSlot:t,nonceInfo:r}=e;this.minNonceContextSlot=t,this.nonceInfo=r}else if(Object.prototype.hasOwnProperty.call(e,"lastValidBlockHeight")){let{blockhash:t,lastValidBlockHeight:r}=e;this.recentBlockhash=t,this.lastValidBlockHeight=r}else{let{recentBlockhash:t,nonceInfo:r}=e;r&&(this.nonceInfo=r),this.recentBlockhash=t}}toJSON(){return{recentBlockhash:this.recentBlockhash||null,feePayer:this.feePayer?this.feePayer.toJSON():null,nonceInfo:this.nonceInfo?{nonce:this.nonceInfo.nonce,nonceInstruction:this.nonceInfo.nonceInstruction.toJSON()}:null,instructions:this.instructions.map(e=>e.toJSON()),signers:this.signatures.map(({publicKey:e})=>e.toJSON())}}add(...e){if(0===e.length)throw Error("No instructions");return e.forEach(e=>{"instructions"in e?this.instructions=this.instructions.concat(e.instructions):"data"in e&&"programId"in e&&"keys"in e?this.instructions.push(e):this.instructions.push(new r2(e))}),this}compileMessage(){let e,t,r;if(this._message&&JSON.stringify(this.toJSON())===JSON.stringify(this._json))return this._message;if(this.nonceInfo?(e=this.nonceInfo.nonce,t=this.instructions[0]!=this.nonceInfo.nonceInstruction?[this.nonceInfo.nonceInstruction,...this.instructions]:this.instructions):(e=this.recentBlockhash,t=this.instructions),!e)throw Error("Transaction recentBlockhash required");if(t.length<1&&console.warn("No instructions provided"),this.feePayer)r=this.feePayer;else if(this.signatures.length>0&&this.signatures[0].publicKey)r=this.signatures[0].publicKey;else throw Error("Transaction fee payer required");for(let e=0;e<t.length;e++)if(void 0===t[e].programId)throw Error(`Transaction instruction index ${e} has undefined program id`);let n=[],i=[];t.forEach(e=>{e.keys.forEach(e=>{i.push({...e})});let t=e.programId.toString();n.includes(t)||n.push(t)}),n.forEach(e=>{i.push({pubkey:new rI(e),isSigner:!1,isWritable:!1})});let o=[];i.forEach(e=>{let t=e.pubkey.toString(),r=o.findIndex(e=>e.pubkey.toString()===t);r>-1?(o[r].isWritable=o[r].isWritable||e.isWritable,o[r].isSigner=o[r].isSigner||e.isSigner):o.push(e)}),o.sort(function(e,t){return e.isSigner!==t.isSigner?e.isSigner?-1:1:e.isWritable!==t.isWritable?e.isWritable?-1:1:e.pubkey.toBase58().localeCompare(t.pubkey.toBase58(),"en",{localeMatcher:"best fit",usage:"sort",sensitivity:"variant",ignorePunctuation:!1,numeric:!1,caseFirst:"lower"})});let s=o.findIndex(e=>e.pubkey.equals(r));if(s>-1){let[e]=o.splice(s,1);e.isSigner=!0,e.isWritable=!0,o.unshift(e)}else o.unshift({pubkey:r,isSigner:!0,isWritable:!0});for(let e of this.signatures){let t=o.findIndex(t=>t.pubkey.equals(e.publicKey));if(t>-1)o[t].isSigner||(o[t].isSigner=!0,console.warn("Transaction references a signature that is unnecessary, only the fee payer and instruction signer accounts should sign a transaction. This behavior is deprecated and will throw an error in the next major version release."));else throw Error(`unknown signer: ${e.publicKey.toString()}`)}let a=0,l=0,u=0,c=[],d=[];o.forEach(({pubkey:e,isSigner:t,isWritable:r})=>{t?(c.push(e.toString()),a+=1,r||(l+=1)):(d.push(e.toString()),r||(u+=1))});let h=c.concat(d),f=t.map(e=>{let{data:t,programId:r}=e;return{programIdIndex:h.indexOf(r.toString()),accounts:e.keys.map(e=>h.indexOf(e.pubkey.toString())),data:eJ().encode(t)}});return f.forEach(e=>{rH(e.programIdIndex>=0),e.accounts.forEach(e=>rH(e>=0))}),new rY({header:{numRequiredSignatures:a,numReadonlySignedAccounts:l,numReadonlyUnsignedAccounts:u},accountKeys:h,recentBlockhash:e,instructions:f})}_compile(){let e=this.compileMessage(),t=e.accountKeys.slice(0,e.header.numRequiredSignatures);return this.signatures.length===t.length&&this.signatures.every((e,r)=>t[r].equals(e.publicKey))||(this.signatures=t.map(e=>({signature:null,publicKey:e}))),e}serializeMessage(){return this._compile().serialize()}async getEstimatedFee(e){return(await e.getFeeForMessage(this.compileMessage())).value}setSigners(...e){if(0===e.length)throw Error("No signers");let t=new Set;this.signatures=e.filter(e=>{let r=e.toString();return!t.has(r)&&(t.add(r),!0)}).map(e=>({signature:null,publicKey:e}))}sign(...e){if(0===e.length)throw Error("No signers");let t=new Set,r=[];for(let n of e){let e=n.publicKey.toString();t.has(e)||(t.add(e),r.push(n))}this.signatures=r.map(e=>({signature:null,publicKey:e.publicKey}));let n=this._compile();this._partialSign(n,...r)}partialSign(...e){if(0===e.length)throw Error("No signers");let t=new Set,r=[];for(let n of e){let e=n.publicKey.toString();t.has(e)||(t.add(e),r.push(n))}let n=this._compile();this._partialSign(n,...r)}_partialSign(e,...t){let r=e.serialize();t.forEach(e=>{let t=rE(r,e.secretKey);this._addSignature(e.publicKey,rS(t))})}addSignature(e,t){this._compile(),this._addSignature(e,t)}_addSignature(e,t){rH(64===t.length);let r=this.signatures.findIndex(t=>e.equals(t.publicKey));if(r<0)throw Error(`unknown signer: ${e.toString()}`);this.signatures[r].signature=s.Buffer.from(t)}verifySignatures(e=!0){return!this._getMessageSignednessErrors(this.serializeMessage(),e)}_getMessageSignednessErrors(e,t){let r={};for(let{signature:n,publicKey:i}of this.signatures)null===n?t&&(r.missing||=[]).push(i):rk(n,e,i.toBytes())||(r.invalid||=[]).push(i);return r.invalid||r.missing?r:void 0}serialize(e){let{requireAllSignatures:t,verifySignatures:r}=Object.assign({requireAllSignatures:!0,verifySignatures:!0},e),n=this.serializeMessage();if(r){let e=this._getMessageSignednessErrors(n,t);if(e){let t="Signature verification failed.";throw e.invalid&&(t+=`
Invalid signature for public key${1===e.invalid.length?"":"(s)"} [\`${e.invalid.map(e=>e.toBase58()).join("`, `")}\`].`),e.missing&&(t+=`
Missing signature for public key${1===e.missing.length?"":"(s)"} [\`${e.missing.map(e=>e.toBase58()).join("`, `")}\`].`),Error(t)}}return this._serialize(n)}_serialize(e){let{signatures:t}=this,r=[];r$(r,t.length);let n=r.length+64*t.length+e.length,i=s.Buffer.alloc(n);return rH(t.length<256),s.Buffer.from(r).copy(i,0),t.forEach(({signature:e},t)=>{null!==e&&(rH(64===e.length,"signature has invalid length"),s.Buffer.from(e).copy(i,r.length+64*t))}),e.copy(i,r.length+64*t.length),rH(i.length<=rR,`Transaction too large: ${i.length} > ${rR}`),i}get keys(){return rH(1===this.instructions.length),this.instructions[0].keys.map(e=>e.pubkey)}get programId(){return rH(1===this.instructions.length),this.instructions[0].programId}get data(){return rH(1===this.instructions.length),this.instructions[0].data}static from(e){let t=[...e],r=rV(t),n=[];for(let e=0;e<r;e++){let e=rJ(t,0,rB);n.push(eJ().encode(s.Buffer.from(e)))}return r5.populate(rY.from(t),n)}static populate(e,t=[]){let r=new r5;return r.recentBlockhash=e.recentBlockhash,e.header.numRequiredSignatures>0&&(r.feePayer=e.accountKeys[0]),t.forEach((t,n)=>{let i={signature:t==eJ().encode(r1)?null:eJ().decode(t),publicKey:e.accountKeys[n]};r.signatures.push(i)}),e.instructions.forEach(t=>{let n=t.accounts.map(t=>{let n=e.accountKeys[t];return{pubkey:n,isSigner:r.signatures.some(e=>e.publicKey.toString()===n.toString())||e.isAccountSigner(t),isWritable:e.isAccountWritable(t)}});r.instructions.push(new r2({keys:n,programId:e.accountKeys[t.programIdIndex],data:eJ().decode(t.data)}))}),r._message=e,r._json=r.toJSON(),r}}class r6{constructor(e){this.payerKey=void 0,this.instructions=void 0,this.recentBlockhash=void 0,this.payerKey=e.payerKey,this.instructions=e.instructions,this.recentBlockhash=e.recentBlockhash}static decompile(e,t){let{header:r,compiledInstructions:n,recentBlockhash:i}=e,{numRequiredSignatures:o,numReadonlySignedAccounts:s,numReadonlyUnsignedAccounts:a}=r,l=o-s;rH(l>0,"Message header is invalid");let u=e.staticAccountKeys.length-o-a;rH(u>=0,"Message header is invalid");let c=e.getAccountKeys(t),d=c.get(0);if(void 0===d)throw Error("Failed to decompile message because no account keys were found");let h=[];for(let e of n){let t=[];for(let n of e.accountKeyIndexes){let e;let i=c.get(n);if(void 0===i)throw Error(`Failed to find key for account key index ${n}`);e=n<o?n<l:n<c.staticAccountKeys.length?n-o<u:n-c.staticAccountKeys.length<c.accountKeysFromLookups.writable.length,t.push({pubkey:i,isSigner:n<r.numRequiredSignatures,isWritable:e})}let n=c.get(e.programIdIndex);if(void 0===n)throw Error(`Failed to find program id for program id index ${e.programIdIndex}`);h.push(new r2({programId:n,data:rS(e.data),keys:t}))}return new r6({payerKey:d,instructions:h,recentBlockhash:i})}compileToLegacyMessage(){return rY.compile({payerKey:this.payerKey,recentBlockhash:this.recentBlockhash,instructions:this.instructions})}compileToV0Message(e){return rX.compile({payerKey:this.payerKey,recentBlockhash:this.recentBlockhash,instructions:this.instructions,addressLookupTableAccounts:e})}}class r3{get version(){return this.message.version}constructor(e,t){if(this.signatures=void 0,this.message=void 0,void 0!==t)rH(t.length===e.header.numRequiredSignatures,"Expected signatures length to be equal to the number of required signatures"),this.signatures=t;else{let t=[];for(let r=0;r<e.header.numRequiredSignatures;r++)t.push(new Uint8Array(rB));this.signatures=t}this.message=e}serialize(){let e=this.message.serialize(),t=[];r$(t,this.signatures.length);let r=tu.n_([tu.Ik(t.length,"encodedSignaturesLength"),tu.A9(rF(),this.signatures.length,"signatures"),tu.Ik(e.length,"serializedMessage")]),n=new Uint8Array(2048),i=r.encode({encodedSignaturesLength:new Uint8Array(t),signatures:this.signatures,serializedMessage:e},n);return n.slice(0,i)}static deserialize(e){let t=[...e],r=[],n=rV(t);for(let e=0;e<n;e++)r.push(new Uint8Array(rJ(t,0,rB)));return new r3(rQ.deserialize(new Uint8Array(t)),r)}sign(e){let t=this.message.serialize(),r=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures);for(let n of e){let e=r.findIndex(e=>e.equals(n.publicKey));rH(e>=0,`Cannot sign with non signer key ${n.publicKey.toBase58()}`),this.signatures[e]=rE(t,n.secretKey)}}addSignature(e,t){rH(64===t.byteLength,"Signature must be 64 bytes long");let r=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures).findIndex(t=>t.equals(e));rH(r>=0,`Can not add signature; \`${e.toBase58()}\` is not required to sign this transaction`),this.signatures[r]=t}}let r4=new rI("SysvarC1ock11111111111111111111111111111111"),r8=new rI("SysvarEpochSchedu1e111111111111111111111111"),r7=new rI("Sysvar1nstructions1111111111111111111111111"),r9=new rI("SysvarRecentB1ockHashes11111111111111111111"),ne=new rI("SysvarRent111111111111111111111111111111111"),nt=new rI("SysvarRewards111111111111111111111111111111"),nr=new rI("SysvarS1otHashes111111111111111111111111111"),nn=new rI("SysvarS1otHistory11111111111111111111111111"),ni=new rI("SysvarStakeHistory1111111111111111111111111");class no extends Error{constructor({action:e,signature:t,transactionMessage:r,logs:n}){let i;let o=n?`Logs: 
${JSON.stringify(n.slice(-10),null,2)}. `:"",s="\nCatch the `SendTransactionError` and call `getLogs()` on it for full details.";switch(e){case"send":i=`Transaction ${t} resulted in an error. 
${r}. `+o+s;break;case"simulate":i=`Simulation failed. 
Message: ${r}. 
`+o+s;break;default:i=`Unknown action '${e}'`}super(i),this.signature=void 0,this.transactionMessage=void 0,this.transactionLogs=void 0,this.signature=t,this.transactionMessage=r,this.transactionLogs=n||void 0}get transactionError(){return{message:this.transactionMessage,logs:Array.isArray(this.transactionLogs)?this.transactionLogs:void 0}}get logs(){let e=this.transactionLogs;if(null==e||"object"!=typeof e||!("then"in e))return e}async getLogs(e){return Array.isArray(this.transactionLogs)||(this.transactionLogs=new Promise((t,r)=>{e.getTransaction(this.signature).then(e=>{if(e&&e.meta&&e.meta.logMessages){let r=e.meta.logMessages;this.transactionLogs=r,t(r)}else r(Error("Log messages not found"))}).catch(r)})),await this.transactionLogs}}let ns={JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP:-32001,JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE:-32002,JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE:-32003,JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE:-32004,JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY:-32005,JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE:-32006,JSON_RPC_SERVER_ERROR_SLOT_SKIPPED:-32007,JSON_RPC_SERVER_ERROR_NO_SNAPSHOT:-32008,JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED:-32009,JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX:-32010,JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE:-32011,JSON_RPC_SCAN_ERROR:-32012,JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH:-32013,JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET:-32014,JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION:-32015,JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED:-32016};class na extends Error{constructor({code:e,message:t,data:r},n){super(null!=n?`${n}: ${t}`:t),this.code=void 0,this.data=void 0,this.code=e,this.data=r,this.name="SolanaJSONRPCError"}}async function nl(e,t,r,n){let i;let o=n&&{skipPreflight:n.skipPreflight,preflightCommitment:n.preflightCommitment||n.commitment,maxRetries:n.maxRetries,minContextSlot:n.minContextSlot},s=await e.sendTransaction(t,r,o);if(null!=t.recentBlockhash&&null!=t.lastValidBlockHeight)i=(await e.confirmTransaction({abortSignal:n?.abortSignal,signature:s,blockhash:t.recentBlockhash,lastValidBlockHeight:t.lastValidBlockHeight},n&&n.commitment)).value;else if(null!=t.minNonceContextSlot&&null!=t.nonceInfo){let{nonceInstruction:r}=t.nonceInfo,o=r.keys[0].pubkey;i=(await e.confirmTransaction({abortSignal:n?.abortSignal,minContextSlot:t.minNonceContextSlot,nonceAccountPubkey:o,nonceValue:t.nonceInfo.nonce,signature:s},n&&n.commitment)).value}else n?.abortSignal!=null&&console.warn("sendAndConfirmTransaction(): A transaction with a deprecated confirmation strategy was supplied along with an `abortSignal`. Only transactions having `lastValidBlockHeight` or a combination of `nonceInfo` and `minNonceContextSlot` are abortable."),i=(await e.confirmTransaction(s,n&&n.commitment)).value;if(i.err){if(null!=s)throw new no({action:"send",signature:s,transactionMessage:`Status: (${JSON.stringify(i)})`});throw Error(`Transaction ${s} failed (${JSON.stringify(i)})`)}return s}function nu(e){return new Promise(t=>setTimeout(t,e))}function nc(e,t){let r=e.layout.span>=0?e.layout.span:function e(t,r){let n=t=>{if(t.span>=0)return t.span;if("function"==typeof t.alloc)return t.alloc(r[t.property]);if("count"in t&&"elementLayout"in t){let e=r[t.property];if(Array.isArray(e))return e.length*n(t.elementLayout)}else if("fields"in t)return e({layout:t},r[t.property]);return 0},i=0;return t.layout.fields.forEach(e=>{i+=n(e)}),i}(e,t),n=s.Buffer.alloc(r),i=Object.assign({instruction:e.index},t);return e.layout.encode(i,n),n}function nd(e,t){let r;try{r=e.layout.decode(t)}catch(e){throw Error("invalid instruction; "+e)}if(r.instruction!==e.index)throw Error(`invalid instruction; instruction index mismatch ${r.instruction} != ${e.index}`);return r}let nh=tu._O("lamportsPerSignature"),nf=tu.n_([tu.Jq("version"),tu.Jq("state"),rz("authorizedPubkey"),rz("nonce"),tu.n_([nh],"feeCalculator")]),np=nf.span;class ng{constructor(e){this.authorizedPubkey=void 0,this.nonce=void 0,this.feeCalculator=void 0,this.authorizedPubkey=e.authorizedPubkey,this.nonce=e.nonce,this.feeCalculator=e.feeCalculator}static fromAccountData(e){let t=nf.decode(rS(e),0);return new ng({authorizedPubkey:new rI(t.authorizedPubkey),nonce:new rI(t.nonce).toString(),feeCalculator:t.feeCalculator})}}let nm=e=>({decode:e.decode.bind(e),encode:e.encode.bind(e)}),ny=e=>{let t=(0,tu.Ik)(8,e),{encode:r,decode:n}=nm(t);return t.decode=(e,t)=>{let r=n(e,t);return(0,tc.oU)(s.Buffer.from(r))},t.encode=(e,t,n)=>r((0,tc.k$)(e,8),t,n),t};class nv{constructor(){}static decodeInstructionType(e){let t;this.checkProgramId(e.programId);let r=tu.Jq("instruction").decode(e.data);for(let[e,n]of Object.entries(nb))if(n.index==r){t=e;break}if(!t)throw Error("Instruction type incorrect; not a SystemInstruction");return t}static decodeCreateAccount(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);let{lamports:t,space:r,programId:n}=nd(nb.Create,e.data);return{fromPubkey:e.keys[0].pubkey,newAccountPubkey:e.keys[1].pubkey,lamports:t,space:r,programId:new rI(n)}}static decodeTransfer(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);let{lamports:t}=nd(nb.Transfer,e.data);return{fromPubkey:e.keys[0].pubkey,toPubkey:e.keys[1].pubkey,lamports:t}}static decodeTransferWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);let{lamports:t,seed:r,programId:n}=nd(nb.TransferWithSeed,e.data);return{fromPubkey:e.keys[0].pubkey,basePubkey:e.keys[1].pubkey,toPubkey:e.keys[2].pubkey,lamports:t,seed:r,programId:new rI(n)}}static decodeAllocate(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,1);let{space:t}=nd(nb.Allocate,e.data);return{accountPubkey:e.keys[0].pubkey,space:t}}static decodeAllocateWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,1);let{base:t,seed:r,space:n,programId:i}=nd(nb.AllocateWithSeed,e.data);return{accountPubkey:e.keys[0].pubkey,basePubkey:new rI(t),seed:r,space:n,programId:new rI(i)}}static decodeAssign(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,1);let{programId:t}=nd(nb.Assign,e.data);return{accountPubkey:e.keys[0].pubkey,programId:new rI(t)}}static decodeAssignWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,1);let{base:t,seed:r,programId:n}=nd(nb.AssignWithSeed,e.data);return{accountPubkey:e.keys[0].pubkey,basePubkey:new rI(t),seed:r,programId:new rI(n)}}static decodeCreateWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);let{base:t,seed:r,lamports:n,space:i,programId:o}=nd(nb.CreateWithSeed,e.data);return{fromPubkey:e.keys[0].pubkey,newAccountPubkey:e.keys[1].pubkey,basePubkey:new rI(t),seed:r,lamports:n,space:i,programId:new rI(o)}}static decodeNonceInitialize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);let{authorized:t}=nd(nb.InitializeNonceAccount,e.data);return{noncePubkey:e.keys[0].pubkey,authorizedPubkey:new rI(t)}}static decodeNonceAdvance(e){return this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3),nd(nb.AdvanceNonceAccount,e.data),{noncePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[2].pubkey}}static decodeNonceWithdraw(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,5);let{lamports:t}=nd(nb.WithdrawNonceAccount,e.data);return{noncePubkey:e.keys[0].pubkey,toPubkey:e.keys[1].pubkey,authorizedPubkey:e.keys[4].pubkey,lamports:t}}static decodeNonceAuthorize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);let{authorized:t}=nd(nb.AuthorizeNonceAccount,e.data);return{noncePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[1].pubkey,newAuthorizedPubkey:new rI(t)}}static checkProgramId(e){if(!e.equals(nw.programId))throw Error("invalid instruction; programId is not SystemProgram")}static checkKeyLength(e,t){if(e.length<t)throw Error(`invalid instruction; found ${e.length} keys, expected at least ${t}`)}}let nb=Object.freeze({Create:{index:0,layout:tu.n_([tu.Jq("instruction"),tu.gM("lamports"),tu.gM("space"),rz("programId")])},Assign:{index:1,layout:tu.n_([tu.Jq("instruction"),rz("programId")])},Transfer:{index:2,layout:tu.n_([tu.Jq("instruction"),ny("lamports")])},CreateWithSeed:{index:3,layout:tu.n_([tu.Jq("instruction"),rz("base"),rW("seed"),tu.gM("lamports"),tu.gM("space"),rz("programId")])},AdvanceNonceAccount:{index:4,layout:tu.n_([tu.Jq("instruction")])},WithdrawNonceAccount:{index:5,layout:tu.n_([tu.Jq("instruction"),tu.gM("lamports")])},InitializeNonceAccount:{index:6,layout:tu.n_([tu.Jq("instruction"),rz("authorized")])},AuthorizeNonceAccount:{index:7,layout:tu.n_([tu.Jq("instruction"),rz("authorized")])},Allocate:{index:8,layout:tu.n_([tu.Jq("instruction"),tu.gM("space")])},AllocateWithSeed:{index:9,layout:tu.n_([tu.Jq("instruction"),rz("base"),rW("seed"),tu.gM("space"),rz("programId")])},AssignWithSeed:{index:10,layout:tu.n_([tu.Jq("instruction"),rz("base"),rW("seed"),rz("programId")])},TransferWithSeed:{index:11,layout:tu.n_([tu.Jq("instruction"),ny("lamports"),rW("seed"),rz("programId")])},UpgradeNonceAccount:{index:12,layout:tu.n_([tu.Jq("instruction")])}});class nw{constructor(){}static createAccount(e){let t=nc(nb.Create,{lamports:e.lamports,space:e.space,programId:rS(e.programId.toBuffer())});return new r2({keys:[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.newAccountPubkey,isSigner:!0,isWritable:!0}],programId:this.programId,data:t})}static transfer(e){let t,r;return"basePubkey"in e?(t=nc(nb.TransferWithSeed,{lamports:BigInt(e.lamports),seed:e.seed,programId:rS(e.programId.toBuffer())}),r=[{pubkey:e.fromPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0}]):(t=nc(nb.Transfer,{lamports:BigInt(e.lamports)}),r=[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0}]),new r2({keys:r,programId:this.programId,data:t})}static assign(e){let t,r;return"basePubkey"in e?(t=nc(nb.AssignWithSeed,{base:rS(e.basePubkey.toBuffer()),seed:e.seed,programId:rS(e.programId.toBuffer())}),r=[{pubkey:e.accountPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1}]):(t=nc(nb.Assign,{programId:rS(e.programId.toBuffer())}),r=[{pubkey:e.accountPubkey,isSigner:!0,isWritable:!0}]),new r2({keys:r,programId:this.programId,data:t})}static createAccountWithSeed(e){let t=nc(nb.CreateWithSeed,{base:rS(e.basePubkey.toBuffer()),seed:e.seed,lamports:e.lamports,space:e.space,programId:rS(e.programId.toBuffer())}),r=[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.newAccountPubkey,isSigner:!1,isWritable:!0}];return e.basePubkey!=e.fromPubkey&&r.push({pubkey:e.basePubkey,isSigner:!0,isWritable:!1}),new r2({keys:r,programId:this.programId,data:t})}static createNonceAccount(e){let t=new r5;"basePubkey"in e&&"seed"in e?t.add(nw.createAccountWithSeed({fromPubkey:e.fromPubkey,newAccountPubkey:e.noncePubkey,basePubkey:e.basePubkey,seed:e.seed,lamports:e.lamports,space:np,programId:this.programId})):t.add(nw.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.noncePubkey,lamports:e.lamports,space:np,programId:this.programId}));let r={noncePubkey:e.noncePubkey,authorizedPubkey:e.authorizedPubkey};return t.add(this.nonceInitialize(r)),t}static nonceInitialize(e){let t=nc(nb.InitializeNonceAccount,{authorized:rS(e.authorizedPubkey.toBuffer())});return new r2({keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:r9,isSigner:!1,isWritable:!1},{pubkey:ne,isSigner:!1,isWritable:!1}],programId:this.programId,data:t})}static nonceAdvance(e){let t=nc(nb.AdvanceNonceAccount);return new r2({keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:r9,isSigner:!1,isWritable:!1},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:t})}static nonceWithdraw(e){let t=nc(nb.WithdrawNonceAccount,{lamports:e.lamports});return new r2({keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0},{pubkey:r9,isSigner:!1,isWritable:!1},{pubkey:ne,isSigner:!1,isWritable:!1},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:t})}static nonceAuthorize(e){let t=nc(nb.AuthorizeNonceAccount,{authorized:rS(e.newAuthorizedPubkey.toBuffer())});return new r2({keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:t})}static allocate(e){let t,r;return"basePubkey"in e?(t=nc(nb.AllocateWithSeed,{base:rS(e.basePubkey.toBuffer()),seed:e.seed,space:e.space,programId:rS(e.programId.toBuffer())}),r=[{pubkey:e.accountPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1}]):(t=nc(nb.Allocate,{space:e.space}),r=[{pubkey:e.accountPubkey,isSigner:!0,isWritable:!0}]),new r2({keys:r,programId:this.programId,data:t})}}nw.programId=new rI("11111111111111111111111111111111");let nx=rR-300;class nE{constructor(){}static getMinNumSignatures(e){return 2*(Math.ceil(e/nE.chunkSize)+1+1)}static async load(e,t,r,n,i){{let o=await e.getMinimumBalanceForRentExemption(i.length),s=await e.getAccountInfo(r.publicKey,"confirmed"),a=null;if(null!==s){if(s.executable)return console.error("Program load failed, account is already executable"),!1;s.data.length!==i.length&&(a=a||new r5).add(nw.allocate({accountPubkey:r.publicKey,space:i.length})),s.owner.equals(n)||(a=a||new r5).add(nw.assign({accountPubkey:r.publicKey,programId:n})),s.lamports<o&&(a=a||new r5).add(nw.transfer({fromPubkey:t.publicKey,toPubkey:r.publicKey,lamports:o-s.lamports}))}else a=new r5().add(nw.createAccount({fromPubkey:t.publicKey,newAccountPubkey:r.publicKey,lamports:o>0?o:1,space:i.length,programId:n}));null!==a&&await nl(e,a,[t,r],{commitment:"confirmed"})}let o=tu.n_([tu.Jq("instruction"),tu.Jq("offset"),tu.Jq("bytesLength"),tu.Jq("bytesLengthPadding"),tu.A9(tu.u8("byte"),tu.cv(tu.Jq(),-8),"bytes")]),a=nE.chunkSize,l=0,u=i,c=[];for(;u.length>0;){let i=u.slice(0,a),d=s.Buffer.alloc(a+16);o.encode({instruction:0,offset:l,bytes:i,bytesLength:0,bytesLengthPadding:0},d);let h=new r5().add({keys:[{pubkey:r.publicKey,isSigner:!0,isWritable:!0}],programId:n,data:d});c.push(nl(e,h,[t,r],{commitment:"confirmed"})),e._rpcEndpoint.includes("solana.com")&&await nu(250),l+=a,u=u.slice(a)}await Promise.all(c);{let i=tu.n_([tu.Jq("instruction")]),o=s.Buffer.alloc(i.span);i.encode({instruction:1},o);let a=new r5().add({keys:[{pubkey:r.publicKey,isSigner:!0,isWritable:!0},{pubkey:ne,isSigner:!1,isWritable:!1}],programId:n,data:o}),l="processed",u=await e.sendTransaction(a,[t,r],{preflightCommitment:l}),{context:c,value:d}=await e.confirmTransaction({signature:u,lastValidBlockHeight:a.lastValidBlockHeight,blockhash:a.recentBlockhash},l);if(d.err)throw Error(`Transaction ${u} failed (${JSON.stringify(d)})`);for(;;){try{if(await e.getSlot({commitment:l})>c.slot)break}catch{}await new Promise(e=>setTimeout(e,Math.round(200)))}}return!0}}nE.chunkSize=nx;let nk=new rI("BPFLoader2111111111111111111111111111111111");class nS{static getMinNumSignatures(e){return nE.getMinNumSignatures(e)}static load(e,t,r,n,i){return nE.load(e,t,r,i,n)}}var nT=Object.prototype.toString,nM=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t},nA=(i=function(e){var t=function e(t,r){var n,i,o,s,a,l,u;if(!0===t)return"true";if(!1===t)return"false";switch(typeof t){case"object":if(null===t)return null;if(t.toJSON&&"function"==typeof t.toJSON)return e(t.toJSON(),r);if("[object Array]"===(u=nT.call(t))){for(n=0,o="[",i=t.length-1;n<i;n++)o+=e(t[n],!0)+",";return i>-1&&(o+=e(t[n],!0)),o+"]"}if("[object Object]"!==u)return JSON.stringify(t);for(i=(s=nM(t).sort()).length,o="",n=0;n<i;)void 0!==(l=e(t[a=s[n]],!1))&&(o&&(o+=","),o+=JSON.stringify(a)+":"+l),n++;return"{"+o+"}";case"function":case"undefined":return r?null:void 0;case"string":return JSON.stringify(t);default:return isFinite(t)?t:null}}(e,!1);if(void 0!==t)return""+t}).__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i;function nP(e){let t=0;for(;e>1;)e/=2,t++;return t}class nC{constructor(e,t,r,n,i){this.slotsPerEpoch=void 0,this.leaderScheduleSlotOffset=void 0,this.warmup=void 0,this.firstNormalEpoch=void 0,this.firstNormalSlot=void 0,this.slotsPerEpoch=e,this.leaderScheduleSlotOffset=t,this.warmup=r,this.firstNormalEpoch=n,this.firstNormalSlot=i}getEpoch(e){return this.getEpochAndSlotIndex(e)[0]}getEpochAndSlotIndex(e){if(e<this.firstNormalSlot){var t;let r=nP(0===(t=e+32+1)?1:(t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,(t|=t>>32)+1))-nP(32)-1,n=this.getSlotsInEpoch(r);return[r,e-(n-32)]}{let t=e-this.firstNormalSlot,r=Math.floor(t/this.slotsPerEpoch);return[this.firstNormalEpoch+r,t%this.slotsPerEpoch]}}getFirstSlotInEpoch(e){return e<=this.firstNormalEpoch?(Math.pow(2,e)-1)*32:(e-this.firstNormalEpoch)*this.slotsPerEpoch+this.firstNormalSlot}getLastSlotInEpoch(e){return this.getFirstSlotInEpoch(e)+this.getSlotsInEpoch(e)-1}getSlotsInEpoch(e){return e<this.firstNormalEpoch?Math.pow(2,e+nP(32)):this.slotsPerEpoch}}var n_=globalThis.fetch;class nI extends tU{constructor(e,t,r){super(e=>{let r=new tD(e,{autoconnect:!0,max_reconnects:5,reconnect:!0,reconnect_interval:1e3,...t});return"socket"in r?this.underlyingSocket=r.socket:this.underlyingSocket=r,r},e,t,r),this.underlyingSocket=void 0}call(...e){let t=this.underlyingSocket?.readyState;return 1===t?super.call(...e):Promise.reject(Error("Tried to call a JSON-RPC method `"+e[0]+"` but the socket was not `CONNECTING` or `OPEN` (`readyState` was "+t+")"))}notify(...e){let t=this.underlyingSocket?.readyState;return 1===t?super.notify(...e):Promise.reject(Error("Tried to send a JSON-RPC notification `"+e[0]+"` but the socket was not `CONNECTING` or `OPEN` (`readyState` was "+t+")"))}}class nO{constructor(e){this.key=void 0,this.state=void 0,this.key=e.key,this.state=e.state}isActive(){let e=BigInt("0xffffffffffffffff");return this.state.deactivationSlot===e}static deserialize(e){let t=function(e,t){let r;try{r=e.layout.decode(t)}catch(e){throw Error("invalid instruction; "+e)}if(r.typeIndex!==e.index)throw Error(`invalid account data; account type mismatch ${r.typeIndex} != ${e.index}`);return r}(nL,e),r=e.length-56;rH(r>=0,"lookup table is invalid"),rH(r%32==0,"lookup table is invalid");let{addresses:n}=tu.n_([tu.A9(rz(),r/32,"addresses")]).decode(e.slice(56));return{deactivationSlot:t.deactivationSlot,lastExtendedSlot:t.lastExtendedSlot,lastExtendedSlotStartIndex:t.lastExtendedStartIndex,authority:0!==t.authority.length?new rI(t.authority[0]):void 0,addresses:n.map(e=>new rI(e))}}}let nL={index:1,layout:tu.n_([tu.Jq("typeIndex"),ny("deactivationSlot"),tu._O("lastExtendedSlot"),tu.u8("lastExtendedStartIndex"),tu.u8(),tu.A9(rz(),tu.cv(tu.u8(),-1),"authority")])},nR=/^[^:]+:\/\/([^:[]+|\[[^\]]+\])(:\d+)?(.*)/i,nj=tR(tk(rI),tC(),e=>new rI(e)),nB=t_([tC(),tS("base64")]),nN=tR(tk(s.Buffer),nB,e=>s.Buffer.from(e[0],"base64")),nD=3e4;function nK(e){let t,r;if("string"==typeof e)t=e;else if(e){let{commitment:n,...i}=e;t=n,r=i}return{commitment:t,config:r}}function nU(e){return tO([tI({jsonrpc:tS("2.0"),id:tC(),result:e}),tI({jsonrpc:tS("2.0"),id:tC(),error:tI({code:tL(),message:tC(),data:tA(tw("any",()=>!0))})})])}let nz=nU(tL());function nF(e){return tR(nU(e),nz,t=>"error"in t?t:{...t,result:tv(t.result,e)})}function nW(e){return nF(tI({context:tI({slot:tM()}),value:e}))}function nV(e){return tI({context:tI({slot:tM()}),value:e})}function n$(e,t){return 0===e?new rX({header:t.header,staticAccountKeys:t.accountKeys.map(e=>new rI(e)),recentBlockhash:t.recentBlockhash,compiledInstructions:t.instructions.map(e=>({programIdIndex:e.programIdIndex,accountKeyIndexes:e.accounts,data:eJ().decode(e.data)})),addressTableLookups:t.addressTableLookups}):new rY(t)}let nH=tI({foundation:tM(),foundationTerm:tM(),initial:tM(),taper:tM(),terminal:tM()}),nq=nF(tx(tT(tI({epoch:tM(),effectiveSlot:tM(),amount:tM(),postBalance:tM(),commission:tA(tT(tM()))})))),nZ=tx(tI({slot:tM(),prioritizationFee:tM()})),nG=tI({total:tM(),validator:tM(),foundation:tM(),epoch:tM()}),nJ=tI({epoch:tM(),slotIndex:tM(),slotsInEpoch:tM(),absoluteSlot:tM(),blockHeight:tA(tM()),transactionCount:tA(tM())}),nY=tI({slotsPerEpoch:tM(),leaderScheduleSlotOffset:tM(),warmup:tE(),firstNormalEpoch:tM(),firstNormalSlot:tM()}),nX=tP(tC(),tx(tM())),nQ=tT(tO([tI({}),tC()])),n0=tI({err:nQ}),n1=tS("receivedSignature"),n2=tI({"solana-core":tC(),"feature-set":tA(tM())}),n5=nW(tI({err:tT(tO([tI({}),tC()])),logs:tT(tx(tC())),accounts:tA(tT(tx(tT(tI({executable:tE(),owner:tC(),lamports:tM(),data:tx(tC()),rentEpoch:tA(tM())}))))),unitsConsumed:tA(tM()),returnData:tA(tT(tI({programId:tC(),data:t_([tC(),tS("base64")])})))})),n6=nW(tI({byIdentity:tP(tC(),tx(tM())),range:tI({firstSlot:tM(),lastSlot:tM()})})),n3=nF(nH),n4=nF(nG),n8=nF(nZ),n7=nF(nJ),n9=nF(nY),ie=nF(nX),it=nF(tM()),ir=nW(tI({total:tM(),circulating:tM(),nonCirculating:tM(),nonCirculatingAccounts:tx(nj)})),ii=tI({amount:tC(),uiAmount:tT(tM()),decimals:tM(),uiAmountString:tA(tC())}),io=nW(tx(tI({address:nj,amount:tC(),uiAmount:tT(tM()),decimals:tM(),uiAmountString:tA(tC())}))),is=nW(tx(tI({pubkey:nj,account:tI({executable:tE(),owner:nj,lamports:tM(),data:nN,rentEpoch:tM()})}))),ia=tI({program:tC(),parsed:tL(),space:tM()}),il=nW(tx(tI({pubkey:nj,account:tI({executable:tE(),owner:nj,lamports:tM(),data:ia,rentEpoch:tM()})}))),iu=nW(tx(tI({lamports:tM(),address:nj}))),ic=tI({executable:tE(),owner:nj,lamports:tM(),data:nN,rentEpoch:tM()}),id=tI({pubkey:nj,account:ic}),ih=tR(tO([tk(s.Buffer),ia]),tO([nB,ia]),e=>Array.isArray(e)?tv(e,nN):e),ip=tI({executable:tE(),owner:nj,lamports:tM(),data:ih,rentEpoch:tM()}),ig=tI({pubkey:nj,account:ip}),im=tI({state:tO([tS("active"),tS("inactive"),tS("activating"),tS("deactivating")]),active:tM(),inactive:tM()}),iy=nF(tx(tI({signature:tC(),slot:tM(),err:nQ,memo:tT(tC()),blockTime:tA(tT(tM()))}))),iv=nF(tx(tI({signature:tC(),slot:tM(),err:nQ,memo:tT(tC()),blockTime:tA(tT(tM()))}))),ib=tI({subscription:tM(),result:nV(ic)}),iw=tI({pubkey:nj,account:ic}),ix=tI({subscription:tM(),result:nV(iw)}),iE=tI({parent:tM(),slot:tM(),root:tM()}),ik=tI({subscription:tM(),result:iE}),iS=tO([tI({type:tO([tS("firstShredReceived"),tS("completed"),tS("optimisticConfirmation"),tS("root")]),slot:tM(),timestamp:tM()}),tI({type:tS("createdBank"),parent:tM(),slot:tM(),timestamp:tM()}),tI({type:tS("frozen"),slot:tM(),timestamp:tM(),stats:tI({numTransactionEntries:tM(),numSuccessfulTransactions:tM(),numFailedTransactions:tM(),maxTransactionsPerEntry:tM()})}),tI({type:tS("dead"),slot:tM(),timestamp:tM(),err:tC()})]),iT=tI({subscription:tM(),result:iS}),iM=tI({subscription:tM(),result:nV(tO([n0,n1]))}),iA=tI({subscription:tM(),result:tM()}),iP=tI({pubkey:tC(),gossip:tT(tC()),tpu:tT(tC()),rpc:tT(tC()),version:tT(tC())}),iC=tI({votePubkey:tC(),nodePubkey:tC(),activatedStake:tM(),epochVoteAccount:tE(),epochCredits:tx(t_([tM(),tM(),tM()])),commission:tM(),lastVote:tM(),rootSlot:tT(tM())}),i_=nF(tI({current:tx(iC),delinquent:tx(iC)})),iI=tO([tS("processed"),tS("confirmed"),tS("finalized")]),iO=tI({slot:tM(),confirmations:tT(tM()),err:nQ,confirmationStatus:tA(iI)}),iL=nW(tx(tT(iO))),iR=nF(tM()),ij=tI({accountKey:nj,writableIndexes:tx(tM()),readonlyIndexes:tx(tM())}),iB=tI({signatures:tx(tC()),message:tI({accountKeys:tx(tC()),header:tI({numRequiredSignatures:tM(),numReadonlySignedAccounts:tM(),numReadonlyUnsignedAccounts:tM()}),instructions:tx(tI({accounts:tx(tM()),data:tC(),programIdIndex:tM()})),recentBlockhash:tC(),addressTableLookups:tA(tx(ij))})}),iN=tI({pubkey:nj,signer:tE(),writable:tE(),source:tA(tO([tS("transaction"),tS("lookupTable")]))}),iD=tI({accountKeys:tx(iN),signatures:tx(tC())}),iK=tI({parsed:tL(),program:tC(),programId:nj}),iU=tI({accounts:tx(nj),data:tC(),programId:nj}),iz=tR(tO([iU,iK]),tO([tI({parsed:tL(),program:tC(),programId:tC()}),tI({accounts:tx(tC()),data:tC(),programId:tC()})]),e=>"accounts"in e?tv(e,iU):tv(e,iK)),iF=tI({signatures:tx(tC()),message:tI({accountKeys:tx(iN),instructions:tx(iz),recentBlockhash:tC(),addressTableLookups:tA(tT(tx(ij)))})}),iW=tI({accountIndex:tM(),mint:tC(),owner:tA(tC()),uiTokenAmount:ii}),iV=tI({writable:tx(nj),readonly:tx(nj)}),i$=tI({err:nQ,fee:tM(),innerInstructions:tA(tT(tx(tI({index:tM(),instructions:tx(tI({accounts:tx(tM()),data:tC(),programIdIndex:tM()}))})))),preBalances:tx(tM()),postBalances:tx(tM()),logMessages:tA(tT(tx(tC()))),preTokenBalances:tA(tT(tx(iW))),postTokenBalances:tA(tT(tx(iW))),loadedAddresses:tA(iV),computeUnitsConsumed:tA(tM())}),iH=tI({err:nQ,fee:tM(),innerInstructions:tA(tT(tx(tI({index:tM(),instructions:tx(iz)})))),preBalances:tx(tM()),postBalances:tx(tM()),logMessages:tA(tT(tx(tC()))),preTokenBalances:tA(tT(tx(iW))),postTokenBalances:tA(tT(tx(iW))),loadedAddresses:tA(iV),computeUnitsConsumed:tA(tM())}),iq=tO([tS(0),tS("legacy")]),iZ=tI({pubkey:tC(),lamports:tM(),postBalance:tT(tM()),rewardType:tT(tC()),commission:tA(tT(tM()))}),iG=nF(tT(tI({blockhash:tC(),previousBlockhash:tC(),parentSlot:tM(),transactions:tx(tI({transaction:iB,meta:tT(i$),version:tA(iq)})),rewards:tA(tx(iZ)),blockTime:tT(tM()),blockHeight:tT(tM())}))),iJ=nF(tT(tI({blockhash:tC(),previousBlockhash:tC(),parentSlot:tM(),rewards:tA(tx(iZ)),blockTime:tT(tM()),blockHeight:tT(tM())}))),iY=nF(tT(tI({blockhash:tC(),previousBlockhash:tC(),parentSlot:tM(),transactions:tx(tI({transaction:iD,meta:tT(i$),version:tA(iq)})),rewards:tA(tx(iZ)),blockTime:tT(tM()),blockHeight:tT(tM())}))),iX=nF(tT(tI({blockhash:tC(),previousBlockhash:tC(),parentSlot:tM(),transactions:tx(tI({transaction:iF,meta:tT(iH),version:tA(iq)})),rewards:tA(tx(iZ)),blockTime:tT(tM()),blockHeight:tT(tM())}))),iQ=nF(tT(tI({blockhash:tC(),previousBlockhash:tC(),parentSlot:tM(),transactions:tx(tI({transaction:iD,meta:tT(iH),version:tA(iq)})),rewards:tA(tx(iZ)),blockTime:tT(tM()),blockHeight:tT(tM())}))),i0=nF(tT(tI({blockhash:tC(),previousBlockhash:tC(),parentSlot:tM(),rewards:tA(tx(iZ)),blockTime:tT(tM()),blockHeight:tT(tM())}))),i1=nF(tT(tI({blockhash:tC(),previousBlockhash:tC(),parentSlot:tM(),transactions:tx(tI({transaction:iB,meta:tT(i$)})),rewards:tA(tx(iZ)),blockTime:tT(tM())}))),i2=nF(tT(tI({blockhash:tC(),previousBlockhash:tC(),parentSlot:tM(),signatures:tx(tC()),blockTime:tT(tM())}))),i5=nF(tT(tI({slot:tM(),meta:tT(i$),blockTime:tA(tT(tM())),transaction:iB,version:tA(iq)}))),i6=nF(tT(tI({slot:tM(),transaction:iF,meta:tT(iH),blockTime:tA(tT(tM())),version:tA(iq)}))),i3=nW(tI({blockhash:tC(),feeCalculator:tI({lamportsPerSignature:tM()})})),i4=nW(tI({blockhash:tC(),lastValidBlockHeight:tM()})),i8=nW(tE()),i7=nF(tx(tI({slot:tM(),numTransactions:tM(),numSlots:tM(),samplePeriodSecs:tM()}))),i9=nW(tT(tI({feeCalculator:tI({lamportsPerSignature:tM()})}))),oe=nF(tC()),ot=nF(tC()),or=tI({err:nQ,logs:tx(tC()),signature:tC()}),on=tI({result:nV(or),subscription:tM()}),oi={"solana-client":"js/0.0.0-development"};class oo{constructor(e,t){var r,n;let i,o,s,a,l,u;this._commitment=void 0,this._confirmTransactionInitialTimeout=void 0,this._rpcEndpoint=void 0,this._rpcWsEndpoint=void 0,this._rpcClient=void 0,this._rpcRequest=void 0,this._rpcBatchRequest=void 0,this._rpcWebSocket=void 0,this._rpcWebSocketConnected=!1,this._rpcWebSocketHeartbeat=null,this._rpcWebSocketIdleTimeout=null,this._rpcWebSocketGeneration=0,this._disableBlockhashCaching=!1,this._pollingBlockhash=!1,this._blockhashInfo={latestBlockhash:null,lastFetch:0,transactionSignatures:[],simulatedSignatures:[]},this._nextClientSubscriptionId=0,this._subscriptionDisposeFunctionsByClientSubscriptionId={},this._subscriptionHashByClientSubscriptionId={},this._subscriptionStateChangeCallbacksByHash={},this._subscriptionCallbacksByServerSubscriptionId={},this._subscriptionsByHash={},this._subscriptionsAutoDisposedByRpc=new Set,this.getBlockHeight=(()=>{let e={};return async t=>{let{commitment:r,config:n}=nK(t),i=this._buildArgs([],r,void 0,n),o=nA(i);return e[o]=e[o]??(async()=>{try{let e=await this._rpcRequest("getBlockHeight",i),t=tv(e,nF(tM()));if("error"in t)throw new na(t.error,"failed to get block height information");return t.result}finally{delete e[o]}})(),await e[o]}})(),t&&"string"==typeof t?this._commitment=t:t&&(this._commitment=t.commitment,this._confirmTransactionInitialTimeout=t.confirmTransactionInitialTimeout,i=t.wsEndpoint,o=t.httpHeaders,s=t.fetch,a=t.fetchMiddleware,l=t.disableRetryOnRateLimit,u=t.httpAgent),this._rpcEndpoint=function(e){if(!1===/^https?:/.test(e))throw TypeError("Endpoint URL must start with `http:` or `https:`.");return e}(e),this._rpcWsEndpoint=i||function(e){let t=e.match(nR);if(null==t)throw TypeError(`Failed to validate endpoint URL \`${e}\``);let[r,n,i,o]=t,s=e.startsWith("https:")?"wss:":"ws:",a=null==i?null:parseInt(i.slice(1),10),l=null==a?"":`:${a+1}`;return`${s}//${n}${l}${o}`}(e),this._rpcClient=function(e,t,r,n,i,o){let s,a;let l=r||n_;return null!=o&&console.warn("You have supplied an `httpAgent` when creating a `Connection` in a browser environment.It has been ignored; `httpAgent` is only used in Node environments."),n&&(a=async(e,t)=>{let r=await new Promise((r,i)=>{try{n(e,t,(e,t)=>r([e,t]))}catch(e){i(e)}});return await l(...r)}),new(tB())(async(r,n)=>{let o={method:"POST",body:r,agent:s,headers:Object.assign({"Content-Type":"application/json"},t||{},oi)};try{let t,r=5,s=500;for(;t=a?await a(e,o):await l(e,o),429===t.status&&!0!==i&&(r-=1,0!==r);)console.error(`Server responded with ${t.status} ${t.statusText}.  Retrying after ${s}ms delay...`),await nu(s),s*=2;let u=await t.text();t.ok?n(null,u):n(Error(`${t.status} ${t.statusText}: ${u}`))}catch(e){e instanceof Error&&n(e)}},{})}(e,o,s,a,l,u),this._rpcRequest=(r=this._rpcClient,(e,t)=>new Promise((n,i)=>{r.request(e,t,(e,t)=>{if(e){i(e);return}n(t)})})),this._rpcBatchRequest=(n=this._rpcClient,e=>new Promise((t,r)=>{0===e.length&&t([]);let i=e.map(e=>n.request(e.methodName,e.args));n.request(i,(e,n)=>{if(e){r(e);return}t(n)})})),this._rpcWebSocket=new nI(this._rpcWsEndpoint,{autoconnect:!1,max_reconnects:1/0}),this._rpcWebSocket.on("open",this._wsOnOpen.bind(this)),this._rpcWebSocket.on("error",this._wsOnError.bind(this)),this._rpcWebSocket.on("close",this._wsOnClose.bind(this)),this._rpcWebSocket.on("accountNotification",this._wsOnAccountNotification.bind(this)),this._rpcWebSocket.on("programNotification",this._wsOnProgramAccountNotification.bind(this)),this._rpcWebSocket.on("slotNotification",this._wsOnSlotNotification.bind(this)),this._rpcWebSocket.on("slotsUpdatesNotification",this._wsOnSlotUpdatesNotification.bind(this)),this._rpcWebSocket.on("signatureNotification",this._wsOnSignatureNotification.bind(this)),this._rpcWebSocket.on("rootNotification",this._wsOnRootNotification.bind(this)),this._rpcWebSocket.on("logsNotification",this._wsOnLogsNotification.bind(this))}get commitment(){return this._commitment}get rpcEndpoint(){return this._rpcEndpoint}async getBalanceAndContext(e,t){let{commitment:r,config:n}=nK(t),i=this._buildArgs([e.toBase58()],r,void 0,n),o=tv(await this._rpcRequest("getBalance",i),nW(tM()));if("error"in o)throw new na(o.error,`failed to get balance for ${e.toBase58()}`);return o.result}async getBalance(e,t){return await this.getBalanceAndContext(e,t).then(e=>e.value).catch(t=>{throw Error("failed to get balance of account "+e.toBase58()+": "+t)})}async getBlockTime(e){let t=tv(await this._rpcRequest("getBlockTime",[e]),nF(tT(tM())));if("error"in t)throw new na(t.error,`failed to get block time for slot ${e}`);return t.result}async getMinimumLedgerSlot(){let e=tv(await this._rpcRequest("minimumLedgerSlot",[]),nF(tM()));if("error"in e)throw new na(e.error,"failed to get minimum ledger slot");return e.result}async getFirstAvailableBlock(){let e=tv(await this._rpcRequest("getFirstAvailableBlock",[]),it);if("error"in e)throw new na(e.error,"failed to get first available block");return e.result}async getSupply(e){let t={};t="string"==typeof e?{commitment:e}:e?{...e,commitment:e&&e.commitment||this.commitment}:{commitment:this.commitment};let r=tv(await this._rpcRequest("getSupply",[t]),ir);if("error"in r)throw new na(r.error,"failed to get supply");return r.result}async getTokenSupply(e,t){let r=this._buildArgs([e.toBase58()],t),n=tv(await this._rpcRequest("getTokenSupply",r),nW(ii));if("error"in n)throw new na(n.error,"failed to get token supply");return n.result}async getTokenAccountBalance(e,t){let r=this._buildArgs([e.toBase58()],t),n=tv(await this._rpcRequest("getTokenAccountBalance",r),nW(ii));if("error"in n)throw new na(n.error,"failed to get token account balance");return n.result}async getTokenAccountsByOwner(e,t,r){let{commitment:n,config:i}=nK(r),o=[e.toBase58()];"mint"in t?o.push({mint:t.mint.toBase58()}):o.push({programId:t.programId.toBase58()});let s=this._buildArgs(o,n,"base64",i),a=tv(await this._rpcRequest("getTokenAccountsByOwner",s),is);if("error"in a)throw new na(a.error,`failed to get token accounts owned by account ${e.toBase58()}`);return a.result}async getParsedTokenAccountsByOwner(e,t,r){let n=[e.toBase58()];"mint"in t?n.push({mint:t.mint.toBase58()}):n.push({programId:t.programId.toBase58()});let i=this._buildArgs(n,r,"jsonParsed"),o=tv(await this._rpcRequest("getTokenAccountsByOwner",i),il);if("error"in o)throw new na(o.error,`failed to get token accounts owned by account ${e.toBase58()}`);return o.result}async getLargestAccounts(e){let t={...e,commitment:e&&e.commitment||this.commitment},r=t.filter||t.commitment?[t]:[],n=tv(await this._rpcRequest("getLargestAccounts",r),iu);if("error"in n)throw new na(n.error,"failed to get largest accounts");return n.result}async getTokenLargestAccounts(e,t){let r=this._buildArgs([e.toBase58()],t),n=tv(await this._rpcRequest("getTokenLargestAccounts",r),io);if("error"in n)throw new na(n.error,"failed to get token largest accounts");return n.result}async getAccountInfoAndContext(e,t){let{commitment:r,config:n}=nK(t),i=this._buildArgs([e.toBase58()],r,"base64",n),o=tv(await this._rpcRequest("getAccountInfo",i),nW(tT(ic)));if("error"in o)throw new na(o.error,`failed to get info about account ${e.toBase58()}`);return o.result}async getParsedAccountInfo(e,t){let{commitment:r,config:n}=nK(t),i=this._buildArgs([e.toBase58()],r,"jsonParsed",n),o=tv(await this._rpcRequest("getAccountInfo",i),nW(tT(ip)));if("error"in o)throw new na(o.error,`failed to get info about account ${e.toBase58()}`);return o.result}async getAccountInfo(e,t){try{return(await this.getAccountInfoAndContext(e,t)).value}catch(t){throw Error("failed to get info about account "+e.toBase58()+": "+t)}}async getMultipleParsedAccounts(e,t){let{commitment:r,config:n}=nK(t),i=e.map(e=>e.toBase58()),o=this._buildArgs([i],r,"jsonParsed",n),s=tv(await this._rpcRequest("getMultipleAccounts",o),nW(tx(tT(ip))));if("error"in s)throw new na(s.error,`failed to get info for accounts ${i}`);return s.result}async getMultipleAccountsInfoAndContext(e,t){let{commitment:r,config:n}=nK(t),i=e.map(e=>e.toBase58()),o=this._buildArgs([i],r,"base64",n),s=tv(await this._rpcRequest("getMultipleAccounts",o),nW(tx(tT(ic))));if("error"in s)throw new na(s.error,`failed to get info for accounts ${i}`);return s.result}async getMultipleAccountsInfo(e,t){return(await this.getMultipleAccountsInfoAndContext(e,t)).value}async getStakeActivation(e,t,r){let{commitment:n,config:i}=nK(t),o=this._buildArgs([e.toBase58()],n,void 0,{...i,epoch:null!=r?r:i?.epoch}),s=tv(await this._rpcRequest("getStakeActivation",o),nF(im));if("error"in s)throw new na(s.error,`failed to get Stake Activation ${e.toBase58()}`);return s.result}async getProgramAccounts(e,t){let{commitment:r,config:n}=nK(t),{encoding:i,...o}=n||{},s=this._buildArgs([e.toBase58()],r,i||"base64",o),a=await this._rpcRequest("getProgramAccounts",s),l=tx(id),u=!0===o.withContext?tv(a,nW(l)):tv(a,nF(l));if("error"in u)throw new na(u.error,`failed to get accounts owned by program ${e.toBase58()}`);return u.result}async getParsedProgramAccounts(e,t){let{commitment:r,config:n}=nK(t),i=this._buildArgs([e.toBase58()],r,"jsonParsed",n),o=tv(await this._rpcRequest("getProgramAccounts",i),nF(tx(ig)));if("error"in o)throw new na(o.error,`failed to get accounts owned by program ${e.toBase58()}`);return o.result}async confirmTransaction(e,t){let r,n;if("string"==typeof e)r=e;else{if(e.abortSignal?.aborted)return Promise.reject(e.abortSignal.reason);r=e.signature}try{n=eJ().decode(r)}catch(e){throw Error("signature must be base58 encoded: "+r)}return(rH(64===n.length,"signature has invalid length"),"string"==typeof e)?await this.confirmTransactionUsingLegacyTimeoutStrategy({commitment:t||this.commitment,signature:r}):"lastValidBlockHeight"in e?await this.confirmTransactionUsingBlockHeightExceedanceStrategy({commitment:t||this.commitment,strategy:e}):await this.confirmTransactionUsingDurableNonceStrategy({commitment:t||this.commitment,strategy:e})}getCancellationPromise(e){return new Promise((t,r)=>{null!=e&&(e.aborted?r(e.reason):e.addEventListener("abort",()=>{r(e.reason)}))})}getTransactionConfirmationPromise({commitment:e,signature:t}){let r,n;let i=!1;return{abortConfirmation:()=>{n&&(n(),n=void 0),null!=r&&(this.removeSignatureListener(r),r=void 0)},confirmationPromise:new Promise((o,s)=>{try{r=this.onSignature(t,(e,t)=>{r=void 0,o({__type:r0.PROCESSED,response:{context:t,value:e}})},e);let a=new Promise(e=>{null==r?e():n=this._onSubscriptionStateChange(r,t=>{"subscribed"===t&&e()})});(async()=>{if(await a,i)return;let r=await this.getSignatureStatus(t);if(i||null==r)return;let{context:n,value:l}=r;if(null!=l){if(l?.err)s(l.err);else{switch(e){case"confirmed":case"single":case"singleGossip":if("processed"===l.confirmationStatus)return;break;case"finalized":case"max":case"root":if("processed"===l.confirmationStatus||"confirmed"===l.confirmationStatus)return}i=!0,o({__type:r0.PROCESSED,response:{context:n,value:l}})}}})()}catch(e){s(e)}})}}async confirmTransactionUsingBlockHeightExceedanceStrategy({commitment:e,strategy:{abortSignal:t,lastValidBlockHeight:r,signature:n}}){let i,o=!1,s=new Promise(t=>{let n=async()=>{try{return await this.getBlockHeight(e)}catch(e){return -1}};(async()=>{let e=await n();if(!o){for(;e<=r;)if(await nu(1e3),o||(e=await n(),o))return;t({__type:r0.BLOCKHEIGHT_EXCEEDED})}})()}),{abortConfirmation:a,confirmationPromise:l}=this.getTransactionConfirmationPromise({commitment:e,signature:n}),u=this.getCancellationPromise(t);try{let e=await Promise.race([u,l,s]);if(e.__type===r0.PROCESSED)i=e.response;else throw new rN(n)}finally{o=!0,a()}return i}async confirmTransactionUsingDurableNonceStrategy({commitment:e,strategy:{abortSignal:t,minContextSlot:r,nonceAccountPubkey:n,nonceValue:i,signature:o}}){let s,a=!1,l=new Promise(t=>{let o=i,s=null,l=async()=>{try{let{context:t,value:i}=await this.getNonceAndContext(n,{commitment:e,minContextSlot:r});return s=t.slot,i?.nonce}catch(e){return o}};(async()=>{if(o=await l(),!a)for(;;){if(i!==o){t({__type:r0.NONCE_INVALID,slotInWhichNonceDidAdvance:s});return}if(await nu(2e3),a||(o=await l(),a))return}})()}),{abortConfirmation:u,confirmationPromise:c}=this.getTransactionConfirmationPromise({commitment:e,signature:o}),d=this.getCancellationPromise(t);try{let t=await Promise.race([d,c,l]);if(t.__type===r0.PROCESSED)s=t.response;else{let n;for(;;){let e=await this.getSignatureStatus(o);if(null==e)break;if(e.context.slot<(t.slotInWhichNonceDidAdvance??r)){await nu(400);continue}n=e;break}if(n?.value){let t=e||"finalized",{confirmationStatus:r}=n.value;switch(t){case"processed":case"recent":if("processed"!==r&&"confirmed"!==r&&"finalized"!==r)throw new rK(o);break;case"confirmed":case"single":case"singleGossip":if("confirmed"!==r&&"finalized"!==r)throw new rK(o);break;case"finalized":case"max":case"root":if("finalized"!==r)throw new rK(o)}s={context:n.context,value:{err:n.value.err}}}else throw new rK(o)}}finally{a=!0,u()}return s}async confirmTransactionUsingLegacyTimeoutStrategy({commitment:e,signature:t}){let r,n;let i=new Promise(t=>{let n=this._confirmTransactionInitialTimeout||6e4;switch(e){case"processed":case"recent":case"single":case"confirmed":case"singleGossip":n=this._confirmTransactionInitialTimeout||3e4}r=setTimeout(()=>t({__type:r0.TIMED_OUT,timeoutMs:n}),n)}),{abortConfirmation:o,confirmationPromise:s}=this.getTransactionConfirmationPromise({commitment:e,signature:t});try{let e=await Promise.race([s,i]);if(e.__type===r0.PROCESSED)n=e.response;else throw new rD(t,e.timeoutMs/1e3)}finally{clearTimeout(r),o()}return n}async getClusterNodes(){let e=tv(await this._rpcRequest("getClusterNodes",[]),nF(tx(iP)));if("error"in e)throw new na(e.error,"failed to get cluster nodes");return e.result}async getVoteAccounts(e){let t=this._buildArgs([],e),r=tv(await this._rpcRequest("getVoteAccounts",t),i_);if("error"in r)throw new na(r.error,"failed to get vote accounts");return r.result}async getSlot(e){let{commitment:t,config:r}=nK(e),n=this._buildArgs([],t,void 0,r),i=tv(await this._rpcRequest("getSlot",n),nF(tM()));if("error"in i)throw new na(i.error,"failed to get slot");return i.result}async getSlotLeader(e){let{commitment:t,config:r}=nK(e),n=this._buildArgs([],t,void 0,r),i=tv(await this._rpcRequest("getSlotLeader",n),nF(tC()));if("error"in i)throw new na(i.error,"failed to get slot leader");return i.result}async getSlotLeaders(e,t){let r=tv(await this._rpcRequest("getSlotLeaders",[e,t]),nF(tx(nj)));if("error"in r)throw new na(r.error,"failed to get slot leaders");return r.result}async getSignatureStatus(e,t){let{context:r,value:n}=await this.getSignatureStatuses([e],t);return rH(1===n.length),{context:r,value:n[0]}}async getSignatureStatuses(e,t){let r=[e];t&&r.push(t);let n=tv(await this._rpcRequest("getSignatureStatuses",r),iL);if("error"in n)throw new na(n.error,"failed to get signature status");return n.result}async getTransactionCount(e){let{commitment:t,config:r}=nK(e),n=this._buildArgs([],t,void 0,r),i=tv(await this._rpcRequest("getTransactionCount",n),nF(tM()));if("error"in i)throw new na(i.error,"failed to get transaction count");return i.result}async getTotalSupply(e){return(await this.getSupply({commitment:e,excludeNonCirculatingAccountsList:!0})).value.total}async getInflationGovernor(e){let t=this._buildArgs([],e),r=tv(await this._rpcRequest("getInflationGovernor",t),n3);if("error"in r)throw new na(r.error,"failed to get inflation");return r.result}async getInflationReward(e,t,r){let{commitment:n,config:i}=nK(r),o=this._buildArgs([e.map(e=>e.toBase58())],n,void 0,{...i,epoch:null!=t?t:i?.epoch}),s=tv(await this._rpcRequest("getInflationReward",o),nq);if("error"in s)throw new na(s.error,"failed to get inflation reward");return s.result}async getInflationRate(){let e=tv(await this._rpcRequest("getInflationRate",[]),n4);if("error"in e)throw new na(e.error,"failed to get inflation rate");return e.result}async getEpochInfo(e){let{commitment:t,config:r}=nK(e),n=this._buildArgs([],t,void 0,r),i=tv(await this._rpcRequest("getEpochInfo",n),n7);if("error"in i)throw new na(i.error,"failed to get epoch info");return i.result}async getEpochSchedule(){let e=tv(await this._rpcRequest("getEpochSchedule",[]),n9);if("error"in e)throw new na(e.error,"failed to get epoch schedule");let t=e.result;return new nC(t.slotsPerEpoch,t.leaderScheduleSlotOffset,t.warmup,t.firstNormalEpoch,t.firstNormalSlot)}async getLeaderSchedule(){let e=tv(await this._rpcRequest("getLeaderSchedule",[]),ie);if("error"in e)throw new na(e.error,"failed to get leader schedule");return e.result}async getMinimumBalanceForRentExemption(e,t){let r=this._buildArgs([e],t),n=tv(await this._rpcRequest("getMinimumBalanceForRentExemption",r),iR);return"error"in n?(console.warn("Unable to fetch minimum balance for rent exemption"),0):n.result}async getRecentBlockhashAndContext(e){let t=this._buildArgs([],e),r=tv(await this._rpcRequest("getRecentBlockhash",t),i3);if("error"in r)throw new na(r.error,"failed to get recent blockhash");return r.result}async getRecentPerformanceSamples(e){let t=tv(await this._rpcRequest("getRecentPerformanceSamples",e?[e]:[]),i7);if("error"in t)throw new na(t.error,"failed to get recent performance samples");return t.result}async getFeeCalculatorForBlockhash(e,t){let r=this._buildArgs([e],t),n=tv(await this._rpcRequest("getFeeCalculatorForBlockhash",r),i9);if("error"in n)throw new na(n.error,"failed to get fee calculator");let{context:i,value:o}=n.result;return{context:i,value:null!==o?o.feeCalculator:null}}async getFeeForMessage(e,t){let r=rS(e.serialize()).toString("base64"),n=this._buildArgs([r],t),i=tv(await this._rpcRequest("getFeeForMessage",n),nW(tT(tM())));if("error"in i)throw new na(i.error,"failed to get fee for message");if(null===i.result)throw Error("invalid blockhash");return i.result}async getRecentPrioritizationFees(e){let t=e?.lockedWritableAccounts?.map(e=>e.toBase58()),r=t?.length?[t]:[],n=tv(await this._rpcRequest("getRecentPrioritizationFees",r),n8);if("error"in n)throw new na(n.error,"failed to get recent prioritization fees");return n.result}async getRecentBlockhash(e){try{return(await this.getRecentBlockhashAndContext(e)).value}catch(e){throw Error("failed to get recent blockhash: "+e)}}async getLatestBlockhash(e){try{return(await this.getLatestBlockhashAndContext(e)).value}catch(e){throw Error("failed to get recent blockhash: "+e)}}async getLatestBlockhashAndContext(e){let{commitment:t,config:r}=nK(e),n=this._buildArgs([],t,void 0,r),i=tv(await this._rpcRequest("getLatestBlockhash",n),i4);if("error"in i)throw new na(i.error,"failed to get latest blockhash");return i.result}async isBlockhashValid(e,t){let{commitment:r,config:n}=nK(t),i=this._buildArgs([e],r,void 0,n),o=tv(await this._rpcRequest("isBlockhashValid",i),i8);if("error"in o)throw new na(o.error,"failed to determine if the blockhash `"+e+"`is valid");return o.result}async getVersion(){let e=tv(await this._rpcRequest("getVersion",[]),nF(n2));if("error"in e)throw new na(e.error,"failed to get version");return e.result}async getGenesisHash(){let e=tv(await this._rpcRequest("getGenesisHash",[]),nF(tC()));if("error"in e)throw new na(e.error,"failed to get genesis hash");return e.result}async getBlock(e,t){let{commitment:r,config:n}=nK(t),i=this._buildArgsAtLeastConfirmed([e],r,void 0,n),o=await this._rpcRequest("getBlock",i);try{switch(n?.transactionDetails){case"accounts":{let e=tv(o,iY);if("error"in e)throw e.error;return e.result}case"none":{let e=tv(o,iJ);if("error"in e)throw e.error;return e.result}default:{let e=tv(o,iG);if("error"in e)throw e.error;let{result:t}=e;return t?{...t,transactions:t.transactions.map(({transaction:e,meta:t,version:r})=>({meta:t,transaction:{...e,message:n$(r,e.message)},version:r}))}:null}}}catch(e){throw new na(e,"failed to get confirmed block")}}async getParsedBlock(e,t){let{commitment:r,config:n}=nK(t),i=this._buildArgsAtLeastConfirmed([e],r,"jsonParsed",n),o=await this._rpcRequest("getBlock",i);try{switch(n?.transactionDetails){case"accounts":{let e=tv(o,iQ);if("error"in e)throw e.error;return e.result}case"none":{let e=tv(o,i0);if("error"in e)throw e.error;return e.result}default:{let e=tv(o,iX);if("error"in e)throw e.error;return e.result}}}catch(e){throw new na(e,"failed to get block")}}async getBlockProduction(e){let t,r;if("string"==typeof e)r=e;else if(e){let{commitment:n,...i}=e;r=n,t=i}let n=this._buildArgs([],r,"base64",t),i=tv(await this._rpcRequest("getBlockProduction",n),n6);if("error"in i)throw new na(i.error,"failed to get block production information");return i.result}async getTransaction(e,t){let{commitment:r,config:n}=nK(t),i=this._buildArgsAtLeastConfirmed([e],r,void 0,n),o=tv(await this._rpcRequest("getTransaction",i),i5);if("error"in o)throw new na(o.error,"failed to get transaction");let s=o.result;return s?{...s,transaction:{...s.transaction,message:n$(s.version,s.transaction.message)}}:s}async getParsedTransaction(e,t){let{commitment:r,config:n}=nK(t),i=this._buildArgsAtLeastConfirmed([e],r,"jsonParsed",n),o=tv(await this._rpcRequest("getTransaction",i),i6);if("error"in o)throw new na(o.error,"failed to get transaction");return o.result}async getParsedTransactions(e,t){let{commitment:r,config:n}=nK(t),i=e.map(e=>({methodName:"getTransaction",args:this._buildArgsAtLeastConfirmed([e],r,"jsonParsed",n)}));return(await this._rpcBatchRequest(i)).map(e=>{let t=tv(e,i6);if("error"in t)throw new na(t.error,"failed to get transactions");return t.result})}async getTransactions(e,t){let{commitment:r,config:n}=nK(t),i=e.map(e=>({methodName:"getTransaction",args:this._buildArgsAtLeastConfirmed([e],r,void 0,n)}));return(await this._rpcBatchRequest(i)).map(e=>{let t=tv(e,i5);if("error"in t)throw new na(t.error,"failed to get transactions");let r=t.result;return r?{...r,transaction:{...r.transaction,message:n$(r.version,r.transaction.message)}}:r})}async getConfirmedBlock(e,t){let r=this._buildArgsAtLeastConfirmed([e],t),n=tv(await this._rpcRequest("getConfirmedBlock",r),i1);if("error"in n)throw new na(n.error,"failed to get confirmed block");let i=n.result;if(!i)throw Error("Confirmed block "+e+" not found");let o={...i,transactions:i.transactions.map(({transaction:e,meta:t})=>{let r=new rY(e.message);return{meta:t,transaction:{...e,message:r}}})};return{...o,transactions:o.transactions.map(({transaction:e,meta:t})=>({meta:t,transaction:r5.populate(e.message,e.signatures)}))}}async getBlocks(e,t,r){let n=this._buildArgsAtLeastConfirmed(void 0!==t?[e,t]:[e],r),i=tv(await this._rpcRequest("getBlocks",n),nF(tx(tM())));if("error"in i)throw new na(i.error,"failed to get blocks");return i.result}async getBlockSignatures(e,t){let r=this._buildArgsAtLeastConfirmed([e],t,void 0,{transactionDetails:"signatures",rewards:!1}),n=tv(await this._rpcRequest("getBlock",r),i2);if("error"in n)throw new na(n.error,"failed to get block");let i=n.result;if(!i)throw Error("Block "+e+" not found");return i}async getConfirmedBlockSignatures(e,t){let r=this._buildArgsAtLeastConfirmed([e],t,void 0,{transactionDetails:"signatures",rewards:!1}),n=tv(await this._rpcRequest("getConfirmedBlock",r),i2);if("error"in n)throw new na(n.error,"failed to get confirmed block");let i=n.result;if(!i)throw Error("Confirmed block "+e+" not found");return i}async getConfirmedTransaction(e,t){let r=this._buildArgsAtLeastConfirmed([e],t),n=tv(await this._rpcRequest("getConfirmedTransaction",r),i5);if("error"in n)throw new na(n.error,"failed to get transaction");let i=n.result;if(!i)return i;let o=new rY(i.transaction.message),s=i.transaction.signatures;return{...i,transaction:r5.populate(o,s)}}async getParsedConfirmedTransaction(e,t){let r=this._buildArgsAtLeastConfirmed([e],t,"jsonParsed"),n=tv(await this._rpcRequest("getConfirmedTransaction",r),i6);if("error"in n)throw new na(n.error,"failed to get confirmed transaction");return n.result}async getParsedConfirmedTransactions(e,t){let r=e.map(e=>({methodName:"getConfirmedTransaction",args:this._buildArgsAtLeastConfirmed([e],t,"jsonParsed")}));return(await this._rpcBatchRequest(r)).map(e=>{let t=tv(e,i6);if("error"in t)throw new na(t.error,"failed to get confirmed transactions");return t.result})}async getConfirmedSignaturesForAddress(e,t,r){let n={},i=await this.getFirstAvailableBlock();for(;!("until"in n)&&!(--t<=0)&&!(t<i);)try{let e=await this.getConfirmedBlockSignatures(t,"finalized");e.signatures.length>0&&(n.until=e.signatures[e.signatures.length-1].toString())}catch(e){if(e instanceof Error&&e.message.includes("skipped"))continue;throw e}let o=await this.getSlot("finalized");for(;!("before"in n)&&!(++r>o);)try{let e=await this.getConfirmedBlockSignatures(r);e.signatures.length>0&&(n.before=e.signatures[e.signatures.length-1].toString())}catch(e){if(e instanceof Error&&e.message.includes("skipped"))continue;throw e}return(await this.getConfirmedSignaturesForAddress2(e,n)).map(e=>e.signature)}async getConfirmedSignaturesForAddress2(e,t,r){let n=this._buildArgsAtLeastConfirmed([e.toBase58()],r,void 0,t),i=tv(await this._rpcRequest("getConfirmedSignaturesForAddress2",n),iy);if("error"in i)throw new na(i.error,"failed to get confirmed signatures for address");return i.result}async getSignaturesForAddress(e,t,r){let n=this._buildArgsAtLeastConfirmed([e.toBase58()],r,void 0,t),i=tv(await this._rpcRequest("getSignaturesForAddress",n),iv);if("error"in i)throw new na(i.error,"failed to get signatures for address");return i.result}async getAddressLookupTable(e,t){let{context:r,value:n}=await this.getAccountInfoAndContext(e,t),i=null;return null!==n&&(i=new nO({key:e,state:nO.deserialize(n.data)})),{context:r,value:i}}async getNonceAndContext(e,t){let{context:r,value:n}=await this.getAccountInfoAndContext(e,t),i=null;return null!==n&&(i=ng.fromAccountData(n.data)),{context:r,value:i}}async getNonce(e,t){return await this.getNonceAndContext(e,t).then(e=>e.value).catch(t=>{throw Error("failed to get nonce for account "+e.toBase58()+": "+t)})}async requestAirdrop(e,t){let r=tv(await this._rpcRequest("requestAirdrop",[e.toBase58(),t]),oe);if("error"in r)throw new na(r.error,`airdrop to ${e.toBase58()} failed`);return r.result}async _blockhashWithExpiryBlockHeight(e){if(!e){for(;this._pollingBlockhash;)await nu(100);let e=Date.now()-this._blockhashInfo.lastFetch;if(null!==this._blockhashInfo.latestBlockhash&&!(e>=nD))return this._blockhashInfo.latestBlockhash}return await this._pollNewBlockhash()}async _pollNewBlockhash(){this._pollingBlockhash=!0;try{let e=Date.now(),t=this._blockhashInfo.latestBlockhash,r=t?t.blockhash:null;for(let e=0;e<50;e++){let e=await this.getLatestBlockhash("finalized");if(r!==e.blockhash)return this._blockhashInfo={latestBlockhash:e,lastFetch:Date.now(),transactionSignatures:[],simulatedSignatures:[]},e;await nu(200)}throw Error(`Unable to obtain a new blockhash after ${Date.now()-e}ms`)}finally{this._pollingBlockhash=!1}}async getStakeMinimumDelegation(e){let{commitment:t,config:r}=nK(e),n=this._buildArgs([],t,"base64",r),i=tv(await this._rpcRequest("getStakeMinimumDelegation",n),nW(tM()));if("error"in i)throw new na(i.error,"failed to get stake minimum delegation");return i.result}async simulateTransaction(e,t,r){let n;if("message"in e){let n=e.serialize(),i=s.Buffer.from(n).toString("base64");if(Array.isArray(t)||void 0!==r)throw Error("Invalid arguments");let o=t||{};o.encoding="base64","commitment"in o||(o.commitment=this.commitment);let a=tv(await this._rpcRequest("simulateTransaction",[i,o]),n5);if("error"in a)throw Error("failed to simulate transaction: "+a.error.message);return a.result}if(e instanceof r5?((n=new r5).feePayer=e.feePayer,n.instructions=e.instructions,n.nonceInfo=e.nonceInfo,n.signatures=e.signatures):(n=r5.populate(e))._message=n._json=void 0,void 0!==t&&!Array.isArray(t))throw Error("Invalid arguments");if(n.nonceInfo&&t)n.sign(...t);else{let e=this._disableBlockhashCaching;for(;;){let r=await this._blockhashWithExpiryBlockHeight(e);if(n.lastValidBlockHeight=r.lastValidBlockHeight,n.recentBlockhash=r.blockhash,!t)break;if(n.sign(...t),!n.signature)throw Error("!signature");let i=n.signature.toString("base64");if(this._blockhashInfo.simulatedSignatures.includes(i)||this._blockhashInfo.transactionSignatures.includes(i))e=!0;else{this._blockhashInfo.simulatedSignatures.push(i);break}}}let i=n._compile(),o=i.serialize(),a=n._serialize(o).toString("base64"),l={encoding:"base64",commitment:this.commitment};if(r){let e=(Array.isArray(r)?r:i.nonProgramIds()).map(e=>e.toBase58());l.accounts={encoding:"base64",addresses:e}}t&&(l.sigVerify=!0);let u=tv(await this._rpcRequest("simulateTransaction",[a,l]),n5);if("error"in u){let e;if("data"in u.error&&(e=u.error.data.logs)&&Array.isArray(e)){let t="\n    ",r=t+e.join(t);console.error(u.error.message,r)}throw new no({action:"simulate",signature:"",transactionMessage:u.error.message,logs:e})}return u.result}async sendTransaction(e,t,r){if("version"in e){if(t&&Array.isArray(t))throw Error("Invalid arguments");let r=e.serialize();return await this.sendRawTransaction(r,t)}if(void 0===t||!Array.isArray(t))throw Error("Invalid arguments");if(e.nonceInfo)e.sign(...t);else{let r=this._disableBlockhashCaching;for(;;){let n=await this._blockhashWithExpiryBlockHeight(r);if(e.lastValidBlockHeight=n.lastValidBlockHeight,e.recentBlockhash=n.blockhash,e.sign(...t),!e.signature)throw Error("!signature");let i=e.signature.toString("base64");if(this._blockhashInfo.transactionSignatures.includes(i))r=!0;else{this._blockhashInfo.transactionSignatures.push(i);break}}}let n=e.serialize();return await this.sendRawTransaction(n,r)}async sendRawTransaction(e,t){let r=rS(e).toString("base64");return await this.sendEncodedTransaction(r,t)}async sendEncodedTransaction(e,t){let r={encoding:"base64"},n=t&&t.skipPreflight,i=!0===n?"processed":t&&t.preflightCommitment||this.commitment;t&&null!=t.maxRetries&&(r.maxRetries=t.maxRetries),t&&null!=t.minContextSlot&&(r.minContextSlot=t.minContextSlot),n&&(r.skipPreflight=n),i&&(r.preflightCommitment=i);let o=tv(await this._rpcRequest("sendTransaction",[e,r]),ot);if("error"in o){let e;throw"data"in o.error&&(e=o.error.data.logs),new no({action:n?"send":"simulate",signature:"",transactionMessage:o.error.message,logs:e})}return o.result}_wsOnOpen(){this._rpcWebSocketConnected=!0,this._rpcWebSocketHeartbeat=setInterval(()=>{(async()=>{try{await this._rpcWebSocket.notify("ping")}catch{}})()},5e3),this._updateSubscriptions()}_wsOnError(e){this._rpcWebSocketConnected=!1,console.error("ws error:",e.message)}_wsOnClose(e){if(this._rpcWebSocketConnected=!1,this._rpcWebSocketGeneration=(this._rpcWebSocketGeneration+1)%Number.MAX_SAFE_INTEGER,this._rpcWebSocketIdleTimeout&&(clearTimeout(this._rpcWebSocketIdleTimeout),this._rpcWebSocketIdleTimeout=null),this._rpcWebSocketHeartbeat&&(clearInterval(this._rpcWebSocketHeartbeat),this._rpcWebSocketHeartbeat=null),1e3===e){this._updateSubscriptions();return}this._subscriptionCallbacksByServerSubscriptionId={},Object.entries(this._subscriptionsByHash).forEach(([e,t])=>{this._setSubscription(e,{...t,state:"pending"})})}_setSubscription(e,t){let r=this._subscriptionsByHash[e]?.state;if(this._subscriptionsByHash[e]=t,r!==t.state){let r=this._subscriptionStateChangeCallbacksByHash[e];r&&r.forEach(e=>{try{e(t.state)}catch{}})}}_onSubscriptionStateChange(e,t){let r=this._subscriptionHashByClientSubscriptionId[e];if(null==r)return()=>{};let n=this._subscriptionStateChangeCallbacksByHash[r]||=new Set;return n.add(t),()=>{n.delete(t),0===n.size&&delete this._subscriptionStateChangeCallbacksByHash[r]}}async _updateSubscriptions(){if(0===Object.keys(this._subscriptionsByHash).length){this._rpcWebSocketConnected&&(this._rpcWebSocketConnected=!1,this._rpcWebSocketIdleTimeout=setTimeout(()=>{this._rpcWebSocketIdleTimeout=null;try{this._rpcWebSocket.close()}catch(e){e instanceof Error&&console.log(`Error when closing socket connection: ${e.message}`)}},500));return}if(null!==this._rpcWebSocketIdleTimeout&&(clearTimeout(this._rpcWebSocketIdleTimeout),this._rpcWebSocketIdleTimeout=null,this._rpcWebSocketConnected=!0),!this._rpcWebSocketConnected){this._rpcWebSocket.connect();return}let e=this._rpcWebSocketGeneration,t=()=>e===this._rpcWebSocketGeneration;await Promise.all(Object.keys(this._subscriptionsByHash).map(async e=>{let r=this._subscriptionsByHash[e];if(void 0!==r)switch(r.state){case"pending":case"unsubscribed":if(0===r.callbacks.size){delete this._subscriptionsByHash[e],"unsubscribed"===r.state&&delete this._subscriptionCallbacksByServerSubscriptionId[r.serverSubscriptionId],await this._updateSubscriptions();return}await (async()=>{let{args:n,method:i}=r;try{this._setSubscription(e,{...r,state:"subscribing"});let t=await this._rpcWebSocket.call(i,n);this._setSubscription(e,{...r,serverSubscriptionId:t,state:"subscribed"}),this._subscriptionCallbacksByServerSubscriptionId[t]=r.callbacks,await this._updateSubscriptions()}catch(o){if(o instanceof Error&&console.error(`${i} error for argument`,n,o.message),!t())return;this._setSubscription(e,{...r,state:"pending"}),await this._updateSubscriptions()}})();break;case"subscribed":0===r.callbacks.size&&await (async()=>{let{serverSubscriptionId:n,unsubscribeMethod:i}=r;if(this._subscriptionsAutoDisposedByRpc.has(n))this._subscriptionsAutoDisposedByRpc.delete(n);else{this._setSubscription(e,{...r,state:"unsubscribing"}),this._setSubscription(e,{...r,state:"unsubscribing"});try{await this._rpcWebSocket.call(i,[n])}catch(n){if(n instanceof Error&&console.error(`${i} error:`,n.message),!t())return;this._setSubscription(e,{...r,state:"subscribed"}),await this._updateSubscriptions();return}}this._setSubscription(e,{...r,state:"unsubscribed"}),await this._updateSubscriptions()})()}}))}_handleServerNotification(e,t){let r=this._subscriptionCallbacksByServerSubscriptionId[e];void 0!==r&&r.forEach(e=>{try{e(...t)}catch(e){console.error(e)}})}_wsOnAccountNotification(e){let{result:t,subscription:r}=tv(e,ib);this._handleServerNotification(r,[t.value,t.context])}_makeSubscription(e,t){let r=this._nextClientSubscriptionId++,n=nA([e.method,t]),i=this._subscriptionsByHash[n];return void 0===i?this._subscriptionsByHash[n]={...e,args:t,callbacks:new Set([e.callback]),state:"pending"}:i.callbacks.add(e.callback),this._subscriptionHashByClientSubscriptionId[r]=n,this._subscriptionDisposeFunctionsByClientSubscriptionId[r]=async()=>{delete this._subscriptionDisposeFunctionsByClientSubscriptionId[r],delete this._subscriptionHashByClientSubscriptionId[r];let t=this._subscriptionsByHash[n];rH(void 0!==t,`Could not find a \`Subscription\` when tearing down client subscription #${r}`),t.callbacks.delete(e.callback),await this._updateSubscriptions()},this._updateSubscriptions(),r}onAccountChange(e,t,r){let n=this._buildArgs([e.toBase58()],r||this._commitment||"finalized","base64");return this._makeSubscription({callback:t,method:"accountSubscribe",unsubscribeMethod:"accountUnsubscribe"},n)}async removeAccountChangeListener(e){await this._unsubscribeClientSubscription(e,"account change")}_wsOnProgramAccountNotification(e){let{result:t,subscription:r}=tv(e,ix);this._handleServerNotification(r,[{accountId:t.value.pubkey,accountInfo:t.value.account},t.context])}onProgramAccountChange(e,t,r,n){let i=this._buildArgs([e.toBase58()],r||this._commitment||"finalized","base64",n?{filters:n}:void 0);return this._makeSubscription({callback:t,method:"programSubscribe",unsubscribeMethod:"programUnsubscribe"},i)}async removeProgramAccountChangeListener(e){await this._unsubscribeClientSubscription(e,"program account change")}onLogs(e,t,r){let n=this._buildArgs(["object"==typeof e?{mentions:[e.toString()]}:e],r||this._commitment||"finalized");return this._makeSubscription({callback:t,method:"logsSubscribe",unsubscribeMethod:"logsUnsubscribe"},n)}async removeOnLogsListener(e){await this._unsubscribeClientSubscription(e,"logs")}_wsOnLogsNotification(e){let{result:t,subscription:r}=tv(e,on);this._handleServerNotification(r,[t.value,t.context])}_wsOnSlotNotification(e){let{result:t,subscription:r}=tv(e,ik);this._handleServerNotification(r,[t])}onSlotChange(e){return this._makeSubscription({callback:e,method:"slotSubscribe",unsubscribeMethod:"slotUnsubscribe"},[])}async removeSlotChangeListener(e){await this._unsubscribeClientSubscription(e,"slot change")}_wsOnSlotUpdatesNotification(e){let{result:t,subscription:r}=tv(e,iT);this._handleServerNotification(r,[t])}onSlotUpdate(e){return this._makeSubscription({callback:e,method:"slotsUpdatesSubscribe",unsubscribeMethod:"slotsUpdatesUnsubscribe"},[])}async removeSlotUpdateListener(e){await this._unsubscribeClientSubscription(e,"slot update")}async _unsubscribeClientSubscription(e,t){let r=this._subscriptionDisposeFunctionsByClientSubscriptionId[e];r?await r():console.warn(`Ignored unsubscribe request because an active subscription with id \`${e}\` for '${t}' events could not be found.`)}_buildArgs(e,t,r,n){let i=t||this._commitment;if(i||r||n){let t={};r&&(t.encoding=r),i&&(t.commitment=i),n&&(t=Object.assign(t,n)),e.push(t)}return e}_buildArgsAtLeastConfirmed(e,t,r,n){let i=t||this._commitment;if(i&&!["confirmed","finalized"].includes(i))throw Error("Using Connection with default commitment: `"+this._commitment+"`, but method requires at least `confirmed`");return this._buildArgs(e,t,r,n)}_wsOnSignatureNotification(e){let{result:t,subscription:r}=tv(e,iM);"receivedSignature"!==t.value&&this._subscriptionsAutoDisposedByRpc.add(r),this._handleServerNotification(r,"receivedSignature"===t.value?[{type:"received"},t.context]:[{type:"status",result:t.value},t.context])}onSignature(e,t,r){let n=this._buildArgs([e],r||this._commitment||"finalized"),i=this._makeSubscription({callback:(e,r)=>{if("status"===e.type){t(e.result,r);try{this.removeSignatureListener(i)}catch(e){}}},method:"signatureSubscribe",unsubscribeMethod:"signatureUnsubscribe"},n);return i}onSignatureWithOptions(e,t,r){let{commitment:n,...i}={...r,commitment:r&&r.commitment||this._commitment||"finalized"},o=this._buildArgs([e],n,void 0,i),s=this._makeSubscription({callback:(e,r)=>{t(e,r);try{this.removeSignatureListener(s)}catch(e){}},method:"signatureSubscribe",unsubscribeMethod:"signatureUnsubscribe"},o);return s}async removeSignatureListener(e){await this._unsubscribeClientSubscription(e,"signature result")}_wsOnRootNotification(e){let{result:t,subscription:r}=tv(e,iA);this._handleServerNotification(r,[t])}onRootChange(e){return this._makeSubscription({callback:e,method:"rootSubscribe",unsubscribeMethod:"rootUnsubscribe"},[])}async removeRootChangeListener(e){await this._unsubscribeClientSubscription(e,"root change")}}class os{constructor(e){this._keypair=void 0,this._keypair=e??rb()}static generate(){return new os(rb())}static fromSecretKey(e,t){if(64!==e.byteLength)throw Error("bad secret key size");let r=e.slice(32,64);if(!t||!t.skipValidation){let t=rw(e.slice(0,32));for(let e=0;e<32;e++)if(r[e]!==t[e])throw Error("provided secretKey is invalid")}return new os({publicKey:r,secretKey:e})}static fromSeed(e){let t=rw(e),r=new Uint8Array(64);return r.set(e),r.set(t,32),new os({publicKey:t,secretKey:r})}get publicKey(){return new rI(this._keypair.publicKey)}get secretKey(){return new Uint8Array(this._keypair.secretKey)}}let oa=Object.freeze({CreateLookupTable:{index:0,layout:tu.n_([tu.Jq("instruction"),ny("recentSlot"),tu.u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:tu.n_([tu.Jq("instruction")])},ExtendLookupTable:{index:2,layout:tu.n_([tu.Jq("instruction"),ny(),tu.A9(rz(),tu.cv(tu.Jq(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:tu.n_([tu.Jq("instruction")])},CloseLookupTable:{index:4,layout:tu.n_([tu.Jq("instruction")])}});class ol{constructor(){}static decodeInstructionType(e){let t;this.checkProgramId(e.programId);let r=tu.Jq("instruction").decode(e.data);for(let[e,n]of Object.entries(oa))if(n.index==r){t=e;break}if(!t)throw Error("Invalid Instruction. Should be a LookupTable Instruction");return t}static decodeCreateLookupTable(e){this.checkProgramId(e.programId),this.checkKeysLength(e.keys,4);let{recentSlot:t}=nd(oa.CreateLookupTable,e.data);return{authority:e.keys[1].pubkey,payer:e.keys[2].pubkey,recentSlot:Number(t)}}static decodeExtendLookupTable(e){if(this.checkProgramId(e.programId),e.keys.length<2)throw Error(`invalid instruction; found ${e.keys.length} keys, expected at least 2`);let{addresses:t}=nd(oa.ExtendLookupTable,e.data);return{lookupTable:e.keys[0].pubkey,authority:e.keys[1].pubkey,payer:e.keys.length>2?e.keys[2].pubkey:void 0,addresses:t.map(e=>new rI(e))}}static decodeCloseLookupTable(e){return this.checkProgramId(e.programId),this.checkKeysLength(e.keys,3),{lookupTable:e.keys[0].pubkey,authority:e.keys[1].pubkey,recipient:e.keys[2].pubkey}}static decodeFreezeLookupTable(e){return this.checkProgramId(e.programId),this.checkKeysLength(e.keys,2),{lookupTable:e.keys[0].pubkey,authority:e.keys[1].pubkey}}static decodeDeactivateLookupTable(e){return this.checkProgramId(e.programId),this.checkKeysLength(e.keys,2),{lookupTable:e.keys[0].pubkey,authority:e.keys[1].pubkey}}static checkProgramId(e){if(!e.equals(ou.programId))throw Error("invalid instruction; programId is not AddressLookupTable Program")}static checkKeysLength(e,t){if(e.length<t)throw Error(`invalid instruction; found ${e.length} keys, expected at least ${t}`)}}class ou{constructor(){}static createLookupTable(e){let[t,r]=rI.findProgramAddressSync([e.authority.toBuffer(),(0,tc.k$)(BigInt(e.recentSlot),8)],this.programId),n=nc(oa.CreateLookupTable,{recentSlot:BigInt(e.recentSlot),bumpSeed:r}),i=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1},{pubkey:e.payer,isSigner:!0,isWritable:!0},{pubkey:nw.programId,isSigner:!1,isWritable:!1}];return[new r2({programId:this.programId,keys:i,data:n}),t]}static freezeLookupTable(e){let t=nc(oa.FreezeLookupTable),r=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1}];return new r2({programId:this.programId,keys:r,data:t})}static extendLookupTable(e){let t=nc(oa.ExtendLookupTable,{addresses:e.addresses.map(e=>e.toBytes())}),r=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1}];return e.payer&&r.push({pubkey:e.payer,isSigner:!0,isWritable:!0},{pubkey:nw.programId,isSigner:!1,isWritable:!1}),new r2({programId:this.programId,keys:r,data:t})}static deactivateLookupTable(e){let t=nc(oa.DeactivateLookupTable),r=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1}];return new r2({programId:this.programId,keys:r,data:t})}static closeLookupTable(e){let t=nc(oa.CloseLookupTable),r=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1},{pubkey:e.recipient,isSigner:!1,isWritable:!0}];return new r2({programId:this.programId,keys:r,data:t})}}ou.programId=new rI("AddressLookupTab1e1111111111111111111111111");class oc{constructor(){}static decodeInstructionType(e){let t;this.checkProgramId(e.programId);let r=tu.u8("instruction").decode(e.data);for(let[e,n]of Object.entries(od))if(n.index==r){t=e;break}if(!t)throw Error("Instruction type incorrect; not a ComputeBudgetInstruction");return t}static decodeRequestUnits(e){this.checkProgramId(e.programId);let{units:t,additionalFee:r}=nd(od.RequestUnits,e.data);return{units:t,additionalFee:r}}static decodeRequestHeapFrame(e){this.checkProgramId(e.programId);let{bytes:t}=nd(od.RequestHeapFrame,e.data);return{bytes:t}}static decodeSetComputeUnitLimit(e){this.checkProgramId(e.programId);let{units:t}=nd(od.SetComputeUnitLimit,e.data);return{units:t}}static decodeSetComputeUnitPrice(e){this.checkProgramId(e.programId);let{microLamports:t}=nd(od.SetComputeUnitPrice,e.data);return{microLamports:t}}static checkProgramId(e){if(!e.equals(oh.programId))throw Error("invalid instruction; programId is not ComputeBudgetProgram")}}let od=Object.freeze({RequestUnits:{index:0,layout:tu.n_([tu.u8("instruction"),tu.Jq("units"),tu.Jq("additionalFee")])},RequestHeapFrame:{index:1,layout:tu.n_([tu.u8("instruction"),tu.Jq("bytes")])},SetComputeUnitLimit:{index:2,layout:tu.n_([tu.u8("instruction"),tu.Jq("units")])},SetComputeUnitPrice:{index:3,layout:tu.n_([tu.u8("instruction"),ny("microLamports")])}});class oh{constructor(){}static requestUnits(e){let t=nc(od.RequestUnits,e);return new r2({keys:[],programId:this.programId,data:t})}static requestHeapFrame(e){let t=nc(od.RequestHeapFrame,e);return new r2({keys:[],programId:this.programId,data:t})}static setComputeUnitLimit(e){let t=nc(od.SetComputeUnitLimit,e);return new r2({keys:[],programId:this.programId,data:t})}static setComputeUnitPrice(e){let t=nc(od.SetComputeUnitPrice,{microLamports:BigInt(e.microLamports)});return new r2({keys:[],programId:this.programId,data:t})}}oh.programId=new rI("ComputeBudget111111111111111111111111111111");let of=tu.n_([tu.u8("numSignatures"),tu.u8("padding"),tu.KB("signatureOffset"),tu.KB("signatureInstructionIndex"),tu.KB("publicKeyOffset"),tu.KB("publicKeyInstructionIndex"),tu.KB("messageDataOffset"),tu.KB("messageDataSize"),tu.KB("messageInstructionIndex")]);class op{constructor(){}static createInstructionWithPublicKey(e){let{publicKey:t,message:r,signature:n,instructionIndex:i}=e;rH(32===t.length,`Public Key must be 32 bytes but received ${t.length} bytes`),rH(64===n.length,`Signature must be 64 bytes but received ${n.length} bytes`);let o=of.span,a=o+t.length,l=a+n.length,u=s.Buffer.alloc(l+r.length),c=null==i?65535:i;return of.encode({numSignatures:1,padding:0,signatureOffset:a,signatureInstructionIndex:c,publicKeyOffset:o,publicKeyInstructionIndex:c,messageDataOffset:l,messageDataSize:r.length,messageInstructionIndex:c},u),u.fill(t,o),u.fill(n,a),u.fill(r,l),new r2({keys:[],programId:op.programId,data:u})}static createInstructionWithPrivateKey(e){let{privateKey:t,message:r,instructionIndex:n}=e;rH(64===t.length,`Private key must be 64 bytes but received ${t.length} bytes`);try{let e=os.fromSecretKey(t),i=e.publicKey.toBytes(),o=rE(r,e.secretKey);return this.createInstructionWithPublicKey({publicKey:i,message:r,signature:o,instructionIndex:n})}catch(e){throw Error(`Error creating instruction; ${e}`)}}}op.programId=new rI("Ed25519SigVerify111111111111111111111111111");let og=(e,t)=>{let r=ry.sign(e,t);return[r.toCompactRawBytes(),r.recovery]};ry.utils.isValidPrivateKey;let om=ry.getPublicKey,oy=tu.n_([tu.u8("numSignatures"),tu.KB("signatureOffset"),tu.u8("signatureInstructionIndex"),tu.KB("ethAddressOffset"),tu.u8("ethAddressInstructionIndex"),tu.KB("messageDataOffset"),tu.KB("messageDataSize"),tu.u8("messageInstructionIndex"),tu.Ik(20,"ethAddress"),tu.Ik(64,"signature"),tu.u8("recoveryId")]);class ov{constructor(){}static publicKeyToEthAddress(e){rH(64===e.length,`Public key must be 64 bytes but received ${e.length} bytes`);try{return s.Buffer.from(t8(rS(e))).slice(-20)}catch(e){throw Error(`Error constructing Ethereum address: ${e}`)}}static createInstructionWithPublicKey(e){let{publicKey:t,message:r,signature:n,recoveryId:i,instructionIndex:o}=e;return ov.createInstructionWithEthAddress({ethAddress:ov.publicKeyToEthAddress(t),message:r,signature:n,recoveryId:i,instructionIndex:o})}static createInstructionWithEthAddress(e){let t;let{ethAddress:r,message:n,signature:i,recoveryId:o,instructionIndex:a=0}=e;rH(20===(t="string"==typeof r?r.startsWith("0x")?s.Buffer.from(r.substr(2),"hex"):s.Buffer.from(r,"hex"):r).length,`Address must be 20 bytes but received ${t.length} bytes`);let l=12+t.length,u=l+i.length+1,c=s.Buffer.alloc(oy.span+n.length);return oy.encode({numSignatures:1,signatureOffset:l,signatureInstructionIndex:a,ethAddressOffset:12,ethAddressInstructionIndex:a,messageDataOffset:u,messageDataSize:n.length,messageInstructionIndex:a,signature:rS(i),ethAddress:rS(t),recoveryId:o},c),c.fill(rS(n),oy.span),new r2({keys:[],programId:ov.programId,data:c})}static createInstructionWithPrivateKey(e){let{privateKey:t,message:r,instructionIndex:n}=e;rH(32===t.length,`Private key must be 32 bytes but received ${t.length} bytes`);try{let e=rS(t),i=om(e,!1).slice(1),o=s.Buffer.from(t8(rS(r))),[a,l]=og(o,e);return this.createInstructionWithPublicKey({publicKey:i,message:r,signature:a,recoveryId:l,instructionIndex:n})}catch(e){throw Error(`Error creating instruction; ${e}`)}}}ov.programId=new rI("KeccakSecp256k11111111111111111111111111111");let ob=new rI("StakeConfig11111111111111111111111111111111");class ow{constructor(e,t){this.staker=void 0,this.withdrawer=void 0,this.staker=e,this.withdrawer=t}}class ox{constructor(e,t,r){this.unixTimestamp=void 0,this.epoch=void 0,this.custodian=void 0,this.unixTimestamp=e,this.epoch=t,this.custodian=r}}ox.default=new ox(0,0,rI.default);class oE{constructor(){}static decodeInstructionType(e){let t;this.checkProgramId(e.programId);let r=tu.Jq("instruction").decode(e.data);for(let[e,n]of Object.entries(ok))if(n.index==r){t=e;break}if(!t)throw Error("Instruction type incorrect; not a StakeInstruction");return t}static decodeInitialize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);let{authorized:t,lockup:r}=nd(ok.Initialize,e.data);return{stakePubkey:e.keys[0].pubkey,authorized:new ow(new rI(t.staker),new rI(t.withdrawer)),lockup:new ox(r.unixTimestamp,r.epoch,new rI(r.custodian))}}static decodeDelegate(e){return this.checkProgramId(e.programId),this.checkKeyLength(e.keys,6),nd(ok.Delegate,e.data),{stakePubkey:e.keys[0].pubkey,votePubkey:e.keys[1].pubkey,authorizedPubkey:e.keys[5].pubkey}}static decodeAuthorize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);let{newAuthorized:t,stakeAuthorizationType:r}=nd(ok.Authorize,e.data),n={stakePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[2].pubkey,newAuthorizedPubkey:new rI(t),stakeAuthorizationType:{index:r}};return e.keys.length>3&&(n.custodianPubkey=e.keys[3].pubkey),n}static decodeAuthorizeWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);let{newAuthorized:t,stakeAuthorizationType:r,authoritySeed:n,authorityOwner:i}=nd(ok.AuthorizeWithSeed,e.data),o={stakePubkey:e.keys[0].pubkey,authorityBase:e.keys[1].pubkey,authoritySeed:n,authorityOwner:new rI(i),newAuthorizedPubkey:new rI(t),stakeAuthorizationType:{index:r}};return e.keys.length>3&&(o.custodianPubkey=e.keys[3].pubkey),o}static decodeSplit(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);let{lamports:t}=nd(ok.Split,e.data);return{stakePubkey:e.keys[0].pubkey,splitStakePubkey:e.keys[1].pubkey,authorizedPubkey:e.keys[2].pubkey,lamports:t}}static decodeMerge(e){return this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3),nd(ok.Merge,e.data),{stakePubkey:e.keys[0].pubkey,sourceStakePubKey:e.keys[1].pubkey,authorizedPubkey:e.keys[4].pubkey}}static decodeWithdraw(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,5);let{lamports:t}=nd(ok.Withdraw,e.data),r={stakePubkey:e.keys[0].pubkey,toPubkey:e.keys[1].pubkey,authorizedPubkey:e.keys[4].pubkey,lamports:t};return e.keys.length>5&&(r.custodianPubkey=e.keys[5].pubkey),r}static decodeDeactivate(e){return this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3),nd(ok.Deactivate,e.data),{stakePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[2].pubkey}}static checkProgramId(e){if(!e.equals(oT.programId))throw Error("invalid instruction; programId is not StakeProgram")}static checkKeyLength(e,t){if(e.length<t)throw Error(`invalid instruction; found ${e.length} keys, expected at least ${t}`)}}let ok=Object.freeze({Initialize:{index:0,layout:tu.n_([tu.Jq("instruction"),((e="authorized")=>tu.n_([rz("staker"),rz("withdrawer")],e))(),((e="lockup")=>tu.n_([tu.gM("unixTimestamp"),tu.gM("epoch"),rz("custodian")],e))()])},Authorize:{index:1,layout:tu.n_([tu.Jq("instruction"),rz("newAuthorized"),tu.Jq("stakeAuthorizationType")])},Delegate:{index:2,layout:tu.n_([tu.Jq("instruction")])},Split:{index:3,layout:tu.n_([tu.Jq("instruction"),tu.gM("lamports")])},Withdraw:{index:4,layout:tu.n_([tu.Jq("instruction"),tu.gM("lamports")])},Deactivate:{index:5,layout:tu.n_([tu.Jq("instruction")])},Merge:{index:7,layout:tu.n_([tu.Jq("instruction")])},AuthorizeWithSeed:{index:8,layout:tu.n_([tu.Jq("instruction"),rz("newAuthorized"),tu.Jq("stakeAuthorizationType"),rW("authoritySeed"),rz("authorityOwner")])}}),oS=Object.freeze({Staker:{index:0},Withdrawer:{index:1}});class oT{constructor(){}static initialize(e){let{stakePubkey:t,authorized:r,lockup:n}=e,i=n||ox.default,o=nc(ok.Initialize,{authorized:{staker:rS(r.staker.toBuffer()),withdrawer:rS(r.withdrawer.toBuffer())},lockup:{unixTimestamp:i.unixTimestamp,epoch:i.epoch,custodian:rS(i.custodian.toBuffer())}});return new r2({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:ne,isSigner:!1,isWritable:!1}],programId:this.programId,data:o})}static createAccountWithSeed(e){let t=new r5;t.add(nw.createAccountWithSeed({fromPubkey:e.fromPubkey,newAccountPubkey:e.stakePubkey,basePubkey:e.basePubkey,seed:e.seed,lamports:e.lamports,space:this.space,programId:this.programId}));let{stakePubkey:r,authorized:n,lockup:i}=e;return t.add(this.initialize({stakePubkey:r,authorized:n,lockup:i}))}static createAccount(e){let t=new r5;t.add(nw.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.stakePubkey,lamports:e.lamports,space:this.space,programId:this.programId}));let{stakePubkey:r,authorized:n,lockup:i}=e;return t.add(this.initialize({stakePubkey:r,authorized:n,lockup:i}))}static delegate(e){let{stakePubkey:t,authorizedPubkey:r,votePubkey:n}=e,i=nc(ok.Delegate);return new r5().add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!1},{pubkey:r4,isSigner:!1,isWritable:!1},{pubkey:ni,isSigner:!1,isWritable:!1},{pubkey:ob,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:i})}static authorize(e){let{stakePubkey:t,authorizedPubkey:r,newAuthorizedPubkey:n,stakeAuthorizationType:i,custodianPubkey:o}=e,s=nc(ok.Authorize,{newAuthorized:rS(n.toBuffer()),stakeAuthorizationType:i.index}),a=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r4,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1}];return o&&a.push({pubkey:o,isSigner:!0,isWritable:!1}),new r5().add({keys:a,programId:this.programId,data:s})}static authorizeWithSeed(e){let{stakePubkey:t,authorityBase:r,authoritySeed:n,authorityOwner:i,newAuthorizedPubkey:o,stakeAuthorizationType:s,custodianPubkey:a}=e,l=nc(ok.AuthorizeWithSeed,{newAuthorized:rS(o.toBuffer()),stakeAuthorizationType:s.index,authoritySeed:n,authorityOwner:rS(i.toBuffer())}),u=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1},{pubkey:r4,isSigner:!1,isWritable:!1}];return a&&u.push({pubkey:a,isSigner:!0,isWritable:!1}),new r5().add({keys:u,programId:this.programId,data:l})}static splitInstruction(e){let{stakePubkey:t,authorizedPubkey:r,splitStakePubkey:n,lamports:i}=e,o=nc(ok.Split,{lamports:i});return new r2({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:o})}static split(e,t){let r=new r5;return r.add(nw.createAccount({fromPubkey:e.authorizedPubkey,newAccountPubkey:e.splitStakePubkey,lamports:t,space:this.space,programId:this.programId})),r.add(this.splitInstruction(e))}static splitWithSeed(e,t){let{stakePubkey:r,authorizedPubkey:n,splitStakePubkey:i,basePubkey:o,seed:s,lamports:a}=e,l=new r5;return l.add(nw.allocate({accountPubkey:i,basePubkey:o,seed:s,space:this.space,programId:this.programId})),t&&t>0&&l.add(nw.transfer({fromPubkey:e.authorizedPubkey,toPubkey:i,lamports:t})),l.add(this.splitInstruction({stakePubkey:r,authorizedPubkey:n,splitStakePubkey:i,lamports:a}))}static merge(e){let{stakePubkey:t,sourceStakePubKey:r,authorizedPubkey:n}=e,i=nc(ok.Merge);return new r5().add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:r4,isSigner:!1,isWritable:!1},{pubkey:ni,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}],programId:this.programId,data:i})}static withdraw(e){let{stakePubkey:t,authorizedPubkey:r,toPubkey:n,lamports:i,custodianPubkey:o}=e,s=nc(ok.Withdraw,{lamports:i}),a=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:r4,isSigner:!1,isWritable:!1},{pubkey:ni,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}];return o&&a.push({pubkey:o,isSigner:!0,isWritable:!1}),new r5().add({keys:a,programId:this.programId,data:s})}static deactivate(e){let{stakePubkey:t,authorizedPubkey:r}=e,n=nc(ok.Deactivate);return new r5().add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r4,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:n})}}oT.programId=new rI("Stake11111111111111111111111111111111111111"),oT.space=200;class oM{constructor(e,t,r,n){this.nodePubkey=void 0,this.authorizedVoter=void 0,this.authorizedWithdrawer=void 0,this.commission=void 0,this.nodePubkey=e,this.authorizedVoter=t,this.authorizedWithdrawer=r,this.commission=n}}class oA{constructor(){}static decodeInstructionType(e){let t;this.checkProgramId(e.programId);let r=tu.Jq("instruction").decode(e.data);for(let[e,n]of Object.entries(oP))if(n.index==r){t=e;break}if(!t)throw Error("Instruction type incorrect; not a VoteInstruction");return t}static decodeInitializeAccount(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,4);let{voteInit:t}=nd(oP.InitializeAccount,e.data);return{votePubkey:e.keys[0].pubkey,nodePubkey:e.keys[3].pubkey,voteInit:new oM(new rI(t.nodePubkey),new rI(t.authorizedVoter),new rI(t.authorizedWithdrawer),t.commission)}}static decodeAuthorize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);let{newAuthorized:t,voteAuthorizationType:r}=nd(oP.Authorize,e.data);return{votePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[2].pubkey,newAuthorizedPubkey:new rI(t),voteAuthorizationType:{index:r}}}static decodeAuthorizeWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);let{voteAuthorizeWithSeedArgs:{currentAuthorityDerivedKeyOwnerPubkey:t,currentAuthorityDerivedKeySeed:r,newAuthorized:n,voteAuthorizationType:i}}=nd(oP.AuthorizeWithSeed,e.data);return{currentAuthorityDerivedKeyBasePubkey:e.keys[2].pubkey,currentAuthorityDerivedKeyOwnerPubkey:new rI(t),currentAuthorityDerivedKeySeed:r,newAuthorizedPubkey:new rI(n),voteAuthorizationType:{index:i},votePubkey:e.keys[0].pubkey}}static decodeWithdraw(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);let{lamports:t}=nd(oP.Withdraw,e.data);return{votePubkey:e.keys[0].pubkey,authorizedWithdrawerPubkey:e.keys[2].pubkey,lamports:t,toPubkey:e.keys[1].pubkey}}static checkProgramId(e){if(!e.equals(o_.programId))throw Error("invalid instruction; programId is not VoteProgram")}static checkKeyLength(e,t){if(e.length<t)throw Error(`invalid instruction; found ${e.length} keys, expected at least ${t}`)}}let oP=Object.freeze({InitializeAccount:{index:0,layout:tu.n_([tu.Jq("instruction"),((e="voteInit")=>tu.n_([rz("nodePubkey"),rz("authorizedVoter"),rz("authorizedWithdrawer"),tu.u8("commission")],e))()])},Authorize:{index:1,layout:tu.n_([tu.Jq("instruction"),rz("newAuthorized"),tu.Jq("voteAuthorizationType")])},Withdraw:{index:3,layout:tu.n_([tu.Jq("instruction"),tu.gM("lamports")])},UpdateValidatorIdentity:{index:4,layout:tu.n_([tu.Jq("instruction")])},AuthorizeWithSeed:{index:10,layout:tu.n_([tu.Jq("instruction"),((e="voteAuthorizeWithSeedArgs")=>tu.n_([tu.Jq("voteAuthorizationType"),rz("currentAuthorityDerivedKeyOwnerPubkey"),rW("currentAuthorityDerivedKeySeed"),rz("newAuthorized")],e))()])}}),oC=Object.freeze({Voter:{index:0},Withdrawer:{index:1}});class o_{constructor(){}static initializeAccount(e){let{votePubkey:t,nodePubkey:r,voteInit:n}=e,i=nc(oP.InitializeAccount,{voteInit:{nodePubkey:rS(n.nodePubkey.toBuffer()),authorizedVoter:rS(n.authorizedVoter.toBuffer()),authorizedWithdrawer:rS(n.authorizedWithdrawer.toBuffer()),commission:n.commission}});return new r2({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:ne,isSigner:!1,isWritable:!1},{pubkey:r4,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:i})}static createAccount(e){let t=new r5;return t.add(nw.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.votePubkey,lamports:e.lamports,space:this.space,programId:this.programId})),t.add(this.initializeAccount({votePubkey:e.votePubkey,nodePubkey:e.voteInit.nodePubkey,voteInit:e.voteInit}))}static authorize(e){let{votePubkey:t,authorizedPubkey:r,newAuthorizedPubkey:n,voteAuthorizationType:i}=e,o=nc(oP.Authorize,{newAuthorized:rS(n.toBuffer()),voteAuthorizationType:i.index});return new r5().add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r4,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:o})}static authorizeWithSeed(e){let{currentAuthorityDerivedKeyBasePubkey:t,currentAuthorityDerivedKeyOwnerPubkey:r,currentAuthorityDerivedKeySeed:n,newAuthorizedPubkey:i,voteAuthorizationType:o,votePubkey:s}=e,a=nc(oP.AuthorizeWithSeed,{voteAuthorizeWithSeedArgs:{currentAuthorityDerivedKeyOwnerPubkey:rS(r.toBuffer()),currentAuthorityDerivedKeySeed:n,newAuthorized:rS(i.toBuffer()),voteAuthorizationType:o.index}});return new r5().add({keys:[{pubkey:s,isSigner:!1,isWritable:!0},{pubkey:r4,isSigner:!1,isWritable:!1},{pubkey:t,isSigner:!0,isWritable:!1}],programId:this.programId,data:a})}static withdraw(e){let{votePubkey:t,authorizedWithdrawerPubkey:r,lamports:n,toPubkey:i}=e,o=nc(oP.Withdraw,{lamports:n});return new r5().add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:o})}static safeWithdraw(e,t,r){if(e.lamports>t-r)throw Error("Withdraw will leave vote account with insufficient funds.");return o_.withdraw(e)}static updateValidatorIdentity(e){let{votePubkey:t,authorizedWithdrawerPubkey:r,nodePubkey:n}=e,i=nc(oP.UpdateValidatorIdentity);return new r5().add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!0,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:i})}}o_.programId=new rI("Vote111111111111111111111111111111111111111"),o_.space=3762;let oI=new rI("Va1idator1nfo111111111111111111111111111111"),oO=tI({name:tC(),website:tA(tC()),details:tA(tC()),keybaseUsername:tA(tC())});class oL{constructor(e,t){this.key=void 0,this.info=void 0,this.key=e,this.info=t}static fromConfigData(e){let t=[...e];if(2!==rV(t))return null;let r=[];for(let e=0;e<2;e++){let e=new rI(rJ(t,0,rC)),n=1===rG(t);r.push({publicKey:e,isSigner:n})}if(r[0].publicKey.equals(oI)&&r[1].isSigner){let e=JSON.parse(rW().decode(s.Buffer.from(t)));return ty(e,oO),new oL(r[1].publicKey,e)}return null}}let oR=new rI("Vote111111111111111111111111111111111111111"),oj=tu.n_([rz("nodePubkey"),rz("authorizedWithdrawer"),tu.u8("commission"),tu._O(),tu.A9(tu.n_([tu._O("slot"),tu.Jq("confirmationCount")]),tu.cv(tu.Jq(),-8),"votes"),tu.u8("rootSlotValid"),tu._O("rootSlot"),tu._O(),tu.A9(tu.n_([tu._O("epoch"),rz("authorizedVoter")]),tu.cv(tu.Jq(),-8),"authorizedVoters"),tu.n_([tu.A9(tu.n_([rz("authorizedPubkey"),tu._O("epochOfLastAuthorizedSwitch"),tu._O("targetEpoch")]),32,"buf"),tu._O("idx"),tu.u8("isEmpty")],"priorVoters"),tu._O(),tu.A9(tu.n_([tu._O("epoch"),tu._O("credits"),tu._O("prevCredits")]),tu.cv(tu.Jq(),-8),"epochCredits"),tu.n_([tu._O("slot"),tu._O("timestamp")],"lastTimestamp")]);class oB{constructor(e){this.nodePubkey=void 0,this.authorizedWithdrawer=void 0,this.commission=void 0,this.rootSlot=void 0,this.votes=void 0,this.authorizedVoters=void 0,this.priorVoters=void 0,this.epochCredits=void 0,this.lastTimestamp=void 0,this.nodePubkey=e.nodePubkey,this.authorizedWithdrawer=e.authorizedWithdrawer,this.commission=e.commission,this.rootSlot=e.rootSlot,this.votes=e.votes,this.authorizedVoters=e.authorizedVoters,this.priorVoters=e.priorVoters,this.epochCredits=e.epochCredits,this.lastTimestamp=e.lastTimestamp}static fromAccountData(e){let t=oj.decode(rS(e),4),r=t.rootSlot;return t.rootSlotValid||(r=null),new oB({nodePubkey:new rI(t.nodePubkey),authorizedWithdrawer:new rI(t.authorizedWithdrawer),commission:t.commission,votes:t.votes,rootSlot:r,authorizedVoters:t.authorizedVoters.map(oN),priorVoters:function({buf:e,idx:t,isEmpty:r}){return r?[]:[...e.slice(t+1).map(oD),...e.slice(0,t).map(oD)]}(t.priorVoters),epochCredits:t.epochCredits,lastTimestamp:t.lastTimestamp})}}function oN({authorizedVoter:e,epoch:t}){return{epoch:t,authorizedVoter:new rI(e)}}function oD({authorizedPubkey:e,epochOfLastAuthorizedSwitch:t,targetEpoch:r}){return{authorizedPubkey:new rI(e),epochOfLastAuthorizedSwitch:t,targetEpoch:r}}let oK={http:{devnet:"http://api.devnet.solana.com",testnet:"http://api.testnet.solana.com","mainnet-beta":"http://api.mainnet-beta.solana.com/"},https:{devnet:"https://api.devnet.solana.com",testnet:"https://api.testnet.solana.com","mainnet-beta":"https://api.mainnet-beta.solana.com/"}};function oU(e,t){let r=!1===t?"http":"https";if(!e)return oK[r].devnet;let n=oK[r][e];if(!n)throw Error(`Unknown ${r} cluster: ${e}`);return n}async function oz(e,t,r,n){let i,o;r&&Object.prototype.hasOwnProperty.call(r,"lastValidBlockHeight")?(i=r,o=n):r&&Object.prototype.hasOwnProperty.call(r,"nonceValue")?(i=r,o=n):o=r;let s=o&&{skipPreflight:o.skipPreflight,preflightCommitment:o.preflightCommitment||o.commitment,minContextSlot:o.minContextSlot},a=await e.sendRawTransaction(t,s),l=o&&o.commitment,u=i?e.confirmTransaction(i,l):e.confirmTransaction(a,l),c=(await u).value;if(c.err){if(null!=a)throw new no({action:s?.skipPreflight?"send":"simulate",signature:a,transactionMessage:`Status: (${JSON.stringify(c)})`});throw Error(`Raw transaction ${a} failed (${JSON.stringify(c)})`)}return a}let oF=1e9},13384:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&(("le"===t||"be"===t)&&(r=t,t=10),this._init(e||0,t||10,r||"be"))}"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{d="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(11922).Buffer}catch(e){}function s(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function a(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function l(e,t,r,i){for(var o=0,s=0,a=Math.min(e.length,r),l=t;l<a;l++){var u=e.charCodeAt(l)-48;o*=i,s=u>=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&s<i,"Invalid character"),o+=s}return o}function u(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return 0>e.cmp(t)?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=Array(this.length);for(var i,o,s=0;s<this.length;s++)this.words[s]=0;var a=0;if("be"===r)for(s=e.length-1,i=0;s>=0;s-=3)o=e[s]|e[s-1]<<8|e[s-2]<<16,this.words[i]|=o<<a&67108863,this.words[i+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);else if("le"===r)for(s=0,i=0;s<e.length;s+=3)o=e[s]|e[s+1]<<8|e[s+2]<<16,this.words[i]|=o<<a&67108863,this.words[i+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=Array(this.length);for(var n,i=0;i<this.length;i++)this.words[i]=0;var o=0,s=0;if("be"===r)for(i=e.length-1;i>=t;i-=2)n=a(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i<e.length;i+=2)n=a(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,c=r;c<a;c+=n)u=l(e,c,c+n,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var d=1;for(u=l(e,c,e.length,t),c=0;c<s;c++)d*=t;this.imuln(d),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},o.prototype.copy=function(e){e.words=Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){u(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=c}catch(e){o.prototype.inspect=c}else o.prototype.inspect=c;function c(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d,h=["","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"],f=[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];function g(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,l=s/67108864|0;r.words[0]=a;for(var u=1;u<n;u++){for(var c=l>>>26,d=67108863&l,h=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=h;f++){var p=u-f|0;c+=(s=(i=0|e.words[p])*(o=0|t.words[f])+d)/67108864|0,d=67108863&s}r.words[u]=0|d,l=0|c}return 0!==l?r.words[u]=0|l:r.length--,r._strip()}o.prototype.toString=function(e,t){if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var r,i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],l=((a<<i|o)&16777215).toString(16);o=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?h[6-l.length]+l+r:l+r}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=f[e],c=p[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var g=d.modrn(c).toString(e);r=(d=d.idivn(c)).isZero()?g+r:h[u-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},d&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(d,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=e.allocUnsafe?e.allocUnsafe(o):new e(o);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;e[r++]=255&s,r<e.length&&(e[r++]=s>>8&255),r<e.length&&(e[r++]=s>>16&255),6===o?(r<e.length&&(e[r++]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;e[r--]=255&s,r>=0&&(e[r--]=s>>8&255),r>=0&&(e[r--]=s>>16&255),6===o?(r>=0&&(e[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return(8191&t)==0&&(r+=13,t>>>=13),(127&t)==0&&(r+=7,t>>>=7),(15&t)==0&&(r+=4,t>>>=4),(3&t)==0&&(r+=2,t>>>=2),(1&t)==0&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return n((this.negative|e.negative)==0),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return n((this.negative|e.negative)==0),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){this.length>e.length?(t=this,r=e):(t=e,r=this);for(var t,r,n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return n((this.negative|e.negative)==0),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),t?this.words[r]=this.words[r]|1<<i:this.words[r]=this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(e){if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var t,r,n,i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t,r,n=this.iadd(e);return e.negative=1,n._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(t=this,r=e):(t=e,r=this);for(var o=0,s=0;s<r.length;s++)o=(n=(0|t.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&n;for(;0!==o&&s<t.length;s++)o=(n=(0|t.words[s])+o)>>26,this.words[s]=67108863&n;if(0===o&&s<t.length&&t!==this)for(;s<t.length;s++)this.words[s]=t.words[s];return this.length=Math.max(this.length,s),t!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,r){var n,i,o,s=e.words,a=t.words,l=r.words,u=0,c=0|s[0],d=8191&c,h=c>>>13,f=0|s[1],p=8191&f,g=f>>>13,m=0|s[2],y=8191&m,v=m>>>13,b=0|s[3],w=8191&b,x=b>>>13,E=0|s[4],k=8191&E,S=E>>>13,T=0|s[5],M=8191&T,A=T>>>13,P=0|s[6],C=8191&P,_=P>>>13,I=0|s[7],O=8191&I,L=I>>>13,R=0|s[8],j=8191&R,B=R>>>13,N=0|s[9],D=8191&N,K=N>>>13,U=0|a[0],z=8191&U,F=U>>>13,W=0|a[1],V=8191&W,$=W>>>13,H=0|a[2],q=8191&H,Z=H>>>13,G=0|a[3],J=8191&G,Y=G>>>13,X=0|a[4],Q=8191&X,ee=X>>>13,et=0|a[5],er=8191&et,en=et>>>13,ei=0|a[6],eo=8191&ei,es=ei>>>13,ea=0|a[7],el=8191&ea,eu=ea>>>13,ec=0|a[8],ed=8191&ec,eh=ec>>>13,ef=0|a[9],ep=8191&ef,eg=ef>>>13;r.negative=e.negative^t.negative,r.length=19;var em=(u+(n=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,F))+Math.imul(h,z)|0))<<13)|0;u=((o=Math.imul(h,F))+(i>>>13)|0)+(em>>>26)|0,em&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,F))+Math.imul(g,z)|0,o=Math.imul(g,F);var ey=(u+(n=n+Math.imul(d,V)|0)|0)+((8191&(i=(i=i+Math.imul(d,$)|0)+Math.imul(h,V)|0))<<13)|0;u=((o=o+Math.imul(h,$)|0)+(i>>>13)|0)+(ey>>>26)|0,ey&=67108863,n=Math.imul(y,z),i=(i=Math.imul(y,F))+Math.imul(v,z)|0,o=Math.imul(v,F),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,$)|0;var ev=(u+(n=n+Math.imul(d,q)|0)|0)+((8191&(i=(i=i+Math.imul(d,Z)|0)+Math.imul(h,q)|0))<<13)|0;u=((o=o+Math.imul(h,Z)|0)+(i>>>13)|0)+(ev>>>26)|0,ev&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,F))+Math.imul(x,z)|0,o=Math.imul(x,F),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,$)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,$)|0,n=n+Math.imul(p,q)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(g,q)|0,o=o+Math.imul(g,Z)|0;var eb=(u+(n=n+Math.imul(d,J)|0)|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(h,J)|0))<<13)|0;u=((o=o+Math.imul(h,Y)|0)+(i>>>13)|0)+(eb>>>26)|0,eb&=67108863,n=Math.imul(k,z),i=(i=Math.imul(k,F))+Math.imul(S,z)|0,o=Math.imul(S,F),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(x,V)|0,o=o+Math.imul(x,$)|0,n=n+Math.imul(y,q)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(v,q)|0,o=o+Math.imul(v,Z)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(g,J)|0,o=o+Math.imul(g,Y)|0;var ew=(u+(n=n+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(h,Q)|0))<<13)|0;u=((o=o+Math.imul(h,ee)|0)+(i>>>13)|0)+(ew>>>26)|0,ew&=67108863,n=Math.imul(M,z),i=(i=Math.imul(M,F))+Math.imul(A,z)|0,o=Math.imul(A,F),n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,$)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,$)|0,n=n+Math.imul(w,q)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(x,q)|0,o=o+Math.imul(x,Z)|0,n=n+Math.imul(y,J)|0,i=(i=i+Math.imul(y,Y)|0)+Math.imul(v,J)|0,o=o+Math.imul(v,Y)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,ee)|0;var ex=(u+(n=n+Math.imul(d,er)|0)|0)+((8191&(i=(i=i+Math.imul(d,en)|0)+Math.imul(h,er)|0))<<13)|0;u=((o=o+Math.imul(h,en)|0)+(i>>>13)|0)+(ex>>>26)|0,ex&=67108863,n=Math.imul(C,z),i=(i=Math.imul(C,F))+Math.imul(_,z)|0,o=Math.imul(_,F),n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,$)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(k,q)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(S,q)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(x,J)|0,o=o+Math.imul(x,Y)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,ee)|0,n=n+Math.imul(p,er)|0,i=(i=i+Math.imul(p,en)|0)+Math.imul(g,er)|0,o=o+Math.imul(g,en)|0;var eE=(u+(n=n+Math.imul(d,eo)|0)|0)+((8191&(i=(i=i+Math.imul(d,es)|0)+Math.imul(h,eo)|0))<<13)|0;u=((o=o+Math.imul(h,es)|0)+(i>>>13)|0)+(eE>>>26)|0,eE&=67108863,n=Math.imul(O,z),i=(i=Math.imul(O,F))+Math.imul(L,z)|0,o=Math.imul(L,F),n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,$)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,$)|0,n=n+Math.imul(M,q)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(k,J)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(S,J)|0,o=o+Math.imul(S,Y)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(y,er)|0,i=(i=i+Math.imul(y,en)|0)+Math.imul(v,er)|0,o=o+Math.imul(v,en)|0,n=n+Math.imul(p,eo)|0,i=(i=i+Math.imul(p,es)|0)+Math.imul(g,eo)|0,o=o+Math.imul(g,es)|0;var ek=(u+(n=n+Math.imul(d,el)|0)|0)+((8191&(i=(i=i+Math.imul(d,eu)|0)+Math.imul(h,el)|0))<<13)|0;u=((o=o+Math.imul(h,eu)|0)+(i>>>13)|0)+(ek>>>26)|0,ek&=67108863,n=Math.imul(j,z),i=(i=Math.imul(j,F))+Math.imul(B,z)|0,o=Math.imul(B,F),n=n+Math.imul(O,V)|0,i=(i=i+Math.imul(O,$)|0)+Math.imul(L,V)|0,o=o+Math.imul(L,$)|0,n=n+Math.imul(C,q)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(M,J)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,Y)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,ee)|0,n=n+Math.imul(w,er)|0,i=(i=i+Math.imul(w,en)|0)+Math.imul(x,er)|0,o=o+Math.imul(x,en)|0,n=n+Math.imul(y,eo)|0,i=(i=i+Math.imul(y,es)|0)+Math.imul(v,eo)|0,o=o+Math.imul(v,es)|0,n=n+Math.imul(p,el)|0,i=(i=i+Math.imul(p,eu)|0)+Math.imul(g,el)|0,o=o+Math.imul(g,eu)|0;var eS=(u+(n=n+Math.imul(d,ed)|0)|0)+((8191&(i=(i=i+Math.imul(d,eh)|0)+Math.imul(h,ed)|0))<<13)|0;u=((o=o+Math.imul(h,eh)|0)+(i>>>13)|0)+(eS>>>26)|0,eS&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,F))+Math.imul(K,z)|0,o=Math.imul(K,F),n=n+Math.imul(j,V)|0,i=(i=i+Math.imul(j,$)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,$)|0,n=n+Math.imul(O,q)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(L,q)|0,o=o+Math.imul(L,Z)|0,n=n+Math.imul(C,J)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(k,er)|0,i=(i=i+Math.imul(k,en)|0)+Math.imul(S,er)|0,o=o+Math.imul(S,en)|0,n=n+Math.imul(w,eo)|0,i=(i=i+Math.imul(w,es)|0)+Math.imul(x,eo)|0,o=o+Math.imul(x,es)|0,n=n+Math.imul(y,el)|0,i=(i=i+Math.imul(y,eu)|0)+Math.imul(v,el)|0,o=o+Math.imul(v,eu)|0,n=n+Math.imul(p,ed)|0,i=(i=i+Math.imul(p,eh)|0)+Math.imul(g,ed)|0,o=o+Math.imul(g,eh)|0;var eT=(u+(n=n+Math.imul(d,ep)|0)|0)+((8191&(i=(i=i+Math.imul(d,eg)|0)+Math.imul(h,ep)|0))<<13)|0;u=((o=o+Math.imul(h,eg)|0)+(i>>>13)|0)+(eT>>>26)|0,eT&=67108863,n=Math.imul(D,V),i=(i=Math.imul(D,$))+Math.imul(K,V)|0,o=Math.imul(K,$),n=n+Math.imul(j,q)|0,i=(i=i+Math.imul(j,Z)|0)+Math.imul(B,q)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(O,J)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(L,J)|0,o=o+Math.imul(L,Y)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(M,er)|0,i=(i=i+Math.imul(M,en)|0)+Math.imul(A,er)|0,o=o+Math.imul(A,en)|0,n=n+Math.imul(k,eo)|0,i=(i=i+Math.imul(k,es)|0)+Math.imul(S,eo)|0,o=o+Math.imul(S,es)|0,n=n+Math.imul(w,el)|0,i=(i=i+Math.imul(w,eu)|0)+Math.imul(x,el)|0,o=o+Math.imul(x,eu)|0,n=n+Math.imul(y,ed)|0,i=(i=i+Math.imul(y,eh)|0)+Math.imul(v,ed)|0,o=o+Math.imul(v,eh)|0;var eM=(u+(n=n+Math.imul(p,ep)|0)|0)+((8191&(i=(i=i+Math.imul(p,eg)|0)+Math.imul(g,ep)|0))<<13)|0;u=((o=o+Math.imul(g,eg)|0)+(i>>>13)|0)+(eM>>>26)|0,eM&=67108863,n=Math.imul(D,q),i=(i=Math.imul(D,Z))+Math.imul(K,q)|0,o=Math.imul(K,Z),n=n+Math.imul(j,J)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(B,J)|0,o=o+Math.imul(B,Y)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,ee)|0,n=n+Math.imul(C,er)|0,i=(i=i+Math.imul(C,en)|0)+Math.imul(_,er)|0,o=o+Math.imul(_,en)|0,n=n+Math.imul(M,eo)|0,i=(i=i+Math.imul(M,es)|0)+Math.imul(A,eo)|0,o=o+Math.imul(A,es)|0,n=n+Math.imul(k,el)|0,i=(i=i+Math.imul(k,eu)|0)+Math.imul(S,el)|0,o=o+Math.imul(S,eu)|0,n=n+Math.imul(w,ed)|0,i=(i=i+Math.imul(w,eh)|0)+Math.imul(x,ed)|0,o=o+Math.imul(x,eh)|0;var eA=(u+(n=n+Math.imul(y,ep)|0)|0)+((8191&(i=(i=i+Math.imul(y,eg)|0)+Math.imul(v,ep)|0))<<13)|0;u=((o=o+Math.imul(v,eg)|0)+(i>>>13)|0)+(eA>>>26)|0,eA&=67108863,n=Math.imul(D,J),i=(i=Math.imul(D,Y))+Math.imul(K,J)|0,o=Math.imul(K,Y),n=n+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(O,er)|0,i=(i=i+Math.imul(O,en)|0)+Math.imul(L,er)|0,o=o+Math.imul(L,en)|0,n=n+Math.imul(C,eo)|0,i=(i=i+Math.imul(C,es)|0)+Math.imul(_,eo)|0,o=o+Math.imul(_,es)|0,n=n+Math.imul(M,el)|0,i=(i=i+Math.imul(M,eu)|0)+Math.imul(A,el)|0,o=o+Math.imul(A,eu)|0,n=n+Math.imul(k,ed)|0,i=(i=i+Math.imul(k,eh)|0)+Math.imul(S,ed)|0,o=o+Math.imul(S,eh)|0;var eP=(u+(n=n+Math.imul(w,ep)|0)|0)+((8191&(i=(i=i+Math.imul(w,eg)|0)+Math.imul(x,ep)|0))<<13)|0;u=((o=o+Math.imul(x,eg)|0)+(i>>>13)|0)+(eP>>>26)|0,eP&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,ee))+Math.imul(K,Q)|0,o=Math.imul(K,ee),n=n+Math.imul(j,er)|0,i=(i=i+Math.imul(j,en)|0)+Math.imul(B,er)|0,o=o+Math.imul(B,en)|0,n=n+Math.imul(O,eo)|0,i=(i=i+Math.imul(O,es)|0)+Math.imul(L,eo)|0,o=o+Math.imul(L,es)|0,n=n+Math.imul(C,el)|0,i=(i=i+Math.imul(C,eu)|0)+Math.imul(_,el)|0,o=o+Math.imul(_,eu)|0,n=n+Math.imul(M,ed)|0,i=(i=i+Math.imul(M,eh)|0)+Math.imul(A,ed)|0,o=o+Math.imul(A,eh)|0;var eC=(u+(n=n+Math.imul(k,ep)|0)|0)+((8191&(i=(i=i+Math.imul(k,eg)|0)+Math.imul(S,ep)|0))<<13)|0;u=((o=o+Math.imul(S,eg)|0)+(i>>>13)|0)+(eC>>>26)|0,eC&=67108863,n=Math.imul(D,er),i=(i=Math.imul(D,en))+Math.imul(K,er)|0,o=Math.imul(K,en),n=n+Math.imul(j,eo)|0,i=(i=i+Math.imul(j,es)|0)+Math.imul(B,eo)|0,o=o+Math.imul(B,es)|0,n=n+Math.imul(O,el)|0,i=(i=i+Math.imul(O,eu)|0)+Math.imul(L,el)|0,o=o+Math.imul(L,eu)|0,n=n+Math.imul(C,ed)|0,i=(i=i+Math.imul(C,eh)|0)+Math.imul(_,ed)|0,o=o+Math.imul(_,eh)|0;var e_=(u+(n=n+Math.imul(M,ep)|0)|0)+((8191&(i=(i=i+Math.imul(M,eg)|0)+Math.imul(A,ep)|0))<<13)|0;u=((o=o+Math.imul(A,eg)|0)+(i>>>13)|0)+(e_>>>26)|0,e_&=67108863,n=Math.imul(D,eo),i=(i=Math.imul(D,es))+Math.imul(K,eo)|0,o=Math.imul(K,es),n=n+Math.imul(j,el)|0,i=(i=i+Math.imul(j,eu)|0)+Math.imul(B,el)|0,o=o+Math.imul(B,eu)|0,n=n+Math.imul(O,ed)|0,i=(i=i+Math.imul(O,eh)|0)+Math.imul(L,ed)|0,o=o+Math.imul(L,eh)|0;var eI=(u+(n=n+Math.imul(C,ep)|0)|0)+((8191&(i=(i=i+Math.imul(C,eg)|0)+Math.imul(_,ep)|0))<<13)|0;u=((o=o+Math.imul(_,eg)|0)+(i>>>13)|0)+(eI>>>26)|0,eI&=67108863,n=Math.imul(D,el),i=(i=Math.imul(D,eu))+Math.imul(K,el)|0,o=Math.imul(K,eu),n=n+Math.imul(j,ed)|0,i=(i=i+Math.imul(j,eh)|0)+Math.imul(B,ed)|0,o=o+Math.imul(B,eh)|0;var eO=(u+(n=n+Math.imul(O,ep)|0)|0)+((8191&(i=(i=i+Math.imul(O,eg)|0)+Math.imul(L,ep)|0))<<13)|0;u=((o=o+Math.imul(L,eg)|0)+(i>>>13)|0)+(eO>>>26)|0,eO&=67108863,n=Math.imul(D,ed),i=(i=Math.imul(D,eh))+Math.imul(K,ed)|0,o=Math.imul(K,eh);var eL=(u+(n=n+Math.imul(j,ep)|0)|0)+((8191&(i=(i=i+Math.imul(j,eg)|0)+Math.imul(B,ep)|0))<<13)|0;u=((o=o+Math.imul(B,eg)|0)+(i>>>13)|0)+(eL>>>26)|0,eL&=67108863;var eR=(u+(n=Math.imul(D,ep))|0)+((8191&(i=(i=Math.imul(D,eg))+Math.imul(K,ep)|0))<<13)|0;return u=((o=Math.imul(K,eg))+(i>>>13)|0)+(eR>>>26)|0,eR&=67108863,l[0]=em,l[1]=ey,l[2]=ev,l[3]=eb,l[4]=ew,l[5]=ex,l[6]=eE,l[7]=ek,l[8]=eS,l[9]=eT,l[10]=eM,l[11]=eA,l[12]=eP,l[13]=eC,l[14]=e_,l[15]=eI,l[16]=eO,l[17]=eL,l[18]=eR,0!==u&&(l[19]=u,r.length++),r};function y(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,l=Math.min(o,t.length-1),u=Math.max(0,o-e.length+1);u<=l;u++){var c=o-u,d=(0|e.words[c])*(0|t.words[u]),h=67108863&d;s=s+(d/67108864|0)|0,a=67108863&(h=h+a|0),i+=(s=s+(h>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function v(e,t){this.x=e,this.y=t}Math.imul||(m=g),o.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):n<63?g(this,e,t):y(this,e,t)},v.prototype.makeRBT=function(e){for(var t=Array(e),r=o.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},v.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},v.prototype.permute=function(e,t,r,n,i,o){for(var s=0;s<o;s++)n[s]=t[e[s]],i[s]=r[e[s]]},v.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,l=Math.cos(2*Math.PI/a),u=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var d=l,h=u,f=0;f<s;f++){var p=r[c+f],g=n[c+f],m=r[c+f+s],y=n[c+f+s],v=d*m-h*y;y=d*y+h*m,m=v,r[c+f]=p+m,n[c+f]=g+y,r[c+f+s]=p-m,n[c+f+s]=g-y,f!==a&&(v=l*d-u*h,h=l*h+u*d,d=v)}},v.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},v.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},v.prototype.convert13b=function(e,t,r,i){for(var o=0,s=0;s<t;s++)o+=0|e[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===o),n((-8192&o)==0)},v.prototype.stub=function(e){for(var t=Array(e),r=0;r<e;r++)t[r]=0;return t},v.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),s=Array(n),a=Array(n),l=Array(n),u=Array(n),c=Array(n),d=Array(n),h=r.words;h.length=n,this.convert13b(e.words,e.length,s,n),this.convert13b(t.words,t.length,u,n),this.transform(s,o,a,l,n,i),this.transform(u,o,c,d,n,i);for(var f=0;f<n;f++){var p=a[f]*c[f]-l[f]*d[f];l[f]=a[f]*d[f]+l[f]*c[f],a[f]=p}return this.conjugate(a,l,n),this.transform(a,l,h,o,n,i),this.conjugate(h,o,n),this.normalize13b(h,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=Array(this.length+e.length),y(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,s=(67108863&o)+(67108863&r);r>>=26,r+=(o/67108864|0)+(s>>>26),this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=e.words[n]>>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,l=(0|this.words[t])-a<<r;this.words[t]=l|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var i,o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o;if(i-=s,i=Math.max(0,i),r){for(var l=0;l<s;l++)r.words[l]=this.words[l];r.length=s}if(0===s);else if(this.length>s)for(this.length-=s,l=0;l<this.length;l++)this.words[l]=this.words[l+s];else this.words[0]=0,this.length=1;var u=0;for(l=this.length-1;l>=0&&(0!==u||l>=i);l--){var c=0|this.words[l];this.words[l]=u<<26-o|c>>>o,u=c&a}return r&&0!==u&&(r.words[r.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;return!(this.length<=r)&&!!(this.words[r]&1<<t)},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;return(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)?this:(0!==t&&r++,this.length=Math.min(r,this.length),0!==t&&(this.words[this.length-1]&=67108863^67108863>>>t<<t),this._strip())},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return(n("number"==typeof e),n(e<67108864),e<0)?this.isubn(-e):0!==this.negative?(1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0):(this.negative=0,this.isubn(e),this.negative=1),this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var i,o,s=e.length+r;this._expand(s);var a=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+a;var l=(0|e.words[i])*t;o-=67108863&l,a=(o>>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r,n=this.length-e.length,i=this.clone(),s=e,a=0|s.words[s.length-1];0!=(n=26-this._countBits(a))&&(s=s.ushln(n),i.iushln(n),a=0|s.words[s.length-1]);var l=i.length-s.length;if("mod"!==t){(r=new o(null)).length=l+1,r.words=Array(r.length);for(var u=0;u<r.length;u++)r.words[u]=0}var c=i.clone()._ishlnsubmul(s,1,l);0===c.negative&&(i=c,r&&(r.words[l]=1));for(var d=l-1;d>=0;d--){var h=(0|i.words[s.length+d])*67108864+(0|i.words[s.length+d-1]);for(h=Math.min(h/a|0,67108863),i._ishlnsubmul(s,h,d);0!==i.negative;)h--,i.negative=0,i._ishlnsubmul(s,1,d),i.isZero()||(i.negative^=1);r&&(r.words[d]=h)}return r&&r._strip(),i._strip(),"div"!==t&&0!==n&&i.iushrn(n),{div:r||null,mod:i}},o.prototype.divmod=function(e,t,r){var i,s,a;return(n(!e.isZero()),this.isZero())?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):(this.negative&e.negative)!=0?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||0>this.cmp(e)?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t)},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=67108864%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),l=new o(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),d=t.clone();!t.isZero();){for(var h=0,f=1;(t.words[0]&f)==0&&h<26;++h,f<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(d)),i.iushrn(1),s.iushrn(1);for(var p=0,g=1;(r.words[0]&g)==0&&p<26;++p,g<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(c),l.isub(d)),a.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),s.isub(l)):(r.isub(t),a.isub(i),l.isub(s))}return{a:a,b:l,gcd:r.iushln(u)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t,r=this,i=e.clone();r=0!==r.negative?r.umod(e):r.clone();for(var s=new o(1),a=new o(0),l=i.clone();r.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,c=1;(r.words[0]&c)==0&&u<26;++u,c<<=1);if(u>0)for(r.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var d=0,h=1;(i.words[0]&h)==0&&d<26;++d,h<<=1);if(d>0)for(i.iushrn(d);d-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);r.cmp(i)>=0?(r.isub(i),s.isub(a)):(i.isub(r),a.isub(s))}return 0>(t=0===r.cmpn(1)?s:a).cmpn(0)&&t.iadd(e),t},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return(1&this.words[0])==0},o.prototype.isOdd=function(){return(1&this.words[0])==1},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];a+=o,o=a>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return -1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return -1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return -1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return -1===this.cmpn(e)},o.prototype.lt=function(e){return -1===this.cmp(e)},o.prototype.lten=function(e){return 0>=this.cmpn(e)},o.prototype.lte=function(e){return 0>=this.cmp(e)},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new T(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function M(e){T.call(this,e),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)}w.prototype._tmp=function(){var e=new o(null);return e.words=Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,r=e;do this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength();while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},i(x,w),x.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n<r;n++)t.words[n]=e.words[n];if(t.length=r,e.length<=9){e.words[0]=0,e.length=1;return}var i=e.words[9];for(n=10,t.words[t.length++]=4194303&i;n<e.length;n++){var o=0|e.words[n];e.words[n-10]=(4194303&o)<<4|i>>>22,i=o}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(E,w),i(k,w),i(S,w),S.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=(0|e.words[r])*19+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){var t;if(b[e])return b[e];if("k256"===e)t=new x;else if("p224"===e)t=new E;else if("p192"===e)t=new k;else if("p25519"===e)t=new S;else throw Error("Unknown prime "+e);return b[e]=t,t},T.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},T.prototype._verify2=function(e,t){n((e.negative|t.negative)==0,"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},T.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},T.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},T.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},T.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},T.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r._forceRed(this)},T.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r},T.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},T.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},T.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},T.prototype.isqr=function(e){return this.imul(e,e.clone())},T.prototype.sqr=function(e){return this.mul(e,e)},T.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),l=a.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var d=this.pow(c,i),h=this.pow(e,i.addn(1).iushrn(1)),f=this.pow(e,i),p=s;0!==f.cmp(a);){for(var g=f,m=0;0!==g.cmp(a);m++)g=g.redSqr();n(m<p);var y=this.pow(d,new o(1).iushln(p-m-1));h=h.redMul(y),d=y.redSqr(),f=f.redMul(d),p=m}return h},T.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},T.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],s=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),n=t.length-1;n>=0;n--){for(var u=t.words[n],c=l-1;c>=0;c--){var d=u>>c&1;if(i!==r[0]&&(i=this.sqr(i)),0===d&&0===s){a=0;continue}s<<=1,s|=d,(4==++a||0===n&&0===c)&&(i=this.mul(i,r[s]),a=0,s=0)}l=26}return i},T.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},T.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new M(e)},i(M,T),M.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},M.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},M.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):0>i.cmpn(0)&&(o=i.iadd(this.m)),o._forceRed(this)},M.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):0>i.cmpn(0)&&(s=i.iadd(this.m)),s._forceRed(this)},M.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},10011:function(e,t,r){var n=r(58162);e.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},69323:function(e,t){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){void 0===e&&(e="="),this._paddingCharacter=e}return e.prototype.encodedLength=function(e){return this._paddingCharacter?(e+2)/3*4|0:(8*e+5)/6|0},e.prototype.encode=function(e){for(var t="",r=0;r<e.length-2;r+=3){var n=e[r]<<16|e[r+1]<<8|e[r+2];t+=this._encodeByte(n>>>18&63)+this._encodeByte(n>>>12&63)+this._encodeByte(n>>>6&63)+this._encodeByte(n>>>0&63)}var i=e.length-r;if(i>0){var n=e[r]<<16|(2===i?e[r+1]<<8:0);t+=this._encodeByte(n>>>18&63)+this._encodeByte(n>>>12&63),2===i?t+=this._encodeByte(n>>>6&63):t+=this._paddingCharacter||"",t+=this._paddingCharacter||""}return t},e.prototype.maxDecodedLength=function(e){return this._paddingCharacter?e/4*3|0:(6*e+7)/8|0},e.prototype.decodedLength=function(e){return this.maxDecodedLength(e.length-this._getPaddingLength(e))},e.prototype.decode=function(e){if(0===e.length)return new Uint8Array(0);for(var t=this._getPaddingLength(e),r=e.length-t,n=new Uint8Array(this.maxDecodedLength(r)),i=0,o=0,s=0,a=0,l=0,u=0,c=0;o<r-4;o+=4)a=this._decodeChar(e.charCodeAt(o+0)),l=this._decodeChar(e.charCodeAt(o+1)),u=this._decodeChar(e.charCodeAt(o+2)),c=this._decodeChar(e.charCodeAt(o+3)),n[i++]=a<<2|l>>>4,n[i++]=l<<4|u>>>2,n[i++]=u<<6|c,s|=256&a,s|=256&l,s|=256&u,s|=256&c;if(o<r-1&&(a=this._decodeChar(e.charCodeAt(o)),l=this._decodeChar(e.charCodeAt(o+1)),n[i++]=a<<2|l>>>4,s|=256&a,s|=256&l),o<r-2&&(u=this._decodeChar(e.charCodeAt(o+2)),n[i++]=l<<4|u>>>2,s|=256&u),o<r-3&&(c=this._decodeChar(e.charCodeAt(o+3)),n[i++]=u<<6|c,s|=256&c),0!==s)throw Error("Base64Coder: incorrect characters for decoding");return n},e.prototype._encodeByte=function(e){var t=e;return String.fromCharCode(t+=65+(25-e>>>8&6)+(51-e>>>8&-75)+(61-e>>>8&-15)+(62-e>>>8&3))},e.prototype._decodeChar=function(e){return 256+((42-e&e-44)>>>8&-256+e-43+62)+((46-e&e-48)>>>8&-256+e-47+63)+((47-e&e-58)>>>8&-256+e-48+52)+((64-e&e-91)>>>8&-256+e-65+0)+((96-e&e-123)>>>8&-256+e-97+26)},e.prototype._getPaddingLength=function(e){var t=0;if(this._paddingCharacter){for(var r=e.length-1;r>=0&&e[r]===this._paddingCharacter;r--)t++;if(e.length<4||t>2)throw Error("Base64Coder: incorrect padding")}return t},e}();t.Coder=i;var o=new i;t.encode=function(e){return o.encode(e)},t.decode=function(e){return o.decode(e)};var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype._encodeByte=function(e){var t=e;return String.fromCharCode(t+=65+(25-e>>>8&6)+(51-e>>>8&-75)+(61-e>>>8&-13)+(62-e>>>8&49))},t.prototype._decodeChar=function(e){return 256+((44-e&e-46)>>>8&-256+e-45+62)+((94-e&e-96)>>>8&-256+e-95+63)+((47-e&e-58)>>>8&-256+e-48+52)+((64-e&e-91)>>>8&-256+e-65+0)+((96-e&e-123)>>>8&-256+e-97+26)},t}(i);t.URLSafeCoder=s;var a=new s;t.encodeURLSafe=function(e){return a.encode(e)},t.decodeURLSafe=function(e){return a.decode(e)},t.encodedLength=function(e){return o.encodedLength(e)},t.maxDecodedLength=function(e){return o.maxDecodedLength(e)},t.decodedLength=function(e){return o.decodedLength(e)}},9669:function(e,t,r){e.exports=r(51609)},55448:function(e,t,r){"use strict";var n=r(64867),i=r(36026),o=r(4372),s=r(15327),a=r(94097),l=r(84109),u=r(67985),c=r(77874),d=r(82648),h=r(60644),f=r(90205);e.exports=function(e){return new Promise(function(t,r){var p,g=e.data,m=e.headers,y=e.responseType;function v(){e.cancelToken&&e.cancelToken.unsubscribe(p),e.signal&&e.signal.removeEventListener("abort",p)}n.isFormData(g)&&n.isStandardBrowserEnv()&&delete m["Content-Type"];var b=new XMLHttpRequest;if(e.auth){var w=e.auth.username||"",x=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";m.Authorization="Basic "+btoa(w+":"+x)}var E=a(e.baseURL,e.url);function k(){if(b){var n="getAllResponseHeaders"in b?l(b.getAllResponseHeaders()):null;i(function(e){t(e),v()},function(e){r(e),v()},{data:y&&"text"!==y&&"json"!==y?b.response:b.responseText,status:b.status,statusText:b.statusText,headers:n,config:e,request:b}),b=null}}if(b.open(e.method.toUpperCase(),s(E,e.params,e.paramsSerializer),!0),b.timeout=e.timeout,"onloadend"in b?b.onloadend=k:b.onreadystatechange=function(){b&&4===b.readyState&&(0!==b.status||b.responseURL&&0===b.responseURL.indexOf("file:"))&&setTimeout(k)},b.onabort=function(){b&&(r(new d("Request aborted",d.ECONNABORTED,e,b)),b=null)},b.onerror=function(){r(new d("Network Error",d.ERR_NETWORK,e,b,b)),b=null},b.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||c;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new d(t,n.clarifyTimeoutError?d.ETIMEDOUT:d.ECONNABORTED,e,b)),b=null},n.isStandardBrowserEnv()){var S=(e.withCredentials||u(E))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;S&&(m[e.xsrfHeaderName]=S)}"setRequestHeader"in b&&n.forEach(m,function(e,t){void 0===g&&"content-type"===t.toLowerCase()?delete m[t]:b.setRequestHeader(t,e)}),n.isUndefined(e.withCredentials)||(b.withCredentials=!!e.withCredentials),y&&"json"!==y&&(b.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&b.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&b.upload&&b.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(p=function(e){b&&(r(!e||e&&e.type?new h:e),b.abort(),b=null)},e.cancelToken&&e.cancelToken.subscribe(p),e.signal&&(e.signal.aborted?p():e.signal.addEventListener("abort",p))),g||(g=null);var T=f(E);if(T&&-1===["http","https","file"].indexOf(T)){r(new d("Unsupported protocol "+T+":",d.ERR_BAD_REQUEST,e));return}b.send(g)})}},51609:function(e,t,r){"use strict";var n=r(64867),i=r(91849),o=r(30321),s=r(47185),a=function e(t){var r=new o(t),a=i(o.prototype.request,r);return n.extend(a,o.prototype,r),n.extend(a,r),a.create=function(r){return e(s(t,r))},a}(r(45546));a.Axios=o,a.CanceledError=r(60644),a.CancelToken=r(14972),a.isCancel=r(26502),a.VERSION=r(97288).version,a.toFormData=r(47675),a.AxiosError=r(82648),a.Cancel=a.CanceledError,a.all=function(e){return Promise.all(e)},a.spread=r(8713),a.isAxiosError=r(16268),e.exports=a,e.exports.default=a},14972:function(e,t,r){"use strict";var n=r(60644);function i(e){if("function"!=typeof e)throw TypeError("executor must be a function.");this.promise=new Promise(function(e){t=e});var t,r=this;this.promise.then(function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;t<n;t++)r._listeners[t](e);r._listeners=null}}),this.promise.then=function(e){var t,n=new Promise(function(e){r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e){r.reason||(r.reason=new n(e),t(r.reason))})}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.prototype.subscribe=function(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]},i.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},i.source=function(){var e;return{token:new i(function(t){e=t}),cancel:e}},e.exports=i},60644:function(e,t,r){"use strict";var n=r(82648);function i(e){n.call(this,null==e?"canceled":e,n.ERR_CANCELED),this.name="CanceledError"}r(64867).inherits(i,n,{__CANCEL__:!0}),e.exports=i},26502:function(e){"use strict";e.exports=function(e){return!!(e&&e.__CANCEL__)}},30321:function(e,t,r){"use strict";var n=r(64867),i=r(15327),o=r(80782),s=r(13572),a=r(47185),l=r(94097),u=r(54875),c=u.validators;function d(e){this.defaults=e,this.interceptors={request:new o,response:new o}}d.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=a(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r,n=t.transitional;void 0!==n&&u.assertOptions(n,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var i=[],o=!0;this.interceptors.request.forEach(function(e){("function"!=typeof e.runWhen||!1!==e.runWhen(t))&&(o=o&&e.synchronous,i.unshift(e.fulfilled,e.rejected))});var l=[];if(this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)}),!o){var d=[s,void 0];for(Array.prototype.unshift.apply(d,i),d=d.concat(l),r=Promise.resolve(t);d.length;)r=r.then(d.shift(),d.shift());return r}for(var h=t;i.length;){var f=i.shift(),p=i.shift();try{h=f(h)}catch(e){p(e);break}}try{r=s(h)}catch(e){return Promise.reject(e)}for(;l.length;)r=r.then(l.shift(),l.shift());return r},d.prototype.getUri=function(e){return i(l((e=a(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)},n.forEach(["delete","get","head","options"],function(e){d.prototype[e]=function(t,r){return this.request(a(r||{},{method:e,url:t,data:(r||{}).data}))}}),n.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,i){return this.request(a(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}d.prototype[e]=t(),d.prototype[e+"Form"]=t(!0)}),e.exports=d},82648:function(e,t,r){"use strict";var n=r(64867);function i(e,t,r,n,i){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}n.inherits(i,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var o=i.prototype,s={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach(function(e){s[e]={value:e}}),Object.defineProperties(i,s),Object.defineProperty(o,"isAxiosError",{value:!0}),i.from=function(e,t,r,s,a,l){var u=Object.create(o);return n.toFlatObject(e,u,function(e){return e!==Error.prototype}),i.call(u,e.message,t,r,s,a),u.name=e.name,l&&Object.assign(u,l),u},e.exports=i},80782:function(e,t,r){"use strict";var n=r(64867);function i(){this.handlers=[]}i.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){n.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=i},94097:function(e,t,r){"use strict";var n=r(91793),i=r(7303);e.exports=function(e,t){return e&&!n(t)?i(e,t):t}},13572:function(e,t,r){"use strict";var n=r(64867),i=r(18527),o=r(26502),s=r(45546),a=r(60644);function l(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new a}e.exports=function(e){return l(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||s.adapter)(e).then(function(t){return l(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t},function(t){return!o(t)&&(l(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},47185:function(e,t,r){"use strict";var n=r(64867);e.exports=function(e,t){t=t||{};var r={};function i(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function o(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:i(void 0,e[r]):i(e[r],t[r])}function s(e){if(!n.isUndefined(t[e]))return i(void 0,t[e])}function a(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:i(void 0,e[r]):i(void 0,t[r])}function l(r){return r in t?i(e[r],t[r]):r in e?i(void 0,e[r]):void 0}var u={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l};return n.forEach(Object.keys(e).concat(Object.keys(t)),function(e){var t=u[e]||o,i=t(e);n.isUndefined(i)&&t!==l||(r[e]=i)}),r}},36026:function(e,t,r){"use strict";var n=r(82648);e.exports=function(e,t,r){var i=r.config.validateStatus;!r.status||!i||i(r.status)?e(r):t(new n("Request failed with status code "+r.status,[n.ERR_BAD_REQUEST,n.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}},18527:function(e,t,r){"use strict";var n=r(64867),i=r(45546);e.exports=function(e,t,r){var o=this||i;return n.forEach(r,function(r){e=r.call(o,e,t)}),e}},45546:function(e,t,r){"use strict";var n,i=r(34155),o=r(64867),s=r(16016),a=r(82648),l=r(77874),u=r(47675),c={"Content-Type":"application/x-www-form-urlencoded"};function d(e,t){!o.isUndefined(e)&&o.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var h={transitional:l,adapter:("undefined"!=typeof XMLHttpRequest?n=r(55448):void 0!==i&&"[object process]"===Object.prototype.toString.call(i)&&(n=r(55448)),n),transformRequest:[function(e,t){if(s(t,"Accept"),s(t,"Content-Type"),o.isFormData(e)||o.isArrayBuffer(e)||o.isBuffer(e)||o.isStream(e)||o.isFile(e)||o.isBlob(e))return e;if(o.isArrayBufferView(e))return e.buffer;if(o.isURLSearchParams(e))return d(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var r,n=o.isObject(e),i=t&&t["Content-Type"];if((r=o.isFileList(e))||n&&"multipart/form-data"===i){var a=this.env&&this.env.FormData;return u(r?{"files[]":e}:e,a&&new a)}return n||"application/json"===i?(d(t,"application/json"),function(e,t,r){if(o.isString(e))try{return(0,JSON.parse)(e),o.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||h.transitional,r=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,i=!r&&"json"===this.responseType;if(i||n&&o.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw a.from(e,a.ERR_BAD_RESPONSE,this,null,this.response);throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:r(91623)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};o.forEach(["delete","get","head"],function(e){h.headers[e]={}}),o.forEach(["post","put","patch"],function(e){h.headers[e]=o.merge(c)}),e.exports=h},77874:function(e){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},97288:function(e){e.exports={version:"0.27.2"}},91849:function(e){"use strict";e.exports=function(e,t){return function(){for(var r=Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},15327:function(e,t,r){"use strict";var n=r(64867);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;if(r)o=r(t);else if(n.isURLSearchParams(t))o=t.toString();else{var o,s=[];n.forEach(t,function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),s.push(i(t)+"="+i(e))}))}),o=s.join("&")}if(o){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},7303:function(e){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:function(e,t,r){"use strict";var n=r(64867);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,i,o,s){var a=[];a.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),n.isString(i)&&a.push("path="+i),n.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},91793:function(e){"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},16268:function(e,t,r){"use strict";var n=r(64867);e.exports=function(e){return n.isObject(e)&&!0===e.isAxiosError}},67985:function(e,t,r){"use strict";var n=r(64867);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=i(window.location.href),function(t){var r=n.isString(t)?i(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},16016:function(e,t,r){"use strict";var n=r(64867);e.exports=function(e,t){n.forEach(e,function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])})}},91623:function(e){e.exports=null},84109:function(e,t,r){"use strict";var n=r(64867),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,o,s={};return e&&n.forEach(e.split("\n"),function(e){o=e.indexOf(":"),t=n.trim(e.substr(0,o)).toLowerCase(),r=n.trim(e.substr(o+1)),t&&!(s[t]&&i.indexOf(t)>=0)&&("set-cookie"===t?s[t]=(s[t]?s[t]:[]).concat([r]):s[t]=s[t]?s[t]+", "+r:r)}),s}},90205:function(e){"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},8713:function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},47675:function(e,t,r){"use strict";var n=r(48764).Buffer,i=r(64867);e.exports=function(e,t){t=t||new FormData;var r=[];function o(e){return null===e?"":i.isDate(e)?e.toISOString():i.isArrayBuffer(e)||i.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):n.from(e):e}return!function e(n,s){if(i.isPlainObject(n)||i.isArray(n)){if(-1!==r.indexOf(n))throw Error("Circular reference detected in "+s);r.push(n),i.forEach(n,function(r,n){if(!i.isUndefined(r)){var a,l=s?s+"."+n:n;if(r&&!s&&"object"==typeof r){if(i.endsWith(n,"{}"))r=JSON.stringify(r);else if(i.endsWith(n,"[]")&&(a=i.toArray(r))){a.forEach(function(e){i.isUndefined(e)||t.append(l,o(e))});return}}e(r,l)}}),r.pop()}else t.append(s,o(n))}(e),t}},54875:function(e,t,r){"use strict";var n=r(97288).version,i=r(82648),o={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){o[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});var s={};o.transitional=function(e,t,r){function o(e,t){return"[Axios v"+n+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,a){if(!1===e)throw new i(o(n," has been removed"+(t?" in "+t:"")),i.ERR_DEPRECATED);return t&&!s[n]&&(s[n]=!0,console.warn(o(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,a)}},e.exports={assertOptions:function(e,t,r){if("object"!=typeof e)throw new i("options must be an object",i.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(e),o=n.length;o-- >0;){var s=n[o],a=t[s];if(a){var l=e[s],u=void 0===l||a(l,s,e);if(!0!==u)throw new i("option "+s+" must be "+u,i.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new i("Unknown option "+s,i.ERR_BAD_OPTION)}},validators:o}},64867:function(e,t,r){"use strict";var n,i,o=r(91849),s=Object.prototype.toString,a=(n=Object.create(null),function(e){var t=s.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())});function l(e){return e=e.toLowerCase(),function(t){return a(t)===e}}function u(e){return Array.isArray(e)}function c(e){return void 0===e}var d=l("ArrayBuffer");function h(e){return null!==e&&"object"==typeof e}function f(e){if("object"!==a(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var p=l("Date"),g=l("File"),m=l("Blob"),y=l("FileList");function v(e){return"[object Function]"===s.call(e)}var b=l("URLSearchParams");function w(e,t){if(null!=e){if("object"!=typeof e&&(e=[e]),u(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}}var x=(i="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return i&&e instanceof i});e.exports={isArray:u,isArrayBuffer:d,isBuffer:function(e){return null!==e&&!c(e)&&null!==e.constructor&&!c(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||s.call(e)===t||v(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&d(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:h,isPlainObject:f,isUndefined:c,isDate:p,isFile:g,isBlob:m,isFunction:v,isStream:function(e){return h(e)&&v(e.pipe)},isURLSearchParams:b,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:w,merge:function e(){var t={};function r(r,n){f(t[n])&&f(r)?t[n]=e(t[n],r):f(r)?t[n]=e({},r):u(r)?t[n]=r.slice():t[n]=r}for(var n=0,i=arguments.length;n<i;n++)w(arguments[n],r);return t},extend:function(e,t,r){return w(t,function(t,n){r&&"function"==typeof t?e[n]=o(t,r):e[n]=t}),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,r,n){e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,r&&Object.assign(e.prototype,r)},toFlatObject:function(e,t,r){var n,i,o,s={};t=t||{};do{for(i=(n=Object.getOwnPropertyNames(e)).length;i-- >0;)s[o=n[i]]||(t[o]=e[o],s[o]=!0);e=Object.getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:a,kindOfTest:l,endsWith:function(e,t,r){e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;var n=e.indexOf(t,r);return -1!==n&&n===r},toArray:function(e){if(!e)return null;var t=e.length;if(c(t))return null;for(var r=Array(t);t-- >0;)r[t]=e[t];return r},isTypedArray:x,isFileList:y}},58162:function(e,t,r){"use strict";var n=r(89509).Buffer;e.exports=function(e){if(e.length>=255)throw TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var i=0;i<e.length;i++){var o=e.charAt(i),s=o.charCodeAt(0);if(255!==t[s])throw TypeError(o+" is ambiguous");t[s]=i}var a=e.length,l=e.charAt(0),u=Math.log(a)/Math.log(256),c=Math.log(256)/Math.log(a);function d(e){if("string"!=typeof e)throw TypeError("Expected String");if(0===e.length)return n.alloc(0);for(var r=0,i=0,o=0;e[r]===l;)i++,r++;for(var s=(e.length-r)*u+1>>>0,c=new Uint8Array(s);e[r];){var d=t[e.charCodeAt(r)];if(255===d)return;for(var h=0,f=s-1;(0!==d||h<o)&&-1!==f;f--,h++)d+=a*c[f]>>>0,c[f]=d%256>>>0,d=d/256>>>0;if(0!==d)throw Error("Non-zero carry");o=h,r++}for(var p=s-o;p!==s&&0===c[p];)p++;var g=n.allocUnsafe(i+(s-p));g.fill(0,0,i);for(var m=i;p!==s;)g[m++]=c[p++];return g}return{encode:function(t){if((Array.isArray(t)||t instanceof Uint8Array)&&(t=n.from(t)),!n.isBuffer(t))throw TypeError("Expected Buffer");if(0===t.length)return"";for(var r=0,i=0,o=0,s=t.length;o!==s&&0===t[o];)o++,r++;for(var u=(s-o)*c+1>>>0,d=new Uint8Array(u);o!==s;){for(var h=t[o],f=0,p=u-1;(0!==h||f<i)&&-1!==p;p--,f++)h+=256*d[p]>>>0,d[p]=h%a>>>0,h=h/a>>>0;if(0!==h)throw Error("Non-zero carry");i=f,o++}for(var g=u-i;g!==u&&0===d[g];)g++;for(var m=l.repeat(r);g<u;++g)m+=e.charAt(d[g]);return m},decodeUnsafe:d,decode:function(e){var t=d(e);if(t)return t;throw Error("Non-base"+a+" character")}}}},79742:function(e,t){"use strict";t.byteLength=function(e){var t=l(e),r=t[0],n=t[1];return(r+n)*3/4-n},t.toByteArray=function(e){var t,r,o=l(e),s=o[0],a=o[1],u=new i((s+a)*3/4-a),c=0,d=a>0?s-4:s;for(r=0;r<d;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[c++]=255&t),1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=0,a=n-i;s<a;s+=16383)o.push(function(e,t,n){for(var i,o=[],s=t;s<n;s+=3)o.push(r[(i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]))>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}(e,s,s+16383>a?a:s+16383));return 1===i?o.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&o.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s<a;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function l(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},40475:function(e,t,r){"use strict";var n=r(48764).Buffer;t.oU=function(e){{let t=n.from(e);t.reverse();let r=t.toString("hex");return 0===r.length?BigInt(0):BigInt(`0x${r}`)}},t.k$=function(e,t){{let r=e.toString(16),i=n.from(r.padStart(2*t,"0").slice(0,2*t),"hex");return i.reverse(),i}}},25532:function(e,t,r){"use strict";var n=r(48764).Buffer,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&i(t,e,r);return o(t,e),t},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.deserializeUnchecked=t.deserialize=t.serialize=t.BinaryReader=t.BinaryWriter=t.BorshError=t.baseDecode=t.baseEncode=void 0;let u=l(r(70945)),c=l(r(97304)),d=a(r(11379)),h=new("function"!=typeof TextDecoder?d.TextDecoder:TextDecoder)("utf-8",{fatal:!0});t.baseEncode=function(e){return"string"==typeof e&&(e=n.from(e,"utf8")),c.default.encode(n.from(e))},t.baseDecode=function(e){return n.from(c.default.decode(e))};class f extends Error{constructor(e){super(e),this.fieldPath=[],this.originalMessage=e}addToFieldPath(e){this.fieldPath.splice(0,0,e),this.message=this.originalMessage+": "+this.fieldPath.join(".")}}t.BorshError=f;class p{constructor(){this.buf=n.alloc(1024),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=n.concat([this.buf,n.alloc(1024)]))}writeU8(e){this.maybeResize(),this.buf.writeUInt8(e,this.length),this.length+=1}writeU16(e){this.maybeResize(),this.buf.writeUInt16LE(e,this.length),this.length+=2}writeU32(e){this.maybeResize(),this.buf.writeUInt32LE(e,this.length),this.length+=4}writeU64(e){this.maybeResize(),this.writeBuffer(n.from(new u.default(e).toArray("le",8)))}writeU128(e){this.maybeResize(),this.writeBuffer(n.from(new u.default(e).toArray("le",16)))}writeU256(e){this.maybeResize(),this.writeBuffer(n.from(new u.default(e).toArray("le",32)))}writeU512(e){this.maybeResize(),this.writeBuffer(n.from(new u.default(e).toArray("le",64)))}writeBuffer(e){this.buf=n.concat([n.from(this.buf.subarray(0,this.length)),e,n.alloc(1024)]),this.length+=e.length}writeString(e){this.maybeResize();let t=n.from(e,"utf8");this.writeU32(t.length),this.writeBuffer(t)}writeFixedArray(e){this.writeBuffer(n.from(e))}writeArray(e,t){for(let r of(this.maybeResize(),this.writeU32(e.length),e))this.maybeResize(),t(r)}toArray(){return this.buf.subarray(0,this.length)}}function g(e,t,r){let n=r.value;r.value=function(...e){try{return n.apply(this,e)}catch(e){if(e instanceof RangeError&&["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(e.code)>=0)throw new f("Reached the end of buffer when deserializing");throw e}}}t.BinaryWriter=p;class m{constructor(e){this.buf=e,this.offset=0}readU8(){let e=this.buf.readUInt8(this.offset);return this.offset+=1,e}readU16(){let e=this.buf.readUInt16LE(this.offset);return this.offset+=2,e}readU32(){let e=this.buf.readUInt32LE(this.offset);return this.offset+=4,e}readU64(){let e=this.readBuffer(8);return new u.default(e,"le")}readU128(){let e=this.readBuffer(16);return new u.default(e,"le")}readU256(){let e=this.readBuffer(32);return new u.default(e,"le")}readU512(){let e=this.readBuffer(64);return new u.default(e,"le")}readBuffer(e){if(this.offset+e>this.buf.length)throw new f(`Expected buffer length ${e} isn't within bounds`);let t=this.buf.slice(this.offset,this.offset+e);return this.offset+=e,t}readString(){let e=this.readU32(),t=this.readBuffer(e);try{return h.decode(t)}catch(e){throw new f(`Error decoding UTF-8 string: ${e}`)}}readFixedArray(e){return new Uint8Array(this.readBuffer(e))}readArray(e){let t=this.readU32(),r=[];for(let n=0;n<t;++n)r.push(e());return r}}function y(e){return e.charAt(0).toUpperCase()+e.slice(1)}function v(e,t,r,n,i){try{if("string"==typeof n)i[`write${y(n)}`](r);else if(n instanceof Array){if("number"==typeof n[0]){if(r.length!==n[0])throw new f(`Expecting byte array of length ${n[0]}, but got ${r.length} bytes`);i.writeFixedArray(r)}else if(2===n.length&&"number"==typeof n[1]){if(r.length!==n[1])throw new f(`Expecting byte array of length ${n[1]}, but got ${r.length} bytes`);for(let t=0;t<n[1];t++)v(e,null,r[t],n[0],i)}else i.writeArray(r,r=>{v(e,t,r,n[0],i)})}else if(void 0!==n.kind)switch(n.kind){case"option":null==r?i.writeU8(0):(i.writeU8(1),v(e,t,r,n.type,i));break;case"map":i.writeU32(r.size),r.forEach((r,o)=>{v(e,t,o,n.key,i),v(e,t,r,n.value,i)});break;default:throw new f(`FieldType ${n} unrecognized`)}else b(e,r,i)}catch(e){throw e instanceof f&&e.addToFieldPath(t),e}}function b(e,t,r){if("function"==typeof t.borshSerialize){t.borshSerialize(r);return}let n=e.get(t.constructor);if(!n)throw new f(`Class ${t.constructor.name} is missing in schema`);if("struct"===n.kind)n.fields.map(([n,i])=>{v(e,n,t[n],i,r)});else if("enum"===n.kind){let i=t[n.field];for(let o=0;o<n.values.length;++o){let[s,a]=n.values[o];if(s===i){r.writeU8(o),v(e,s,t[s],a,r);break}}}else throw new f(`Unexpected schema kind: ${n.kind} for ${t.constructor.name}`)}function w(e,t,r,n){try{if("string"==typeof r)return n[`read${y(r)}`]();if(r instanceof Array){if("number"==typeof r[0])return n.readFixedArray(r[0]);if("number"!=typeof r[1])return n.readArray(()=>w(e,t,r[0],n));{let t=[];for(let i=0;i<r[1];i++)t.push(w(e,null,r[0],n));return t}}if("option"===r.kind){if(n.readU8())return w(e,t,r.type,n);return}if("map"===r.kind){let i=new Map,o=n.readU32();for(let s=0;s<o;s++){let o=w(e,t,r.key,n),s=w(e,t,r.value,n);i.set(o,s)}return i}return x(e,r,n)}catch(e){throw e instanceof f&&e.addToFieldPath(t),e}}function x(e,t,r){if("function"==typeof t.borshDeserialize)return t.borshDeserialize(r);let n=e.get(t);if(!n)throw new f(`Class ${t.name} is missing in schema`);if("struct"===n.kind){let n={};for(let[i,o]of e.get(t).fields)n[i]=w(e,i,o,r);return new t(n)}if("enum"===n.kind){let i=r.readU8();if(i>=n.values.length)throw new f(`Enum index: ${i} is out of range`);let[o,s]=n.values[i],a=w(e,o,s,r);return new t({[o]:a})}throw new f(`Unexpected schema kind: ${n.kind} for ${t.constructor.name}`)}s([g],m.prototype,"readU8",null),s([g],m.prototype,"readU16",null),s([g],m.prototype,"readU32",null),s([g],m.prototype,"readU64",null),s([g],m.prototype,"readU128",null),s([g],m.prototype,"readU256",null),s([g],m.prototype,"readU512",null),s([g],m.prototype,"readString",null),s([g],m.prototype,"readFixedArray",null),s([g],m.prototype,"readArray",null),t.BinaryReader=m,t.serialize=function(e,t,r=p){let n=new r;return b(e,t,n),n.toArray()},t.deserialize=function(e,t,r,n=m){let i=new n(r),o=x(e,t,i);if(i.offset<r.length)throw new f(`Unexpected ${r.length-i.offset} bytes after deserialized data`);return o},t.deserializeUnchecked=function(e,t,r,n=m){return x(e,t,new n(r))}},70945:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&(("le"===t||"be"===t)&&(r=t,t=10),this._init(e||0,t||10,r||"be"))}"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{d="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(71456).Buffer}catch(e){}function s(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function a(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function l(e,t,r,i){for(var o=0,s=0,a=Math.min(e.length,r),l=t;l<a;l++){var u=e.charCodeAt(l)-48;o*=i,s=u>=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&s<i,"Invalid character"),o+=s}return o}function u(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return 0>e.cmp(t)?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=Array(this.length);for(var i,o,s=0;s<this.length;s++)this.words[s]=0;var a=0;if("be"===r)for(s=e.length-1,i=0;s>=0;s-=3)o=e[s]|e[s-1]<<8|e[s-2]<<16,this.words[i]|=o<<a&67108863,this.words[i+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);else if("le"===r)for(s=0,i=0;s<e.length;s+=3)o=e[s]|e[s+1]<<8|e[s+2]<<16,this.words[i]|=o<<a&67108863,this.words[i+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=Array(this.length);for(var n,i=0;i<this.length;i++)this.words[i]=0;var o=0,s=0;if("be"===r)for(i=e.length-1;i>=t;i-=2)n=a(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i<e.length;i+=2)n=a(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,c=r;c<a;c+=n)u=l(e,c,c+n,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var d=1;for(u=l(e,c,e.length,t),c=0;c<s;c++)d*=t;this.imuln(d),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},o.prototype.copy=function(e){e.words=Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){u(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=c}catch(e){o.prototype.inspect=c}else o.prototype.inspect=c;function c(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d,h=["","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"],f=[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];function g(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,l=s/67108864|0;r.words[0]=a;for(var u=1;u<n;u++){for(var c=l>>>26,d=67108863&l,h=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=h;f++){var p=u-f|0;c+=(s=(i=0|e.words[p])*(o=0|t.words[f])+d)/67108864|0,d=67108863&s}r.words[u]=0|d,l=0|c}return 0!==l?r.words[u]=0|l:r.length--,r._strip()}o.prototype.toString=function(e,t){if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var r,i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],l=((a<<i|o)&16777215).toString(16);o=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?h[6-l.length]+l+r:l+r}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=f[e],c=p[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var g=d.modrn(c).toString(e);r=(d=d.idivn(c)).isZero()?g+r:h[u-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},d&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(d,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=e.allocUnsafe?e.allocUnsafe(o):new e(o);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;e[r++]=255&s,r<e.length&&(e[r++]=s>>8&255),r<e.length&&(e[r++]=s>>16&255),6===o?(r<e.length&&(e[r++]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;e[r--]=255&s,r>=0&&(e[r--]=s>>8&255),r>=0&&(e[r--]=s>>16&255),6===o?(r>=0&&(e[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return(8191&t)==0&&(r+=13,t>>>=13),(127&t)==0&&(r+=7,t>>>=7),(15&t)==0&&(r+=4,t>>>=4),(3&t)==0&&(r+=2,t>>>=2),(1&t)==0&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return n((this.negative|e.negative)==0),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return n((this.negative|e.negative)==0),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){this.length>e.length?(t=this,r=e):(t=e,r=this);for(var t,r,n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return n((this.negative|e.negative)==0),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),t?this.words[r]=this.words[r]|1<<i:this.words[r]=this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(e){if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var t,r,n,i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t,r,n=this.iadd(e);return e.negative=1,n._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(t=this,r=e):(t=e,r=this);for(var o=0,s=0;s<r.length;s++)o=(n=(0|t.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&n;for(;0!==o&&s<t.length;s++)o=(n=(0|t.words[s])+o)>>26,this.words[s]=67108863&n;if(0===o&&s<t.length&&t!==this)for(;s<t.length;s++)this.words[s]=t.words[s];return this.length=Math.max(this.length,s),t!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,r){var n,i,o,s=e.words,a=t.words,l=r.words,u=0,c=0|s[0],d=8191&c,h=c>>>13,f=0|s[1],p=8191&f,g=f>>>13,m=0|s[2],y=8191&m,v=m>>>13,b=0|s[3],w=8191&b,x=b>>>13,E=0|s[4],k=8191&E,S=E>>>13,T=0|s[5],M=8191&T,A=T>>>13,P=0|s[6],C=8191&P,_=P>>>13,I=0|s[7],O=8191&I,L=I>>>13,R=0|s[8],j=8191&R,B=R>>>13,N=0|s[9],D=8191&N,K=N>>>13,U=0|a[0],z=8191&U,F=U>>>13,W=0|a[1],V=8191&W,$=W>>>13,H=0|a[2],q=8191&H,Z=H>>>13,G=0|a[3],J=8191&G,Y=G>>>13,X=0|a[4],Q=8191&X,ee=X>>>13,et=0|a[5],er=8191&et,en=et>>>13,ei=0|a[6],eo=8191&ei,es=ei>>>13,ea=0|a[7],el=8191&ea,eu=ea>>>13,ec=0|a[8],ed=8191&ec,eh=ec>>>13,ef=0|a[9],ep=8191&ef,eg=ef>>>13;r.negative=e.negative^t.negative,r.length=19;var em=(u+(n=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,F))+Math.imul(h,z)|0))<<13)|0;u=((o=Math.imul(h,F))+(i>>>13)|0)+(em>>>26)|0,em&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,F))+Math.imul(g,z)|0,o=Math.imul(g,F);var ey=(u+(n=n+Math.imul(d,V)|0)|0)+((8191&(i=(i=i+Math.imul(d,$)|0)+Math.imul(h,V)|0))<<13)|0;u=((o=o+Math.imul(h,$)|0)+(i>>>13)|0)+(ey>>>26)|0,ey&=67108863,n=Math.imul(y,z),i=(i=Math.imul(y,F))+Math.imul(v,z)|0,o=Math.imul(v,F),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,$)|0;var ev=(u+(n=n+Math.imul(d,q)|0)|0)+((8191&(i=(i=i+Math.imul(d,Z)|0)+Math.imul(h,q)|0))<<13)|0;u=((o=o+Math.imul(h,Z)|0)+(i>>>13)|0)+(ev>>>26)|0,ev&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,F))+Math.imul(x,z)|0,o=Math.imul(x,F),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,$)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,$)|0,n=n+Math.imul(p,q)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(g,q)|0,o=o+Math.imul(g,Z)|0;var eb=(u+(n=n+Math.imul(d,J)|0)|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(h,J)|0))<<13)|0;u=((o=o+Math.imul(h,Y)|0)+(i>>>13)|0)+(eb>>>26)|0,eb&=67108863,n=Math.imul(k,z),i=(i=Math.imul(k,F))+Math.imul(S,z)|0,o=Math.imul(S,F),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(x,V)|0,o=o+Math.imul(x,$)|0,n=n+Math.imul(y,q)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(v,q)|0,o=o+Math.imul(v,Z)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(g,J)|0,o=o+Math.imul(g,Y)|0;var ew=(u+(n=n+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(h,Q)|0))<<13)|0;u=((o=o+Math.imul(h,ee)|0)+(i>>>13)|0)+(ew>>>26)|0,ew&=67108863,n=Math.imul(M,z),i=(i=Math.imul(M,F))+Math.imul(A,z)|0,o=Math.imul(A,F),n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,$)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,$)|0,n=n+Math.imul(w,q)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(x,q)|0,o=o+Math.imul(x,Z)|0,n=n+Math.imul(y,J)|0,i=(i=i+Math.imul(y,Y)|0)+Math.imul(v,J)|0,o=o+Math.imul(v,Y)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,ee)|0;var ex=(u+(n=n+Math.imul(d,er)|0)|0)+((8191&(i=(i=i+Math.imul(d,en)|0)+Math.imul(h,er)|0))<<13)|0;u=((o=o+Math.imul(h,en)|0)+(i>>>13)|0)+(ex>>>26)|0,ex&=67108863,n=Math.imul(C,z),i=(i=Math.imul(C,F))+Math.imul(_,z)|0,o=Math.imul(_,F),n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,$)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(k,q)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(S,q)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(x,J)|0,o=o+Math.imul(x,Y)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,ee)|0,n=n+Math.imul(p,er)|0,i=(i=i+Math.imul(p,en)|0)+Math.imul(g,er)|0,o=o+Math.imul(g,en)|0;var eE=(u+(n=n+Math.imul(d,eo)|0)|0)+((8191&(i=(i=i+Math.imul(d,es)|0)+Math.imul(h,eo)|0))<<13)|0;u=((o=o+Math.imul(h,es)|0)+(i>>>13)|0)+(eE>>>26)|0,eE&=67108863,n=Math.imul(O,z),i=(i=Math.imul(O,F))+Math.imul(L,z)|0,o=Math.imul(L,F),n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,$)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,$)|0,n=n+Math.imul(M,q)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(k,J)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(S,J)|0,o=o+Math.imul(S,Y)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(y,er)|0,i=(i=i+Math.imul(y,en)|0)+Math.imul(v,er)|0,o=o+Math.imul(v,en)|0,n=n+Math.imul(p,eo)|0,i=(i=i+Math.imul(p,es)|0)+Math.imul(g,eo)|0,o=o+Math.imul(g,es)|0;var ek=(u+(n=n+Math.imul(d,el)|0)|0)+((8191&(i=(i=i+Math.imul(d,eu)|0)+Math.imul(h,el)|0))<<13)|0;u=((o=o+Math.imul(h,eu)|0)+(i>>>13)|0)+(ek>>>26)|0,ek&=67108863,n=Math.imul(j,z),i=(i=Math.imul(j,F))+Math.imul(B,z)|0,o=Math.imul(B,F),n=n+Math.imul(O,V)|0,i=(i=i+Math.imul(O,$)|0)+Math.imul(L,V)|0,o=o+Math.imul(L,$)|0,n=n+Math.imul(C,q)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(M,J)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,Y)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,ee)|0,n=n+Math.imul(w,er)|0,i=(i=i+Math.imul(w,en)|0)+Math.imul(x,er)|0,o=o+Math.imul(x,en)|0,n=n+Math.imul(y,eo)|0,i=(i=i+Math.imul(y,es)|0)+Math.imul(v,eo)|0,o=o+Math.imul(v,es)|0,n=n+Math.imul(p,el)|0,i=(i=i+Math.imul(p,eu)|0)+Math.imul(g,el)|0,o=o+Math.imul(g,eu)|0;var eS=(u+(n=n+Math.imul(d,ed)|0)|0)+((8191&(i=(i=i+Math.imul(d,eh)|0)+Math.imul(h,ed)|0))<<13)|0;u=((o=o+Math.imul(h,eh)|0)+(i>>>13)|0)+(eS>>>26)|0,eS&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,F))+Math.imul(K,z)|0,o=Math.imul(K,F),n=n+Math.imul(j,V)|0,i=(i=i+Math.imul(j,$)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,$)|0,n=n+Math.imul(O,q)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(L,q)|0,o=o+Math.imul(L,Z)|0,n=n+Math.imul(C,J)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(k,er)|0,i=(i=i+Math.imul(k,en)|0)+Math.imul(S,er)|0,o=o+Math.imul(S,en)|0,n=n+Math.imul(w,eo)|0,i=(i=i+Math.imul(w,es)|0)+Math.imul(x,eo)|0,o=o+Math.imul(x,es)|0,n=n+Math.imul(y,el)|0,i=(i=i+Math.imul(y,eu)|0)+Math.imul(v,el)|0,o=o+Math.imul(v,eu)|0,n=n+Math.imul(p,ed)|0,i=(i=i+Math.imul(p,eh)|0)+Math.imul(g,ed)|0,o=o+Math.imul(g,eh)|0;var eT=(u+(n=n+Math.imul(d,ep)|0)|0)+((8191&(i=(i=i+Math.imul(d,eg)|0)+Math.imul(h,ep)|0))<<13)|0;u=((o=o+Math.imul(h,eg)|0)+(i>>>13)|0)+(eT>>>26)|0,eT&=67108863,n=Math.imul(D,V),i=(i=Math.imul(D,$))+Math.imul(K,V)|0,o=Math.imul(K,$),n=n+Math.imul(j,q)|0,i=(i=i+Math.imul(j,Z)|0)+Math.imul(B,q)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(O,J)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(L,J)|0,o=o+Math.imul(L,Y)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(M,er)|0,i=(i=i+Math.imul(M,en)|0)+Math.imul(A,er)|0,o=o+Math.imul(A,en)|0,n=n+Math.imul(k,eo)|0,i=(i=i+Math.imul(k,es)|0)+Math.imul(S,eo)|0,o=o+Math.imul(S,es)|0,n=n+Math.imul(w,el)|0,i=(i=i+Math.imul(w,eu)|0)+Math.imul(x,el)|0,o=o+Math.imul(x,eu)|0,n=n+Math.imul(y,ed)|0,i=(i=i+Math.imul(y,eh)|0)+Math.imul(v,ed)|0,o=o+Math.imul(v,eh)|0;var eM=(u+(n=n+Math.imul(p,ep)|0)|0)+((8191&(i=(i=i+Math.imul(p,eg)|0)+Math.imul(g,ep)|0))<<13)|0;u=((o=o+Math.imul(g,eg)|0)+(i>>>13)|0)+(eM>>>26)|0,eM&=67108863,n=Math.imul(D,q),i=(i=Math.imul(D,Z))+Math.imul(K,q)|0,o=Math.imul(K,Z),n=n+Math.imul(j,J)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(B,J)|0,o=o+Math.imul(B,Y)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,ee)|0,n=n+Math.imul(C,er)|0,i=(i=i+Math.imul(C,en)|0)+Math.imul(_,er)|0,o=o+Math.imul(_,en)|0,n=n+Math.imul(M,eo)|0,i=(i=i+Math.imul(M,es)|0)+Math.imul(A,eo)|0,o=o+Math.imul(A,es)|0,n=n+Math.imul(k,el)|0,i=(i=i+Math.imul(k,eu)|0)+Math.imul(S,el)|0,o=o+Math.imul(S,eu)|0,n=n+Math.imul(w,ed)|0,i=(i=i+Math.imul(w,eh)|0)+Math.imul(x,ed)|0,o=o+Math.imul(x,eh)|0;var eA=(u+(n=n+Math.imul(y,ep)|0)|0)+((8191&(i=(i=i+Math.imul(y,eg)|0)+Math.imul(v,ep)|0))<<13)|0;u=((o=o+Math.imul(v,eg)|0)+(i>>>13)|0)+(eA>>>26)|0,eA&=67108863,n=Math.imul(D,J),i=(i=Math.imul(D,Y))+Math.imul(K,J)|0,o=Math.imul(K,Y),n=n+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(O,er)|0,i=(i=i+Math.imul(O,en)|0)+Math.imul(L,er)|0,o=o+Math.imul(L,en)|0,n=n+Math.imul(C,eo)|0,i=(i=i+Math.imul(C,es)|0)+Math.imul(_,eo)|0,o=o+Math.imul(_,es)|0,n=n+Math.imul(M,el)|0,i=(i=i+Math.imul(M,eu)|0)+Math.imul(A,el)|0,o=o+Math.imul(A,eu)|0,n=n+Math.imul(k,ed)|0,i=(i=i+Math.imul(k,eh)|0)+Math.imul(S,ed)|0,o=o+Math.imul(S,eh)|0;var eP=(u+(n=n+Math.imul(w,ep)|0)|0)+((8191&(i=(i=i+Math.imul(w,eg)|0)+Math.imul(x,ep)|0))<<13)|0;u=((o=o+Math.imul(x,eg)|0)+(i>>>13)|0)+(eP>>>26)|0,eP&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,ee))+Math.imul(K,Q)|0,o=Math.imul(K,ee),n=n+Math.imul(j,er)|0,i=(i=i+Math.imul(j,en)|0)+Math.imul(B,er)|0,o=o+Math.imul(B,en)|0,n=n+Math.imul(O,eo)|0,i=(i=i+Math.imul(O,es)|0)+Math.imul(L,eo)|0,o=o+Math.imul(L,es)|0,n=n+Math.imul(C,el)|0,i=(i=i+Math.imul(C,eu)|0)+Math.imul(_,el)|0,o=o+Math.imul(_,eu)|0,n=n+Math.imul(M,ed)|0,i=(i=i+Math.imul(M,eh)|0)+Math.imul(A,ed)|0,o=o+Math.imul(A,eh)|0;var eC=(u+(n=n+Math.imul(k,ep)|0)|0)+((8191&(i=(i=i+Math.imul(k,eg)|0)+Math.imul(S,ep)|0))<<13)|0;u=((o=o+Math.imul(S,eg)|0)+(i>>>13)|0)+(eC>>>26)|0,eC&=67108863,n=Math.imul(D,er),i=(i=Math.imul(D,en))+Math.imul(K,er)|0,o=Math.imul(K,en),n=n+Math.imul(j,eo)|0,i=(i=i+Math.imul(j,es)|0)+Math.imul(B,eo)|0,o=o+Math.imul(B,es)|0,n=n+Math.imul(O,el)|0,i=(i=i+Math.imul(O,eu)|0)+Math.imul(L,el)|0,o=o+Math.imul(L,eu)|0,n=n+Math.imul(C,ed)|0,i=(i=i+Math.imul(C,eh)|0)+Math.imul(_,ed)|0,o=o+Math.imul(_,eh)|0;var e_=(u+(n=n+Math.imul(M,ep)|0)|0)+((8191&(i=(i=i+Math.imul(M,eg)|0)+Math.imul(A,ep)|0))<<13)|0;u=((o=o+Math.imul(A,eg)|0)+(i>>>13)|0)+(e_>>>26)|0,e_&=67108863,n=Math.imul(D,eo),i=(i=Math.imul(D,es))+Math.imul(K,eo)|0,o=Math.imul(K,es),n=n+Math.imul(j,el)|0,i=(i=i+Math.imul(j,eu)|0)+Math.imul(B,el)|0,o=o+Math.imul(B,eu)|0,n=n+Math.imul(O,ed)|0,i=(i=i+Math.imul(O,eh)|0)+Math.imul(L,ed)|0,o=o+Math.imul(L,eh)|0;var eI=(u+(n=n+Math.imul(C,ep)|0)|0)+((8191&(i=(i=i+Math.imul(C,eg)|0)+Math.imul(_,ep)|0))<<13)|0;u=((o=o+Math.imul(_,eg)|0)+(i>>>13)|0)+(eI>>>26)|0,eI&=67108863,n=Math.imul(D,el),i=(i=Math.imul(D,eu))+Math.imul(K,el)|0,o=Math.imul(K,eu),n=n+Math.imul(j,ed)|0,i=(i=i+Math.imul(j,eh)|0)+Math.imul(B,ed)|0,o=o+Math.imul(B,eh)|0;var eO=(u+(n=n+Math.imul(O,ep)|0)|0)+((8191&(i=(i=i+Math.imul(O,eg)|0)+Math.imul(L,ep)|0))<<13)|0;u=((o=o+Math.imul(L,eg)|0)+(i>>>13)|0)+(eO>>>26)|0,eO&=67108863,n=Math.imul(D,ed),i=(i=Math.imul(D,eh))+Math.imul(K,ed)|0,o=Math.imul(K,eh);var eL=(u+(n=n+Math.imul(j,ep)|0)|0)+((8191&(i=(i=i+Math.imul(j,eg)|0)+Math.imul(B,ep)|0))<<13)|0;u=((o=o+Math.imul(B,eg)|0)+(i>>>13)|0)+(eL>>>26)|0,eL&=67108863;var eR=(u+(n=Math.imul(D,ep))|0)+((8191&(i=(i=Math.imul(D,eg))+Math.imul(K,ep)|0))<<13)|0;return u=((o=Math.imul(K,eg))+(i>>>13)|0)+(eR>>>26)|0,eR&=67108863,l[0]=em,l[1]=ey,l[2]=ev,l[3]=eb,l[4]=ew,l[5]=ex,l[6]=eE,l[7]=ek,l[8]=eS,l[9]=eT,l[10]=eM,l[11]=eA,l[12]=eP,l[13]=eC,l[14]=e_,l[15]=eI,l[16]=eO,l[17]=eL,l[18]=eR,0!==u&&(l[19]=u,r.length++),r};function y(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,l=Math.min(o,t.length-1),u=Math.max(0,o-e.length+1);u<=l;u++){var c=o-u,d=(0|e.words[c])*(0|t.words[u]),h=67108863&d;s=s+(d/67108864|0)|0,a=67108863&(h=h+a|0),i+=(s=s+(h>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function v(e,t){this.x=e,this.y=t}Math.imul||(m=g),o.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):n<63?g(this,e,t):y(this,e,t)},v.prototype.makeRBT=function(e){for(var t=Array(e),r=o.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},v.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},v.prototype.permute=function(e,t,r,n,i,o){for(var s=0;s<o;s++)n[s]=t[e[s]],i[s]=r[e[s]]},v.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,l=Math.cos(2*Math.PI/a),u=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var d=l,h=u,f=0;f<s;f++){var p=r[c+f],g=n[c+f],m=r[c+f+s],y=n[c+f+s],v=d*m-h*y;y=d*y+h*m,m=v,r[c+f]=p+m,n[c+f]=g+y,r[c+f+s]=p-m,n[c+f+s]=g-y,f!==a&&(v=l*d-u*h,h=l*h+u*d,d=v)}},v.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},v.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},v.prototype.convert13b=function(e,t,r,i){for(var o=0,s=0;s<t;s++)o+=0|e[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===o),n((-8192&o)==0)},v.prototype.stub=function(e){for(var t=Array(e),r=0;r<e;r++)t[r]=0;return t},v.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),s=Array(n),a=Array(n),l=Array(n),u=Array(n),c=Array(n),d=Array(n),h=r.words;h.length=n,this.convert13b(e.words,e.length,s,n),this.convert13b(t.words,t.length,u,n),this.transform(s,o,a,l,n,i),this.transform(u,o,c,d,n,i);for(var f=0;f<n;f++){var p=a[f]*c[f]-l[f]*d[f];l[f]=a[f]*d[f]+l[f]*c[f],a[f]=p}return this.conjugate(a,l,n),this.transform(a,l,h,o,n,i),this.conjugate(h,o,n),this.normalize13b(h,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=Array(this.length+e.length),y(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,s=(67108863&o)+(67108863&r);r>>=26,r+=(o/67108864|0)+(s>>>26),this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=e.words[n]>>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,l=(0|this.words[t])-a<<r;this.words[t]=l|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var i,o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o;if(i-=s,i=Math.max(0,i),r){for(var l=0;l<s;l++)r.words[l]=this.words[l];r.length=s}if(0===s);else if(this.length>s)for(this.length-=s,l=0;l<this.length;l++)this.words[l]=this.words[l+s];else this.words[0]=0,this.length=1;var u=0;for(l=this.length-1;l>=0&&(0!==u||l>=i);l--){var c=0|this.words[l];this.words[l]=u<<26-o|c>>>o,u=c&a}return r&&0!==u&&(r.words[r.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;return!(this.length<=r)&&!!(this.words[r]&1<<t)},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;return(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)?this:(0!==t&&r++,this.length=Math.min(r,this.length),0!==t&&(this.words[this.length-1]&=67108863^67108863>>>t<<t),this._strip())},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return(n("number"==typeof e),n(e<67108864),e<0)?this.isubn(-e):0!==this.negative?(1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0):(this.negative=0,this.isubn(e),this.negative=1),this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var i,o,s=e.length+r;this._expand(s);var a=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+a;var l=(0|e.words[i])*t;o-=67108863&l,a=(o>>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r,n=this.length-e.length,i=this.clone(),s=e,a=0|s.words[s.length-1];0!=(n=26-this._countBits(a))&&(s=s.ushln(n),i.iushln(n),a=0|s.words[s.length-1]);var l=i.length-s.length;if("mod"!==t){(r=new o(null)).length=l+1,r.words=Array(r.length);for(var u=0;u<r.length;u++)r.words[u]=0}var c=i.clone()._ishlnsubmul(s,1,l);0===c.negative&&(i=c,r&&(r.words[l]=1));for(var d=l-1;d>=0;d--){var h=(0|i.words[s.length+d])*67108864+(0|i.words[s.length+d-1]);for(h=Math.min(h/a|0,67108863),i._ishlnsubmul(s,h,d);0!==i.negative;)h--,i.negative=0,i._ishlnsubmul(s,1,d),i.isZero()||(i.negative^=1);r&&(r.words[d]=h)}return r&&r._strip(),i._strip(),"div"!==t&&0!==n&&i.iushrn(n),{div:r||null,mod:i}},o.prototype.divmod=function(e,t,r){var i,s,a;return(n(!e.isZero()),this.isZero())?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):(this.negative&e.negative)!=0?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||0>this.cmp(e)?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t)},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=67108864%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),l=new o(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),d=t.clone();!t.isZero();){for(var h=0,f=1;(t.words[0]&f)==0&&h<26;++h,f<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(d)),i.iushrn(1),s.iushrn(1);for(var p=0,g=1;(r.words[0]&g)==0&&p<26;++p,g<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(c),l.isub(d)),a.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),s.isub(l)):(r.isub(t),a.isub(i),l.isub(s))}return{a:a,b:l,gcd:r.iushln(u)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t,r=this,i=e.clone();r=0!==r.negative?r.umod(e):r.clone();for(var s=new o(1),a=new o(0),l=i.clone();r.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,c=1;(r.words[0]&c)==0&&u<26;++u,c<<=1);if(u>0)for(r.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var d=0,h=1;(i.words[0]&h)==0&&d<26;++d,h<<=1);if(d>0)for(i.iushrn(d);d-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);r.cmp(i)>=0?(r.isub(i),s.isub(a)):(i.isub(r),a.isub(s))}return 0>(t=0===r.cmpn(1)?s:a).cmpn(0)&&t.iadd(e),t},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return(1&this.words[0])==0},o.prototype.isOdd=function(){return(1&this.words[0])==1},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];a+=o,o=a>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return -1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return -1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return -1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return -1===this.cmpn(e)},o.prototype.lt=function(e){return -1===this.cmp(e)},o.prototype.lten=function(e){return 0>=this.cmpn(e)},o.prototype.lte=function(e){return 0>=this.cmp(e)},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new T(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function M(e){T.call(this,e),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)}w.prototype._tmp=function(){var e=new o(null);return e.words=Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,r=e;do this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength();while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},i(x,w),x.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n<r;n++)t.words[n]=e.words[n];if(t.length=r,e.length<=9){e.words[0]=0,e.length=1;return}var i=e.words[9];for(n=10,t.words[t.length++]=4194303&i;n<e.length;n++){var o=0|e.words[n];e.words[n-10]=(4194303&o)<<4|i>>>22,i=o}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(E,w),i(k,w),i(S,w),S.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=(0|e.words[r])*19+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){var t;if(b[e])return b[e];if("k256"===e)t=new x;else if("p224"===e)t=new E;else if("p192"===e)t=new k;else if("p25519"===e)t=new S;else throw Error("Unknown prime "+e);return b[e]=t,t},T.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},T.prototype._verify2=function(e,t){n((e.negative|t.negative)==0,"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},T.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},T.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},T.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},T.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},T.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r._forceRed(this)},T.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r},T.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},T.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},T.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},T.prototype.isqr=function(e){return this.imul(e,e.clone())},T.prototype.sqr=function(e){return this.mul(e,e)},T.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),l=a.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var d=this.pow(c,i),h=this.pow(e,i.addn(1).iushrn(1)),f=this.pow(e,i),p=s;0!==f.cmp(a);){for(var g=f,m=0;0!==g.cmp(a);m++)g=g.redSqr();n(m<p);var y=this.pow(d,new o(1).iushln(p-m-1));h=h.redMul(y),d=y.redSqr(),f=f.redMul(d),p=m}return h},T.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},T.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],s=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),n=t.length-1;n>=0;n--){for(var u=t.words[n],c=l-1;c>=0;c--){var d=u>>c&1;if(i!==r[0]&&(i=this.sqr(i)),0===d&&0===s){a=0;continue}s<<=1,s|=d,(4==++a||0===n&&0===c)&&(i=this.mul(i,r[s]),a=0,s=0)}l=26}return i},T.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},T.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new M(e)},i(M,T),M.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},M.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},M.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):0>i.cmpn(0)&&(o=i.iadd(this.m)),o._forceRed(this)},M.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):0>i.cmpn(0)&&(s=i.iadd(this.m)),s._forceRed(this)},M.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},97304:function(e,t,r){var n=r(58162);e.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},77191:function(e,t,r){let n=r(78247);e.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},78247:function(e){"use strict";e.exports=function(e){if(e.length>=255)throw TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var n=0;n<e.length;n++){var i=e.charAt(n),o=i.charCodeAt(0);if(255!==t[o])throw TypeError(i+" is ambiguous");t[o]=n}var s=e.length,a=e.charAt(0),l=Math.log(s)/Math.log(256),u=Math.log(256)/Math.log(s);function c(e){if("string"!=typeof e)throw TypeError("Expected String");if(0===e.length)return new Uint8Array;for(var r=0,n=0,i=0;e[r]===a;)n++,r++;for(var o=(e.length-r)*l+1>>>0,u=new Uint8Array(o);e[r];){var c=t[e.charCodeAt(r)];if(255===c)return;for(var d=0,h=o-1;(0!==c||d<i)&&-1!==h;h--,d++)c+=s*u[h]>>>0,u[h]=c%256>>>0,c=c/256>>>0;if(0!==c)throw Error("Non-zero carry");i=d,r++}for(var f=o-i;f!==o&&0===u[f];)f++;for(var p=new Uint8Array(n+(o-f)),g=n;f!==o;)p[g++]=u[f++];return p}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,i=0,o=t.length;i!==o&&0===t[i];)i++,r++;for(var l=(o-i)*u+1>>>0,c=new Uint8Array(l);i!==o;){for(var d=t[i],h=0,f=l-1;(0!==d||h<n)&&-1!==f;f--,h++)d+=256*c[f]>>>0,c[f]=d%s>>>0,d=d/s>>>0;if(0!==d)throw Error("Non-zero carry");n=h,i++}for(var p=l-n;p!==l&&0===c[p];)p++;for(var g=a.repeat(r);p<l;++p)g+=e.charAt(c[p]);return g},decodeUnsafe:c,decode:function(e){var t=c(e);if(t)return t;throw Error("Non-base"+s+" character")}}}},48764:function(e,t,r){"use strict";/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */let n=r(79742),i=r(80645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function s(e){if(e>2147483647)throw RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return c(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!a.isEncoding(t))throw TypeError("Unknown encoding: "+t);let r=0|p(e,t),n=s(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(N(e,Uint8Array)){let t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(N(e,ArrayBuffer)||e&&N(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(N(e,SharedArrayBuffer)||e&&N(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return a.from(n,t,r);let i=function(e){var t;if(a.isBuffer(e)){let t=0|f(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||(t=e.length)!=t?s(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return u(e),s(e<0?0:0|f(e))}function d(e){let t=e.length<0?0:0|f(e.length),r=s(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function h(e,t,r){let n;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),a.prototype),n}function f(e){if(e>=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function p(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||N(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return R(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return j(e).length;default:if(i)return n?-1:R(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,r){let i=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){let n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=D[e[n]];return i}(this,t,r);case"utf8":case"utf-8":return b(this,t,r);case"ascii":return function(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}(this,t,r);case"latin1":case"binary":return function(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}(this,t,r);case"base64":var o,s;return o=t,s=r,0===o&&s===this.length?n.fromByteArray(this):n.fromByteArray(this.slice(o,s));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){let n=e.slice(t,r),i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}(this,t,r);default:if(i)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function m(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}function y(e,t,r,n,i){var o;if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(o=r=+r)!=o&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return -1;r=e.length-1}else if(r<0){if(!i)return -1;r=0}if("string"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return(t&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){let o,s=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;s=2,a/=2,l/=2,r/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let n=-1;for(o=r;o<a;o++)if(u(e,o)===u(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===l)return n*s}else -1!==n&&(o-=o-n),n=-1}else for(r+l>a&&(r=a-l),o=r;o>=0;o--){let r=!0;for(let n=0;n<l;n++)if(u(e,o+n)!==u(t,n)){r=!1;break}if(r)return o}return -1}function b(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i<r;){let t=e[i],o=null,s=t>239?4:t>223?3:t>191?2:1;if(i+s<=r){let r,n,a,l;switch(s){case 1:t<128&&(o=t);break;case 2:(192&(r=e[i+1]))==128&&(l=(31&t)<<6|63&r)>127&&(o=l);break;case 3:r=e[i+1],n=e[i+2],(192&r)==128&&(192&n)==128&&(l=(15&t)<<12|(63&r)<<6|63&n)>2047&&(l<55296||l>57343)&&(o=l);break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],(192&r)==128&&(192&n)==128&&(192&a)==128&&(l=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a)>65535&&l<1114112&&(o=l)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(e){let t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=4096));return r}(n)}function w(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function x(e,t,r,n,i,o){if(!a.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw RangeError('"value" argument is out of bounds');if(r+n>e.length)throw RangeError("Index out of range")}function E(e,t,r,n,i){_(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function k(e,t,r,n,i){_(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function S(e,t,r,n,i,o){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function T(e,t,r,n,o){return t=+t,r>>>=0,o||S(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function M(e,t,r,n,o){return t=+t,r>>>=0,o||S(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}t.Buffer=a,t.SlowBuffer=function(e){return+e!=e&&(e=0),a.alloc(+e)},t.INSPECT_MAX_BYTES=50,t.kMaxLength=2147483647,a.TYPED_ARRAY_SUPPORT=function(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||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."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,r){return(u(e),e<=0)?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)},a.allocUnsafe=function(e){return c(e)},a.allocUnsafeSlow=function(e){return c(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(N(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),N(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){let r;if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);if(void 0===t)for(r=0,t=0;r<e.length;++r)t+=e[r].length;let n=a.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){let t=e[r];if(N(t,Uint8Array))i+t.length>n.length?(a.isBuffer(t)||(t=a.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else if(a.isBuffer(t))t.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=t.length}return n},a.byteLength=p,a.prototype._isBuffer=!0,a.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)m(this,t,t+1);return this},a.prototype.swap32=function(){let e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},a.prototype.swap64=function(){let e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},a.prototype.toString=function(){let e=this.length;return 0===e?"":0==arguments.length?b(this,0,e):g.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){let e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(a.prototype[o]=a.prototype.inspect),a.prototype.compare=function(e,t,r,n,i){if(N(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,l=Math.min(o,s),u=this.slice(n,i),c=e.slice(t,r);for(let e=0;e<l;++e)if(u[e]!==c[e]){o=u[e],s=c[e];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},a.prototype.indexOf=function(e,t,r){return y(this,e,t,r,!0)},a.prototype.lastIndexOf=function(e,t,r){return y(this,e,t,r,!1)},a.prototype.write=function(e,t,r,n){var i,o,s,a,l,u,c,d;if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let h=this.length-t;if((void 0===r||r>h)&&(r=h),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let f=!1;for(;;)switch(n){case"hex":return function(e,t,r,n){let i;r=Number(r)||0;let o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;let s=t.length;for(n>s/2&&(n=s/2),i=0;i<n;++i){let n=parseInt(t.substr(2*i,2),16);if(n!=n)break;e[r+i]=n}return i}(this,e,t,r);case"utf8":case"utf-8":return i=t,o=r,B(R(e,this.length-i),this,i,o);case"ascii":case"latin1":case"binary":return s=t,a=r,B(function(e){let t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(e),this,s,a);case"base64":return l=t,u=r,B(j(e),this,l,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c=t,d=r,B(function(e,t){let r,n;let i=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)n=(r=e.charCodeAt(o))>>8,i.push(r%256),i.push(n);return i}(e,this.length-c),this,c,d);default:if(f)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),f=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},a.prototype.slice=function(e,t){let r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);let n=this.subarray(e,t);return Object.setPrototypeOf(n,a.prototype),n},a.prototype.readUintLE=a.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},a.prototype.readUintBE=a.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},a.prototype.readUint8=a.prototype.readUInt8=function(e,t){return e>>>=0,t||w(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||w(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||w(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readBigUInt64LE=K(function(e){I(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&O(e,this.length-8);let n=t+256*this[++e]+65536*this[++e]+16777216*this[++e],i=this[++e]+256*this[++e]+65536*this[++e]+16777216*r;return BigInt(n)+(BigInt(i)<<BigInt(32))}),a.prototype.readBigUInt64BE=K(function(e){I(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&O(e,this.length-8);let n=16777216*t+65536*this[++e]+256*this[++e]+this[++e],i=16777216*this[++e]+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)}),a.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},a.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},a.prototype.readInt8=function(e,t){return(e>>>=0,t||w(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||w(e,2,this.length);let r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(e,t){e>>>=0,t||w(e,2,this.length);let r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||w(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||w(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readBigInt64LE=K(function(e){I(e>>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&O(e,this.length-8),(BigInt(this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24))<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+16777216*this[++e])}),a.prototype.readBigInt64BE=K(function(e){I(e>>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&O(e,this.length-8),(BigInt((t<<24)+65536*this[++e]+256*this[++e]+this[++e])<<BigInt(32))+BigInt(16777216*this[++e]+65536*this[++e]+256*this[++e]+r)}),a.prototype.readFloatLE=function(e,t){return e>>>=0,t||w(e,4,this.length),i.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||w(e,4,this.length),i.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||w(e,8,this.length),i.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||w(e,8,this.length),i.read(this,e,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;x(this,e,t,r,n,0)}let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;x(this,e,t,r,n,0)}let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},a.prototype.writeUint8=a.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeBigUInt64LE=K(function(e,t=0){return E(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=K(function(e,t=0){return k(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){let n=Math.pow(2,8*r-1);x(this,e,t,r,n-1,-n)}let i=0,o=1,s=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},a.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){let n=Math.pow(2,8*r-1);x(this,e,t,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeBigInt64LE=K(function(e,t=0){return E(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=K(function(e,t=0){return k(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeFloatLE=function(e,t,r){return T(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return T(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return M(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return M(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,n){if(!a.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);let i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},a.prototype.fill=function(e,t,r,n){let i;if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){let t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw RangeError("Out of range index");if(r<=t)return this;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{let o=a.isBuffer(e)?e:a.from(e,n),s=o.length;if(0===s)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%s]}return this};let A={};function P(e,t,r){A[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function C(e){let t="",r=e.length,n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function _(e,t,r,n,i,o){if(e>r||e<t){let n;let i="bigint"==typeof t?"n":"";throw n=o>3?0===t||t===BigInt(0)?`>= 0${i} and < 2${i} ** ${(o+1)*8}${i}`:`>= -(2${i} ** ${(o+1)*8-1}${i}) and < 2 ** ${(o+1)*8-1}${i}`:`>= ${t}${i} and <= ${r}${i}`,new A.ERR_OUT_OF_RANGE("value",n,e)}I(i,"offset"),(void 0===n[i]||void 0===n[i+o])&&O(i,n.length-(o+1))}function I(e,t){if("number"!=typeof e)throw new A.ERR_INVALID_ARG_TYPE(t,"number",e)}function O(e,t,r){if(Math.floor(e)!==e)throw I(e,r),new A.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new A.ERR_BUFFER_OUT_OF_BOUNDS;throw new A.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}P("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),P("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),P("ERR_OUT_OF_RANGE",function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>4294967296?i=C(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=C(i)),i+="n"),n+=` It must be ${t}. Received ${i}`},RangeError);let L=/[^+/0-9A-Za-z-_]/g;function R(e,t){let r;t=t||1/0;let n=e.length,i=null,o=[];for(let s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319||s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function j(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(L,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function B(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function N(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}let D=function(){let e="0123456789abcdef",t=Array(256);for(let r=0;r<16;++r){let n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function K(e){return"undefined"==typeof BigInt?U:e}function U(){throw Error("BigInt not supported")}},75678:function(e,t,r){var n;n=function(e){"use strict";if(!e)throw Error("tweetnacl not loaded");var t=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;t++)r[t]=e[t];return r},r=t(),n=t([1]),i=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),o=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function s(e){var t,r;for(r=0;r<16;r++)e[r]+=65536,t=Math.floor(e[r]/65536),e[(r+1)*(r<15?1:0)]+=t-1+37*(t-1)*(15===r?1:0),e[r]-=65536*t}function a(e,t,r){var n;for(n=0;n<16;n++)e[n]=t[n]+r[n]|0}function l(e,t,r){var n;for(n=0;n<16;n++)e[n]=t[n]-r[n]|0}function u(e,t,r){var n,i,o=new Float64Array(31);for(n=0;n<31;n++)o[n]=0;for(n=0;n<16;n++)for(i=0;i<16;i++)o[n+i]+=t[n]*r[i];for(n=0;n<15;n++)o[n]+=38*o[n+16];for(n=0;n<16;n++)e[n]=o[n];s(e),s(e)}function c(e,r){var n,i,o,a=t(),l=t();for(n=0;n<16;n++)l[n]=r[n];for(s(l),s(l),s(l),i=0;i<2;i++){for(n=1,a[0]=l[0]-65517;n<15;n++)a[n]=l[n]-65535-(a[n-1]>>16&1),a[n-1]&=65535;a[15]=l[15]-32767-(a[14]>>16&1),o=a[15]>>16&1,a[14]&=65535,function(e,t,r){for(var n,i=~(r-1),o=0;o<16;o++)n=i&(e[o]^t[o]),e[o]^=n,t[o]^=n}(l,a,1-o)}for(n=0;n<16;n++)e[2*n]=255&l[n],e[2*n+1]=l[n]>>8}function d(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return c(r,e),c(n,t),function(e,t,r,n,i){var o,s=0;for(o=0;o<32;o++)s|=e[0+o]^r[0+o];return(1&s-1>>>8)-1}(r,0,n,0,0)}function h(e){var s,h,f,p,g,m,y,v,b,w,x,E,k,S,T=new Uint8Array(32),M=[t(),t(),t(),t()],A=t(),P=t();if(s=M,h=e,v=t(),b=t(),w=t(),x=t(),E=t(),k=t(),S=t(),(function(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}(s[2],n),function(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}(s[1],h),u(w,f=s[1],f),u(x,w,i),l(w,w,s[2]),a(x,s[2],x),u(E,x,x),u(k,E,E),u(S,k,E),u(v,S,w),u(v,v,x),function(e,r){var n,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=250;n>=0;n--)u(i,i,i),1!==n&&u(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}(v,v),u(v,v,w),u(v,v,x),u(v,v,x),u(s[0],v,x),u(b,p=s[0],p),u(b,b,x),d(b,w)&&u(s[0],s[0],o),u(b,g=s[0],g),u(b,b,x),d(b,w))?-1:(m=s[0],c(y=new Uint8Array(32),m),(1&y[0])==h[31]>>7&&l(s[0],r,s[0]),u(s[3],s[0],s[1]),0))return null;var C=M[1];return a(A,n,C),l(P,n,C),function(e,r){var n,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=253;n>=0;n--)u(i,i,i),2!==n&&4!==n&&u(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}(P,P),u(A,A,P),c(T,A),T}function f(t){var r,n=new Uint8Array(64),i=new Uint8Array(32);for(e.lowlevel.crypto_hash(n,t,32),n[0]&=248,n[31]&=127,n[31]|=64,r=0;r<32;r++)i[r]=n[r];for(r=0;r<64;r++)n[r]=0;return i}return{convertPublicKey:h,convertSecretKey:f,convertKeyPair:function(e){var t=h(e.publicKey);return t?{publicKey:t,secretKey:f(e.secretKey)}:null}}},e.exports?e.exports=n(r(50780)):this.ed2curve=n(this.nacl)},26729:function(e){"use strict";var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,n,o,s){if("function"!=typeof n)throw TypeError("The listener must be a function");var a=new i(n,o||e,s),l=r?r+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],a]:e._events[l].push(a):(e._events[l]=a,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1)),a.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,s=Array(o);i<o;i++)s[i]=n[i].fn;return s},a.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},a.prototype.emit=function(e,t,n,i,o,s){var a=r?r+e:e;if(!this._events[a])return!1;var l,u,c=this._events[a],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,o),!0;case 6:return c.fn.call(c.context,t,n,i,o,s),!0}for(u=1,l=Array(d-1);u<d;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var h,f=c.length;for(u=0;u<f;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),d){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,n);break;case 4:c[u].fn.call(c[u].context,t,n,i);break;default:if(!l)for(h=1,l=Array(d-1);h<d;h++)l[h-1]=arguments[h];c[u].fn.apply(c[u].context,l)}}return!0},a.prototype.on=function(e,t,r){return o(this,e,t,r,!1)},a.prototype.once=function(e,t,r){return o(this,e,t,r,!0)},a.prototype.removeListener=function(e,t,n,i){var o=r?r+e:e;if(!this._events[o])return this;if(!t)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==t||i&&!a.once||n&&a.context!==n||s(this,o);else{for(var l=0,u=[],c=a.length;l<c;l++)(a[l].fn!==t||i&&!a[l].once||n&&a[l].context!==n)&&u.push(a[l]);u.length?this._events[o]=1===u.length?u[0]:u:s(this,o)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,e.exports=a},80645:function(e,t){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,l=(1<<a)-1,u=l>>1,c=-7,d=r?i-1:0,h=r?-1:1,f=e[t+d];for(d+=h,o=f&(1<<-c)-1,f>>=-c,c+=a;c>0;o=256*o+e[t+d],d+=h,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+e[t+d],d+=h,c-=8);if(0===o)o=1-u;else{if(o===l)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,n),o-=u}return(f?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,l,u=8*o-i-1,c=(1<<u)-1,d=c>>1,h=23===i?5960464477539062e-23:0,f=n?0:o-1,p=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+d>=1?t+=h/l:t+=h*Math.pow(2,1-d),t*l>=2&&(s++,l/=2),s+d>=c?(a=0,s=c):s+d>=1?(a=(t*l-1)*Math.pow(2,i),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;e[r+f]=255&a,f+=p,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;e[r+f]=255&s,f+=p,s/=256,u-=8);e[r+f-p]|=128*g}},31198:function(e,t,r){"use strict";let n=r(74880).v4,i=r(17741),o=function(e,t){if(!(this instanceof o))return new o(e,t);t||(t={}),this.options={reviver:void 0!==t.reviver?t.reviver:null,replacer:void 0!==t.replacer?t.replacer:null,generator:void 0!==t.generator?t.generator:function(){return n()},version:void 0!==t.version?t.version:2,notificationIdNull:"boolean"==typeof t.notificationIdNull&&t.notificationIdNull},this.callServer=e};e.exports=o,o.prototype.request=function(e,t,r,n){let o;let s=this,a=null,l=Array.isArray(e)&&"function"==typeof t;if(1===this.options.version&&l)throw TypeError("JSON-RPC 1.0 does not support batching");let u=!l&&e&&"object"==typeof e&&"function"==typeof t;if(l||u)n=t,a=e;else{"function"==typeof r&&(n=r,r=void 0);let o="function"==typeof n;try{a=i(e,t,r,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(e){if(o)return n(e);throw e}if(!o)return a}try{o=JSON.stringify(a,this.options.replacer)}catch(e){return n(e)}return this.callServer(o,function(e,t){s._parseResponse(e,t,n)}),a},o.prototype._parseResponse=function(e,t,r){let n;if(e){r(e);return}if(!t)return r();try{n=JSON.parse(t,this.options.reviver)}catch(e){return r(e)}if(3===r.length){if(!Array.isArray(n))return r(null,n.error,n.result);{let e=function(e){return void 0!==e.error};return r(null,n.filter(e),n.filter(function(t){return!e(t)}))}}r(null,n)}},17741:function(e,t,r){"use strict";let n=r(74880).v4;e.exports=function(e,t,r,i){if("string"!=typeof e)throw TypeError(e+" must be a string");let o="number"==typeof(i=i||{}).version?i.version:2;if(1!==o&&2!==o)throw TypeError(o+" must be 1 or 2");let s={method:e};if(2===o&&(s.jsonrpc="2.0"),t){if("object"!=typeof t&&!Array.isArray(t))throw TypeError(t+" must be an object, array or omitted");s.params=t}if(void 0===r){let e="function"==typeof i.generator?i.generator:function(){return n()};s.id=e(s,i)}else 2===o&&null===r?i.notificationIdNull&&(s.id=null):s.id=r;return s}},36593:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ACTION_FAST_REFRESH:function(){return d},ACTION_NAVIGATE:function(){return a},ACTION_PREFETCH:function(){return c},ACTION_REFRESH:function(){return s},ACTION_RESTORE:function(){return l},ACTION_SERVER_ACTION:function(){return h},ACTION_SERVER_PATCH:function(){return u},PrefetchCacheEntryStatus:function(){return o},PrefetchKind:function(){return i},isThenable:function(){return f}});var r,n,i,o,s="refresh",a="navigate",l="restore",u="server-patch",c="prefetch",d="fast-refresh",h="server-action";function f(e){return e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}(r=i||(i={})).AUTO="auto",r.FULL="full",r.TEMPORARY="temporary",(n=o||(o={})).fresh="fresh",n.reusable="reusable",n.expired="expired",n.stale="stale",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},83617:function(e,t,r){"use strict";function n(e,t,r,n){return!1}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return n}}),r(61063),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},78065:function(e,t,r){"use strict";var n=r(20968),i=r(43171),o=r(47069),s=r(64687),a=r(67752),l=["href","as","children","prefetch","passHref","replace","shallow","scroll","locale","onClick","onMouseEnter","onTouchStart","legacyBehavior"];function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return P}});var d=r(10260),h=r(85893),f=d._(r(67294)),p=r(68364),g=r(25656),m=r(92151),y=r(9642),v=r(23443),b=r(21770),w=r(45074),x=r(1561),E=r(83617),k=r(85439),S=r(36593),T=new Set;function M(e,t,r,n,i,o){if(o||(0,g.isLocalURL)(t)){if(!n.bypassPrefetchedCheck){var l,u=t+"%"+r+"%"+(void 0!==n.locale?n.locale:"locale"in e?e.locale:void 0);if(T.has(u))return;T.add(u)}(l=a(s.mark(function a(){return s.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(!o){s.next=4;break}return s.abrupt("return",e.prefetch(t,i));case 4:return s.abrupt("return",e.prefetch(t,r,n));case 5:case"end":return s.stop()}},a)})),function(){return l.apply(this,arguments)})().catch(function(e){})}}function A(e){return"string"==typeof e?e:(0,m.formatUrl)(e)}var P=f.default.forwardRef(function(e,t){var r,n,s=e.href,a=e.as,u=e.children,d=e.prefetch,m=void 0===d?null:d,T=e.passHref,P=e.replace,C=e.shallow,_=e.scroll,I=e.locale,O=e.onClick,L=e.onMouseEnter,R=e.onTouchStart,j=e.legacyBehavior,B=void 0!==j&&j,N=o(e,l);r=u,B&&("string"==typeof r||"number"==typeof r)&&(r=(0,h.jsx)("a",{children:r}));var D=f.default.useContext(b.RouterContext),K=f.default.useContext(w.AppRouterContext),U=null!=D?D:K,z=!D,F=!1!==m,W=null===m?S.PrefetchKind.AUTO:S.PrefetchKind.FULL,V=f.default.useMemo(function(){if(!D){var e=A(s);return{href:e,as:a?A(a):e}}var t=i((0,p.resolveHref)(D,s,!0),2),r=t[0],n=t[1];return{href:r,as:a?(0,p.resolveHref)(D,a):n||r}},[D,s,a]),$=V.href,H=V.as,q=f.default.useRef($),Z=f.default.useRef(H);B&&(n=f.default.Children.only(r));var G=B?n&&"object"==typeof n&&n.ref:t,J=i((0,x.useIntersection)({rootMargin:"200px"}),3),Y=J[0],X=J[1],Q=J[2],ee=f.default.useCallback(function(e){(Z.current!==H||q.current!==$)&&(Q(),Z.current=H,q.current=$),Y(e),G&&("function"==typeof G?G(e):"object"==typeof G&&(G.current=e))},[H,G,$,Q,Y]);f.default.useEffect(function(){U&&X&&F&&M(U,$,H,{locale:I},{kind:W},z)},[H,$,X,I,F,null==D?void 0:D.locale,U,z,W]);var et={ref:ee,onClick:function(e){B||"function"!=typeof O||O(e),B&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(e),U&&!e.defaultPrevented&&function(e,t,r,n,i,o,s,a,l){if(!("A"===e.currentTarget.nodeName.toUpperCase()&&((u=e.currentTarget.getAttribute("target"))&&"_self"!==u||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which||!l&&!(0,g.isLocalURL)(r)))){e.preventDefault();var u,c=function(){var e=null==s||s;"beforePopState"in t?t[i?"replace":"push"](r,n,{shallow:o,locale:a,scroll:e}):t[i?"replace":"push"](n||r,{scroll:e})};l?f.default.startTransition(c):c()}}(e,U,$,H,P,C,_,I,z)},onMouseEnter:function(e){B||"function"!=typeof L||L(e),B&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),U&&(F||!z)&&M(U,$,H,{locale:I,priority:!0,bypassPrefetchedCheck:!0},{kind:W},z)},onTouchStart:function(e){B||"function"!=typeof R||R(e),B&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),U&&(F||!z)&&M(U,$,H,{locale:I,priority:!0,bypassPrefetchedCheck:!0},{kind:W},z)}};if((0,y.isAbsoluteUrl)(H))et.href=H;else if(!B||T||"a"===n.type&&!("href"in n.props)){var er=void 0!==I?I:null==D?void 0:D.locale,en=(null==D?void 0:D.isLocaleDomain)&&(0,E.getDomainLocale)(H,er,null==D?void 0:D.locales,null==D?void 0:D.domainLocales);et.href=en||(0,k.addBasePath)((0,v.addLocale)(H,er,null==D?void 0:D.defaultLocale))}return B?f.default.cloneElement(n,et):(0,h.jsx)("a",c(c(c({},N),et),{},{children:r}))});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1561:function(e,t,r){"use strict";var n=r(43171);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return u}});var i=r(67294),o=r(71650),s="function"==typeof IntersectionObserver,a=new Map,l=[];function u(e){var t=e.rootRef,r=e.rootMargin,u=e.disabled||!s,c=n((0,i.useState)(!1),2),d=c[0],h=c[1],f=(0,i.useRef)(null),p=(0,i.useCallback)(function(e){f.current=e},[]);return(0,i.useEffect)(function(){if(s){if(!u&&!d){var e,n,i,c,p,g=f.current;if(g&&g.tagName)return e=function(e){return e&&h(e)},i=(n=function(e){var t,r={root:e.root||null,margin:e.rootMargin||""},n=l.find(function(e){return e.root===r.root&&e.margin===r.margin});if(n&&(t=a.get(n)))return t;var i=new Map;return t={id:r,observer:new IntersectionObserver(function(e){e.forEach(function(e){var t=i.get(e.target),r=e.isIntersecting||e.intersectionRatio>0;t&&r&&t(r)})},e),elements:i},l.push(r),a.set(r,t),t}({root:null==t?void 0:t.current,rootMargin:r})).id,c=n.observer,(p=n.elements).set(g,e),c.observe(g),function(){if(p.delete(g),c.unobserve(g),0===p.size){c.disconnect(),a.delete(i);var e=l.findIndex(function(e){return e.root===i.root&&e.margin===i.margin});e>-1&&l.splice(e,1)}}}}else if(!d){var m=(0,o.requestIdleCallback)(function(){return h(!0)});return function(){return(0,o.cancelIdleCallback)(m)}}},[u,r,t,d,f.current]),[p,d,(0,i.useCallback)(function(){h(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},31240:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AmpStateContext",{enumerable:!0,get:function(){return n}});var n=r(10260)._(r(67294)).default.createContext({})},68911:function(e,t){"use strict";function r(e){var t=void 0===e?{}:e,r=t.ampFirst,n=t.hybrid,i=t.hasQuery;return void 0!==r&&r||void 0!==n&&n&&void 0!==i&&i}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isInAmpMode",{enumerable:!0,get:function(){return r}})},40325:function(e,t,r){"use strict";var n=r(20968);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return c},noSSR:function(){return u}});var s=r(10260);r(85893),r(67294);var a=s._(r(48809));function l(e){return{default:(null==e?void 0:e.default)||e}}function u(e,t){return delete t.webpack,delete t.modules,e(t)}function c(e,t){var r=a.default,n={loading:function(e){return e.error,e.isLoading,e.pastDelay,null}};e instanceof Promise?n.loader=function(){return e}:"function"==typeof e?n.loader=e:"object"==typeof e&&(n=o(o({},n),e));var i=(n=o(o({},n),t)).loader;return(n.loadableGenerated&&(n=o(o({},n),n.loadableGenerated),delete n.loadableGenerated),"boolean"!=typeof n.ssr||n.ssr)?r(o(o({},n),{},{loader:function(){return null!=i?i().then(l):Promise.resolve(l(function(){return null}))}})):(delete n.webpack,delete n.modules,u(r,n))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},49903:function(e,t,r){"use strict";var n=r(20968);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return y},defaultHead:function(){return f}});var o=r(10260),s=r(77697),a=r(85893),l=s._(r(67294)),u=o._(r(53367)),c=r(31240),d=r(20870),h=r(68911);function f(e){void 0===e&&(e=!1);var t=[(0,a.jsx)("meta",{charSet:"utf-8"})];return e||t.push((0,a.jsx)("meta",{name:"viewport",content:"width=device-width"})),t}function p(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===l.default.Fragment?e.concat(l.default.Children.toArray(t.props.children).reduce(function(e,t){return"string"==typeof t||"number"==typeof t?e:e.concat(t)},[])):e.concat(t)}r(77668);var g=["name","httpEquiv","charSet","itemProp"];function m(e,t){var r,o,s,a,u=t.inAmpMode;return e.reduce(p,[]).reverse().concat(f(u).reverse()).filter((r=new Set,o=new Set,s=new Set,a={},function(e){var t=!0,n=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){n=!0;var i=e.key.slice(e.key.indexOf("$")+1);r.has(i)?t=!1:r.add(i)}switch(e.type){case"title":case"base":o.has(e.type)?t=!1:o.add(e.type);break;case"meta":for(var l=0,u=g.length;l<u;l++){var c=g[l];if(e.props.hasOwnProperty(c)){if("charSet"===c)s.has(c)?t=!1:s.add(c);else{var d=e.props[c],h=a[c]||new Set;("name"!==c||!n)&&h.has(d)?t=!1:(h.add(d),a[c]=h)}}}}return t})).reverse().map(function(e,t){var r=e.key||t;if(!u&&"link"===e.type&&e.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some(function(t){return e.props.href.startsWith(t)})){var o=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},e.props||{});return o["data-href"]=o.href,o.href=void 0,o["data-optimized-fonts"]=!0,l.default.cloneElement(e,o)}return l.default.cloneElement(e,{key:r})})}var y=function(e){var t=e.children,r=(0,l.useContext)(c.AmpStateContext),n=(0,l.useContext)(d.HeadManagerContext);return(0,a.jsx)(u.default,{reduceComponentsToState:m,headManager:n,inAmpMode:(0,h.isInAmpMode)(r),children:t})};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},22362:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return n}});var n=r(10260)._(r(67294)).default.createContext(null)},48809:function(e,t,r){"use strict";/**
@copyright (c) 2017-present James Kyle <me@thejameskyle.com>
 MIT License
 Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
 The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
*/var n=r(20968),i=r(23322),o=r(16089);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return v}});var u=r(10260)._(r(67294)),c=r(22362),d=[],h=[],f=!1;function p(e){var t=e(),r={loading:!0,loaded:null,error:null};return r.promise=t.then(function(e){return r.loading=!1,r.loaded=e,e}).catch(function(e){throw r.loading=!1,r.error=e,e}),r}var g=function(){function e(t,r){i(this,e),this._loadFn=t,this._opts=r,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}return o(e,[{key:"promise",value:function(){return this._res.promise}},{key:"retry",value:function(){var e=this;this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};var t=this._res,r=this._opts;t.loading&&("number"==typeof r.delay&&(0===r.delay?this._state.pastDelay=!0:this._delay=setTimeout(function(){e._update({pastDelay:!0})},r.delay)),"number"==typeof r.timeout&&(this._timeout=setTimeout(function(){e._update({timedOut:!0})},r.timeout))),this._res.promise.then(function(){e._update({}),e._clearTimeouts()}).catch(function(t){e._update({}),e._clearTimeouts()}),this._update({})}},{key:"_update",value:function(e){this._state=a(a({},this._state),{},{error:this._res.error,loaded:this._res.loaded,loading:this._res.loading},e),this._callbacks.forEach(function(e){return e()})}},{key:"_clearTimeouts",value:function(){clearTimeout(this._delay),clearTimeout(this._timeout)}},{key:"getCurrentValue",value:function(){return this._state}},{key:"subscribe",value:function(e){var t=this;return this._callbacks.add(e),function(){t._callbacks.delete(e)}}}]),e}();function m(e){return function(e,t){var r=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),n=null;function i(){if(!n){var t=new g(e,r);n={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return n.promise()}if(!f){var o=r.webpack?r.webpack():r.modules;o&&h.push(function(e){var t,r=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return l(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,void 0)}}(e))){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw o}}}}(o);try{for(r.s();!(t=r.n()).done;){var n=t.value;if(e.includes(n))return i()}}catch(e){r.e(e)}finally{r.f()}})}function s(e,t){i(),(o=u.default.useContext(c.LoadableContext))&&Array.isArray(r.modules)&&r.modules.forEach(function(e){o(e)});var o,s=u.default.useSyncExternalStore(n.subscribe,n.getCurrentValue,n.getCurrentValue);return u.default.useImperativeHandle(t,function(){return{retry:n.retry}},[]),u.default.useMemo(function(){var t;return s.loading||s.error?u.default.createElement(r.loading,{isLoading:s.loading,pastDelay:s.pastDelay,timedOut:s.timedOut,error:s.error,retry:n.retry}):s.loaded?u.default.createElement((t=s.loaded)&&t.default?t.default:t,e):null},[e,s])}return s.preload=function(){return i()},s.displayName="LoadableComponent",u.default.forwardRef(s)}(p,e)}function y(e,t){for(var r=[];e.length;){var n=e.pop();r.push(n(t))}return Promise.all(r).then(function(){if(e.length)return y(e,t)})}m.preloadAll=function(){return new Promise(function(e,t){y(d).then(e,t)})},m.preloadReady=function(e){return void 0===e&&(e=[]),new Promise(function(t){var r=function(){return f=!0,t()};y(h,e).then(r,r)})},window.__NEXT_PRELOADREADY=m.preloadReady;var v=m},53367:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}});var n=r(67294),i=n.useLayoutEffect,o=n.useEffect;function s(e){var t=e.headManager,r=e.reduceComponentsToState;function s(){if(t&&t.mountedInstances){var i=n.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(r(i,e))}}return i(function(){var r;return null==t||null==(r=t.mountedInstances)||r.add(e.children),function(){var r;null==t||null==(r=t.mountedInstances)||r.delete(e.children)}}),i(function(){return t&&(t._pendingUpdate=s),function(){t&&(t._pendingUpdate=s)}}),o(function(){return t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),function(){t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)}}),null}},77668:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"warnOnce",{enumerable:!0,get:function(){return r}});var r=function(e){}},3098:function(e,t,r){"use strict";r.d(t,{H:function(){return l},a:function(){return u}});var n=r(67294),i=r(4065),o=r(54306),s=r(85893),a=(0,n.createContext)(null),l=function(e){var t=e.children,r=(0,n.useState)(!1),l=r[0],u=r[1],c=(0,n.useState)(""),d=c[0],h=c[1],f=(0,o.O)(),p=f.publicKey;f.connected;var g=(0,n.useState)(function(){return localStorage.getItem("jwt-token")||""}),m=g[0],y=g[1];(0,n.useEffect)(function(){localStorage.setItem("jwt-token",m)},[m]);var v=function(){var e;return(null===(e=window)||void 0===e?void 0:e.solana)||null},b=function(){y(""),i.Tc.setJwtToken(""),u(!1)};(0,n.useEffect)(function(){var e=v(),t=function(e){if(e){var t=e.toBase58();t&&t!==d&&(h(t),i.Tc.setJwtToken(""),u(!1))}};return e&&e.on("accountChanged",t),function(){e&&e.off("accountChanged",t)}},[d]);var w=function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");return t.padEnd(t.length+(4-t.length%4)%4,"=")},x=function(e){try{var t=e.split(".")[1],r=w(t),n=atob(r);return JSON.parse(n)}catch(e){return null}};return(0,n.useEffect)(function(){var e=function(){var e=localStorage.getItem("jwt-token");if(e){var t=x(e);t&&1e3*t.exp<Date.now()||null===t?b():t.public_key!==d&&(d||t.public_key!==(null==p?void 0:p.toBase58()))||(y(e),i.Tc.setJwtToken(e),u(!0))}else b()};e();var t=setInterval(e,12e4),r=function(t){"jwt-token"===t.key&&e()};return window.addEventListener("storage",r),function(){clearInterval(t),window.removeEventListener("storage",r)}},[d,p]),(0,s.jsx)(a.Provider,{value:{isAuthenticated:l,setIsAuthenticated:u,currentWallet:d,setCurrentWallet:h,jwtToken:m,setJwtToken:y},children:t})},u=function(){return(0,n.useContext)(a)}},76423:function(e,t,r){"use strict";let n,i,o,s;r.r(t),r.d(t,{default:function(){return ln}});var a,l,u,c,d,h,f,p,g,m,y,v,b,w,x,E,k,S,T,M,A,P,C,_,I,O,L,R,j=r(59499),B=r(9008),N=r.n(B),D=r(50029),K=r(64687),U=r.n(K),z=r(13100),F=r(67294),W=r(44718);let V=({children:e,endpoint:t,config:r={commitment:"confirmed"}})=>{let n=(0,F.useMemo)(()=>new z.Connection(t,r),[t,r]);return F.createElement(W.h.Provider,{value:{connection:n}},e)};var $=r(69607),H=r(35615);function q(e){return"version"in e}class Z extends $.mI{async sendTransaction(e,t,r={}){let n=!0;try{if(q(e)){if(!this.supportedTransactionVersions)throw new H.IW("Sending versioned transactions isn't supported by this wallet");if(!this.supportedTransactionVersions.has(e.version))throw new H.IW(`Sending transaction version ${e.version} isn't supported by this wallet`);try{let n=(e=await this.signTransaction(e)).serialize();return await t.sendRawTransaction(n,r)}catch(e){if(e instanceof H.PY)throw n=!1,e;throw new H.IW(e?.message,e)}}else try{let{signers:n,...i}=r;e=await this.prepareTransaction(e,t,i),n?.length&&e.partialSign(...n);let o=(e=await this.signTransaction(e)).serialize();return await t.sendRawTransaction(o,i)}catch(e){if(e instanceof H.PY)throw n=!1,e;throw new H.IW(e?.message,e)}}catch(e){throw n&&this.emit("error",e),e}}async signAllTransactions(e){for(let t of e)if(q(t)){if(!this.supportedTransactionVersions)throw new H.PY("Signing versioned transactions isn't supported by this wallet");if(!this.supportedTransactionVersions.has(t.version))throw new H.PY(`Signing transaction version ${t.version} isn't supported by this wallet`)}let t=[];for(let r of e)t.push(await this.signTransaction(r));return t}}class G extends Z{}let J={ERROR_ASSOCIATION_PORT_OUT_OF_RANGE:"ERROR_ASSOCIATION_PORT_OUT_OF_RANGE",ERROR_FORBIDDEN_WALLET_BASE_URL:"ERROR_FORBIDDEN_WALLET_BASE_URL",ERROR_SECURE_CONTEXT_REQUIRED:"ERROR_SECURE_CONTEXT_REQUIRED",ERROR_SESSION_CLOSED:"ERROR_SESSION_CLOSED",ERROR_SESSION_TIMEOUT:"ERROR_SESSION_TIMEOUT",ERROR_WALLET_NOT_FOUND:"ERROR_WALLET_NOT_FOUND"};class Y extends Error{constructor(...e){let[t,r,n]=e;super(r),this.code=t,this.data=n,this.name="SolanaMobileWalletAdapterError"}}class X extends Error{constructor(...e){let[t,r,n,i]=e;super(n),this.code=r,this.data=i,this.jsonRpcMessageId=t,this.name="SolanaMobileWalletAdapterProtocolError"}}function Q(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})}function ee(e,t){return{additionalData:e,iv:t,name:"AES-GCM",tagLength:128}}function et(e){if(e<49152||e>65535)throw new Y(J.ERROR_ASSOCIATION_PORT_OUT_OF_RANGE,`Association port number must be between 49152 and 65535. ${e} given.`,{port:e});return e}function er(e){return e.replace(/(^\/+|\/+$)/g,"").split("/")}let en={Firefox:0,Other:1},ei=null,eo=[150,150,200,500,500,750,750,1e3];var es=r(77191);function ea(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function el(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})}function eu(e){return window.btoa(String.fromCharCode.call(null,...e))}function ec(e){return new Uint8Array(window.atob(e).split("").map(e=>e.charCodeAt(0)))}function ed(e){return eu("version"in e?e.serialize():e.serialize({requireAllSignatures:!1,verifySignatures:!1}))}function eh(e){let t=e[0]*z.SIGNATURE_LENGTH_IN_BYTES+1;return"legacy"===z.VersionedMessage.deserializeMessageVersion(e.slice(t,e.length))?z.Transaction.from(e):z.VersionedTransaction.deserialize(e)}function ef(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})}let ep="Mobile Wallet Adapter";function eg(e){return"version"in e}class em extends G{constructor(e){super(),this.supportedTransactionVersions=new Set(["legacy",0]),this.name=ep,this.url="https://solanamobile.com/wallets",this.icon="data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjI4IiB3aWR0aD0iMjgiIHZpZXdCb3g9Ii0zIDAgMjggMjgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI0RDQjhGRiI+PHBhdGggZD0iTTE3LjQgMTcuNEgxNXYyLjRoMi40di0yLjRabTEuMi05LjZoLTIuNHYyLjRoMi40VjcuOFoiLz48cGF0aCBkPSJNMjEuNiAzVjBoLTIuNHYzaC0zLjZWMGgtMi40djNoLTIuNHY2LjZINC41YTIuMSAyLjEgMCAxIDEgMC00LjJoMi43VjNINC41QTQuNSA0LjUgMCAwIDAgMCA3LjVWMjRoMjEuNnYtNi42aC0yLjR2NC4ySDIuNFYxMS41Yy41LjMgMS4yLjQgMS44LjVoNy41QTYuNiA2LjYgMCAwIDAgMjQgOVYzaC0yLjRabTAgNS43YTQuMiA0LjIgMCAxIDEtOC40IDBWNS40aDguNHYzLjNaIi8+PC9nPjwvc3ZnPg==",this._connecting=!1,this._connectionGeneration=0,this._readyState="undefined"!=typeof window&&window.isSecureContext&&"undefined"!=typeof document&&/android/i.test(navigator.userAgent)?$.i1.Loadable:$.i1.Unsupported,this._authorizationResultCache=e.authorizationResultCache,this._addressSelector=e.addressSelector,this._appIdentity=e.appIdentity,this._cluster=e.cluster,this._onWalletNotFound=e.onWalletNotFound,this._readyState!==$.i1.Unsupported&&this._authorizationResultCache.get().then(e=>{e&&this.declareWalletAsInstalled()})}get publicKey(){if(null==this._publicKey&&null!=this._selectedAddress)try{this._publicKey=function(e){let t=new Uint8Array(window.atob(e).split("").map(e=>e.charCodeAt(0)));return new z.PublicKey(t)}(this._selectedAddress)}catch(e){throw new H.Nx(e instanceof Error&&(null==e?void 0:e.message)||"Unknown error",e)}return this._publicKey?this._publicKey:null}get connected(){return!!this._authorizationResult}get connecting(){return this._connecting}get readyState(){return this._readyState}declareWalletAsInstalled(){this._readyState!==$.i1.Installed&&this.emit("readyStateChange",this._readyState=$.i1.Installed)}runWithGuard(e){return ef(this,void 0,void 0,function*(){try{return yield e()}catch(e){throw this.emit("error",e),e}})}autoConnect_DO_NOT_USE_OR_YOU_WILL_BE_FIRED(){return ef(this,void 0,void 0,function*(){return yield this.autoConnect()})}autoConnect(){return ef(this,void 0,void 0,function*(){if(!this.connecting&&!this.connected)return yield this.runWithGuard(()=>ef(this,void 0,void 0,function*(){if(this._readyState!==$.i1.Installed&&this._readyState!==$.i1.Loadable)throw new H.OZ;this._connecting=!0;try{let e=yield this._authorizationResultCache.get();e&&this.handleAuthorizationResult(e)}catch(e){throw new H.$w(e instanceof Error&&e.message||"Unknown error",e)}finally{this._connecting=!1}}))})}connect(){return ef(this,void 0,void 0,function*(){if(!this.connecting&&!this.connected)return yield this.runWithGuard(()=>ef(this,void 0,void 0,function*(){if(this._readyState!==$.i1.Installed&&this._readyState!==$.i1.Loadable)throw new H.OZ;this._connecting=!0;try{let e=yield this._authorizationResultCache.get();if(e){this.handleAuthorizationResult(e);return}yield this.transact(e=>ef(this,void 0,void 0,function*(){let t=yield e.authorize({cluster:this._cluster,identity:this._appIdentity});Promise.all([this._authorizationResultCache.set(t),this.handleAuthorizationResult(t)])}))}catch(e){throw new H.$w(e instanceof Error&&e.message||"Unknown error",e)}finally{this._connecting=!1}}))})}handleAuthorizationResult(e){var t;return ef(this,void 0,void 0,function*(){let r=null==this._authorizationResult||(null===(t=this._authorizationResult)||void 0===t?void 0:t.accounts.length)!==e.accounts.length||this._authorizationResult.accounts.some((t,r)=>t.address!==e.accounts[r].address);if(this._authorizationResult=e,this.declareWalletAsInstalled(),r){let t=yield this._addressSelector.select(e.accounts.map(({address:e})=>e));t!==this._selectedAddress&&(this._selectedAddress=t,delete this._publicKey,this.emit("connect",this.publicKey))}})}performReauthorization(e,t){return ef(this,void 0,void 0,function*(){try{let r=yield e.reauthorize({auth_token:t,identity:this._appIdentity});Promise.all([this._authorizationResultCache.set(r),this.handleAuthorizationResult(r)])}catch(e){throw this.disconnect(),new H.at(e instanceof Error&&(null==e?void 0:e.message)||"Unknown error",e)}})}disconnect(){return ef(this,void 0,void 0,function*(){this._authorizationResultCache.clear(),this._connecting=!1,this._connectionGeneration++,delete this._authorizationResult,delete this._publicKey,delete this._selectedAddress,this.emit("disconnect")})}transact(e){var t;return ef(this,void 0,void 0,function*(){let r=null===(t=this._authorizationResult)||void 0===t?void 0:t.wallet_uri_base,i=this._connectionGeneration;try{return yield function(e,t){return el(this,void 0,void 0,function*(){return yield function(e,t){return Q(this,void 0,void 0,function*(){let r;!function(){if("undefined"==typeof window||!0!==window.isSecureContext)throw new Y(J.ERROR_SECURE_CONTEXT_REQUIRED,"The mobile wallet adapter protocol must be used in a secure context (`https`).")}();let i=yield function(){return Q(this,void 0,void 0,function*(){return yield crypto.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},!1,["sign"])})}(),o=yield function(e,t){return Q(this,void 0,void 0,function*(){let r=et(49152+Math.floor(16384*Math.random())),n=yield function(e,t,r){return Q(this,void 0,void 0,function*(){let n=et(t),i=function(e){let t="",r=new Uint8Array(e),n=r.byteLength;for(let e=0;e<n;e++)t+=String.fromCharCode(r[e]);return window.btoa(t)}((yield crypto.subtle.exportKey("raw",e))),o=function(e,t){let r=null;if(t){try{r=new URL(t)}catch(e){}if((null==r?void 0:r.protocol)!=="https:")throw new Y(J.ERROR_FORBIDDEN_WALLET_BASE_URL,"Base URLs supplied by wallets must be valid `https` URLs")}return r||(r=new URL("solana-wallet:/")),new URL(e.startsWith("/")?e:[...er(r.pathname),...er(e)].join("/"),r)}("v1/associate/local",r);return o.searchParams.set("association",i.replace(/[/+=]/g,e=>({"/":"_","+":"-","=":"."})[e])),o.searchParams.set("port",`${n}`),o})}(e,r,t);if("https:"===n.protocol)window.location.assign(n);else try{switch(-1!==navigator.userAgent.indexOf("Firefox/")?en.Firefox:en.Other){case en.Firefox:null==ei&&((ei=document.createElement("iframe")).style.display="none",document.body.appendChild(ei)),ei.contentWindow.location.href=n.toString();break;case en.Other:{let e=new Promise((e,t)=>{function r(){clearTimeout(i),window.removeEventListener("blur",n)}function n(){r(),e()}window.addEventListener("blur",n);let i=setTimeout(()=>{r(),t()},2e3)});window.location.assign(n),yield e}}}catch(e){throw new Y(J.ERROR_WALLET_NOT_FOUND,"Found no installed wallet that supports the mobile wallet protocol.")}return r})}(i.publicKey,null==t?void 0:t.baseUri),s=`ws://localhost:${o}/solana-wallet`,a=(()=>{let e=[...eo];return()=>e.length>1?e.shift():e[0]})(),l=1,u=0,c={__type:"disconnected"};return new Promise((t,d)=>{let h,f,p;let g={},m=()=>Q(this,void 0,void 0,function*(){if("connecting"!==c.__type){console.warn(`Expected adapter state to be \`connecting\` at the moment the websocket opens. Got \`${c.__type}\`.`);return}let{associationKeypair:e}=c;h.removeEventListener("open",m);let t=yield function(){return Q(this,void 0,void 0,function*(){return yield crypto.subtle.generateKey({name:"ECDH",namedCurve:"P-256"},!1,["deriveKey","deriveBits"])})}();h.send((yield function(e,t){return Q(this,void 0,void 0,function*(){let r=yield crypto.subtle.exportKey("raw",e),n=yield crypto.subtle.sign({hash:"SHA-256",name:"ECDSA"},t,r),i=new Uint8Array(r.byteLength+n.byteLength);return i.set(new Uint8Array(r),0),i.set(new Uint8Array(n),r.byteLength),i})}(t.publicKey,e.privateKey))),c={__type:"hello_req_sent",associationPublicKey:e.publicKey,ecdhPrivateKey:t.privateKey}}),y=e=>{e.wasClean?c={__type:"disconnected"}:d(new Y(J.ERROR_SESSION_CLOSED,`The wallet session dropped unexpectedly (${e.code}: ${e.reason}).`,{closeEvent:e})),f()},v=e=>Q(this,void 0,void 0,function*(){f(),Date.now()-r>=3e4?d(new Y(J.ERROR_SESSION_TIMEOUT,`Failed to connect to the wallet websocket on port ${o}.`)):(yield new Promise(e=>{let t=a();p=window.setTimeout(e,t)}),w())}),b=r=>Q(this,void 0,void 0,function*(){let i=yield r.data.arrayBuffer();switch(c.__type){case"connected":try{var o;let e=(o=i.slice(0,4),new DataView(o).getUint32(0,!1));if(e!==u+1)throw Error("Encrypted message has invalid sequence number");u=e;let t=yield function(e,t){return Q(this,void 0,void 0,function*(){let r=e.slice(0,4),i=e.slice(4,16),o=e.slice(16),s=yield crypto.subtle.decrypt(ee(r,i),t,o),a=JSON.parse((void 0===n&&(n=new TextDecoder("utf-8")),n).decode(s));if(Object.hasOwnProperty.call(a,"error"))throw new X(a.id,a.error.code,a.error.message);return a})}(i,c.sharedSecret),r=g[t.id];delete g[t.id],r.resolve(t.result)}catch(e){if(e instanceof X){let t=g[e.jsonRpcMessageId];delete g[e.jsonRpcMessageId],t.reject(e)}else throw e}break;case"hello_req_sent":{let r=yield function(e,t,r){return Q(this,void 0,void 0,function*(){let[n,i]=yield Promise.all([crypto.subtle.exportKey("raw",t),crypto.subtle.importKey("raw",e,{name:"ECDH",namedCurve:"P-256"},!1,[])]),o=yield crypto.subtle.deriveBits({name:"ECDH",public:i},r,256),s=yield crypto.subtle.importKey("raw",o,"HKDF",!1,["deriveKey"]);return yield crypto.subtle.deriveKey({name:"HKDF",hash:"SHA-256",salt:new Uint8Array(n),info:new Uint8Array},s,{name:"AES-GCM",length:128},!1,["encrypt","decrypt"])})}(i,c.associationPublicKey,c.ecdhPrivateKey);c={__type:"connected",sharedSecret:r};let n=new Proxy({},{get(e,t){if(null==e[t]){let n=t.toString().replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`).toLowerCase();e[t]=function(e){return Q(this,void 0,void 0,function*(){let i=l++;return h.send((yield function(e,t){return Q(this,void 0,void 0,function*(){let r=JSON.stringify(e),n=function(e){if(e>=4294967296)throw Error("Outbound sequence number overflow. The maximum sequence number is 32-bytes.");let t=new ArrayBuffer(4);return new DataView(t).setUint32(0,e,!1),new Uint8Array(t)}(e.id),i=new Uint8Array(12);crypto.getRandomValues(i);let o=yield crypto.subtle.encrypt(ee(n,i),t,new TextEncoder().encode(r)),s=new Uint8Array(n.byteLength+i.byteLength+o.byteLength);return s.set(new Uint8Array(n),0),s.set(new Uint8Array(i),n.byteLength),s.set(new Uint8Array(o),n.byteLength+i.byteLength),s})}({id:i,jsonrpc:"2.0",method:n,params:null!=e?e:{}},r))),new Promise((e,r)=>{g[i]={resolve(n){switch(t){case"authorize":case"reauthorize":{let{wallet_uri_base:e}=n;if(null!=e)try{!function(e){let t;try{t=new URL(e)}catch(e){throw new Y(J.ERROR_FORBIDDEN_WALLET_BASE_URL,"Invalid base URL supplied by wallet")}if("https:"!==t.protocol)throw new Y(J.ERROR_FORBIDDEN_WALLET_BASE_URL,"Base URLs supplied by wallets must be valid `https` URLs")}(e)}catch(e){r(e);return}}}e(n)},reject:r}})})}}return e[t]},defineProperty:()=>!1,deleteProperty:()=>!1});try{t((yield e(n)))}catch(e){d(e)}finally{f(),h.close()}}}}),w=()=>{f&&f(),c={__type:"connecting",associationKeypair:i},void 0===r&&(r=Date.now()),(h=new WebSocket(s,["com.solana.mobilewalletadapter.v1"])).addEventListener("open",m),h.addEventListener("close",y),h.addEventListener("error",v),h.addEventListener("message",b),f=()=>{window.clearTimeout(p),h.removeEventListener("open",m),h.removeEventListener("close",y),h.removeEventListener("error",v),h.removeEventListener("message",b)}};w()})})}(t=>e(new Proxy({},{get(e,r){if(null==e[r])switch(r){case"signAndSendTransactions":e[r]=function(e){var{minContextSlot:r,transactions:n}=e,i=ea(e,["minContextSlot","transactions"]);return el(this,void 0,void 0,function*(){let e=n.map(ed),{signatures:o}=yield t.signAndSendTransactions(Object.assign(Object.assign(Object.assign({},i),null!=r?{options:{min_context_slot:r}}:null),{payloads:e}));return o.map(ec).map(es.encode)})};break;case"signMessages":e[r]=function(e){var{payloads:r}=e,n=ea(e,["payloads"]);return el(this,void 0,void 0,function*(){let e=r.map(eu),{signed_payloads:i}=yield t.signMessages(Object.assign(Object.assign({},n),{payloads:e}));return i.map(ec)})};break;case"signTransactions":e[r]=function(e){var{transactions:r}=e,n=ea(e,["transactions"]);return el(this,void 0,void 0,function*(){let e=r.map(ed),{signed_payloads:i}=yield t.signTransactions(Object.assign(Object.assign({},n),{payloads:e}));return i.map(ec).map(eh)})};break;default:e[r]=t[r]}return e[r]},defineProperty:()=>!1,deleteProperty:()=>!1})),t)})}(e,r?{baseUri:r}:void 0)}catch(e){throw this._connectionGeneration!==i&&(yield new Promise(()=>{})),e instanceof Error&&"SolanaMobileWalletAdapterError"===e.name&&"ERROR_WALLET_NOT_FOUND"===e.code&&(yield this._onWalletNotFound(this)),e}})}assertIsAuthorized(){if(!this._authorizationResult||!this._selectedAddress)throw new H.oS;return{authToken:this._authorizationResult.auth_token,selectedAddress:this._selectedAddress}}performSignTransactions(e){return ef(this,void 0,void 0,function*(){let{authToken:t}=this.assertIsAuthorized();try{return yield this.transact(r=>ef(this,void 0,void 0,function*(){return yield this.performReauthorization(r,t),yield r.signTransactions({transactions:e})}))}catch(e){throw new H.PY(null==e?void 0:e.message,e)}})}sendTransaction(e,t,r){return ef(this,void 0,void 0,function*(){return yield this.runWithGuard(()=>ef(this,void 0,void 0,function*(){let{authToken:n}=this.assertIsAuthorized(),i=null==r?void 0:r.minContextSlot;try{return yield this.transact(o=>ef(this,void 0,void 0,function*(){function s(){let e,n;switch(t.commitment){case"confirmed":case"finalized":case"processed":e=t.commitment;break;default:e="finalized"}switch(null==r?void 0:r.preflightCommitment){case"confirmed":case"finalized":case"processed":n=r.preflightCommitment;break;case void 0:n=e;default:n="finalized"}let i="finalized"===n?2:"confirmed"===n?1:0,o="finalized"===e?2:"confirmed"===e?1:0;return i<o?n:e}let[a,l,u]=yield Promise.all([o.getCapabilities(),this.performReauthorization(o,n),eg(e)?null:ef(this,void 0,void 0,function*(){var r;if(e.feePayer||(e.feePayer=null!==(r=this.publicKey)&&void 0!==r?r:void 0),null==e.recentBlockhash){let{blockhash:r}=yield t.getLatestBlockhash({commitment:s()});e.recentBlockhash=r}})]);if(a.supports_sign_and_send_transactions)return(yield o.signAndSendTransactions({minContextSlot:i,transactions:[e]}))[0];{let[n]=yield o.signTransactions({transactions:[e]});if(eg(n))return yield t.sendTransaction(n);{let e=n.serialize();return yield t.sendRawTransaction(e,Object.assign(Object.assign({},r),{preflightCommitment:s()}))}}}))}catch(e){throw new H.IW(null==e?void 0:e.message,e)}}))})}signTransaction(e){return ef(this,void 0,void 0,function*(){return yield this.runWithGuard(()=>ef(this,void 0,void 0,function*(){let[t]=yield this.performSignTransactions([e]);return t}))})}signAllTransactions(e){return ef(this,void 0,void 0,function*(){return yield this.runWithGuard(()=>ef(this,void 0,void 0,function*(){return yield this.performSignTransactions(e)}))})}signMessage(e){return ef(this,void 0,void 0,function*(){return yield this.runWithGuard(()=>ef(this,void 0,void 0,function*(){let{authToken:t,selectedAddress:r}=this.assertIsAuthorized();try{return yield this.transact(n=>ef(this,void 0,void 0,function*(){yield this.performReauthorization(n,t);let[i]=yield n.signMessages({addresses:[r],payloads:[e]});return i.slice(-64)}))}catch(e){throw new H.fk(null==e?void 0:e.message,e)}}))})}}let ey="SolanaMobileWalletAdapterDefaultAuthorizationCache";function ev(e){return ef(this,void 0,void 0,function*(){"undefined"!=typeof window&&window.location.assign(e.url)})}let eb="solana:signAndSendTransaction",ew="solana:signTransaction",ex="standard:connect",eE="standard:events",ek=function(e){return ex in e.features&&eE in e.features&&(eb in e.features||ew in e.features)},eS="solana:signMessage",eT="solana:signIn",eM="solana:mainnet";function eA(e){switch(e){case"processed":case"confirmed":case"finalized":case void 0:return e;case"recent":return"processed";case"single":case"singleGossip":return"confirmed";case"max":case"root":return"finalized";default:return}}let eP="standard:disconnect";new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap;var eC=function(e,t,r,n,i){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},e_=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class eI extends $.mI{constructor({wallet:e}){super(),g.add(this),m.set(this,void 0),y.set(this,void 0),v.set(this,void 0),b.set(this,void 0),w.set(this,void 0),x.set(this,void 0),E.set(this,void 0),k.set(this,"undefined"==typeof window||"undefined"==typeof document?$.i1.Unsupported:$.i1.Installed),P.set(this,e=>{if("accounts"in e){let e=e_(this,E,"f").accounts[0];e_(this,m,"f")&&!e_(this,b,"f")&&e!==e_(this,m,"f")&&(e?e_(this,g,"m",T).call(this,e):(this.emit("error",new H.at),e_(this,g,"m",M).call(this)))}"features"in e&&e_(this,g,"m",A).call(this)}),eC(this,E,e,"f"),eC(this,m,null,"f"),eC(this,y,null,"f"),eC(this,v,!1,"f"),eC(this,b,!1,"f"),eC(this,w,e_(this,E,"f").features[eE].on("change",e_(this,P,"f")),"f"),e_(this,g,"m",A).call(this)}get name(){return e_(this,E,"f").name}get url(){return"https://github.com/solana-labs/wallet-standard"}get icon(){return e_(this,E,"f").icon}get readyState(){return e_(this,k,"f")}get publicKey(){return e_(this,y,"f")}get connecting(){return e_(this,v,"f")}get supportedTransactionVersions(){return e_(this,x,"f")}get wallet(){return e_(this,E,"f")}get standard(){return!0}destroy(){eC(this,m,null,"f"),eC(this,y,null,"f"),eC(this,v,!1,"f"),eC(this,b,!1,"f");let e=e_(this,w,"f");e&&(eC(this,w,null,"f"),e())}async autoConnect(){return e_(this,g,"m",S).call(this,{silent:!0})}async connect(){return e_(this,g,"m",S).call(this)}async disconnect(){if(eP in e_(this,E,"f").features)try{eC(this,b,!0,"f"),await e_(this,E,"f").features[eP].disconnect()}catch(e){this.emit("error",new H.UG(e?.message,e))}finally{eC(this,b,!1,"f")}e_(this,g,"m",M).call(this)}async sendTransaction(e,t,r={}){try{var n;let i;let o=e_(this,m,"f");if(!o)throw new H.oS;if(eb in e_(this,E,"f").features){if(o.features.includes(eb))i=eb;else if(ew in e_(this,E,"f").features&&o.features.includes(ew))i=ew;else throw new H.cO}else if(ew in e_(this,E,"f").features){if(!o.features.includes(ew))throw new H.cO;i=ew}else throw new H.p6;let s=(n=t.rpcEndpoint).includes("https://api.mainnet-beta.solana.com")?eM:/\bdevnet\b/i.test(n)?"solana:devnet":/\btestnet\b/i.test(n)?"solana:testnet":/\blocalhost\b/i.test(n)||/\b127\.0\.0\.1\b/.test(n)?"solana:localnet":eM;if(!o.chains.includes(s))throw new H.IW;try{let n;let{signers:a,...l}=r;if(q(e)?(a?.length&&e.sign(a),n=e.serialize()):(e=await this.prepareTransaction(e,t,l),a?.length&&e.partialSign(...a),n=new Uint8Array(e.serialize({requireAllSignatures:!1,verifySignatures:!1}))),i===eb){let[e]=await e_(this,E,"f").features[eb].signAndSendTransaction({account:o,chain:s,transaction:n,options:{preflightCommitment:eA(l.preflightCommitment||t.commitment),skipPreflight:l.skipPreflight,maxRetries:l.maxRetries,minContextSlot:l.minContextSlot}});return es.encode(e.signature)}{let[e]=await e_(this,E,"f").features[ew].signTransaction({account:o,chain:s,transaction:n,options:{preflightCommitment:eA(l.preflightCommitment||t.commitment),minContextSlot:l.minContextSlot}});return await t.sendRawTransaction(e.signedTransaction,{...l,preflightCommitment:eA(l.preflightCommitment||t.commitment)})}}catch(e){if(e instanceof H.lj)throw e;throw new H.IW(e?.message,e)}}catch(e){throw this.emit("error",e),e}}}m=new WeakMap,y=new WeakMap,v=new WeakMap,b=new WeakMap,w=new WeakMap,x=new WeakMap,E=new WeakMap,k=new WeakMap,P=new WeakMap,g=new WeakSet,S=async function(e){try{if(this.connected||this.connecting)return;if(e_(this,k,"f")!==$.i1.Installed)throw new H.OZ;if(eC(this,v,!0,"f"),!e_(this,E,"f").accounts.length)try{await e_(this,E,"f").features[ex].connect(e)}catch(e){throw new H.$w(e?.message,e)}let t=e_(this,E,"f").accounts[0];if(!t)throw new H.cO;e_(this,g,"m",T).call(this,t)}catch(e){throw this.emit("error",e),e}finally{eC(this,v,!1,"f")}},T=function(e){let t;try{t=new z.PublicKey(e.address)}catch(e){throw new H.Nx(e?.message,e)}eC(this,m,e,"f"),eC(this,y,t,"f"),e_(this,g,"m",A).call(this),this.emit("connect",t)},M=function(){eC(this,m,null,"f"),eC(this,y,null,"f"),e_(this,g,"m",A).call(this),this.emit("disconnect")},A=function(){let e=eb in e_(this,E,"f").features?e_(this,E,"f").features[eb].supportedTransactionVersions:e_(this,E,"f").features[ew].supportedTransactionVersions;eC(this,x,!function(e,t){if(e===t)return!0;let r=e.length;if(r!==t.length)return!1;for(let n=0;n<r;n++)if(e[n]!==t[n])return!1;return!0}(e,["legacy"])?new Set(e):null,"f"),ew in e_(this,E,"f").features&&e_(this,m,"f")?.features.includes(ew)?(this.signTransaction=e_(this,g,"m",C),this.signAllTransactions=e_(this,g,"m",_)):(delete this.signTransaction,delete this.signAllTransactions),eS in e_(this,E,"f").features&&e_(this,m,"f")?.features.includes(eS)?this.signMessage=e_(this,g,"m",I):delete this.signMessage,eT in e_(this,E,"f").features?this.signIn=e_(this,g,"m",O):delete this.signIn},C=async function(e){try{let t=e_(this,m,"f");if(!t)throw new H.oS;if(!(ew in e_(this,E,"f").features))throw new H.p6;if(!t.features.includes(ew))throw new H.cO;try{let r=(await e_(this,E,"f").features[ew].signTransaction({account:t,transaction:q(e)?e.serialize():new Uint8Array(e.serialize({requireAllSignatures:!1,verifySignatures:!1}))}))[0].signedTransaction;return q(e)?z.VersionedTransaction.deserialize(r):z.Transaction.from(r)}catch(e){if(e instanceof H.lj)throw e;throw new H.PY(e?.message,e)}}catch(e){throw this.emit("error",e),e}},_=async function(e){try{let t=e_(this,m,"f");if(!t)throw new H.oS;if(!(ew in e_(this,E,"f").features))throw new H.p6;if(!t.features.includes(ew))throw new H.cO;try{let r=await e_(this,E,"f").features[ew].signTransaction(...e.map(e=>({account:t,transaction:q(e)?e.serialize():new Uint8Array(e.serialize({requireAllSignatures:!1,verifySignatures:!1}))})));return e.map((e,t)=>{let n=r[t].signedTransaction;return q(e)?z.VersionedTransaction.deserialize(n):z.Transaction.from(n)})}catch(e){throw new H.PY(e?.message,e)}}catch(e){throw this.emit("error",e),e}},I=async function(e){try{let t=e_(this,m,"f");if(!t)throw new H.oS;if(!(eS in e_(this,E,"f").features))throw new H.p6;if(!t.features.includes(eS))throw new H.cO;try{return(await e_(this,E,"f").features[eS].signMessage({account:t,message:e}))[0].signature}catch(e){throw new H.fk(e?.message,e)}}catch(e){throw this.emit("error",e),e}},O=async function(e={}){try{let t;if(!(eT in e_(this,E,"f").features))throw new H.p6;try{[t]=await e_(this,E,"f").features[eT].signIn(e)}catch(e){throw new H.bD(e?.message,e)}if(!t)throw new H.bD;return e_(this,g,"m",T).call(this,t.account),t}catch(e){throw this.emit("error",e),e}};var eO=function(e,t,r,n,i){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},eL=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};let eR=new Set,ej={};function eB(...e){return(e=e.filter(e=>!eR.has(e))).length?(e.forEach(e=>eR.add(e)),ej.register?.forEach(t=>eK(()=>t(...e))),function(){e.forEach(e=>eR.delete(e)),ej.unregister?.forEach(t=>eK(()=>t(...e)))}):()=>{}}function eN(){return[...eR]}function eD(e,t){return ej[e]?.push(t)||(ej[e]=[t]),function(){ej[e]=ej[e]?.filter(e=>t!==e)}}function eK(e){try{e()}catch(e){console.error(e)}}class eU extends Event{constructor(e){super("wallet-standard:app-ready",{bubbles:!1,cancelable:!1,composed:!1}),L.set(this,void 0),eO(this,L,e,"f")}get detail(){return eL(this,L,"f")}get type(){return"wallet-standard:app-ready"}preventDefault(){throw Error("preventDefault cannot be called")}stopImmediatePropagation(){throw Error("stopImmediatePropagation cannot be called")}stopPropagation(){throw Error("stopPropagation cannot be called")}}function ez(e){let t=(0,F.useRef)();return t.current||(t.current={value:e()}),t.current.value}function eF(e){return e.filter(ek).map(e=>new eI({wallet:e}))}function eW(e,t){let r=(0,F.useState)(()=>{try{let t=localStorage.getItem(e);if(t)return JSON.parse(t)}catch(e){"undefined"!=typeof window&&console.error(e)}return t}),n=r[0],i=(0,F.useRef)(!0);return(0,F.useEffect)(()=>{if(i.current){i.current=!1;return}try{null===n?localStorage.removeItem(e):localStorage.setItem(e,JSON.stringify(n))}catch(e){"undefined"!=typeof window&&console.error(e)}},[n,e]),r}L=new WeakMap,(a=R||(R={}))[a.DESKTOP_WEB=0]="DESKTOP_WEB",a[a.MOBILE_WEB=1]="MOBILE_WEB";class eV extends H.lj{constructor(){super(...arguments),this.name="WalletNotSelectedError"}}var e$=r(54306);function eH({children:e,wallets:t,adapter:r,isUnloadingRef:n,onAutoConnectRequest:i,onConnectError:o,onError:s,onSelectWallet:a}){let l=(0,F.useRef)(!1),[u,c]=(0,F.useState)(!1),d=(0,F.useRef)(!1),[h,f]=(0,F.useState)(!1),[p,g]=(0,F.useState)(()=>r?.publicKey??null),[m,y]=(0,F.useState)(()=>r?.connected??!1),v=(0,F.useRef)(s);(0,F.useEffect)(()=>(v.current=s,()=>{v.current=void 0}),[s]);let b=(0,F.useRef)((e,t)=>(!n.current&&(v.current?v.current(e,t):(console.error(e,t),e instanceof H.OZ&&"undefined"!=typeof window&&t&&window.open(t.url,"_blank"))),e)),[w,x]=(0,F.useState)(()=>t.map(e=>({adapter:e,readyState:e.readyState})).filter(({readyState:e})=>e!==$.i1.Unsupported));(0,F.useEffect)(()=>{function e(e){x(t=>{let r=t.findIndex(({adapter:e})=>e===this);if(-1===r)return t;let{adapter:n}=t[r];return[...t.slice(0,r),{adapter:n,readyState:e},...t.slice(r+1)].filter(({readyState:e})=>e!==$.i1.Unsupported)})}return x(e=>t.map((t,r)=>{let n=e[r];return n&&n.adapter===t&&n.readyState===t.readyState?n:{adapter:t,readyState:t.readyState}}).filter(({readyState:e})=>e!==$.i1.Unsupported)),t.forEach(t=>t.on("readyStateChange",e,t)),()=>{t.forEach(t=>t.off("readyStateChange",e,t))}},[r,t]);let E=(0,F.useMemo)(()=>w.find(e=>e.adapter===r)??null,[r,w]);(0,F.useEffect)(()=>{if(!r)return;let e=e=>{g(e),l.current=!1,c(!1),y(!0),d.current=!1,f(!1)},t=()=>{n.current||(g(null),l.current=!1,c(!1),y(!1),d.current=!1,f(!1))},i=e=>{b.current(e,r)};return r.on("connect",e),r.on("disconnect",t),r.on("error",i),()=>{r.off("connect",e),r.off("disconnect",t),r.off("error",i),t()}},[r,n]);let k=(0,F.useRef)(!1);(0,F.useEffect)(()=>()=>{k.current=!1},[r]),(0,F.useEffect)(()=>{k.current||l.current||m||!i||E?.readyState!==$.i1.Installed&&E?.readyState!==$.i1.Loadable||(l.current=!0,c(!0),k.current=!0,async function(){try{await i()}catch{o()}finally{c(!1),l.current=!1}}())},[m,i,o,E]);let S=(0,F.useCallback)(async(e,t,n)=>{if(!r)throw b.current(new eV);if(!m)throw b.current(new H.oS,r);return await r.sendTransaction(e,t,n)},[r,m]),T=(0,F.useMemo)(()=>r&&"signTransaction"in r?async e=>{if(!m)throw b.current(new H.oS,r);return await r.signTransaction(e)}:void 0,[r,m]),M=(0,F.useMemo)(()=>r&&"signAllTransactions"in r?async e=>{if(!m)throw b.current(new H.oS,r);return await r.signAllTransactions(e)}:void 0,[r,m]),A=(0,F.useMemo)(()=>r&&"signMessage"in r?async e=>{if(!m)throw b.current(new H.oS,r);return await r.signMessage(e)}:void 0,[r,m]),P=(0,F.useMemo)(()=>r&&"signIn"in r?async e=>await r.signIn(e):void 0,[r]),C=(0,F.useCallback)(async()=>{if(l.current||d.current||E?.adapter.connected)return;if(!E)throw b.current(new eV);let{adapter:e,readyState:t}=E;if(!(t===$.i1.Installed||t===$.i1.Loadable))throw b.current(new H.OZ,e);l.current=!0,c(!0);try{await e.connect()}catch(e){throw o(),e}finally{c(!1),l.current=!1}},[o,E]),_=(0,F.useCallback)(async()=>{if(!d.current&&r){d.current=!0,f(!0);try{await r.disconnect()}finally{f(!1),d.current=!1}}},[r]);return F.createElement(e$.z.Provider,{value:{autoConnect:!!i,wallets:w,wallet:E,publicKey:p,connected:m,connecting:u,disconnecting:h,select:a,connect:C,disconnect:_,sendTransaction:S,signTransaction:T,signAllTransactions:M,signMessage:A,signIn:P}},e)}function eq(e){return function({adapters:e,userAgentString:t}){return e.some(e=>e.name!==ep&&e.readyState===$.i1.Installed)?R.DESKTOP_WEB:t&&/android/i.test(t)&&!/(WebView|Version\/.+(Chrome)\/(\d+)\.(\d+)\.(\d+)\.(\d+)|; wv\).+(Chrome)\/(\d+)\.(\d+)\.(\d+)\.(\d+))/i.test(t)?R.MOBILE_WEB:R.DESKTOP_WEB}({adapters:e,userAgentString:(void 0===i&&(i=globalThis.navigator?.userAgent??null),i)})===R.MOBILE_WEB}function eZ({children:e,wallets:t,autoConnect:r,localStorageKey:n="walletName",onError:i}){let{connection:s}=(0,W.R)(),a=function(e){let t=ez(()=>new Set),{get:r,on:n}=ez(()=>(function(){if(o||(o=function(){if(o||(o=Object.freeze({register:eB,get:eN,on:eD}),"undefined"==typeof window))return o;let e=Object.freeze({register:eB});try{window.addEventListener("wallet-standard:register-wallet",({detail:t})=>t(e))}catch(e){console.error("wallet-standard:register-wallet event listener could not be added\n",e)}try{window.dispatchEvent(new eU(e))}catch(e){console.error("wallet-standard:app-ready event could not be dispatched\n",e)}return o}(),"undefined"==typeof window))return o;let e=window.navigator.wallets||[];if(!Array.isArray(e))return console.error("window.navigator.wallets is not an array"),o;let{register:t}=o,r=(...e)=>e.forEach(e=>eK(()=>e({register:t})));try{Object.defineProperty(window.navigator,"wallets",{value:Object.freeze({push:r})})}catch(e){return console.error("window.navigator.wallets could not be set"),o}return r(...e),o})()),[i,s]=(0,F.useState)(()=>eF(r()));(0,F.useEffect)(()=>{let e=[n("register",(...e)=>s(t=>[...t,...eF(e)])),n("unregister",(...e)=>s(t=>t.filter(t=>e.some(e=>e===t.wallet))))];return()=>e.forEach(e=>e())},[n]);let a=function(e){let t=(0,F.useRef)();return(0,F.useEffect)(()=>{t.current=e}),t.current}(i);return(0,F.useEffect)(()=>{if(!a)return;let e=new Set(i);new Set(a.filter(t=>!e.has(t))).forEach(e=>e.destroy())},[a,i]),(0,F.useEffect)(()=>()=>i.forEach(e=>e.destroy()),[]),(0,F.useMemo)(()=>[...i,...e.filter(({name:e})=>!i.some(t=>t.name===e)||(t.has(e)||(t.add(e),console.warn(`${e} was registered as a Standard Wallet. The Wallet Adapter for ${e} can be removed from your app.`)),!1))],[i,e,t])}(t),l=(0,F.useMemo)(()=>{var e;if(!eq(a))return null;let t=a.find(e=>e.name===ep);return t||new em({addressSelector:{select(e){return ef(this,void 0,void 0,function*(){return e[0]})}},appIdentity:{uri:function(){let e=globalThis.location;if(e)return`${e.protocol}//${e.host}`}()},authorizationResultCache:function(){let e;try{e=window.localStorage}catch(e){}return{clear(){return ef(this,void 0,void 0,function*(){if(e)try{e.removeItem(ey)}catch(e){}})},get(){return ef(this,void 0,void 0,function*(){if(e)try{return JSON.parse(e.getItem(ey))||void 0}catch(e){}})},set(t){return ef(this,void 0,void 0,function*(){if(e)try{e.setItem(ey,JSON.stringify(t))}catch(e){}})}}}(),cluster:(e=s?.rpcEndpoint)?/devnet/i.test(e)?"devnet":/testnet/i.test(e)?"testnet":"mainnet-beta":"mainnet-beta",onWalletNotFound:ev})},[a,s?.rpcEndpoint]),u=(0,F.useMemo)(()=>null==l||-1!==a.indexOf(l)?a:[l,...a],[a,l]),[c,d]=eW(n,eq(a)?ep:null),h=(0,F.useMemo)(()=>u.find(e=>e.name===c)??null,[u,c]),f=(0,F.useCallback)(e=>{c!==e&&(h&&h.name!==ep&&h.disconnect(),d(e))},[h,d,c]);(0,F.useEffect)(()=>{if(h)return h.on("disconnect",e),()=>{h.off("disconnect",e)};function e(){!m.current&&(c===ep&&eq(a)||d(null))}},[h,a,d,c]);let p=(0,F.useRef)(!1),g=(0,F.useMemo)(()=>{if(r&&h)return async()=>{(!0===r||await r(h))&&(p.current?await h.connect():await h.autoConnect())}},[r,h]),m=(0,F.useRef)(!1);(0,F.useEffect)(()=>{if(c===ep&&eq(a)){m.current=!1;return}function e(){m.current=!0}return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}},[a,c]);let y=(0,F.useCallback)(()=>{h&&h.name!==ep&&f(null)},[h,f]),v=(0,F.useCallback)(e=>{p.current=!0,f(e)},[f]);return F.createElement(eH,{wallets:u,adapter:h,isUnloadingRef:m,onAutoConnectRequest:g,onConnectError:y,onError:i,onSelectWallet:v},e)}var eG=r(16835),eJ=r(85893),eY=(0,F.createContext)({}),eX=function(e){var t=e.children,r=eW("autoConnect",!0),n=(0,eG.Z)(r,2),i=n[0],o=n[1];return(0,eJ.jsx)(eY.Provider,{value:{autoConnect:i,setAutoConnect:o},children:t})},eQ=r(3098),e0=r(51757),e1=(0,F.createContext)({}),e2=function(e){var t=e.children,r=eW("network","devnet"),n=(0,eG.Z)(r,2),i=n[0],o=n[1];return(0,eJ.jsx)(e1.Provider,{value:{networkConfiguration:i,setNetworkConfiguration:o},children:t})},e5=(0,F.createContext)(null),e6=function(e){var t=e.children,r=(0,F.useState)(!1),n=r[0],i=r[1];return(0,eJ.jsx)(e5.Provider,{value:{isNavOpen:n,setIsNavOpen:i},children:t})},e3=function(){return(0,F.useContext)(e5)},e4=r(5152),e8=r.n(e4),e7=e8()((0,D.Z)(U().mark(function e(){return U().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.e(657).then(r.bind(r,93657));case 2:return e.abrupt("return",e.sent.WalletModalProvider);case 3:case"end":return e.stop()}},e)})),{ssr:!1,loadableGenerated:{webpack:function(){return[null]}}}),e9=function(e){var t=e.children;(0,F.useContext)(eY).autoConnect;var r=(0,F.useContext)(e1).networkConfiguration,n=(0,F.useMemo)(function(){return(0,z.clusterApiUrl)(r)},[r]),i=(0,F.useMemo)(function(){return[]},[r]),o=(0,F.useCallback)(function(e){(0,e0.h)({type:"error",message:e.message?"".concat(e.name,": ").concat(e.message):e.name}),console.error(e)},[]);return(0,eJ.jsx)(V,{endpoint:n,children:(0,eJ.jsx)(eZ,{wallets:i,onError:o,autoConnect:!0,children:(0,eJ.jsx)(e7,{children:t})})})},te=function(e){var t=e.children;return(0,eJ.jsx)(eJ.Fragment,{children:(0,eJ.jsx)(e2,{children:(0,eJ.jsx)(e6,{children:(0,eJ.jsx)(eX,{children:(0,eJ.jsx)(e9,{children:(0,eJ.jsx)(eQ.H,{children:t})})})})})})},tt=r(41664),tr=r.n(tt),tn=r(1571),ti=r(26887),to=r(72825),ts=r(91607),ta=r(77269),tl=r(67911).$0,tu=r(32616),tc=r(19916),td=r(4730),th=["size","width","height"];function tf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function tp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tf(Object(r),!0).forEach(function(t){(0,j.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tf(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var tg=function(e){var t=e.size,r=void 0===t?24:t,n=e.width,i=e.height,o=(0,td.Z)(e,th);return(0,eJ.jsx)("svg",tp(tp({"aria-hidden":"true",fill:"none",focusable:"false",height:r||i,role:"presentation",viewBox:"0 0 24 24",width:r||n},o),{},{children:(0,eJ.jsx)("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1,children:(0,eJ.jsx)("path",{d:"M16.293 9.293 12 13.586 7.707 9.293l-1.414 1.414L12 16.414l5.707-5.707z"})})}))},tm=["size","width","height"];function ty(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function tv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ty(Object(r),!0).forEach(function(t){(0,j.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ty(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var tb=function(e){var t=e.size,r=void 0===t?24:t,n=e.width,i=e.height,o=(0,td.Z)(e,tm);return(0,eJ.jsx)("svg",tv(tv({"aria-hidden":"true",fill:"none",focusable:"false",height:r||i,role:"presentation",viewBox:"0 0 24 24",width:r||n},o),{},{children:(0,eJ.jsx)("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1,children:(0,eJ.jsx)("path",{d:"m6.293 13.293 1.414 1.414L12 10.414l4.293 4.293 1.414-1.414L12 7.586z"})})}))},tw=e=>(0,eJ.jsx)("svg",{"aria-hidden":"true",focusable:"false",height:"1em",role:"presentation",viewBox:"0 0 24 24",width:"1em",...e,children:(0,eJ.jsx)("path",{d:"M21.53 15.93c-.16-.27-.61-.69-1.73-.49a8.46 8.46 0 01-1.88.13 8.409 8.409 0 01-5.91-2.82 8.068 8.068 0 01-1.44-8.66c.44-1.01.13-1.54-.09-1.76s-.77-.55-1.83-.11a10.318 10.318 0 00-6.32 10.21 10.475 10.475 0 007.04 8.99 10 10 0 002.89.55c.16.01.32.02.48.02a10.5 10.5 0 008.47-4.27c.67-.93.49-1.519.32-1.79z",fill:"currentColor"})}),tx=e=>(0,eJ.jsx)("svg",{"aria-hidden":"true",focusable:"false",height:"1em",role:"presentation",viewBox:"0 0 24 24",width:"1em",...e,children:(0,eJ.jsxs)("g",{fill:"currentColor",children:[(0,eJ.jsx)("path",{d:"M19 12a7 7 0 11-7-7 7 7 0 017 7z"}),(0,eJ.jsx)("path",{d:"M12 22.96a.969.969 0 01-1-.96v-.08a1 1 0 012 0 1.038 1.038 0 01-1 1.04zm7.14-2.82a1.024 1.024 0 01-.71-.29l-.13-.13a1 1 0 011.41-1.41l.13.13a1 1 0 010 1.41.984.984 0 01-.7.29zm-14.28 0a1.024 1.024 0 01-.71-.29 1 1 0 010-1.41l.13-.13a1 1 0 011.41 1.41l-.13.13a1 1 0 01-.7.29zM22 13h-.08a1 1 0 010-2 1.038 1.038 0 011.04 1 .969.969 0 01-.96 1zM2.08 13H2a1 1 0 010-2 1.038 1.038 0 011.04 1 .969.969 0 01-.96 1zm16.93-7.01a1.024 1.024 0 01-.71-.29 1 1 0 010-1.41l.13-.13a1 1 0 011.41 1.41l-.13.13a.984.984 0 01-.7.29zm-14.02 0a1.024 1.024 0 01-.71-.29l-.13-.14a1 1 0 011.41-1.41l.13.13a1 1 0 010 1.41.97.97 0 01-.7.3zM12 3.04a.969.969 0 01-1-.96V2a1 1 0 012 0 1.038 1.038 0 01-1 1.04z"})]})}),tE=r(11163),tk=r(4065),tS=["size","width","height"];function tT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function tM(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tT(Object(r),!0).forEach(function(t){(0,j.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tT(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var tA=function(e){var t=e.size,r=void 0===t?24:t,n=e.width,i=e.height,o=(0,td.Z)(e,tS);return(0,eJ.jsx)("svg",tM(tM({"aria-hidden":"true",fill:"none",focusable:"false",height:r||i,role:"presentation",viewBox:"0 0 24 24",width:r||n,xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},o),{},{children:(0,eJ.jsx)("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,eJ.jsx)("g",{id:"ic_fluent_bot_24_filled",fill:"currentColor",fillRule:"nonzero",children:(0,eJ.jsx)("path",{d:"M17.7530511,13.999921 C18.9956918,13.999921 20.0030511,15.0072804 20.0030511,16.249921 L20.0030511,17.1550008 C20.0030511,18.2486786 19.5255957,19.2878579 18.6957793,20.0002733 C17.1303315,21.344244 14.8899962,22.0010712 12,22.0010712 C9.11050247,22.0010712 6.87168436,21.3444691 5.30881727,20.0007885 C4.48019625,19.2883988 4.00354153,18.2500002 4.00354153,17.1572408 L4.00354153,16.249921 C4.00354153,15.0072804 5.01090084,13.999921 6.25354153,13.999921 L17.7530511,13.999921 Z M11.8985607,2.00734093 L12.0003312,2.00049432 C12.380027,2.00049432 12.6938222,2.2826482 12.7434846,2.64872376 L12.7503312,2.75049432 L12.7495415,3.49949432 L16.25,3.5 C17.4926407,3.5 18.5,4.50735931 18.5,5.75 L18.5,10.254591 C18.5,11.4972317 17.4926407,12.504591 16.25,12.504591 L7.75,12.504591 C6.50735931,12.504591 5.5,11.4972317 5.5,10.254591 L5.5,5.75 C5.5,4.50735931 6.50735931,3.5 7.75,3.5 L11.2495415,3.49949432 L11.2503312,2.75049432 C11.2503312,2.37079855 11.5324851,2.05700336 11.8985607,2.00734093 L12.0003312,2.00049432 L11.8985607,2.00734093 Z M9.74928905,6.5 C9.05932576,6.5 8.5,7.05932576 8.5,7.74928905 C8.5,8.43925235 9.05932576,8.99857811 9.74928905,8.99857811 C10.4392523,8.99857811 10.9985781,8.43925235 10.9985781,7.74928905 C10.9985781,7.05932576 10.4392523,6.5 9.74928905,6.5 Z M14.2420255,6.5 C13.5520622,6.5 12.9927364,7.05932576 12.9927364,7.74928905 C12.9927364,8.43925235 13.5520622,8.99857811 14.2420255,8.99857811 C14.9319888,8.99857811 15.4913145,8.43925235 15.4913145,7.74928905 C15.4913145,7.05932576 14.9319888,6.5 14.2420255,6.5 Z"})})})}))},tP=["size","width","height"];function tC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function t_(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tC(Object(r),!0).forEach(function(t){(0,j.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tC(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var tI=function(e){var t=e.size,r=void 0===t?24:t,n=e.width,i=e.height,o=(0,td.Z)(e,tP);return(0,eJ.jsxs)("svg",t_(t_({"aria-hidden":"true",fill:"currentColor",focusable:"false",height:r||i,role:"presentation",viewBox:"0 0 512 512",width:r||n,xmlns:"http://www.w3.org/2000/svg"},o),{},{children:[(0,eJ.jsx)("path",{d:"M222.716,311.307l-109.3-84.325c-8.698-6.709-21.195-5.09-27.898,3.602c-6.708,8.691-5.103,21.189,3.601,27.898l109.293,84.318c8.705,6.708,21.196,5.103,27.905-3.595C233.026,330.506,231.414,318.015,222.716,311.307z"}),(0,eJ.jsx)("path",{d:"M236.318,67.662l109.307,84.318c8.698,6.716,21.189,5.104,27.898-3.594c6.709-8.698,5.097-21.182-3.601-27.898l-109.3-84.324c-8.698-6.709-21.189-5.09-27.898,3.601C226.015,48.462,227.628,60.954,236.318,67.662z"}),(0,eJ.jsx)("polygon",{points:"226.824,78.068 122.491,213.304 233.65,299.048 337.977,163.812"}),(0,eJ.jsx)("path",{d:"M501.529,363.144l-185.626-143.2l-32.864,42.598l185.633,143.2c11.764,9.075,28.652,6.901,37.72-4.864C515.474,389.107,513.293,372.219,501.529,363.144z"}),(0,eJ.jsx)("path",{d:"M186.936,409.748c0-14.274-11.565-25.847-25.84-25.847H39.689c-14.274,0-25.84,11.572-25.84,25.847v19.166h173.087V409.748z"}),(0,eJ.jsx)("rect",{x:"0",y:"445.143",width:"200.786",height:"34.833"})]}))},tO=["size","width","height"];function tL(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function tR(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tL(Object(r),!0).forEach(function(t){(0,j.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tL(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var tj=function(e){var t=e.size,r=void 0===t?24:t,n=e.width,i=e.height,o=(0,td.Z)(e,tO);return(0,eJ.jsx)("svg",tR(tR({"aria-hidden":"true",fill:"currentColor",focusable:"false",height:r||i,role:"presentation",viewBox:"0 0 48 48",width:r||n,xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},o),{},{children:(0,eJ.jsxs)("g",{children:[(0,eJ.jsx)("rect",{x:"13",y:"12.448",width:"35",height:"4"}),(0,eJ.jsx)("polygon",{points:"3.961,13.321 2.121,11.481 0,13.603 1.84,15.443 1.836,15.447 3.958,17.568 11.097,10.429 8.976,8.307"}),(0,eJ.jsx)("rect",{x:"13",y:"23.511",width:"35",height:"4"}),(0,eJ.jsx)("polygon",{points:"3.962,24.384 2.121,22.544 0,24.666 1.84,26.506 1.836,26.51 3.958,28.631 11.097,21.491 8.976,19.37"}),(0,eJ.jsx)("rect",{x:"13",y:"34.574",width:"35",height:"4"}),(0,eJ.jsx)("polygon",{points:"3.961,35.445 2.121,33.607 0,35.729 1.84,37.568 1.836,37.572 3.958,39.693 11.097,32.555 8.976,30.432"})]})}))},tB=["size","width","height"];function tN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function tD(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tN(Object(r),!0).forEach(function(t){(0,j.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tN(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var tK=function(e){var t=e.size,r=void 0===t?24:t,n=e.width,i=e.height,o=(0,td.Z)(e,tB);return(0,eJ.jsxs)("svg",tD(tD({"aria-hidden":"true",fill:"currentColor",focusable:"false",height:r||i,role:"presentation",viewBox:"0 0 1920 1920",width:r||n},o),{},{children:[(0,eJ.jsx)("path",{d:"M1034.59 564.21L959.198 320L885.413 562.527H640L838.898 714.104L761.906 960L960.801 808.422L1159.7 960L1081.1 715.79L1280 564.21H1034.59Z"}),(0,eJ.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M357.542 0H1562.46V119.181H1920V542.868C1920 655.236 1875.36 763.003 1795.91 842.46C1731.12 907.242 1647.52 948.879 1557.95 962.049C1544.78 1051.62 1503.15 1135.22 1438.36 1200C1360.45 1277.91 1255.32 1322.35 1145.33 1324.05V1496.31C1145.33 1510.38 1150.91 1523.87 1160.86 1533.81C1170.81 1543.76 1184.3 1549.35 1198.36 1549.35C1263.32 1549.35 1325.61 1575.15 1371.54 1621.08C1417.47 1667.01 1443.28 1729.31 1443.28 1794.26V1920H476.723V1794.26C476.723 1729.31 502.528 1667.01 548.458 1621.08C594.388 1575.15 656.682 1549.35 721.639 1549.35C735.705 1549.35 749.195 1543.76 759.14 1533.81C769.086 1523.87 774.674 1510.38 774.674 1496.31V1324.05C664.677 1322.35 559.547 1277.91 481.637 1200C416.854 1135.22 375.218 1051.62 362.048 962.049C272.477 948.879 188.877 907.242 124.095 842.46C44.6379 763.003 0 655.236 0 542.868V119.181H357.542V0ZM489.832 132.29V900.41C489.832 977.693 520.533 1051.81 575.18 1106.46C629.828 1161.11 703.946 1191.81 781.229 1191.81H906.964V1496.31C906.964 1545.46 887.439 1592.6 852.684 1627.36C817.928 1662.11 770.79 1681.64 721.639 1681.64C691.77 1681.64 663.123 1693.5 642.001 1714.63C622.429 1734.2 610.805 1760.23 609.204 1787.71H1310.8C1309.2 1760.23 1297.57 1734.2 1278 1714.63C1256.88 1693.5 1228.23 1681.64 1198.36 1681.64C1149.21 1681.64 1102.07 1662.11 1067.32 1627.36C1032.56 1592.6 1013.04 1545.46 1013.04 1496.31V1191.81H1138.77C1216.05 1191.81 1290.17 1161.11 1344.82 1106.46C1399.47 1051.81 1430.17 977.693 1430.17 900.41V132.29H489.832ZM357.542 251.471H132.29V542.868C132.29 620.151 162.991 694.269 217.638 748.917C256.412 787.69 304.988 814.409 357.542 826.659V251.471ZM1562.46 826.659V251.471H1787.71V542.868C1787.71 620.151 1757.01 694.269 1702.36 748.917C1663.59 787.69 1615.01 814.409 1562.46 826.659Z"})]}))},tU=["size","width","height"];function tz(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function tF(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tz(Object(r),!0).forEach(function(t){(0,j.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tz(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var tW=function(e){var t=e.size,r=void 0===t?24:t,n=e.width,i=e.height,o=(0,td.Z)(e,tU);return(0,eJ.jsxs)("svg",tF(tF({"aria-hidden":"true",fill:"currentColor",focusable:"false",height:r||i,role:"presentation",viewBox:"0 0 24 24",width:r||n},o),{},{children:[(0,eJ.jsx)("path",{d:"M12 21C10.2211 20.9984 8.48259 20.4697 7.004 19.4807C5.52542 18.4916 4.37308 17.0866 3.69255 15.443C3.01201 13.7995 2.8338 11.9911 3.18041 10.2463C3.52702 8.50153 4.38292 6.89859 5.63999 5.63995C5.70894 5.56919 5.79135 5.51296 5.88238 5.47456C5.97341 5.43616 6.0712 5.41638 6.16999 5.41638C6.26879 5.41638 6.36658 5.43616 6.4576 5.47456C6.54863 5.51296 6.63105 5.56919 6.69999 5.63995C6.84044 5.78058 6.91933 5.9712 6.91933 6.16995C6.91933 6.3687 6.84044 6.55933 6.69999 6.69995C5.96312 7.38657 5.3721 8.21458 4.96218 9.13457C4.55226 10.0546 4.33184 11.0477 4.31408 12.0547C4.29631 13.0618 4.48155 14.062 4.85877 14.9959C5.23598 15.9298 5.79742 16.7781 6.50961 17.4903C7.2218 18.2025 8.07013 18.764 9.00402 19.1412C9.9379 19.5184 10.9382 19.7036 11.9452 19.6859C12.9522 19.6681 13.9454 19.4477 14.8654 19.0378C15.7854 18.6278 16.6134 18.0368 17.3 17.3C17.9978 16.605 18.5515 15.779 18.9294 14.8695C19.3072 13.96 19.5017 12.9848 19.5017 12C19.5017 11.0151 19.3072 10.0399 18.9294 9.13039C18.5515 8.22088 17.9978 7.39493 17.3 6.69995C17.1595 6.55933 17.0807 6.3687 17.0807 6.16995C17.0807 5.9712 17.1595 5.78058 17.3 5.63995C17.3689 5.56919 17.4514 5.51296 17.5424 5.47456C17.6334 5.43616 17.7312 5.41638 17.83 5.41638C17.9288 5.41638 18.0266 5.43616 18.1176 5.47456C18.2086 5.51296 18.291 5.56919 18.36 5.63995C19.6171 6.89859 20.473 8.50153 20.8196 10.2463C21.1662 11.9911 20.988 13.7995 20.3074 15.443C19.6269 17.0866 18.4746 18.4916 16.996 19.4807C15.5174 20.4697 13.7789 20.9984 12 21Z"}),(0,eJ.jsx)("path",{d:"M12 12.75C11.8019 12.7474 11.6126 12.6676 11.4725 12.5275C11.3324 12.3874 11.2526 12.1981 11.25 12V4C11.25 3.80109 11.329 3.61032 11.4697 3.46967C11.6103 3.32902 11.8011 3.25 12 3.25C12.1989 3.25 12.3897 3.32902 12.5303 3.46967C12.671 3.61032 12.75 3.80109 12.75 4V12C12.7474 12.1981 12.6676 12.3874 12.5275 12.5275C12.3874 12.6676 12.1981 12.7474 12 12.75Z"})]}))},tV=r(9919),t$=["size","width","height"];function tH(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function tq(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tH(Object(r),!0).forEach(function(t){(0,j.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tH(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var tZ=function(e){var t=e.size,r=void 0===t?24:t,n=e.width,i=e.height,o=(0,td.Z)(e,t$);return(0,eJ.jsxs)("svg",tq(tq({"aria-hidden":"true",fill:"none",focusable:"false",stroke:"currentColor",height:r||i,role:"presentation",viewBox:"0 0 24 24",width:r||n,xmlns:"http://www.w3.org/2000/svg"},o),{},{children:[(0,eJ.jsx)("path",{d:"M15 22V17.6569C15 16.8394 15 16.4306 15.1522 16.0631C15.3045 15.6955 15.5935 15.4065 16.1716 14.8284L19.4142 11.5858C19.7032 11.2968 19.8478 11.1522 19.9239 10.9685C20 10.7847 20 10.5803 20 10.1716V10C20 9.05719 20 8.58579 19.7071 8.29289C19.4142 8 18.9428 8 18 8H6C5.05719 8 4.58579 8 4.29289 8.29289C4 8.58579 4 9.05719 4 10V10.1716C4 10.5803 4 10.7847 4.07612 10.9685C4.15224 11.1522 4.29676 11.2968 4.58579 11.5858L7.82843 14.8284C8.40649 15.4065 8.69552 15.6955 8.84776 16.0631C9 16.4306 9 16.8394 9 17.6569V22",strokeWidth:"1.5",strokeLinecap:"round"}),(0,eJ.jsx)("path",{d:"M15 16H9",strokeWidth:"1.5",strokeLinecap:"round"}),(0,eJ.jsx)("path",{d:"M4.5 11H19.5",strokeWidth:"1.5",strokeLinecap:"round"}),(0,eJ.jsx)("path",{d:"M12 5V2",strokeWidth:"1.5",strokeLinecap:"round"}),(0,eJ.jsx)("path",{d:"M8 5L6 3",strokeWidth:"1.5",strokeLinecap:"round"}),(0,eJ.jsx)("path",{d:"M16 5L18 3",strokeWidth:"1.5",strokeLinecap:"round"}),(0,eJ.jsx)("path",{d:"M12 19V21",strokeWidth:"1.5",strokeLinecap:"round"})]}))},tG=["size","width","height"];function tJ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function tY(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tJ(Object(r),!0).forEach(function(t){(0,j.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tJ(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var tX=function(e){var t=e.size,r=void 0===t?24:t,n=e.width,i=e.height,o=(0,td.Z)(e,tG);return(0,eJ.jsx)("svg",tY(tY({"aria-hidden":"true",fill:"none",focusable:"false",height:r||i,role:"presentation",viewBox:"0 0 32 32",width:r||n,stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",xmlns:"http://www.w3.org/2000/svg"},o),{},{children:(0,eJ.jsx)("path",{d:"M14,26H4v-8L6,8h8v6h4V8h8l2,10v8H18v-8h-4V26z M13,2H8v5h5V2z M24,2h-5v5h5V2z M3,29h12v-2H3V29z M17,27v2h12v-2H17z"})}))},tQ=function(){var e,t,r,n=(0,tE.useRouter)(),i=(0,F.useState)(!1),o=i[0],s=i[1],a=(0,tn.F)(),l=a.theme,u=a.setTheme,c=(0,e$.O)(),d=c.publicKey,h=c.wallet,f=c.connecting,p=c.connected,g=c.disconnect,m=(0,eQ.a)(),y=m.setIsAuthenticated,v=m.currentWallet,b=m.setJwtToken,w=(0,F.useRef)(null),x=function(){w.current&&(clearTimeout(w.current),w.current=null),s(!0)},E=function(){w.current=setTimeout(function(){s(!1),w.current=null},300)},k=(0,F.useMemo)(function(){return null==d?void 0:d.toBase58()},[d]),S=(0,F.useMemo)(function(){return h?k?(v&&(h.adapter.connect(),h.adapter.emit("connect",new z.PublicKey(v))),k.slice(0,4)+"…"+k.slice(-4)):f?"Connecting...":p?"Connected":"Connect Wallet":null},[h,f,p,k,v]),T=(0,F.useMemo)(function(){return o?(0,eJ.jsx)(tb,{}):(0,eJ.jsx)(tg,{})},[o]),M=(t=(e=(0,F.useState)(!1))[0],r=e[1],(0,F.useEffect)(function(){setTimeout(function(){r(!0)})},[]),t),A=function(){b(""),tk.Tc.setJwtToken(""),y(!1),g()},P=function(){var e="light"===l?"dark":"light";u(e),localStorage.setItem("theme",e)};return(0,eJ.jsxs)(ti.F,{isOpen:o,showArrow:!0,radius:"sm",classNames:{content:"p-0 border-small border-divider bg-background"},children:[(0,eJ.jsx)(to.S,{children:(0,eJ.jsx)("div",{tabIndex:0,children:(0,eJ.jsxs)(ts.A,{disableAnimation:!0,className:"bg-transparent p-0 font-bold text-base btn-ghost btn-sm min-w-[140px] dark:text-default-800 btn btn-square btn-ghost text-right",onClick:function(){return s(!o)},onMouseEnter:x,onMouseLeave:E,children:[(0,eJ.jsx)("span",{className:"max-w-[95px]",children:S||""}),(0,eJ.jsx)("span",{className:"text-large"}),T]})})}),(0,eJ.jsxs)(ta.a,{onMouseEnter:x,onMouseLeave:E,closeOnSelect:!1,"aria-label":"Custom item styles",disabledKeys:["new_bid","new_listing"],className:"p-3",itemClasses:{base:["rounded-md","text-default-500","transition-opacity","data-[hover=true]:text-foreground","data-[hover=true]:bg-default-100","dark:data-[hover=true]:bg-default-50","data-[selectable=true]:focus:bg-default-50","data-[pressed=true]:opacity-70","data-[focus-visible=true]:ring-default-500"]},children:[(0,eJ.jsxs)(tl,{"aria-label":"Profile & Actions",showDivider:!0,children:[(0,eJ.jsx)(tu.W,{onClick:function(){return n.push("/profile")},startContent:(0,eJ.jsx)(tA,{size:15}),children:"Profile"},"profile"),(0,eJ.jsx)(tu.W,{onClick:function(){return n.push("/discovery")},startContent:(0,eJ.jsx)(tX,{size:15}),children:"Discovery"},"discovery"),(0,eJ.jsx)(tu.W,{onClick:function(){return n.push("/bids")},startContent:(0,eJ.jsx)(tI,{size:15}),children:"Bids"},"bids"),(0,eJ.jsx)(tu.W,{onClick:function(){return n.push("/listings")},startContent:(0,eJ.jsx)(tj,{size:15}),children:"Listings"},"listings"),(0,eJ.jsx)(tu.W,{onClick:function(){return n.push("/leaderboard")},startContent:(0,eJ.jsx)(tK,{size:15}),children:"Leaderboard"},"leaderboard")]}),(0,eJ.jsx)(tl,{"aria-label":"Preferences",showDivider:!0,children:(0,eJ.jsx)(tu.W,{onClick:function(){return P()},startContent:(0,eJ.jsx)(tZ,{size:15}),endContent:(0,eJ.jsx)(tc.i,{classNames:{base:"ml-2 animate-[levitate_13s_ease_infinite_1s_reverse]",wrapper:"h-5 shadow-sm",startContent:"text-white"},color:"default",endContent:(0,eJ.jsx)(tw,{}),isSelected:"dark"===l&&M,startContent:(0,eJ.jsx)(tx,{}),onChange:P,id:"theme",name:"theme"}),children:"Dark Mode"},"theme")}),(0,eJ.jsxs)(tl,{"aria-label":"Help & Feedback",children:[(0,eJ.jsx)(tu.W,{onClick:function(){return n.push("/help")},startContent:(0,eJ.jsx)(tV.b,{size:15}),children:"Help & Feedback"},"help_and_feedback"),(0,eJ.jsx)(tu.W,{onClick:function(){return A()},startContent:(0,eJ.jsx)(tW,{size:15}),children:"Disconnect"},"logout")]})]})]})},t0=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.join(" ")},t1={heading:"text-3xl font-medium","sub-heading":"text-2xl font-medium","nav-heading":"text-lg font-medium sm:text-xl",nav:"font-medium",paragraph:"text-lg","sub-paragraph":"text-base font-medium text-inherit",input:"text-sm uppercase tracking-wide",label:"text-xs uppercase tracking-wide"},t2=function(e){var t=e.variant,r=e.className,n=e.href,i=e.children;return(0,eJ.jsx)("p",{className:t0(r,t1[t]),children:n?(0,eJ.jsx)(tr(),{href:n,className:"min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:i}):i})},t5=function(e){var t=e.label,r=e.href,n=e.as,i=e.scroll,o=e.disabled,s=e.navigationStarts,a=void 0===s?function(){}:s,l=(0,tE.useRouter)(),u=r===l.asPath||n&&n===l.asPath,c=(0,F.useRef)(null);return(0,F.useEffect)(function(){c.current&&(c.current.className=t0("h-0.5 w-1/4 transition-all duration-300 ease-out",u?"!w-full bg-gradient-to-l from-gray-100 to-gray-500 ":"group-hover:w-1/2 group-hover:bg-gray-500"))},[u]),(0,eJ.jsxs)(tr(),{href:r,as:n,scroll:i,passHref:!0,className:t0("group flex h-full flex-col items-center justify-between",o&&"pointer-events-none cursor-not-allowed opacity-50"),onClick:function(){return a()},children:[(0,eJ.jsx)("div",{className:"flex flex-row items-center gap-3",children:(0,eJ.jsxs)(t2,{variant:"nav-heading",children:[" ",t," "]})}),(0,eJ.jsx)("div",{ref:c})]})};r(3745);let t6=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((e,t)=>((t&=63)<36?e+=t.toString(36):t<62?e+=(t-26).toString(36).toUpperCase():t>62?e+="-":e+="_",e),"");var t3=r(9669),t4=r(69323),t8=r(50780),t7=r(75678),t9=class{constructor(e,t,r,n,i,o,s,a,l,u,c){this.threads=e,this.dapps=t,this.dappNotificationTypes=r,this.dappNotificationSubscriptions=n,this.walletsV0=i,this.walletAddresses=o,this.walletDappAddresses=s,this.walletMessages=a,this.walletNotificationSubscriptions=l,this.pushNotificationSubscriptions=u,this.health=c}},re=class{},rt=class{constructor(e,t,r,n){this.error=e,this.statusCode=t,this.message=r,this.requestId=n}},rr="x-request-id";function rn(e){return{...e&&{Authorization:`Bearer ${e.rawValue}`},[rr]:t6(),"x-client-name":"dialect-sdk","x-client-version":"1.9.4"}}async function ri(e){try{return await e}catch(r){if(console.error(r),!r.response)throw new re;let e=r.response.data,t=(r.config.headers&&r.config.headers[rr])??null;throw new rt(r.response.statusText,Number(r.response.status),e.message,t)}}var ro=class{constructor(e,t){this.baseUrl=e,this.tokenProvider=t}async create(e){let t=await this.tokenProvider.get(),r={...e,publicKey:t.body.sub};return ri(t3.post(`${this.baseUrl}/api/v1/dapps`,r,{headers:rn(t)}).then(e=>e.data))}async patch(e){let t=await this.tokenProvider.get();return ri(t3.patch(`${this.baseUrl}/api/v1/dapps/${t.body.sub}`,e,{headers:rn(t)}).then(e=>e.data))}async findAllDappAddresses(){let e=await this.tokenProvider.get();return ri(t3.get(`${this.baseUrl}/api/v1/dapps/${e.body.sub}/dappAddresses`,{headers:rn(e)}).then(e=>e.data))}async find(e){let t=await this.tokenProvider.get(),r=e||t.body.sub;return ri(t3.get(`${this.baseUrl}/api/v1/dapps/${r}`,{headers:rn(t)}).then(e=>e.data))}async broadcast(e){let t=await this.tokenProvider.get();return ri(t3.post(`${this.baseUrl}/api/v1/dapps/${t.body.sub}/messages/broadcast`,e,{headers:rn(t)}).then())}async multicast(e){let t=await this.tokenProvider.get();return ri(t3.post(`${this.baseUrl}/api/v1/dapps/${t.body.sub}/messages/multicast`,e,{headers:rn(t)}).then())}async unicast(e){let t=await this.tokenProvider.get();return ri(t3.post(`${this.baseUrl}/api/v1/dapps/${t.body.sub}/messages/unicast`,e,{headers:rn(t)}).then())}async findAll(e){let t=await this.tokenProvider.get();return ri(t3.get(`${this.baseUrl}/api/v1/dapps`,{headers:rn(t),params:e}).then(e=>e.data))}},rs=class extends Error{constructor(e,t,r,n){super(r),this.type=e,this.title=t,this.msg=r,this.details=n,this.msg=r,this.type=e,this.title=t,this.details=n}},ra=class e extends rs{constructor(t,r,n){super(e.name,t,r,n)}},rl=class e extends rs{constructor(t,r,n){super(e.name,t,r,n)}},ru=class e extends rs{constructor(t,r,n){super(e.name,t,r,n)}},rc=class e extends rs{constructor(t,r){super(e.name,"Error",r??"Something went wrong. Please try again later.",t)}},rd=class e extends rs{constructor(t){super(e.name,"Error",t)}},rh=class e extends rs{constructor(t){super(e.name,"Error",t)}},rf=class e extends rs{constructor(t){super(e.name,"Error",t)}},rp=class e extends rs{constructor(t){super(e.name,"Error",t)}},rg=class e extends rs{constructor(t){super(e.name,"Error",t)}},rm=((l=rm||{}).Email="EMAIL",l.PhoneNumber="PHONE_NUMBER",l.Telegram="TELEGRAM",l.Wallet="WALLET",l),ry={EMAIL:"EMAIL",PHONE_NUMBER:"PHONE_NUMBER",TELEGRAM:"TELEGRAM",WALLET:"WALLET"};function rv(e){let t=ry[e];if(!t)throw new ra(`Unknown address type ${e}`);return t}var rb={EMAIL:"EMAIL",PHONE_NUMBER:"PHONE_NUMBER",TELEGRAM:"TELEGRAM",WALLET:"WALLET"};function rw(e){let t=rb[e];if(!t)throw new ra(`Unknown address type ${e}`);return t}var rx=class{equals(e){return this.toString()===e.toString()}},rE=class{constructor(e,t){this.parser=e,this.validator=t}authenticate(e){let t=this.parser.parseHeader(e);if(!this.validator.canValidate(t))return null;let r=this.parser.parse(e);return this.validator.isValid(r)?r:null}},rk=class{},rS=class{constructor(e,t,r){this.tokenSigner=e,this.tokenGenerator=t,this.authenticator=r}type(){return this.tokenSigner.alg}subject(){return this.tokenSigner.subject}generateToken(e){return this.tokenGenerator.generate(e)}parseToken(e){return this.authenticator.parser.parse(e)}canValidate(e){return this.authenticator.validator.canValidate(e)}isValid(e){return this.authenticator.validator.isValid(e)}},rT=class{static createInMemory(){return new rM}static createSessionStorage(){return new rA}static createLocalStorage(){return new rP}},rM=class extends rT{constructor(){super(...arguments),this.tokens={}}get(e){return this.tokens[e.toString()]??null}save(e,t){return this.tokens[e.toString()]=t,t}delete(e){delete this.tokens[e.toString()]}},rA=class extends rT{get(e){let t=rC(e.toString());return sessionStorage.getItem(t)}delete(e){let t=rC(e.toString());sessionStorage.removeItem(t)}save(e,t){return sessionStorage.setItem(rC(e.toString()),t),t}},rP=class extends rT{get(e){let t=rC(e.toString());return localStorage.getItem(t)}save(e,t){return localStorage.setItem(rC(e.toString()),t),t}delete(e){localStorage.removeItem(rC(e.toString()))}};function rC(e){return`dialect-auth-token-${e}`}var r_=class{static create(e,t,r=86400,n=rT.createInMemory(),i="implicit"){return new rO(new rI(r,e.tokenGenerator),n,i,e.authenticator.parser,e.authenticator.validator,e.subject(),t)}},rI=class extends r_{constructor(e,t){if(e>7776e3)throw new ra(`Token TTL ${e} must be <= max 7776000`);super(),this.ttlSeconds=e,this.tokenGenerator=t}get(){return this.tokenGenerator.generate(this.ttlSeconds)}},rO=class extends r_{constructor(e,t,r,n,i,o,s){super(),this.delegate=e,this.tokenStore=t,this.walletCreation=r,this.tokenParser=n,this.tokenValidator=i,this.subject=o,this.dataServiceWalletsApiClientV1=s,this.delegateGetPromises={}}async get(){let e=this.getCachedToken(),t=this.subject.toString();if(e&&this.tokenValidator.isValid(e))return e;let r=this.delegateGetPromises[t];if(r)return r;let n=this.delegate.get().then(async e=>{this.tokenStore.save(this.subject,e.rawValue),delete this.delegateGetPromises[t];let r={publicKey:this.subject};return"implicit"===this.walletCreation&&await this.dataServiceWalletsApiClientV1.upsertWallet(r,e),e});return n.catch(e=>{delete this.delegateGetPromises[t]}),this.delegateGetPromises[t]=n,n}hasValidCachedToken(){let e=this.getCachedToken();return!!e&&this.tokenValidator.isValid(e)}getCachedToken(){let e=this.tokenStore.get(this.subject);if(!e)return null;try{return this.tokenParser.parse(e)}catch(e){return this.tokenStore.delete(this.subject),null}}};function rL(e){return(0,t4.encodeURLSafe)(e).replace(/=/g,"")}function rR(e){let t=JSON.stringify(e);return rL(new TextEncoder().encode(t))}function rj(e){let t=(0,t4.decodeURLSafe)(e);return JSON.parse(new TextDecoder().decode(t))}var rB=class e extends rs{constructor(){super(e.name,"Unable to parse jwt token")}},rN=class e extends rs{constructor(){super(e.name,"Invalid jwt token")}},rD=class{},rK=class{parse(e){let t=e.split(".")[0];if(!t)throw new rB;return rj(t)}},rU=class{constructor(e){this.bodyParser=e,this.tokenHeaderParser=new rK}parse(e){let t=e.split(".");if(3!==t.length)throw new rB;let[r,n,i]=t;if(!r||!n||!i)throw new rB;try{let t=this.parseHeader(e),o=this.parseBody(n),s=(0,t4.decodeURLSafe)(i);return{base64Header:r,base64Body:n,base64Signature:i,rawValue:e,header:t,signature:s,body:o}}catch(e){throw console.error(e),new rB}}parseHeader(e){return this.tokenHeaderParser.parse(e)}parseBody(e){let t=this.bodyParser.parse(e);if(!t.sub||!t.exp)throw new rN;return t}},rz=class{isValid(e){return!(!this.canValidate(e.header)||!this.isSignatureValid(e)||this.isExpired(e))&&this.performExtraValidation(e)}performExtraValidation(e){return!0}isExpired(e){return new Date().getTime()/1e3+10>e.body.exp}},rF=class{constructor(e){this.signer=e}header(){return{alg:this.signer.alg,typ:"JWT"}}body(e){let t=new Date().getTime()/1e3;return{sub:this.signer.subject,sub_jwk:this.signer.subjectPublicKey?.toString(),iat:Math.round(t),exp:Math.round(t+e)}}async sign(e,t,r){let n=new TextEncoder().encode(e+"."+t),{payload:i,signature:o}=await r.sign(n),s=rL(o);return{signedPayload:i,signature:o,base64Signature:s}}},rW=class extends rF{async generate(e){let t=this.header(),r=rR(t),n=this.body(e),i=rR(n),{signature:o,base64Signature:s}=await this.sign(r,i,this.signer);return{rawValue:`${r}.${i}.${s}`,body:n,header:t,signature:o,base64Signature:s,base64Body:i,base64Header:r}}},rV=class extends rD{parse(e){return rj(e)}},r$=class extends rx{constructor(e){if(super(),"string"==typeof e&&e.startsWith("0x")){let t=new TextEncoder;this.value=t.encode(e)}else"string"==typeof e?this.value=es.decode(e):this.value=e}toBytes(){return this.value}toString(){return es.encode(this.value)}},rH=((u=rH||{}).SOLANA="SOLANA",u.APTOS="APTOS",u.EVM="EVM",u),rq=((c=rq||{}).LINK="Link",c.SMART_MESSAGE="SmartMessage",c),rZ=class{static createInMemory(){return new rG}static createSessionStorage(){return new rJ}static createLocalStorage(){return new rY}},rG=class extends rZ{constructor(){super(...arguments),this.keys={}}get(e){return this.keys[e.toString()]??null}save(e,t){return this.keys[e.toString()]=t,t}},rJ=class extends rZ{get(e){let t=rX(e.toString());try{let e=sessionStorage.getItem(t);if(!e)return null;return r0(e)}catch{return sessionStorage.removeItem(t),null}}save(e,t){return sessionStorage.setItem(rX(e.toString()),rQ(t)),t}},rY=class extends rZ{get(e){let t=rX(e.toString());try{let e=localStorage.getItem(t);if(!e)return null;return r0(e)}catch{return localStorage.removeItem(t),null}}save(e,t){return localStorage.setItem(rX(e.toString()),rQ(t)),t}};function rX(e){return`dialect-encryption-keys-${e}`}function rQ(e){return JSON.stringify({version:1,keys:{publicKey:Array.from(e.publicKey),secretKey:Array.from(e.secretKey)}})}function r0(e){let t=JSON.parse(e);return{publicKey:Uint8Array.from(t.keys.publicKey),secretKey:Uint8Array.from(t.keys.secretKey)}}var r1=class{static create(e,t=rZ.createInMemory()){return new r2(e,t)}},r2=class extends r1{constructor(e,t){super(),this.delegate=e,this.encryptionKeysStore=t,this.delegateGetPromises={}}isAvailable(){return this.delegate.isAvailable()}async getFailSafe(e){let t=this.encryptionKeysStore.get(e);if(t)return delete this.delegateGetPromises[e.toString()],t;let r=this.delegateGetPromises[e.toString()];if(r)return r;let n=this.delegate.getFailSafe(e).then(t=>t&&this.encryptionKeysStore.save(e,t));return n.catch(()=>{delete this.delegateGetPromises[e.toString()]}),this.delegateGetPromises[e.toString()]=n,n}async getFailFast(e){return this.getFailSafe(e).then(e=>{if(!e)throw new ru("Encryption not supported","Wallet does not support encryption, please use wallet-adapter that supports diffieHellman() operation.");return e})}},r5=class{constructor({address:e,type:t}){this.address=e,this.type=t}equals(e){return this.address==e.address&&this.type===e.type}toString(){return this.type?this.type.toString()+":"+this.address.toString():this.address.toString()}},r6=((d=r6||{}).WRITE="WRITE",d.ADMIN="ADMIN",d),r3=class extends rs{},r4=class e extends r3{constructor(){super(e.name,"Error","You already have chat with this address")}},r8=class{constructor(e,t){this.baseUrl=e,this.tokenProvider=t}async markAsRead(e){let t=await this.tokenProvider.get();return ri(t3.post(`${this.baseUrl}/api/v2/dialects/${e}/markAsRead`,{},{headers:rn(t)}).then(e=>e.data))}async create(e){let t=await this.tokenProvider.get();return ri(t3.post(`${this.baseUrl}/api/v2/dialects`,e,{headers:rn(t)}).then(e=>e.data))}async findAll(){let e=await this.tokenProvider.get();return ri(t3.get(`${this.baseUrl}/api/v2/dialects`,{headers:rn(e)}).then(e=>e.data))}async find(e){let t=await this.tokenProvider.get();return ri(t3.get(`${this.baseUrl}/api/v2/dialects/${e}`,{headers:rn(t)}).then(e=>e.data))}async findByMembers(e){let t=await this.tokenProvider.get();return ri(t3.get(`${this.baseUrl}/api/v2/dialects/search/byMembers`,{headers:rn(t),params:e}).then(e=>e.data))}async delete(e){let t=await this.tokenProvider.get();return ri(t3.delete(`${this.baseUrl}/api/v2/dialects/${e}`,{headers:rn(t)}).then(e=>e.data))}async patch(e,t){let r=await this.tokenProvider.get();return ri(t3.patch(`${this.baseUrl}/api/v2/dialects/${e}`,t,{headers:rn(r)}).then(e=>e.data))}async sendMessage(e,t){let r=await this.tokenProvider.get();return ri(t3.post(`${this.baseUrl}/api/v2/dialects/${e}/messages`,t,{headers:rn(r)}).then(e=>e.data))}async getMessages(e){let t=await this.tokenProvider.get();return ri(t3.get(`${this.baseUrl}/api/v2/dialects/${e}/messages`,{headers:rn(t)}).then(e=>e.data))}findSummary(e){return ri(t3.get(`${this.baseUrl}/api/v2/dialects/summary`,{headers:rn(),...e&&{params:e}}).then(e=>e.data))}findSummaryAll(e){return ri(t3.get(`${this.baseUrl}/api/v2/dialects/summary/all`,{headers:rn(),params:e}).then(e=>e.data))}async addMembers(e,t){let r=await this.tokenProvider.get();await ri(t3.post(`${this.baseUrl}/api/v2/dialects/${e}/members`,t,{headers:rn(r)}).then(e=>e.data))}async removeMember(e,t){let r=await this.tokenProvider.get();await ri(t3.delete(`${this.baseUrl}/api/v2/dialects/${e}/members/${t}`,{headers:rn(r)}).then(e=>e.data))}},r7=((h=r7||{}).ADMIN="ADMIN",h.WRITE="WRITE",h),r9=class extends rs{},ne=class e extends r9{constructor(t){super(e.name,"Lost connection to Dialect Cloud","Having problems reaching Dialect Cloud. Please try again later.",t)}};async function nt(e,t=e=>new rh(nr(e))){try{return await e}catch(e){if(e instanceof re)throw new ne([e]);if(e instanceof rt){if(400===e.statusCode)throw console.error(e),new ra(nr(e));if(401===e.statusCode)throw new rf(nr(e));if(403===e.statusCode)throw new rp(nr(e));if(404===e.statusCode)throw new rg(nr(e));if(409===e.statusCode)throw t(e);if(422===e.statusCode)throw new rd(nr(e));throw console.error(e),new rc([e],nr(e))}throw console.error(e),new rc([e])}}function nr(e){return`${e.message??e.error}`}var nn=class extends Error{constructor(){super("IncorrectPublicKeyFormatError")}},ni=class extends Error{constructor(){super("Authentication failed during decryption attempt")}};function no(e){let t=t7.convertPublicKey(e);if(!t)throw new nn;return t}var ns=class{constructor(e,t){this.encryptionProps=e,this.members=t,this.unencryptedTextSerde=new na}deserialize(e){let t=e.slice(0,24),r=e.slice(24,e.length),n=this.findOtherMember(new r$(this.encryptionProps.ed25519PublicKey)),i=function(e,{secretKey:t,publicKey:r},n,i){let o=t8.box.open(e,i,no(n),t);if(!o)throw new ni;return o}(r,this.encryptionProps.diffieHellmanKeyPair,n.toBytes(),t);return this.unencryptedTextSerde.deserialize(i)}serialize(e){let t=new r$(this.encryptionProps.ed25519PublicKey),r=this.findMemberIdx(t),n=this.unencryptedTextSerde.serialize(e),i=this.findOtherMember(t),o=new Uint8Array([r,...t8.randomBytes(23)]),s=function(e,{secretKey:t,publicKey:r},n,i){return t8.box(e,i,no(n),t)}(n,this.encryptionProps.diffieHellmanKeyPair,i.toBytes(),o);return new Uint8Array([...o,...s])}findMemberIdx(e){let t=this.members.findIndex(t=>t.equals(e));if(-1===t)throw Error("Expected to have other member");return t}findOtherMember(e){let t=this.members.find(t=>!t.equals(e));if(!t)throw Error("Expected to have other member");return t}},na=class{deserialize(e){return new TextDecoder().decode(e)}serialize(e){return new TextEncoder().encode(e)}},nl="dialect-cloud",nu=class{constructor(e,t,r){this.me=e,this.dataServiceDialectsApi=t,this.encryptionKeysProvider=r,this.type=nl}async create(e){let t=nf(e.otherMembers);if(e.encrypted&&t.length>=2)throw new ru("Unsupported operation","Encryption not supported in group chats");e.encrypted&&await this.checkEncryptionSupported();let r=await nt(this.dataServiceDialectsApi.create({encrypted:e.encrypted,members:[{address:this.me,scopes:nh(e.me.scopes)},...t.map(e=>({address:e.address,scopes:nh(e.scopes)}))]}),()=>new r4);return this.toDataServiceThread(r)}async find(e){let t=await this.findInternal(e);return t&&this.toDataServiceThread(t)}async findAll(){return Promise.all((await nt(this.dataServiceDialectsApi.findAll())).map(e=>this.toDataServiceThread(e)))}async findSummary(e){try{let t=await nt(this.dataServiceDialectsApi.findSummary({memberAddresses:[this.me.toString(),...e.otherMembers.map(e=>e.toString())]})),r=t.memberSummaries.find(e=>e.address===this.me);if(!r)throw new rl(`Cannot resolve member from given list: ${t.memberSummaries.map(e=>e.address)} and provided member public key ${this.me.toString()}`);let n={address:r.address,hasUnreadMessages:r.hasUnreadMessages,unreadMessagesCount:r.unreadMessagesCount};return{id:new r5({address:t.id,type:this.type}),me:n}}catch(e){if(e instanceof rg)return null;throw e}}async findSummaryAll(){return await nt(this.dataServiceDialectsApi.findSummaryAll({address:this.me}))}checkEncryptionSupported(){return this.encryptionKeysProvider.getFailFast(this.me)}async toDataServiceThread(e){var t,r;let{id:n,dialect:i}=e,o=(t=this.me,i.members.find(e=>t===e.address)??null),s=(r=this.me,i.members.filter(e=>r!==e.address));if(!o||!s.length)throw new rl(`Cannot resolve members from given list: ${i.members.map(e=>e.address)} and wallet public key ${this.me.toString()}`);let{serde:a,canBeDecrypted:l}=await this.createTextSerde(i),u=s.map(e=>({address:e.address,scopes:nd(e.scopes)})),c=Object.fromEntries(u.map(e=>[e.address.toString(),e])),d={address:o.address,scopes:nd(o.scopes)},h=i.lastMessage??null,f=null;return null!=h&&(f={id:h.id,text:a.deserialize(new Uint8Array(h.text)),timestamp:new Date(h.timestamp),author:h.owner===this.me?d:c[h.owner],deduplicationId:h.deduplicationId,metadata:h.metadata}),new nc(this.dataServiceDialectsApi,a,this.encryptionKeysProvider,n,d,u,c,i.encrypted,l,new Date(i.updatedAt),f,i.groupName)}async createTextSerde(e){if(!e.encrypted)return{serde:new na,canBeDecrypted:!0};let t=await this.encryptionKeysProvider.getFailSafe(this.me),r=t&&{diffieHellmanKeyPair:t,ed25519PublicKey:new r$(this.me).toBytes()};return r?{serde:new ns(r,e.members.map(e=>new r$(e.address))),canBeDecrypted:!0}:{serde:new na,canBeDecrypted:!1}}findInternal(e){return"id"in e?this.findById(e):this.findByOtherMember(e)}async findById(e){try{return await nt(this.dataServiceDialectsApi.find(e.id.address.toString()))}catch(e){if(e instanceof rg)return null;throw e}}async findByOtherMember(e){let t=nf(e.otherMembers);try{return await nt(this.dataServiceDialectsApi.findByMembers({memberAddresses:t.map(e=>e.toString())}))}catch(e){if(e instanceof rg)return null;throw e}}},nc=class{constructor(e,t,r,n,i,o,s,a,l,u,c,d){this.dataServiceDialectsApi=e,this.textSerde=t,this.encryptionKeysProvider=r,this.address=n,this.me=i,this.otherMembers=o,this.otherMembersPks=s,this.encryptionEnabled=a,this.canBeDecrypted=l,this.updatedAt=u,this.lastMessage=c,this.name=d,this.type=nl,this.id=new r5({type:this.type,address:n})}async delete(){await nt(this.dataServiceDialectsApi.delete(this.address.toString()))}async messages(){let{dialect:e}=await nt(this.dataServiceDialectsApi.find(this.address.toString()));if(this.updatedAt=new Date(e.updatedAt),this.encryptionEnabledButCannotBeUsed())return[];let{messages:t}=await nt(this.dataServiceDialectsApi.getMessages(this.address.toString())),r=t.map(e=>({id:e.id,author:e.owner===this.me.address.toString()?this.me:this.otherMembersPks[e.owner],timestamp:new Date(e.timestamp),text:this.textSerde.deserialize(new Uint8Array(e.text)),deduplicationId:e.deduplicationId,metadata:e.metadata}));return this.lastMessage=r[0]??null,r}async send(e){if(this.encryptionEnabledButCannotBeUsed())throw new ru("Encryption not supported","Please use encryption keys provider that supports encryption.");await nt(this.dataServiceDialectsApi.sendMessage(this.address.toString(),{text:Array.from(this.textSerde.serialize(e.text)),deduplicationId:e.deduplicationId}))}async markAsRead(){await nt(this.dataServiceDialectsApi.markAsRead(this.id.address.toString()))}async addMembers(e){let t=nf(e.members);await nt(this.dataServiceDialectsApi.addMembers(this.id.address.toString(),{members:t.map(e=>({address:e.address,scopes:nh(e.scopes)}))}),()=>new r4)}async removeMember(e){await nt(this.dataServiceDialectsApi.removeMember(this.id.address.toString(),e),()=>new r4)}async rename(e){await nt(this.dataServiceDialectsApi.patch(this.id.address.toString(),{groupName:e}))}encryptionEnabledButCannotBeUsed(){return this.encryptionEnabled&&!this.canBeDecrypted}};function nd(e){return e.map(e=>r6[e])}function nh(e){return e.map(e=>r7[e])}function nf(e){if(e.length<1)throw new ru("Unsupported operation","At least one member should be specified");return e}var np=class{constructor(e){this.api=e}async send(e){return e.addressTypes?.length===0?void 0:"recipient"in e?this.unicast(e):"recipients"in e?this.multicast(e):this.broadcast(e)}async unicast(e){let t=this.getActionsV2DtoForUnicast(e.actionsV2);return nt(this.api.unicast({message:e.message,title:e.title,imageUrl:e.imageUrl,notificationTypeId:e.notificationTypeId,recipientPublicKey:e.recipient.toString(),addressTypes:e?.addressTypes?.map(e=>rv(e)),actionsV2:t}))}getActionsV2DtoForUnicast(e){return e?.type?"Link"===e.type?{type:"Link",links:e.links.map(e=>({label:e.label,url:e.url}))}:"SmartMessage"===e.type?{type:"SmartMessage",smartMessage:{transactionServiceId:e.smartMessage.transactionServiceId,transactionParams:e.smartMessage.transactionParams}}:void 0:void 0}async multicast(e){if(0!==e.recipients.length)return nt(this.api.multicast({message:e.message,title:e.title,imageUrl:e.imageUrl,actionsV2:this.getActionsV2DtoForLinks(e.actionsV2),notificationTypeId:e.notificationTypeId,recipientPublicKeys:e.recipients.map(e=>e.toString()),addressTypes:e?.addressTypes?.map(e=>rv(e))}))}async broadcast(e){return nt(this.api.broadcast({message:e.message,title:e.title,imageUrl:e.imageUrl,actionsV2:this.getActionsV2DtoForLinks(e.actionsV2),notificationTypeId:e.notificationTypeId,addressTypes:e?.addressTypes?.map(e=>rv(e))}))}getActionsV2DtoForLinks(e){if(e?.type)return{type:"Link",links:e.links.map(e=>({label:e.label,url:e.url}))}}},ng=class{constructor(e){this.api=e}async findAll(){return(await nt(this.api.findAll())).map(e=>({...e,subscriptions:e.subscriptions.map(e=>({...e,wallet:{...e.wallet,address:e.wallet.publicKey}}))}))}},nm=class{constructor(e){if(this.dappMessageBackends=e,e.length<1)throw new ra("Expected to have at least one dapp message backend.")}async send(e){let t=await Promise.allSettled(this.dappMessageBackends.map(t=>t.send(e))),r=t.filter(e=>"rejected"===e.status).map(e=>e).map(e=>e.reason);r.length>0&&console.error(`Error during sending dapp messages: ${r.map(e=>JSON.stringify(e))}`);let n=t.filter(e=>"fulfilled"===e.status);if(r.length>0&&0===n.length)throw{...r[0],details:r}}},ny=class{constructor(e,t,r,n,i){this.dappAddresses=e,this.dappMessages=t,this.notificationTypes=r,this.notificationSubscriptions=n,this.dappsApi=i}async find(e){try{let t=await nt(this.dappsApi.find(e?.address));return this.toDapp(t)}catch(e){if(e instanceof rg)return null;throw e}}toDapp(e){return new nv(e.id,e.publicKey,e.name,e.verified,e.telegramBotUserName,e.blockchainType,this.dappAddresses,this.dappMessages,this.notificationTypes,this.notificationSubscriptions,e.description,e.websiteUrl,e.avatarUrl,e.heroUrl)}async findAll(e){return(await nt(this.dappsApi.findAll(e))).map(e=>({id:e.id,address:e.publicKey,name:e.name,description:e.description,websiteUrl:e.websiteUrl,avatarUrl:e.avatarUrl,heroUrl:e.heroUrl,verified:e.verified,telegramUsername:e.telegramBotUserName,blockchainType:e.blockchainType}))}async create(e){let t=await nt(this.dappsApi.create({name:e.name,description:e.description,websiteUrl:e.websiteUrl,avatarUrl:e.avatarUrl,heroUrl:e.heroUrl,telegramBotConfiguration:e.telegramBotConfiguration,blockchainType:e.blockchainType}));return this.toDapp(t)}async patch(e){let t=await nt(this.dappsApi.patch({name:e.name,description:e.description,websiteUrl:e.websiteUrl,avatarUrl:e.avatarUrl,heroUrl:e.heroUrl}));return this.toDapp(t)}},nv=class{constructor(e,t,r,n,i,o,s,a,l,u,c,d,h,f){this.id=e,this.address=t,this.name=r,this.verified=n,this.telegramUsername=i,this.blockchainType=o,this.dappAddresses=s,this.messages=a,this.notificationTypes=l,this.notificationSubscriptions=u,this.description=c,this.websiteUrl=d,this.avatarUrl=h,this.heroUrl=f}},nb=class e{constructor(e){if(this.dappAddressesBackends=e,e.length<1)throw new ra("Expected to have at least one dapp addresses backend.")}static dedupleWalletAddresses(e){var t;return Object.entries((t=e=>e.address.wallet.address.toString(),e.reduce((e,r)=>((e[t(r)]||=[]).push(r),e),{}))).map(([e,t])=>t.reduce((t,r)=>({id:t.id,enabled:t.enabled&&r.enabled,dappId:t.dappId,address:{id:t.id,value:e,verified:!0,type:t.address.type,wallet:{address:e}}})))}async findAll(){let t=await Promise.allSettled(this.dappAddressesBackends.map(e=>e.findAll())),r=t.filter(e=>"rejected"===e.status).map(e=>e).map(e=>e.reason);r.length>0&&console.error(`Error during finding dapp addresses: ${r.map(e=>JSON.stringify(e))}`);let n=t.filter(e=>"fulfilled"===e.status);if(r.length>0&&0===n.length)throw{...r[0],details:r};let i=n.map(e=>e).map(e=>e.value).flat(),o=i.filter(e=>"WALLET"===e.address.type),s=e.dedupleWalletAddresses(o);return Promise.resolve([...i.filter(e=>"WALLET"!==e.address.type),...s])}},nw=class{},nx=class extends nw{constructor(e){super(),this.resolvers=e}get type(){return"DIALECT_FIRST_FOUND_IDENTITY_RESOLVER"}async resolve(e){if(!this.resolvers.length)return null;for await(let t of this.resolvers)try{let r=await t.resolve(e);if(r)return r}catch(r){console.error(`error resolving identity at ${t.type} for account address ${e}`,r)}return null}async resolveReverse(e){if(!this.resolvers.length)return null;for await(let t of this.resolvers)try{let r=await t.resolveReverse(e);if(r)return r}catch(r){console.error(`error resolving identity at ${t.type} for name ${e}`,r)}return null}},nE=class extends nw{constructor(e){super(),this.resolvers=e}get type(){return"DIALECT_FIRST_FOUND_FAST_IDENTITY_RESOLVER"}async resolve(e){if(!this.resolvers.length)return null;try{return await Promise.any(this.resolvers.map(t=>t.resolve(e)))}catch(t){console.error(`error resolving identity for account address ${e.toString()}`,t)}return null}async resolveReverse(e){if(!this.resolvers.length)return null;try{return await Promise.any(this.resolvers.map(t=>t.resolveReverse(e)))}catch(t){console.error(`error resolving identity for name ${e}`,t)}return null}},nk=class extends nw{constructor(e){super(),this.resolvers=e}get type(){return"DIALECT_AGGREGATED_SEQUENTIAL_IDENTITY_RESOLVER"}async resolve(e){if(!this.resolvers.length)return null;try{let t=(await Promise.allSettled(this.resolvers.map(t=>t.resolve(e)))).filter(e=>"fulfilled"===e.status&&null!==e.value).map(e=>e).map(e=>e.value).reduce((e,t)=>({...t,...e,additionals:{...t.additionals,...e.additionals}}),{type:this.type,address:e});if(!t||!t.name)return null;return t}catch(t){console.error(`error resolving identity for account address ${e.toString()}`,t)}return null}async resolveReverse(e){if(!this.resolvers.length)return null;try{let t=(await Promise.allSettled(this.resolvers.map(t=>t.resolveReverse(e)))).filter(e=>"fulfilled"===e.status).map(e=>e).map(e=>e.value).reduce((e,t)=>({...t,...e}),{type:"DIALECT_AGGREGATED_IDENTITY",name:e});if(!t||!t.address)return null;return t}catch(t){console.error(`error resolving identity for name ${e}`,t)}return null}},nS=class{constructor(e){this.dataServiceDappsApi=e}async findAll(){return(await nt(this.dataServiceDappsApi.findAllDappAddresses())).map(e=>nT(e))}};function nT(e){return{id:e.id,enabled:e.enabled,channelId:e.channelId,dappId:e.dapp.id,address:{id:e.address.id,type:rw(e.address.type),value:e.address.value,verified:e.address.verified,wallet:{address:e.address.wallet.publicKey}}}}var nM=class{constructor(e,t,r,n,i,o){this.address=e,this.dataServiceWalletAddressesApi=t,this.dataServiceWalletDappAddressesApi=r,this.dataServiceWalletMessagesApi=n,this.dataServiceWalletNotificationSubscriptionsApi=i,this.dataServicePushWalletNotificationSubscriptionsApi=o,this.addresses=new nA(t),this.dappAddresses=new nP(r),this.messages=new nC(n),this.notificationSubscriptions=new nI(i),this.pushNotificationSubscriptions=new nL(o)}},nA=class{constructor(e){this.api=e}async create(e){return n_(await nt(this.api.create({value:e.value,type:rv(e.type)})))}async delete(e){return nt(this.api.delete(e.addressId))}async find(e){try{let t=await nt(this.api.find(e.addressId));return n_(t)}catch(e){if(e instanceof rg)return null;throw e}}async findAll(){return(await nt(this.api.findAll())).map(e=>n_(e))}resendVerificationCode(e){return nt(this.api.resendVerificationCode(e.addressId))}async update(e){return n_(await nt(this.api.patch(e.addressId,{value:e.value})))}async verify(e){return n_(await nt(this.api.verify(e.addressId,{code:e.code})))}},nP=class{constructor(e){this.api=e}async create(e){return nT(await nt(this.api.create({addressId:e.addressId,dappPublicKey:e.dappAccountAddress.toString(),enabled:e.enabled})))}delete(e){return nt(this.api.delete(e.dappAddressId))}async find(e){try{let t=await nt(this.api.find(e.dappAddressId));return nT(t)}catch(e){if(e instanceof rg)return null;throw e}}async findAll(e){return(await nt(this.api.findAll(e&&{addressIds:e.addressIds,dappPublicKey:e.dappAccountAddress?.toString()}))).map(e=>nT(e))}async update(e){return nT(await nt(this.api.patch(e.dappAddressId,{enabled:e.enabled})))}},nC=class{constructor(e){this.api=e,this.textSerde=new na}async findAllFromDapps(e){return(await nt(this.api.findAllDappMessages({skip:e?.skip,take:e?.take,dappVerified:e?.dappVerified}))).map(e=>({author:e.owner,timestamp:new Date(e.timestamp),text:this.textSerde.deserialize(new Uint8Array(e.text)),id:e.id,metadata:e.metadata}))}async dappMessagesSummary(e){return{unreadMessagesCount:(await nt(this.api.dappMessagesSummary({dappVerified:e?.dappVerified}))).unreadMessagesCount}}async markAllDappMessagesAsRead(e){await nt(this.api.markAllDappMessagesAsRead({dappVerified:e?.dappVerified}))}};function n_(e){return{id:e.id,value:e.value,verified:e.verified,type:rw(e.type),wallet:{address:e.wallet.publicKey}}}var nI=class{constructor(e){this.api=e}async findAll(e){return(await nt(this.api.findAll({dappPublicKey:e?.dappAccountAddress?.toString()}))).map(nO)}async upsert(e){return nO(await nt(this.api.upsert(e)))}};function nO(e){return{notificationType:e.notificationType,subscription:{wallet:{address:e.subscription.wallet.publicKey},config:e.subscription.config}}}var nL=class{constructor(e){this.api=e}async delete(e){await nt(this.api.delete(e))}async upsert(e){let t=await this.api.upsert(e);return{...t,walletAddress:t.walletPublicKey}}async get(e){let t=await this.api.get(e);return{...t,walletAddress:t.walletPublicKey}}},nR=class{constructor(e){if(this.delegates=e,this.type="messaging-facade",e.length<1)throw new ra("Expected to have at least on messaging backend.")}create(e){return this.getPreferableMessaging(e.type).create(e)}async find(e){if("id"in e&&e.id.type)return this.lookUpMessagingBackend(e.id.type).find(e);for(let t of this.delegates)try{let r=await t.find(e);if(r)return r}catch(e){console.error(e)}return null}async findAll(){let e=await Promise.allSettled(this.delegates.map(e=>e.findAll())),t=e.filter(e=>"rejected"===e.status).map(e=>e).map(e=>e.reason);t.length>0&&console.error(`Error during finding dialects: ${t.map(e=>JSON.stringify(e))}`);let r=e.filter(e=>"fulfilled"===e.status);if(t.length>0&&0===r.length)throw{...t[0],details:t};return r.map(e=>e).map(e=>e.value).flat().sort((e,t)=>t.updatedAt.getTime()-e.updatedAt.getTime())}async findSummary(e){for(let t of this.delegates)try{let r=await t.findSummary(e);if(r)return r}catch(e){console.error(e)}return null}async findSummaryAll(){for(let e of this.delegates)try{let t=await e.findSummaryAll();if(t)return t}catch(e){console.error(e)}return null}getPreferableMessaging(e){return e?this.lookUpMessagingBackend(e):this.getFirstAccordingToPriority()}lookUpMessagingBackend(e){let t=this.delegates.find(({type:t})=>e===t);if(!t)throw new ra(`Backend ${e} is not configured in sdk.`);return t}getFirstAccordingToPriority(){let e=this.delegates[0];if(!e)throw new rl("Should not happen.");return e}},nj=class{constructor(e){this.api=e}async create(e){return{...await nt(this.api.create(e))}}async delete(e){await nt(this.api.delete(e))}async find(e){return{...await nt(this.api.find(e))}}async findAll(){return(await nt(this.api.findAll())).map(e=>({...e}))}async patch(e,t){return{...await nt(this.api.patch(e,t))}}},nB=class{constructor(e,t){this.baseUrl=e,this.tokenProvider=t}async findAll(e){let t=await this.tokenProvider.get();return ri(t3.get(`${this.baseUrl}/api/v1/wallets/me/notificationSubscriptions`,{headers:rn(t),params:e}).then(e=>e.data))}async upsert(e){let t=await this.tokenProvider.get();return ri(t3.post(`${this.baseUrl}/api/v1/wallets/me/notificationSubscriptions`,e,{headers:rn(t)}).then(e=>e.data))}},nN=class{constructor(e,t){this.baseUrl=e,this.tokenProvider=t}async createDappAddress(e,t){let r=await this.tokenProvider.get(),n=rn(r);return ri(t3.post(`${this.baseUrl}/v0/wallets/${r.body.sub}/dapps/${t}/addresses`,e,{headers:n}).then(e=>e.data))}async deleteDappAddress(e){let t=await this.tokenProvider.get();return ri(t3.delete(`${this.baseUrl}/v0/wallets/${t.body.sub}/addresses/${e.id}`,{headers:rn(t)}).then(e=>e.data))}async findAllDappAddresses(e){let t=await this.tokenProvider.get();return ri(t3.get(`${this.baseUrl}/v0/wallets/${t.body.sub}/dapps/${e}/addresses`,{headers:rn(t)}).then(e=>e.data))}},nD=class{constructor(e,t){this.baseUrl=e,this.tokenProvider=t}async create(e){let t=await this.tokenProvider.get();return ri(t3.post(`${this.baseUrl}/api/v1/wallets/me/dappAddresses`,e,{headers:rn(t)}).then(e=>e.data))}async delete(e){let t=await this.tokenProvider.get();return ri(t3.delete(`${this.baseUrl}/api/v1/wallets/me/dappAddresses/${e}`,{headers:rn(t)}).then())}async find(e){let t=await this.tokenProvider.get();return ri(t3.get(`${this.baseUrl}/api/v1/wallets/me/dappAddresses/${e}`,{headers:rn(t)}).then(e=>e.data))}async findAll(e){let t=await this.tokenProvider.get();return ri(t3.get(`${this.baseUrl}/api/v1/wallets/me/dappAddresses`,{headers:rn(t),...e&&{params:e}}).then(e=>e.data))}async patch(e,t){let r=await this.tokenProvider.get();return ri(t3.patch(`${this.baseUrl}/api/v1/wallets/me/dappAddresses/${e}`,t,{headers:rn(r)}).then(e=>e.data))}},nK=class{constructor(e,t){this.baseUrl=e,this.tokenProvider=t}async create(e){let t=await this.tokenProvider.get();return ri(t3.post(`${this.baseUrl}/api/v1/wallets/me/addresses`,e,{headers:rn(t)}).then(e=>e.data))}async patch(e,t){let r=await this.tokenProvider.get();return ri(t3.patch(`${this.baseUrl}/api/v1/wallets/me/addresses/${e}`,t,{headers:rn(r)}).then(e=>e.data))}async delete(e){let t=await this.tokenProvider.get();return ri(t3.delete(`${this.baseUrl}/api/v1/wallets/me/addresses/${e}`,{headers:rn(t)}).then())}async find(e){let t=await this.tokenProvider.get();return ri(t3.get(`${this.baseUrl}/api/v1/wallets/me/addresses/${e}`,{headers:rn(t)}).then(e=>e.data))}async findAll(){let e=await this.tokenProvider.get();return ri(t3.get(`${this.baseUrl}/api/v1/wallets/me/addresses`,{headers:rn(e)}).then(e=>e.data))}async resendVerificationCode(e){let t=await this.tokenProvider.get();return await ri(t3.post(`${this.baseUrl}/api/v1/wallets/me/addresses/${e}/resendVerificationCode`,{},{headers:rn(t)}).then())}async verify(e,t){let r=await this.tokenProvider.get();return ri(t3.post(`${this.baseUrl}/api/v1/wallets/me/addresses/${e}/verify`,t,{headers:rn(r)}).then(e=>e.data))}},nU=class{constructor(e,t){this.baseUrl=e,this.tokenProvider=t}async get(e){let t=await this.tokenProvider.get();return ri(t3.get(`${this.baseUrl}/api/v1/pushNotificationSubscriptions/${e}`,{headers:rn(t)}).then(e=>e.data))}async delete(e){let t=await this.tokenProvider.get();return ri(t3.delete(`${this.baseUrl}/api/v1/pushNotificationSubscriptions/${e}`,{headers:rn(t)}))}async upsert(e){let t=await this.tokenProvider.get();return ri(t3.post(`${this.baseUrl}/api/v1/pushNotificationSubscriptions`,e,{headers:rn(t)}).then(e=>e.data))}},nz=class{constructor(e,t){this.baseUrl=e,this.tokenProvider=t}async create(e){let t=await this.tokenProvider.get();return ri(t3.post(`${this.baseUrl}/api/v1/dapps/${t.body.sub}/notificationTypes`,e,{headers:rn(t)}).then(e=>e.data))}async delete(e){let t=await this.tokenProvider.get();return ri(t3.delete(`${this.baseUrl}/api/v1/dapps/${t.body.sub}/notificationTypes/${e}`,{headers:rn(t)}).then())}async find(e){let t=await this.tokenProvider.get();return ri(t3.get(`${this.baseUrl}/api/v1/dapps/${t.body.sub}/notificationTypes/${e}`,{headers:rn(t)}).then(e=>e.data))}async findAll(){let e=await this.tokenProvider.get();return ri(t3.get(`${this.baseUrl}/api/v1/dapps/${e.body.sub}/notificationTypes`,{headers:rn(e)}).then(e=>e.data))}async patch(e,t){let r=await this.tokenProvider.get();return ri(t3.patch(`${this.baseUrl}/api/v1/dapps/${r.body.sub}/notificationTypes/${e}`,t,{headers:rn(r)}).then(e=>e.data))}},nF=class{constructor(e,t){this.baseUrl=e,this.tokenProvider=t}async findAllDappMessages(e){let t=await this.tokenProvider.get();return ri(t3.get(`${this.baseUrl}/api/v1/wallets/me/dappMessages`,{headers:rn(t),...e&&{params:e}}).then(e=>e.data))}async dappMessagesSummary(e){let t=await this.tokenProvider.get();return ri(t3.get(`${this.baseUrl}/api/v1/wallets/me/dappMessages/summary`,{headers:rn(t),...e&&{params:e}}).then(e=>e.data))}async markAllDappMessagesAsRead(e){let t=await this.tokenProvider.get();return ri(t3.post(`${this.baseUrl}/api/v1/wallets/me/dappMessages/markAsRead`,e,{headers:rn(t)}).then(e=>e.data))}},nW=class{constructor(e,t){this.baseUrl=e,this.tokenProvider=t}async findAll(){let e=await this.tokenProvider.get();return ri(t3.get(`${this.baseUrl}/api/v1/dapps/${e.body.sub}/notificationSubscriptions`,{headers:rn(e)}).then(e=>e.data))}},nV=class{constructor(e){this.baseUrl=e}healthCheck(){return ri(t3.get(`${this.baseUrl}/api/v1/health`).then(e=>e.data))}},n$=class{static create(e,t){let r=new r8(e,t),n=new ro(e,t),i=new nz(e,t),o=new nW(e,t),s=new nN(e,t),a=new nK(e,t),l=new nD(e,t),u=new nF(e,t);return new t9(r,n,i,o,s,a,l,u,new nB(e,t),new nU(e,t),new nV(e))}},nH=class{constructor(e){this.baseUrl=e}async upsertWallet(e,t){return ri(t3.post(`${this.baseUrl}/api/v1/wallets/me/`,e,{headers:rn(t)}).then(e=>e.data))}},nq=class{constructor(e,t,r,n,i,o,s,a){this.config=e,this.threads=t,this.dapps=r,this.wallet=n,this.identity=i,this.tokenProvider=o,this.encryptionKeysProvider=s,this.blockchainSdk=a}get info(){return{supportsEndToEndEncryption:this.encryptionKeysProvider.isAvailable(),hasValidAuthentication:this.tokenProvider.hasValidCachedToken()}}},nZ=class e{constructor(e,t){this.config=e,this.blockchainFactory=t}static logConfiguration(e){"production"!==e.environment&&console.log(`Initializing Dialect SDK using configuration:
  Dialect cloud settings:
    URL: ${e.dialectCloud.url}
  `)}create(){let t=this.initializeConfig();e.logConfiguration(t);let r=this.blockchainFactory.create(t),n=this.initializeTokenProvider(t,r),i=this.initializeDataServiceApi(t.dialectCloud,n),o=this.initializeMessagingApi(i,r),s=this.initializeDappApi(i,r),a=new nM(r.authenticationFacade.subject(),i.walletAddresses,i.walletDappAddresses,i.walletMessages,i.walletNotificationSubscriptions,i.pushNotificationSubscriptions),l=this.createIdentityResolver(t.identity);return new nq(t,o,s,a,l,n,r.encryptionKeysProvider,r)}initializeTokenProvider(e,{authenticationFacade:t}){let r=new rI(60*e.dialectCloud.tokenLifetimeMinutes,t.tokenGenerator),n=new nH(e.dialectCloud.url);return new rO(r,e.dialectCloud.tokenStore,e.dialectCloud.walletCreation,t.authenticator.parser,t.authenticator.validator,t.subject(),n)}initializeDataServiceApi(e,t){return n$.create(e.url,t)}initializeMessagingApi(e,t){let r=[],n=new nu(t.authenticationFacade.subject(),e.threads,t.encryptionKeysProvider);return r.push(n),t.messaging&&r.push(t.messaging),new nR(r)}initializeDappApi(e,t){let r=this.createDappAddresses(e,t),n=new nj(e.dappNotificationTypes),i=new ng(e.dappNotificationSubscriptions);return new ny(r,this.createDappMessages(e,t),n,i,e.dapps)}createDappAddresses(e,t){let r=[],n=new nS(e.dapps);return r.push(n),t.dappAddresses&&r.push(t.dappAddresses),new nb(r)}createDappMessages(e,t){let r=[],n=new np(e.dapps);return r.push(n),t.dappMessages&&r.push(t.dappMessages),new nm(r)}createIdentityResolver(e){if("first-found"===e.strategy)return new nx(e.resolvers);if("first-found-fast"===e.strategy)return new nE(e.resolvers);if("aggregate-sequential"===e.strategy)return new nk(e.resolvers);throw new ra(`Unknown identity strategy ${e.strategy}`)}initializeConfig(){let e=this.config.environment??"production",t=this.createEncryptionKeysStore(),r=this.createIdentityConfig();return{environment:e,dialectCloud:this.initializeDialectCloudConfig(),encryptionKeysStore:t,identity:r}}createEncryptionKeysStore(){let e=this.config.encryptionKeysStore;return e&&e instanceof rZ?e:"in-memory"===e?rZ.createInMemory():"session-storage"===e?rZ.createSessionStorage():"local-storage"===e?rZ.createLocalStorage():rZ.createInMemory()}initializeDialectCloudConfig(){let e={environment:"production",url:"https://dialectapi.to",tokenStore:this.createTokenStore(),tokenLifetimeMinutes:this.createTokenLifetime(),walletCreation:"implicit"},t=this.config.environment;t&&(e.environment=t),"production"===t&&(e.url="https://dialectapi.to"),"development"===t&&(e.url="https://dev.dialectapi.to"),"local-development"===t&&(e.url="http://localhost:8080");let r=this.config.dialectCloud?.environment;return r&&(e.environment=r),"production"===r&&(e.url="https://dialectapi.to"),"development"===r&&(e.url="https://dev.dialectapi.to"),"local-development"===r&&(e.url="http://localhost:8080"),this.config.dialectCloud?.url&&(e.url=this.config.dialectCloud.url),this.config.dialectCloud?.walletCreation&&(e.walletCreation=this.config.dialectCloud.walletCreation),e}createTokenLifetime(){return this.config.dialectCloud?.tokenLifetimeMinutes??1440}createTokenStore(){let e=this.config.dialectCloud?.tokenStore;return e&&e instanceof rT?e:"in-memory"===e?rT.createInMemory():"session-storage"===e?rT.createSessionStorage():"local-storage"===e?rT.createLocalStorage():rT.createInMemory()}createIdentityConfig(){let e={strategy:"first-found",resolvers:[]};return this.config.identity&&(this.config.identity.strategy&&(e.strategy=this.config.identity.strategy),this.config.identity.resolvers&&(e.resolvers=this.config.identity.resolvers)),e}},nG=class{static sdk(e,t){return new nZ(e,t).create()}},nJ=((f=nJ||{}).Created="CREATED",f.ReadyForExecution="READY_FOR_EXECUTION",f.Executing="EXECUTING",f.Succeeded="SUCCEEDED",f.Failed="FAILED",f.Canceled="CANCELED",f),nY=((p=nY||{}).SignTransaction="SIGN_TRANSACTION",p.OpenLink="OPEN_LINK",p.Cancel="CANCEL",p);r(34155);var nX=r(48764).Buffer,nQ=class e{constructor(e){this.delegate=e}get publicKey(){if(!this.delegate.publicKey)throw new ru("Public key not available","Wallet does not have public key, please provide a valid public key.");return this.delegate.publicKey}get canEncrypt(){return!!(this.publicKey&&this.delegate.diffieHellman)}static create(t){return new e(t)}signTransaction(e){if(!this.delegate.signTransaction)throw new ru("Signing not supported","Wallet does not support signing, please use wallet-adapter that supports signTransaction() operation.");return this.delegate.signTransaction(e)}signAllTransactions(e){if(!this.delegate.signAllTransactions)throw new ru("Signing not supported","Wallet does not support signing, please use wallet-adapter that supports signAllTransactions() operation.");return this.delegate.signAllTransactions(e)}signMessage(e){if(!this.delegate.signMessage)throw new ru("Message signing not supported","Wallet does not support message signing, please use wallet-adapter that supports signMessage() operation.");return this.delegate.signMessage(e)}diffieHellman(){if(!this.delegate.diffieHellman)throw new ru("Encryption not supported","Wallet does not support encryption, please use wallet-adapter that supports diffieHellman() operation.");return this.delegate.diffieHellman(this.publicKey.toBytes())}canSignMessage(){return!!this.delegate.signMessage}canSignTransaction(){return!!this.delegate.signTransaction}},n0="solana",n1=`${n0}-ed25519`,n2=class{constructor(){this.alg=n1}},n5=class extends n2{constructor(e){super(),this.dialectWalletAdapter=e}get subject(){return this.dialectWalletAdapter.publicKey.toBase58()}get subjectPublicKey(){return this.dialectWalletAdapter.publicKey}async sign(e){return{payload:e,signature:await this.dialectWalletAdapter.signMessage(e)}}},n6=class extends rz{canValidate(e){return e.alg===n1||"ed25519"===e.alg}isSignatureValid(e){let t=e.base64Header+"."+e.base64Body,r=new TextEncoder().encode(t);return t8.sign.detached.verify(r,e.signature,new r$(e.body.sub_jwk??e.body.sub).toBytes())}performExtraValidation(e){return!e.body.sub_jwk||e.body.sub===e.body.sub_jwk}},n3=class e extends rk{constructor(e){super(),this.tokenSigner=e}static createAuthenticator(){return new rE(new rU(new rV),new n6)}get(){return new rS(this.tokenSigner,new rW(this.tokenSigner),e.createAuthenticator())}},n4=class extends rD{parse(e){let t=(0,t4.decodeURLSafe)(e),r=z.Transaction.from(t),n=r.instructions.filter(e=>e.programId===r.feePayer)[0];if(!n)throw new rN;let[i,o]=n.data.toString().split(".");if(!i||!o)throw new rN;return rj(o)}},n8=class extends rF{async generate(e){let t=this.header(),r=rR(t),n=this.body(e),i=rR(n),{signature:o,base64Signature:s,signedPayload:a}=await this.sign(r,i,this.signer),l=rL(a);return{rawValue:`${r}.${l}.${s}`,body:n,header:t,signature:o,base64Signature:s,base64Body:l,base64Header:r}}},n7=`${n0}-tx`,n9=class{constructor(){this.alg=n7}},ie=class extends n9{constructor(e){super(),this.dialectWalletAdapter=e}get subject(){return this.dialectWalletAdapter.publicKey.toBase58()}get subjectPublicKey(){return this.dialectWalletAdapter.publicKey}async sign(e){let t=new z.Transaction,r=new z.PublicKey(this.subject);t.add(new z.TransactionInstruction({keys:[{pubkey:r,isSigner:!1,isWritable:!1}],programId:r,data:nX.from(e)})),t.recentBlockhash=z.PublicKey.default.toString(),t.feePayer=r;let n=await this.dialectWalletAdapter.signTransaction(t);return{payload:n.serialize(),signature:n.signature}}},it=class extends rz{canValidate(e){return e.alg===n7}isSignatureValid(e){let t=(0,t4.decodeURLSafe)(e.base64Body),r=z.Transaction.from(t);return r.recentBlockhash=z.PublicKey.default.toString(),r.verifySignatures()}performExtraValidation(e){return!e.body.sub_jwk||e.body.sub===e.body.sub_jwk}},ir=class e extends rk{constructor(e){super(),this.tokenSigner=e}static createAuthenticator(){return new rE(new rU(new n4),new it)}get(){return new rS(this.tokenSigner,new n8(this.tokenSigner),e.createAuthenticator())}},ii=class extends r1{constructor(e){super(),this.dialectWalletAdapter=e}isAvailable(){return this.dialectWalletAdapter.canEncrypt}getFailSafe(){return this.dialectWalletAdapter.canEncrypt?this.dialectWalletAdapter.diffieHellman():Promise.resolve(null)}getFailFast(){return this.dialectWalletAdapter.diffieHellman()}},io=class e{constructor(e){this.solanaConfigProps=e}static create(t){return new e(t)}static logConfiguration(e,t){"production"!==t&&console.log(`Initializing Dialect Solana SDK using configuration:
Solana settings:
  Wallet public key: ${e.wallet.publicKey}
  Wallet supports encryption: ${e.wallet.canEncrypt}
  Wallet supports authentication: ${e.wallet.canSignMessage()||e.wallet.canSignTransaction()}
`)}create(t){let r=this.initializeSolanaConfig(),n=r.wallet;e.logConfiguration(r,t.environment);let i=new ii(n);return{type:n0,encryptionKeysProvider:r1.create(i,t.encryptionKeysStore),authenticationFacade:(n.canSignMessage()?new n3(new n5(n)):new ir(new ie(n))).get(),config:r,info:{supportsOnChainMessaging:!1}}}initializeSolanaConfig(){return{wallet:new nQ(this.solanaConfigProps.wallet)}}},is=r(98557);let ia=()=>{},il=ia(),iu=Object,ic=e=>e===il,id=e=>"function"==typeof e,ih=(e,t)=>({...e,...t}),ip=e=>id(e.then),ig=new WeakMap,im=0,iy=e=>{let t,r;let n=typeof e,i=e&&e.constructor,o=i==Date;if(iu(e)!==e||o||i==RegExp)t=o?e.toJSON():"symbol"==n?e.toString():"string"==n?JSON.stringify(e):""+e;else{if(t=ig.get(e))return t;if(t=++im+"~",ig.set(e,t),i==Array){for(r=0,t="@";r<e.length;r++)t+=iy(e[r])+",";ig.set(e,t)}if(i==iu){t="#";let n=iu.keys(e).sort();for(;!ic(r=n.pop());)ic(e[r])||(t+=r+":"+iy(e[r])+",");ig.set(e,t)}}return t},iv=new WeakMap,ib={},iw={},ix="undefined",iE=typeof window!=ix,ik=typeof document!=ix,iS=()=>iE&&typeof window.requestAnimationFrame!=ix,iT=(e,t)=>{let r=iv.get(e);return[()=>!ic(t)&&e.get(t)||ib,n=>{if(!ic(t)){let i=e.get(t);t in iw||(iw[t]=i),r[5](t,ih(i,n),i||ib)}},r[6],()=>!ic(t)&&t in iw?iw[t]:!ic(t)&&e.get(t)||ib]},iM=!0,[iA,iP]=iE&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[ia,ia],iC={initFocus:e=>(ik&&document.addEventListener("visibilitychange",e),iA("focus",e),()=>{ik&&document.removeEventListener("visibilitychange",e),iP("focus",e)}),initReconnect:e=>{let t=()=>{iM=!0,e()},r=()=>{iM=!1};return iA("online",t),iA("offline",r),()=>{iP("online",t),iP("offline",r)}}},i_=!F.useId,iI=!iE||"Deno"in window,iO=e=>iS()?window.requestAnimationFrame(e):setTimeout(e,1),iL=iI?F.useEffect:F.useLayoutEffect,iR="undefined"!=typeof navigator&&navigator.connection,ij=!iI&&iR&&(["slow-2g","2g"].includes(iR.effectiveType)||iR.saveData),iB=e=>{if(id(e))try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?iy(e):"",t]},iN=0,iD=()=>++iN;var iK={ERROR_REVALIDATE_EVENT:3,FOCUS_EVENT:0,MUTATE_EVENT:2,RECONNECT_EVENT:1};async function iU(...e){let[t,r,n,i]=e,o=ih({populateCache:!0,throwOnError:!0},"boolean"==typeof i?{revalidate:i}:i||{}),s=o.populateCache,a=o.rollbackOnError,l=o.optimisticData,u=e=>"function"==typeof a?a(e):!1!==a,c=o.throwOnError;if(id(r)){let e=[];for(let n of t.keys())!/^\$(inf|sub)\$/.test(n)&&r(t.get(n)._k)&&e.push(n);return Promise.all(e.map(d))}return d(r);async function d(r){let i;let[a]=iB(r);if(!a)return;let[d,h]=iT(t,a),[f,p,g,m]=iv.get(t),y=()=>{let e=f[a];return(id(o.revalidate)?o.revalidate(d().data,r):!1!==o.revalidate)&&(delete g[a],delete m[a],e&&e[0])?e[0](2).then(()=>d().data):d().data};if(e.length<3)return y();let v=n,b=iD();p[a]=[b,0];let w=!ic(l),x=d(),E=x.data,k=x._c,S=ic(k)?E:k;if(w&&h({data:l=id(l)?l(S,E):l,_c:S}),id(v))try{v=v(S)}catch(e){i=e}if(v&&ip(v)){if(v=await v.catch(e=>{i=e}),b!==p[a][0]){if(i)throw i;return v}i&&w&&u(i)&&(s=!0,h({data:S,_c:il}))}if(s&&!i&&(id(s)?h({data:s(v,S),error:il,_c:il}):h({data:v,error:il,_c:il})),p[a][1]=iD(),Promise.resolve(y()).then(()=>{h({_c:il})}),i){if(c)throw i;return}return v}}let iz=(e,t)=>{for(let r in e)e[r][0]&&e[r][0](t)},iF=(e,t)=>{if(!iv.has(e)){let r=ih(iC,t),n={},i=iU.bind(il,e),o=ia,s={},a=(e,t)=>{let r=s[e]||[];return s[e]=r,r.push(t),()=>r.splice(r.indexOf(t),1)},l=(t,r,n)=>{e.set(t,r);let i=s[t];if(i)for(let e of i)e(r,n)},u=()=>{if(!iv.has(e)&&(iv.set(e,[n,{},{},{},i,l,a]),!iI)){let t=r.initFocus(setTimeout.bind(il,iz.bind(il,n,0))),i=r.initReconnect(setTimeout.bind(il,iz.bind(il,n,1)));o=()=>{t&&t(),i&&i(),iv.delete(e)}}};return u(),[e,i,u,o]}return[e,iv.get(e)[4]]},[iW,iV]=iF(new Map),i$=ih({onLoadingSlow:ia,onSuccess:ia,onError:ia,onErrorRetry:(e,t,r,n,i)=>{let o=r.errorRetryCount,s=i.retryCount,a=~~((Math.random()+.5)*(1<<(s<8?s:8)))*r.errorRetryInterval;(ic(o)||!(s>o))&&setTimeout(n,a,i)},onDiscarded:ia,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:ij?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:ij?5e3:3e3,compare:(e,t)=>iy(e)==iy(t),isPaused:()=>!1,cache:iW,mutate:iV,fallback:{}},{isOnline:()=>iM,isVisible:()=>{let e=ik&&document.visibilityState;return ic(e)||"hidden"!==e}}),iH=(e,t)=>{let r=ih(e,t);if(t){let{use:n,fallback:i}=e,{use:o,fallback:s}=t;n&&o&&(r.use=n.concat(o)),i&&s&&(r.fallback=ih(i,s))}return r},iq=(0,F.createContext)({}),iZ=e=>{let{value:t}=e,r=(0,F.useContext)(iq),n=id(t),i=(0,F.useMemo)(()=>n?t(r):t,[n,r,t]),o=(0,F.useMemo)(()=>n?i:iH(r,i),[n,r,i]),s=i&&i.provider,a=(0,F.useRef)(il);s&&!a.current&&(a.current=iF(s(o.cache||iW),i));let l=a.current;return l&&(o.cache=l[0],o.mutate=l[1]),iL(()=>{if(l)return l[2]&&l[2](),l[3]},[]),(0,F.createElement)(iq.Provider,ih(e,{value:o}))},iG=iE&&window.__SWR_DEVTOOLS_USE__,iJ=iG?window.__SWR_DEVTOOLS_USE__:[],iY=e=>id(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],iX=()=>ih(i$,(0,F.useContext)(iq)),iQ=iJ.concat(e=>(t,r,n)=>{let i=r&&((...e)=>{let[n]=iB(t),[,,,i]=iv.get(iW);if(n.startsWith("$inf$"))return r(...e);let o=i[n];return ic(o)?r(...e):(delete i[n],o)});return e(t,i,n)}),i0=e=>function(...t){let r=iX(),[n,i,o]=iY(t),s=iH(r,o),a=e,{use:l}=s,u=(l||[]).concat(iQ);for(let e=u.length;e--;)a=u[e](a);return a(n,i||s.fetcher||null,s)},i1=(e,t,r)=>{let n=t[e]||(t[e]=[]);return n.push(r),()=>{let e=n.indexOf(r);e>=0&&(n[e]=n[n.length-1],n.pop())}};iG&&(window.__SWR_DEVTOOLS_REACT__=F);let i2=F.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}),i5={dedupe:!0},i6=iu.defineProperty(iZ,"defaultValue",{value:i$}),i3=i0((e,t,r)=>{let{cache:n,compare:i,suspense:o,fallbackData:s,revalidateOnMount:a,revalidateIfStale:l,refreshInterval:u,refreshWhenHidden:c,refreshWhenOffline:d,keepPreviousData:h}=r,[f,p,g,m]=iv.get(n),[y,v]=iB(e),b=(0,F.useRef)(!1),w=(0,F.useRef)(!1),x=(0,F.useRef)(y),E=(0,F.useRef)(t),k=(0,F.useRef)(r),S=()=>k.current,T=()=>S().isVisible()&&S().isOnline(),[M,A,P,C]=iT(n,y),_=(0,F.useRef)({}).current,I=ic(s)?r.fallback[y]:s,O=(e,t)=>{for(let r in _)if("data"===r){if(!i(e[r],t[r])&&(!ic(e[r])||!i(z,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},L=(0,F.useMemo)(()=>{let e=!!y&&!!t&&(ic(a)?!S().isPaused()&&!o&&(!!ic(l)||l):a),r=t=>{let r=ih(t);return(delete r._k,e)?{isValidating:!0,isLoading:!0,...r}:r},n=M(),i=C(),s=r(n),u=n===i?s:r(i),c=s;return[()=>{let e=r(M());return O(e,c)?(c.data=e.data,c.isLoading=e.isLoading,c.isValidating=e.isValidating,c.error=e.error,c):(c=e,e)},()=>u]},[n,y]),R=(0,is.useSyncExternalStore)((0,F.useCallback)(e=>P(y,(t,r)=>{O(r,t)||e()}),[n,y]),L[0],L[1]),j=!b.current,B=f[y]&&f[y].length>0,N=R.data,D=ic(N)?I:N,K=R.error,U=(0,F.useRef)(D),z=h?ic(N)?U.current:N:D,W=(!B||!!ic(K))&&(j&&!ic(a)?a:!S().isPaused()&&(o?!ic(D)&&l:ic(D)||l)),V=!!(y&&t&&j&&W),$=ic(R.isValidating)?V:R.isValidating,H=ic(R.isLoading)?V:R.isLoading,q=(0,F.useCallback)(async e=>{let t,n;let o=E.current;if(!y||!o||w.current||S().isPaused())return!1;let s=!0,a=e||{},l=!g[y]||!a.dedupe,u=()=>i_?!w.current&&y===x.current&&b.current:y===x.current,c={isValidating:!1,isLoading:!1},d=()=>{A(c)},h=()=>{let e=g[y];e&&e[1]===n&&delete g[y]},m={isValidating:!0};ic(M().data)&&(m.isLoading=!0);try{if(l&&(A(m),r.loadingTimeout&&ic(M().data)&&setTimeout(()=>{s&&u()&&S().onLoadingSlow(y,r)},r.loadingTimeout),g[y]=[o(v),iD()]),[t,n]=g[y],t=await t,l&&setTimeout(h,r.dedupingInterval),!g[y]||g[y][1]!==n)return l&&u()&&S().onDiscarded(y),!1;c.error=il;let e=p[y];if(!ic(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return d(),l&&u()&&S().onDiscarded(y),!1;let a=M().data;c.data=i(a,t)?a:t,l&&u()&&S().onSuccess(t,y,r)}catch(r){h();let e=S(),{shouldRetryOnError:t}=e;!e.isPaused()&&(c.error=r,l&&u()&&(e.onError(r,y,e),(!0===t||id(t)&&t(r))&&(!S().revalidateOnFocus||!S().revalidateOnReconnect||T())&&e.onErrorRetry(r,y,e,e=>{let t=f[y];t&&t[0]&&t[0](iK.ERROR_REVALIDATE_EVENT,e)},{retryCount:(a.retryCount||0)+1,dedupe:!0})))}return s=!1,d(),!0},[y,n]),Z=(0,F.useCallback)((...e)=>iU(n,x.current,...e),[]);if(iL(()=>{E.current=t,k.current=r,ic(N)||(U.current=N)}),iL(()=>{if(!y)return;let e=q.bind(il,i5),t=0,r=i1(y,f,(r,n={})=>{if(r==iK.FOCUS_EVENT){let r=Date.now();S().revalidateOnFocus&&r>t&&T()&&(t=r+S().focusThrottleInterval,e())}else if(r==iK.RECONNECT_EVENT)S().revalidateOnReconnect&&T()&&e();else if(r==iK.MUTATE_EVENT)return q();else if(r==iK.ERROR_REVALIDATE_EVENT)return q(n)});return w.current=!1,x.current=y,b.current=!0,A({_k:v}),W&&(ic(D)||iI?e():iO(e)),()=>{w.current=!0,r()}},[y]),iL(()=>{let e;function t(){let t=id(u)?u(M().data):u;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!M().error&&(c||S().isVisible())&&(d||S().isOnline())?q(i5).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[u,c,d,y]),(0,F.useDebugValue)(z),o&&ic(D)&&y){if(!i_&&iI)throw Error("Fallback data is required when using suspense in SSR.");E.current=t,k.current=r,w.current=!1;let e=m[y];if(ic(e)||i2(Z(e)),ic(K)){let e=q(i5);ic(z)||(e.status="fulfilled",e.value=!0),i2(e)}else throw K}return{mutate:Z,get data(){return _.data=!0,z},get error(){return _.error=!0,K},get isValidating(){return _.isValidating=!0,$},get isLoading(){return _.isLoading=!0,H}}}),i4=F.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}),i8={dedupe:!0};iu.defineProperty(iZ,"defaultValue",{value:i$});let i7=i0((e,t,r)=>{let{cache:n,compare:i,suspense:o,fallbackData:s,revalidateOnMount:a,revalidateIfStale:l,refreshInterval:u,refreshWhenHidden:c,refreshWhenOffline:d,keepPreviousData:h}=r,[f,p,g,m]=iv.get(n),[y,v]=iB(e),b=(0,F.useRef)(!1),w=(0,F.useRef)(!1),x=(0,F.useRef)(y),E=(0,F.useRef)(t),k=(0,F.useRef)(r),S=()=>k.current,T=()=>S().isVisible()&&S().isOnline(),[M,A,P,C]=iT(n,y),_=(0,F.useRef)({}).current,I=ic(s)?r.fallback[y]:s,O=(e,t)=>{for(let r in _)if("data"===r){if(!i(e[r],t[r])&&(!ic(e[r])||!i(z,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},L=(0,F.useMemo)(()=>{let e=!!y&&!!t&&(ic(a)?!S().isPaused()&&!o&&(!!ic(l)||l):a),r=t=>{let r=ih(t);return(delete r._k,e)?{isValidating:!0,isLoading:!0,...r}:r},n=M(),i=C(),s=r(n),u=n===i?s:r(i),c=s;return[()=>{let e=r(M());return O(e,c)?(c.data=e.data,c.isLoading=e.isLoading,c.isValidating=e.isValidating,c.error=e.error,c):(c=e,e)},()=>u]},[n,y]),R=(0,is.useSyncExternalStore)((0,F.useCallback)(e=>P(y,(t,r)=>{O(r,t)||e()}),[n,y]),L[0],L[1]),j=!b.current,B=f[y]&&f[y].length>0,N=R.data,D=ic(N)?I:N,K=R.error,U=(0,F.useRef)(D),z=h?ic(N)?U.current:N:D,W=(!B||!!ic(K))&&(j&&!ic(a)?a:!S().isPaused()&&(o?!ic(D)&&l:ic(D)||l)),V=!!(y&&t&&j&&W),$=ic(R.isValidating)?V:R.isValidating,H=ic(R.isLoading)?V:R.isLoading,q=(0,F.useCallback)(async e=>{let t,n;let o=E.current;if(!y||!o||w.current||S().isPaused())return!1;let s=!0,a=e||{},l=!g[y]||!a.dedupe,u=()=>i_?!w.current&&y===x.current&&b.current:y===x.current,c={isValidating:!1,isLoading:!1},d=()=>{A(c)},h=()=>{let e=g[y];e&&e[1]===n&&delete g[y]},m={isValidating:!0};ic(M().data)&&(m.isLoading=!0);try{if(l&&(A(m),r.loadingTimeout&&ic(M().data)&&setTimeout(()=>{s&&u()&&S().onLoadingSlow(y,r)},r.loadingTimeout),g[y]=[o(v),iD()]),[t,n]=g[y],t=await t,l&&setTimeout(h,r.dedupingInterval),!g[y]||g[y][1]!==n)return l&&u()&&S().onDiscarded(y),!1;c.error=il;let e=p[y];if(!ic(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return d(),l&&u()&&S().onDiscarded(y),!1;let a=M().data;c.data=i(a,t)?a:t,l&&u()&&S().onSuccess(t,y,r)}catch(r){h();let e=S(),{shouldRetryOnError:t}=e;!e.isPaused()&&(c.error=r,l&&u()&&(e.onError(r,y,e),(!0===t||id(t)&&t(r))&&(!S().revalidateOnFocus||!S().revalidateOnReconnect||T())&&e.onErrorRetry(r,y,e,e=>{let t=f[y];t&&t[0]&&t[0](iK.ERROR_REVALIDATE_EVENT,e)},{retryCount:(a.retryCount||0)+1,dedupe:!0})))}return s=!1,d(),!0},[y,n]),Z=(0,F.useCallback)((...e)=>iU(n,x.current,...e),[]);if(iL(()=>{E.current=t,k.current=r,ic(N)||(U.current=N)}),iL(()=>{if(!y)return;let e=q.bind(il,i8),t=0,r=i1(y,f,(r,n={})=>{if(r==iK.FOCUS_EVENT){let r=Date.now();S().revalidateOnFocus&&r>t&&T()&&(t=r+S().focusThrottleInterval,e())}else if(r==iK.RECONNECT_EVENT)S().revalidateOnReconnect&&T()&&e();else if(r==iK.MUTATE_EVENT)return q();else if(r==iK.ERROR_REVALIDATE_EVENT)return q(n)});return w.current=!1,x.current=y,b.current=!0,A({_k:v}),W&&(ic(D)||iI?e():iO(e)),()=>{w.current=!0,r()}},[y]),iL(()=>{let e;function t(){let t=id(u)?u(M().data):u;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!M().error&&(c||S().isVisible())&&(d||S().isOnline())?q(i8).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[u,c,d,y]),(0,F.useDebugValue)(z),o&&ic(D)&&y){if(!i_&&iI)throw Error("Fallback data is required when using suspense in SSR.");E.current=t,k.current=r,w.current=!1;let e=m[y];if(ic(e)||i4(Z(e)),ic(K)){let e=q(i8);ic(z)||(e.status="fulfilled",e.value=!0),i4(e)}else throw K}return{mutate:Z,get data(){return _.data=!0,z},get error(){return _.error=!0,K},get isValidating(){return _.isValidating=!0,$},get isLoading(){return _.isLoading=!0,H}}}),i9=i_?e=>{e()}:F.startTransition,oe=e=>{let[,t]=(0,F.useState)({}),r=(0,F.useRef)(!1),n=(0,F.useRef)(e),i=(0,F.useRef)({data:!1,error:!1,isValidating:!1}),o=(0,F.useCallback)(e=>{let o=!1,s=n.current;for(let t in e)s[t]!==e[t]&&(s[t]=e[t],i.current[t]&&(o=!0));o&&!r.current&&t({})},[]);return iL(()=>(r.current=!1,()=>{r.current=!0})),[n,i.current,o]},ot=(s=()=>(e,t,r={})=>{let{mutate:n}=iX(),i=(0,F.useRef)(e),o=(0,F.useRef)(t),s=(0,F.useRef)(r),a=(0,F.useRef)(0),[l,u,c]=oe({data:il,error:il,isMutating:!1}),d=l.current,h=(0,F.useCallback)(async(e,t)=>{let[r,l]=iB(i.current);if(!o.current)throw Error("Can’t trigger the mutation: missing fetcher.");if(!r)throw Error("Can’t trigger the mutation: missing key.");let u=ih(ih({populateCache:!1,throwOnError:!0},s.current),t),d=iD();a.current=d,c({isMutating:!0});try{let t=await n(r,o.current(l,{arg:e}),ih(u,{throwOnError:!0}));return a.current<=d&&(i9(()=>c({data:t,isMutating:!1,error:void 0})),null==u.onSuccess||u.onSuccess.call(u,t,r,u)),t}catch(e){if(a.current<=d&&(i9(()=>c({error:e,isMutating:!1})),null==u.onError||u.onError.call(u,e,r,u),u.throwOnError))throw e}},[]),f=(0,F.useCallback)(()=>{a.current=iD(),c({data:il,error:il,isMutating:!1})},[]);return iL(()=>{i.current=e,o.current=t,s.current=r}),{trigger:h,reset:f,get data(){return u.data=!0,d.data},get error(){return u.error=!0,d.error},get isMutating(){return u.isMutating=!0,d.isMutating}}},(...e)=>{let[t,r,n]=iY(e),i=(n.use||[]).concat(s);return i7(t,r,{...n,use:i})});var or=Symbol();function on(e){let t=F.createContext(or);return{Provider:function(r){let n=e(r.initialState);return(0,eJ.jsx)(t.Provider,{value:n,children:r.children})},useContainer:function(){let e=F.useContext(t);if(e===or)throw Error("Component must be wrapped with <Container.Provider>");return e}}}var oi=on(function(){let[e,t]=(0,F.useState)({});return{localMessages:e,putLocalMessage:(0,F.useCallback)((e,r)=>{t(t=>{let n=t[e];return n?{...t,[e]:[r,...n.filter(e=>e.deduplicationId!==r.deduplicationId)]}:{...t,[e]:[r]}})},[]),deleteLocalMessage:(0,F.useCallback)((e,r)=>{t(t=>{let n=t[e];return n?{...t,[e]:n.filter(e=>e.deduplicationId!==r)}:{...t,[e]:[]}})},[])}}),oo=void 0!==globalThis.localStorage,os=on(function(){let[e,t]=(0,F.useState)(!1),[r,n]=(0,F.useState)(!1),[i,o]=function(e,t){let[r,n]=(0,F.useState)(()=>{if(!oo)return t;try{let r=globalThis.localStorage.getItem(e);if(null!==r)return JSON.parse(r);return globalThis.localStorage.setItem(e,JSON.stringify(t)),t}catch(e){return console.error(e),t}});return[r,(0,F.useCallback)(t=>{oo||console.warn(`Tried setting localStorage key \u201C${e}\u201D even though environment is not a browser`);try{n(t),oo&&globalThis.localStorage.setItem(e,JSON.stringify(t))}catch(e){console.error(e)}},[e])]}("dialect-wallet-config",{hardwareWalletEnabled:!1}),[s,a]=(0,F.useState)(i.hardwareWalletEnabled),l=(0,F.useCallback)(e=>{let t="function"==typeof e?e(s):e;a(t),o({hardwareWalletEnabled:t})},[s,o]),[u,c]=(0,F.useState)(!1),[d,h]=(0,F.useState)(!1);return{walletConnected:{get:e,set:t},connectionInitiatedState:{get:r,set:n},hardwareWalletForcedState:{get:s,set:l},isSigningFreeTransactionState:{get:u,set:c},isSigningMessageState:{get:d,set:h}}}),oa={dialectCloud:{tokenStore:"local-storage",tokenLifetimeMinutes:43200}},ol=on(function({config:e=oa,blockchainSdkFactory:t}={}){let{walletConnected:{get:r},connectionInitiatedState:{set:n}}=os.useContainer(),i=(0,F.useMemo)(()=>t&&r?nG.sdk({...oa,...e},t):null,[e,t,r]);return(0,F.useEffect)(function(){i&&i.info.hasValidAuthentication&&n(!0)},[i,n]),{sdk:i}}),ou=F.createContext({}),oc=()=>(0,F.useContext)(ou),od=({config:e,blockchainSdkFactory:t,children:r,dappAddress:n})=>(0,eJ.jsx)(i6,{children:(0,eJ.jsx)(ou.Provider,{value:{dappAddress:n},children:(0,eJ.jsx)(ol.Provider,{initialState:{config:e,blockchainSdkFactory:t},children:(0,eJ.jsx)(oi.Provider,{children:r})})})}),oh={},of=[],op=e=>{let t="THREAD_";if("id"in e)return t+e.id.toString();if("otherMembers"in e)return t+e.otherMembers.filter(e=>e).map(e=>e.toString()).join(":");throw Error("should never happen")},og=e=>`MESSAGES_${e}`,om=e=>"THREAD_SUMMARY_"+e.filter(e=>e).map(e=>e.toString()).join(":"),oy=e=>"DAPPS_"+e,ov=e=>"WALLET_ADDRESSES_"+e,ob=(e,t)=>"WALLET_DAPP_ADDRESSES_"+e+"_"+t,ow=(e,t="")=>`WALLET_NOTIFICATION_SUBSCRIPTIONS_${e}${t}`,ox=e=>{let{sdk:t}=ol.useContainer();if(e)return t;if(!t)throw Error("sdk not initialized");return t},oE=()=>!0;on(function(e=oE){let[t,r]=(0,F.useState)(!1),[n,i]=(0,F.useState)(!1),o=(0,F.useCallback)(async()=>{r(!0);try{let t=await e();return i(t),t}catch{i(!1)}finally{r(!1)}},[e]);return(0,F.useEffect)(function(){o()},[o]),{isGatePassed:n,isGateLoading:t}});var ok=()=>os.useContainer(),oS=function({addressType:e,refreshInterval:t}){let{wallet:r}=ox(),[n,i]=(0,F.useState)(!1),[o,s]=(0,F.useState)(!1),[a,l]=(0,F.useState)(!1),[u,c]=(0,F.useState)(!1),[d,h]=(0,F.useState)(!1),{data:f=of,error:p=null,mutate:g}=i3(ov(r.address),()=>r.addresses.findAll(),{refreshInterval:t,refreshWhenOffline:!0}),m=f.find(t=>t.type===e),y=(0,F.useCallback)(async({value:t})=>{if(n)return null;i(!0);try{return await r.addresses.create({type:e,value:t}),(await g())?.find(t=>t.type===e)||null}finally{i(!1)}},[e,n,g,r]),v=(0,F.useCallback)(async({value:t})=>{if(!m||o)return null;s(!0);try{return await r.addresses.update({addressId:m.id,value:t}),(await g())?.find(t=>t.type===e)||null}finally{s(!1)}},[m,e,o,g,r]),b=(0,F.useCallback)(async()=>{if(m&&!a){l(!0);try{await r.addresses.delete({addressId:m.id}),await g()}finally{l(!1)}}},[m,a,g,r]),w=(0,F.useCallback)(async({code:e})=>{if(m&&!u){c(!0);try{await r.addresses.verify({addressId:m.id,code:e}),await g()}finally{c(!1)}}},[m,u,g,r]),x=(0,F.useCallback)(async()=>{if(m&&!d){h(!0);try{await r.addresses.resendVerificationCode({addressId:m.id}),await g()}finally{h(!1)}}},[m,d,g,r]);return{globalAddress:m,create:y,update:v,delete:b,verify:w,resend:x,isCreatingAddress:n,isUpdatingAddress:o,isDeletingAddress:a,isSendingCode:d,isVerifyingCode:u,isFetching:!p&&void 0===f,errorFetching:p}},oT=({dappAddress:e,addressType:t})=>{let{wallet:r}=ox(),{globalAddress:n}=oS({addressType:t}),[i,o]=(0,F.useState)(!1),{data:s=of,error:a=null,mutate:l}=i3(ob(r.address,e),()=>r.dappAddresses.findAll({dappAccountAddress:e})),u=n?s.find(e=>e.address.id===n.id):null,c=(0,F.useCallback)(async({enabled:t,address:a=n})=>{if(a&&e&&!i){o(!0);try{await l(async()=>{if(u){let e=await r.dappAddresses.update({dappAddressId:u.id,enabled:t});return s.map(t=>t.id===e.id?e:t)}{let n=await r.dappAddresses.create({addressId:a.id,dappAccountAddress:e,enabled:t});return[...s,n]}},{optimisticData:s.find(e=>e.id===u?.id)?s.map(e=>e.id===u?.id?{...e,enabled:t}:e):[...s,{id:"optimistic-dapp-subscription",enabled:t,address:a,dappId:e}],rollbackOnError:!0})}finally{o(!1)}}},[u,e,s,n,i,l,r.dappAddresses]),d=!a&&!s;return{enabled:u?.enabled||!1,isToggling:i,isFetchingSubscriptions:d,toggleSubscription:c}},oM=function({refreshInterval:e}=oh){let{dappAddress:t}=oc(),{dapps:r}=ox(),{data:n,error:i}=i3(oy(t),()=>r.find({address:t}),{refreshInterval:e,refreshWhenOffline:!0});return{dapp:n||null,isFetching:!i&&void 0===n,errorFetching:i}},oA=function({dappAddress:e,refreshInterval:t}){let{wallet:{address:r,notificationSubscriptions:n}}=ox(),[i,o]=(0,F.useState)(!1),[s,a]=(0,F.useState)(null),{data:l,error:u=null,mutate:c}=i3(ow(r,e),n?()=>n.findAll({dappAccountAddress:e}):null,{refreshInterval:t,refreshWhenOffline:!0});return{subscriptions:l||of,update:(0,F.useCallback)(async e=>{o(!0),a(null);try{await c(t=>t?t.map(t=>t.notificationType.id===e.notificationTypeId?{...t,subscription:{...t.subscription,config:e.config}}:t):t,{revalidate:!1}),await n.upsert(e),await c()}catch(e){throw e instanceof rs&&a(e),e}finally{o(!1)}},[c,n]),isFetching:void 0===l&&!u,errorFetching:u,isUpdating:i,errorUpdating:s}},oP=({refreshInterval:e}={})=>{let{threads:t}=ox(),{dappAddress:r}=oc(),{data:n,isLoading:i,error:o,mutate:s}=i3(op({otherMembers:[r]}),()=>t.find({otherMembers:[r]}),{refreshInterval:e}),{trigger:a,isMutating:l,error:u}=ot(op({otherMembers:[r]}),(e,{arg:r})=>t.create(r)),{trigger:c,isMutating:d,error:h}=ot(op({otherMembers:[r]}),async()=>{await n?.delete()});return{thread:n??null,isThreadLoading:i,errorLoadingThread:o,refreshThread:s,create:a,isCreatingThread:l,errorCreatingThread:u,delete:c,isDeletingThread:d,errorDeletingThread:h}},oC=1e4,o_=e=>!!e.metadata?.smartMessage?.content.state&&[nJ.ReadyForExecution,nJ.Executing].includes(e.metadata.smartMessage.content.state),oI=({refreshInterval:e=oC}={refreshInterval:oC})=>{let[t,r]=(0,F.useState)(e),{thread:n,isThreadLoading:i}=oP(),{data:o,isLoading:s,error:a,mutate:l}=i3(n?og(n.id.toString()):null,()=>n?.messages()??[],{refreshInterval:t}),{trigger:u}=ot(n?om(n.otherMembers.map(e=>e.address)):null,async()=>{n&&await n.markAsRead()});return(0,F.useEffect)(()=>{if(!o)return;let t=!1;for(let e of o)if(o_(e)){t=!0;break}r(t?3e3:e)},[o,e]),{messages:o??[],isMessagesLoading:s||i,errorLoadingMessages:a,refreshMessages:l,markAsRead:u}},oO=function({refreshInterval:e,revalidateOnMount:t=!0,revalidateOnFocus:r=!0}=oh){let n=ox(!0),{dappAddress:i}=oc(),{data:o,mutate:s}=i3(om([i]),()=>n?.threads.findSummary({otherMembers:[i]}),{refreshInterval:e,refreshWhenOffline:!0,revalidateOnMount:t,revalidateOnFocus:r});return{hasNotificationsThread:null!==o,hasUnreadMessages:!!o?.me?.hasUnreadMessages,refresh:s,unreadCount:o?.me?.unreadMessagesCount??0}},oL=e=>{let t=(0,e$.O)(),r=void 0===e.customWalletAdapter?t:e.customWalletAdapter,{walletConnected:{set:n},connectionInitiatedState:{set:i},isSigningFreeTransactionState:{set:o},isSigningMessageState:{set:s},hardwareWalletForcedState:{get:a}}=os.useContainer(),l=(0,F.useCallback)(e=>({publicKey:e.publicKey??void 0,signTransaction:e.signTransaction?async t=>{let r=t.recentBlockhash&&t.recentBlockhash===z.PublicKey.default.toString();r&&o(!0);try{return await e.signTransaction(t)}catch(e){throw r&&i(!1),e}finally{r&&o(!1)}}:void 0,signMessage:!a&&e.signMessage?async t=>{s(!0);try{return await e.signMessage(t)}catch(e){throw i(!1),e}finally{s(!1)}}:void 0}),[a,i,o,s]),u=(0,F.useMemo)(()=>r&&r.publicKey?io.create({wallet:l(r)}):null,[r,l]);return(0,F.useEffect)(()=>{n(!!(r&&r.publicKey))},[n,r]),(0,eJ.jsx)(od,{...e,blockchainSdkFactory:u})},oR=e=>(0,eJ.jsx)(os.Provider,{children:(0,eJ.jsx)(oL,{...e})}),oj=r(90512),oB=r(48764);let oN=0,oD=()=>++oN,oK=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,oU=e=>F.createElement(F.Fragment,null,function e(t,r,n){return"string"==typeof t?function(e,t,r){let n=[],i=e;for(;;){let e=r.exec(i);if(!e||void 0===e[0])break;let o=e.index,s=e.index+e[0].length,a=i.slice(0,o),l=i.slice(o,s).replace(oK,"");i=i.slice(s),a&&n.push(a),n.push(t(l,oD()))}return(i&&n.push(F.createElement(F.Fragment,{key:oD()},i)),0===n.length)?e:n}(t,r,n):Array.isArray(t)?t.map(t=>e(t,r,n)):(0,F.isValidElement)(t)&&t.props.children&&"a"!==t.type&&"button"!==t.type?(0,F.cloneElement)(t,{...t.props,key:oD()},e(t.props.children,r,n)):t}(e.children,e.component,e.regex));var oz=e=>(0,eJ.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",...e,children:(0,eJ.jsx)("path",{d:"M14.8479 3.5092C15.2629 3.8923 15.2629 4.56273 14.8479 4.94583L6.6751 13.1186C6.292 13.5336 5.62158 13.5336 5.23848 13.1186L1.15209 9.03221C0.737064 8.64912 0.737064 7.97869 1.15209 7.59559C1.53519 7.18057 2.20561 7.18057 2.58871 7.59559L5.97275 10.9477L13.4113 3.5092C13.7944 3.09418 14.4648 3.09418 14.8479 3.5092Z",fill:"currentColor"})}),oF=e=>(0,eJ.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:45,height:14,viewBox:"0 0 45 14",fill:"none",...e,children:(0,eJ.jsx)("path",{d:"M4.722 12.25H.958V2.068h3.759c1.037 0 1.93.204 2.68.612a4.18 4.18 0 011.74 1.75c.407.759.61 1.667.61 2.724 0 1.06-.203 1.972-.61 2.734A4.179 4.179 0 017.4 11.643c-.752.405-1.645.607-2.68.607zm-1.303-2.098h1.208c.57 0 1.052-.096 1.447-.288.398-.196.698-.513.9-.95.205-.44.308-1.028.308-1.76s-.103-1.316-.308-1.75c-.206-.438-.509-.752-.91-.945-.398-.195-.888-.293-1.472-.293H3.42v5.986zM10.485 12.25V4.614h2.43v7.636h-2.43zm1.218-8.526c-.342 0-.635-.113-.88-.338a1.088 1.088 0 01-.368-.826c0-.318.123-.59.368-.815.245-.229.538-.343.88-.343.344 0 .638.114.88.343.245.225.368.497.368.815 0 .322-.123.597-.368.826a1.244 1.244 0 01-.88.338zM15.916 12.38a3.26 3.26 0 01-1.298-.245 2.022 2.022 0 01-.89-.745c-.215-.335-.323-.754-.323-1.258 0-.424.075-.782.224-1.074a1.91 1.91 0 01.617-.71 2.9 2.9 0 01.904-.413c.342-.097.706-.161 1.094-.194.434-.04.784-.082 1.049-.125.265-.046.457-.11.577-.194a.418.418 0 00.184-.362v-.025c0-.256-.088-.453-.264-.592-.175-.14-.412-.209-.71-.209-.322 0-.58.07-.776.21a.92.92 0 00-.373.576l-2.242-.08c.066-.464.237-.878.512-1.243.278-.368.66-.656 1.143-.865.487-.212 1.072-.318 1.755-.318.487 0 .936.058 1.347.174.411.113.77.278 1.074.497.305.216.54.48.706.796.17.315.254.674.254 1.079v5.19h-2.287v-1.064h-.06c-.136.258-.31.477-.522.656a2.08 2.08 0 01-.74.403c-.282.09-.6.134-.955.134zm.75-1.592c.262 0 .498-.053.707-.159.212-.106.38-.252.507-.437.126-.19.189-.408.189-.657V8.81c-.07.036-.154.07-.254.099a5.709 5.709 0 01-.676.154l-.353.055a2.197 2.197 0 00-.587.169.926.926 0 00-.368.298.73.73 0 00-.124.428c0 .252.09.444.269.576.182.133.412.2.69.2zM23.697 2.068V12.25h-2.43V2.068h2.43zM28.114 12.394c-.798 0-1.488-.157-2.068-.472a3.266 3.266 0 01-1.332-1.357c-.308-.59-.462-1.291-.462-2.103 0-.79.155-1.479.467-2.069a3.374 3.374 0 011.317-1.382c.567-.331 1.235-.497 2.004-.497.543 0 1.04.085 1.491.254.451.169.84.419 1.169.75.328.332.583.741.765 1.228.183.484.274 1.04.274 1.666v.606h-6.637V7.606h4.375a1.37 1.37 0 00-.184-.69 1.25 1.25 0 00-.492-.473 1.421 1.421 0 00-.711-.174 1.45 1.45 0 00-.731.184 1.384 1.384 0 00-.711 1.193v1.437c0 .312.061.585.184.82.122.232.296.413.522.542.225.13.494.194.805.194.216 0 .411-.03.587-.09s.326-.147.452-.263c.126-.116.22-.258.284-.427l2.232.064c-.093.5-.297.937-.612 1.308-.311.368-.72.654-1.228.86-.507.202-1.093.303-1.76.303zM35.845 12.394c-.805 0-1.496-.166-2.073-.497a3.364 3.364 0 01-1.323-1.382c-.308-.594-.462-1.28-.462-2.058 0-.783.154-1.469.462-2.059a3.388 3.388 0 011.328-1.387c.576-.331 1.264-.497 2.063-.497.706 0 1.32.128 1.844.383.528.255.939.616 1.233 1.084.299.464.456 1.009.473 1.635h-2.272c-.047-.39-.18-.697-.398-.92-.215-.221-.497-.332-.845-.332a1.2 1.2 0 00-.74.238c-.213.156-.379.388-.498.696-.116.305-.174.683-.174 1.134 0 .45.058.832.174 1.143.12.308.285.542.497.701.212.156.46.234.74.234.226 0 .425-.048.597-.144.176-.096.32-.237.433-.423.113-.189.184-.418.214-.686h2.272c-.023.63-.18 1.18-.473 1.65-.288.471-.694.837-1.218 1.1-.52.258-1.138.387-1.854.387zM44.244 4.614v1.79h-4.817v-1.79h4.817zm-3.808-1.83h2.431v7.065c0 .149.023.27.07.362.05.09.12.155.214.194a.91.91 0 00.333.055c.092 0 .19-.008.293-.025.106-.02.186-.036.239-.05l.367 1.755c-.116.034-.28.075-.492.125-.209.05-.459.081-.75.094-.57.027-1.06-.04-1.467-.199a1.901 1.901 0 01-.93-.755c-.212-.342-.315-.77-.308-1.288V2.784z",fill:"currentColor"})}),oW=[0,45,90,135,180,225,270,315],oV={Loader:({width:e=16})=>{let t=(0,F.useMemo)(()=>oW.map((e,t)=>(0,eJ.jsx)("circle",{cy:12,cx:12,r:4,transform:`rotate(${e}, 24, 24)`,fillOpacity:1/oW.length*(t+1)},e)),[]);return(0,eJ.jsxs)(eJ.Fragment,{children:[(0,eJ.jsx)("style",{children:"@keyframes spin{to{transform:rotate(360deg)}}"}),(0,eJ.jsx)("svg",{viewBox:"0 0 48 48",width:e,fill:"currentColor","data-testid":"rotating-dots-svg","aria-label":"rotating-dots-loading",style:{animationDuration:"1s",animation:"spin 1s steps(8, end) infinite"},children:t})]})},Settings:e=>(0,eJ.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 16 16",fill:"none",...e,children:(0,eJ.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.829 2.543c.247.085.488.187.722.305.164.085.36.085.524 0l.713-.363a.578.578 0 01.677.106l.943.944c.18.177.223.452.107.677l-.363.713a.563.563 0 000 .523c.117.234.22.476.305.723a.567.567 0 00.372.37l.764.245c.242.076.405.3.403.554v1.335a.576.576 0 01-.41.547l-.764.245a.567.567 0 00-.368.365 5.772 5.772 0 01-.306.723.572.572 0 000 .525l.363.712a.578.578 0 01-.106.676l-.943.944a.579.579 0 01-.678.107l-.713-.363a.563.563 0 00-.523 0c-.234.117-.475.22-.722.305a.567.567 0 00-.37.372l-.246.764a.575.575 0 01-.554.403H7.329a.575.575 0 01-.554-.411l-.246-.764a.568.568 0 00-.365-.368 5.773 5.773 0 01-.723-.305.572.572 0 00-.525 0l-.712.363a.578.578 0 01-.676-.106l-.944-.944a.579.579 0 01-.107-.677l.364-.713a.563.563 0 000-.523 5.994 5.994 0 01-.306-.723.567.567 0 00-.372-.37l-.756-.237a.575.575 0 01-.403-.555V7.332a.575.575 0 01.403-.554l.764-.245a.568.568 0 00.368-.365c.085-.248.187-.489.305-.723a.572.572 0 000-.525l-.363-.712a.578.578 0 01.106-.676l.944-.944a.579.579 0 01.677-.107l.713.363c.164.086.36.086.523 0 .234-.117.476-.22.723-.305a.567.567 0 00.37-.372l.245-.764A.575.575 0 017.336 1h1.335a.576.576 0 01.547.411l.246.764c.055.174.19.31.365.368zM7.996 4.92a3.078 3.078 0 100 6.156 3.078 3.078 0 000-6.156z",fill:"currentColor"})}),ArrowLeft:e=>(0,eJ.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 16 16",fill:"none",...e,children:(0,eJ.jsx)("path",{d:"M.661 8.615l6.187 5.906c.352.317.88.317 1.196-.035.316-.351.316-.879-.035-1.195L3.333 8.826h11.444c.492 0 .843-.351.843-.844a.833.833 0 00-.843-.843H3.333l4.676-4.43a.839.839 0 00.035-1.195.839.839 0 00-1.196-.035L.661 7.385C.485 7.56.38 7.77.38 7.982a.88.88 0 00.281.633z",fill:"currentColor"})}),ArrowRight:e=>(0,eJ.jsx)("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,eJ.jsx)("path",{d:"M15.339 8.615l-6.187 5.906c-.352.317-.88.317-1.196-.035-.316-.351-.316-.879.035-1.195l4.676-4.465H1.223c-.492 0-.843-.351-.843-.844 0-.457.351-.843.843-.843h11.444l-4.676-4.43a.839.839 0 01-.035-1.195.839.839 0 011.196-.035l6.187 5.906c.176.176.281.386.281.597a.88.88 0 01-.281.633z",fill:"currentColor"})}),Close:e=>(0,eJ.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:17,height:16,viewBox:"0 0 17 16",fill:"none",...e,children:(0,eJ.jsx)("path",{d:"M13.646 3.9L9.524 8.02l4.088 4.088a.752.752 0 010 1.133.752.752 0 01-1.134 0L8.356 9.155 4.27 13.242a.752.752 0 01-1.133 0c-.344-.309-.344-.824 0-1.167l4.087-4.088L3.136 3.9c-.344-.31-.344-.825 0-1.168.309-.31.824-.31 1.167 0l4.088 4.122 4.087-4.088c.31-.343.825-.343 1.168 0 .31.31.31.825 0 1.134z",fill:"currentColor"})}),Bell:e=>(0,eJ.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:12,viewBox:"0 0 12 12",fill:"none",...e,children:[(0,eJ.jsx)("g",{fill:"currentColor",clipPath:"url(#a)",children:(0,eJ.jsx)("path",{d:"M6.76 1.283a.867.867 0 1 0-1.519.004 3.702 3.702 0 0 0-2.957 3.63v.443c0 1.095-.42 2.167-1.142 2.982l-.163.186a.754.754 0 0 0-.14.816c.117.256.396.42.7.42h8.946c.28 0 .56-.164.676-.42a.754.754 0 0 0-.14-.816l-.163-.186A4.512 4.512 0 0 1 9.74 5.36v-.443a3.702 3.702 0 0 0-2.98-3.634ZM6.012 12c.396 0 .769-.14 1.048-.42.28-.279.443-.675.443-1.071H4.52c0 .396.14.792.42 1.072.28.28.676.419 1.072.419Z"})}),(0,eJ.jsx)("defs",{children:(0,eJ.jsx)("clipPath",{id:"a",children:(0,eJ.jsx)("path",{fill:"#fff",d:"M0 0h12v12H0z"})})})]}),BellButton:e=>(0,eJ.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,viewBox:"0 0 18 18",fill:"none",...e,children:[(0,eJ.jsx)("g",{fill:"currentColor",clipPath:"url(#a)",children:(0,eJ.jsx)("path",{d:"M10.14 1.925a1.3 1.3 0 1 0-2.279.006c-2.532.504-4.436 2.766-4.436 5.445v.664c0 1.642-.629 3.25-1.712 4.473l-.245.28c-.314.35-.384.803-.21 1.223.175.384.595.629 1.05.629h13.42c.419 0 .838-.245 1.013-.63.175-.419.105-.873-.21-1.222l-.244-.28a6.768 6.768 0 0 1-1.678-4.473v-.664c0-2.69-1.92-4.96-4.468-5.451ZM9.017 18c.594 0 1.154-.21 1.573-.63.42-.419.664-1.013.664-1.607H6.781c0 .594.21 1.188.629 1.608.419.42 1.013.629 1.607.629Z"})}),(0,eJ.jsx)("defs",{children:(0,eJ.jsx)("clipPath",{id:"a",children:(0,eJ.jsx)("path",{fill:"#fff",d:"M0 0h18v18H0z"})})})]}),BellButtonOutline:e=>(0,eJ.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,viewBox:"0 0 18 18",fill:"none",...e,children:[(0,eJ.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M10.14 2.408a1.44 1.44 0 1 0-2.133 0h-.014c-2.463.405-4.32 2.53-4.32 5.062v1.148c0 1.518-.54 3.003-1.485 4.218l-.506.608a.838.838 0 0 0-.101.877c.135.27.405.439.743.439h13.5a.787.787 0 0 0 .708-.439.838.838 0 0 0-.101-.877l-.506-.608a6.871 6.871 0 0 1-1.452-4.218V7.47c0-2.531-1.89-4.657-4.32-5.062h-.013ZM8.803 3.96h.54a3.529 3.529 0 0 1 3.51 3.51v1.148c0 1.62.44 3.172 1.317 4.522H3.943a8.26 8.26 0 0 0 1.35-4.522V7.47a3.507 3.507 0 0 1 3.51-3.51Z",clipRule:"evenodd"}),(0,eJ.jsx)("path",{fill:"currentColor",d:"M10.592 17.392c.405-.404.641-.978.641-1.552h-4.32c0 .574.203 1.148.608 1.552.405.405.979.608 1.552.608.574 0 1.114-.203 1.52-.608Z"})]}),Trash:e=>(0,eJ.jsx)("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,eJ.jsx)("path",{d:"M11.825 2.335H9.39A1.396 1.396 0 008 1c-.745 0-1.36.595-1.39 1.335H4.175c-.445 0-.87.19-1.165.525-.295.34-.425.785-.365 1.225l.045.325a.5.5 0 00.495.435h9.63a.5.5 0 00.495-.435l.045-.325c.06-.44-.07-.885-.365-1.225a1.552 1.552 0 00-1.165-.525zM12.365 6.073h-8.73a.5.5 0 00-.495.565l1.025 7.027C4.27 14.425 4.93 15 5.7 15h4.6c.77 0 1.43-.575 1.535-1.335l1.025-7.027a.5.5 0 00-.495-.565z",fill:"currentColor"})}),Xmark:e=>(0,eJ.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 16 16",fill:"none",...e,children:(0,eJ.jsx)("path",{d:"M13.332 4.075L9.426 7.98l3.9 3.932a.964.964 0 010 1.406.964.964 0 01-1.406 0l-3.9-3.9-3.945 3.914a.964.964 0 01-1.407 0 .964.964 0 010-1.406L6.582 7.98 2.676 4.074a.964.964 0 010-1.406.964.964 0 011.406 0L8.02 6.574l3.905-3.905a.964.964 0 011.407 0 .964.964 0 010 1.406z",fill:"currentColor"})}),Resend:e=>(0,eJ.jsxs)("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,eJ.jsx)("path",{d:"M7.94 13.808v.034l.001-.034zM2.248 7.983h-.035.035zM8.072 2.29v-.034.034z",fill:"currentColor"}),(0,eJ.jsx)("path",{d:"M12.502 11.678a.862.862 0 01-.253.613 5.984 5.984 0 01-4.242 1.759l-.043-.002-.036-.002a5.973 5.973 0 01-4.164-1.754 5.983 5.983 0 01-1.757-4.215.21.21 0 01-.001-.028l.001-.043c0-.013.002-.025.003-.035a5.972 5.972 0 011.754-4.164A5.982 5.982 0 017.977 2.05a.21.21 0 01.028-.002.933.933 0 01.078.004 6.018 6.018 0 011.953.351c.543.195 1.064.47 1.544.828l.668-1.156a.205.205 0 01.37.027l1.318 3.452a.205.205 0 01-.153.29l-3.65.582a.204.204 0 01-.223-.302l.797-1.38a4.245 4.245 0 00-2.664-.964l-.02.001a.217.217 0 01-.044 0 4.255 4.255 0 00-2.99 1.25 4.267 4.267 0 00-1.252 2.98v.02a.204.204 0 010 .045 4.256 4.256 0 001.25 2.99 4.267 4.267 0 002.96 1.253l.02-.002h.02a.22.22 0 01.045 0 4.255 4.255 0 002.981-1.24l.002-.002.004-.003v-.002l.003-.002a.863.863 0 011.213-.013l.005.004.003.003h.001l.003.004a.863.863 0 01.255.613z",fill:"currentColor"})]}),Wallet:e=>(0,eJ.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:17,height:16,viewBox:"0 0 17 16",fill:"none",...e,children:(0,eJ.jsx)("path",{d:"M2.835 14.13h10.756c.896 0 1.622-.726 1.622-1.623V6.245c0-.808-.655-1.466-1.466-1.466H3.791c-.351 0-.667-.256-.7-.605a.675.675 0 01.669-.742h8.736a.78.78 0 100-1.561h-8.85a2.433 2.433 0 00-2.433 2.432v8.204c0 .896.726 1.622 1.623 1.622zm9.038-5.706a1.03 1.03 0 110 2.062 1.03 1.03 0 010-2.062z",fill:"currentColor"})})},o$={},oH={Text:{Primary:"dt-text-[--dt-text-primary]",Secondary:"dt-text-[--dt-text-secondary]",Tertiary:"dt-text-[--dt-text-tertiary]",Accent:"dt-text-[--dt-text-accent]",Success:"dt-text-[--dt-accent-success]",Error:"dt-text-[--dt-accent-error]",Inverse:"dt-text-[--dt-text-inverse]",Button:{Primary:{Default:"dt-text-[--dt-text-inverse]",Disabled:"disabled:dt-text-[--dt-text-tertiary]"},Secondary:{Default:"dt-text-[--dt-text-primary]",Disabled:"disabled:dt-text-[--dt-text-tertiary]"},Destructive:{Default:"dt-text-[--dt-accent-error]",Disabled:"disabled:dt-text-[--dt-accent-error]"}},Input:{Placeholder:"placeholder:dt-text-[--dt-text-quaternary]"}},Icon:{Primary:"dt-text-[--dt-icon-primary]",Secondary:"dt-text-[--dt-icon-secondary]",Tertiary:"dt-text-[--dt-icon-tertiary]"},Background:{Button:{Primary:{Default:"dt-bg-[--dt-button-primary]",Hover:"hover:dt-bg-[--dt-button-primary-hover]",Pressed:"active:dt-bg-[--dt-button-primary]",Disabled:"disabled:dt-bg-[--dt-button-primary-disabled]"},Secondary:{Default:"dt-bg-[--dt-button-secondary]",Hover:"hover:dt-bg-[--dt-button-secondary-hover]",Pressed:"active:dt-bg-[--dt-button-secondary]",Disabled:"disabled:dt-bg-[--dt-button-secondary-disabled]"},Destructive:{Default:"dt-bg-[--dt-button-secondary]",Hover:"hover:dt-bg-[--dt-button-secondary-hover]",Pressed:"active:dt-bg-[--dt-button-secondary]",Disabled:"disabled:dt-bg-[--dt-button-secondary-disabled]"}},Input:{Secondary:"dt-bg-[--dt-input-secondary]",Checked:"dt-bg-[--dt-input-checked]",Unchecked:"dt-bg-[--dt-input-unchecked]"},Primary:"dt-bg-[--dt-bg-primary]",Secondary:"dt-bg-[--dt-bg-secondary]",Tertiary:"dt-bg-[--dt-bg-tertiary]",BrandTransparent:"dt-bg-[--dt-brand-transparent]",SuccessTransparent:"dt-bg-[--dt-success-transparent]",ErrorTransparent:"dt-bg-[--dt-error-transparent]",AccentBrand:"dt-bg-[--dt-accent-brand]"},Stroke:{Input:{Primary:"dt-border-[--dt-input-primary]",Checked:"dt-border-[--dt-input-checked]",Error:"dt-border-[--dt-accent-error]",Focused:"focus-within:dt-border-[--dt-input-checked]"},Primary:"dt-border-[--dt-stroke-primary]",Error:"dt-border-[--dt-accent-error]"},Radius:{XSmall:"dt-rounded-[--dt-border-radius-xs]",Small:"dt-rounded-[--dt-border-radius-s]",Medium:"dt-rounded-[--dt-border-radius-m]",Large:"dt-rounded-[--dt-border-radius-l]"}},oq={default:(0,oj.Z)(oH.Text.Tertiary,oH.Background.BrandTransparent),success:(0,oj.Z)(oH.Text.Success,oH.Background.SuccessTransparent),error:(0,oj.Z)(oH.Text.Error,oH.Background.ErrorTransparent)},oZ=({variant:e="default",children:t,className:r})=>(0,eJ.jsx)("span",{className:(0,oj.Z)(oq[e],"dt-rounded-full dt-px-2.5 dt-py-0.5 dt-text-caption dt-font-semibold",r),children:t}),oG=({type:e="Secondary",size:t="medium",stretch:r=!1,...n})=>{let i=oH.Background.Button[e],o=oH.Text.Button[e],s="large"===t?"dt-px-6 dt-py-4 dt-text-text dt-font-semibold "+oH.Radius.Medium:"dt-px-2.5 dt-py-1.5 dt-text-subtext dt-font-semibold "+oH.Radius.XSmall;return(0,eJ.jsx)("button",{className:(0,oj.Z)("dt-flex dt-items-center dt-justify-center dt-gap-1.5",{"dt-w-full":r},i.Default,i.Hover,i.Pressed,i.Disabled,o.Default,o.Disabled,s),onClick:n.onClick,disabled:n.disabled||n.loading,children:n.loading?(0,eJ.jsxs)(eJ.Fragment,{children:["Loading ",(0,eJ.jsx)(oV.Loader,{})]}):n.children})},oJ=({children:e,checked:t=!1,disabled:r=!1,onChange:n})=>{let i=()=>{r||n?.(!t)};return(0,eJ.jsxs)("label",{className:"dt-label dt-inline-flex dt-cursor-pointer dt-items-center dt-gap-2 dt-text-subtext dt-font-semibold ",onClick:i,children:[(0,eJ.jsx)("input",{type:"hidden",checked:t,onChange:i}),(0,eJ.jsx)("span",{className:(0,oj.Z)("dt-flex dt-h-5 dt-w-5 dt-items-center dt-justify-center dt-rounded-sm dt-border-2 dt-transition-colors dt-ease-in-out",t?oH.Background.Input.Checked:"dt-bg-transparent",t?oH.Stroke.Input.Checked:oH.Stroke.Input.Primary,"dt-text-[--dt-input-secondary]",{"dt-opacity-50":r}),children:t&&(0,eJ.jsx)(oz,{})}),e]})},oY=({icon:e,onClick:t,className:r})=>(0,eJ.jsx)("button",{className:(0,oj.Z)(r,"dt-transition-opacity hover:dt-opacity-70"),onClick:t,children:e}),oX=()=>Math.random().toString(36).slice(2,9),oQ=({id:e,label:t,rightAdornment:r,error:n=!1,...i})=>{let o=(0,F.useMemo)(()=>e||`dt-input-${oX()}`,[e]);return(0,eJ.jsxs)("div",{className:"dt-flex dt-flex-col dt-gap-2",children:[t&&(0,eJ.jsx)("label",{htmlFor:o,className:(0,oj.Z)("dt-label dt-text-subtext dt-font-semibold",oH.Text.Tertiary),children:t}),(0,eJ.jsxs)("div",{role:"textbox",className:(0,oj.Z)("dt-flex dt-h-[42px] dt-items-center dt-gap-2 dt-border dt-pl-2 dt-pr-1.5",oH.Radius.Small,n?oH.Stroke.Input.Error:oH.Stroke.Input.Primary,!n&&!i.disabled&&oH.Stroke.Input.Focused,oH.Background.Input.Secondary),children:[(0,eJ.jsx)("input",{id:o,type:"text",className:(0,oj.Z)("dt-input dt-ml-1 dt-w-full dt-bg-transparent dt-text-text dt-font-normal dt-outline-none",oH.Text.Primary,oH.Text.Input.Placeholder),...i}),r&&(0,eJ.jsx)("div",{className:"dt-flex dt-items-center",children:r})]})]})},o0=(0,F.forwardRef)(function({url:e,children:t,className:r,...n},i){return(0,eJ.jsx)("a",{href:e,ref:i,className:(0,oj.Z)(oH.Text.Accent,"dt-underline",r),...n,children:t})}),o1=({children:e,checked:t=!1,onChange:r})=>(0,eJ.jsxs)("label",{className:"dt-label dt-inline-flex dt-cursor-pointer dt-items-center dt-gap-2 dt-text-subtext dt-font-semibold",onClick:()=>r?.(!t),children:[(0,eJ.jsx)("input",{type:"hidden",checked:t,onChange:()=>r?.(!t)}),(0,eJ.jsx)("span",{className:(0,oj.Z)("dt-block dt-h-5 dt-w-8 dt-rounded-full dt-p-0.5 dt-transition-colors dt-ease-in-out",t?oH.Background.Input.Checked:oH.Background.Input.Unchecked),children:(0,eJ.jsx)("span",{className:(0,oj.Z)("dt-block dt-h-4 dt-w-4 dt-transform dt-rounded-full dt-transition-transform dt-ease-in-out",oH.Background.Input.Secondary,t?"dt-translate-x-3":"dt-translate-x-0")})}),e]}),o2=({onClick:e,disabled:t,children:r,color:n})=>(0,eJ.jsx)("button",{style:{color:n},className:(0,oj.Z)("dt-flex dt-cursor-pointer dt-items-center dt-gap-1 dt-text-subtext dt-font-semibold",{[oH.Text.Primary]:!n},"hover:dt-opacity-80 disabled:dt-opacity-50"),onClick:t?void 0:e,disabled:t,children:r}),o5=({onBackClick:e})=>(0,eJ.jsx)(oY,{className:oH.Icon.Secondary,onClick:e,icon:(0,eJ.jsx)(oV.ArrowLeft,{})}),o6=({onSettingsClick:e})=>(0,eJ.jsx)(oY,{className:oH.Icon.Secondary,onClick:e,icon:(0,eJ.jsx)(oV.Settings,{})}),o3=({onCloseClick:e})=>(0,eJ.jsx)(oY,{className:oH.Icon.Secondary,onClick:e,icon:(0,eJ.jsx)(oV.Close,{})});function o4({title:e,showCloseButton:t=!0,showSettingsButton:r=!0,showBackButton:n=!0,onSettingsClick:i,onBackClick:o,onCloseClick:s}){let a=(0,eJ.jsx)(eJ.Fragment,{children:n&&(0,eJ.jsx)(o5,{onBackClick:o})}),l=(0,eJ.jsxs)("div",{className:"dt-flex dt-gap-3",children:[r&&(0,eJ.jsx)(o6,{onSettingsClick:i}),t&&(0,eJ.jsx)(o3,{onCloseClick:s})]});return(0,eJ.jsxs)("div",{className:(0,oj.Z)(oH.Background.Secondary,"dt-flex dt-flex-row dt-items-center dt-justify-between dt-gap-4 dt-px-4 dt-py-4"),children:[(0,eJ.jsxs)("div",{className:"dt-flex dt-flex-row dt-items-center dt-gap-2",children:[a,(0,eJ.jsx)("span",{className:(0,oj.Z)(oH.Text.Primary,"dt-text-h2 dt-font-bold"),children:e})]}),l]})}var o8={cancelSmartMessage:async(e,t)=>{try{let r=await fetch(`${e}/api/v1/smart-messages/${t}/cancel`,{method:"POST"});if(!r.ok)return console.warn(`Error cancelling smart message ${t}`),null;return r.json()}catch(e){return console.warn(`Error cancelling smart message ${t}`,e),null}},createSmartMessageTransaction:async(e,t,r,n)=>{try{let i=await fetch(`${e}/api/v1/smart-messages/${t}/create-transaction`,{method:"POST",body:JSON.stringify(n),headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}});if(!i.ok)return console.warn(`Error creating transaction for smart message ${t}`),null;return i.json()}catch(e){return console.warn(`Error creating transaction for ${t}`,e),null}},submitSmartMessageTransaction:async(e,t,r,n)=>{try{let i=await fetch(`${e}/api/v1/smart-messages/${t}/submit-transaction`,{method:"POST",body:JSON.stringify(n),headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}});if(!i.ok)return console.warn(`Error submitting transaction for smart message ${t}`),null;return i.json()}catch(e){return console.warn(`Error submitting transaction for ${t}`,e),null}}},o7=()=>{let e=ox(),t=(0,e$.O)(),r=e.config.dialectCloud.url,{refreshMessages:n}=oI(),[i,o]=(0,F.useState)(!1),[s,a]=(0,F.useState)(!1);return{handleSmartMessageAction:(0,F.useCallback)(async(i,s)=>{try{if(!t.signTransaction)return;o(!0);let a=await e.tokenProvider.get(),l=await o8.createSmartMessageTransaction(r,i,a.rawValue,{actionHumanReadableId:s});if(!l)return;let u=z.VersionedTransaction.deserialize(oB.Buffer.from(l.transaction,"base64")),c=await t.signTransaction(u);await o8.submitSmartMessageTransaction(r,i,a.rawValue,{actionHumanReadableId:s,transaction:oB.Buffer.from(c.serialize()).toString("base64")}),await n()}finally{o(!1)}},[r,e.tokenProvider,t,n]),handleSmartMessageCancel:(0,F.useCallback)(async e=>{try{if(!t.signTransaction)return;a(!0),await o8.cancelSmartMessage(r,e)}finally{a(!1)}},[r,t.signTransaction]),isInitiatingSmartMessage:i,isCancellingSmartMessage:s}},o9=({message:e="Wallet not connected"})=>(0,eJ.jsxs)("div",{className:"dt-flex dt-flex-1 dt-flex-col dt-items-center dt-justify-center dt-px-4",children:[(0,eJ.jsx)("div",{className:(0,oj.Z)(oH.Icon.Secondary),children:(0,eJ.jsx)(oV.Wallet,{width:24,height:24})}),(0,eJ.jsx)("h3",{className:(0,oj.Z)("dt-pb-2 dt-pt-6 dt-text-h2 dt-font-semibold",oH.Text.Primary),children:e})]}),se=()=>{let{hardwareWalletForcedState:{get:e,set:t},connectionInitiatedState:{set:r}}=ok();return(0,eJ.jsxs)("div",{className:"dt-flex dt-flex-1 dt-flex-col dt-items-center dt-justify-center dt-px-4",children:[(0,eJ.jsx)("h3",{className:(0,oj.Z)("dt-pb-2 dt-pt-6 dt-text-h2 dt-font-semibold",oH.Text.Primary),children:"Verify Wallet"}),(0,eJ.jsxs)("span",{className:(0,oj.Z)("dt-text-center dt-text-text dt-font-normal",oH.Text.Secondary),children:["To continue, please prove you own this wallet by signing a"," ",e?"transaction":"message",". It is free and does not involve the network."]}),(0,eJ.jsxs)("div",{className:"dt-flex dt-w-full dt-flex-col dt-items-center dt-pt-6 ",children:[(0,eJ.jsxs)("div",{className:(0,oj.Z)(oH.Stroke.Input.Primary,oH.Text.Primary,oH.Radius.Medium,"dt-mb-4 dt-flex dt-h-12 dt-w-full dt-flex-row dt-items-center dt-justify-between dt-border dt-px-3 dt-py-2"),children:[(0,eJ.jsx)("span",{children:"Using ledger?"}),(0,eJ.jsx)(o1,{checked:e,onChange:e=>t(e)})]}),(0,eJ.jsx)(oG,{type:"Primary",size:"large",stretch:!0,onClick:()=>r(!0),children:e?"Sign transaction":"Sign message"})]})]})},st=()=>(0,eJ.jsxs)("div",{className:"dt-flex dt-flex-1 dt-flex-col dt-items-center dt-justify-center dt-px-4",children:[(0,eJ.jsx)("div",{className:(0,oj.Z)(oH.Icon.Secondary),children:(0,eJ.jsx)(oV.Loader,{width:24,height:24})}),(0,eJ.jsx)("h3",{className:(0,oj.Z)("dt-pb-2 dt-pt-6 dt-text-h2 dt-font-semibold",oH.Text.Primary),children:"Waiting for your wallet"}),(0,eJ.jsx)("p",{className:(0,oj.Z)("dt-text-center dt-text-text dt-font-normal",oH.Text.Secondary),children:"To continue please prove you own a wallet by approving signing request. It is free and does not involve the network."})]}),sr=()=>(0,eJ.jsxs)("div",{className:"dt-flex dt-flex-1 dt-flex-col dt-items-center dt-justify-center dt-px-4",children:[(0,eJ.jsx)("div",{className:(0,oj.Z)(oH.Icon.Secondary),children:(0,eJ.jsx)(oV.Loader,{width:24,height:24})}),(0,eJ.jsx)("h3",{className:(0,oj.Z)("dt-pb-2 dt-pt-6 dt-text-h2 dt-font-semibold",oH.Text.Primary),children:"Waiting for your wallet"}),(0,eJ.jsxs)("p",{className:(0,oj.Z)("dt-text-center dt-text-text dt-font-normal",oH.Text.Secondary),children:["To continue please prove you own this wallet by signing a transaction. This transaction ",(0,eJ.jsx)("b",{children:"will not"})," be submitted to the blockchain, and is free."]})]}),sn=function({header:e=null,notConnectedMessage:t,children:r}){let n=ox(!0),{walletConnected:{get:i},connectionInitiatedState:{get:o},isSigningMessageState:{get:s},isSigningFreeTransactionState:{get:a}}=ok();return i&&(n||!o)?o?s?(0,eJ.jsxs)(eJ.Fragment,{children:[e,(0,eJ.jsx)(st,{})]}):a?(0,eJ.jsxs)(eJ.Fragment,{children:[e,(0,eJ.jsx)(sr,{})]}):r:(0,eJ.jsxs)(eJ.Fragment,{children:[e,(0,eJ.jsx)(se,{})]}):(0,eJ.jsxs)(eJ.Fragment,{children:[e,(0,eJ.jsx)(o9,{message:t})]})},si=(0,F.createContext)(null),so=({initialRoute:e,children:t})=>{let[r,n]=(0,F.useState)(e??"notifications"),i=(0,F.useMemo)(()=>({route:r,setRoute:n}),[r]);return(0,eJ.jsx)(si.Provider,{value:i,children:t(r)})},ss=()=>{let e=(0,F.useContext)(si);if(!e)throw Error("useRouter must be used within a Router");return e},sa=()=>{let e=ss();return(0,eJ.jsxs)("div",{className:"dt-flex dt-h-full dt-flex-1 dt-flex-col dt-items-center dt-justify-center dt-px-4",children:[(0,eJ.jsx)("div",{className:(0,oj.Z)(oH.Icon.Secondary),children:(0,eJ.jsx)(oV.Bell,{width:24,height:24})}),(0,eJ.jsx)("h3",{className:(0,oj.Z)("dt-pb-2 dt-pt-6 dt-text-center dt-text-h2 dt-font-semibold",oH.Text.Primary),children:"You don’t have any notifications yet"}),(0,eJ.jsx)("p",{className:(0,oj.Z)("dt-mb-6 dt-text-center dt-text-text dt-font-normal",oH.Text.Secondary),children:"Enable your wallet to receive notifications."}),(0,eJ.jsxs)(oG,{type:"Primary",size:"large",stretch:!0,onClick:()=>e.setRoute("settings"),children:[(0,eJ.jsx)(oV.Settings,{})," Set up notifications"]})]})},sl=(0,F.createContext)({list:[],map:{}}),su=e=>(0,F.useContext)(sl).map[e],sc=({onClick:e,disabled:t,label:r,loading:n})=>(0,eJ.jsx)(oG,{size:"medium",type:t?"Secondary":"Primary",disabled:t,onClick:e,loading:n,children:r}),sd=e=>new URL(e).hostname===window.location.hostname?"_self":"_blank",sh=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0}),sf=(e,t)=>e?"string"==typeof e?e:e[t||"light"]:void 0,sp=({url:e,label:t="Open Link",styles:r})=>(0,eJ.jsx)("a",{href:e,target:sd(e),className:(0,oj.Z)("dt-flex dt-flex-row dt-items-center dt-gap-0.5 dt-text-subtext dt-font-semibold"),rel:"noreferrer",children:(0,eJ.jsxs)(o2,{color:sf(r.linkColor),children:[t,(0,eJ.jsx)(oV.ArrowRight,{width:12,height:12})]})}),sg=e=>{let t=sw(e.metadata?.notificationTypeHumanReadableId);return(0,eJ.jsxs)("div",{className:(0,oj.Z)(oH.Stroke.Primary,"dt-relative dt-flex dt-flex-row dt-items-center dt-gap-4 dt-overflow-hidden dt-border-b dt-px-4 dt-py-3"),children:[(0,eJ.jsx)(sg.Icon,{styles:t,isActionable:!!e.metadata?.smartMessage,overrideIconUrl:e.metadata?.smartMessage?.content.layout.icon}),(0,eJ.jsxs)("div",{className:"dt-min-w-0",children:[(0,eJ.jsx)(sg.ActionStatus,{action:e.metadata?.smartMessage}),(0,eJ.jsx)(sg.Title,{children:e.metadata?.title}),(0,eJ.jsx)(sg.Text,{children:e.text}),(0,eJ.jsx)(sg.Actions,{styles:t,action:e.metadata?.smartMessage}),(0,eJ.jsx)(sg.Timestamp,{timestamp:e.timestamp})]})]})};sg.Timestamp=function({timestamp:e}){return(0,eJ.jsx)("div",{className:(0,oj.Z)("dt-mt-3 dt-text-caption",oH.Text.Tertiary),children:sh.format(e.getTime())})};var sm=/(https?:\/\/|www\.)([-\w.]+\/[\p{L}\p{Emoji}\p{Emoji_Component}!#$%&'"()*+,./\\:;=_?@[\]~-]*[^\s'",.;:\b)\]}?]|(([\w-]+\.)+[\w-]+[\w/-]))/u;sg.Text=function({children:e}){let t=(0,F.useMemo)(()=>(0,eJ.jsx)(oU,{regex:sm,component:(e,t)=>(0,eJ.jsx)("a",{href:e,target:sd(e),className:"dt-font-medium dt-underline",children:e.length>32?`${e.slice(0,32)}...`:e},t),children:e}),[e]);return(0,eJ.jsx)("div",{className:(0,oj.Z)(oH.Text.Primary,"dt-whitespace-pre-wrap dt-break-words dt-text-subtext"),children:t})},sg.Title=function({children:e}){return e?(0,eJ.jsx)("div",{className:(0,oj.Z)(oH.Text.Primary,"dt-mb-1 dt-whitespace-pre-wrap dt-break-words dt-text-text dt-font-semibold"),children:e}):null},sg.Icon=function({overrideIconUrl:e,styles:t,isActionable:r}){return(0,eJ.jsxs)(eJ.Fragment,{children:[(0,eJ.jsx)("div",{className:"dt-pointer-events-none dt-absolute -dt-bottom-[36%] -dt-top-[36%] dt-left-0 dt-w-[240px] -dt-translate-x-1/2 dt-transform",style:{background:r&&t.actionGradientStartColor?`radial-gradient(50% 50% at 50% 50%, ${sf(t.actionGradientStartColor)} 0%, transparent 100%)`:"transparent"}}),(0,eJ.jsx)("div",{className:"dt-relative",children:e?(0,eJ.jsx)("div",{className:(0,oj.Z)("dt-h-8 dt-w-8 dt-overflow-hidden dt-border",oH.Radius.XSmall,oH.Stroke.Primary),children:(0,eJ.jsx)("img",{src:e,alt:"",className:"dt-h-full dt-w-full dt-object-cover"})}):(0,eJ.jsx)("div",{className:(0,oj.Z)("dt-h-8 dt-w-8 dt-rounded-full dt-p-1.5"),style:{background:sf(t.iconBackgroundBackdropColor)},children:(0,eJ.jsx)("div",{className:(0,oj.Z)("dt-flex dt-h-full dt-w-full dt-items-center dt-justify-center dt-rounded-full"),style:{background:sf(t.iconBackgroundColor),color:sf(t.iconColor)},children:t.Icon})})})]})},sg.Actions=function({action:e,styles:t}){let{handleSmartMessageAction:r,isInitiatingSmartMessage:n,handleSmartMessageCancel:i,isCancellingSmartMessage:o}=o7(),s=(0,F.useMemo)(()=>e?.content.layout.elements.flat()??[],[e]);return e?(0,eJ.jsxs)("div",{className:"dt-mt-3",children:[(0,eJ.jsx)("div",{className:"dt-flex dt-flex-row dt-items-center dt-gap-2",children:s.map((s,a)=>{if("label"===s.type)return(0,eJ.jsx)(sc,{label:s.text,disabled:!0},`label-${a}`);if("SIGN_TRANSACTION"===s.action.type){let t=s.action;return(0,eJ.jsx)(sc,{label:s.text,disabled:o||n,loading:n,onClick:()=>r(e.id,t.humanReadableId)},`button-sign-${a}`)}return"CANCEL"===s.action.type?(0,eJ.jsx)(sc,{label:s.text,disabled:o||n,loading:o,onClick:()=>i(e.id)},`button-cancel-${a}`):(0,eJ.jsx)(sp,{url:s.action.link,styles:t,label:s.text},`button-link-${a}`)})}),e.content.layout.description&&(0,eJ.jsx)("div",{className:(0,oj.Z)("dt-mt-3 dt-text-caption",oH.Text.Secondary),children:e.content.layout.description})]}):null};var sy=e=>{switch(e){case"SUCCEEDED":return"success";case"FAILED":return"error";default:return"default"}},sv={CREATED:"Ready",READY_FOR_EXECUTION:"Executing",EXECUTING:"Executing",SUCCEEDED:"Succeeded",FAILED:"Failed",CANCELED:"Canceled"};sg.ActionStatus=function({action:e}){return!e||e.content.layout.elements.flat().every(e=>"button"===e.type&&e.action.type===nY.OpenLink)?null:(0,eJ.jsx)("div",{className:"dt-mb-2",children:(0,eJ.jsx)(oZ,{variant:sy(e.content.state),children:sv[e.content.state]})})};var sb={Icon:(0,eJ.jsx)(oV.Bell,{width:12,height:12}),iconColor:"var(--dt-icon-primary)",iconBackgroundColor:"var(--dt-bg-brand)",iconBackgroundBackdropColor:"var(--dt-brand-transparent)",linkColor:"var(--dt-accent-brand)",actionGradientStartColor:"transparent"},sw=e=>e?o$[e]??sb:sb;sg.Container=function({id:e}){let t=su(e);return t?(0,eJ.jsx)(sg,{...t}):null};var sx=({children:e})=>(0,eJ.jsx)("div",{className:"dt-flex dt-flex-col",children:e});sx.Container=function({messages:e}){let t=(0,F.useMemo)(()=>({list:e.map(e=>e.id),map:Object.fromEntries(e.map(e=>[e.id,e]))}),[e]);return(0,eJ.jsx)(sl.Provider,{value:t,children:(0,eJ.jsx)(sx,{children:e.map(e=>(0,eJ.jsx)(sg.Container,{id:e.id},e.id))})})};var sE=()=>(0,eJ.jsxs)("div",{className:"dt-flex dt-h-full dt-flex-1 dt-flex-col dt-items-center dt-justify-center dt-px-4",children:[(0,eJ.jsx)("div",{className:(0,oj.Z)(oH.Icon.Secondary),children:(0,eJ.jsx)(oV.Loader,{width:24,height:24})}),(0,eJ.jsx)("h3",{className:(0,oj.Z)("dt-pb-2 dt-pt-6 dt-text-h2 dt-font-semibold",oH.Text.Primary),children:"Loading your notifications"})]}),sk=({children:e,isEmpty:t,isLoading:r})=>r?(0,eJ.jsx)(sE,{}):t?(0,eJ.jsx)(sa,{}):e;sk.Container=function(){let{messages:e,isMessagesLoading:t,markAsRead:r}=oI();return(0,F.useEffect)(()=>{e.length>0&&r()},[e.length,r]),(0,eJ.jsx)(sk,{isEmpty:0===e.length,isLoading:t,children:(0,eJ.jsx)(sx.Container,{messages:e})})};var sS=(0,F.createContext)(null),sT=({children:e,props:t})=>(0,eJ.jsx)(sS.Provider,{value:t,children:e}),sM=()=>{let e=(0,F.useContext)(sS);if(!e)throw Error("useExternalProps must be used within a ExternalPropsProvider");return e},sA=()=>{let{setOpen:e}=sM(),{setRoute:t}=ss();return(0,eJ.jsx)(o4,{title:"Notifications",showBackButton:!1,showSettingsButton:!0,showCloseButton:!!e,onSettingsClick:()=>t("settings"),onCloseClick:()=>e?.(!1)})},sP=()=>(0,eJ.jsxs)("div",{className:"dt-flex dt-h-full dt-flex-col",children:[(0,eJ.jsx)(sA,{}),(0,eJ.jsx)("section",{className:"dt-h-full dt-overflow-y-auto",children:(0,eJ.jsx)(sk.Container,{})})]}),sC=()=>(0,eJ.jsxs)("div",{className:"dt-flex dt-flex-col dt-items-center dt-justify-center dt-gap-2.5",children:[(0,eJ.jsxs)("div",{className:(0,oj.Z)("dt-inline-flex dt-items-center dt-justify-center dt-px-2 dt-py-1 dt-text-caption",oH.Radius.Large,oH.Background.Secondary,oH.Text.Tertiary),children:["Powered By"," ",(0,eJ.jsx)("a",{href:"https://dialect.to",target:"_blank",rel:"noreferrer",className:"hover:dt-text-inherit",children:(0,eJ.jsx)(oF,{className:"-dt-mt-[1px] dt-ml-[3px]"})})]}),(0,eJ.jsx)("div",{className:"dt-flex dt-items-center dt-justify-center",children:(0,eJ.jsxs)("span",{className:(0,oj.Z)("dt-text-caption",oH.Text.Tertiary),children:["2.1.4"," / ","2.1.0"]})})]}),s_=({enabled:e,onChange:t})=>(0,eJ.jsx)(o1,{checked:e,onChange:t,children:`Notifications ${e?"On":"Off"}`}),sI=RegExp("^\\S+@\\S+\\.\\S+$"),sO=({dappAddress:e})=>{let{globalAddress:t,create:r,delete:n,update:i,isCreatingAddress:o,isUpdatingAddress:s,isDeletingAddress:a,isSendingCode:l,isVerifyingCode:u,errorFetching:c}=oS({addressType:rm.Email}),{enabled:d,toggleSubscription:h,isToggling:f}=oT({addressType:rm.Email,dappAddress:e}),[p,g]=(0,F.useState)(t?.value||""),m=(0,F.useMemo)(()=>sI.test(p),[p]),y=(0,F.useMemo)(()=>!p,[p]),[v,b]=(0,F.useState)(!1);(0,F.useEffect)(()=>{(y||m)&&b(!1)},[y,m]);let[w,x]=(0,F.useState)(null),[E,k]=(0,F.useState)(!1),S=!!t,T=!!t?.verified,M=o||s||a||l||u||f,A=w||c,P=(0,F.useCallback)(async()=>{try{await i({value:p}),x(null)}catch(e){x(e)}},[p,i]),C=(0,F.useCallback)(async()=>{try{let e=await r({value:p});await h({enabled:!0,address:e}),x(null)}catch(e){x(e)}},[r,p,h]),_=(0,F.useCallback)(async()=>{try{await n(),g(""),k(!1),x(null)}catch(e){x(e)}},[n]),I=async e=>{try{await h({enabled:e}),x(null)}catch(e){x(e)}},O=t?.value!==p&&S,L=(0,F.useCallback)(()=>y?null:M?(0,eJ.jsx)("div",{className:(0,oj.Z)(oH.Icon.Tertiary,"dt-p-2"),children:(0,eJ.jsx)(oV.Loader,{})}):E?(0,eJ.jsx)(oG,{onClick:_,type:"Destructive",children:"Delete"}):O?(0,eJ.jsx)(oG,{onClick:()=>{m?P():b(!0)},disabled:!m,children:"Submit"}):T?(0,eJ.jsx)(oY,{className:"dt-p-2 "+oH.Icon.Tertiary,onClick:()=>k(!0),icon:(0,eJ.jsx)(oV.Trash,{})}):(0,eJ.jsx)(oG,{onClick:()=>{m?C():b(!0)},disabled:!m,children:"Submit"}),[_,y,m,M,E,O,T,C,P]);return(0,eJ.jsxs)("div",{children:[(0,eJ.jsx)(oQ,{label:"Email",placeholder:"Enter your Email",id:"settings-email",value:p,error:v,disabled:M||E,onChange:e=>{g(e.target.value)},onBlur:()=>b(!y&&!m),rightAdornment:L()}),S&&T&&!O&&!E&&(0,eJ.jsx)("div",{className:"dt-mt-2",children:(0,eJ.jsx)(s_,{enabled:d,onChange:I})}),v&&(0,eJ.jsx)("p",{className:(0,oj.Z)(oH.Text.Error,"dt-mt-2 dt-text-caption"),children:"Please enter a valid Email"}),A&&(0,eJ.jsx)("p",{className:(0,oj.Z)(oH.Text.Error,"dt-mt-2 dt-text-caption"),children:A.message}),E&&(0,eJ.jsxs)("div",{className:"dt-mt-2 dt-flex dt-flex-col dt-gap-2",children:[(0,eJ.jsx)("p",{className:(0,oj.Z)(oH.Text.Tertiary,"dt-text-caption"),children:"Deleting your email here will delete it across all dapps you’ve signed up."}),(0,eJ.jsxs)(o2,{disabled:M,onClick:()=>k(!1),children:[(0,eJ.jsx)(oV.Xmark,{height:12,width:12}),"Cancel"]})]}),O&&(0,eJ.jsxs)("div",{className:"dt-mt-2 dt-flex dt-flex-col dt-gap-2",children:[(0,eJ.jsx)("p",{className:(0,oj.Z)(oH.Text.Tertiary,"dt-text-caption"),children:"Updating your email here will update it across all dapps you’ve signed up."}),(0,eJ.jsxs)(o2,{disabled:M,onClick:()=>{g(t?.value||"")},children:[(0,eJ.jsx)(oV.Xmark,{height:12,width:12}),"Cancel"]})]})]})},sL=e=>{let[t,r]=(0,F.useState)(""),[n,i]=(0,F.useState)(null),{verify:o,resend:s,isSendingCode:a,isVerifyingCode:l,delete:u}=oS({addressType:e}),c=async()=>{try{await o({code:t}),i(null)}catch(e){i(e)}finally{r("")}};return{verificationCode:t,setVerificationCode:r,sendCode:c,isSendingCode:l,resendCode:async()=>{try{await s(),i(null)}catch(e){i(e)}},isResendingCode:a,deleteAddress:async()=>{try{await u(),i(null)}catch(e){i(e)}},currentError:n}},sR=RegExp("^[0-9]{6}$"),sj=({email:e})=>{let{verificationCode:t,setVerificationCode:r,sendCode:n,resendCode:i,isSendingCode:o,isResendingCode:s,deleteAddress:a,currentError:l}=sL(rm.Email),u=(0,F.useMemo)(()=>sR.test(t),[t]),c=o||s;return(0,eJ.jsxs)("div",{children:[(0,eJ.jsx)(oQ,{id:"settings-verification-code-email",placeholder:"Enter verification code",label:"Email",type:"text",value:t,onChange:e=>r(e.target.value),rightAdornment:c?(0,eJ.jsx)("div",{className:(0,oj.Z)(oH.Icon.Tertiary,"dt-p-2"),children:(0,eJ.jsx)(oV.Loader,{})}):(0,eJ.jsx)(oG,{onClick:u?n:void 0,disabled:!u,children:"Submit"})}),l&&(0,eJ.jsx)("p",{className:(0,oj.Z)(oH.Text.Error,"dt-mt-2 dt-text-caption"),children:l.message}),(0,eJ.jsxs)("div",{className:"dt-mt-2 dt-flex dt-flex-col dt-gap-2",children:[(0,eJ.jsxs)("p",{className:(0,oj.Z)(oH.Text.Tertiary,"dt-text-caption"),children:["Check your ",(0,eJ.jsxs)("span",{className:oH.Text.Primary,children:[e," "]}),"inbox for a verification code."]}),(0,eJ.jsxs)("div",{className:"dt-flex dt-flex-row dt-items-center dt-gap-8",children:[(0,eJ.jsxs)(o2,{onClick:a,disabled:c,children:[(0,eJ.jsx)(oV.Xmark,{height:12,width:12}),"Cancel"]}),(0,eJ.jsxs)(o2,{onClick:i,disabled:c,children:[(0,eJ.jsx)(oV.Resend,{height:12,width:12}),"Resend Code"]})]})]})]})},sB=()=>{let{dappAddress:e}=oc(),{globalAddress:t}=oS({addressType:rm.Email}),r=!!t?.verified;return(0,eJ.jsx)("div",{children:t&&!r?(0,eJ.jsx)(sj,{email:t?.value??""}):(0,eJ.jsx)(sO,{dappAddress:e})})},sN=({dappAddress:e})=>{let{globalAddress:t,create:r,delete:n,update:i,isCreatingAddress:o,isUpdatingAddress:s,isDeletingAddress:a,isSendingCode:l,isVerifyingCode:u,errorFetching:c}=oS({addressType:rm.Telegram}),{enabled:d,toggleSubscription:h,isToggling:f}=oT({addressType:rm.Telegram,dappAddress:e}),[p,g]=(0,F.useState)(t?.value||""),[m,y]=(0,F.useState)(null),[v,b]=(0,F.useState)(!1),w=!!t,x=!!t?.verified,E=o||s||a||l||u||f,k=m||c;(0,F.useEffect)(()=>{g(t?.value||"")},[w,t?.value]);let S=async()=>{try{await i({value:p}),y(null),b(!1)}catch(e){y(e)}},T=async()=>{try{let e=p.replace("@",""),t=await r({value:e});await h({enabled:!0,address:t}),y(null)}catch(e){y(e)}},M=async()=>{try{await n(),g(""),b(!1),y(null)}catch(e){y(e)}},A=async e=>{try{await h({enabled:e}),y(null)}catch(e){y(e)}},P=t?.value!==p&&w;return(0,eJ.jsxs)("div",{children:[(0,eJ.jsx)(oQ,{label:"Telegram",placeholder:"Enter your Telegram @Username",id:"settings-telegram",value:p,disabled:E||v,onChange:e=>{g(e.target.value)},rightAdornment:p?E?(0,eJ.jsx)("div",{className:(0,oj.Z)(oH.Icon.Tertiary,"dt-p-2"),children:(0,eJ.jsx)(oV.Loader,{})}):v?(0,eJ.jsx)(oG,{onClick:M,type:"Destructive",children:"Delete"}):P?(0,eJ.jsx)(oG,{onClick:S,children:"Submit"}):x?(0,eJ.jsx)(oY,{className:"dt-p-2 "+oH.Icon.Tertiary,onClick:()=>b(!0),icon:(0,eJ.jsx)(oV.Trash,{})}):(0,eJ.jsx)(oG,{onClick:T,children:"Submit"}):null}),w&&x&&!P&&!v&&(0,eJ.jsx)("div",{className:"dt-mt-2",children:(0,eJ.jsx)(s_,{enabled:d,onChange:A})}),k&&(0,eJ.jsx)("p",{className:(0,oj.Z)(oH.Text.Error,"dt-mt-2 dt-text-caption"),children:k.message}),v&&(0,eJ.jsxs)("div",{className:"dt-mt-2 dt-flex dt-flex-col dt-gap-2",children:[(0,eJ.jsx)("p",{className:(0,oj.Z)(oH.Text.Tertiary,"dt-text-caption"),children:"Deleting your Telegram handle here will delete it across all dapps you’ve signed up."}),(0,eJ.jsxs)(o2,{onClick:()=>b(!1),children:[(0,eJ.jsx)(oV.Xmark,{height:12,width:12}),"Cancel"]})]}),P&&(0,eJ.jsxs)("div",{className:"dt-mt-2 dt-flex dt-flex-col dt-gap-2",children:[(0,eJ.jsx)("p",{className:(0,oj.Z)(oH.Text.Tertiary,"dt-text-caption"),children:"Updating your Telegram handle here will update it across all dapps you’ve signed up."}),(0,eJ.jsxs)(o2,{onClick:()=>{g(t?.value||"")},children:[(0,eJ.jsx)(oV.Xmark,{height:12,width:12}),"Cancel"]})]})]})},sD=RegExp("^[0-9]{6}$"),sK=({dappTelegramName:e})=>{let{config:{environment:t}}=ox(),{verificationCode:r,setVerificationCode:n,sendCode:i,isSendingCode:o,deleteAddress:s,currentError:a}=sL(rm.Telegram),l=e=>`https://t.me/${e}?start=${e}`,u="production"===t?l("DialectLabsBot"):l("DialectLabsDevBot"),c=(0,F.useMemo)(()=>e?l(e):u,[e,u]),d=(0,F.useMemo)(()=>sD.test(r),[r]);return(0,eJ.jsxs)("div",{children:[(0,eJ.jsx)(oQ,{id:"settings-verification-code-telegram",placeholder:"Enter verification code",label:"Telegram",type:"text",value:r,onChange:e=>n(e.target.value),rightAdornment:o?(0,eJ.jsx)("div",{className:(0,oj.Z)(oH.Icon.Tertiary,"dt-p-2"),children:(0,eJ.jsx)(oV.Loader,{})}):(0,eJ.jsx)(oG,{onClick:d?i:void 0,disabled:!d,children:"Submit"})}),a&&(0,eJ.jsx)("p",{className:(0,oj.Z)(oH.Text.Error,"dt-mt-2 dt-text-caption"),children:a.message}),(0,eJ.jsxs)("div",{className:"dt-mt-2 dt-flex dt-flex-col dt-gap-2",children:[(0,eJ.jsxs)("a",{className:(0,oj.Z)(oH.Text.Tertiary,"dt-text-caption"),href:c,target:"_blank",rel:"noreferrer",children:["Message",(0,eJ.jsx)("span",{className:oH.Text.Accent,children:" this bot "}),"on Telegram to get your verification code."]}),(0,eJ.jsxs)(o2,{onClick:s,disabled:o,children:[(0,eJ.jsx)(oV.Xmark,{height:12,width:12}),"Cancel"]})]})]})},sU=()=>{let{dappAddress:e}=oc(),{globalAddress:t}=oS({addressType:rm.Telegram}),r=!!t?.verified,{dapp:n}=oM();return(0,eJ.jsx)("div",{children:t&&!r?(0,eJ.jsx)(sK,{dappTelegramName:n?.telegramUsername??""}):(0,eJ.jsx)(sN,{dappAddress:e})})},sz=rm.Wallet,sF=()=>{let{dappAddress:e}=oc(),{wallet:{address:t}}=ox(),{thread:r,create:n,isCreatingThread:i,delete:o,isDeletingThread:s}=oP(),{refresh:a}=oO({revalidateOnMount:!1}),{globalAddress:l,create:u,delete:c,isCreatingAddress:d,isDeletingAddress:h}=oS({addressType:sz}),{enabled:f,toggleSubscription:p,isToggling:g}=oT({addressType:sz,dappAddress:e}),m=(0,F.useCallback)(async()=>{await o(),await c()},[c,o]),y=(0,F.useCallback)(async()=>{if(e)return n({me:{scopes:[r6.ADMIN]},otherMembers:[{address:e,scopes:[r6.WRITE]}],encrypted:!1})},[n,e]),v=(0,F.useCallback)(()=>u({value:t}),[u,t]),b=s||i||h||d||g,w=(0,F.useCallback)(async()=>{let e,t;if(b)return;let n=!l&&!r;r||(e=await y(),a()),l||(t=await v()),n&&e&&await p({enabled:!0,address:t})},[v,y,b,a,r,p,l]),x=r&&l,E=(0,F.useCallback)(()=>b?(0,eJ.jsx)("div",{className:(0,oj.Z)(oH.Icon.Tertiary,"dt-p-2"),children:(0,eJ.jsx)(oV.Loader,{})}):x?(0,eJ.jsx)(oY,{className:"dt-p-2 "+oH.Icon.Tertiary,onClick:m,icon:(0,eJ.jsx)(oV.Trash,{})}):(0,eJ.jsx)(oG,{onClick:w,children:"Enable"}),[m,b,x,w]);return(0,eJ.jsxs)("div",{className:"dt-flex dt-flex-col dt-gap-2",children:[(0,eJ.jsx)(oQ,{label:"In App",disabled:!0,value:function(e,t=4){let r=e.toString();return`${r.substring(0,t)}...${r.substring(r.length-t)}`}(t),rightAdornment:(0,eJ.jsx)(E,{})}),x&&(0,eJ.jsx)(s_,{enabled:f,onChange:e=>{if(!g)return p({enabled:e})}})]})},sW=({type:e})=>(0,eJ.jsx)("div",{className:"dt-py-2",children:(0,eJ.jsx)(()=>"email"===e?(0,eJ.jsx)(sB,{}):"telegram"===e?(0,eJ.jsx)(sU,{}):(0,eJ.jsx)(sF,{}),{})}),sV=(0,F.memo)(function({channels:e}){return(0,eJ.jsx)("div",{children:e.map(e=>(0,eJ.jsx)(sW,{type:e},e))})}),s$=({title:e,description:t,enabled:r,onChange:n})=>(0,eJ.jsxs)("div",{className:(0,oj.Z)(oH.Background.Tertiary,oH.Radius.Medium,"dt-flex dt-flex-row dt-items-center dt-justify-between dt-gap-3 dt-px-4 dt-py-3"),children:[(0,eJ.jsxs)("div",{className:"dt-flex dt-flex-col dt-gap-1",children:[(0,eJ.jsx)("span",{className:(0,oj.Z)(oH.Text.Primary,"dt-text-text dt-font-semibold"),children:e}),t&&(0,eJ.jsx)("span",{className:(0,oj.Z)(oH.Text.Tertiary,"dt-text-subtext dt-font-normal"),children:t})]}),(0,eJ.jsx)(oJ,{checked:r,onChange:n})]}),sH=(0,F.memo)(function(){let{dappAddress:e}=oc(),{subscriptions:t,update:r,isUpdating:n,errorUpdating:i,errorFetching:o}=oA({dappAddress:e}),s=o||i;return(0,eJ.jsxs)("div",{className:"dt-flex dt-flex-col dt-gap-2",children:[s&&(0,eJ.jsx)("p",{className:(0,oj.Z)(oH.Text.Error),children:s.message}),!!t.length&&(0,eJ.jsxs)(eJ.Fragment,{children:[(0,eJ.jsx)("p",{className:(0,oj.Z)(oH.Text.Tertiary,"dt-text-subtext dt-font-semibold"),children:"Notification Type"}),t.map(({notificationType:e,subscription:t})=>(0,eJ.jsx)(s$,{title:e.name,description:e.trigger,enabled:t.config.enabled,onChange:i=>{n||r({notificationTypeId:e.id,config:{...t.config,enabled:i}})}},e.id))]})]})}),sq=()=>(0,eJ.jsx)("div",{className:"dt-flex dt-h-full dt-flex-1 dt-flex-col dt-items-center dt-justify-center dt-px-4",children:(0,eJ.jsx)("div",{className:(0,oj.Z)(oH.Icon.Secondary),children:(0,eJ.jsx)(oV.Loader,{width:24,height:24})})}),sZ=()=>(0,eJ.jsx)("div",{children:(0,eJ.jsxs)("p",{className:(0,oj.Z)(oH.Text.Tertiary,"dt-text-center dt-text-caption"),children:["By enabling notifications you agree to Dialect's"," ",(0,eJ.jsx)(o0,{target:"_blank",rel:"noreferrer",url:"https://www.dialect.to/tos",children:"Terms of Service"})," ","and"," ",(0,eJ.jsx)(o0,{target:"_blank",rel:"noreferrer",url:"https://www.dialect.to/privacy",children:"Privacy Policy"})]})}),sG=()=>{let{dappAddress:e}=oc(),t=oT({addressType:rm.Wallet,dappAddress:e}),{isFetching:r}=oA({dappAddress:e}),n=t.isFetchingSubscriptions||r,{channels:i}=sM();return n?(0,eJ.jsx)(sq,{}):(0,eJ.jsxs)("div",{className:"dt-flex dt-h-full dt-flex-col",children:[(0,eJ.jsx)("div",{className:"dt-px-4 dt-py-3",children:(0,eJ.jsx)(sV,{channels:i})}),(0,eJ.jsx)("div",{className:"dt-px-4",children:(0,eJ.jsx)(sH,{})}),(0,eJ.jsx)("div",{className:"dt-flex-1"}),(0,eJ.jsxs)("div",{className:(0,oj.Z)("dt-flex dt-flex-col dt-gap-2 dt-px-4 dt-py-4",oH.Stroke.Primary),children:[(0,eJ.jsx)(sZ,{}),(0,eJ.jsx)(sC,{})]})]})},sJ=()=>{let{setOpen:e}=sM(),{setRoute:t}=ss();return(0,eJ.jsx)(o4,{title:"Notifications Settings",showBackButton:!0,showSettingsButton:!1,showCloseButton:!!e,onBackClick:()=>t("notifications"),onCloseClick:()=>e?.(!1)})},sY=()=>(0,eJ.jsxs)("div",{className:"dt-flex dt-h-full dt-flex-col",children:[(0,eJ.jsx)(sJ,{}),(0,eJ.jsx)("section",{className:"dt-h-full dt-overflow-y-scroll",children:(0,eJ.jsx)(sG,{})})]}),sX=["wallet","telegram","email"],sQ=({channels:e=sX,open:t,setOpen:r,theme:n}={channels:sX})=>{let i=(0,F.useMemo)(()=>({open:t,setOpen:r,theme:n,channels:Array.from(new Set(e))}),[t,r,n,e]);return(0,eJ.jsx)(sT,{props:i,children:(0,eJ.jsx)("div",{className:(0,oj.Z)("dt-flex dt-h-full dt-w-full dt-flex-col",oH.Background.Primary),children:(0,eJ.jsx)(sn,{header:(0,eJ.jsx)(o4,{title:"Notifications",showBackButton:!1,showSettingsButton:!1,showCloseButton:!!r,onCloseClick:()=>r?.(!1)}),children:(0,eJ.jsx)(so,{initialRoute:"notifications",children:e=>(0,eJ.jsxs)(eJ.Fragment,{children:["settings"===e&&(0,eJ.jsx)(sY,{}),"notifications"===e&&(0,eJ.jsx)(sP,{})]})})})})})};(0,F.memo)(function(e){return(0,eJ.jsx)("div",{className:"dialect","data-theme":e.theme,children:(0,eJ.jsx)(sQ,{...e})})});var s0=["mousedown","touchstart"],s1=(e,t,r=s0)=>{let n=(0,F.useRef)(t);(0,F.useEffect)(()=>{n.current=t},[t]),(0,F.useEffect)(()=>{let t=t=>{let r=!1;e.forEach(e=>{let n=e.current;r=r||!!n?.contains(t.target)}),r||n.current(t)};for(let e of r)document.addEventListener(e,t);return()=>{for(let e of r)document.removeEventListener(e,t)}},[r,e])},s2=(0,F.forwardRef)(function(e,t){return e.open?(0,eJ.jsx)("div",{ref:t,className:"dt-modal",children:(0,eJ.jsx)(sQ,{...e})}):null}),s5=(0,F.forwardRef)(function({open:e,onClick:t,unread:r},n){return(0,eJ.jsx)("button",{ref:n,onClick:t,className:(0,oj.Z)("dt-group dt-relative dt-flex dt-h-10 dt-w-10 dt-items-center dt-justify-center dt-transition-colors dt-duration-200 dt-ease-in-out",oH.Background.Button.Secondary.Default,oH.Background.Button.Secondary.Hover,oH.Radius.Small),children:(0,eJ.jsxs)("div",{className:"dt-relative",children:[r&&(0,eJ.jsx)("span",{className:(0,oj.Z)("dt-absolute dt-right-0 dt-top-[1px] dt-h-2 dt-w-2 dt-rounded-full dt-border-2 dt-border-[--dt-button-secondary] dt-transition-colors dt-duration-200 dt-ease-in-out group-hover:dt-border-[--dt-button-secondary-hover]",oH.Background.AccentBrand)}),e?(0,eJ.jsx)(oV.BellButton,{}):(0,eJ.jsx)(oV.BellButtonOutline,{})]})})}),s6=({theme:e,children:t})=>(0,eJ.jsx)("div",{className:"dialect","data-theme":e,children:(0,eJ.jsx)("div",{className:(0,oj.Z)("dt-relative",oH.Text.Primary),children:t})});s6.Container=function({channels:e,renderModalComponent:t,children:r,theme:n}){let i=(0,F.useRef)(null),o=(0,F.useRef)(null),[s,a]=(0,F.useState)(!1),[l,u]=(0,F.useState)(1e4),{unreadCount:c,hasNotificationsThread:d}=oO({refreshInterval:l,revalidateOnFocus:!!l});(0,F.useEffect)(()=>{s||!d?u(0):u(1e4)},[d,s]),s1([i,o],()=>a(!1));let h=(0,F.useMemo)(()=>({open:s,setOpen:a,channels:e,theme:n}),[s,e,n]),f=(0,F.useCallback)(()=>a(e=>!e),[]);return(0,eJ.jsxs)(s6,{theme:n,children:[r?r({open:s,setOpen:a,unreadCount:c,ref:i}):(0,eJ.jsx)(s5,{ref:i,open:s,onClick:f,unread:c>0}),t?t({open:s,setOpen:a,ref:o,children:(0,eJ.jsx)(sQ,{...h})}):(0,eJ.jsx)(s2,{ref:o,...h})]})};var s3=(0,F.memo)(s6.Container),s4=["size","width","height"];function s8(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function s7(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s8(Object(r),!0).forEach(function(t){(0,j.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s8(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var s9=function(e){var t=e.size,r=void 0===t?16:t,n=e.width,i=e.height,o=(0,td.Z)(e,s4);return(0,eJ.jsx)("svg",s7(s7({"aria-hidden":"true",fill:"none",focusable:"false",height:r||i,role:"presentation",viewBox:"0 0 16 16",width:r||n},o),{},{children:(0,eJ.jsx)("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:.5,children:(0,eJ.jsx)("path",{d:"M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"})})}))},ae=r(34155);o$.listings_stopped={Icon:(0,eJ.jsx)(oV.Xmark,{width:12,height:12}),iconColor:"#FFFFFF",iconBackgroundColor:"#E50000",iconBackgroundBackdropColor:"#E500001A",linkColor:"#E50000",actionGradientStartColor:"#E500001A"},o$.listings_reactivated={Icon:(0,eJ.jsx)(s9,{width:12,height:12}),iconColor:"#FFFFFF",iconBackgroundColor:"#008000",iconBackgroundBackdropColor:"#0080001A",linkColor:"#008000",actionGradientStartColor:"#0080001A"},o$.bid_stopped={Icon:(0,eJ.jsx)(oV.Xmark,{width:12,height:12}),iconColor:"#FFFFFF",iconBackgroundColor:"#E50000",iconBackgroundBackdropColor:"#E500001A",linkColor:"#E50000",actionGradientStartColor:"#E500001A"},o$.bid_reactivated={Icon:(0,eJ.jsx)(s9,{width:12,height:12}),iconColor:"#FFFFFF",iconBackgroundColor:"#008000",iconBackgroundBackdropColor:"#0080001A",linkColor:"#008000",actionGradientStartColor:"#0080001A"};var at=function(e){var t;return(0,eJ.jsx)(oR,{dappAddress:"4X7bd297nuRuEQAuhcAnhNY4NiRNaQfQFNi8whcVuUJU",config:{environment:null!==(t=ae.env.NEXT_PUBLIC_ENVIRONMENT)&&void 0!==t?t:"production"},children:(0,eJ.jsx)(s3,{theme:e.theme})})},ar=r(84367),an=e8()((0,D.Z)(U().mark(function e(){return U().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.e(657).then(r.bind(r,93657));case 2:return e.abrupt("return",e.sent.WalletMultiButton);case 3:case"end":return e.stop()}},e)})),{ssr:!1,loadableGenerated:{webpack:function(){return[null]}}}),ai={background:"transparent",color:"#27272A",width:"auto",fontSize:"18px"},ao={background:"transparent",color:"#F4F4F5",width:"auto",fontSize:"18px"},as=function(){var e=(0,F.useState)(1),t=e[0],r=e[1],n=(0,F.useState)(0),i=n[0],o=n[1],s=(0,F.useState)("drop-shadow(0px 0px 0px black)"),a=s[0],l=s[1],u=(0,F.useState)("translate(0px, 0px) scale(1)"),c=u[0],d=u[1],h=(0,F.useState)(!0),f=h[0],p=h[1];return(0,F.useEffect)(function(){var e,t=function(){if(f){var e=setInterval(function(){var e="drop-shadow(".concat(6*Math.random()-3,"px ").concat(6*Math.random()-3,"px 4px currentColor)"),t="translate(".concat(10*Math.random()-5,"px, ").concat(10*Math.random()-5,"px) scale(").concat(.3*Math.random()+.85,")");r(.6*Math.random()+.4),o(Math.floor(180*Math.random()-90)),l(e),d(t),setTimeout(function(){r(1),o(0),l("drop-shadow(0px 0px 0px currentColor)"),d("translate(0px, 0px) scale(1)")},100)},100);setTimeout(function(){clearInterval(e),r(1),o(0),l("drop-shadow(0px 0px 0px currentColor)"),d("translate(0px, 0px) scale(1)")},5e3)}else r(1),o(0),l("drop-shadow(0px 0px 0px currentColor)"),d("translate(0px, 0px) scale(1)")};return e=setInterval(function(){p(!f),t()},f?1e3:1e4),function(){return clearInterval(e)}},[f]),(0,eJ.jsx)("div",{className:"absolute block h-8 w-8 pt-2",style:{opacity:t,filter:"hue-rotate(".concat(i,"deg) ").concat(a),transform:c,transition:"opacity 0.1s, filter 0.1s, transform 0.1s"},children:(0,eJ.jsx)("svg",{width:"215%",height:"160%",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"227.951 115 94.1 129.6",children:(0,eJ.jsx)("path",{d:"M227.951 115v50.83h41.334v4.329l-41.334.002v74.426h24.031l18.29-18.29-10.51-10.51 10.51-10.51-3.073-3.071-13.58 13.582 5.958 5.96-12.024 12.025h-8.786v-52.797h72.466v52.796h-8.783l-12.026-12.026 5.96-5.96-13.585-13.581-3.072 3.07 10.512 10.512-10.512 10.51 18.291 18.29h24.03v-74.426h-41.333v-4.329h41.334V115zm83.282 40.015h-72.466v-29.972h72.466zm-47.84-15.782a5.44 5.44 0 0 1-.316 1.822 5.261 5.261 0 0 1-.322.727 5.372 5.372 0 0 1-1.339 1.631 5.432 5.432 0 0 1-2.116 1.065 5.418 5.418 0 0 1-3.626-.357 5.477 5.477 0 0 1-1.119-.708 5.406 5.406 0 0 1 1.361-9.176 5.272 5.272 0 0 1 1.015-.308 5.367 5.367 0 0 1 1.848-.045 5.369 5.369 0 0 1 1.987.71 5.448 5.448 0 0 1 1.4 1.208 5.432 5.432 0 0 1 1.065 2.117 5.418 5.418 0 0 1 .163 1.314zm34.029 0a5.44 5.44 0 0 1-.412 2.07 5.475 5.475 0 0 1-.816 1.36 5.406 5.406 0 0 1-9.176-1.36 5.272 5.272 0 0 1-.308-1.015 5.367 5.367 0 0 1-.045-1.849 5.369 5.369 0 0 1 .58-1.755 5.372 5.372 0 0 1 1.339-1.631 5.432 5.432 0 0 1 2.116-1.066 5.418 5.418 0 0 1 3.626.357 5.477 5.477 0 0 1 1.119.709 5.406 5.406 0 0 1 1.977 4.18zm-31.258 76.553 8.834-8.834 8.835 8.835L275 224.62z",fill:"currentColor"})})})},aa=new z.Connection("https://joyous-brynn-fast-mainnet.helius-rpc.com"),al=function(){var e=(0,e$.O)(),t=e.publicKey,r=e.connected,n=e3(),i=n.isNavOpen,o=n.setIsNavOpen,s=(0,tn.F)(),a=s.theme,l=s.setTheme,u=window.matchMedia("(prefers-color-scheme: dark)").matches,c=(0,F.useState)(0),d=c[0],h=c[1];return(0,F.useEffect)(function(){if(t){var e,r=(e=(0,D.Z)(U().mark(function e(){return U().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,aa.getBalance(t);case 3:h(e.sent),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.error("Error fetching balance:",e.t0);case 10:case"end":return e.stop()}},e,null,[[0,7]])})),function(){return e.apply(this,arguments)});r();var n=setInterval(r,6e4);return function(){return clearInterval(n)}}},[t,aa]),(0,F.useEffect)(function(){var e=localStorage.getItem("theme");e&&l(e)},[l]),(0,F.useEffect)(function(){var e=localStorage.getItem("theme");if(e)l(e);else{var t=u?"dark":"light";localStorage.setItem("theme",t),l(t)}},[u,l]),(0,eJ.jsx)("div",{children:(0,eJ.jsxs)("div",{className:"navbar flex h-14 flex-row lg:mb-2 shadow-lg text-neutral-content border-b border-zinc-600 bg-opacity-66",children:[(0,eJ.jsx)("div",{className:"lg:navbar-start align-items-center",children:(0,eJ.jsx)("div",{className:"hidden lg:inline w-20 h-20 p-2",children:(0,eJ.jsxs)(tr(),{href:"/",rel:"noopener noreferrer",passHref:!0,className:"hover:text-default-800 text-default-600",children:[(0,eJ.jsx)(as,{}),(0,eJ.jsx)("div",{className:"relative h-11 w-14 pr-6",children:(0,eJ.jsx)("svg",{width:"220%",height:"245%",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 130 550 340",children:(0,eJ.jsxs)("g",{"data-paper-data":"{&quotisGlobalGroup&quot:true,&quotbounds&quot:{&quotx&quot:170.09719746002898,&quoty&quot:114.99999999999997,&quotwidth&quot:209.80560507994207,&quotheight&quot:240.00000000000003}}","fill-rule":"nonzero",fill:"currentColor","stroke-miterlimit":"10","font-family":"none","font-weight":"none","font-size":"none","text-anchor":"none",children:[(0,eJ.jsx)("g",{"data-paper-data":"{&quotisSecondaryText&quot:true}"}),(0,eJ.jsxs)("g",{"data-paper-data":"{&quotisPrimaryText&quot:true}",children:[(0,eJ.jsx)("path",{d:"m205.011 318.971-6.003-6.295c-.117-.175-.35-.233-.525-.233h-.058c-.175 0-.408.058-.525.233a8.433 8.433 0 0 1-2.564 2.157c-1.166.641-2.623.99-4.255.99-1.458 0-2.74-.29-3.906-.815-1.224-.525-2.215-1.283-3.089-2.273a10.165 10.165 0 0 1-1.982-3.498c-.524-1.34-.757-2.914-.757-4.546 0-1.632.233-3.148.757-4.488.467-1.34 1.166-2.565 2.04-3.556.816-.932 1.866-1.748 3.09-2.273a9.162 9.162 0 0 1 3.963-.874c1.34 0 2.623.291 3.906.816.932.466 1.806 1.049 2.448 1.807.174.175.35.291.582.291a.739.739 0 0 0 .525-.233l6.062-6.353a.985.985 0 0 0 .175-.583.985.985 0 0 0-.175-.583c-1.574-1.632-3.556-2.914-5.829-3.789-2.623-.99-5.304-1.515-7.985-1.515-2.915 0-5.654.524-8.16 1.515-2.507.991-4.722 2.39-6.587 4.255-1.923 1.865-3.38 4.139-4.43 6.762-1.107 2.622-1.632 5.595-1.632 8.8 0 3.148.525 6.063 1.574 8.686 1.05 2.623 2.506 4.896 4.372 6.761 1.806 1.924 4.021 3.38 6.528 4.43 2.506.99 5.246 1.515 8.16 1.515 3.264 0 6.178-.582 8.626-1.807 2.215-1.049 4.08-2.448 5.713-4.196.233-.292.233-.816-.059-1.108z","data-paper-data":"{&quotglyphName&quot:&quotC&quot,&quotglyphIndex&quot:0,&quotfirstGlyphOfWord&quot:true,&quotword&quot:1}"}),(0,eJ.jsx)("path",{d:"M259.364 283.358h-9.326a.982.982 0 0 0-.99.99v16.03h-12.416v-16.03c0-.524-.466-.99-.99-.99h-8.919c-.524 0-.99.466-.99.99v40.743c0 .525.466.991.99.991h8.918c.525 0 .991-.466.991-.99v-14.456h12.416v14.455c0 .525.408.991.99.991h9.326c.525 0 .991-.466.991-.99v-40.743c0-.525-.466-.991-.99-.991z","data-paper-data":"{&quotglyphName&quot:&quotH&quot,&quotglyphIndex&quot:1,&quotword&quot:1}"}),(0,eJ.jsx)("path",{d:"m324.326 325.033-15.913-41.209c-.116-.291-.35-.466-.583-.466h-9.034c-.292 0-.525.175-.641.466l-16.088 41.268a.975.975 0 0 0 .059.699c.116.175.35.291.583.291h10.083c.292 0 .525-.174.641-.466l2.623-7.636h13.931l2.856 7.636c.058.292.35.466.583.466h10.317c.408 0 .7-.291.7-.699 0-.117-.059-.233-.117-.35zm-17.37-16.495h-7.752l3.905-11.308z","data-paper-data":"{&quotglyphName&quot:&quotA&quot,&quotglyphIndex&quot:2,&quotword&quot:1}"}),(0,eJ.jsx)("path",{d:"M377.98 294.49c-1.341-2.739-3.09-4.954-5.188-6.586-2.099-1.632-4.547-2.798-7.286-3.497a31.528 31.528 0 0 0-8.102-1.05H343.59c-.408 0-.7.35-.7.7v41.326c0 .408.292.7.7.7h14.222a26.83 26.83 0 0 0 7.985-1.225 20.566 20.566 0 0 0 7.111-3.847c2.099-1.748 3.789-4.021 5.071-6.761 1.283-2.681 1.924-5.945 1.924-9.617 0-4.022-.641-7.403-1.924-10.142zm-24.19-1.165h3.38c1.516 0 3.032.175 4.43.524 1.4.35 2.682.991 3.73 1.866 1.108.816 1.983 1.981 2.624 3.38.641 1.458.99 3.323.99 5.538 0 2.156-.349 4.021-.99 5.479-.641 1.399-1.516 2.564-2.623 3.439-1.108.874-2.332 1.515-3.789 1.865a17.224 17.224 0 0 1-4.604.641h-3.148z","data-paper-data":"{&quotglyphName&quot:&quotD&quot,&quotglyphIndex&quot:3,&quotlastGlyphOfWord&quot:true,&quotword&quot:1}"})]})]})})})]})})}),(0,eJ.jsxs)("div",{className:"text-default-800 navbar-start lg:navbar-end",children:[(0,eJ.jsxs)("div",{className:"hidden lg:inline-flex align-items-center justify-items gap-3",children:[(0,eJ.jsx)(t5,{label:"Home",href:"/",navigationStarts:function(){return o(!1)}}),(0,eJ.jsx)(ar.j,{orientation:"vertical",className:"mt-0 h-7"}),(0,eJ.jsx)(t5,{label:"Discovery",href:"/discovery",navigationStarts:function(){return o(!1)}}),(0,eJ.jsx)(ar.j,{orientation:"vertical",className:"mt-0 h-7"}),(0,eJ.jsx)(t5,{label:"Bids",href:"/bids",navigationStarts:function(){return o(!1)}}),(0,eJ.jsx)(ar.j,{orientation:"vertical",className:"mt-0 h-7"}),(0,eJ.jsx)(t5,{label:"Listings",href:"/listings",navigationStarts:function(){return o(!1)}}),(0,eJ.jsx)(ar.j,{orientation:"vertical",className:"mt-0 h-7"}),(0,eJ.jsx)(t5,{label:"Leaderboard",href:"/leaderboard",navigationStarts:function(){return o(!1)}}),(0,eJ.jsx)(ar.j,{orientation:"vertical",className:"mt-0 h-7"}),(0,eJ.jsx)(t5,{label:"Help",href:"/help",navigationStarts:function(){return o(!1)}})]}),(0,eJ.jsx)("label",{htmlFor:"my-drawer",className:"text-default-800 btn-gh items-center justify-between lg:hidden",onClick:function(){return o(!i)},children:(0,eJ.jsx)("div",{className:"flex items-center justify-center w-[30px] h-[30px]",children:(0,eJ.jsxs)("div",{className:"relative w-3 h-6",children:[(0,eJ.jsx)("span",{className:"absolute h-0.5 w-8 bg-default-800 transform transition-all duration-300 ease-in-out ".concat(i?"rotate-45 top-3":"rotate-0 top-0")}),(0,eJ.jsx)("span",{className:"absolute h-0.5 w-8 bg-default-800 transform transition-all duration-300 ease-in-out ".concat(i?"opacity-0 left-1/2":"opacity-100 left-0"),style:{top:"50%",marginTop:"-1px"}}),(0,eJ.jsx)("span",{className:"absolute h-0.5 w-8 bg-default-800 transform transition-all duration-300 ease-in-out ".concat(i?"-rotate-45 top-3":"rotate-0 bottom-0")})]})})}),(0,eJ.jsx)("div",{children:(0,eJ.jsx)("span",{className:"item block ml-7 md:ml-6 h-14 w-0.5 bg-default-400"})}),(0,eJ.jsx)("div",{className:"item dropdown dropdown-start",children:r?(0,eJ.jsx)("div",{className:"ml-20 md:ml-0 group inline-flex items-right justify-between flex-row-reverse md:w-full w-[200px]",children:(0,eJ.jsxs)("div",{className:"flex",children:[(0,eJ.jsx)("div",{className:"item p-2 pr-2.5",children:(0,eJ.jsx)(at,{theme:a})}),(0,eJ.jsx)("span",{className:"item block h-14 w-0.5 bg-default-400"}),(0,eJ.jsx)("div",{className:"item pt-4 pl-2.5 pr-2.5 text-right w-[60px]",children:d>0?tk.lS(d,4):". . . . ."}),(0,eJ.jsx)("span",{className:"item block mt-5 h-4 w-0.5 bg-default-400"}),(0,eJ.jsx)("div",{className:"item md:inline-flex p-2",children:(0,eJ.jsx)(tQ,{})})]})}):(0,eJ.jsx)("div",{className:"md:inline-flex md:w-[165px] w-[200px]",children:(0,eJ.jsx)(an,{style:"dark"===a?ao:ai})})})]})]})})},au=function(e){var t=e.children,r=e3().setIsNavOpen,n=function(){var e=document.getElementById("my-drawer");e&&(r(!1),e.checked=!1)};return(0,eJ.jsxs)("div",{className:"z-10 flex-1 drawer h-52 flex-col justify-between h-screen",children:[(0,eJ.jsx)("input",{id:"my-drawer",type:"checkbox",className:"grow drawer-toggle"}),(0,eJ.jsx)("div",{className:"items-center drawer-content flex flex-col justify-between",children:t}),(0,eJ.jsxs)("div",{className:"flex flex-col justify-end drawer-side mt-16",children:[(0,eJ.jsx)("label",{htmlFor:"my-drawer",className:"drawer-overlay gap-6"}),(0,eJ.jsx)("aside",{className:"bg-default-100 w-screen h-screen",children:(0,eJ.jsxs)("ul",{className:"text-default-800 overflow-y-auto menu gap-6 sm:flex items-center",children:[(0,eJ.jsx)("li",{children:(0,eJ.jsx)(t2,{variant:"heading",className:"font-extrabold tracking-tighter text-center text-transparent bg-clip-text bg-gradient-to-br from-gray-300 to-gray-500 mt-10",children:"Menu"})}),(0,eJ.jsx)("li",{children:(0,eJ.jsx)(t5,{label:"Home",href:"/",navigationStarts:function(){return n()}})}),(0,eJ.jsx)("li",{children:(0,eJ.jsx)(t5,{label:"Discovery",href:"/discovery",navigationStarts:function(){return n()}})}),(0,eJ.jsx)("li",{children:(0,eJ.jsx)(t5,{label:"Bids",href:"/bids",navigationStarts:function(){return n()}})}),(0,eJ.jsx)("li",{children:(0,eJ.jsx)(t5,{label:"Listings",href:"/listings",navigationStarts:function(){return n()}})}),(0,eJ.jsx)("li",{children:(0,eJ.jsx)(t5,{label:"Leaderboard",href:"/leaderboard",navigationStarts:function(){return n()}})}),(0,eJ.jsx)("li",{children:(0,eJ.jsx)(t5,{label:"Help",href:"/help",navigationStarts:function(){return n()}})})]})})]})]})},ac=r(46822),ad=r(40675),ah=r(49869),af=r(16769);function ap(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ag(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ap(Object(r),!0).forEach(function(t){(0,j.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ap(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var am=function(e){var t=e.className,r=e.classNames,n=(0,tn.F)(),i=n.theme,o=n.setTheme,s=(0,af.Av)(),a=(0,ad.h)({isSelected:"light"===i,"aria-label":"Switch to ".concat("light"===i?"dark":"light"," mode"),onChange:function(){var e="light"===i?"dark":"light";o(e),localStorage.setItem("theme",e)}}),l=a.Component,u=a.slots,c=a.isSelected,d=a.getBaseProps,h=a.getInputProps,f=a.getWrapperProps;return(0,eJ.jsxs)(l,ag(ag({},d({className:(0,ah.W)("p-1 w-8 h-8 transition-opacity hover:opacity-80 cursor-pointer",t,null==r?void 0:r.base)})),{},{children:[(0,eJ.jsx)(ac.T,{children:(0,eJ.jsx)("input",ag({},h()))}),(0,eJ.jsx)("div",ag(ag({},f()),{},{className:u.wrapper({class:(0,ah.W)(["w-auto h-auto","bg-transparent","rounded-lg","flex items-center justify-center","group-data-[selected=true]:bg-transparent","pt-px","px-0","mx-0"],null==r?void 0:r.wrapper)}),children:!c||s?(0,eJ.jsx)(tx,{className:"w-22 h-22"}):(0,eJ.jsx)(tw,{className:"text-default-600 w-22 h-22"})}))]}))},ay=function(){return(0,eJ.jsx)("div",{className:"bg-white dark:bg-[#121212] flex text-neutral-content mt-auto",children:(0,eJ.jsx)("footer",{className:"border-t-1 hover:text-white w-screen shadow-lg text-neutral-content border-zinc-600 bg-opacity-66",children:(0,eJ.jsx)("div",{className:"ml-2 mr-2",children:(0,eJ.jsx)("div",{className:"grid grid-cols-2 lg:grid-cols-6 gap-2 lg:gap-8 lg:space-x-12 relative",children:(0,eJ.jsx)("div",{className:"flex flex-col col-span-2 mx-4 items-center lg:items-start",children:(0,eJ.jsxs)("div",{className:"flex text-default-600",children:[(0,eJ.jsx)("a",{href:"https://twitter.com/chadbotApp",target:"_blank",type:"button",className:"border-white hover:text-base-600 leading-normal hover:text-default-800 focus:outline-none focus:ring-0 transition duration-150 ease-in-out w-9 h-9",children:(0,eJ.jsx)("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"fab","data-icon":"twitter",className:"mx-auto mt-2.5",width:16,height:16,role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eJ.jsx)("path",{fill:"currentColor",d:"M16.99 0H20.298L13.071 8.26L21.573 19.5H14.916L9.702 12.683L3.736 19.5H0.426L8.156 10.665L0 0H6.826L11.539 6.231L16.99 0ZM15.829 17.52H17.662L5.83 1.876H3.863L15.829 17.52Z"})})}),(0,eJ.jsx)("a",{href:"https://discord.gg/wqnGGHSuS3",target:"_blank",type:"button",className:"border-white hover:text-base-600 leading-normal hover:text-default-800 focus:outline-none focus:ring-0 transition duration-150 ease-in-out w-9 h-9",children:(0,eJ.jsx)("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"fab","data-icon":"github",className:"mx-auto mt-2.5",width:16,height:16,role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",children:(0,eJ.jsx)("path",{fill:"currentColor",d:"M13.545 2.907a13.2 13.2 0 0 0-3.257-1.011.05.05 0 0 0-.052.025c-.141.25-.297.577-.406.833a12.2 12.2 0 0 0-3.658 0 8 8 0 0 0-.412-.833.05.05 0 0 0-.052-.025c-1.125.194-2.22.534-3.257 1.011a.04.04 0 0 0-.021.018C.356 6.024-.213 9.047.066 12.032q.003.022.021.037a13.3 13.3 0 0 0 3.995 2.02.05.05 0 0 0 .056-.019q.463-.63.818-1.329a.05.05 0 0 0-.01-.059l-.018-.011a9 9 0 0 1-1.248-.595.05.05 0 0 1-.02-.066l.015-.019q.127-.095.248-.195a.05.05 0 0 1 .051-.007c2.619 1.196 5.454 1.196 8.041 0a.05.05 0 0 1 .053.007q.121.1.248.195a.05.05 0 0 1-.004.085 8 8 0 0 1-1.249.594.05.05 0 0 0-.03.03.05.05 0 0 0 .003.041c.24.465.515.909.817 1.329a.05.05 0 0 0 .056.019 13.2 13.2 0 0 0 4.001-2.02.05.05 0 0 0 .021-.037c.334-3.451-.559-6.449-2.366-9.106a.03.03 0 0 0-.02-.019m-8.198 7.307c-.789 0-1.438-.724-1.438-1.612s.637-1.613 1.438-1.613c.807 0 1.45.73 1.438 1.613 0 .888-.637 1.612-1.438 1.612m5.316 0c-.788 0-1.438-.724-1.438-1.612s.637-1.613 1.438-1.613c.807 0 1.451.73 1.438 1.613 0 .888-.631 1.612-1.438 1.612"})})}),(0,eJ.jsx)(am,{className:"ml-2 border-white hover:text-base-600 leading-normal hover:text-default-800 focus:outline-none focus:ring-0 transition duration-150 ease-in-out w-9 h-9"})]})})})})})})},av=r(76733),ab=r(3175),aw=r(32433),ax=r(31190),aE=r(7321);function ak(e,t){return e-t*Math.floor(e/t)}function aS(e,t,r,n){let i=(t=aM(e,t))-1,o=-2;return r<=2?o=0:aT(t)&&(o=-1),1721425+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*r-362)/12+o+n)}function aT(e){return e%4==0&&(e%100!=0||e%400==0)}function aM(e,t){return"BC"===e?1-t:t}let aA={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class aP{fromJulianDay(e){var t;let r,n=e-1721426,i=Math.floor(n/146097),o=ak(n,146097),s=Math.floor(o/36524),a=ak(o,36524),l=Math.floor(a/1461),u=Math.floor(ak(a,1461)/365),[c,d]=(r="AD",(t=400*i+100*s+4*l+u+(4!==s&&4!==u?1:0))<=0&&(r="BC",t=1-t),[r,t]),h=e-aS(c,d,1,1),f=2;e<aS(c,d,3,1)?f=0:aT(d)&&(f=1);let p=Math.floor(((h+f)*12+373)/367),g=e-aS(c,d,p,1)+1;return new a0(c,d,p,g)}toJulianDay(e){return aS(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return aA[aT(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return aT(e.year)?366:365}getYearsInEra(e){return 9999}getEras(){return["BC","AD"]}isInverseEra(e){return"BC"===e.era}balanceDate(e){e.year<=0&&(e.era="BC"===e.era?"AD":"BC",e.year=1-e.year)}constructor(){this.identifier="gregory"}}function aC(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function a_(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let aI=null;function aO(){return null==aI&&(aI=new Intl.DateTimeFormat().resolvedOptions().timeZone),aI}function aL(e){return aR(aM((e=aU(e,new aP)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function aR(e,t,r,n,i,o,s){let a=new Date;return a.setUTCHours(n,i,o,s),a.setUTCFullYear(e,t-1,r),a.getTime()}function aj(e,t){if("UTC"===t)return 0;if(e>0&&t===aO())return -6e4*new Date(e).getTimezoneOffset();let{year:r,month:n,day:i,hour:o,minute:s,second:a}=aN(e,t);return aR(r,n,i,o,s,a,0)-1e3*Math.floor(e/1e3)}let aB=new Map;function aN(e,t){let r=aB.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),aB.set(t,r));let n=r.formatToParts(new Date(e)),i={};for(let e of n)"literal"!==e.type&&(i[e.type]=e.value);return{year:"BC"===i.era||"B"===i.era?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:"24"===i.hour?0:+i.hour,minute:+i.minute,second:+i.second}}function aD(e,t,r="compatible"){return new Date(function(e,t,r="compatible"){var n,i,o;let s=aK(e);if("UTC"===t)return aL(s);if(t===aO()&&"compatible"===r){s=aU(s,new aP);let e=new Date,t=aM(s.era,s.year);return e.setFullYear(t,s.month-1,s.day),e.setHours(s.hour,s.minute,s.second,s.millisecond),e.getTime()}let a=aL(s),l=aj(a-864e5,t),u=aj(a+864e5,t),c=(n=s,((i=a-l)==(o=a-u)?[i]:[i,o]).filter(e=>{let r;return r=aN(e,t),n.year===r.year&&n.month===r.month&&n.day===r.day&&n.hour===r.hour&&n.minute===r.minute&&n.second===r.second}));if(1===c.length)return c[0];if(c.length>1)switch(r){case"compatible":case"earlier":return c[0];case"later":return c[c.length-1];case"reject":throw RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(a-l,a-u);case"compatible":case"later":return Math.max(a-l,a-u);case"reject":throw RangeError("No such absolute time found")}}(e,t,r))}function aK(e,t){let r=0,n=0,i=0,o=0;if("timeZone"in e)({hour:r,minute:n,second:i,millisecond:o}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:i,millisecond:o}=t),new a2(e.calendar,e.era,e.year,e.month,e.day,r,n,i,o)}function aU(e,t){if(e.calendar.identifier===t.identifier)return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,a$(n),n}function az(e,t){var r,n,i,o;let s;let a=e.copy(),l="hour"in a?(r=a,n=t,r.hour+=n.hours||0,r.minute+=n.minutes||0,r.second+=n.seconds||0,r.millisecond+=n.milliseconds||0,r.second+=Math.floor(r.millisecond/1e3),r.millisecond=aZ(r.millisecond,1e3),r.minute+=Math.floor(r.second/60),r.second=aZ(r.second,60),r.hour+=Math.floor(r.minute/60),r.minute=aZ(r.minute,60),s=Math.floor(r.hour/24),r.hour=aZ(r.hour,24),s):0;aF(a,t.years||0),a.calendar.balanceYearMonth&&a.calendar.balanceYearMonth(a,e),a.month+=t.months||0,aW(a),aV(a),a.day+=7*(t.weeks||0),a.day+=t.days||0,a.day+=l,function(e){for(;e.day<1;)e.month--,aW(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,aW(e)}(a),a.calendar.balanceDate&&a.calendar.balanceDate(a),a.year<1&&(a.year=1,a.month=1,a.day=1);let u=a.calendar.getYearsInEra(a);if(a.year>u){let e=null===(i=(o=a.calendar).isInverseEra)||void 0===i?void 0:i.call(o,a);a.year=u,a.month=e?1:a.calendar.getMonthsInYear(a),a.day=e?1:a.calendar.getDaysInMonth(a)}a.month<1&&(a.month=1,a.day=1);let c=a.calendar.getMonthsInYear(a);return a.month>c&&(a.month=c,a.day=a.calendar.getDaysInMonth(a)),a.day=Math.max(1,Math.min(a.calendar.getDaysInMonth(a),a.day)),a}function aF(e,t){var r,n;(null===(r=(n=e.calendar).isInverseEra)||void 0===r?void 0:r.call(n,e))&&(t=-t),e.year+=t}function aW(e){for(;e.month<1;)aF(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,aF(e,1)}function aV(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function a$(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),aV(e)}function aH(e,t){return az(e,function(e){let t={};for(let r in e)"number"==typeof e[r]&&(t[r]=-e[r]);return t}(t))}function aq(e,t){let r=e.copy();return null!=t.era&&(r.era=t.era),null!=t.year&&(r.year=t.year),null!=t.month&&(r.month=t.month),null!=t.day&&(r.day=t.day),a$(r),r}function aZ(e,t){let r=e%t;return r<0&&(r+=t),r}function aG(e,t,r,n){let i=e.copy();switch(t){case"era":{let t=e.calendar.getEras(),o=t.indexOf(e.era);if(o<0)throw Error("Invalid era: "+e.era);o=aJ(o,r,0,t.length-1,null==n?void 0:n.round),i.era=t[o],a$(i);break}case"year":var o,s;(null===(o=(s=i.calendar).isInverseEra)||void 0===o?void 0:o.call(s,i))&&(r=-r),i.year=aJ(e.year,r,-1/0,9999,null==n?void 0:n.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case"month":i.month=aJ(e.month,r,1,e.calendar.getMonthsInYear(e),null==n?void 0:n.round);break;case"day":i.day=aJ(e.day,r,1,e.calendar.getDaysInMonth(e),null==n?void 0:n.round);break;default:throw Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),a$(i),i}function aJ(e,t,r,n,i=!1){if(i){(e+=Math.sign(t))<r&&(e=n);let i=Math.abs(t);(e=t>0?Math.ceil(e/i)*i:Math.floor(e/i)*i)>n&&(e=r)}else(e+=t)<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function aY(e){let t=aU(e,new aP);return`${String(t.year).padStart(4,"0")}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function aX(e){let t,r="object"==typeof e[0]?e.shift():new aP;if("string"==typeof e[0])t=e.shift();else{let e=r.getEras();t=e[e.length-1]}return[r,t,e.shift(),e.shift(),e.shift()]}var aQ=new WeakMap;class a0{copy(){return this.era?new a0(this.calendar,this.era,this.year,this.month,this.day):new a0(this.calendar,this.year,this.month,this.day)}add(e){return az(this,e)}subtract(e){return aH(this,e)}set(e){return aq(this,e)}cycle(e,t,r){return aG(this,e,t,r)}toDate(e){return aD(this,e)}toString(){return aY(this)}compare(e){return aC(this,e)}constructor(...e){(0,aE._)(this,aQ,{writable:!0,value:void 0});let[t,r,n,i,o]=aX(e);this.calendar=t,this.era=r,this.year=n,this.month=i,this.day=o,a$(this)}}var a1=new WeakMap;class a2{copy(){return this.era?new a2(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new a2(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return az(this,e)}subtract(e){return aH(this,e)}set(e){let t;return aq((t=this.copy(),null!=e.hour&&(t.hour=e.hour),null!=e.minute&&(t.minute=e.minute),null!=e.second&&(t.second=e.second),null!=e.millisecond&&(t.millisecond=e.millisecond),t.millisecond=Math.max(0,Math.min(t.millisecond,1e3)),t.second=Math.max(0,Math.min(t.second,59)),t.minute=Math.max(0,Math.min(t.minute,59)),t.hour=Math.max(0,Math.min(t.hour,23)),t),e)}cycle(e,t,r){switch(e){case"era":case"year":case"month":case"day":return aG(this,e,t,r);default:return function(e,t,r,n){let i=e.copy();switch(t){case"hour":{let t=e.hour,o=0,s=23;if((null==n?void 0:n.hourCycle)===12){let e=t>=12;o=e?12:0,s=e?23:11}i.hour=aJ(t,r,o,s,null==n?void 0:n.round);break}case"minute":i.minute=aJ(e.minute,r,0,59,null==n?void 0:n.round);break;case"second":i.second=aJ(e.second,r,0,59,null==n?void 0:n.round);break;case"millisecond":i.millisecond=aJ(e.millisecond,r,0,999,null==n?void 0:n.round);break;default:throw Error("Unsupported field "+t)}return i}(this,e,t,r)}}toDate(e,t){return aD(this,e,t)}toString(){return`${aY(this)}T${String(this.hour).padStart(2,"0")}:${String(this.minute).padStart(2,"0")}:${String(this.second).padStart(2,"0")}${this.millisecond?String(this.millisecond/1e3).slice(1):""}`}compare(e){let t=aC(this,e);if(0===t){var r;return r=aK(e),a_(this)-a_(r)}return t}constructor(...e){(0,aE._)(this,a1,{writable:!0,value:void 0});let[t,r,n,i,o]=aX(e);this.calendar=t,this.era=r,this.year=n,this.month=i,this.day=o,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,a$(this)}}var a5=r(22081),a6=({children:e,navigate:t,disableAnimation:r=!1,disableRipple:n=!1,skipFramerMotionAnimations:i=r,validationBehavior:o="aria",locale:s="en-US",defaultDates:a={minDate:new a0(1900,1,1),maxDate:new a0(2099,12,31)},createCalendar:l,...u})=>{let c=e;t&&(c=(0,eJ.jsx)(aw.pG,{navigate:t,children:c}));let d=(0,F.useMemo)(()=>(r&&i&&(a5.c.skipAnimations=!0),{createCalendar:l,defaultDates:a,disableAnimation:r,disableRipple:n,validationBehavior:o}),[l,null==a?void 0:a.maxDate,null==a?void 0:a.minDate,r,n,o]);return(0,eJ.jsx)(av.a,{value:d,children:(0,eJ.jsx)(ab.bd,{locale:s,children:(0,eJ.jsx)(ax.N3,{...u,children:c})})})},a3=()=>{window.va||(window.va=function(...e){(window.vaq=window.vaq||[]).push(e)})};function a4(){return"undefined"!=typeof window}function a8(){return"production"}function a7(){return"development"===((a4()?window.vam:a8())||"production")}function a9(e){return(0,F.useEffect)(()=>{!function(e={debug:!0}){var t;if(!a4())return;(function(e="auto"){if("auto"===e){window.vam=a8();return}window.vam=e})(e.mode),a3(),e.beforeSend&&(null==(t=window.va)||t.call(window,"beforeSend",e.beforeSend));let r=e.scriptSrc||(a7()?"https://va.vercel-scripts.com/v1/script.debug.js":"/_vercel/insights/script.js");if(document.head.querySelector(`script[src*="${r}"]`))return;let n=document.createElement("script");n.src=r,n.defer=!0,n.dataset.sdkn="@vercel/analytics"+(e.framework?`/${e.framework}`:""),n.dataset.sdkv="1.3.1",e.disableAutoTrack&&(n.dataset.disableAutoTrack="1"),e.endpoint&&(n.dataset.endpoint=e.endpoint),e.dsn&&(n.dataset.dsn=e.dsn),n.onerror=()=>{let e=a7()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log(`[Vercel Web Analytics] Failed to load script from ${r}. ${e}`)},a7()&&!1===e.debug&&(n.dataset.debug="false"),document.head.appendChild(n)}({framework:e.framework||"react",...void 0!==e.route&&{disableAutoTrack:!0},...e})},[]),(0,F.useEffect)(()=>{e.route&&e.path&&function({route:e,path:t}){var r;null==(r=window.va)||r.call(window,"pageview",{route:e,path:t})}({route:e.route,path:e.path})},[e.route,e.path]),null}var le=r(55678);r(22130);var lt=function(){var e=(0,tn.F)(),t=e.theme;return e.setTheme,(0,eJ.jsx)(le.Ix,{position:"top-right",autoClose:5e3,hideProgressBar:!1,newestOnTop:!0,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!0,draggable:!0,pauseOnHover:!0,theme:"light"===t?"light":"dark"})};function lr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}r(17841),r(71784);var ln=function(e){var t=e.Component,r=e.pageProps;return(0,eJ.jsxs)(eJ.Fragment,{children:[(0,eJ.jsx)(a9,{}),(0,eJ.jsxs)(N(),{children:[(0,eJ.jsx)("title",{children:"Chadbot"}),(0,eJ.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"})]}),(0,eJ.jsx)(tn.f,{defaultTheme:"system",attribute:"class",value:{light:"light",dark:"dark"},children:(0,eJ.jsx)(a6,{children:(0,eJ.jsx)(e6,{children:(0,eJ.jsx)(te,{children:(0,eJ.jsxs)("div",{className:"bg-white dark:bg-[#121212] flex flex-col min-h-screen",children:[(0,eJ.jsx)(lt,{}),(0,eJ.jsx)(al,{}),(0,eJ.jsxs)(au,{children:[(0,eJ.jsx)(t,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?lr(Object(r),!0).forEach(function(t){(0,j.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lr(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},r)),(0,eJ.jsx)(ay,{})]})]})})})})})]})}},51757:function(e,t,r){"use strict";r.d(t,{h:function(){return o},q:function(){return i}});var n=r(55678);function i(e,t,r,i){n.Am.promise(e,{pending:t,success:r,error:{render:function(e){var t=e.data;return"".concat(null!=t?t:i)}}})}function o(e){var t=e.type,r=(e.message,e.description),i=(e.txid,e.theme),o={position:"top-right",autoClose:5e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,theme:void 0===i?"dark":i,transition:n.sm};"success"===t?n.Am.success(r,o):n.Am.error(r,o)}},4065:function(e,t,r){"use strict";r.d(t,{TN:function(){return m},qr:function(){return g},Tc:function(){return T},vo:function(){return _},SY:function(){return x},D1:function(){return v},VR:function(){return A},mx:function(){return C},F3:function(){return P},Pn:function(){return M},Jx:function(){return y},zc:function(){return b},lS:function(){return w},IN:function(){return E},Qp:function(){return S}});var n,i,o,s=r(50029),a=r(16835),l=r(64687),u=r.n(l),c=r(13100),d=r(15358),h=function(){var e,t,r,n,i,o;function a(e){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,a),this.apiKey=e,this.baseUrl="https://chadbot-backend.onrender.com",this.jwtToken=null}return o=[{key:"setJwtToken",value:function(e){this.jwtToken=e}},{key:"get",value:(e=(0,s.Z)(u().mark(function e(t,r){var n,i;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(this.baseUrl,"/").concat(t),e.next=3,fetch(n,{method:"GET",headers:{"Content-Type":"application/json","jwt-token":this.jwtToken},signal:r});case 3:return i=e.sent,e.abrupt("return",this.handleResponse(i));case 5:case"end":return e.stop()}},e,this)})),function(t,r){return e.apply(this,arguments)})},{key:"post",value:(t=(0,s.Z)(u().mark(function e(t,r){var n,i;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(this.baseUrl,"/").concat(t),e.next=3,fetch(n,{method:"POST",headers:{"Content-Type":"application/json","jwt-token":this.jwtToken},body:JSON.stringify(r)});case 3:return i=e.sent,e.abrupt("return",this.handleResponse(i));case 5:case"end":return e.stop()}},e,this)})),function(e,r){return t.apply(this,arguments)})},{key:"put",value:(r=(0,s.Z)(u().mark(function e(t,r){var n,i;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(this.baseUrl,"/").concat(t),e.next=3,fetch(n,{method:"PUT",headers:{"Content-Type":"application/json","jwt-token":this.jwtToken},body:JSON.stringify(r)});case 3:return i=e.sent,e.abrupt("return",this.handleResponse(i));case 5:case"end":return e.stop()}},e,this)})),function(e,t){return r.apply(this,arguments)})},{key:"delete",value:(n=(0,s.Z)(u().mark(function e(t,r){var n,i;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(this.baseUrl,"/").concat(t),e.next=3,fetch(n,{method:"DELETE",headers:{"Content-Type":"application/json","jwt-token":this.jwtToken},body:JSON.stringify(r)});case 3:return i=e.sent,e.abrupt("return",this.handleResponse(i));case 5:case"end":return e.stop()}},e,this)})),function(e,t){return n.apply(this,arguments)})},{key:"handleResponse",value:(i=(0,s.Z)(u().mark(function e(t){return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(401!==t.status){e.next=7;break}return this.setJwtToken(""),localStorage.setItem("jwt-token",""),e.next=5,t.text();case 5:throw Error(e.sent);case 7:return e.abrupt("return",t);case 8:case"end":return e.stop()}},e,this)})),function(e){return i.apply(this,arguments)})}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(0,d.Z)(n.key),n)}}(a.prototype,o),Object.defineProperty(a,"prototype",{writable:!1}),a}(),f=r(77191),p=r(48764).Buffer,g=((n={})[n.Low=1e-5]="Low",n[n.Normal=.001]="Normal",n[n.High=.01]="High",n[n.Degen=.1]="Degen",n),m=((i={})[i.VeryLow=20]="VeryLow",i[i.Low=10]="Low",i[i.Normal=5]="Normal",i[i.High=3]="High",i[i.Degen=1]="Degen",i);function y(e){var t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3;return e?t?"("+e.slice(0,r)+"…"+e.slice(-1*r)+")":e.slice(0,r)+"…"+e.slice(-1*r):""}function v(e,t){try{var r=e.find(function(e){return e.id===t}),n=parseFloat(b(null==r?void 0:r.buyNowPrice,2)),i=parseFloat(b(null==r?void 0:r.sellNowPrice,2));if(isNaN(n)||isNaN(i)||0===n)return"N/A";return((i-n)/n*100).toFixed(1)+"%"}catch(e){return"N/A"}}function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{if(isNaN(e))return"N/A";var n,i=Math.pow(10,t),o=r?1:c.LAMPORTS_PER_SOL,s=Math.trunc(e/o*i)/i,l=(n=(s=0===s&&0!==e?parseFloat((e/o).toFixed(Math.max(5,t+2))):parseFloat(s.toFixed(t))).toString()).includes("e")||n.includes("E")?s.toFixed(7):s.toString();return(s<1e-4||l.length>7)&&(l=function(e){if("number"!=typeof e||isNaN(e))throw Error("Invalid input: value must be a number");var t=e.toString();if((t.includes("e")||t.includes("E"))&&(t=(e=Number(t)).toFixed(20).replace(/0+$/,"")),!t.includes("."))return t;for(var r=t.split("."),n=(0,a.Z)(r,2),i=n[0],o=n[1],s=0,l="",u=0;u<o.length&&(l+=o[u],"0"!==o[u]&&s++,!(s>=2));u++);return"".concat(i,".").concat(l)}(s)),l}catch(e){return"N/A"}}function w(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;try{if(isNaN(e))return"N/A";var r=Math.pow(10,t),n=Math.trunc(e/c.LAMPORTS_PER_SOL*r)/r,i=(n=parseFloat(n.toFixed(t))).toPrecision(t);if(i.includes(".")){var o=i.split("."),s=(0,a.Z)(o,2),l=s[0],u=s[1];l.length+u.length>t&&(i=l+"."+u.slice(0,t-l.length))}return i.includes(".")&&(i=i.replace(/\.?0+$/,"")),i}catch(e){return"N/A"}}function x(e){if("string"==typeof e||isNaN(e))return"N/A";var t=Math.floor((Date.now()-e)/1e3);return t<60?"".concat(t," seconds"):t<3600?"".concat(Math.floor(t/60)," minutes"):t<86400?"".concat(Math.floor(t/3600)," hours"):"".concat(Math.floor(t/86400)," days")}function E(e){try{var t=k(e);return[!0,t.publicKey]}catch(e){return[!1,null]}}var k=function(e){var t=null;try{t=c.Keypair.fromSecretKey(new Uint8Array(JSON.parse(e)))}catch(r){try{t=c.Keypair.fromSecretKey(new Uint8Array((0,f.decode)(e)))}catch(r){try{t=c.Keypair.fromSecretKey(p.from(e,"hex"))}catch(e){throw Error("Invalid Solana private key")}}}return t},S=(o=(0,s.Z)(u().mark(function e(t){var r;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r=new c.PublicKey(t),e.abrupt("return",c.PublicKey.default!==r);case 5:return e.prev=5,e.t0=e.catch(0),e.abrupt("return",!1);case 8:case"end":return e.stop()}},e,null,[[0,5]])})),function(e){return o.apply(this,arguments)}),T=new h("YC4DB0TEZQ");function M(e,t){try{"all"===e?localStorage.setItem("statusFilter_"+t,"all"):localStorage.setItem("statusFilter_"+t,Array.from(e).join(","))}catch(e){}}function A(e){try{var t=localStorage.getItem("statusFilter_"+e);if(t){if("all"===t)return"all";return new Set(t.split(","))}}catch(e){}return"all"}function P(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch(e){}}function C(e){try{var t=localStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return null}}var _=function(e){try{if("string"!=typeof e)return parseFloat(e);if(e.startsWith(">"))return 1/0;var t=e.replace("# ","").replace(" ◎","").replace(" %",""),r=parseFloat(t);return isNaN(r)?NaN:r}catch(e){return NaN}}},9919:function(e,t,r){"use strict";r.d(t,{U:function(){return d},b:function(){return c}});var n=r(59499),i=r(4730);r(67294);var o=r(85893),s=["size","width","height"],a=["size","width","height"];function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach(function(t){(0,n.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var c=function(e){var t=e.size,r=void 0===t?24:t,n=e.width,a=e.height,l=(0,i.Z)(e,s);return(0,o.jsxs)("svg",u(u({"aria-hidden":"true",fill:"currentColor",focusable:"false",height:r||a,role:"presentation",viewBox:"0 0 36 36",width:r||n},l),{},{children:[(0,o.jsx)("path",{d:"M25.39,25.45a1,1,0,0,0-1.38.29c-1.41,2.16-4,4.81-6.31,5.7s-4.12.57-4.84,0c-.31-.27-1.12-1-.43-3.49.46-1.66,3.32-9.48,4-11.38l-2.18.28c-.69,1.86-3.29,8.84-3.76,10.58-.68,2.49-.34,4.3,1.09,5.56A5.59,5.59,0,0,0,15,34a9.53,9.53,0,0,0,3.45-.7c2.79-1.09,5.72-4.12,7.26-6.47A1,1,0,0,0,25.39,25.45Z"}),(0,o.jsx)("path",{d:"M19.3,11a4.5,4.5,0,1,0-4.5-4.5A4.5,4.5,0,0,0,19.3,11Zm0-7a2.5,2.5,0,1,1-2.5,2.5A2.5,2.5,0,0,1,19.3,4Z"}),(0,o.jsx)("path",{d:"M11.81,15c.06,0,6.27-.82,7.73-1,.65-.1,1.14,0,1.3.15s.21.8-.07,1.68c-.61,1.86-3.69,11-4.59,13.71a8,8,0,0,0,1.29-.38,7.32,7.32,0,0,0,1.15-.6C19.85,25,22.15,18.1,22.67,16.52s.39-2.78-.3-3.6a3.16,3.16,0,0,0-3.08-.83c-1.43.15-7.47.94-7.73,1a1,1,0,0,0,.26,2Z"}),(0,o.jsx)("rect",{x:"0",y:"0",width:"36",height:"36",fillOpacity:"0"})]}))},d=function(e){var t=e.size,r=void 0===t?24:t,n=e.width,s=e.height,l=(0,i.Z)(e,a);return(0,o.jsxs)("svg",u(u({"aria-hidden":"true",fill:"currentColor",focusable:"false",height:r||s,role:"presentation",viewBox:"0 0 24 24",width:r||n},l),{},{children:[(0,o.jsx)("path",{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zM7.92 9.234v.102a.5.5 0 0 0 .5.5h.997a.499.499 0 0 0 .499-.499c0-1.29.998-1.979 2.34-1.979 1.308 0 2.168.689 2.168 1.67 0 .928-.482 1.359-1.686 1.91l-.344.154C11.379 11.54 11 12.21 11 13.381v.119a.5.5 0 0 0 .5.5h.997a.499.499 0 0 0 .499-.499c0-.516.138-.723.55-.912l.345-.155c1.445-.654 2.529-1.514 2.529-3.39v-.103c0-1.978-1.72-3.441-4.164-3.441-2.478 0-4.336 1.428-4.336 3.734zm2.58 7.757c0 .867.659 1.509 1.491 1.509.85 0 1.509-.642 1.509-1.509 0-.867-.659-1.491-1.509-1.491-.832 0-1.491.624-1.491 1.491z"}),(0,o.jsx)("rect",{x:"0",y:"0",width:"36",height:"36",fillOpacity:"0"})]}))}},6840:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return r(76423)}])},3745:function(){},17841:function(){},22130:function(){},71784:function(){},5152:function(e,t,r){e.exports=r(40325)},9008:function(e,t,r){e.exports=r(49903)},41664:function(e,t,r){e.exports=r(78065)},11163:function(e,t,r){e.exports=r(58194)},34155:function(e){var t,r,n,i=e.exports={};function o(){throw Error("setTimeout has not been defined")}function s(){throw Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var l=[],u=!1,c=-1;function d(){u&&n&&(u=!1,n.length?l=n.concat(l):c=-1,l.length&&h())}function h(){if(!u){var e=a(d);u=!0;for(var t=l.length;t;){for(n=l,l=[];++c<t;)n&&n[c].run();c=-1,t=l.length}n=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new f(e,t)),1!==l.length||u||a(h)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw Error("process.chdir is not supported")},i.umask=function(){return 0}},84790:function(e){"use strict";var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,n,o,s){if("function"!=typeof n)throw TypeError("The listener must be a function");var a=new i(n,o||e,s),l=r?r+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],a]:e._events[l].push(a):(e._events[l]=a,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1)),a.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,s=Array(o);i<o;i++)s[i]=n[i].fn;return s},a.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},a.prototype.emit=function(e,t,n,i,o,s){var a=r?r+e:e;if(!this._events[a])return!1;var l,u,c=this._events[a],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,o),!0;case 6:return c.fn.call(c.context,t,n,i,o,s),!0}for(u=1,l=Array(d-1);u<d;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var h,f=c.length;for(u=0;u<f;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),d){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,n);break;case 4:c[u].fn.call(c[u].context,t,n,i);break;default:if(!l)for(h=1,l=Array(d-1);h<d;h++)l[h-1]=arguments[h];c[u].fn.apply(c[u].context,l)}}return!0},a.prototype.on=function(e,t,r){return o(this,e,t,r,!1)},a.prototype.once=function(e,t,r){return o(this,e,t,r,!0)},a.prototype.removeListener=function(e,t,n,i){var o=r?r+e:e;if(!this._events[o])return this;if(!t)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==t||i&&!a.once||n&&a.context!==n||s(this,o);else{for(var l=0,u=[],c=a.length;l<c;l++)(a[l].fn!==t||i&&!a[l].once||n&&a[l].context!==n)&&u.push(a[l]);u.length?this._events[o]=1===u.length?u[0]:u:s(this,o)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,e.exports=a},89509:function(e,t,r){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var n=r(48764),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(e,t,r){if("number"==typeof e)throw TypeError("Argument must not be a number");return i(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return n.SlowBuffer(e)}},46326:function(e,t,r){"use strict";/**
 * @license React
 * use-sync-external-store-shim.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var n=r(67294),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useState,s=n.useEffect,a=n.useLayoutEffect,l=n.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=o({inst:{value:r,getSnapshot:t}}),i=n[0].inst,c=n[1];return a(function(){i.value=r,i.getSnapshot=t,u(i)&&c({inst:i})},[e,r,t]),s(function(){return u(i)&&c({inst:i}),e(function(){u(i)&&c({inst:i})})},[e]),l(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:c},98557:function(e,t,r){"use strict";e.exports=r(46326)},11379:function(e,t){"use strict";function r(e,t,r){return t<=e&&e<=r}function n(e){if(void 0===e)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function i(e){this.tokens=[].slice.call(e)}function o(e,t){if(e)throw TypeError("Decoder error");return t||65533}i.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():-1},prepend:function(e){if(Array.isArray(e))for(;e.length;)this.tokens.unshift(e.pop());else this.tokens.unshift(e)},push:function(e){if(Array.isArray(e))for(;e.length;)this.tokens.push(e.shift());else this.tokens.push(e)}};var s="utf-8";function a(e,t){if(!(this instanceof a))return new a(e,t);if((e=void 0!==e?String(e).toLowerCase():s)!==s)throw Error("Encoding not supported. Only utf-8 is supported");t=n(t),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=!!t.fatal,this._ignoreBOM=!!t.ignoreBOM,Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}function l(e,t){if(!(this instanceof l))return new l(e,t);if((e=void 0!==e?String(e).toLowerCase():s)!==s)throw Error("Encoding not supported. Only utf-8 is supported");t=n(t),this._streaming=!1,this._encoder=null,this._options={fatal:!!t.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"})}function u(e){var t=e.fatal,n=0,i=0,s=0,a=128,l=191;this.handler=function(e,u){if(-1===u&&0!==s)return s=0,o(t);if(-1===u)return -1;if(0===s){if(r(u,0,127))return u;if(r(u,194,223))s=1,n=u-192;else if(r(u,224,239))224===u&&(a=160),237===u&&(l=159),s=2,n=u-224;else{if(!r(u,240,244))return o(t);240===u&&(a=144),244===u&&(l=143),s=3,n=u-240}return n<<=6*s,null}if(!r(u,a,l))return n=s=i=0,a=128,l=191,e.prepend(u),o(t);if(a=128,l=191,i+=1,n+=u-128<<6*(s-i),i!==s)return null;var c=n;return n=s=i=0,c}}function c(e){e.fatal,this.handler=function(e,t){if(-1===t)return -1;if(r(t,0,127))return t;r(t,128,2047)?(n=1,i=192):r(t,2048,65535)?(n=2,i=224):r(t,65536,1114111)&&(n=3,i=240);for(var n,i,o=[(t>>6*n)+i];n>0;){var s=t>>6*(n-1);o.push(128|63&s),n-=1}return o}}a.prototype={decode:function(e,t){r="object"==typeof e&&e instanceof ArrayBuffer?new Uint8Array(e):"object"==typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(0),t=n(t),this._streaming||(this._decoder=new u({fatal:this._fatal}),this._BOMseen=!1),this._streaming=!!t.stream;for(var r,o,s=new i(r),a=[];!s.endOfStream()&&-1!==(o=this._decoder.handler(s,s.read()));)null!==o&&(Array.isArray(o)?a.push.apply(a,o):a.push(o));if(!this._streaming){do{if(-1===(o=this._decoder.handler(s,s.read())))break;if(null===o)continue;Array.isArray(o)?a.push.apply(a,o):a.push(o)}while(!s.endOfStream());this._decoder=null}return!a.length||-1===["utf-8"].indexOf(this.encoding)||this._ignoreBOM||this._BOMseen||(65279===a[0]?(this._BOMseen=!0,a.shift()):this._BOMseen=!0),function(e){for(var t="",r=0;r<e.length;++r){var n=e[r];n<=65535?t+=String.fromCharCode(n):(n-=65536,t+=String.fromCharCode((n>>10)+55296,(1023&n)+56320))}return t}(a)}},l.prototype={encode:function(e,t){e=e?String(e):"",t=n(t),this._streaming||(this._encoder=new c(this._options)),this._streaming=!!t.stream;for(var r,o=[],s=new i(function(e){for(var t=String(e),r=t.length,n=0,i=[];n<r;){var o=t.charCodeAt(n);if(o<55296||o>57343)i.push(o);else if(56320<=o&&o<=57343)i.push(65533);else if(55296<=o&&o<=56319){if(n===r-1)i.push(65533);else{var s=e.charCodeAt(n+1);if(56320<=s&&s<=57343){var a=1023&o,l=1023&s;i.push(65536+(a<<10)+l),n+=1}else i.push(65533)}}n+=1}return i}(e));!s.endOfStream()&&-1!==(r=this._encoder.handler(s,s.read()));)Array.isArray(r)?o.push.apply(o,r):o.push(r);if(!this._streaming){for(;-1!==(r=this._encoder.handler(s,s.read()));)Array.isArray(r)?o.push.apply(o,r):o.push(r);this._encoder=null}return new Uint8Array(o)}},t.TextEncoder=l,t.TextDecoder=a},50780:function(e,t,r){!function(e){"use strict";var t,n=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;t++)r[t]=e[t];return r},i=function(){throw Error("no PRNG")},o=new Uint8Array(16),s=new Uint8Array(32);s[0]=9;var a=n(),l=n([1]),u=n([56129,1]),c=n([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),d=n([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),h=n([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),f=n([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),p=n([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function g(e,t,r,n){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function m(e,t,r,n,i){var o,s=0;for(o=0;o<i;o++)s|=e[t+o]^r[n+o];return(1&s-1>>>8)-1}function y(e,t,r,n){return m(e,t,r,n,16)}function v(e,t,r,n){return m(e,t,r,n,32)}function b(e,t,r,n){!function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,l=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,c=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,d=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,f=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,g=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,m=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,y=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,v=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,b=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,x=o,E=s,k=a,S=l,T=u,M=c,A=d,P=h,C=f,_=p,I=g,O=m,L=y,R=v,j=b,B=w,N=0;N<20;N+=2)T^=(i=x+L|0)<<7|i>>>25,C^=(i=T+x|0)<<9|i>>>23,L^=(i=C+T|0)<<13|i>>>19,x^=(i=L+C|0)<<18|i>>>14,_^=(i=M+E|0)<<7|i>>>25,R^=(i=_+M|0)<<9|i>>>23,E^=(i=R+_|0)<<13|i>>>19,M^=(i=E+R|0)<<18|i>>>14,j^=(i=I+A|0)<<7|i>>>25,k^=(i=j+I|0)<<9|i>>>23,A^=(i=k+j|0)<<13|i>>>19,I^=(i=A+k|0)<<18|i>>>14,S^=(i=B+O|0)<<7|i>>>25,P^=(i=S+B|0)<<9|i>>>23,O^=(i=P+S|0)<<13|i>>>19,B^=(i=O+P|0)<<18|i>>>14,E^=(i=x+S|0)<<7|i>>>25,k^=(i=E+x|0)<<9|i>>>23,S^=(i=k+E|0)<<13|i>>>19,x^=(i=S+k|0)<<18|i>>>14,A^=(i=M+T|0)<<7|i>>>25,P^=(i=A+M|0)<<9|i>>>23,T^=(i=P+A|0)<<13|i>>>19,M^=(i=T+P|0)<<18|i>>>14,O^=(i=I+_|0)<<7|i>>>25,C^=(i=O+I|0)<<9|i>>>23,_^=(i=C+O|0)<<13|i>>>19,I^=(i=_+C|0)<<18|i>>>14,L^=(i=B+j|0)<<7|i>>>25,R^=(i=L+B|0)<<9|i>>>23,j^=(i=R+L|0)<<13|i>>>19,B^=(i=j+R|0)<<18|i>>>14;x=x+o|0,E=E+s|0,k=k+a|0,S=S+l|0,T=T+u|0,M=M+c|0,A=A+d|0,P=P+h|0,C=C+f|0,_=_+p|0,I=I+g|0,O=O+m|0,L=L+y|0,R=R+v|0,j=j+b|0,B=B+w|0,e[0]=x>>>0&255,e[1]=x>>>8&255,e[2]=x>>>16&255,e[3]=x>>>24&255,e[4]=E>>>0&255,e[5]=E>>>8&255,e[6]=E>>>16&255,e[7]=E>>>24&255,e[8]=k>>>0&255,e[9]=k>>>8&255,e[10]=k>>>16&255,e[11]=k>>>24&255,e[12]=S>>>0&255,e[13]=S>>>8&255,e[14]=S>>>16&255,e[15]=S>>>24&255,e[16]=T>>>0&255,e[17]=T>>>8&255,e[18]=T>>>16&255,e[19]=T>>>24&255,e[20]=M>>>0&255,e[21]=M>>>8&255,e[22]=M>>>16&255,e[23]=M>>>24&255,e[24]=A>>>0&255,e[25]=A>>>8&255,e[26]=A>>>16&255,e[27]=A>>>24&255,e[28]=P>>>0&255,e[29]=P>>>8&255,e[30]=P>>>16&255,e[31]=P>>>24&255,e[32]=C>>>0&255,e[33]=C>>>8&255,e[34]=C>>>16&255,e[35]=C>>>24&255,e[36]=_>>>0&255,e[37]=_>>>8&255,e[38]=_>>>16&255,e[39]=_>>>24&255,e[40]=I>>>0&255,e[41]=I>>>8&255,e[42]=I>>>16&255,e[43]=I>>>24&255,e[44]=O>>>0&255,e[45]=O>>>8&255,e[46]=O>>>16&255,e[47]=O>>>24&255,e[48]=L>>>0&255,e[49]=L>>>8&255,e[50]=L>>>16&255,e[51]=L>>>24&255,e[52]=R>>>0&255,e[53]=R>>>8&255,e[54]=R>>>16&255,e[55]=R>>>24&255,e[56]=j>>>0&255,e[57]=j>>>8&255,e[58]=j>>>16&255,e[59]=j>>>24&255,e[60]=B>>>0&255,e[61]=B>>>8&255,e[62]=B>>>16&255,e[63]=B>>>24&255}(e,t,r,n)}function w(e,t,r,n){!function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,l=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,c=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,d=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,f=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,g=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,m=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,y=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,v=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,b=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,x=o,E=s,k=a,S=l,T=u,M=c,A=d,P=h,C=f,_=p,I=g,O=m,L=y,R=v,j=b,B=w,N=0;N<20;N+=2)T^=(i=x+L|0)<<7|i>>>25,C^=(i=T+x|0)<<9|i>>>23,L^=(i=C+T|0)<<13|i>>>19,x^=(i=L+C|0)<<18|i>>>14,_^=(i=M+E|0)<<7|i>>>25,R^=(i=_+M|0)<<9|i>>>23,E^=(i=R+_|0)<<13|i>>>19,M^=(i=E+R|0)<<18|i>>>14,j^=(i=I+A|0)<<7|i>>>25,k^=(i=j+I|0)<<9|i>>>23,A^=(i=k+j|0)<<13|i>>>19,I^=(i=A+k|0)<<18|i>>>14,S^=(i=B+O|0)<<7|i>>>25,P^=(i=S+B|0)<<9|i>>>23,O^=(i=P+S|0)<<13|i>>>19,B^=(i=O+P|0)<<18|i>>>14,E^=(i=x+S|0)<<7|i>>>25,k^=(i=E+x|0)<<9|i>>>23,S^=(i=k+E|0)<<13|i>>>19,x^=(i=S+k|0)<<18|i>>>14,A^=(i=M+T|0)<<7|i>>>25,P^=(i=A+M|0)<<9|i>>>23,T^=(i=P+A|0)<<13|i>>>19,M^=(i=T+P|0)<<18|i>>>14,O^=(i=I+_|0)<<7|i>>>25,C^=(i=O+I|0)<<9|i>>>23,_^=(i=C+O|0)<<13|i>>>19,I^=(i=_+C|0)<<18|i>>>14,L^=(i=B+j|0)<<7|i>>>25,R^=(i=L+B|0)<<9|i>>>23,j^=(i=R+L|0)<<13|i>>>19,B^=(i=j+R|0)<<18|i>>>14;e[0]=x>>>0&255,e[1]=x>>>8&255,e[2]=x>>>16&255,e[3]=x>>>24&255,e[4]=M>>>0&255,e[5]=M>>>8&255,e[6]=M>>>16&255,e[7]=M>>>24&255,e[8]=I>>>0&255,e[9]=I>>>8&255,e[10]=I>>>16&255,e[11]=I>>>24&255,e[12]=B>>>0&255,e[13]=B>>>8&255,e[14]=B>>>16&255,e[15]=B>>>24&255,e[16]=A>>>0&255,e[17]=A>>>8&255,e[18]=A>>>16&255,e[19]=A>>>24&255,e[20]=P>>>0&255,e[21]=P>>>8&255,e[22]=P>>>16&255,e[23]=P>>>24&255,e[24]=C>>>0&255,e[25]=C>>>8&255,e[26]=C>>>16&255,e[27]=C>>>24&255,e[28]=_>>>0&255,e[29]=_>>>8&255,e[30]=_>>>16&255,e[31]=_>>>24&255}(e,t,r,n)}var x=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function E(e,t,r,n,i,o,s){var a,l,u=new Uint8Array(16),c=new Uint8Array(64);for(l=0;l<16;l++)u[l]=0;for(l=0;l<8;l++)u[l]=o[l];for(;i>=64;){for(b(c,u,s,x),l=0;l<64;l++)e[t+l]=r[n+l]^c[l];for(l=8,a=1;l<16;l++)a=a+(255&u[l])|0,u[l]=255&a,a>>>=8;i-=64,t+=64,n+=64}if(i>0)for(b(c,u,s,x),l=0;l<i;l++)e[t+l]=r[n+l]^c[l];return 0}function k(e,t,r,n,i){var o,s,a=new Uint8Array(16),l=new Uint8Array(64);for(s=0;s<16;s++)a[s]=0;for(s=0;s<8;s++)a[s]=n[s];for(;r>=64;){for(b(l,a,i,x),s=0;s<64;s++)e[t+s]=l[s];for(s=8,o=1;s<16;s++)o=o+(255&a[s])|0,a[s]=255&o,o>>>=8;r-=64,t+=64}if(r>0)for(b(l,a,i,x),s=0;s<r;s++)e[t+s]=l[s];return 0}function S(e,t,r,n,i){var o=new Uint8Array(32);w(o,n,i,x);for(var s=new Uint8Array(8),a=0;a<8;a++)s[a]=n[a+16];return k(e,t,r,s,o)}function T(e,t,r,n,i,o,s){var a=new Uint8Array(32);w(a,o,s,x);for(var l=new Uint8Array(8),u=0;u<8;u++)l[u]=o[u+16];return E(e,t,r,n,i,l,a)}var M=function(e){var t,r,n,i,o,s,a,l;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,r=255&e[2]|(255&e[3])<<8,this.r[1]=(t>>>13|r<<3)&8191,n=255&e[4]|(255&e[5])<<8,this.r[2]=(r>>>10|n<<6)&7939,i=255&e[6]|(255&e[7])<<8,this.r[3]=(n>>>7|i<<9)&8191,o=255&e[8]|(255&e[9])<<8,this.r[4]=(i>>>4|o<<12)&255,this.r[5]=o>>>1&8190,s=255&e[10]|(255&e[11])<<8,this.r[6]=(o>>>14|s<<2)&8191,a=255&e[12]|(255&e[13])<<8,this.r[7]=(s>>>11|a<<5)&8065,l=255&e[14]|(255&e[15])<<8,this.r[8]=(a>>>8|l<<8)&8191,this.r[9]=l>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function A(e,t,r,n,i,o){var s=new M(o);return s.update(r,n,i),s.finish(e,t),0}function P(e,t,r,n,i,o){var s=new Uint8Array(16);return A(s,0,r,n,i,o),y(e,t,s,0)}function C(e,t,r,n,i){var o;if(r<32)return -1;for(T(e,0,t,0,r,n,i),A(e,16,e,32,r-32,e),o=0;o<16;o++)e[o]=0;return 0}function _(e,t,r,n,i){var o,s=new Uint8Array(32);if(r<32||(S(s,0,32,n,i),0!==P(t,16,t,32,r-32,s)))return -1;for(T(e,0,t,0,r,n,i),o=0;o<32;o++)e[o]=0;return 0}function I(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function O(e){var t,r,n=1;for(t=0;t<16;t++)n=Math.floor((r=e[t]+n+65535)/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function L(e,t,r){for(var n,i=~(r-1),o=0;o<16;o++)n=i&(e[o]^t[o]),e[o]^=n,t[o]^=n}function R(e,t){var r,i,o,s=n(),a=n();for(r=0;r<16;r++)a[r]=t[r];for(O(a),O(a),O(a),i=0;i<2;i++){for(r=1,s[0]=a[0]-65517;r<15;r++)s[r]=a[r]-65535-(s[r-1]>>16&1),s[r-1]&=65535;s[15]=a[15]-32767-(s[14]>>16&1),o=s[15]>>16&1,s[14]&=65535,L(a,s,1-o)}for(r=0;r<16;r++)e[2*r]=255&a[r],e[2*r+1]=a[r]>>8}function j(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return R(r,e),R(n,t),v(r,0,n,0)}function B(e){var t=new Uint8Array(32);return R(t,e),1&t[0]}function N(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function D(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function K(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function U(e,t,r){var n,i,o=0,s=0,a=0,l=0,u=0,c=0,d=0,h=0,f=0,p=0,g=0,m=0,y=0,v=0,b=0,w=0,x=0,E=0,k=0,S=0,T=0,M=0,A=0,P=0,C=0,_=0,I=0,O=0,L=0,R=0,j=0,B=r[0],N=r[1],D=r[2],K=r[3],U=r[4],z=r[5],F=r[6],W=r[7],V=r[8],$=r[9],H=r[10],q=r[11],Z=r[12],G=r[13],J=r[14],Y=r[15];o+=(n=t[0])*B,s+=n*N,a+=n*D,l+=n*K,u+=n*U,c+=n*z,d+=n*F,h+=n*W,f+=n*V,p+=n*$,g+=n*H,m+=n*q,y+=n*Z,v+=n*G,b+=n*J,w+=n*Y,s+=(n=t[1])*B,a+=n*N,l+=n*D,u+=n*K,c+=n*U,d+=n*z,h+=n*F,f+=n*W,p+=n*V,g+=n*$,m+=n*H,y+=n*q,v+=n*Z,b+=n*G,w+=n*J,x+=n*Y,a+=(n=t[2])*B,l+=n*N,u+=n*D,c+=n*K,d+=n*U,h+=n*z,f+=n*F,p+=n*W,g+=n*V,m+=n*$,y+=n*H,v+=n*q,b+=n*Z,w+=n*G,x+=n*J,E+=n*Y,l+=(n=t[3])*B,u+=n*N,c+=n*D,d+=n*K,h+=n*U,f+=n*z,p+=n*F,g+=n*W,m+=n*V,y+=n*$,v+=n*H,b+=n*q,w+=n*Z,x+=n*G,E+=n*J,k+=n*Y,u+=(n=t[4])*B,c+=n*N,d+=n*D,h+=n*K,f+=n*U,p+=n*z,g+=n*F,m+=n*W,y+=n*V,v+=n*$,b+=n*H,w+=n*q,x+=n*Z,E+=n*G,k+=n*J,S+=n*Y,c+=(n=t[5])*B,d+=n*N,h+=n*D,f+=n*K,p+=n*U,g+=n*z,m+=n*F,y+=n*W,v+=n*V,b+=n*$,w+=n*H,x+=n*q,E+=n*Z,k+=n*G,S+=n*J,T+=n*Y,d+=(n=t[6])*B,h+=n*N,f+=n*D,p+=n*K,g+=n*U,m+=n*z,y+=n*F,v+=n*W,b+=n*V,w+=n*$,x+=n*H,E+=n*q,k+=n*Z,S+=n*G,T+=n*J,M+=n*Y,h+=(n=t[7])*B,f+=n*N,p+=n*D,g+=n*K,m+=n*U,y+=n*z,v+=n*F,b+=n*W,w+=n*V,x+=n*$,E+=n*H,k+=n*q,S+=n*Z,T+=n*G,M+=n*J,A+=n*Y,f+=(n=t[8])*B,p+=n*N,g+=n*D,m+=n*K,y+=n*U,v+=n*z,b+=n*F,w+=n*W,x+=n*V,E+=n*$,k+=n*H,S+=n*q,T+=n*Z,M+=n*G,A+=n*J,P+=n*Y,p+=(n=t[9])*B,g+=n*N,m+=n*D,y+=n*K,v+=n*U,b+=n*z,w+=n*F,x+=n*W,E+=n*V,k+=n*$,S+=n*H,T+=n*q,M+=n*Z,A+=n*G,P+=n*J,C+=n*Y,g+=(n=t[10])*B,m+=n*N,y+=n*D,v+=n*K,b+=n*U,w+=n*z,x+=n*F,E+=n*W,k+=n*V,S+=n*$,T+=n*H,M+=n*q,A+=n*Z,P+=n*G,C+=n*J,_+=n*Y,m+=(n=t[11])*B,y+=n*N,v+=n*D,b+=n*K,w+=n*U,x+=n*z,E+=n*F,k+=n*W,S+=n*V,T+=n*$,M+=n*H,A+=n*q,P+=n*Z,C+=n*G,_+=n*J,I+=n*Y,y+=(n=t[12])*B,v+=n*N,b+=n*D,w+=n*K,x+=n*U,E+=n*z,k+=n*F,S+=n*W,T+=n*V,M+=n*$,A+=n*H,P+=n*q,C+=n*Z,_+=n*G,I+=n*J,O+=n*Y,v+=(n=t[13])*B,b+=n*N,w+=n*D,x+=n*K,E+=n*U,k+=n*z,S+=n*F,T+=n*W,M+=n*V,A+=n*$,P+=n*H,C+=n*q,_+=n*Z,I+=n*G,O+=n*J,L+=n*Y,b+=(n=t[14])*B,w+=n*N,x+=n*D,E+=n*K,k+=n*U,S+=n*z,T+=n*F,M+=n*W,A+=n*V,P+=n*$,C+=n*H,_+=n*q,I+=n*Z,O+=n*G,L+=n*J,R+=n*Y,w+=(n=t[15])*B,x+=n*N,E+=n*D,k+=n*K,S+=n*U,T+=n*z,M+=n*F,A+=n*W,P+=n*V,C+=n*$,_+=n*H,I+=n*q,O+=n*Z,L+=n*G,R+=n*J,j+=n*Y,o+=38*x,s+=38*E,a+=38*k,l+=38*S,u+=38*T,c+=38*M,d+=38*A,h+=38*P,f+=38*C,p+=38*_,g+=38*I,m+=38*O,y+=38*L,v+=38*R,b+=38*j,i=Math.floor((n=o+(i=1)+65535)/65536),o=n-65536*i,i=Math.floor((n=s+i+65535)/65536),s=n-65536*i,i=Math.floor((n=a+i+65535)/65536),a=n-65536*i,i=Math.floor((n=l+i+65535)/65536),l=n-65536*i,i=Math.floor((n=u+i+65535)/65536),u=n-65536*i,i=Math.floor((n=c+i+65535)/65536),c=n-65536*i,i=Math.floor((n=d+i+65535)/65536),d=n-65536*i,i=Math.floor((n=h+i+65535)/65536),h=n-65536*i,i=Math.floor((n=f+i+65535)/65536),f=n-65536*i,i=Math.floor((n=p+i+65535)/65536),p=n-65536*i,i=Math.floor((n=g+i+65535)/65536),g=n-65536*i,i=Math.floor((n=m+i+65535)/65536),m=n-65536*i,i=Math.floor((n=y+i+65535)/65536),y=n-65536*i,i=Math.floor((n=v+i+65535)/65536),v=n-65536*i,i=Math.floor((n=b+i+65535)/65536),b=n-65536*i,i=Math.floor((n=w+i+65535)/65536),w=n-65536*i,o+=i-1+37*(i-1),i=Math.floor((n=o+(i=1)+65535)/65536),o=n-65536*i,i=Math.floor((n=s+i+65535)/65536),s=n-65536*i,i=Math.floor((n=a+i+65535)/65536),a=n-65536*i,i=Math.floor((n=l+i+65535)/65536),l=n-65536*i,i=Math.floor((n=u+i+65535)/65536),u=n-65536*i,i=Math.floor((n=c+i+65535)/65536),c=n-65536*i,i=Math.floor((n=d+i+65535)/65536),d=n-65536*i,i=Math.floor((n=h+i+65535)/65536),h=n-65536*i,i=Math.floor((n=f+i+65535)/65536),f=n-65536*i,i=Math.floor((n=p+i+65535)/65536),p=n-65536*i,i=Math.floor((n=g+i+65535)/65536),g=n-65536*i,i=Math.floor((n=m+i+65535)/65536),m=n-65536*i,i=Math.floor((n=y+i+65535)/65536),y=n-65536*i,i=Math.floor((n=v+i+65535)/65536),v=n-65536*i,i=Math.floor((n=b+i+65535)/65536),b=n-65536*i,i=Math.floor((n=w+i+65535)/65536),w=n-65536*i,o+=i-1+37*(i-1),e[0]=o,e[1]=s,e[2]=a,e[3]=l,e[4]=u,e[5]=c,e[6]=d,e[7]=h,e[8]=f,e[9]=p,e[10]=g,e[11]=m,e[12]=y,e[13]=v,e[14]=b,e[15]=w}function z(e,t){U(e,t,t)}function F(e,t){var r,i=n();for(r=0;r<16;r++)i[r]=t[r];for(r=253;r>=0;r--)z(i,i),2!==r&&4!==r&&U(i,i,t);for(r=0;r<16;r++)e[r]=i[r]}function W(e,t){var r,i=n();for(r=0;r<16;r++)i[r]=t[r];for(r=250;r>=0;r--)z(i,i),1!==r&&U(i,i,t);for(r=0;r<16;r++)e[r]=i[r]}function V(e,t,r){var i,o,s=new Uint8Array(32),a=new Float64Array(80),l=n(),c=n(),d=n(),h=n(),f=n(),p=n();for(o=0;o<31;o++)s[o]=t[o];for(s[31]=127&t[31]|64,s[0]&=248,N(a,r),o=0;o<16;o++)c[o]=a[o],h[o]=l[o]=d[o]=0;for(o=254,l[0]=h[0]=1;o>=0;--o)L(l,c,i=s[o>>>3]>>>(7&o)&1),L(d,h,i),D(f,l,d),K(l,l,d),D(d,c,h),K(c,c,h),z(h,f),z(p,l),U(l,d,l),U(d,c,f),D(f,l,d),K(l,l,d),z(c,l),K(d,h,p),U(l,d,u),D(l,l,h),U(d,d,l),U(l,h,p),U(h,c,a),z(c,f),L(l,c,i),L(d,h,i);for(o=0;o<16;o++)a[o+16]=l[o],a[o+32]=d[o],a[o+48]=c[o],a[o+64]=h[o];var g=a.subarray(32),m=a.subarray(16);return F(g,g),U(m,m,g),R(e,m),0}function $(e,t){return V(e,t,s)}function H(e,t){return i(t,32),$(e,t)}function q(e,t,r){var n=new Uint8Array(32);return V(n,r,t),w(e,o,n,x)}M.prototype.blocks=function(e,t,r){for(var n,i,o,s,a,l,u,c,d,h,f,p,g,m,y,v,b,w,x,E=this.fin?0:2048,k=this.h[0],S=this.h[1],T=this.h[2],M=this.h[3],A=this.h[4],P=this.h[5],C=this.h[6],_=this.h[7],I=this.h[8],O=this.h[9],L=this.r[0],R=this.r[1],j=this.r[2],B=this.r[3],N=this.r[4],D=this.r[5],K=this.r[6],U=this.r[7],z=this.r[8],F=this.r[9];r>=16;)k+=8191&(n=255&e[t+0]|(255&e[t+1])<<8),S+=(n>>>13|(i=255&e[t+2]|(255&e[t+3])<<8)<<3)&8191,T+=(i>>>10|(o=255&e[t+4]|(255&e[t+5])<<8)<<6)&8191,M+=(o>>>7|(s=255&e[t+6]|(255&e[t+7])<<8)<<9)&8191,A+=(s>>>4|(a=255&e[t+8]|(255&e[t+9])<<8)<<12)&8191,P+=a>>>1&8191,C+=(a>>>14|(l=255&e[t+10]|(255&e[t+11])<<8)<<2)&8191,_+=(l>>>11|(u=255&e[t+12]|(255&e[t+13])<<8)<<5)&8191,I+=(u>>>8|(c=255&e[t+14]|(255&e[t+15])<<8)<<8)&8191,O+=c>>>5|E,d=(h=(d=0)+k*L+5*F*S+5*z*T+5*U*M+5*K*A)>>>13,h&=8191,h+=5*D*P+5*N*C+5*B*_+5*j*I+5*R*O,d+=h>>>13,h&=8191,d=(f=d+k*R+S*L+5*F*T+5*z*M+5*U*A)>>>13,f&=8191,f+=5*K*P+5*D*C+5*N*_+5*B*I+5*j*O,d+=f>>>13,f&=8191,d=(p=d+k*j+S*R+T*L+5*F*M+5*z*A)>>>13,p&=8191,p+=5*U*P+5*K*C+5*D*_+5*N*I+5*B*O,d+=p>>>13,p&=8191,d=(g=d+k*B+S*j+T*R+M*L+5*F*A)>>>13,g&=8191,g+=5*z*P+5*U*C+5*K*_+5*D*I+5*N*O,d+=g>>>13,g&=8191,d=(m=d+k*N+S*B+T*j+M*R+A*L)>>>13,m&=8191,m+=5*F*P+5*z*C+5*U*_+5*K*I+5*D*O,d+=m>>>13,m&=8191,d=(y=d+k*D+S*N+T*B+M*j+A*R)>>>13,y&=8191,y+=P*L+5*F*C+5*z*_+5*U*I+5*K*O,d+=y>>>13,y&=8191,d=(v=d+k*K+S*D+T*N+M*B+A*j)>>>13,v&=8191,v+=P*R+C*L+5*F*_+5*z*I+5*U*O,d+=v>>>13,v&=8191,d=(b=d+k*U+S*K+T*D+M*N+A*B)>>>13,b&=8191,b+=P*j+C*R+_*L+5*F*I+5*z*O,d+=b>>>13,b&=8191,d=(w=d+k*z+S*U+T*K+M*D+A*N)>>>13,w&=8191,w+=P*B+C*j+_*R+I*L+5*F*O,d+=w>>>13,w&=8191,d=(x=d+k*F+S*z+T*U+M*K+A*D)>>>13,x&=8191,x+=P*N+C*B+_*j+I*R+O*L,d+=x>>>13,x&=8191,h=8191&(d=(d=(d<<2)+d|0)+h|0),d>>>=13,f+=d,k=h,S=f,T=p,M=g,A=m,P=y,C=v,_=b,I=w,O=x,t+=16,r-=16;this.h[0]=k,this.h[1]=S,this.h[2]=T,this.h[3]=M,this.h[4]=A,this.h[5]=P,this.h[6]=C,this.h[7]=_,this.h[8]=I,this.h[9]=O},M.prototype.finish=function(e,t){var r,n,i,o,s=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=r,r=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,s[0]=this.h[0]+5,r=s[0]>>>13,s[0]&=8191,o=1;o<10;o++)s[o]=this.h[o]+r,r=s[o]>>>13,s[o]&=8191;for(s[9]-=8192,n=(1^r)-1,o=0;o<10;o++)s[o]&=n;for(o=0,n=~n;o<10;o++)this.h[o]=this.h[o]&n|s[o];for(o=1,this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,i=this.h[0]+this.pad[0],this.h[0]=65535&i;o<8;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},M.prototype.update=function(e,t,r){var n,i;if(this.leftover){for((i=16-this.leftover)>r&&(i=r),n=0;n<i;n++)this.buffer[this.leftover+n]=e[t+n];if(r-=i,t+=i,this.leftover+=i,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(r>=16&&(i=r-r%16,this.blocks(e,t,i),t+=i,r-=i),r){for(n=0;n<r;n++)this.buffer[this.leftover+n]=e[t+n];this.leftover+=r}};var Z=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function G(e,t,r,n){for(var i,o,s,a,l,u,c,d,h,f,p,g,m,y,v,b,w,x,E,k,S,T,M,A,P,C,_=new Int32Array(16),I=new Int32Array(16),O=e[0],L=e[1],R=e[2],j=e[3],B=e[4],N=e[5],D=e[6],K=e[7],U=t[0],z=t[1],F=t[2],W=t[3],V=t[4],$=t[5],H=t[6],q=t[7],G=0;n>=128;){for(E=0;E<16;E++)k=8*E+G,_[E]=r[k+0]<<24|r[k+1]<<16|r[k+2]<<8|r[k+3],I[E]=r[k+4]<<24|r[k+5]<<16|r[k+6]<<8|r[k+7];for(E=0;E<80;E++)if(i=O,o=L,s=R,a=j,l=B,u=N,c=D,d=K,h=U,f=z,p=F,g=W,m=V,y=$,v=H,b=q,S=K,M=65535&(T=q),A=T>>>16,P=65535&S,C=S>>>16,S=(B>>>14|V<<18)^(B>>>18|V<<14)^(V>>>9|B<<23),M+=65535&(T=(V>>>14|B<<18)^(V>>>18|B<<14)^(B>>>9|V<<23)),A+=T>>>16,P+=65535&S,C+=S>>>16,S=B&N^~B&D,M+=65535&(T=V&$^~V&H),A+=T>>>16,P+=65535&S,C+=S>>>16,S=Z[2*E],M+=65535&(T=Z[2*E+1]),A+=T>>>16,P+=65535&S,C+=S>>>16,S=_[E%16],M+=65535&(T=I[E%16]),A+=T>>>16,P+=65535&S,C+=S>>>16,A+=M>>>16,P+=A>>>16,C+=P>>>16,w=65535&P|C<<16,x=65535&M|A<<16,S=w,M=65535&(T=x),A=T>>>16,P=65535&S,C=S>>>16,S=(O>>>28|U<<4)^(U>>>2|O<<30)^(U>>>7|O<<25),M+=65535&(T=(U>>>28|O<<4)^(O>>>2|U<<30)^(O>>>7|U<<25)),A+=T>>>16,P+=65535&S,C+=S>>>16,S=O&L^O&R^L&R,M+=65535&(T=U&z^U&F^z&F),A+=T>>>16,P+=65535&S,C+=S>>>16,A+=M>>>16,P+=A>>>16,C+=P>>>16,d=65535&P|C<<16,b=65535&M|A<<16,S=a,M=65535&(T=g),A=T>>>16,P=65535&S,C=S>>>16,S=w,M+=65535&(T=x),A+=T>>>16,P+=65535&S,C+=S>>>16,A+=M>>>16,P+=A>>>16,C+=P>>>16,a=65535&P|C<<16,g=65535&M|A<<16,L=i,R=o,j=s,B=a,N=l,D=u,K=c,O=d,z=h,F=f,W=p,V=g,$=m,H=y,q=v,U=b,E%16==15)for(k=0;k<16;k++)S=_[k],M=65535&(T=I[k]),A=T>>>16,P=65535&S,C=S>>>16,S=_[(k+9)%16],M+=65535&(T=I[(k+9)%16]),A+=T>>>16,P+=65535&S,C+=S>>>16,S=((w=_[(k+1)%16])>>>1|(x=I[(k+1)%16])<<31)^(w>>>8|x<<24)^w>>>7,M+=65535&(T=(x>>>1|w<<31)^(x>>>8|w<<24)^(x>>>7|w<<25)),A+=T>>>16,P+=65535&S,C+=S>>>16,S=((w=_[(k+14)%16])>>>19|(x=I[(k+14)%16])<<13)^(x>>>29|w<<3)^w>>>6,M+=65535&(T=(x>>>19|w<<13)^(w>>>29|x<<3)^(x>>>6|w<<26)),A+=T>>>16,P+=65535&S,C+=S>>>16,A+=M>>>16,P+=A>>>16,C+=P>>>16,_[k]=65535&P|C<<16,I[k]=65535&M|A<<16;S=O,M=65535&(T=U),A=T>>>16,P=65535&S,C=S>>>16,S=e[0],M+=65535&(T=t[0]),A+=T>>>16,P+=65535&S,C+=S>>>16,A+=M>>>16,P+=A>>>16,C+=P>>>16,e[0]=O=65535&P|C<<16,t[0]=U=65535&M|A<<16,S=L,M=65535&(T=z),A=T>>>16,P=65535&S,C=S>>>16,S=e[1],M+=65535&(T=t[1]),A+=T>>>16,P+=65535&S,C+=S>>>16,A+=M>>>16,P+=A>>>16,C+=P>>>16,e[1]=L=65535&P|C<<16,t[1]=z=65535&M|A<<16,S=R,M=65535&(T=F),A=T>>>16,P=65535&S,C=S>>>16,S=e[2],M+=65535&(T=t[2]),A+=T>>>16,P+=65535&S,C+=S>>>16,A+=M>>>16,P+=A>>>16,C+=P>>>16,e[2]=R=65535&P|C<<16,t[2]=F=65535&M|A<<16,S=j,M=65535&(T=W),A=T>>>16,P=65535&S,C=S>>>16,S=e[3],M+=65535&(T=t[3]),A+=T>>>16,P+=65535&S,C+=S>>>16,A+=M>>>16,P+=A>>>16,C+=P>>>16,e[3]=j=65535&P|C<<16,t[3]=W=65535&M|A<<16,S=B,M=65535&(T=V),A=T>>>16,P=65535&S,C=S>>>16,S=e[4],M+=65535&(T=t[4]),A+=T>>>16,P+=65535&S,C+=S>>>16,A+=M>>>16,P+=A>>>16,C+=P>>>16,e[4]=B=65535&P|C<<16,t[4]=V=65535&M|A<<16,S=N,M=65535&(T=$),A=T>>>16,P=65535&S,C=S>>>16,S=e[5],M+=65535&(T=t[5]),A+=T>>>16,P+=65535&S,C+=S>>>16,A+=M>>>16,P+=A>>>16,C+=P>>>16,e[5]=N=65535&P|C<<16,t[5]=$=65535&M|A<<16,S=D,M=65535&(T=H),A=T>>>16,P=65535&S,C=S>>>16,S=e[6],M+=65535&(T=t[6]),A+=T>>>16,P+=65535&S,C+=S>>>16,A+=M>>>16,P+=A>>>16,C+=P>>>16,e[6]=D=65535&P|C<<16,t[6]=H=65535&M|A<<16,S=K,M=65535&(T=q),A=T>>>16,P=65535&S,C=S>>>16,S=e[7],M+=65535&(T=t[7]),A+=T>>>16,P+=65535&S,C+=S>>>16,A+=M>>>16,P+=A>>>16,C+=P>>>16,e[7]=K=65535&P|C<<16,t[7]=q=65535&M|A<<16,G+=128,n-=128}return n}function J(e,t,r){var n,i=new Int32Array(8),o=new Int32Array(8),s=new Uint8Array(256),a=r;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,G(i,o,t,r),r%=128,n=0;n<r;n++)s[n]=t[a-r+n];for(s[r]=128,s[(r=256-128*(r<112?1:0))-9]=0,g(s,r-8,a/536870912|0,a<<3),G(i,o,s,r),n=0;n<8;n++)g(e,8*n,i[n],o[n]);return 0}function Y(e,t){var r=n(),i=n(),o=n(),s=n(),a=n(),l=n(),u=n(),c=n(),h=n();K(r,e[1],e[0]),K(h,t[1],t[0]),U(r,r,h),D(i,e[0],e[1]),D(h,t[0],t[1]),U(i,i,h),U(o,e[3],t[3]),U(o,o,d),U(s,e[2],t[2]),D(s,s,s),K(a,i,r),K(l,s,o),D(u,s,o),D(c,i,r),U(e[0],a,l),U(e[1],c,u),U(e[2],u,l),U(e[3],a,c)}function X(e,t,r){var n;for(n=0;n<4;n++)L(e[n],t[n],r)}function Q(e,t){var r=n(),i=n(),o=n();F(o,t[2]),U(r,t[0],o),U(i,t[1],o),R(e,i),e[31]^=B(r)<<7}function ee(e,t,r){var n,i;for(I(e[0],a),I(e[1],l),I(e[2],l),I(e[3],a),i=255;i>=0;--i)X(e,t,n=r[i/8|0]>>(7&i)&1),Y(t,e),Y(e,e),X(e,t,n)}function et(e,t){var r=[n(),n(),n(),n()];I(r[0],h),I(r[1],f),I(r[2],l),U(r[3],h,f),ee(e,r,t)}function er(e,t,r){var o,s=new Uint8Array(64),a=[n(),n(),n(),n()];for(r||i(t,32),J(s,t,32),s[0]&=248,s[31]&=127,s[31]|=64,et(a,s),Q(e,a),o=0;o<32;o++)t[o+32]=e[o];return 0}var en=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function ei(e,t){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i<o;++i)t[i]+=r-16*t[n]*en[i-(n-32)],r=Math.floor((t[i]+128)/256),t[i]-=256*r;t[i]+=r,t[n]=0}for(i=0,r=0;i<32;i++)t[i]+=r-(t[31]>>4)*en[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=r*en[i];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function eo(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;ei(e,r)}function es(e,t,r,i){var o,s,a=new Uint8Array(64),l=new Uint8Array(64),u=new Uint8Array(64),c=new Float64Array(64),d=[n(),n(),n(),n()];for(J(a,i,32),a[0]&=248,a[31]&=127,a[31]|=64,o=0;o<r;o++)e[64+o]=t[o];for(o=0;o<32;o++)e[32+o]=a[32+o];for(J(u,e.subarray(32),r+32),eo(u),et(d,u),Q(e,d),o=32;o<64;o++)e[o]=i[o];for(J(l,e,r+64),eo(l),o=0;o<64;o++)c[o]=0;for(o=0;o<32;o++)c[o]=u[o];for(o=0;o<32;o++)for(s=0;s<32;s++)c[o+s]+=l[o]*a[s];return ei(e.subarray(32),c),r+64}function ea(e,t,r,i){var o,s,u,d,h,f,g,m,y=new Uint8Array(32),b=new Uint8Array(64),w=[n(),n(),n(),n()],x=[n(),n(),n(),n()];if(r<64||(o=n(),s=n(),u=n(),d=n(),h=n(),f=n(),g=n(),(I(x[2],l),N(x[1],i),z(u,x[1]),U(d,u,c),K(u,u,x[2]),D(d,x[2],d),z(h,d),z(f,h),U(g,f,h),U(o,g,u),U(o,o,d),W(o,o),U(o,o,u),U(o,o,d),U(o,o,d),U(x[0],o,d),z(s,x[0]),U(s,s,d),j(s,u)&&U(x[0],x[0],p),z(s,x[0]),U(s,s,d),j(s,u))?-1:(B(x[0])===i[31]>>7&&K(x[0],a,x[0]),U(x[3],x[0],x[1]),0)))return -1;for(m=0;m<r;m++)e[m]=t[m];for(m=0;m<32;m++)e[m+32]=i[m];if(J(b,e,r),eo(b),ee(w,x,b),et(x,t.subarray(32)),Y(w,x),Q(y,w),r-=64,v(t,0,y,0)){for(m=0;m<r;m++)e[m]=0;return -1}for(m=0;m<r;m++)e[m]=t[m+64];return r}function el(e,t){if(32!==e.length)throw Error("bad key size");if(24!==t.length)throw Error("bad nonce size")}function eu(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw TypeError("unexpected type, use Uint8Array")}function ec(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:w,crypto_stream_xor:T,crypto_stream:S,crypto_stream_salsa20_xor:E,crypto_stream_salsa20:k,crypto_onetimeauth:A,crypto_onetimeauth_verify:P,crypto_verify_16:y,crypto_verify_32:v,crypto_secretbox:C,crypto_secretbox_open:_,crypto_scalarmult:V,crypto_scalarmult_base:$,crypto_box_beforenm:q,crypto_box_afternm:C,crypto_box:function(e,t,r,n,i,o){var s=new Uint8Array(32);return q(s,i,o),C(e,t,r,n,s)},crypto_box_open:function(e,t,r,n,i,o){var s=new Uint8Array(32);return q(s,i,o),_(e,t,r,n,s)},crypto_box_keypair:H,crypto_hash:J,crypto_sign:es,crypto_sign_keypair:er,crypto_sign_open:ea,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:64,crypto_sign_PUBLICKEYBYTES:32,crypto_sign_SECRETKEYBYTES:64,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:n,D:c,L:en,pack25519:R,unpack25519:N,M:U,A:D,S:z,Z:K,pow2523:W,add:Y,set25519:I,modL:ei,scalarmult:ee,scalarbase:et},e.randomBytes=function(e){var t=new Uint8Array(e);return i(t,e),t},e.secretbox=function(e,t,r){eu(e,t,r),el(r,t);for(var n=new Uint8Array(32+e.length),i=new Uint8Array(n.length),o=0;o<e.length;o++)n[o+32]=e[o];return C(i,n,n.length,t,r),i.subarray(16)},e.secretbox.open=function(e,t,r){eu(e,t,r),el(r,t);for(var n=new Uint8Array(16+e.length),i=new Uint8Array(n.length),o=0;o<e.length;o++)n[o+16]=e[o];return n.length<32||0!==_(i,n,n.length,t,r)?null:i.subarray(32)},e.secretbox.keyLength=32,e.secretbox.nonceLength=24,e.secretbox.overheadLength=16,e.scalarMult=function(e,t){if(eu(e,t),32!==e.length)throw Error("bad n size");if(32!==t.length)throw Error("bad p size");var r=new Uint8Array(32);return V(r,e,t),r},e.scalarMult.base=function(e){if(eu(e),32!==e.length)throw Error("bad n size");var t=new Uint8Array(32);return $(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,r,n,i){var o=e.box.before(n,i);return e.secretbox(t,r,o)},e.box.before=function(e,t){eu(e,t),function(e,t){if(32!==e.length)throw Error("bad public key size");if(32!==t.length)throw Error("bad secret key size")}(e,t);var r=new Uint8Array(32);return q(r,e,t),r},e.box.after=e.secretbox,e.box.open=function(t,r,n,i){var o=e.box.before(n,i);return e.secretbox.open(t,r,o)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(32);return H(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(eu(e),32!==e.length)throw Error("bad secret key size");var t=new Uint8Array(32);return $(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},e.box.publicKeyLength=32,e.box.secretKeyLength=32,e.box.sharedKeyLength=32,e.box.nonceLength=24,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(e,t){if(eu(e,t),64!==t.length)throw Error("bad secret key size");var r=new Uint8Array(64+e.length);return es(r,e,e.length,t),r},e.sign.open=function(e,t){if(eu(e,t),32!==t.length)throw Error("bad public key size");var r=new Uint8Array(e.length),n=ea(r,e,e.length,t);if(n<0)return null;for(var i=new Uint8Array(n),o=0;o<i.length;o++)i[o]=r[o];return i},e.sign.detached=function(t,r){for(var n=e.sign(t,r),i=new Uint8Array(64),o=0;o<i.length;o++)i[o]=n[o];return i},e.sign.detached.verify=function(e,t,r){if(eu(e,t,r),64!==t.length)throw Error("bad signature size");if(32!==r.length)throw Error("bad public key size");var n,i=new Uint8Array(64+e.length),o=new Uint8Array(64+e.length);for(n=0;n<64;n++)i[n]=t[n];for(n=0;n<e.length;n++)i[n+64]=e[n];return ea(o,i,i.length,r)>=0},e.sign.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(64);return er(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(eu(e),64!==e.length)throw Error("bad secret key size");for(var t=new Uint8Array(32),r=0;r<t.length;r++)t[r]=e[32+r];return{publicKey:t,secretKey:new Uint8Array(e)}},e.sign.keyPair.fromSeed=function(e){if(eu(e),32!==e.length)throw Error("bad seed size");for(var t=new Uint8Array(32),r=new Uint8Array(64),n=0;n<32;n++)r[n]=e[n];return er(t,r,!0),{publicKey:t,secretKey:r}},e.sign.publicKeyLength=32,e.sign.secretKeyLength=64,e.sign.seedLength=32,e.sign.signatureLength=64,e.hash=function(e){eu(e);var t=new Uint8Array(64);return J(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return eu(e,t),0!==e.length&&0!==t.length&&e.length===t.length&&0===m(e,0,t,0,e.length)},e.setPRNG=function(e){i=e},(t="undefined"!=typeof self?self.crypto||self.msCrypto:null)&&t.getRandomValues?e.setPRNG(function(e,r){var n,i=new Uint8Array(r);for(n=0;n<r;n+=65536)t.getRandomValues(i.subarray(n,n+Math.min(r-n,65536)));for(n=0;n<r;n++)e[n]=i[n];ec(i)}):(t=r(55024))&&t.randomBytes&&e.setPRNG(function(e,r){var n,i=t.randomBytes(r);for(n=0;n<r;n++)e[n]=i[n];ec(i)})}(e.exports?e.exports:self.nacl=self.nacl||{})},74880:function(e,t,r){"use strict";r.d(t,{v4:function(){return u}});for(var n,i=new Uint8Array(16),o=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,s=[],a=0;a<256;++a)s.push((a+256).toString(16).substr(1));var l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]).toLowerCase();if(!("string"==typeof r&&o.test(r)))throw TypeError("Stringified UUID is invalid");return r},u=function(e,t,r){var o=(e=e||{}).random||(e.rng||function(){if(!n&&!(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(i)})();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){r=r||0;for(var s=0;s<16;++s)t[r+s]=o[s];return t}return l(o)}},11922:function(){},71456:function(){},55024:function(){},43837:function(e,t,r){"use strict";r.d(t,{J:function(){return n}});var n=(e,t,r,n)=>{var i,o;let s=null==t?void 0:t.current,a=(null==(o=null==(i=null==e?void 0:e.children)?void 0:i[0])?void 0:o.getAttribute("role"))==="dialog";return s&&s.contains(e)?n&&(n.current=!0):(n&&(n.current=!1),a||r.close()),a}},10902:function(e,t,r){"use strict";r.d(t,{VS:function(){return n},Yv:function(){return o},Yx:function(){return i},sK:function(){return s}});var n=e=>{let t={top:{originY:1},bottom:{originY:0},left:{originX:1},right:{originX:0},"top-start":{originX:0,originY:1},"top-end":{originX:1,originY:1},"bottom-start":{originX:0,originY:0},"bottom-end":{originX:1,originY:0},"right-start":{originX:0,originY:0},"right-end":{originX:0,originY:1},"left-start":{originX:1,originY:0},"left-end":{originX:1,originY:1}};return(null==t?void 0:t[e])||{}},i=e=>({top:"top",bottom:"bottom",left:"left",right:"right","top-start":"top start","top-end":"top end","bottom-start":"bottom start","bottom-end":"bottom end","left-start":"left top","left-end":"left bottom","right-start":"right top","right-end":"right bottom"})[e],o=(e,t)=>{if(t.includes("-")){let[r]=t.split("-");if(r.includes(e))return!1}return!0},s=(e,t)=>{if(t.includes("-")){let[,r]=t.split("-");return`${e}-${r}`}return e}},27967:function(e,t,r){"use strict";r.d(t,{D:function(){return n},M:function(){return i}});var[n,i]=(0,r(46347).k)({name:"ButtonGroupContext",strict:!1})},91607:function(e,t,r){"use strict";r.d(t,{A:function(){return z}});var n=r(27967),i=r(76733),o=r(50262),s=r(67294),a=r(28628),l=r(11086),u=r(28349),c=r(33295),d=r(27963),h=r(35653),f=r(7436),p=r(68806),g=r(26301),m=r(78837);new WeakMap,s.createContext({register:()=>{}}).displayName="PressResponderContext";Symbol("linkClicked");let y=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),v=new Set,b=new Map,w=!1,x=!1;function E(e,t){for(let r of v)r(e,t)}function k(e){w=!0,e.metaKey||!(0,p.V5)()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||E("keyboard",e)}function S(e){("mousedown"===e.type||"pointerdown"===e.type)&&(w=!0,E("pointer",e))}function T(e){(0,g.Z)(e)&&(w=!0)}function M(e){e.target!==window&&e.target!==document&&(w||x||E("virtual",e),w=!1,x=!1)}function A(){w=!1,x=!0}function P(e){if("undefined"==typeof window||b.get((0,m.k)(e)))return;let t=(0,m.k)(e),r=(0,m.r)(e),n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){w=!0,n.apply(this,arguments)},r.addEventListener("keydown",k,!0),r.addEventListener("keyup",k,!0),r.addEventListener("click",T,!0),t.addEventListener("focus",M,!0),t.addEventListener("blur",A,!1),"undefined"!=typeof PointerEvent?(r.addEventListener("pointerdown",S,!0),r.addEventListener("pointermove",S,!0),r.addEventListener("pointerup",S,!0)):(r.addEventListener("mousedown",S,!0),r.addEventListener("mousemove",S,!0),r.addEventListener("mouseup",S,!0)),t.addEventListener("beforeunload",()=>{C(e)},{once:!0}),b.set(t,{focus:n})}let C=(e,t)=>{let r=(0,m.k)(e),n=(0,m.r)(e);t&&n.removeEventListener("DOMContentLoaded",t),b.has(r)&&(r.HTMLElement.prototype.focus=b.get(r).focus,n.removeEventListener("keydown",k,!0),n.removeEventListener("keyup",k,!0),n.removeEventListener("click",T,!0),r.removeEventListener("focus",M,!0),r.removeEventListener("blur",A,!1),"undefined"!=typeof PointerEvent?(n.removeEventListener("pointerdown",S,!0),n.removeEventListener("pointermove",S,!0),n.removeEventListener("pointerup",S,!0)):(n.removeEventListener("mousedown",S,!0),n.removeEventListener("mousemove",S,!0),n.removeEventListener("mouseup",S,!0)),b.delete(r))};"undefined"!=typeof document&&function(e){let t;let r=(0,m.r)(void 0);"loading"!==r.readyState?P(void 0):(t=()=>{P(void 0)},r.addEventListener("DOMContentLoaded",t)),()=>C(e,t)}();let _=!1,I=0;function O(){_=!0,setTimeout(()=>{_=!1},50)}function L(e){"touch"===e.pointerType&&O()}function R(){if("undefined"!=typeof document)return"undefined"!=typeof PointerEvent?document.addEventListener("pointerup",L):document.addEventListener("touchend",O),I++,()=>{--I>0||("undefined"!=typeof PointerEvent?document.removeEventListener("pointerup",L):document.removeEventListener("touchend",O))}}var j=r(10918),B=r(34863),N=r(61394),D=r(15607),K=r(85893),U=(0,D.Gp)((e,t)=>{let{Component:r,domRef:p,children:g,styles:m,spinnerSize:y,spinner:v=(0,K.jsx)(B.c,{color:"current",size:y}),spinnerPlacement:b,startContent:w,endContent:x,isLoading:E,disableRipple:k,getButtonProps:S,getRippleProps:T,isIconOnly:M}=function(e){var t,r,p,g,m,y,v,b,w;let x=(0,n.M)(),E=(0,i.w)(),k=!!x,{ref:S,as:T,children:M,startContent:A,endContent:P,autoFocus:C,className:I,spinner:O,isLoading:L=!1,disableRipple:B=!1,fullWidth:N=null!=(t=null==x?void 0:x.fullWidth)&&t,radius:D=null==x?void 0:x.radius,size:K=null!=(r=null==x?void 0:x.size)?r:"md",color:U=null!=(p=null==x?void 0:x.color)?p:"default",variant:z=null!=(g=null==x?void 0:x.variant)?g:"solid",disableAnimation:F=null!=(y=null!=(m=null==x?void 0:x.disableAnimation)?m:null==E?void 0:E.disableAnimation)&&y,isDisabled:W=null!=(v=null==x?void 0:x.isDisabled)&&v,isIconOnly:V=null!=(b=null==x?void 0:x.isIconOnly)&&b,spinnerPlacement:$="start",onPress:H,onClick:q,...Z}=e,G=T||"button",J="string"==typeof G,Y=(0,c.gy)(S),X=null!=(w=B||(null==E?void 0:E.disableRipple))?w:F,{isFocusVisible:Q,isFocused:ee,focusProps:et}=(0,a.Fx)({autoFocus:C}),er=W||L,en=(0,s.useMemo)(()=>(0,h.L)({size:K,color:U,variant:z,radius:D,fullWidth:N,isDisabled:er,isInGroup:k,disableAnimation:F,isIconOnly:V,className:I}),[K,U,z,D,N,er,k,V,F,I]),{onClick:ei,onClear:eo,ripples:es}=(0,j.i)(),ea=(0,s.useCallback)(e=>{X||er||F||!Y.current||ei(e)},[X,er,F,Y,ei]),{buttonProps:el,isPressed:eu}=(0,f.j)({elementType:T,isDisabled:er,onPress:H,onClick:(0,l.t)(q,ea),...Z},Y),{isHovered:ec,hoverProps:ed}=function(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:i}=e,[o,a]=(0,s.useState)(!1),l=(0,s.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,s.useEffect)(R,[]);let{hoverProps:u,triggerHoverEnd:c}=(0,s.useMemo)(()=>{let e=(e,n)=>{if(l.pointerType=n,i||"touch"===n||l.isHovered||!e.currentTarget.contains(e.target))return;l.isHovered=!0;let o=e.currentTarget;l.target=o,t&&t({type:"hoverstart",target:o,pointerType:n}),r&&r(!0),a(!0)},o=(e,t)=>{if(l.pointerType="",l.target=null,"touch"===t||!l.isHovered)return;l.isHovered=!1;let i=e.currentTarget;n&&n({type:"hoverend",target:i,pointerType:t}),r&&r(!1),a(!1)},s={};return"undefined"!=typeof PointerEvent?(s.onPointerEnter=t=>{_&&"mouse"===t.pointerType||e(t,t.pointerType)},s.onPointerLeave=e=>{!i&&e.currentTarget.contains(e.target)&&o(e,e.pointerType)}):(s.onTouchStart=()=>{l.ignoreEmulatedMouseEvents=!0},s.onMouseEnter=t=>{l.ignoreEmulatedMouseEvents||_||e(t,"mouse"),l.ignoreEmulatedMouseEvents=!1},s.onMouseLeave=e=>{!i&&e.currentTarget.contains(e.target)&&o(e,"mouse")}),{hoverProps:s,triggerHoverEnd:o}},[t,r,n,i,l]);return(0,s.useEffect)(()=>{i&&c({currentTarget:l.target},l.pointerType)},[i]),{hoverProps:u,isHovered:o}}({isDisabled:er}),eh=(0,s.useCallback)((e={})=>({"data-disabled":(0,o.PB)(er),"data-focus":(0,o.PB)(ee),"data-pressed":(0,o.PB)(eu),"data-focus-visible":(0,o.PB)(Q),"data-hover":(0,o.PB)(ec),"data-loading":(0,o.PB)(L),...(0,u.d)(el,et,ed,(0,d.z)(Z,{enabled:J}),(0,d.z)(e))}),[L,er,ee,eu,J,Q,ec,el,et,ed,Z]),ef=e=>(0,s.isValidElement)(e)?(0,s.cloneElement)(e,{"aria-hidden":!0,focusable:!1,tabIndex:-1}):null,ep=ef(A);return{Component:G,children:M,domRef:Y,spinner:O,styles:en,startContent:ep,endContent:ef(P),isLoading:L,spinnerPlacement:$,spinnerSize:(0,s.useMemo)(()=>({sm:"sm",md:"sm",lg:"md"})[K],[K]),disableRipple:X,getButtonProps:eh,getRippleProps:(0,s.useCallback)(()=>({ripples:es,onClear:eo}),[es,eo]),isIconOnly:V}}({...e,ref:t});return(0,K.jsxs)(r,{ref:p,className:m,...S(),children:[w,E&&"start"===b&&v,E&&M?null:g,E&&"end"===b&&v,x,!k&&(0,K.jsx)(N.L,{...T()})]})});U.displayName="NextUI.Button";var z=U},84367:function(e,t,r){"use strict";r.d(t,{j:function(){return u}});var n=r(27963),i=(0,r(49453).tv)({base:"shrink-0 bg-divider border-none",variants:{orientation:{horizontal:"w-full h-divider",vertical:"h-full w-divider"}},defaultVariants:{orientation:"horizontal"}}),o=r(67294),s=r(15607),a=r(85893),l=(0,s.Gp)((e,t)=>{let{Component:r,getDividerProps:s}=function(e){var t;let r,s;let{as:a,className:l,orientation:u,...c}=e,d=a||"hr";"hr"===d&&"vertical"===u&&(d="div");let{separatorProps:h}=(t={elementType:"string"==typeof d?d:"hr",orientation:u},s=(0,n.z)(t,{enabled:"string"==typeof t.elementType}),("vertical"===t.orientation&&(r="vertical"),"hr"!==t.elementType)?{separatorProps:{...s,role:"separator","aria-orientation":r}}:{separatorProps:s}),f=(0,o.useMemo)(()=>i({orientation:u,className:l}),[u,l]);return{Component:d,getDividerProps:(0,o.useCallback)((e={})=>({className:f,role:"separator","data-orientation":u,...h,...c,...e}),[f,u,h,c])}}({...e});return(0,a.jsx)(r,{ref:t,...s()})});l.displayName="NextUI.Divider";var u=l},26887:function(e,t,r){"use strict";r.d(t,{F:function(){return v}});var n=r(79148),i=r(76733),o=r(94482),s=r(5411),a=r(49453),l=r(65512),u=(0,a.tv)({base:["w-full","p-1","min-w-[200px]"]});(0,a.tv)({slots:{base:["flex","group","gap-2","items-center","justify-between","relative","px-2","py-1.5","w-full","h-full","box-border","rounded-small","outline-none","cursor-pointer","tap-highlight-transparent","data-[pressed=true]:opacity-70",...l.Dh,"data-[focus-visible=true]:dark:ring-offset-background-content1"],wrapper:"w-full flex flex-col items-start justify-center",title:"flex-1 text-small font-normal truncate",description:["w-full","text-tiny","text-foreground-500","group-hover:text-current"],selectedIcon:["text-inherit","w-3","h-3","flex-shrink-0"],shortcut:["px-1","py-0.5","rounded","font-sans","text-foreground-500","text-tiny","border-small","border-default-300","group-hover:border-current"]},variants:{variant:{solid:{base:""},bordered:{base:"border-medium border-transparent bg-transparent"},light:{base:"bg-transparent"},faded:{base:"border-small border-transparent hover:border-default data-[hover=true]:bg-default-100"},flat:{base:""},shadow:{base:"data-[hover=true]:shadow-lg"}},color:{default:{},primary:{},secondary:{},success:{},warning:{},danger:{}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"}},disableAnimation:{true:{},false:{}}},defaultVariants:{variant:"solid",color:"default"},compoundVariants:[{variant:"solid",color:"default",class:{base:"data-[hover=true]:bg-default data-[hover=true]:text-default-foreground"}},{variant:"solid",color:"primary",class:{base:"data-[hover=true]:bg-primary data-[hover=true]:text-primary-foreground"}},{variant:"solid",color:"secondary",class:{base:"data-[hover=true]:bg-secondary data-[hover=true]:text-secondary-foreground"}},{variant:"solid",color:"success",class:{base:"data-[hover=true]:bg-success data-[hover=true]:text-success-foreground"}},{variant:"solid",color:"warning",class:{base:"data-[hover=true]:bg-warning data-[hover=true]:text-warning-foreground"}},{variant:"solid",color:"danger",class:{base:"data-[hover=true]:bg-danger data-[hover=true]:text-danger-foreground"}},{variant:"shadow",color:"default",class:{base:"data-[hover=true]:shadow-default/50 data-[hover=true]:bg-default data-[hover=true]:text-default-foreground"}},{variant:"shadow",color:"primary",class:{base:"data-[hover=true]:shadow-primary/30 data-[hover=true]:bg-primary data-[hover=true]:text-primary-foreground"}},{variant:"shadow",color:"secondary",class:{base:"data-[hover=true]:shadow-secondary/30 data-[hover=true]:bg-secondary data-[hover=true]:text-secondary-foreground"}},{variant:"shadow",color:"success",class:{base:"data-[hover=true]:shadow-success/30 data-[hover=true]:bg-success data-[hover=true]:text-success-foreground"}},{variant:"shadow",color:"warning",class:{base:"data-[hover=true]:shadow-warning/30 data-[hover=true]:bg-warning data-[hover=true]:text-warning-foreground"}},{variant:"shadow",color:"danger",class:{base:"data-[hover=true]:shadow-danger/30 data-[hover=true]:bg-danger data-[hover=true]:text-danger-foreground"}},{variant:"bordered",color:"default",class:{base:"data-[hover=true]:border-default"}},{variant:"bordered",color:"primary",class:{base:"data-[hover=true]:border-primary data-[hover=true]:text-primary"}},{variant:"bordered",color:"secondary",class:{base:"data-[hover=true]:border-secondary data-[hover=true]:text-secondary"}},{variant:"bordered",color:"success",class:{base:"data-[hover=true]:border-success data-[hover=true]:text-success"}},{variant:"bordered",color:"warning",class:{base:"data-[hover=true]:border-warning data-[hover=true]:text-warning"}},{variant:"bordered",color:"danger",class:{base:"data-[hover=true]:border-danger data-[hover=true]:text-danger"}},{variant:"flat",color:"default",class:{base:"data-[hover=true]:bg-default/40 data-[hover=true]:text-default-foreground"}},{variant:"flat",color:"primary",class:{base:"data-[hover=true]:bg-primary/20 data-[hover=true]:text-primary"}},{variant:"flat",color:"secondary",class:{base:"data-[hover=true]:bg-secondary/20 data-[hover=true]:text-secondary"}},{variant:"flat",color:"success",class:{base:"data-[hover=true]:bg-success/20 data-[hover=true]:text-success "}},{variant:"flat",color:"warning",class:{base:"data-[hover=true]:bg-warning/20 data-[hover=true]:text-warning"}},{variant:"flat",color:"danger",class:{base:"data-[hover=true]:bg-danger/20 data-[hover=true]:text-danger"}},{variant:"faded",color:"default",class:{base:"data-[hover=true]:text-default-foreground"}},{variant:"faded",color:"primary",class:{base:"data-[hover=true]:text-primary"}},{variant:"faded",color:"secondary",class:{base:"data-[hover=true]:text-secondary"}},{variant:"faded",color:"success",class:{base:"data-[hover=true]:text-success"}},{variant:"faded",color:"warning",class:{base:"data-[hover=true]:text-warning"}},{variant:"faded",color:"danger",class:{base:"data-[hover=true]:text-danger"}},{variant:"light",color:"default",class:{base:"data-[hover=true]:text-default-500"}},{variant:"light",color:"primary",class:{base:"data-[hover=true]:text-primary"}},{variant:"light",color:"secondary",class:{base:"data-[hover=true]:text-secondary"}},{variant:"light",color:"success",class:{base:"data-[hover=true]:text-success"}},{variant:"light",color:"warning",class:{base:"data-[hover=true]:text-warning"}},{variant:"light",color:"danger",class:{base:"data-[hover=true]:text-danger"}}]}),(0,a.tv)({slots:{base:"relative mb-2",heading:"pl-1 text-tiny text-foreground-500",group:"data-[has-title=true]:pt-1",divider:"mt-2"}}),(0,a.tv)({base:"w-full flex flex-col gap-0.5 p-1"});var c=r(49869),d=r(48255),h=r(43837),f=r(67294),p=r(28349),g=r(16772),m=r(85893),y=e=>{let{children:t,...r}=e,a=function(e){var t;let r=(0,i.w)(),{as:n,triggerRef:a,isOpen:l,defaultOpen:g,onOpenChange:m,isDisabled:y,type:v="menu",trigger:b="press",placement:w="bottom",closeOnSelect:x=!0,shouldBlockScroll:E=!0,classNames:k,disableAnimation:S=null!=(t=null==r?void 0:r.disableAnimation)&&t,onClose:T,className:M,...A}=e,P=(0,f.useRef)(null),C=a||P,_=(0,f.useRef)(null),I=(0,f.useRef)(null),O=(0,o.W)({trigger:b,isOpen:l,defaultOpen:g,onOpenChange:e=>{null==m||m(e),e||null==T||T()}}),{menuTriggerProps:L,menuProps:R}=(0,s.u4)({type:v,trigger:b,isDisabled:y},O,C),j=(0,f.useMemo)(()=>u({className:M}),[M]),B=e=>{(void 0===e||e)&&x&&O.close()};return{Component:n||"div",menuRef:_,menuProps:R,classNames:j,closeOnSelect:x,onClose:O.close,autoFocus:O.focusStrategy||!0,disableAnimation:S,getPopoverProps:(e={})=>{let t=(0,p.d)(A,e);return{state:O,placement:w,ref:I,disableAnimation:S,shouldBlockScroll:E,scrollRef:_,triggerRef:C,...t,classNames:{...k,...e.classNames,content:(0,c.W)(j,null==k?void 0:k.content,e.className)},shouldCloseOnInteractOutside:(null==t?void 0:t.shouldCloseOnInteractOutside)?t.shouldCloseOnInteractOutside:e=>(0,h.J)(e,P,O)}},getMenuProps:(e,t=null)=>({ref:(0,d.l)(t,_),menuProps:R,closeOnSelect:x,...(0,p.d)(e,{onAction:()=>B(null==e?void 0:e.closeOnSelect),onClose:O.close})}),getMenuTriggerProps:(e={},t=null)=>{let{onPress:r,onPressStart:n,...i}=L;return{...(0,p.d)(i,{isDisabled:y},e),ref:(0,d.l)(t,P)}}}}(r),[l,y]=f.Children.toArray(t);return(0,m.jsx)(n.K,{value:a,children:(0,m.jsxs)(g.j,{...a.getPopoverProps(),children:[l,y]})})};y.displayName="NextUI.Dropdown";var v=y},72825:function(e,t,r){"use strict";r.d(t,{S:function(){return l}});var n=r(79148),i=r(15607),o=r(77693),s=r(85893),a=(0,i.Gp)((e,t)=>{let{getMenuTriggerProps:r}=(0,n.t)(),{children:i,...a}=e;return(0,s.jsx)(o.b,{...r(a),children:i})});a.displayName="NextUI.DropdownTrigger";var l=a},77269:function(e,t,r){"use strict";r.d(t,{a:function(){return e_}});var n=r(79148),i=r(7607),o=r(28628),s=r(15607),a=r(85893);function l(e){let{isSelected:t,disableAnimation:r,...n}=e;return(0,a.jsx)("svg",{"aria-hidden":"true","data-selected":t,role:"presentation",viewBox:"0 0 17 18",...n,children:(0,a.jsx)("polyline",{fill:"none",points:"1 9 7 14 15 4",stroke:"currentColor",strokeDasharray:22,strokeDashoffset:t?44:66,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,style:r?{}:{transition:"stroke-dashoffset 200ms ease"}})})}var u=r(67294),c=r(25083),d=r(76733),h=r(49037),f=r(49869),p=r(50262),g=r(3136),m=r(28349),y=r(75081),v=new WeakMap,b=r(32433),w=r(22587),x=r(11086),E=r(67911),k=r(68806),S=r(78837),T=r(85007),M=r(72970),A=r(36116),P=r(61718),C=r(26301),_=r(77604),I=r(69786),O=r(13094),L=r(7321),R=r(29677);let j="default",B="",N=new WeakMap;function D(e){if((0,k.gn)()){if("default"===j){let t=(0,S.r)(e);B=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}j="disabled"}else(e instanceof HTMLElement||e instanceof SVGElement)&&(N.set(e,e.style.userSelect),e.style.userSelect="none")}function K(e){if((0,k.gn)())"disabled"===j&&(j="restoring",setTimeout(()=>{(0,T.Q)(()=>{if("restoring"===j){let t=(0,S.r)(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=B||""),B="",j="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&N.has(e)){let t=N.get(e);"none"===e.style.userSelect&&(e.style.userSelect=t),""===e.getAttribute("style")&&e.removeAttribute("style"),N.delete(e)}}let U=u.createContext({register:()=>{}});U.displayName="PressResponderContext";var z=new WeakMap;class F{continuePropagation(){(0,R._)(this,z,!1)}get shouldStopPropagation(){return(0,O._)(this,z)}constructor(e,t,r){(0,L._)(this,z,{writable:!0,value:void 0}),(0,R._)(this,z,!0),this.type=e,this.pointerType=t,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey}}let W=Symbol("linkClicked");function V(e){return"A"===e.tagName&&e.hasAttribute("href")}function $(e,t){let{key:r,code:n}=e,i=t.getAttribute("role");return("Enter"===r||" "===r||"Spacebar"===r||"Space"===n)&&!(t instanceof(0,S.k)(t).HTMLInputElement&&!X(t,r)||t instanceof(0,S.k)(t).HTMLTextAreaElement||t.isContentEditable)&&!(("link"===i||!i&&V(t))&&"Enter"!==r)}function H(e,t){let r=e.changedTouches;for(let e=0;e<r.length;e++){let n=r[e];if(n.identifier===t)return n}return null}function q(e,t){return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey}}function Z(e,t){let r,n,i=t.getBoundingClientRect(),o=(r=0,n=0,void 0!==e.width?r=e.width/2:void 0!==e.radiusX&&(r=e.radiusX),void 0!==e.height?n=e.height/2:void 0!==e.radiusY&&(n=e.radiusY),{top:e.clientY-n,right:e.clientX+r,bottom:e.clientY+n,left:e.clientX-r});return!(i.left>o.right)&&!(o.left>i.right)&&!(i.top>o.bottom)&&!(o.top>i.bottom)}function G(e){return!(e instanceof HTMLElement)||!e.hasAttribute("draggable")}function J(e,t){return e instanceof HTMLInputElement?!X(e,t):e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!V(e)}let Y=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function X(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:Y.has(e.type)}class Q{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,t){this.nativeEvent=t,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.bubbles=t.bubbles,this.cancelable=t.cancelable,this.defaultPrevented=t.defaultPrevented,this.eventPhase=t.eventPhase,this.isTrusted=t.isTrusted,this.timeStamp=t.timeStamp,this.type=e}}let ee=null,et=new Set,er=new Map,en=!1,ei=!1;function eo(e,t){for(let r of et)r(e,t)}function es(e){en=!0,e.metaKey||!(0,k.V5)()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(ee="keyboard",eo("keyboard",e))}function ea(e){ee="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(en=!0,eo("pointer",e))}function el(e){(0,C.Z)(e)&&(en=!0,ee="virtual")}function eu(e){e.target!==window&&e.target!==document&&(en||ei||(ee="virtual",eo("virtual",e)),en=!1,ei=!1)}function ec(){en=!1,ei=!0}function ed(e){if("undefined"==typeof window||er.get((0,S.k)(e)))return;let t=(0,S.k)(e),r=(0,S.r)(e),n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){en=!0,n.apply(this,arguments)},r.addEventListener("keydown",es,!0),r.addEventListener("keyup",es,!0),r.addEventListener("click",el,!0),t.addEventListener("focus",eu,!0),t.addEventListener("blur",ec,!1),"undefined"!=typeof PointerEvent?(r.addEventListener("pointerdown",ea,!0),r.addEventListener("pointermove",ea,!0),r.addEventListener("pointerup",ea,!0)):(r.addEventListener("mousedown",ea,!0),r.addEventListener("mousemove",ea,!0),r.addEventListener("mouseup",ea,!0)),t.addEventListener("beforeunload",()=>{eh(e)},{once:!0}),er.set(t,{focus:n})}let eh=(e,t)=>{let r=(0,S.k)(e),n=(0,S.r)(e);t&&n.removeEventListener("DOMContentLoaded",t),er.has(r)&&(r.HTMLElement.prototype.focus=er.get(r).focus,n.removeEventListener("keydown",es,!0),n.removeEventListener("keyup",es,!0),n.removeEventListener("click",el,!0),r.removeEventListener("focus",eu,!0),r.removeEventListener("blur",ec,!1),"undefined"!=typeof PointerEvent?(n.removeEventListener("pointerdown",ea,!0),n.removeEventListener("pointermove",ea,!0),n.removeEventListener("pointerup",ea,!0)):(n.removeEventListener("mousedown",ea,!0),n.removeEventListener("mousemove",ea,!0),n.removeEventListener("mouseup",ea,!0)),er.delete(r))};"undefined"!=typeof document&&function(e){let t;let r=(0,S.r)(void 0);"loading"!==r.readyState?ed(void 0):(t=()=>{ed(void 0)},r.addEventListener("DOMContentLoaded",t)),()=>eh(e,t)}();let ef=!1,ep=0;function eg(){ef=!0,setTimeout(()=>{ef=!1},50)}function em(e){"touch"===e.pointerType&&eg()}function ey(){if("undefined"!=typeof document)return"undefined"!=typeof PointerEvent?document.addEventListener("pointerup",em):document.addEventListener("touchend",eg),ep++,()=>{--ep>0||("undefined"!=typeof PointerEvent?document.removeEventListener("pointerup",em):document.removeEventListener("touchend",eg))}}function ev(e){if(!e)return;let t=!0;return r=>{e({...r,preventDefault(){r.preventDefault()},isDefaultPrevented:()=>r.isDefaultPrevented(),stopPropagation(){console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.")},continuePropagation(){t=!1}}),t&&r.stopPropagation()}}var eb=r(96344),ew=r(27963),ex=(0,s.Gp)((e,t)=>{let{Component:r,slots:n,classNames:i,rendered:T,shortcut:O,description:L,isSelectable:R,isSelected:j,isDisabled:B,selectedIcon:N,startContent:z,endContent:Y,disableAnimation:X,hideSelectedIcon:et,getItemProps:er,getLabelProps:en,getDescriptionProps:ei,getKeyboardShortcutProps:eo,getSelectedIconProps:es}=function(e){var t,r;let n=(0,d.w)(),[i,a]=(0,s.oe)(e,c.D9.variantKeys),{as:l,item:T,state:O,shortcut:L,description:R,startContent:j,endContent:B,isVirtualized:N,selectedIcon:z,className:Y,classNames:X,onAction:et,autoFocus:er,onClick:en,onPress:ei,onPressStart:eo,onPressUp:es,onPressEnd:ea,onPressChange:el,hideSelectedIcon:eu=!1,isReadOnly:ec=!1,closeOnSelect:ed,onClose:eh,...ep}=i,eg=null!=(r=null!=(t=e.disableAnimation)?t:null==n?void 0:n.disableAnimation)&&r,em=(0,u.useRef)(null),ex=l||((null==ep?void 0:ep.href)?"a":"li"),eE="string"==typeof ex,{rendered:ek,key:eS}=T,eT=O.disabledKeys.has(eS)||e.isDisabled,eM="none"!==O.selectionManager.selectionMode,eA=(0,eb.d)(),{isFocusVisible:eP,focusProps:eC}=(0,o.Fx)({autoFocus:er}),{isHovered:e_,isPressed:eI,isFocused:eO,isSelected:eL,menuItemProps:eR,labelProps:ej,descriptionProps:eB,keyboardShortcutProps:eN}=function(e,t,r){var n,i,o,s;let{key:a,closeOnSelect:l,isVirtualized:c,"aria-haspopup":d,onPressStart:h,onPressUp:f,onPress:p,onPressChange:T,onPressEnd:O,onHoverStart:L,onHoverChange:R,onHoverEnd:j,onKeyDown:B,onKeyUp:N,onFocus:z,onFocusChange:Y,onBlur:X,onClick:et}=e,er=!!d,en=null!=(n=e.isDisabled)?n:t.disabledKeys.has(a),ei=null!=(i=e.isSelected)?i:t.selectionManager.isSelected(a),eo=v.get(t),es=t.collection.getItem(a),ea=e.onClose||eo.onClose,el=er?()=>{}:e.onAction||eo.onAction,eu=(0,b.tv)(),ec=e=>{el&&el(a),e.target instanceof HTMLAnchorElement&&eu.open(e.target,e,null==es?void 0:es.props.href,null==es?void 0:es.props.routerOptions)},ed="menuitem";er||("single"===t.selectionManager.selectionMode?ed="menuitemradio":"multiple"!==t.selectionManager.selectionMode||(ed="menuitemcheckbox"));let eh=(0,w.mp)(),ep=(0,w.mp)(),eg=(0,w.mp)(),em={"aria-disabled":en||void 0,role:ed,"aria-label":e["aria-label"],"aria-labelledby":eh,"aria-describedby":[ep,eg].filter(Boolean).join(" ")||void 0,"aria-controls":e["aria-controls"],"aria-haspopup":d,"aria-expanded":e["aria-expanded"]};"none"===t.selectionManager.selectionMode||er||(em["aria-checked"]=ei),c&&(em["aria-posinset"]=null==es?void 0:es.index,em["aria-setsize"]=(0,E.is)(t.collection));let{itemProps:eb,isFocused:ew}=(0,y.Cs)({selectionManager:t.selectionManager,key:a,ref:r,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:"none"}),{pressProps:ex,isPressed:eE}=function(e){let{onPress:t,onPressChange:r,onPressStart:n,onPressEnd:i,onPressUp:o,isDisabled:s,isPressed:a,preventFocusOnPress:l,shouldCancelOnPointerExit:c,allowTextSelectionOnPress:d,ref:h,...f}=function(e){let t=(0,u.useContext)(U);if(t){let{register:r,...n}=t;e=(0,m.d)(n,e),r()}return(0,M.l)(t,e.ref),e}(e),[p,g]=(0,u.useState)(!1),y=(0,u.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:v,removeAllGlobalListeners:w}=(0,A.x)(),E=(0,P.i)((e,t)=>{let i=y.current;if(s||i.didFirePressStart)return!1;let o=!0;if(i.isTriggeringEvent=!0,n){let r=new F("pressstart",t,e);n(r),o=r.shouldStopPropagation}return r&&r(!0),i.isTriggeringEvent=!1,i.didFirePressStart=!0,g(!0),o}),T=(0,P.i)((e,n,o=!0)=>{let a=y.current;if(!a.didFirePressStart)return!1;a.ignoreClickAfterPress=!0,a.didFirePressStart=!1,a.isTriggeringEvent=!0;let l=!0;if(i){let t=new F("pressend",n,e);i(t),l=t.shouldStopPropagation}if(r&&r(!1),g(!1),t&&o&&!s){let r=new F("press",n,e);t(r),l&&(l=r.shouldStopPropagation)}return a.isTriggeringEvent=!1,l}),I=(0,P.i)((e,t)=>{let r=y.current;if(s)return!1;if(o){r.isTriggeringEvent=!0;let n=new F("pressup",t,e);return o(n),r.isTriggeringEvent=!1,n.shouldStopPropagation}return!0}),O=(0,P.i)(e=>{let t=y.current;t.isPressed&&t.target&&(t.isOverTarget&&null!=t.pointerType&&T(q(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,w(),d||K(t.target))}),L=(0,P.i)(e=>{c&&O(e)}),R=(0,u.useMemo)(()=>{let e=y.current,t={onKeyDown(t){if($(t.nativeEvent,t.currentTarget)&&t.currentTarget.contains(t.target)){var n;J(t.target,t.key)&&t.preventDefault();let i=!0;if(!e.isPressed&&!t.repeat){e.target=t.currentTarget,e.isPressed=!0,i=E(t,"keyboard");let n=t.currentTarget;v((0,S.r)(t.currentTarget),"keyup",(0,x.t)(t=>{$(t,n)&&!t.repeat&&n.contains(t.target)&&e.target&&I(q(e.target,t),"keyboard")},r),!0)}i&&t.stopPropagation(),t.metaKey&&(0,k.V5)()&&(null===(n=e.metaKeyEvents)||void 0===n||n.set(t.key,t.nativeEvent))}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||t.currentTarget.contains(t.target))&&t&&0===t.button&&!e.isTriggeringEvent&&!b.nG.isOpening){let r=!0;if(s&&t.preventDefault(),!e.ignoreClickAfterPress&&!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||(0,C.Z)(t.nativeEvent))){s||l||(0,_.A)(t.currentTarget);let e=E(t,"virtual"),n=I(t,"virtual"),i=T(t,"virtual");r=e&&n&&i}e.ignoreEmulatedMouseEvents=!1,e.ignoreClickAfterPress=!1,r&&t.stopPropagation()}}},r=t=>{var r,n,i;if(e.isPressed&&e.target&&$(t,e.target)){J(t.target,t.key)&&t.preventDefault();let r=t.target;T(q(e.target,t),"keyboard",e.target.contains(r)),w(),"Enter"!==t.key&&V(e.target)&&e.target.contains(r)&&!t[W]&&(t[W]=!0,(0,b.nG)(e.target,t,!1)),e.isPressed=!1,null===(n=e.metaKeyEvents)||void 0===n||n.delete(t.key)}else if("Meta"===t.key&&(null===(r=e.metaKeyEvents)||void 0===r?void 0:r.size)){let t=e.metaKeyEvents;for(let r of(e.metaKeyEvents=void 0,t.values()))null===(i=e.target)||void 0===i||i.dispatchEvent(new KeyboardEvent("keyup",r))}};if("undefined"!=typeof PointerEvent){t.onPointerDown=t=>{if(0!==t.button||!t.currentTarget.contains(t.target))return;if((0,C.c)(t.nativeEvent)){e.pointerType="virtual";return}G(t.currentTarget)&&t.preventDefault(),e.pointerType=t.pointerType;let o=!0;e.isPressed||(e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,s||l||(0,_.A)(t.currentTarget),d||D(e.target),o=E(t,e.pointerType),v((0,S.r)(t.currentTarget),"pointermove",r,!1),v((0,S.r)(t.currentTarget),"pointerup",n,!1),v((0,S.r)(t.currentTarget),"pointercancel",i,!1)),o&&t.stopPropagation()},t.onMouseDown=e=>{e.currentTarget.contains(e.target)&&0===e.button&&(G(e.currentTarget)&&e.preventDefault(),e.stopPropagation())},t.onPointerUp=t=>{t.currentTarget.contains(t.target)&&"virtual"!==e.pointerType&&0===t.button&&Z(t,t.currentTarget)&&I(t,e.pointerType||t.pointerType)};let r=t=>{t.pointerId===e.activePointerId&&(e.target&&Z(t,e.target)?e.isOverTarget||null==e.pointerType||(e.isOverTarget=!0,E(q(e.target,t),e.pointerType)):e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,T(q(e.target,t),e.pointerType,!1),L(t)))},n=t=>{t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target&&(Z(t,e.target)&&null!=e.pointerType?T(q(e.target,t),e.pointerType):e.isOverTarget&&null!=e.pointerType&&T(q(e.target,t),e.pointerType,!1),e.isPressed=!1,e.isOverTarget=!1,e.activePointerId=null,e.pointerType=null,w(),d||K(e.target))},i=e=>{O(e)};t.onDragStart=e=>{e.currentTarget.contains(e.target)&&O(e)}}else{t.onMouseDown=t=>{if(0===t.button&&t.currentTarget.contains(t.target)){if(G(t.currentTarget)&&t.preventDefault(),e.ignoreEmulatedMouseEvents){t.stopPropagation();return}e.isPressed=!0,e.isOverTarget=!0,e.target=t.currentTarget,e.pointerType=(0,C.Z)(t.nativeEvent)?"virtual":"mouse",s||l||(0,_.A)(t.currentTarget),E(t,e.pointerType)&&t.stopPropagation(),v((0,S.r)(t.currentTarget),"mouseup",r,!1)}},t.onMouseEnter=t=>{if(!t.currentTarget.contains(t.target))return;let r=!0;e.isPressed&&!e.ignoreEmulatedMouseEvents&&null!=e.pointerType&&(e.isOverTarget=!0,r=E(t,e.pointerType)),r&&t.stopPropagation()},t.onMouseLeave=t=>{if(!t.currentTarget.contains(t.target))return;let r=!0;e.isPressed&&!e.ignoreEmulatedMouseEvents&&null!=e.pointerType&&(e.isOverTarget=!1,r=T(t,e.pointerType,!1),L(t)),r&&t.stopPropagation()},t.onMouseUp=t=>{t.currentTarget.contains(t.target)&&!e.ignoreEmulatedMouseEvents&&0===t.button&&I(t,e.pointerType||"mouse")};let r=t=>{if(0===t.button){if(e.isPressed=!1,w(),e.ignoreEmulatedMouseEvents){e.ignoreEmulatedMouseEvents=!1;return}e.target&&Z(t,e.target)&&null!=e.pointerType?T(q(e.target,t),e.pointerType):e.target&&e.isOverTarget&&null!=e.pointerType&&T(q(e.target,t),e.pointerType,!1),e.isOverTarget=!1}};t.onTouchStart=t=>{if(!t.currentTarget.contains(t.target))return;let r=function(e){let{targetTouches:t}=e;return t.length>0?t[0]:null}(t.nativeEvent);r&&(e.activePointerId=r.identifier,e.ignoreEmulatedMouseEvents=!0,e.isOverTarget=!0,e.isPressed=!0,e.target=t.currentTarget,e.pointerType="touch",s||l||(0,_.A)(t.currentTarget),d||D(e.target),E(t,e.pointerType)&&t.stopPropagation(),v((0,S.k)(t.currentTarget),"scroll",n,!0))},t.onTouchMove=t=>{if(!t.currentTarget.contains(t.target))return;if(!e.isPressed){t.stopPropagation();return}let r=H(t.nativeEvent,e.activePointerId),n=!0;r&&Z(r,t.currentTarget)?e.isOverTarget||null==e.pointerType||(e.isOverTarget=!0,n=E(t,e.pointerType)):e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,n=T(t,e.pointerType,!1),L(t)),n&&t.stopPropagation()},t.onTouchEnd=t=>{if(!t.currentTarget.contains(t.target))return;if(!e.isPressed){t.stopPropagation();return}let r=H(t.nativeEvent,e.activePointerId),n=!0;r&&Z(r,t.currentTarget)&&null!=e.pointerType?(I(t,e.pointerType),n=T(t,e.pointerType)):e.isOverTarget&&null!=e.pointerType&&(n=T(t,e.pointerType,!1)),n&&t.stopPropagation(),e.isPressed=!1,e.activePointerId=null,e.isOverTarget=!1,e.ignoreEmulatedMouseEvents=!0,e.target&&!d&&K(e.target),w()},t.onTouchCancel=t=>{t.currentTarget.contains(t.target)&&(t.stopPropagation(),e.isPressed&&O(t))};let n=t=>{e.isPressed&&t.target.contains(e.target)&&O({currentTarget:e.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};t.onDragStart=e=>{e.currentTarget.contains(e.target)&&O(e)}}return t},[v,s,l,w,d,O,L,T,E,I]);return(0,u.useEffect)(()=>()=>{var e;d||K(null!==(e=y.current.target)&&void 0!==e?e:void 0)},[d]),{isPressed:a||p,pressProps:(0,m.d)(f,R)}}({onPressStart:e=>{"keyboard"===e.pointerType&&ec(e),null==h||h(e)},onPress:p,onPressUp:e=>{"keyboard"!==e.pointerType&&(setTimeout(()=>{ec(e)}),!er&&ea&&(null!=l?l:"multiple"!==t.selectionManager.selectionMode||t.selectionManager.isLink(a))&&setTimeout(()=>{null==ea||ea()})),null==f||f(e)},onPressChange:T,onPressEnd:O,isDisabled:en}),{isHovered:ek,hoverProps:eS}=function(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:i}=e,[o,s]=(0,u.useState)(!1),a=(0,u.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,u.useEffect)(ey,[]);let{hoverProps:l,triggerHoverEnd:c}=(0,u.useMemo)(()=>{let e=(e,n)=>{if(a.pointerType=n,i||"touch"===n||a.isHovered||!e.currentTarget.contains(e.target))return;a.isHovered=!0;let o=e.currentTarget;a.target=o,t&&t({type:"hoverstart",target:o,pointerType:n}),r&&r(!0),s(!0)},o=(e,t)=>{if(a.pointerType="",a.target=null,"touch"===t||!a.isHovered)return;a.isHovered=!1;let i=e.currentTarget;n&&n({type:"hoverend",target:i,pointerType:t}),r&&r(!1),s(!1)},l={};return"undefined"!=typeof PointerEvent?(l.onPointerEnter=t=>{ef&&"mouse"===t.pointerType||e(t,t.pointerType)},l.onPointerLeave=e=>{!i&&e.currentTarget.contains(e.target)&&o(e,e.pointerType)}):(l.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},l.onMouseEnter=t=>{a.ignoreEmulatedMouseEvents||ef||e(t,"mouse"),a.ignoreEmulatedMouseEvents=!1},l.onMouseLeave=e=>{!i&&e.currentTarget.contains(e.target)&&o(e,"mouse")}),{hoverProps:l,triggerHoverEnd:o}},[t,r,n,i,a]);return(0,u.useEffect)(()=>{i&&c({currentTarget:a.target},a.pointerType)},[i]),{hoverProps:l,isHovered:o}}({isDisabled:en,onHoverStart(e){"pointer"!==ee||(t.selectionManager.setFocused(!0),t.selectionManager.setFocusedKey(a)),null==L||L(e)},onHoverChange:R,onHoverEnd:j}),{keyboardProps:eT}={keyboardProps:(s={onKeyDown:e=>{if(e.repeat){e.continuePropagation();return}switch(e.key){case" ":en||"none"!==t.selectionManager.selectionMode||er||!1===l||!ea||ea();break;case"Enter":en||!1===l||er||!ea||ea();break;default:er||e.continuePropagation(),null==B||B(e)}},onKeyUp:N}).isDisabled?{}:{onKeyDown:ev(s.onKeyDown),onKeyUp:ev(s.onKeyUp)}},{focusProps:eM}=function(e){let t,r,{isDisabled:n,onFocus:i,onBlur:o,onFocusChange:s}=e,a=(0,u.useCallback)(e=>{if(e.target===e.currentTarget)return o&&o(e),s&&s(!1),!0},[o,s]),l=(t=(0,u.useRef)({isFocused:!1,observer:null}),(0,I.b)(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]),r=(0,P.i)(e=>{null==a||a(e)}),(0,u.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let n=e.target;n.addEventListener("focusout",e=>{t.current.isFocused=!1,n.disabled&&r(new Q("blur",e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&n.disabled){var e;null===(e=t.current.observer)||void 0===e||e.disconnect();let r=n===document.activeElement?null:document.activeElement;n.dispatchEvent(new FocusEvent("blur",{relatedTarget:r})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:r}))}}),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]})}},[r])),c=(0,u.useCallback)(e=>{e.target===e.currentTarget&&document.activeElement===e.target&&(i&&i(e),s&&s(!0),l(e))},[s,i,l]);return{focusProps:{onFocus:!n&&(i||s||o)?c:void 0,onBlur:!n&&(o||s)?a:void 0}}}({onBlur:X,onFocus:z,onFocusChange:Y}),eA=(0,g.z)(es.props,{isLink:!!(null==(o=null==es?void 0:es.props)?void 0:o.href)});return delete eA.id,{menuItemProps:{...em,...(0,m.d)(eA,er?{onFocus:eb.onFocus}:eb,ex,eS,eT,eM),onClick:(0,x.t)(et,ex.onClick),tabIndex:null!=eb.tabIndex?-1:void 0},labelProps:{id:eh},descriptionProps:{id:ep},keyboardShortcutProps:{id:eg},isHovered:ek,isFocused:ew,isSelected:ei,isPressed:eE,isDisabled:en}}({key:eS,onClose:eh,isDisabled:eT,onPress:ei,onClick:en,onPressStart:eo,onPressUp:es,onPressEnd:ea,onPressChange:el,"aria-label":i["aria-label"],closeOnSelect:ed,isVirtualized:N,onAction:et},O,em),eD=eR,eK=(0,u.useMemo)(()=>(0,c.D9)({...a,isDisabled:eT,disableAnimation:eg}),[(0,h.Xx)(a),eT,eg]),eU=(0,f.W)(null==X?void 0:X.base,Y);ec&&(eD=(0,h.Os)(eD));let ez=(0,u.useCallback)((e={})=>({"aria-hidden":(0,p.PB)(!0),"data-disabled":(0,p.PB)(eT),className:eK.selectedIcon({class:null==X?void 0:X.selectedIcon}),...e}),[eT,eK,X]);return{Component:ex,domRef:em,slots:eK,classNames:X,isSelectable:eM,isSelected:eL,isDisabled:eT,rendered:ek,shortcut:L,description:R,startContent:j,endContent:B,selectedIcon:z,disableAnimation:eg,getItemProps:(e={})=>({ref:em,...(0,m.d)(ec?{}:eC,(0,ew.z)(ep,{enabled:eE}),eD,e),"data-focus":(0,p.PB)(eO),"data-selectable":(0,p.PB)(eM),"data-hover":(0,p.PB)(eA?e_||eI:e_),"data-disabled":(0,p.PB)(eT),"data-selected":(0,p.PB)(eL),"data-pressed":(0,p.PB)(eI),"data-focus-visible":(0,p.PB)(eP),className:eK.base({class:(0,f.W)(eU,e.className)})}),getLabelProps:(e={})=>({...(0,m.d)(ej,e),className:eK.title({class:null==X?void 0:X.title})}),hideSelectedIcon:eu,getDescriptionProps:(e={})=>({...(0,m.d)(eB,e),className:eK.description({class:null==X?void 0:X.description})}),getKeyboardShortcutProps:(e={})=>({...(0,m.d)(eN,e),className:eK.shortcut({class:null==X?void 0:X.shortcut})}),getSelectedIconProps:ez}}(e),ea=(0,u.useMemo)(()=>{let e=(0,a.jsx)(l,{disableAnimation:X,isSelected:j});return"function"==typeof N?N({icon:e,isSelected:j,isDisabled:B}):N||e},[N,j,B,X]);return(0,a.jsxs)(r,{...er(),children:[z,L?(0,a.jsxs)("div",{className:n.wrapper({class:null==i?void 0:i.wrapper}),children:[(0,a.jsx)("span",{...en(),children:T}),(0,a.jsx)("span",{...ei(),children:L})]}):(0,a.jsx)("span",{...en(),children:T}),O&&(0,a.jsx)("kbd",{...eo(),children:O}),R&&!et&&(0,a.jsx)("span",{...es(),children:ea}),Y]})});ex.displayName="NextUI.MenuItem";var eE=r(5411),ek=r(84367),eS=(0,s.Gp)(({item:e,state:t,as:r,variant:n,color:i,disableAnimation:o,onAction:s,closeOnSelect:l,className:d,classNames:h,showDivider:p=!1,hideSelectedIcon:g,dividerProps:y={},itemClasses:v,title:b,...w},x)=>{let E=(0,u.useMemo)(()=>(0,c.Dk)(),[]),k=(0,f.W)(null==h?void 0:h.base,d),S=(0,f.W)(null==h?void 0:h.divider,null==y?void 0:y.className),{itemProps:T,headingProps:M,groupProps:A}=(0,eE.x7)({heading:e.rendered,"aria-label":e["aria-label"]});return(0,a.jsxs)(r||"li",{"data-slot":"base",...(0,m.d)(T,w),className:E.base({class:k}),children:[e.rendered&&(0,a.jsx)("span",{...M,className:E.heading({class:null==h?void 0:h.heading}),"data-slot":"heading",children:e.rendered}),(0,a.jsxs)("ul",{...A,className:E.group({class:null==h?void 0:h.group}),"data-has-title":!!e.rendered,"data-slot":"group",children:[[...e.childNodes].map(e=>{let{key:r,props:u}=e,c=(0,a.jsx)(ex,{classNames:v,closeOnSelect:l,color:i,disableAnimation:o,hideSelectedIcon:g,item:e,state:t,variant:n,onAction:s,...u},r);return e.wrapper&&(c=e.wrapper(c)),c}),p&&(0,a.jsx)(ek.j,{as:"li",className:E.divider({class:S}),...y})]})]})});eS.displayName="NextUI.MenuSection";var eT=r(54774),eM=r(33295);function eA(e,t){let{Component:r,state:n,closeOnSelect:i,color:o,disableAnimation:s,hideSelectedIcon:l,hideEmptyContent:h,variant:p,onClose:b,onAction:w,topContent:x,bottomContent:E,itemClasses:k,getBaseProps:S,getListProps:T,getEmptyContentProps:M}=function(e){var t;let r=(0,d.w)(),{as:n,ref:i,variant:o,color:s,children:a,disableAnimation:l=null!=(t=null==r?void 0:r.disableAnimation)&&t,onAction:h,closeOnSelect:p,itemClasses:b,className:w,state:x,topContent:E,bottomContent:k,hideEmptyContent:S=!1,hideSelectedIcon:T=!1,emptyContent:M="No items.",menuProps:A,onClose:P,classNames:C,..._}=e,I=n||"ul",O=(0,eM.gy)(i),L="string"==typeof I,R=(0,eT.D)({..._,...A,children:a}),j=x||R,{menuProps:B}=function(e,t,r){let{shouldFocusWrap:n=!0,onKeyDown:i,onKeyUp:o,...s}=e;e["aria-label"]||e["aria-labelledby"]||console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let a=(0,g.z)(e,{labelable:!0}),{listProps:l}=(0,y._t)({...s,ref:r,selectionManager:t.selectionManager,collection:t.collection,disabledKeys:t.disabledKeys,shouldFocusWrap:n,linkBehavior:"override"});return v.set(t,{onClose:e.onClose,onAction:e.onAction}),{menuProps:(0,m.d)(a,{onKeyDown:i,onKeyUp:o},{role:"menu",...l,onKeyDown:e=>{"Escape"!==e.key&&l.onKeyDown&&l.onKeyDown(e)}})}}({..._,...A},j,O),N=(0,u.useMemo)(()=>(0,c.GI)({className:w}),[w]),D=(0,f.W)(null==C?void 0:C.base,w);return{Component:I,state:j,variant:o,color:s,disableAnimation:l,onAction:h,onClose:P,topContent:E,bottomContent:k,closeOnSelect:p,className:w,itemClasses:b,getBaseProps:(e={})=>({ref:O,"data-slot":"base",className:N.base({class:D}),...(0,ew.z)(_,{enabled:L}),...e}),getListProps:(e={})=>({"data-slot":"list",className:N.list({class:null==C?void 0:C.list}),...B,...e}),hideEmptyContent:S,hideSelectedIcon:T,getEmptyContentProps:(e={})=>({children:M,className:N.emptyContent({class:null==C?void 0:C.emptyContent}),...e})}}({...e,ref:t}),A=(0,a.jsxs)(r,{...T(),children:[!n.collection.size&&!h&&(0,a.jsx)("li",{children:(0,a.jsx)("div",{...M()})}),[...n.collection].map(e=>{let t={closeOnSelect:i,color:o,disableAnimation:s,item:e,state:n,variant:p,onClose:b,onAction:w,hideSelectedIcon:l,...e.props};if("section"===e.type)return(0,a.jsx)(eS,{...t,itemClasses:k},e.key);let r=(0,a.jsx)(ex,{...t,classNames:k},e.key);return e.wrapper&&(r=e.wrapper(r)),r})]});return(0,a.jsxs)("div",{...S(),children:[x,A,E]})}var eP=(0,s.Gp)(eA);function eC(e,t){let{getMenuProps:r}=(0,n.t)();return(0,a.jsx)(i.g,{children:(0,a.jsx)(o.MT,{contain:!0,restoreFocus:!0,children:(0,a.jsx)(eP,{...r(e,t)})})})}eA.displayName="NextUI.Menu";var e_=(0,s.Gp)(eC);eC.displayName="NextUI.DropdownMenu"},79148:function(e,t,r){"use strict";r.d(t,{K:function(){return n},t:function(){return i}});var[n,i]=(0,r(46347).k)({name:"DropdownContext",errorMessage:"useDropdownContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Dropdown />`"})},90029:function(e,t,r){"use strict";r.d(t,{Lj:function(){return n},y7:function(){return i}});var n={ease:[.36,.66,.4,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1],spring:[.155,1.105,.295,1.12],springOut:[.57,-.15,.62,.07],softSpring:[.16,1.11,.3,1.02]};n.easeOut,n.easeIn;var i={scaleSpring:{enter:{transform:"scale(1)",opacity:1,transition:{type:"spring",bounce:0,duration:.2}},exit:{transform:"scale(0.85)",opacity:0,transition:{type:"easeOut",duration:.15}}},scaleSpringOpacity:{initial:{opacity:0,transform:"scale(0.8)"},enter:{opacity:1,transform:"scale(1)",transition:{type:"spring",bounce:0,duration:.3}},exit:{opacity:0,transform:"scale(0.96)",transition:{type:"easeOut",bounce:0,duration:.15}}},scale:{enter:{scale:1},exit:{scale:.95}},scaleFadeIn:{enter:{transform:"scale(1)",opacity:1,transition:{duration:.25,ease:n.easeIn}},exit:{transform:"scale(0.95)",opacity:0,transition:{duration:.2,ease:n.easeOut}}},scaleInOut:{enter:{transform:"scale(1)",opacity:1,transition:{duration:.4,ease:n.ease}},exit:{transform:"scale(1.03)",opacity:0,transition:{duration:.3,ease:n.ease}}},fade:{enter:{opacity:1,transition:{duration:.4,ease:n.ease}},exit:{opacity:0,transition:{duration:.3,ease:n.ease}}},collapse:{enter:{opacity:1,height:"auto",transition:{height:{type:"spring",bounce:0,duration:.3},opacity:{easings:"ease",duration:.4}}},exit:{opacity:0,height:0,transition:{easings:"ease",duration:.3}}}}},32616:function(e,t,r){"use strict";r.d(t,{W:function(){return n}});var n=r(67911).ck},16772:function(e,t,r){"use strict";r.d(t,{j:function(){return d}});var n=r(30796),i=r(7693),o=r(67294),s=r(15607),a=r(31190),l=r(82703),u=r(85893),c=(0,s.Gp)((e,t)=>{let{children:r,...s}=e,c=(0,i.S)({...s,ref:t}),[d,h]=o.Children.toArray(r),f=(0,u.jsx)(a.aV,{disableFocusManagement:!0,portalContainer:c.portalContainer,children:h});return(0,u.jsxs)(n.H,{value:c,children:[d,c.disableAnimation&&c.isOpen?f:(0,u.jsx)(l.M,{children:c.isOpen?f:null})]})});c.displayName="NextUI.Popover";var d=c},7693:function(e,t,r){"use strict";r.d(t,{S:function(){return E}});var n=r(67294),i=r(31190),o=r(10902),s=new WeakMap,a=[],l=r(28349),u=r(93387),c=r(43837),d=r(33295),h=r(5698),f=r(28628),p=r(76733),g=r(15607),m=r(33805),y=r(36303),v=r(49037),b=r(49869),w=r(50262),x=r(50633);function E(e){var t,r,E;let k=(0,p.w)(),[S,T]=(0,g.oe)(e,m.v.variantKeys),{as:M,ref:A,children:P,state:C,triggerRef:_,scrollRef:I,defaultOpen:O,onOpenChange:L,isOpen:R,isNonModal:j=!0,shouldFlip:B=!0,containerPadding:N=12,shouldBlockScroll:D=!1,isDismissable:K=!0,shouldCloseOnBlur:U,portalContainer:z,updatePositionDeps:F,dialogProps:W,placement:V="top",triggerType:$="dialog",showArrow:H=!1,offset:q=7,crossOffset:Z=0,boundaryElement:G,isKeyboardDismissDisabled:J,shouldCloseOnInteractOutside:Y,motionProps:X,className:Q,classNames:ee,onClose:et,...er}=S,en=(0,d.gy)(A),ei=(0,n.useRef)(null),eo=(0,n.useRef)(!1),es=(0,n.useRef)(null),ea=_||ei,el=null!=(r=null!=(t=e.disableAnimation)?t:null==k?void 0:k.disableAnimation)&&r,eu=(0,h.d)({isOpen:R,defaultOpen:O,onOpenChange:e=>{null==L||L(e),e||null==et||et()}}),ec=C||eu,{popoverProps:ed,underlayProps:eh,placement:ef}=function(e,t){let{triggerRef:r,popoverRef:d,showArrow:h,offset:f=7,crossOffset:p=0,scrollRef:g,shouldFlip:m,boundaryElement:y,isDismissable:v=!0,shouldCloseOnBlur:b=!0,placement:w="top",containerPadding:x,shouldCloseOnInteractOutside:E,isNonModal:k,isKeyboardDismissDisabled:S,updatePositionDeps:T=[],...M}=e,A=null==k||k,{overlayProps:P,underlayProps:C}=(0,i.Ir)({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:b,isDismissable:v,isKeyboardDismissDisabled:S,shouldCloseOnInteractOutside:E||(e=>(0,c.J)(e,r,t))},d),{overlayProps:_,arrowProps:I,placement:O,updatePosition:L}=(0,i.tN)({...M,shouldFlip:m,crossOffset:p,targetRef:r,overlayRef:d,isOpen:t.isOpen,scrollRef:g,boundaryElement:y,containerPadding:x,placement:(0,o.Yx)(w),offset:h?f+3:f,onClose:()=>{}});return(0,u.G)(()=>{T.length&&L()},T),(0,n.useEffect)(()=>{if(t.isOpen&&!A&&d.current)return function(e,t=document.body){let r=new Set(e),n=new Set,i=e=>{for(let t of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))r.add(t);let t=e=>{let t=e.parentElement;if(r.has(e)||n.has(t)&&"row"!==t.getAttribute("role"))return NodeFilter.FILTER_REJECT;for(let t of r)if(e.contains(t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),s=t(e);if(s===NodeFilter.FILTER_ACCEPT&&o(e),s!==NodeFilter.FILTER_REJECT){let e=i.nextNode();for(;null!=e;)o(e),e=i.nextNode()}},o=e=>{var t;let r=null!=(t=s.get(e))?t:0;("true"!==e.getAttribute("aria-hidden")||0!==r)&&(0===r&&e.setAttribute("aria-hidden","true"),n.add(e),s.set(e,r+1))};a.length&&a[a.length-1].disconnect(),i(t);let l=new MutationObserver(e=>{for(let t of e)if("childList"===t.type&&0!==t.addedNodes.length&&![...r,...n].some(e=>e.contains(t.target))){for(let e of t.removedNodes)e instanceof Element&&(r.delete(e),n.delete(e));for(let e of t.addedNodes)(e instanceof HTMLElement||e instanceof SVGElement)&&("true"===e.dataset.liveAnnouncer||"true"===e.dataset.reactAriaTopLayer)?r.add(e):e instanceof Element&&i(e)}});l.observe(t,{childList:!0,subtree:!0});let u={observe(){l.observe(t,{childList:!0,subtree:!0})},disconnect(){l.disconnect()}};return a.push(u),()=>{for(let e of(l.disconnect(),n)){let t=s.get(e);null!=t&&(1===t?(e.removeAttribute("aria-hidden"),s.delete(e)):s.set(e,t-1))}u===a[a.length-1]?(a.pop(),a.length&&a[a.length-1].observe()):a.splice(a.indexOf(u),1)}}([d.current])},[A,t.isOpen,d]),{popoverProps:(0,l.d)(P,_),arrowProps:I,underlayProps:C,placement:O}}({triggerRef:ea,isNonModal:j,popoverRef:en,placement:V,offset:q,scrollRef:I,isDismissable:K,shouldCloseOnBlur:U,boundaryElement:G,crossOffset:Z,shouldFlip:B,containerPadding:N,updatePositionDeps:F,isKeyboardDismissDisabled:J,shouldCloseOnInteractOutside:Y},ec),{triggerProps:ep}=(0,i.IB)({type:$},ec,ea),{isFocusVisible:eg,isFocused:em,focusProps:ey}=(0,f.Fx)(),{dialogProps:ev,titleProps:eb}=(0,x.R)({},es),ew=(0,n.useMemo)(()=>(0,m.v)({...T}),[(0,v.Xx)(T)]),ex=(0,b.W)(null==ee?void 0:ee.base,Q),eE=(0,n.useCallback)((e={})=>({"data-slot":"content","data-open":(0,w.PB)(ec.isOpen),"data-arrow":(0,w.PB)(H),"data-placement":(0,o.sK)(ef,V),className:ew.content({class:(0,b.W)(null==ee?void 0:ee.content,e.className)})}),[ew,ec.isOpen,H,ef,V,ee]),ek=(0,n.useMemo)(()=>(0,o.Yv)(ef,V)&&ef||V,[ef,V]),eS=(0,n.useCallback)(t=>{var r;let n;return"touch"===t.pointerType&&((null==e?void 0:e.backdrop)==="blur"||(null==e?void 0:e.backdrop)==="opaque")?n=setTimeout(()=>{eo.current=!0},100):eo.current=!0,null==(r=ep.onPress)||r.call(ep,t),()=>{clearTimeout(n)}},[null==ep?void 0:ep.onPress]),eT=(0,n.useCallback)((e={},t=null)=>{let{isDisabled:r,...n}=e;return{"data-slot":"trigger","aria-haspopup":"dialog",...(0,l.d)(ep,n),onPress:eS,isDisabled:r,className:ew.trigger({class:(0,b.W)(null==ee?void 0:ee.trigger,e.className),isTriggerDisabled:r}),ref:(0,y.l)(t,ea)}},[ec,ep,eS,ea]),eM=(0,n.useCallback)((e={})=>({"data-slot":"backdrop",className:ew.backdrop({class:null==ee?void 0:ee.backdrop}),onClick:e=>{if(!eo.current){e.preventDefault();return}ec.close(),eo.current=!1},...eh,...e}),[ew,ec.isOpen,ee,eh]);return(0,n.useEffect)(()=>{if(ec.isOpen&&(null==en?void 0:en.current))return(0,i.RP)([null==en?void 0:en.current])},[ec.isOpen,en]),{state:ec,Component:M||"div",children:P,classNames:ee,showArrow:H,triggerRef:ea,placement:ek,isNonModal:j,titleProps:eb,popoverRef:en,portalContainer:z,isOpen:ec.isOpen,onClose:ec.close,disableAnimation:el,shouldBlockScroll:D,backdrop:null!=(E=e.backdrop)?E:"transparent",motionProps:X,getBackdropProps:eM,getPopoverProps:(e={})=>({ref:en,...(0,l.d)(ed,er,e),style:(0,l.d)(ed.style,er.style,e.style)}),getTriggerProps:eT,getDialogProps:(e={})=>({ref:es,"data-slot":"base","data-open":(0,w.PB)(ec.isOpen),"data-focus":(0,w.PB)(em),"data-arrow":(0,w.PB)(H),"data-focus-visible":(0,w.PB)(eg),"data-placement":(0,o.sK)(ef,V),...(0,l.d)(ey,ev,W,e),className:ew.base({class:(0,b.W)(ex)}),style:{outline:"none"}}),getContentProps:eE}}},77693:function(e,t,r){"use strict";let n,i,o;r.d(t,{b:function(){return S}});var s=r(30796),a=r(67294),l=r(15607),u=Object.create,c=Object.defineProperty,d=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyNames,f=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty,g=(e,t)=>function(){return t||(0,e[h(e)[0]])((t={exports:{}}).exports,t),t.exports},m=g({"../../../node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react.production.min.js"(e){var t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.iterator,f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},p=Object.assign,g={};function m(e,t,r){this.props=e,this.context=t,this.refs=g,this.updater=r||f}function y(){}function v(e,t,r){this.props=e,this.context=t,this.refs=g,this.updater=r||f}m.prototype.isReactComponent={},m.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)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")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=m.prototype;var b=v.prototype=new y;b.constructor=v,p(b,m.prototype),b.isPureReactComponent=!0;var w=Array.isArray,x=Object.prototype.hasOwnProperty,E={current:null},k={key:!0,ref:!0,__self:!0,__source:!0};function S(e,r,n){var i,o={},s=null,a=null;if(null!=r)for(i in void 0!==r.ref&&(a=r.ref),void 0!==r.key&&(s=""+r.key),r)x.call(r,i)&&!k.hasOwnProperty(i)&&(o[i]=r[i]);var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];o.children=u}if(e&&e.defaultProps)for(i in l=e.defaultProps)void 0===o[i]&&(o[i]=l[i]);return{$$typeof:t,type:e,key:s,ref:a,props:o,_owner:E.current}}function T(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}var M=/\/+/g;function A(e,t){var r,n;return"object"==typeof e&&null!==e&&null!=e.key?(r=""+e.key,n={"=":"=0",":":"=2"},"$"+r.replace(/[=:]/g,function(e){return n[e]})):t.toString(36)}function P(e,n,i){if(null==e)return e;var o=[],s=0;return!function e(n,i,o,s,a){var l,u,c,d=typeof n;("undefined"===d||"boolean"===d)&&(n=null);var f=!1;if(null===n)f=!0;else switch(d){case"string":case"number":f=!0;break;case"object":switch(n.$$typeof){case t:case r:f=!0}}if(f)return a=a(f=n),n=""===s?"."+A(f,0):s,w(a)?(o="",null!=n&&(o=n.replace(M,"$&/")+"/"),e(a,i,o,"",function(e){return e})):null!=a&&(T(a)&&(l=a,u=o+(!a.key||f&&f.key===a.key?"":(""+a.key).replace(M,"$&/")+"/")+n,a={$$typeof:t,type:l.type,key:u,ref:l.ref,props:l.props,_owner:l._owner}),i.push(a)),1;if(f=0,s=""===s?".":s+":",w(n))for(var p=0;p<n.length;p++){var g=s+A(d=n[p],p);f+=e(d,i,o,g,a)}else if("function"==typeof(g=null===(c=n)||"object"!=typeof c?null:"function"==typeof(c=h&&c[h]||c["@@iterator"])?c:null))for(n=g.call(n),p=0;!(d=n.next()).done;)g=s+A(d=d.value,p++),f+=e(d,i,o,g,a);else if("object"===d)throw Error("Objects are not valid as a React child (found: "+("[object Object]"===(i=String(n))?"object with keys {"+Object.keys(n).join(", ")+"}":i)+"). If you meant to render a collection of children, use an array instead.");return f}(e,o,"","",function(e){return n.call(i,e,s++)}),o}function C(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){(0===e._status||-1===e._status)&&(e._status=1,e._result=t)},function(t){(0===e._status||-1===e._status)&&(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var _={current:null},I={transition:null};e.Children={map:P,forEach:function(e,t,r){P(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!T(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},e.Component=m,e.Fragment=n,e.Profiler=o,e.PureComponent=v,e.StrictMode=i,e.Suspense=u,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED={ReactCurrentDispatcher:_,ReactCurrentBatchConfig:I,ReactCurrentOwner:E},e.cloneElement=function(e,r,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=p({},e.props),o=e.key,s=e.ref,a=e._owner;if(null!=r){if(void 0!==r.ref&&(s=r.ref,a=E.current),void 0!==r.key&&(o=""+r.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in r)x.call(r,u)&&!k.hasOwnProperty(u)&&(i[u]=void 0===r[u]&&void 0!==l?l[u]:r[u])}var u=arguments.length-2;if(1===u)i.children=n;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+2];i.children=l}return{$$typeof:t,type:e.type,key:o,ref:s,props:i,_owner:a}},e.createContext=function(e){return(e={$$typeof:a,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},e.createElement=S,e.createFactory=function(e){var t=S.bind(null,e);return t.type=e,t},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:l,render:e}},e.isValidElement=T,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:C}},e.memo=function(e,t){return{$$typeof:c,type:e,compare:void 0===t?null:t}},e.startTransition=function(e){var t=I.transition;I.transition={};try{e()}finally{I.transition=t}},e.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},e.useCallback=function(e,t){return _.current.useCallback(e,t)},e.useContext=function(e){return _.current.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e){return _.current.useDeferredValue(e)},e.useEffect=function(e,t){return _.current.useEffect(e,t)},e.useId=function(){return _.current.useId()},e.useImperativeHandle=function(e,t,r){return _.current.useImperativeHandle(e,t,r)},e.useInsertionEffect=function(e,t){return _.current.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return _.current.useLayoutEffect(e,t)},e.useMemo=function(e,t){return _.current.useMemo(e,t)},e.useReducer=function(e,t,r){return _.current.useReducer(e,t,r)},e.useRef=function(e){return _.current.useRef(e)},e.useState=function(e){return _.current.useState(e)},e.useSyncExternalStore=function(e,t,r){return _.current.useSyncExternalStore(e,t,r)},e.useTransition=function(){return _.current.useTransition()},e.version="18.2.0"}});g({"../../../node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react.development.js"(e,t){}});var y=(o=null!=(n=g({"../../../node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"(e,t){t.exports=m()}})())?u(f(n)):{},((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of h(t))p.call(e,i)||i===r||c(e,i,{get:()=>t[i],enumerable:!(n=d(t,i))||n.enumerable});return e})(!i&&n&&n.__esModule?o:c(o,"default",{value:n,enumerable:!0}),n)),v=(e,t)=>{var r;let n=[];return[null==(r=y.Children.map(e,e=>(0,y.isValidElement)(e)&&e.type===t?(n.push(e),null):e))?void 0:r.filter(Boolean),n.length>=0?n:void 0]},b=r(7436),w=r(91607),x=r(28349),E=r(85893),k=(0,l.Gp)((e,t)=>{let{triggerRef:r,getTriggerProps:n}=(0,s.l)(),{children:i,...o}=e,l=(0,a.useMemo)(()=>"string"==typeof i?(0,E.jsx)("p",{children:i}):a.Children.only(i),[i]),{onPress:u,isDisabled:c,...d}=(0,a.useMemo)(()=>n((0,x.d)(o,l.props),l.ref),[n,l.props,o,l.ref]),[,h]=v(i,w.A),{buttonProps:f}=(0,b.j)({onPress:u,isDisabled:c},r),p=(0,a.useMemo)(()=>(null==h?void 0:h[0])!==void 0,[h]);return(0,a.cloneElement)(l,(0,x.d)(d,p?{onPress:u,isDisabled:c}:f))});k.displayName="NextUI.PopoverTrigger";var S=k},7607:function(e,t,r){"use strict";r.d(t,{g:function(){return es}});var n,i,o,s,a,l,u,c=r(30796),d=r(67294),h=r(15607),f=r(31190),p=r(90029),g=r(18522),m=r(1673),y=r(12560),v=function(){return(v=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function b(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}"function"==typeof SuppressedError&&SuppressedError;var w="right-scroll-bar-position",x="width-before-scroll-bar";function E(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var k="undefined"!=typeof window?d.useLayoutEffect:d.useEffect,S=new WeakMap,T=(void 0===n&&(n={}),(void 0===i&&(i=function(e){return e}),o=[],s=!1,a={read:function(){if(s)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:null},useMedium:function(e){var t=i(e,s);return o.push(t),function(){o=o.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(s=!0;o.length;){var t=o;o=[],t.forEach(e)}o={push:function(t){return e(t)},filter:function(){return o}}},assignMedium:function(e){s=!0;var t=[];if(o.length){var r=o;o=[],r.forEach(e),t=o}var n=function(){var r=t;t=[],r.forEach(e)},i=function(){return Promise.resolve().then(n)};i(),o={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),o}}}}).options=v({async:!0,ssr:!1},n),a),M=function(){},A=d.forwardRef(function(e,t){var r,n,i,o,s=d.useRef(null),a=d.useState({onScrollCapture:M,onWheelCapture:M,onTouchMoveCapture:M}),l=a[0],u=a[1],c=e.forwardProps,h=e.children,f=e.className,p=e.removeScrollBar,g=e.enabled,m=e.shards,y=e.sideCar,w=e.noIsolation,x=e.inert,A=e.allowPinchZoom,P=e.as,C=e.gapMode,_=b(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),I=(r=[s,t],n=function(e){return r.forEach(function(t){return E(t,e)})},(i=(0,d.useState)(function(){return{value:null,callback:n,facade:{get current(){return i.value},set current(value){var e=i.value;e!==value&&(i.value=value,i.callback(value,e))}}}})[0]).callback=n,o=i.facade,k(function(){var e=S.get(o);if(e){var t=new Set(e),n=new Set(r),i=o.current;t.forEach(function(e){n.has(e)||E(e,null)}),n.forEach(function(e){t.has(e)||E(e,i)})}S.set(o,r)},[r]),o),O=v(v({},_),l);return d.createElement(d.Fragment,null,g&&d.createElement(y,{sideCar:T,removeScrollBar:p,shards:m,noIsolation:w,inert:x,setCallbacks:u,allowPinchZoom:!!A,lockRef:s,gapMode:C}),c?d.cloneElement(d.Children.only(h),v(v({},O),{ref:I})):d.createElement(void 0===P?"div":P,v({},O,{className:f,ref:I}),h))});A.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},A.classNames={fullWidth:x,zeroRight:w};var P=function(e){var t=e.sideCar,r=b(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw Error("Sidecar medium not found");return d.createElement(n,v({},r))};P.isSideCarExport=!0;var C=function(){var e=0,t=null;return{add:function(n){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=u||r.nc;return t&&e.setAttribute("nonce",t),e}())){var i,o;(i=t).styleSheet?i.styleSheet.cssText=n:i.appendChild(document.createTextNode(n)),o=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(o)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},_=function(){var e=C();return function(t,r){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},I=function(){var e=_();return function(t){return e(t.styles,t.dynamic),null}},O={left:0,top:0,right:0,gap:0},L=function(e){return parseInt(e||"",10)||0},R=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],i=t["padding"===e?"paddingRight":"marginRight"];return[L(r),L(n),L(i)]},j=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return O;var t=R(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},B=I(),N="data-scroll-locked",D=function(e,t,r,n){var i=e.left,o=e.top,s=e.right,a=e.gap;return void 0===r&&(r="margin"),"\n  .".concat("with-scroll-bars-hidden"," {\n   overflow: hidden ").concat(n,";\n   padding-right: ").concat(a,"px ").concat(n,";\n  }\n  body[").concat(N,"] {\n    overflow: hidden ").concat(n,";\n    overscroll-behavior: contain;\n    ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n    padding-left: ".concat(i,"px;\n    padding-top: ").concat(o,"px;\n    padding-right: ").concat(s,"px;\n    margin-left:0;\n    margin-top:0;\n    margin-right: ").concat(a,"px ").concat(n,";\n    "),"padding"===r&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),"\n  }\n  \n  .").concat(w," {\n    right: ").concat(a,"px ").concat(n,";\n  }\n  \n  .").concat(x," {\n    margin-right: ").concat(a,"px ").concat(n,";\n  }\n  \n  .").concat(w," .").concat(w," {\n    right: 0 ").concat(n,";\n  }\n  \n  .").concat(x," .").concat(x," {\n    margin-right: 0 ").concat(n,";\n  }\n  \n  body[").concat(N,"] {\n    ").concat("--removed-body-scroll-bar-size",": ").concat(a,"px;\n  }\n")},K=function(){var e=parseInt(document.body.getAttribute(N)||"0",10);return isFinite(e)?e:0},U=function(){d.useEffect(function(){return document.body.setAttribute(N,(K()+1).toString()),function(){var e=K()-1;e<=0?document.body.removeAttribute(N):document.body.setAttribute(N,e.toString())}},[])},z=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=void 0===n?"margin":n;U();var o=d.useMemo(function(){return j(i)},[i]);return d.createElement(B,{styles:D(o,!t,i,r?"":"!important")})},F=!1;if("undefined"!=typeof window)try{var W=Object.defineProperty({},"passive",{get:function(){return F=!0,!0}});window.addEventListener("test",W,W),window.removeEventListener("test",W,W)}catch(e){F=!1}var V=!!F&&{passive:!1},$=function(e,t){var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&"TEXTAREA"!==e.tagName&&"visible"===r[t])},H=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),q(e,n)){var i=Z(e,n);if(i[1]>i[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},q=function(e,t){return"v"===e?$(t,"overflowY"):$(t,"overflowX")},Z=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},G=function(e,t,r,n,i){var o,s=(o=window.getComputedStyle(t).direction,"h"===e&&"rtl"===o?-1:1),a=s*n,l=r.target,u=t.contains(l),c=!1,d=a>0,h=0,f=0;do{var p=Z(e,l),g=p[0],m=p[1]-p[2]-s*g;(g||m)&&q(e,l)&&(h+=m,f+=g),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return d&&(i&&1>Math.abs(h)||!i&&a>h)?c=!0:!d&&(i&&1>Math.abs(f)||!i&&-a>f)&&(c=!0),c},J=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Y=function(e){return[e.deltaX,e.deltaY]},X=function(e){return e&&"current"in e?e.current:e},Q=0,ee=[],et=(l=function(e){var t=d.useRef([]),r=d.useRef([0,0]),n=d.useRef(),i=d.useState(Q++)[0],o=d.useState(I)[0],s=d.useRef(e);d.useEffect(function(){s.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=(function(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))})([e.lockRef.current],(e.shards||[]).map(X),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var a=d.useCallback(function(e,t){if("touches"in e&&2===e.touches.length)return!s.current.allowPinchZoom;var i,o=J(e),a=r.current,l="deltaX"in e?e.deltaX:a[0]-o[0],u="deltaY"in e?e.deltaY:a[1]-o[1],c=e.target,d=Math.abs(l)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var h=H(d,c);if(!h)return!0;if(h?i=d:(i="v"===d?"h":"v",h=H(d,c)),!h)return!1;if(!n.current&&"changedTouches"in e&&(l||u)&&(n.current=i),!i)return!0;var f=n.current||i;return G(f,t,e,"h"===f?l:u,!0)},[]),l=d.useCallback(function(e){if(ee.length&&ee[ee.length-1]===o){var r="deltaY"in e?Y(e):J(e),n=t.current.filter(function(t){var n;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(n=t.delta)[0]===r[0]&&n[1]===r[1]})[0];if(n&&n.should){e.cancelable&&e.preventDefault();return}if(!n){var i=(s.current.shards||[]).map(X).filter(Boolean).filter(function(t){return t.contains(e.target)});(i.length>0?a(e,i[0]):!s.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),u=d.useCallback(function(e,r,n,i){var o={name:e,delta:r,target:n,should:i,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(n)};t.current.push(o),setTimeout(function(){t.current=t.current.filter(function(e){return e!==o})},1)},[]),c=d.useCallback(function(e){r.current=J(e),n.current=void 0},[]),h=d.useCallback(function(t){u(t.type,Y(t),t.target,a(t,e.lockRef.current))},[]),f=d.useCallback(function(t){u(t.type,J(t),t.target,a(t,e.lockRef.current))},[]);d.useEffect(function(){return ee.push(o),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:f}),document.addEventListener("wheel",l,V),document.addEventListener("touchmove",l,V),document.addEventListener("touchstart",c,V),function(){ee=ee.filter(function(e){return e!==o}),document.removeEventListener("wheel",l,V),document.removeEventListener("touchmove",l,V),document.removeEventListener("touchstart",c,V)}},[]);var p=e.removeScrollBar,g=e.inert;return d.createElement(d.Fragment,null,g?d.createElement(o,{styles:"\n  .block-interactivity-".concat(i," {pointer-events: none;}\n  .allow-interactivity-").concat(i," {pointer-events: all;}\n")}):null,p?d.createElement(z,{gapMode:e.gapMode}):null)},T.useMedium(l),P),er=d.forwardRef(function(e,t){return d.createElement(A,v({},e,{ref:t,sideCar:et}))});er.classNames=A.classNames;var en=r(10902),ei=r(85893),eo=(0,h.Gp)((e,t)=>{let{as:r,children:n,className:i,...o}=e,{Component:s,isOpen:a,placement:l,backdrop:u,motionProps:h,titleProps:v,disableAnimation:b,shouldBlockScroll:w,getPopoverProps:x,getDialogProps:E,getBackdropProps:k,getContentProps:S,isNonModal:T,onClose:M}=(0,c.l)(),A=E(o);delete A.role;let P=(0,ei.jsxs)(ei.Fragment,{children:[!T&&(0,ei.jsx)(f.U4,{onDismiss:M}),(0,ei.jsx)(r||s||"div",{...A,children:(0,ei.jsx)("div",{...S({className:i}),children:"function"==typeof n?n(v):n})}),(0,ei.jsx)(f.U4,{onDismiss:M})]}),C=(0,d.useMemo)(()=>"transparent"===u?null:b?(0,ei.jsx)("div",{...k()}):(0,ei.jsx)(g.X,{features:m.H,children:(0,ei.jsx)(y.m.div,{animate:"enter",exit:"exit",initial:"exit",variants:p.y7.fade,...k()})}),[u,b,k]),_=(0,d.useCallback)(({children:e})=>(0,ei.jsx)(er,{enabled:w&&a,removeScrollBar:!1,children:e}),[w,a]),I=b?(0,ei.jsx)(_,{children:P}):(0,ei.jsx)(g.X,{features:m.H,children:(0,ei.jsx)(y.m.div,{animate:"enter",exit:"exit",initial:"initial",style:{...(0,en.VS)("center"===l?"top":l)},variants:p.y7.scaleSpringOpacity,...h,children:(0,ei.jsx)(_,{children:P})})});return(0,ei.jsxs)("div",{...x(),children:[C,I]})});eo.displayName="NextUI.PopoverContent";var es=eo},30796:function(e,t,r){"use strict";r.d(t,{H:function(){return n},l:function(){return i}});var[n,i]=(0,r(46347).k)({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Popover />`"})},27963:function(e,t,r){"use strict";r.d(t,{z:function(){return l}});var n=new Set(["id","type","style","title","role","tabIndex","htmlFor","width","height","abbr","accept","acceptCharset","accessKey","action","allowFullScreen","allowTransparency","alt","async","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","challenge","charset","checked","cite","class","className","cols","colSpan","command","content","contentEditable","contextMenu","controls","coords","crossOrigin","data","dateTime","default","defer","dir","disabled","download","draggable","dropzone","encType","enterKeyHint","for","form","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","headers","hidden","high","href","hrefLang","httpEquiv","icon","inputMode","isMap","itemId","itemProp","itemRef","itemScope","itemType","kind","label","lang","list","loop","manifest","max","maxLength","media","mediaGroup","method","min","minLength","multiple","muted","name","noValidate","open","optimum","pattern","ping","placeholder","poster","preload","radioGroup","referrerPolicy","readOnly","rel","required","rows","rowSpan","sandbox","scope","scoped","scrolling","seamless","selected","shape","size","sizes","slot","sortable","span","spellCheck","src","srcDoc","srcSet","start","step","target","translate","typeMustMatch","useMap","value","wmode","wrap"]),i=new Set(["onCopy","onCut","onPaste","onLoad","onError","onWheel","onScroll","onCompositionEnd","onCompositionStart","onCompositionUpdate","onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onSubmit","onClick","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onPointerDown","onPointerEnter","onPointerLeave","onPointerUp","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionEnd"]),o=/^(data-.*)$/,s=/^(aria-.*)$/,a=/^(on[A-Z].*)$/;function l(e,t={}){let{labelable:r=!0,enabled:l=!0,propNames:u,omitPropNames:c,omitEventNames:d,omitDataProps:h,omitEventProps:f}=t,p={};if(!l)return e;for(let t in e)!((null==c?void 0:c.has(t))||(null==d?void 0:d.has(t))&&a.test(t)||a.test(t)&&!i.has(t)||h&&o.test(t)||f&&a.test(t))&&(Object.prototype.hasOwnProperty.call(e,t)&&(n.has(t)||r&&s.test(t)||(null==u?void 0:u.has(t))||o.test(t))||a.test(t))&&(p[t]=e[t]);return p}},46347:function(e,t,r){"use strict";r.d(t,{k:function(){return i}});var n=r(67294);function i(e={}){let{strict:t=!0,errorMessage:r="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:i}=e,o=n.createContext(void 0);return o.displayName=i,[o.Provider,function e(){var i;let s=n.useContext(o);if(!s&&t){let t=Error(r);throw t.name="ContextError",null==(i=Error.captureStackTrace)||i.call(Error,t,e),t}return s},o]}},48255:function(e,t,r){"use strict";r.d(t,{l:function(){return i}});var n=r(50262);function i(...e){return t=>{e.forEach(e=>(function(e,t){if(null!=e){if((0,n.mf)(e)){e(t);return}try{e.current=t}catch(r){throw Error(`Cannot assign value '${t}' to ref '${e}'`)}}})(e,t))}}},33295:function(e,t,r){"use strict";r.d(t,{fg:function(){return i},gy:function(){return o}});var n=r(67294);function i(e){return{UNSAFE_getDOMNode:()=>e.current}}function o(e){let t=(0,n.useRef)(null);return(0,n.useImperativeHandle)(e,()=>t.current),t}"undefined"!=typeof window&&window.document&&window.document.createElement},10918:function(e,t,r){"use strict";r.d(t,{i:function(){return o}});var n=r(49037),i=r(67294);function o(e={}){let[t,r]=(0,i.useState)([]);return{ripples:t,onClick:(0,i.useCallback)(e=>{let t=e.currentTarget,i=Math.max(t.clientWidth,t.clientHeight),o=t.getBoundingClientRect();r(t=>[...t,{key:(0,n.QI)(t.length.toString()),size:i,x:e.clientX-o.left-i/2,y:e.clientY-o.top-i/2}])},[]),onClear:(0,i.useCallback)(e=>{r(t=>t.filter(t=>t.key!==e))},[]),...e}}},61394:function(e,t,r){"use strict";r.d(t,{L:function(){return u}});var n=r(18522),i=r(1673),o=r(82703),s=r(12560),a=r(85893),l=e=>{let{ripples:t=[],motionProps:r,color:l="currentColor",style:u,onClear:c}=e;return(0,a.jsx)(a.Fragment,{children:t.map(e=>{let t=Math.min(Math.max(.01*e.size,.2),e.size>100?.75:.5);return(0,a.jsx)(n.X,{features:i.H,children:(0,a.jsx)(o.M,{mode:"popLayout",children:(0,a.jsx)(s.m.span,{animate:{transform:"scale(2)",opacity:0},className:"nextui-ripple",exit:{opacity:0},initial:{transform:"scale(0)",opacity:.35},style:{position:"absolute",backgroundColor:l,borderRadius:"100%",transformOrigin:"center",pointerEvents:"none",overflow:"hidden",inset:0,zIndex:0,top:e.y,left:e.x,width:`${e.size}px`,height:`${e.size}px`,...u},transition:{duration:t},onAnimationComplete:()=>{c(e.key)},...r})})},e.key)})})};l.displayName="NextUI.Ripple";var u=l},49869:function(e,t,r){"use strict";function n(...e){for(var t,r,i=0,o="";i<e.length;)(t=e[i++])&&(r=function e(t){var r,n,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t){if(Array.isArray(t))for(r=0;r<t.length;r++)t[r]&&(n=e(t[r]))&&(i&&(i+=" "),i+=n);else for(r in t)t[r]&&(i&&(i+=" "),i+=r)}return i}(t))&&(o&&(o+=" "),o+=r);return o}r.d(t,{W:function(){return n}})},50262:function(e,t,r){"use strict";r.d(t,{PB:function(){return l},Ts:function(){return n},mf:function(){return a},xb:function(){return s}});var n=!1;function i(e){return Array.isArray(e)}function o(e){let t=typeof e;return null!=e&&("object"===t||"function"===t)&&!i(e)}function s(e){return i(e)?i(e)&&0===e.length:o(e)?o(e)&&0===Object.keys(e).length:null==e||""===e}function a(e){return"function"==typeof e}var l=e=>e?"true":void 0},49037:function(e,t,r){"use strict";r.d(t,{Os:function(){return s},QI:function(){return o},Xx:function(){return a},kC:function(){return n},v0:function(){return i}});var n=e=>e.charAt(0).toUpperCase()+e.slice(1);function i(...e){return function(t){e.some(e=>(null==e||e(t),null==t?void 0:t.defaultPrevented))}}function o(e){return`${e}-${Math.floor(1e6*Math.random())}`}function s(e){for(let t in e)t.startsWith("on")&&delete e[t];return e}function a(e){if(!e||"object"!=typeof e)return"";try{return JSON.stringify(e)}catch(e){return""}}},34863:function(e,t,r){"use strict";r.d(t,{c:function(){return c}});var n=r(15607),i=(0,r(49453).tv)({slots:{base:"relative inline-flex flex-col gap-2 items-center justify-center",wrapper:"relative flex",circle1:["absolute","w-full","h-full","rounded-full","animate-spinner-ease-spin","border-2","border-solid","border-t-transparent","border-l-transparent","border-r-transparent"],circle2:["absolute","w-full","h-full","rounded-full","opacity-75","animate-spinner-linear-spin","border-2","border-dotted","border-t-transparent","border-l-transparent","border-r-transparent"],label:"text-foreground dark:text-foreground-dark font-regular"},variants:{size:{sm:{wrapper:"w-5 h-5",circle1:"border-2",circle2:"border-2",label:"text-small"},md:{wrapper:"w-8 h-8",circle1:"border-3",circle2:"border-3",label:"text-medium"},lg:{wrapper:"w-10 h-10",circle1:"border-3",circle2:"border-3",label:"text-large"}},color:{current:{circle1:"border-b-current",circle2:"border-b-current"},white:{circle1:"border-b-white",circle2:"border-b-white"},default:{circle1:"border-b-default",circle2:"border-b-default"},primary:{circle1:"border-b-primary",circle2:"border-b-primary"},secondary:{circle1:"border-b-secondary",circle2:"border-b-secondary"},success:{circle1:"border-b-success",circle2:"border-b-success"},warning:{circle1:"border-b-warning",circle2:"border-b-warning"},danger:{circle1:"border-b-danger",circle2:"border-b-danger"}},labelColor:{foreground:{label:"text-foreground"},primary:{label:"text-primary"},secondary:{label:"text-secondary"},success:{label:"text-success"},warning:{label:"text-warning"},danger:{label:"text-danger"}}},defaultVariants:{size:"md",color:"primary",labelColor:"foreground"}}),o=r(49037),s=r(49869),a=r(67294),l=r(85893),u=(0,n.Gp)((e,t)=>{let{slots:r,classNames:u,label:c,getSpinnerProps:d}=function(e){let[t,r]=(0,n.oe)(e,i.variantKeys),{children:l,className:u,classNames:c,label:d,...h}=t,f=(0,a.useMemo)(()=>i({...r}),[(0,o.Xx)(r)]),p=(0,s.W)(null==c?void 0:c.base,u),g=d||l,m=(0,a.useMemo)(()=>g&&"string"==typeof g?g:h["aria-label"]?"":"Loading",[l,g,h["aria-label"]]),y=(0,a.useCallback)(()=>({"aria-label":m,className:f.base({class:p}),...h}),[m,f,p,h]);return{label:g,slots:f,classNames:c,getSpinnerProps:y}}({...e});return(0,l.jsxs)("div",{ref:t,...d(),children:[(0,l.jsxs)("div",{className:r.wrapper({class:null==u?void 0:u.wrapper}),children:[(0,l.jsx)("i",{className:r.circle1({class:null==u?void 0:u.circle1})}),(0,l.jsx)("i",{className:r.circle2({class:null==u?void 0:u.circle2})})]}),c&&(0,l.jsx)("span",{className:r.label({class:null==u?void 0:u.label}),children:c})]})});u.displayName="NextUI.Spinner";var c=u},40675:function(e,t,r){"use strict";r.d(t,{h:function(){return eh}});var n=r(67294),i=r(76733),o=r(15607),s=r(48255),a=r(93387),l=r(68806),u=r(78837),c=r(85007),d=r(28349),h=r(72970),f=r(36116),p=r(61718),g=r(11086),m=r(32433),y=r(26301),v=r(77604),b=r(13094),w=r(7321),x=r(29677);let E="default",k="",S=new WeakMap;function T(e){if((0,l.gn)()){if("default"===E){let t=(0,u.r)(e);k=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}E="disabled"}else(e instanceof HTMLElement||e instanceof SVGElement)&&(S.set(e,e.style.userSelect),e.style.userSelect="none")}function M(e){if((0,l.gn)())"disabled"===E&&(E="restoring",setTimeout(()=>{(0,c.Q)(()=>{if("restoring"===E){let t=(0,u.r)(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=k||""),k="",E="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&S.has(e)){let t=S.get(e);"none"===e.style.userSelect&&(e.style.userSelect=t),""===e.getAttribute("style")&&e.removeAttribute("style"),S.delete(e)}}let A=n.createContext({register:()=>{}});A.displayName="PressResponderContext";var P=new WeakMap;class C{continuePropagation(){(0,x._)(this,P,!1)}get shouldStopPropagation(){return(0,b._)(this,P)}constructor(e,t,r){(0,w._)(this,P,{writable:!0,value:void 0}),(0,x._)(this,P,!0),this.type=e,this.pointerType=t,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey}}let _=Symbol("linkClicked");function I(e){return"A"===e.tagName&&e.hasAttribute("href")}function O(e,t){let{key:r,code:n}=e,i=t.getAttribute("role");return("Enter"===r||" "===r||"Spacebar"===r||"Space"===n)&&!(t instanceof(0,u.k)(t).HTMLInputElement&&!K(t,r)||t instanceof(0,u.k)(t).HTMLTextAreaElement||t.isContentEditable)&&!(("link"===i||!i&&I(t))&&"Enter"!==r)}function L(e,t){let r=e.changedTouches;for(let e=0;e<r.length;e++){let n=r[e];if(n.identifier===t)return n}return null}function R(e,t){return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey}}function j(e,t){let r,n,i=t.getBoundingClientRect(),o=(r=0,n=0,void 0!==e.width?r=e.width/2:void 0!==e.radiusX&&(r=e.radiusX),void 0!==e.height?n=e.height/2:void 0!==e.radiusY&&(n=e.radiusY),{top:e.clientY-n,right:e.clientX+r,bottom:e.clientY+n,left:e.clientX-r});return!(i.left>o.right)&&!(o.left>i.right)&&!(i.top>o.bottom)&&!(o.top>i.bottom)}function B(e){return!(e instanceof HTMLElement)||!e.hasAttribute("draggable")}function N(e,t){return e instanceof HTMLInputElement?!K(e,t):e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!I(e)}let D=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function K(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:D.has(e.type)}let U=new Set,z=new Map,F=!1,W=!1;function V(e,t){for(let r of U)r(e,t)}function $(e){F=!0,e.metaKey||!(0,l.V5)()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||V("keyboard",e)}function H(e){("mousedown"===e.type||"pointerdown"===e.type)&&(F=!0,V("pointer",e))}function q(e){(0,y.Z)(e)&&(F=!0)}function Z(e){e.target!==window&&e.target!==document&&(F||W||V("virtual",e),F=!1,W=!1)}function G(){F=!1,W=!0}function J(e){if("undefined"==typeof window||z.get((0,u.k)(e)))return;let t=(0,u.k)(e),r=(0,u.r)(e),n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){F=!0,n.apply(this,arguments)},r.addEventListener("keydown",$,!0),r.addEventListener("keyup",$,!0),r.addEventListener("click",q,!0),t.addEventListener("focus",Z,!0),t.addEventListener("blur",G,!1),"undefined"!=typeof PointerEvent?(r.addEventListener("pointerdown",H,!0),r.addEventListener("pointermove",H,!0),r.addEventListener("pointerup",H,!0)):(r.addEventListener("mousedown",H,!0),r.addEventListener("mousemove",H,!0),r.addEventListener("mouseup",H,!0)),t.addEventListener("beforeunload",()=>{Y(e)},{once:!0}),z.set(t,{focus:n})}let Y=(e,t)=>{let r=(0,u.k)(e),n=(0,u.r)(e);t&&n.removeEventListener("DOMContentLoaded",t),z.has(r)&&(r.HTMLElement.prototype.focus=z.get(r).focus,n.removeEventListener("keydown",$,!0),n.removeEventListener("keyup",$,!0),n.removeEventListener("click",q,!0),r.removeEventListener("focus",Z,!0),r.removeEventListener("blur",G,!1),"undefined"!=typeof PointerEvent?(n.removeEventListener("pointerdown",H,!0),n.removeEventListener("pointermove",H,!0),n.removeEventListener("pointerup",H,!0)):(n.removeEventListener("mousedown",H,!0),n.removeEventListener("mousemove",H,!0),n.removeEventListener("mouseup",H,!0)),z.delete(r))};"undefined"!=typeof document&&function(e){let t;let r=(0,u.r)(void 0);"loading"!==r.readyState?J(void 0):(t=()=>{J(void 0)},r.addEventListener("DOMContentLoaded",t)),()=>Y(e,t)}();let X=!1,Q=0;function ee(){X=!0,setTimeout(()=>{X=!1},50)}function et(e){"touch"===e.pointerType&&ee()}function er(){if("undefined"!=typeof document)return"undefined"!=typeof PointerEvent?document.addEventListener("pointerup",et):document.addEventListener("touchend",ee),Q++,()=>{--Q>0||("undefined"!=typeof PointerEvent?document.removeEventListener("pointerup",et):document.removeEventListener("touchend",ee))}}var en=r(49453),ei=r(65512),eo=(0,en.tv)({slots:{base:"group relative max-w-fit inline-flex items-center justify-start cursor-pointer touch-none tap-highlight-transparent",wrapper:["px-1","relative","inline-flex","items-center","justify-start","flex-shrink-0","overflow-hidden","bg-default-200","rounded-full",...ei.ID],thumb:["z-10","flex","items-center","justify-center","bg-white","shadow-small","rounded-full","origin-right"],startContent:"z-0 absolute left-1.5 rtl:right-1.5 rtl:left-[unset] text-current",endContent:"z-0 absolute right-1.5 rtl:left-1.5 rtl:right-[unset] text-default-600",thumbIcon:"text-black",label:"relative text-foreground select-none"},variants:{color:{default:{wrapper:["group-data-[selected=true]:bg-default-400","group-data-[selected=true]:text-default-foreground"]},primary:{wrapper:["group-data-[selected=true]:bg-primary","group-data-[selected=true]:text-primary-foreground"]},secondary:{wrapper:["group-data-[selected=true]:bg-secondary","group-data-[selected=true]:text-secondary-foreground"]},success:{wrapper:["group-data-[selected=true]:bg-success","group-data-[selected=true]:text-success-foreground"]},warning:{wrapper:["group-data-[selected=true]:bg-warning","group-data-[selected=true]:text-warning-foreground"]},danger:{wrapper:["group-data-[selected=true]:bg-danger","data-[selected=true]:text-danger-foreground"]}},size:{sm:{wrapper:"w-10 h-6 mr-2 rtl:ml-2 rtl:mr-[unset]",thumb:["w-4 h-4 text-tiny","group-data-[selected=true]:ml-4 rtl:group-data-[selected=true]:ml-0 rtl:group-data-[selected=true]:mr-4"],endContent:"text-tiny",startContent:"text-tiny",label:"text-small"},md:{wrapper:"w-12 h-7 mr-2 rtl:ml-2 rtl:mr-[unset]",thumb:["w-5 h-5 text-small","group-data-[selected=true]:ml-5 rtl:group-data-[selected=true]:ml-0 rtl:group-data-[selected=true]:mr-5"],endContent:"text-small",startContent:"text-small",label:"text-medium"},lg:{wrapper:"w-14 h-8 mr-2 rtl:ml-2 rtl:mr-[unset]",thumb:["w-6 h-6 text-medium","group-data-[selected=true]:ml-6 rtl:group-data-[selected=true]:ml-0 rtl:group-data-[selected=true]:mr-6"],endContent:"text-medium",startContent:"text-medium",label:"text-large"}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"}},disableAnimation:{true:{wrapper:"transition-none",thumb:"transition-none"},false:{wrapper:"transition-background",thumb:"transition-all",startContent:["opacity-0","scale-50","transition-transform-opacity","group-data-[selected=true]:scale-100","group-data-[selected=true]:opacity-100"],endContent:["opacity-100","transition-transform-opacity","group-data-[selected=true]:translate-x-3","group-data-[selected=true]:opacity-0"]}}},defaultVariants:{color:"primary",size:"md",isDisabled:!1},compoundVariants:[{disableAnimation:!1,size:"sm",class:{thumb:["group-data-[pressed=true]:w-5","group-data-[selected]:group-data-[pressed]:ml-3"]}},{disableAnimation:!1,size:"md",class:{thumb:["group-data-[pressed=true]:w-6","group-data-[selected]:group-data-[pressed]:ml-4"]}},{disableAnimation:!1,size:"lg",class:{thumb:["group-data-[pressed=true]:w-7","group-data-[selected]:group-data-[pressed]:ml-5"]}}]}),es=r(49037),ea=r(49869),el=r(50262),eu=r(34154),ec=r(94470),ed=r(28628);function eh(e={}){var t,r;let c=(0,i.w)(),[b,w]=(0,o.oe)(e,eo.variantKeys),{ref:x,as:E,name:k,value:S="",isReadOnly:P=!1,autoFocus:D=!1,startContent:K,endContent:U,defaultSelected:z,isSelected:F,children:W,thumbIcon:V,className:$,classNames:H,onChange:q,onValueChange:Z,...G}=b,J=(0,n.useRef)(null),Y=(0,n.useRef)(null),Q=null!=(r=null!=(t=e.disableAnimation)?t:null==c?void 0:c.disableAnimation)&&r,ee=(0,n.useId)(),et=(0,n.useMemo)(()=>{let t=G["aria-label"]||"string"==typeof W?W:void 0;return{name:k,value:S,children:W,autoFocus:D,defaultSelected:z,isSelected:F,isDisabled:!!e.isDisabled,isReadOnly:P,"aria-label":t,"aria-labelledby":G["aria-labelledby"]||ee,onChange:Z}},[S,k,ee,W,D,P,F,z,e.isDisabled,G["aria-label"],G["aria-labelledby"],Z]),en=(0,ec.l)(et);(0,a.G)(()=>{if(!Y.current)return;let e=!!Y.current.checked;en.setSelected(e)},[Y.current]);let{inputProps:ei,isPressed:eh,isReadOnly:ef}=function(e,t,r){let{labelProps:n,inputProps:i,isSelected:o,isPressed:s,isDisabled:a,isReadOnly:l}=(0,eu.O)(e,t,r);return{labelProps:n,inputProps:{...i,role:"switch",checked:o},isSelected:o,isPressed:s,isDisabled:a,isReadOnly:l}}(et,en,Y),{focusProps:ep,isFocused:eg,isFocusVisible:em}=(0,ed.Fx)({autoFocus:ei.autoFocus}),{hoverProps:ey,isHovered:ev}=function(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:i,isDisabled:o}=e,[s,a]=(0,n.useState)(!1),l=(0,n.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,n.useEffect)(er,[]);let{hoverProps:u,triggerHoverEnd:c}=(0,n.useMemo)(()=>{let e=(e,n)=>{if(l.pointerType=n,o||"touch"===n||l.isHovered||!e.currentTarget.contains(e.target))return;l.isHovered=!0;let i=e.currentTarget;l.target=i,t&&t({type:"hoverstart",target:i,pointerType:n}),r&&r(!0),a(!0)},n=(e,t)=>{if(l.pointerType="",l.target=null,"touch"===t||!l.isHovered)return;l.isHovered=!1;let n=e.currentTarget;i&&i({type:"hoverend",target:n,pointerType:t}),r&&r(!1),a(!1)},s={};return"undefined"!=typeof PointerEvent?(s.onPointerEnter=t=>{X&&"mouse"===t.pointerType||e(t,t.pointerType)},s.onPointerLeave=e=>{!o&&e.currentTarget.contains(e.target)&&n(e,e.pointerType)}):(s.onTouchStart=()=>{l.ignoreEmulatedMouseEvents=!0},s.onMouseEnter=t=>{l.ignoreEmulatedMouseEvents||X||e(t,"mouse"),l.ignoreEmulatedMouseEvents=!1},s.onMouseLeave=e=>{!o&&e.currentTarget.contains(e.target)&&n(e,"mouse")}),{hoverProps:s,triggerHoverEnd:n}},[t,r,i,o,l]);return(0,n.useEffect)(()=>{o&&c({currentTarget:l.target},l.pointerType)},[o]),{hoverProps:u,isHovered:s}}({isDisabled:ei.disabled}),eb=et.isDisabled||ef,[ew,ex]=(0,n.useState)(!1),{pressProps:eE}=function(e){let{onPress:t,onPressChange:r,onPressStart:i,onPressEnd:o,onPressUp:s,isDisabled:a,isPressed:c,preventFocusOnPress:b,shouldCancelOnPointerExit:w,allowTextSelectionOnPress:x,ref:E,...k}=function(e){let t=(0,n.useContext)(A);if(t){let{register:r,...n}=t;e=(0,d.d)(n,e),r()}return(0,h.l)(t,e.ref),e}(e),[S,P]=(0,n.useState)(!1),D=(0,n.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:K,removeAllGlobalListeners:U}=(0,f.x)(),z=(0,p.i)((e,t)=>{let n=D.current;if(a||n.didFirePressStart)return!1;let o=!0;if(n.isTriggeringEvent=!0,i){let r=new C("pressstart",t,e);i(r),o=r.shouldStopPropagation}return r&&r(!0),n.isTriggeringEvent=!1,n.didFirePressStart=!0,P(!0),o}),F=(0,p.i)((e,n,i=!0)=>{let s=D.current;if(!s.didFirePressStart)return!1;s.ignoreClickAfterPress=!0,s.didFirePressStart=!1,s.isTriggeringEvent=!0;let l=!0;if(o){let t=new C("pressend",n,e);o(t),l=t.shouldStopPropagation}if(r&&r(!1),P(!1),t&&i&&!a){let r=new C("press",n,e);t(r),l&&(l=r.shouldStopPropagation)}return s.isTriggeringEvent=!1,l}),W=(0,p.i)((e,t)=>{let r=D.current;if(a)return!1;if(s){r.isTriggeringEvent=!0;let n=new C("pressup",t,e);return s(n),r.isTriggeringEvent=!1,n.shouldStopPropagation}return!0}),V=(0,p.i)(e=>{let t=D.current;t.isPressed&&t.target&&(t.isOverTarget&&null!=t.pointerType&&F(R(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,U(),x||M(t.target))}),$=(0,p.i)(e=>{w&&V(e)}),H=(0,n.useMemo)(()=>{let e=D.current,t={onKeyDown(t){if(O(t.nativeEvent,t.currentTarget)&&t.currentTarget.contains(t.target)){var n;N(t.target,t.key)&&t.preventDefault();let i=!0;if(!e.isPressed&&!t.repeat){e.target=t.currentTarget,e.isPressed=!0,i=z(t,"keyboard");let n=t.currentTarget;K((0,u.r)(t.currentTarget),"keyup",(0,g.t)(t=>{O(t,n)&&!t.repeat&&n.contains(t.target)&&e.target&&W(R(e.target,t),"keyboard")},r),!0)}i&&t.stopPropagation(),t.metaKey&&(0,l.V5)()&&(null===(n=e.metaKeyEvents)||void 0===n||n.set(t.key,t.nativeEvent))}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||t.currentTarget.contains(t.target))&&t&&0===t.button&&!e.isTriggeringEvent&&!m.nG.isOpening){let r=!0;if(a&&t.preventDefault(),!e.ignoreClickAfterPress&&!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||(0,y.Z)(t.nativeEvent))){a||b||(0,v.A)(t.currentTarget);let e=z(t,"virtual"),n=W(t,"virtual"),i=F(t,"virtual");r=e&&n&&i}e.ignoreEmulatedMouseEvents=!1,e.ignoreClickAfterPress=!1,r&&t.stopPropagation()}}},r=t=>{var r,n,i;if(e.isPressed&&e.target&&O(t,e.target)){N(t.target,t.key)&&t.preventDefault();let r=t.target;F(R(e.target,t),"keyboard",e.target.contains(r)),U(),"Enter"!==t.key&&I(e.target)&&e.target.contains(r)&&!t[_]&&(t[_]=!0,(0,m.nG)(e.target,t,!1)),e.isPressed=!1,null===(n=e.metaKeyEvents)||void 0===n||n.delete(t.key)}else if("Meta"===t.key&&(null===(r=e.metaKeyEvents)||void 0===r?void 0:r.size)){let t=e.metaKeyEvents;for(let r of(e.metaKeyEvents=void 0,t.values()))null===(i=e.target)||void 0===i||i.dispatchEvent(new KeyboardEvent("keyup",r))}};if("undefined"!=typeof PointerEvent){t.onPointerDown=t=>{if(0!==t.button||!t.currentTarget.contains(t.target))return;if((0,y.c)(t.nativeEvent)){e.pointerType="virtual";return}B(t.currentTarget)&&t.preventDefault(),e.pointerType=t.pointerType;let o=!0;e.isPressed||(e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,a||b||(0,v.A)(t.currentTarget),x||T(e.target),o=z(t,e.pointerType),K((0,u.r)(t.currentTarget),"pointermove",r,!1),K((0,u.r)(t.currentTarget),"pointerup",n,!1),K((0,u.r)(t.currentTarget),"pointercancel",i,!1)),o&&t.stopPropagation()},t.onMouseDown=e=>{e.currentTarget.contains(e.target)&&0===e.button&&(B(e.currentTarget)&&e.preventDefault(),e.stopPropagation())},t.onPointerUp=t=>{t.currentTarget.contains(t.target)&&"virtual"!==e.pointerType&&0===t.button&&j(t,t.currentTarget)&&W(t,e.pointerType||t.pointerType)};let r=t=>{t.pointerId===e.activePointerId&&(e.target&&j(t,e.target)?e.isOverTarget||null==e.pointerType||(e.isOverTarget=!0,z(R(e.target,t),e.pointerType)):e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,F(R(e.target,t),e.pointerType,!1),$(t)))},n=t=>{t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target&&(j(t,e.target)&&null!=e.pointerType?F(R(e.target,t),e.pointerType):e.isOverTarget&&null!=e.pointerType&&F(R(e.target,t),e.pointerType,!1),e.isPressed=!1,e.isOverTarget=!1,e.activePointerId=null,e.pointerType=null,U(),x||M(e.target))},i=e=>{V(e)};t.onDragStart=e=>{e.currentTarget.contains(e.target)&&V(e)}}else{t.onMouseDown=t=>{if(0===t.button&&t.currentTarget.contains(t.target)){if(B(t.currentTarget)&&t.preventDefault(),e.ignoreEmulatedMouseEvents){t.stopPropagation();return}e.isPressed=!0,e.isOverTarget=!0,e.target=t.currentTarget,e.pointerType=(0,y.Z)(t.nativeEvent)?"virtual":"mouse",a||b||(0,v.A)(t.currentTarget),z(t,e.pointerType)&&t.stopPropagation(),K((0,u.r)(t.currentTarget),"mouseup",r,!1)}},t.onMouseEnter=t=>{if(!t.currentTarget.contains(t.target))return;let r=!0;e.isPressed&&!e.ignoreEmulatedMouseEvents&&null!=e.pointerType&&(e.isOverTarget=!0,r=z(t,e.pointerType)),r&&t.stopPropagation()},t.onMouseLeave=t=>{if(!t.currentTarget.contains(t.target))return;let r=!0;e.isPressed&&!e.ignoreEmulatedMouseEvents&&null!=e.pointerType&&(e.isOverTarget=!1,r=F(t,e.pointerType,!1),$(t)),r&&t.stopPropagation()},t.onMouseUp=t=>{t.currentTarget.contains(t.target)&&!e.ignoreEmulatedMouseEvents&&0===t.button&&W(t,e.pointerType||"mouse")};let r=t=>{if(0===t.button){if(e.isPressed=!1,U(),e.ignoreEmulatedMouseEvents){e.ignoreEmulatedMouseEvents=!1;return}e.target&&j(t,e.target)&&null!=e.pointerType?F(R(e.target,t),e.pointerType):e.target&&e.isOverTarget&&null!=e.pointerType&&F(R(e.target,t),e.pointerType,!1),e.isOverTarget=!1}};t.onTouchStart=t=>{if(!t.currentTarget.contains(t.target))return;let r=function(e){let{targetTouches:t}=e;return t.length>0?t[0]:null}(t.nativeEvent);r&&(e.activePointerId=r.identifier,e.ignoreEmulatedMouseEvents=!0,e.isOverTarget=!0,e.isPressed=!0,e.target=t.currentTarget,e.pointerType="touch",a||b||(0,v.A)(t.currentTarget),x||T(e.target),z(t,e.pointerType)&&t.stopPropagation(),K((0,u.k)(t.currentTarget),"scroll",n,!0))},t.onTouchMove=t=>{if(!t.currentTarget.contains(t.target))return;if(!e.isPressed){t.stopPropagation();return}let r=L(t.nativeEvent,e.activePointerId),n=!0;r&&j(r,t.currentTarget)?e.isOverTarget||null==e.pointerType||(e.isOverTarget=!0,n=z(t,e.pointerType)):e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,n=F(t,e.pointerType,!1),$(t)),n&&t.stopPropagation()},t.onTouchEnd=t=>{if(!t.currentTarget.contains(t.target))return;if(!e.isPressed){t.stopPropagation();return}let r=L(t.nativeEvent,e.activePointerId),n=!0;r&&j(r,t.currentTarget)&&null!=e.pointerType?(W(t,e.pointerType),n=F(t,e.pointerType)):e.isOverTarget&&null!=e.pointerType&&(n=F(t,e.pointerType,!1)),n&&t.stopPropagation(),e.isPressed=!1,e.activePointerId=null,e.isOverTarget=!1,e.ignoreEmulatedMouseEvents=!0,e.target&&!x&&M(e.target),U()},t.onTouchCancel=t=>{t.currentTarget.contains(t.target)&&(t.stopPropagation(),e.isPressed&&V(t))};let n=t=>{e.isPressed&&t.target.contains(e.target)&&V({currentTarget:e.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};t.onDragStart=e=>{e.currentTarget.contains(e.target)&&V(e)}}return t},[K,a,b,U,x,V,$,F,z,W]);return(0,n.useEffect)(()=>()=>{var e;x||M(null!==(e=D.current.target)&&void 0!==e?e:void 0)},[x]),{isPressed:c||S,pressProps:(0,d.d)(k,H)}}({isDisabled:eb,onPressStart(e){"keyboard"!==e.pointerType&&ex(!0)},onPressEnd(e){"keyboard"!==e.pointerType&&ex(!1)}}),ek=!eb&&(ew||eh),eS=ei.checked,eT=ei.disabled,eM=(0,n.useMemo)(()=>eo({...w,disableAnimation:Q}),[(0,es.Xx)(w),Q]),eA=(0,ea.W)(null==H?void 0:H.base,$),eP=(0,n.useCallback)((e={})=>({...e,"aria-hidden":!0,className:(0,ea.W)(eM.wrapper({class:(0,ea.W)(null==H?void 0:H.wrapper,null==e?void 0:e.className)}))}),[eM,null==H?void 0:H.wrapper]),eC=(0,n.useCallback)((e={})=>({...e,className:eM.thumb({class:(0,ea.W)(null==H?void 0:H.thumb,null==e?void 0:e.className)})}),[eM,null==H?void 0:H.thumb]),e_=(0,n.useCallback)((e={})=>({...e,id:ee,className:eM.label({class:(0,ea.W)(null==H?void 0:H.label,null==e?void 0:e.className)})}),[eM,null==H?void 0:H.label,eT,eS]),eI=(0,n.useCallback)((e={includeStateProps:!1})=>(0,d.d)({width:"1em",height:"1em",className:eM.thumbIcon({class:(0,ea.W)(null==H?void 0:H.thumbIcon)})},e.includeStateProps?{isSelected:eS}:{}),[eM,null==H?void 0:H.thumbIcon,eS]),eO=(0,n.useCallback)((e={})=>({width:"1em",height:"1em",...e,className:eM.startContent({class:(0,ea.W)(null==H?void 0:H.startContent,null==e?void 0:e.className)})}),[eM,null==H?void 0:H.startContent,eS]),eL=(0,n.useCallback)((e={})=>({width:"1em",height:"1em",...e,className:eM.endContent({class:(0,ea.W)(null==H?void 0:H.endContent,null==e?void 0:e.className)})}),[eM,null==H?void 0:H.endContent,eS]);return{Component:E||"label",slots:eM,classNames:H,domRef:J,children:W,thumbIcon:V,startContent:K,endContent:U,isHovered:ev,isSelected:eS,isPressed:ek,isFocused:eg,isFocusVisible:em,isDisabled:eT,getBaseProps:e=>({...(0,d.d)(ey,eE,G,e),ref:J,className:eM.base({class:(0,ea.W)(eA,null==e?void 0:e.className)}),"data-disabled":(0,el.PB)(eT),"data-selected":(0,el.PB)(eS),"data-readonly":(0,el.PB)(ef),"data-focus":(0,el.PB)(eg),"data-focus-visible":(0,el.PB)(em),"data-hover":(0,el.PB)(ev),"data-pressed":(0,el.PB)(ek)}),getWrapperProps:eP,getInputProps:(e={})=>({...(0,d.d)(ei,ep,e),ref:(0,s.l)(Y,x),id:ei.id,onChange:(0,g.t)(q,ei.onChange)}),getLabelProps:e_,getThumbProps:eC,getThumbIconProps:eI,getStartContentProps:eO,getEndContentProps:eL}}},19916:function(e,t,r){"use strict";r.d(t,{i:function(){return u}});var n=r(40675),i=r(46822),o=r(67294),s=r(15607),a=r(85893),l=(0,s.Gp)((e,t)=>{let{Component:r,children:s,startContent:l,endContent:u,thumbIcon:c,getBaseProps:d,getInputProps:h,getWrapperProps:f,getThumbProps:p,getThumbIconProps:g,getLabelProps:m,getStartContentProps:y,getEndContentProps:v}=(0,n.h)({...e,ref:t}),b="function"==typeof c?c(g({includeStateProps:!0})):c&&(0,o.cloneElement)(c,g()),w=l&&(0,o.cloneElement)(l,y()),x=u&&(0,o.cloneElement)(u,v());return(0,a.jsxs)(r,{...d(),children:[(0,a.jsx)(i.T,{elementType:"span",children:(0,a.jsx)("input",{...h()})}),(0,a.jsxs)("span",{...f(),children:[l&&w,(0,a.jsx)("span",{...p(),children:c&&b}),u&&x]}),s&&(0,a.jsx)("span",{...m(),children:s})]})});l.displayName="NextUI.Switch";var u=l},15607:function(e,t,r){"use strict";r.d(t,{Gp:function(){return i},oe:function(){return o}});var n=r(67294);function i(e){return(0,n.forwardRef)(e)}var o=(e,t,r=!0)=>{if(!t)return[e,{}];let n=t.reduce((t,r)=>r in e?{...t,[r]:e[r]}:t,{});return r?[Object.keys(e).filter(e=>!t.includes(e)).reduce((t,r)=>({...t,[r]:e[r]}),{}),n]:[e,n]}},76733:function(e,t,r){"use strict";r.d(t,{a:function(){return n},w:function(){return i}});var[n,i]=(0,r(46347).k)({name:"ProviderContext",strict:!1})},43649:function(e,t,r){"use strict";r.d(t,{J:function(){return n}});var n={solid:{default:"bg-default text-default-foreground",primary:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",success:"bg-success text-success-foreground",warning:"bg-warning text-warning-foreground",danger:"bg-danger text-danger-foreground",foreground:"bg-foreground text-background"},shadow:{default:"shadow-lg shadow-default/50 bg-default text-default-foreground",primary:"shadow-lg shadow-primary/40 bg-primary text-primary-foreground",secondary:"shadow-lg shadow-secondary/40 bg-secondary text-secondary-foreground",success:"shadow-lg shadow-success/40 bg-success text-success-foreground",warning:"shadow-lg shadow-warning/40 bg-warning text-warning-foreground",danger:"shadow-lg shadow-danger/40 bg-danger text-danger-foreground",foreground:"shadow-lg shadow-foreground/40 bg-foreground text-background"},bordered:{default:"bg-transparent border-default text-foreground",primary:"bg-transparent border-primary text-primary",secondary:"bg-transparent border-secondary text-secondary",success:"bg-transparent border-success text-success",warning:"bg-transparent border-warning text-warning",danger:"bg-transparent border-danger text-danger",foreground:"bg-transparent border-foreground text-foreground"},flat:{default:"bg-default/40 text-default-foreground",primary:"bg-primary/20 text-primary",secondary:"bg-secondary/20 text-secondary",success:"bg-success/20 text-success-600 dark:text-success",warning:"bg-warning/20 text-warning-600 dark:text-warning",danger:"bg-danger/20 text-danger dark:text-danger-500",foreground:"bg-foreground/10 text-foreground"},faded:{default:"border-default bg-default-100 text-default-foreground",primary:"border-default bg-default-100 text-primary",secondary:"border-default bg-default-100 text-secondary",success:"border-default bg-default-100 text-success",warning:"border-default bg-default-100 text-warning",danger:"border-default bg-default-100 text-danger",foreground:"border-default bg-default-100 text-foreground"},light:{default:"bg-transparent text-default-foreground",primary:"bg-transparent text-primary",secondary:"bg-transparent text-secondary",success:"bg-transparent text-success",warning:"bg-transparent text-warning",danger:"bg-transparent text-danger",foreground:"bg-transparent text-foreground"},ghost:{default:"border-default text-default-foreground hover:!bg-default",primary:"border-primary text-primary hover:!text-primary-foreground hover:!bg-primary",secondary:"border-secondary text-secondary hover:text-secondary-foreground hover:!bg-secondary",success:"border-success text-success hover:!text-success-foreground hover:!bg-success",warning:"border-warning text-warning hover:!text-warning-foreground hover:!bg-warning",danger:"border-danger text-danger hover:!text-danger-foreground hover:!bg-danger",foreground:"border-foreground text-foreground hover:!bg-foreground"}}},25083:function(e,t,r){"use strict";r.d(t,{D9:function(){return s},Dk:function(){return a},GI:function(){return o}});var n=r(49453),i=r(65512),o=(0,n.tv)({slots:{base:"w-full relative flex flex-col gap-1 p-1",list:"w-full flex flex-col gap-0.5 outline-none",emptyContent:["h-10","px-2","py-1.5","w-full","h-full","text-foreground-400","text-start"]}}),s=(0,n.tv)({slots:{base:["flex","group","gap-2","items-center","justify-between","relative","px-2","py-1.5","w-full","h-full","box-border","rounded-small","subpixel-antialiased","outline-none","cursor-pointer","tap-highlight-transparent",...i.Dh,"data-[focus-visible=true]:dark:ring-offset-background-content1"],wrapper:"w-full flex flex-col items-start justify-center",title:"flex-1 text-small font-normal truncate",description:["w-full","text-tiny","text-foreground-500","group-hover:text-current"],selectedIcon:["text-inherit","w-3","h-3","flex-shrink-0"],shortcut:["px-1","py-0.5","rounded","font-sans","text-foreground-500","text-tiny","border-small","border-default-300","group-hover:border-current"]},variants:{variant:{solid:{base:""},bordered:{base:"border-medium border-transparent bg-transparent"},light:{base:"bg-transparent"},faded:{base:["border-small border-transparent hover:border-default data-[hover=true]:bg-default-100","data-[selectable=true]:focus:border-default data-[selectable=true]:focus:bg-default-100"]},flat:{base:""},shadow:{base:"data-[hover=true]:shadow-lg"}},color:{default:{},primary:{},secondary:{},success:{},warning:{},danger:{}},showDivider:{true:{base:["mb-1.5","after:content-['']","after:absolute","after:-bottom-1","after:left-0","after:right-0","after:h-divider","after:bg-divider"]},false:{}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"}},disableAnimation:{true:{},false:{base:"data-[hover=true]:transition-colors"}}},defaultVariants:{variant:"solid",color:"default",showDivider:!1},compoundVariants:[{variant:"solid",color:"default",class:{base:["data-[hover=true]:bg-default","data-[hover=true]:text-default-foreground","data-[selectable=true]:focus:bg-default","data-[selectable=true]:focus:text-default-foreground"]}},{variant:"solid",color:"primary",class:{base:["data-[hover=true]:bg-primary data-[hover=true]:text-primary-foreground","data-[selectable=true]:focus:bg-primary data-[selectable=true]:focus:text-primary-foreground"]}},{variant:"solid",color:"secondary",class:{base:["data-[hover=true]:bg-secondary data-[hover=true]:text-secondary-foreground","data-[selectable=true]:focus:bg-secondary data-[selectable=true]:focus:text-secondary-foreground"]}},{variant:"solid",color:"success",class:{base:["data-[hover=true]:bg-success data-[hover=true]:text-success-foreground","data-[selectable=true]:focus:bg-success data-[selectable=true]:focus:text-success-foreground"]}},{variant:"solid",color:"warning",class:{base:["data-[hover=true]:bg-warning data-[hover=true]:text-warning-foreground","data-[selectable=true]:focus:bg-warning data-[selectable=true]:focus:text-warning-foreground"]}},{variant:"solid",color:"danger",class:{base:["data-[hover=true]:bg-danger data-[hover=true]:text-danger-foreground","data-[selectable=true]:focus:bg-danger data-[selectable=true]:focus:text-danger-foreground"]}},{variant:"shadow",color:"default",class:{base:["data-[hover=true]:shadow-default/50 data-[hover=true]:bg-default data-[hover=true]:text-default-foreground","data-[selectable=true]:focus:shadow-default/50 data-[selectable=true]:focus:bg-default data-[selectable=true]:focus:text-default-foreground"]}},{variant:"shadow",color:"primary",class:{base:["data-[hover=true]:shadow-primary/30 data-[hover=true]:bg-primary data-[hover=true]:text-primary-foreground","data-[selectable=true]:focus:shadow-primary/30 data-[selectable=true]:focus:bg-primary data-[selectable=true]:focus:text-primary-foreground"]}},{variant:"shadow",color:"secondary",class:{base:["data-[hover=true]:shadow-secondary/30 data-[hover=true]:bg-secondary data-[hover=true]:text-secondary-foreground","data-[selectable=true]:focus:shadow-secondary/30 data-[selectable=true]:focus:bg-secondary data-[selectable=true]:focus:text-secondary-foreground"]}},{variant:"shadow",color:"success",class:{base:["data-[hover=true]:shadow-success/30 data-[hover=true]:bg-success data-[hover=true]:text-success-foreground","data-[selectable=true]:focus:shadow-success/30 data-[selectable=true]:focus:bg-success data-[selectable=true]:focus:text-success-foreground"]}},{variant:"shadow",color:"warning",class:{base:["data-[hover=true]:shadow-warning/30 data-[hover=true]:bg-warning data-[hover=true]:text-warning-foreground","data-[selectable=true]:focus:shadow-warning/30 data-[selectable=true]:focus:bg-warning data-[selectable=true]:focus:text-warning-foreground"]}},{variant:"shadow",color:"danger",class:{base:["data-[hover=true]:shadow-danger/30 data-[hover=true]:bg-danger data-[hover=true]:text-danger-foreground","data-[selectable=true]:focus:shadow-danger/30 data-[selectable=true]:focus:bg-danger data-[selectable=true]:focus:text-danger-foreground"]}},{variant:"bordered",color:"default",class:{base:["data-[hover=true]:border-default","data-[selectable=true]:focus:border-default"]}},{variant:"bordered",color:"primary",class:{base:["data-[hover=true]:border-primary data-[hover=true]:text-primary","data-[selectable=true]:focus:border-primary data-[selectable=true]:focus:text-primary"]}},{variant:"bordered",color:"secondary",class:{base:["data-[hover=true]:border-secondary data-[hover=true]:text-secondary","data-[selectable=true]:focus:border-secondary data-[selectable=true]:focus:text-secondary"]}},{variant:"bordered",color:"success",class:{base:["data-[hover=true]:border-success data-[hover=true]:text-success","data-[selectable=true]:focus:border-success data-[selectable=true]:focus:text-success"]}},{variant:"bordered",color:"warning",class:{base:["data-[hover=true]:border-warning data-[hover=true]:text-warning","data-[selectable=true]:focus:border-warning data-[selectable=true]:focus:text-warning"]}},{variant:"bordered",color:"danger",class:{base:["data-[hover=true]:border-danger data-[hover=true]:text-danger","data-[selectable=true]:focus:border-danger data-[selectable=true]:focus:text-danger"]}},{variant:"flat",color:"default",class:{base:["data-[hover=true]:bg-default/40","data-[hover=true]:text-default-foreground","data-[selectable=true]:focus:bg-default/40","data-[selectable=true]:focus:text-default-foreground"]}},{variant:"flat",color:"primary",class:{base:["data-[hover=true]:bg-primary/20 data-[hover=true]:text-primary","data-[selectable=true]:focus:bg-primary/20 data-[selectable=true]:focus:text-primary"]}},{variant:"flat",color:"secondary",class:{base:["data-[hover=true]:bg-secondary/20 data-[hover=true]:text-secondary","data-[selectable=true]:focus:bg-secondary/20 data-[selectable=true]:focus:text-secondary"]}},{variant:"flat",color:"success",class:{base:["data-[hover=true]:bg-success/20 data-[hover=true]:text-success","data-[selectable=true]:focus:bg-success/20 data-[selectable=true]:focus:text-success"]}},{variant:"flat",color:"warning",class:{base:["data-[hover=true]:bg-warning/20 data-[hover=true]:text-warning","data-[selectable=true]:focus:bg-warning/20 data-[selectable=true]:focus:text-warning"]}},{variant:"flat",color:"danger",class:{base:["data-[hover=true]:bg-danger/20 data-[hover=true]:text-danger","data-[selectable=true]:focus:bg-danger/20 data-[selectable=true]:focus:text-danger"]}},{variant:"faded",color:"default",class:{base:["data-[hover=true]:text-default-foreground","data-[selectable=true]:focus:text-default-foreground"]}},{variant:"faded",color:"primary",class:{base:["data-[hover=true]:text-primary","data-[selectable=true]:focus:text-primary"]}},{variant:"faded",color:"secondary",class:{base:["data-[hover=true]:text-secondary","data-[selectable=true]:focus:text-secondary"]}},{variant:"faded",color:"success",class:{base:["data-[hover=true]:text-success","data-[selectable=true]:focus:text-success"]}},{variant:"faded",color:"warning",class:{base:["data-[hover=true]:text-warning","data-[selectable=true]:focus:text-warning"]}},{variant:"faded",color:"danger",class:{base:["data-[hover=true]:text-danger","data-[selectable=true]:focus:text-danger"]}},{variant:"light",color:"default",class:{base:["data-[hover=true]:text-default-500","data-[selectable=true]:focus:text-default-500"]}},{variant:"light",color:"primary",class:{base:["data-[hover=true]:text-primary","data-[selectable=true]:focus:text-primary"]}},{variant:"light",color:"secondary",class:{base:["data-[hover=true]:text-secondary","data-[selectable=true]:focus:text-secondary"]}},{variant:"light",color:"success",class:{base:["data-[hover=true]:text-success","data-[selectable=true]:focus:text-success"]}},{variant:"light",color:"warning",class:{base:["data-[hover=true]:text-warning","data-[selectable=true]:focus:text-warning"]}},{variant:"light",color:"danger",class:{base:["data-[hover=true]:text-danger","data-[selectable=true]:focus:text-danger"]}}]}),a=(0,n.tv)({slots:{base:"relative mb-2",heading:"pl-1 text-tiny text-foreground-500",group:"data-[has-title=true]:pt-1",divider:"mt-2"}})},76978:function(e,t,r){"use strict";r.d(t,{B:function(){return i}});var n=["small","medium","large"],i={theme:{opacity:["disabled"],spacing:["divider"],borderWidth:n,borderRadius:n},classGroups:{shadow:[{shadow:n}],"font-size":[{text:["tiny",...n]}],"bg-image":["bg-stripe-gradient"]}}},33805:function(e,t,r){"use strict";r.d(t,{v:function(){return s}});var n=r(43649),i=r(49453),o=r(65512),s=(0,i.tv)({slots:{base:["z-0","relative","bg-transparent","before:content-['']","before:hidden","before:z-[-1]","before:absolute","before:rotate-45","before:w-2.5","before:h-2.5","before:rounded-sm","data-[arrow=true]:before:block","data-[placement=top]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top]:before:left-1/2","data-[placement=top]:before:-translate-x-1/2","data-[placement=top-start]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top-start]:before:left-3","data-[placement=top-end]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top-end]:before:right-3","data-[placement=bottom]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom]:before:left-1/2","data-[placement=bottom]:before:-translate-x-1/2","data-[placement=bottom-start]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom-start]:before:left-3","data-[placement=bottom-end]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom-end]:before:right-3","data-[placement=left]:before:-right-[calc(theme(spacing.5)/4_-_2px)]","data-[placement=left]:before:top-1/2","data-[placement=left]:before:-translate-y-1/2","data-[placement=left-start]:before:-right-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=left-start]:before:top-1/4","data-[placement=left-end]:before:-right-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=left-end]:before:bottom-1/4","data-[placement=right]:before:-left-[calc(theme(spacing.5)/4_-_2px)]","data-[placement=right]:before:top-1/2","data-[placement=right]:before:-translate-y-1/2","data-[placement=right-start]:before:-left-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=right-start]:before:top-1/4","data-[placement=right-end]:before:-left-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=right-end]:before:bottom-1/4",...o.Dh],content:["z-10","px-2.5","py-1","w-full","inline-flex","flex-col","items-center","justify-center","box-border","subpixel-antialiased","outline-none","box-border"],trigger:["z-10"],backdrop:["hidden"],arrow:[]},variants:{size:{sm:{content:"text-tiny"},md:{content:"text-small"},lg:{content:"text-medium"}},color:{default:{base:"before:bg-content1 before:shadow-small",content:"bg-content1"},foreground:{base:"before:bg-foreground",content:n.J.solid.foreground},primary:{base:"before:bg-primary",content:n.J.solid.primary},secondary:{base:"before:bg-secondary",content:n.J.solid.secondary},success:{base:"before:bg-success",content:n.J.solid.success},warning:{base:"before:bg-warning",content:n.J.solid.warning},danger:{base:"before:bg-danger",content:n.J.solid.danger}},radius:{none:{content:"rounded-none"},sm:{content:"rounded-small"},md:{content:"rounded-medium"},lg:{content:"rounded-large"},full:{content:"rounded-full"}},shadow:{sm:{content:"shadow-small"},md:{content:"shadow-medium"},lg:{content:"shadow-large"}},backdrop:{transparent:{},opaque:{backdrop:"bg-overlay/50 backdrop-opacity-disabled"},blur:{backdrop:"backdrop-blur-sm backdrop-saturate-150 bg-overlay/30"}},triggerScaleOnOpen:{true:{trigger:["aria-expanded:scale-[0.97]","aria-expanded:opacity-70","subpixel-antialiased"]},false:{}},disableAnimation:{true:{base:"animate-none"}},isTriggerDisabled:{true:{trigger:"opacity-disabled pointer-events-none"},false:{}}},defaultVariants:{color:"default",radius:"lg",size:"md",shadow:"md",backdrop:"transparent",triggerScaleOnOpen:!0},compoundVariants:[{backdrop:["opaque","blur"],class:{backdrop:"block w-full h-full fixed inset-0 -z-30"}}]})},49453:function(e,t,r){"use strict";r.d(t,{tv:function(){return o}});var n=r(76978),i=r(83815),o=(e,t)=>{var r,o,s;return(0,i.tv)(e,{...t,twMerge:null==(r=null==t?void 0:t.twMerge)||r,twMergeConfig:{...null==t?void 0:t.twMergeConfig,theme:{...null==(o=null==t?void 0:t.twMergeConfig)?void 0:o.theme,...n.B.theme},classGroups:{...null==(s=null==t?void 0:t.twMergeConfig)?void 0:s.classGroups,...n.B.classGroups}}})}},35653:function(e,t,r){"use strict";r.d(t,{D:function(){return a},L:function(){return s}});var n=r(43649),i=r(49453),o=r(65512),s=(0,i.tv)({base:["z-0","group","relative","inline-flex","items-center","justify-center","box-border","appearance-none","outline-none","select-none","whitespace-nowrap","min-w-max","font-normal","subpixel-antialiased","overflow-hidden","tap-highlight-transparent","data-[pressed=true]:scale-[0.97]",...o.Dh],variants:{variant:{solid:"",bordered:"border-medium bg-transparent",light:"bg-transparent",flat:"",faded:"border-medium",shadow:"",ghost:"border-medium bg-transparent"},size:{sm:"px-3 min-w-16 h-8 text-tiny gap-2 rounded-small",md:"px-4 min-w-20 h-10 text-small gap-2 rounded-medium",lg:"px-6 min-w-24 h-12 text-medium gap-3 rounded-large"},color:{default:"",primary:"",secondary:"",success:"",warning:"",danger:""},radius:{none:"rounded-none",sm:"rounded-small",md:"rounded-medium",lg:"rounded-large",full:"rounded-full"},fullWidth:{true:"w-full"},isDisabled:{true:"opacity-disabled pointer-events-none"},isInGroup:{true:"[&:not(:first-child):not(:last-child)]:rounded-none"},isIconOnly:{true:"px-0 !gap-0",false:"[&>svg]:max-w-[theme(spacing.8)]"},disableAnimation:{true:"!transition-none",false:"transition-transform-colors-opacity motion-reduce:transition-none"}},defaultVariants:{size:"md",variant:"solid",color:"default",fullWidth:!1,isDisabled:!1,isInGroup:!1},compoundVariants:[{variant:"solid",color:"default",class:n.J.solid.default},{variant:"solid",color:"primary",class:n.J.solid.primary},{variant:"solid",color:"secondary",class:n.J.solid.secondary},{variant:"solid",color:"success",class:n.J.solid.success},{variant:"solid",color:"warning",class:n.J.solid.warning},{variant:"solid",color:"danger",class:n.J.solid.danger},{variant:"shadow",color:"default",class:n.J.shadow.default},{variant:"shadow",color:"primary",class:n.J.shadow.primary},{variant:"shadow",color:"secondary",class:n.J.shadow.secondary},{variant:"shadow",color:"success",class:n.J.shadow.success},{variant:"shadow",color:"warning",class:n.J.shadow.warning},{variant:"shadow",color:"danger",class:n.J.shadow.danger},{variant:"bordered",color:"default",class:n.J.bordered.default},{variant:"bordered",color:"primary",class:n.J.bordered.primary},{variant:"bordered",color:"secondary",class:n.J.bordered.secondary},{variant:"bordered",color:"success",class:n.J.bordered.success},{variant:"bordered",color:"warning",class:n.J.bordered.warning},{variant:"bordered",color:"danger",class:n.J.bordered.danger},{variant:"flat",color:"default",class:n.J.flat.default},{variant:"flat",color:"primary",class:n.J.flat.primary},{variant:"flat",color:"secondary",class:n.J.flat.secondary},{variant:"flat",color:"success",class:n.J.flat.success},{variant:"flat",color:"warning",class:n.J.flat.warning},{variant:"flat",color:"danger",class:n.J.flat.danger},{variant:"faded",color:"default",class:n.J.faded.default},{variant:"faded",color:"primary",class:n.J.faded.primary},{variant:"faded",color:"secondary",class:n.J.faded.secondary},{variant:"faded",color:"success",class:n.J.faded.success},{variant:"faded",color:"warning",class:n.J.faded.warning},{variant:"faded",color:"danger",class:n.J.faded.danger},{variant:"light",color:"default",class:[n.J.light.default,"data-[hover=true]:bg-default/40"]},{variant:"light",color:"primary",class:[n.J.light.primary,"data-[hover=true]:bg-primary/20"]},{variant:"light",color:"secondary",class:[n.J.light.secondary,"data-[hover=true]:bg-secondary/20"]},{variant:"light",color:"success",class:[n.J.light.success,"data-[hover=true]:bg-success/20"]},{variant:"light",color:"warning",class:[n.J.light.warning,"data-[hover=true]:bg-warning/20"]},{variant:"light",color:"danger",class:[n.J.light.danger,"data-[hover=true]:bg-danger/20"]},{variant:"ghost",color:"default",class:n.J.ghost.default},{variant:"ghost",color:"primary",class:n.J.ghost.primary},{variant:"ghost",color:"secondary",class:n.J.ghost.secondary},{variant:"ghost",color:"success",class:n.J.ghost.success},{variant:"ghost",color:"warning",class:n.J.ghost.warning},{variant:"ghost",color:"danger",class:n.J.ghost.danger},{isInGroup:!0,class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,size:"sm",class:"rounded-none first:rounded-s-small last:rounded-e-small"},{isInGroup:!0,size:"md",class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,size:"lg",class:"rounded-none first:rounded-s-large last:rounded-e-large"},{isInGroup:!0,isRounded:!0,class:"rounded-none first:rounded-s-full last:rounded-e-full"},{isInGroup:!0,radius:"none",class:"rounded-none first:rounded-s-none last:rounded-e-none"},{isInGroup:!0,radius:"sm",class:"rounded-none first:rounded-s-small last:rounded-e-small"},{isInGroup:!0,radius:"md",class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,radius:"lg",class:"rounded-none first:rounded-s-large last:rounded-e-large"},{isInGroup:!0,radius:"full",class:"rounded-none first:rounded-s-full last:rounded-e-full"},{isInGroup:!0,variant:["ghost","bordered"],color:"default",className:o.Zs.default},{isInGroup:!0,variant:["ghost","bordered"],color:"primary",className:o.Zs.primary},{isInGroup:!0,variant:["ghost","bordered"],color:"secondary",className:o.Zs.secondary},{isInGroup:!0,variant:["ghost","bordered"],color:"success",className:o.Zs.success},{isInGroup:!0,variant:["ghost","bordered"],color:"warning",className:o.Zs.warning},{isInGroup:!0,variant:["ghost","bordered"],color:"danger",className:o.Zs.danger},{isIconOnly:!0,size:"sm",class:"min-w-8 w-8 h-8"},{isIconOnly:!0,size:"md",class:"min-w-10 w-10 h-10"},{isIconOnly:!0,size:"lg",class:"min-w-12 w-12 h-12"},{variant:["solid","faded","flat","bordered","shadow"],class:"data-[hover=true]:opacity-hover"}]}),a=(0,i.tv)({base:"inline-flex items-center justify-center h-auto",variants:{fullWidth:{true:"w-full"}},defaultVariants:{fullWidth:!1}})},65512:function(e,t,r){"use strict";r.d(t,{Dh:function(){return n},ID:function(){return i},Zs:function(){return a},jR:function(){return o},z6:function(){return s}});var n=["outline-none","data-[focus-visible=true]:z-10","data-[focus-visible=true]:outline-2","data-[focus-visible=true]:outline-focus","data-[focus-visible=true]:outline-offset-2"],i=["outline-none","group-data-[focus-visible=true]:z-10","group-data-[focus-visible=true]:ring-2","group-data-[focus-visible=true]:ring-focus","group-data-[focus-visible=true]:ring-offset-2","group-data-[focus-visible=true]:ring-offset-background"],o=["outline-none","ring-2","ring-focus","ring-offset-2","ring-offset-background"],s=["absolute","top-1/2","left-1/2","-translate-x-1/2","-translate-y-1/2"],a={default:["[&+.border-medium.border-default]:ms-[calc(theme(borderWidth.medium)*-1)]"],primary:["[&+.border-medium.border-primary]:ms-[calc(theme(borderWidth.medium)*-1)]"],secondary:["[&+.border-medium.border-secondary]:ms-[calc(theme(borderWidth.medium)*-1)]"],success:["[&+.border-medium.border-success]:ms-[calc(theme(borderWidth.medium)*-1)]"],warning:["[&+.border-medium.border-warning]:ms-[calc(theme(borderWidth.medium)*-1)]"],danger:["[&+.border-medium.border-danger]:ms-[calc(theme(borderWidth.medium)*-1)]"]}},7436:function(e,t,r){"use strict";r.d(t,{j:function(){return J}});var n=r(28349),i=r(3136),o=r(28628),s=r(68806),a=r(78837),l=r(85007),u=r(72970),c=r(36116),d=r(61718),h=r(11086),f=r(32433),p=r(26301),g=r(77604),m=r(67294),y=r(13094),v=r(7321),b=r(29677);let w="default",x="",E=new WeakMap;function k(e){if((0,s.gn)()){if("default"===w){let t=(0,a.r)(e);x=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}w="disabled"}else(e instanceof HTMLElement||e instanceof SVGElement)&&(E.set(e,e.style.userSelect),e.style.userSelect="none")}function S(e){if((0,s.gn)())"disabled"===w&&(w="restoring",setTimeout(()=>{(0,l.Q)(()=>{if("restoring"===w){let t=(0,a.r)(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=x||""),x="",w="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&E.has(e)){let t=E.get(e);"none"===e.style.userSelect&&(e.style.userSelect=t),""===e.getAttribute("style")&&e.removeAttribute("style"),E.delete(e)}}let T=m.createContext({register:()=>{}});T.displayName="PressResponderContext";var M=new WeakMap;class A{continuePropagation(){(0,b._)(this,M,!1)}get shouldStopPropagation(){return(0,y._)(this,M)}constructor(e,t,r){(0,v._)(this,M,{writable:!0,value:void 0}),(0,b._)(this,M,!0),this.type=e,this.pointerType=t,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey}}let P=Symbol("linkClicked");function C(e){return"A"===e.tagName&&e.hasAttribute("href")}function _(e,t){let{key:r,code:n}=e,i=t.getAttribute("role");return("Enter"===r||" "===r||"Spacebar"===r||"Space"===n)&&!(t instanceof(0,a.k)(t).HTMLInputElement&&!N(t,r)||t instanceof(0,a.k)(t).HTMLTextAreaElement||t.isContentEditable)&&!(("link"===i||!i&&C(t))&&"Enter"!==r)}function I(e,t){let r=e.changedTouches;for(let e=0;e<r.length;e++){let n=r[e];if(n.identifier===t)return n}return null}function O(e,t){return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey}}function L(e,t){let r,n,i=t.getBoundingClientRect(),o=(r=0,n=0,void 0!==e.width?r=e.width/2:void 0!==e.radiusX&&(r=e.radiusX),void 0!==e.height?n=e.height/2:void 0!==e.radiusY&&(n=e.radiusY),{top:e.clientY-n,right:e.clientX+r,bottom:e.clientY+n,left:e.clientX-r});return!(i.left>o.right)&&!(o.left>i.right)&&!(i.top>o.bottom)&&!(o.top>i.bottom)}function R(e){return!(e instanceof HTMLElement)||!e.hasAttribute("draggable")}function j(e,t){return e instanceof HTMLInputElement?!N(e,t):e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!C(e)}let B=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function N(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:B.has(e.type)}let D=new Set,K=new Map,U=!1,z=!1;function F(e,t){for(let r of D)r(e,t)}function W(e){U=!0,e.metaKey||!(0,s.V5)()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||F("keyboard",e)}function V(e){("mousedown"===e.type||"pointerdown"===e.type)&&(U=!0,F("pointer",e))}function $(e){(0,p.Z)(e)&&(U=!0)}function H(e){e.target!==window&&e.target!==document&&(U||z||F("virtual",e),U=!1,z=!1)}function q(){U=!1,z=!0}function Z(e){if("undefined"==typeof window||K.get((0,a.k)(e)))return;let t=(0,a.k)(e),r=(0,a.r)(e),n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){U=!0,n.apply(this,arguments)},r.addEventListener("keydown",W,!0),r.addEventListener("keyup",W,!0),r.addEventListener("click",$,!0),t.addEventListener("focus",H,!0),t.addEventListener("blur",q,!1),"undefined"!=typeof PointerEvent?(r.addEventListener("pointerdown",V,!0),r.addEventListener("pointermove",V,!0),r.addEventListener("pointerup",V,!0)):(r.addEventListener("mousedown",V,!0),r.addEventListener("mousemove",V,!0),r.addEventListener("mouseup",V,!0)),t.addEventListener("beforeunload",()=>{G(e)},{once:!0}),K.set(t,{focus:n})}let G=(e,t)=>{let r=(0,a.k)(e),n=(0,a.r)(e);t&&n.removeEventListener("DOMContentLoaded",t),K.has(r)&&(r.HTMLElement.prototype.focus=K.get(r).focus,n.removeEventListener("keydown",W,!0),n.removeEventListener("keyup",W,!0),n.removeEventListener("click",$,!0),r.removeEventListener("focus",H,!0),r.removeEventListener("blur",q,!1),"undefined"!=typeof PointerEvent?(n.removeEventListener("pointerdown",V,!0),n.removeEventListener("pointermove",V,!0),n.removeEventListener("pointerup",V,!0)):(n.removeEventListener("mousedown",V,!0),n.removeEventListener("mousemove",V,!0),n.removeEventListener("mouseup",V,!0)),K.delete(r))};function J(e,t){let r,{elementType:l="button",isDisabled:y,onPress:v,onPressStart:b,onPressEnd:w,onPressChange:x,preventFocusOnPress:E,allowFocusWhenDisabled:M,onClick:B,href:N,target:D,rel:K,type:U="button",allowTextSelectionOnPress:z}=e;r="button"===l?{type:U,disabled:y}:{role:"button",tabIndex:y?void 0:0,href:"a"===l&&y?void 0:N,target:"a"===l?D:void 0,type:"input"===l?U:void 0,disabled:"input"===l?y:void 0,"aria-disabled":y&&"input"!==l?y:void 0,rel:"a"===l?K:void 0};let{pressProps:F,isPressed:W}=function(e){let{onPress:t,onPressChange:r,onPressStart:i,onPressEnd:o,onPressUp:l,isDisabled:y,isPressed:v,preventFocusOnPress:b,shouldCancelOnPointerExit:w,allowTextSelectionOnPress:x,ref:E,...M}=function(e){let t=(0,m.useContext)(T);if(t){let{register:r,...i}=t;e=(0,n.d)(i,e),r()}return(0,u.l)(t,e.ref),e}(e),[B,N]=(0,m.useState)(!1),D=(0,m.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:K,removeAllGlobalListeners:U}=(0,c.x)(),z=(0,d.i)((e,t)=>{let n=D.current;if(y||n.didFirePressStart)return!1;let o=!0;if(n.isTriggeringEvent=!0,i){let r=new A("pressstart",t,e);i(r),o=r.shouldStopPropagation}return r&&r(!0),n.isTriggeringEvent=!1,n.didFirePressStart=!0,N(!0),o}),F=(0,d.i)((e,n,i=!0)=>{let s=D.current;if(!s.didFirePressStart)return!1;s.ignoreClickAfterPress=!0,s.didFirePressStart=!1,s.isTriggeringEvent=!0;let a=!0;if(o){let t=new A("pressend",n,e);o(t),a=t.shouldStopPropagation}if(r&&r(!1),N(!1),t&&i&&!y){let r=new A("press",n,e);t(r),a&&(a=r.shouldStopPropagation)}return s.isTriggeringEvent=!1,a}),W=(0,d.i)((e,t)=>{let r=D.current;if(y)return!1;if(l){r.isTriggeringEvent=!0;let n=new A("pressup",t,e);return l(n),r.isTriggeringEvent=!1,n.shouldStopPropagation}return!0}),V=(0,d.i)(e=>{let t=D.current;t.isPressed&&t.target&&(t.isOverTarget&&null!=t.pointerType&&F(O(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,U(),x||S(t.target))}),$=(0,d.i)(e=>{w&&V(e)}),H=(0,m.useMemo)(()=>{let e=D.current,t={onKeyDown(t){if(_(t.nativeEvent,t.currentTarget)&&t.currentTarget.contains(t.target)){var n;j(t.target,t.key)&&t.preventDefault();let i=!0;if(!e.isPressed&&!t.repeat){e.target=t.currentTarget,e.isPressed=!0,i=z(t,"keyboard");let n=t.currentTarget;K((0,a.r)(t.currentTarget),"keyup",(0,h.t)(t=>{_(t,n)&&!t.repeat&&n.contains(t.target)&&e.target&&W(O(e.target,t),"keyboard")},r),!0)}i&&t.stopPropagation(),t.metaKey&&(0,s.V5)()&&(null===(n=e.metaKeyEvents)||void 0===n||n.set(t.key,t.nativeEvent))}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||t.currentTarget.contains(t.target))&&t&&0===t.button&&!e.isTriggeringEvent&&!f.nG.isOpening){let r=!0;if(y&&t.preventDefault(),!e.ignoreClickAfterPress&&!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||(0,p.Z)(t.nativeEvent))){y||b||(0,g.A)(t.currentTarget);let e=z(t,"virtual"),n=W(t,"virtual"),i=F(t,"virtual");r=e&&n&&i}e.ignoreEmulatedMouseEvents=!1,e.ignoreClickAfterPress=!1,r&&t.stopPropagation()}}},r=t=>{var r,n,i;if(e.isPressed&&e.target&&_(t,e.target)){j(t.target,t.key)&&t.preventDefault();let r=t.target;F(O(e.target,t),"keyboard",e.target.contains(r)),U(),"Enter"!==t.key&&C(e.target)&&e.target.contains(r)&&!t[P]&&(t[P]=!0,(0,f.nG)(e.target,t,!1)),e.isPressed=!1,null===(n=e.metaKeyEvents)||void 0===n||n.delete(t.key)}else if("Meta"===t.key&&(null===(r=e.metaKeyEvents)||void 0===r?void 0:r.size)){let t=e.metaKeyEvents;for(let r of(e.metaKeyEvents=void 0,t.values()))null===(i=e.target)||void 0===i||i.dispatchEvent(new KeyboardEvent("keyup",r))}};if("undefined"!=typeof PointerEvent){t.onPointerDown=t=>{if(0!==t.button||!t.currentTarget.contains(t.target))return;if((0,p.c)(t.nativeEvent)){e.pointerType="virtual";return}R(t.currentTarget)&&t.preventDefault(),e.pointerType=t.pointerType;let o=!0;e.isPressed||(e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,y||b||(0,g.A)(t.currentTarget),x||k(e.target),o=z(t,e.pointerType),K((0,a.r)(t.currentTarget),"pointermove",r,!1),K((0,a.r)(t.currentTarget),"pointerup",n,!1),K((0,a.r)(t.currentTarget),"pointercancel",i,!1)),o&&t.stopPropagation()},t.onMouseDown=e=>{e.currentTarget.contains(e.target)&&0===e.button&&(R(e.currentTarget)&&e.preventDefault(),e.stopPropagation())},t.onPointerUp=t=>{t.currentTarget.contains(t.target)&&"virtual"!==e.pointerType&&0===t.button&&L(t,t.currentTarget)&&W(t,e.pointerType||t.pointerType)};let r=t=>{t.pointerId===e.activePointerId&&(e.target&&L(t,e.target)?e.isOverTarget||null==e.pointerType||(e.isOverTarget=!0,z(O(e.target,t),e.pointerType)):e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,F(O(e.target,t),e.pointerType,!1),$(t)))},n=t=>{t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target&&(L(t,e.target)&&null!=e.pointerType?F(O(e.target,t),e.pointerType):e.isOverTarget&&null!=e.pointerType&&F(O(e.target,t),e.pointerType,!1),e.isPressed=!1,e.isOverTarget=!1,e.activePointerId=null,e.pointerType=null,U(),x||S(e.target))},i=e=>{V(e)};t.onDragStart=e=>{e.currentTarget.contains(e.target)&&V(e)}}else{t.onMouseDown=t=>{if(0===t.button&&t.currentTarget.contains(t.target)){if(R(t.currentTarget)&&t.preventDefault(),e.ignoreEmulatedMouseEvents){t.stopPropagation();return}e.isPressed=!0,e.isOverTarget=!0,e.target=t.currentTarget,e.pointerType=(0,p.Z)(t.nativeEvent)?"virtual":"mouse",y||b||(0,g.A)(t.currentTarget),z(t,e.pointerType)&&t.stopPropagation(),K((0,a.r)(t.currentTarget),"mouseup",r,!1)}},t.onMouseEnter=t=>{if(!t.currentTarget.contains(t.target))return;let r=!0;e.isPressed&&!e.ignoreEmulatedMouseEvents&&null!=e.pointerType&&(e.isOverTarget=!0,r=z(t,e.pointerType)),r&&t.stopPropagation()},t.onMouseLeave=t=>{if(!t.currentTarget.contains(t.target))return;let r=!0;e.isPressed&&!e.ignoreEmulatedMouseEvents&&null!=e.pointerType&&(e.isOverTarget=!1,r=F(t,e.pointerType,!1),$(t)),r&&t.stopPropagation()},t.onMouseUp=t=>{t.currentTarget.contains(t.target)&&!e.ignoreEmulatedMouseEvents&&0===t.button&&W(t,e.pointerType||"mouse")};let r=t=>{if(0===t.button){if(e.isPressed=!1,U(),e.ignoreEmulatedMouseEvents){e.ignoreEmulatedMouseEvents=!1;return}e.target&&L(t,e.target)&&null!=e.pointerType?F(O(e.target,t),e.pointerType):e.target&&e.isOverTarget&&null!=e.pointerType&&F(O(e.target,t),e.pointerType,!1),e.isOverTarget=!1}};t.onTouchStart=t=>{if(!t.currentTarget.contains(t.target))return;let r=function(e){let{targetTouches:t}=e;return t.length>0?t[0]:null}(t.nativeEvent);r&&(e.activePointerId=r.identifier,e.ignoreEmulatedMouseEvents=!0,e.isOverTarget=!0,e.isPressed=!0,e.target=t.currentTarget,e.pointerType="touch",y||b||(0,g.A)(t.currentTarget),x||k(e.target),z(t,e.pointerType)&&t.stopPropagation(),K((0,a.k)(t.currentTarget),"scroll",n,!0))},t.onTouchMove=t=>{if(!t.currentTarget.contains(t.target))return;if(!e.isPressed){t.stopPropagation();return}let r=I(t.nativeEvent,e.activePointerId),n=!0;r&&L(r,t.currentTarget)?e.isOverTarget||null==e.pointerType||(e.isOverTarget=!0,n=z(t,e.pointerType)):e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,n=F(t,e.pointerType,!1),$(t)),n&&t.stopPropagation()},t.onTouchEnd=t=>{if(!t.currentTarget.contains(t.target))return;if(!e.isPressed){t.stopPropagation();return}let r=I(t.nativeEvent,e.activePointerId),n=!0;r&&L(r,t.currentTarget)&&null!=e.pointerType?(W(t,e.pointerType),n=F(t,e.pointerType)):e.isOverTarget&&null!=e.pointerType&&(n=F(t,e.pointerType,!1)),n&&t.stopPropagation(),e.isPressed=!1,e.activePointerId=null,e.isOverTarget=!1,e.ignoreEmulatedMouseEvents=!0,e.target&&!x&&S(e.target),U()},t.onTouchCancel=t=>{t.currentTarget.contains(t.target)&&(t.stopPropagation(),e.isPressed&&V(t))};let n=t=>{e.isPressed&&t.target.contains(e.target)&&V({currentTarget:e.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};t.onDragStart=e=>{e.currentTarget.contains(e.target)&&V(e)}}return t},[K,y,b,U,x,V,$,F,z,W]);return(0,m.useEffect)(()=>()=>{var e;x||S(null!==(e=D.current.target)&&void 0!==e?e:void 0)},[x]),{isPressed:v||B,pressProps:(0,n.d)(M,H)}}({onPressStart:b,onPressEnd:w,onPressChange:x,onPress:v,isDisabled:y,preventFocusOnPress:E,allowTextSelectionOnPress:z,ref:t}),{focusableProps:V}=(0,o.kc)(e,t);M&&(V.tabIndex=y?-1:V.tabIndex);let $=(0,n.d)(V,F,(0,i.z)(e,{labelable:!0}));return{isPressed:W,buttonProps:(0,n.d)(r,$,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],onClick:e=>{null==B||B(e)}})}}"undefined"!=typeof document&&function(e){let t;let r=(0,a.r)(void 0);"loading"!==r.readyState?Z(void 0):(t=()=>{Z(void 0)},r.addEventListener("DOMContentLoaded",t)),()=>G(e,t)}()},96344:function(e,t,r){"use strict";r.d(t,{d:function(){return i}});var n=r(16769);function i(){return!(0,n.Av)()&&"undefined"!=typeof window&&window.screen.width<=700}},93387:function(e,t,r){"use strict";r.d(t,{G:function(){return i}});var n=r(67294),i=(null==globalThis?void 0:globalThis.document)?n.useLayoutEffect:n.useEffect},50633:function(e,t,r){"use strict";r.d(t,{R:function(){return E}});var n=r(67294),i=r(16769);let o="undefined"!=typeof document?n.useLayoutEffect:()=>{};function s(e){let t=(0,n.useRef)(null);return o(()=>{t.current=e},[e]),(0,n.useCallback)((...e)=>{let r=t.current;return null==r?void 0:r(...e)},[])}let a=!!("undefined"!=typeof window&&window.document&&window.document.createElement),l=new Map,u=e=>{var t;return null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document},c=new Set(["id"]),d=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),h=new Set(["href","target","rel","download","ping","referrerPolicy"]),f=/^(data-.*)$/;function p(e){if(function(){if(null==g){g=!1;try{document.createElement("div").focus({get preventScroll(){return g=!0,!0}})}catch(e){}}return g}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==n;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}(e);e.focus(),function(e){for(let{element:t,scrollTop:r,scrollLeft:n}of e)t.scrollTop=r,t.scrollLeft=n}(t)}}let g=null,m=new Map,y=new Set;function v(){if("undefined"==typeof window)return;function e(e){return"propertyName"in e}let t=r=>{if(!e(r)||!r.target)return;let n=m.get(r.target);if(n&&(n.delete(r.propertyName),0===n.size&&(r.target.removeEventListener("transitioncancel",t),m.delete(r.target)),0===m.size)){for(let e of y)e();y.clear()}};document.body.addEventListener("transitionrun",r=>{if(!e(r)||!r.target)return;let n=m.get(r.target);n||(n=new Set,m.set(r.target,n),r.target.addEventListener("transitioncancel",t,{once:!0})),n.add(r.propertyName)}),document.body.addEventListener("transitionend",t)}"undefined"!=typeof document&&("loading"!==document.readyState?v():document.addEventListener("DOMContentLoaded",v)),"undefined"!=typeof document&&window.visualViewport;var b=r(9975);function w(e){let t=u(e);if("virtual"===(0,b.Jz)()){var r;let n=t.activeElement;r=()=>{t.activeElement===n&&e.isConnected&&p(e)},requestAnimationFrame(()=>{0===m.size?r():y.add(r)})}else p(e)}var x=r(31190);function E(e,t){let{role:r="dialog"}=e,u=function(e=[]){let t=function(e){let[t,r]=(0,n.useState)(void 0),s=(0,n.useRef)(null),u=(0,i.gP)(t),c=(0,n.useCallback)(e=>{s.current=e},[]);return a&&l.set(u,c),o(()=>()=>{l.delete(u)},[u]),(0,n.useEffect)(()=>{let e=s.current;e&&(s.current=null,r(e))}),u}(),[r,u]=function(e){let[t,r]=(0,n.useState)(e),i=(0,n.useRef)(null),a=s(()=>{if(!i.current)return;let e=i.current.next();if(e.done){i.current=null;return}t===e.value?a():r(e.value)});o(()=>{i.current&&a()});let l=s(e=>{i.current=e(t),a()});return[t,l]}(t),c=(0,n.useCallback)(()=>{u(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,u]);return o(c,[t,c,...e]),r}();u=e["aria-label"]?void 0:u;let p=(0,n.useRef)(!1);return(0,n.useEffect)(()=>{if(t.current&&!t.current.contains(document.activeElement)){w(t.current);let e=setTimeout(()=>{document.activeElement===t.current&&(p.current=!0,t.current&&(t.current.blur(),w(t.current)),p.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),(0,x.Bq)(),{dialogProps:{...function(e,t={}){let{labelable:r,isLink:n,propNames:i}=t,o={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(c.has(t)||r&&d.has(t)||n&&h.has(t)||(null==i?void 0:i.has(t))||f.test(t))&&(o[t]=e[t]);return o}(e,{labelable:!0}),role:r,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||u,onBlur:e=>{p.current&&e.stopPropagation()}},titleProps:{id:u}}}},28628:function(e,t,r){"use strict";r.d(t,{Fx:function(){return O},MT:function(){return y},ex:function(){return p},kc:function(){return R}});var n=r(78837),i=r(85007),o=r(77604),s=r(69786),a=r(72970),l=r(28349),u=r(67294),c=r(9975),d=r(47234),h=r(44971),f=r(91243);function p(e){let t=(0,n.r)(e);if("virtual"===(0,c.Jz)()){let r=t.activeElement;(0,i.Q)(()=>{t.activeElement===r&&e.isConnected&&(0,o.A)(e)})}else(0,o.A)(e)}let g=u.createContext(null),m=null;function y(e){let t,r,{children:i,contain:o,restoreFocus:a,autoFocus:l}=e,c=(0,u.useRef)(null),d=(0,u.useRef)(null),h=(0,u.useRef)([]),{parentNode:f}=(0,u.useContext)(g)||{},p=(0,u.useMemo)(()=>new _({scopeRef:h}),[h]);(0,s.b)(()=>{let e=f||I.root;if(I.getTreeNode(e.scopeRef)&&m&&!T(m,e.scopeRef)){let t=I.getTreeNode(m);t&&(e=t)}e.addChild(p),I.addNode(p)},[p,f]),(0,s.b)(()=>{let e=I.getTreeNode(h);e&&(e.contain=!!o)},[o]),(0,s.b)(()=>{var e;let t=null===(e=c.current)||void 0===e?void 0:e.nextSibling,r=[];for(;t&&t!==d.current;)r.push(t),t=t.nextSibling;h.current=r},[i]),(0,s.b)(()=>{if(a||o)return;let e=h.current,t=(0,n.r)(e?e[0]:void 0),r=e=>{let t=e.target;k(t,h.current)?m=h:S(t)||(m=null)};return t.addEventListener("focusin",r,!1),null==e||e.forEach(e=>e.addEventListener("focusin",r,!1)),()=>{t.removeEventListener("focusin",r,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",r,!1))}},[h,a,o]),t=(0,u.useRef)(),r=(0,u.useRef)(),(0,s.b)(()=>{let e=h.current;if(!o){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}let i=(0,n.r)(e?e[0]:void 0),s=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!E(h))return;let t=i.activeElement,r=h.current;if(!r||!k(t,r))return;let n=P(x(r),{tabbable:!0},r);if(!t)return;n.currentNode=t;let o=e.shiftKey?n.previousNode():n.nextNode();o||(n.currentNode=e.shiftKey?r[r.length-1].nextElementSibling:r[0].previousElementSibling,o=e.shiftKey?n.previousNode():n.nextNode()),e.preventDefault(),o&&M(o,!0)},a=e=>{(!m||T(m,h))&&k(e.target,h.current)?(m=h,t.current=e.target):E(h)&&!S(e.target,h)?t.current?t.current.focus():m&&m.current&&A(m.current):E(h)&&(t.current=e.target)},l=e=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{if(i.activeElement&&E(h)&&!S(i.activeElement,h)){if(m=h,i.body.contains(e.target)){var r;t.current=e.target,null===(r=t.current)||void 0===r||r.focus()}else m.current&&A(m.current)}})};return i.addEventListener("keydown",s,!1),i.addEventListener("focusin",a,!1),null==e||e.forEach(e=>e.addEventListener("focusin",a,!1)),null==e||e.forEach(e=>e.addEventListener("focusout",l,!1)),()=>{i.removeEventListener("keydown",s,!1),i.removeEventListener("focusin",a,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",a,!1)),null==e||e.forEach(e=>e.removeEventListener("focusout",l,!1))}},[h,o]),(0,s.b)(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r]),function(e,t,r){let i=(0,u.useRef)("undefined"!=typeof document?(0,n.r)(e.current?e.current[0]:void 0).activeElement:null);(0,s.b)(()=>{let i=e.current,o=(0,n.r)(i?i[0]:void 0);if(!t||r)return;let s=()=>{(!m||T(m,e))&&k(o.activeElement,e.current)&&(m=e)};return o.addEventListener("focusin",s,!1),null==i||i.forEach(e=>e.addEventListener("focusin",s,!1)),()=>{o.removeEventListener("focusin",s,!1),null==i||i.forEach(e=>e.removeEventListener("focusin",s,!1))}},[e,r]),(0,s.b)(()=>{let i=(0,n.r)(e.current?e.current[0]:void 0);if(!t)return;let o=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!E(e))return;let r=i.activeElement;if(!k(r,e.current))return;let n=I.getTreeNode(e);if(!n)return;let o=n.nodeToRestore,s=P(i.body,{tabbable:!0});s.currentNode=r;let a=t.shiftKey?s.previousNode():s.nextNode();if(o&&i.body.contains(o)&&o!==i.body||(o=void 0,n.nodeToRestore=void 0),(!a||!k(a,e.current))&&o){s.currentNode=o;do a=t.shiftKey?s.previousNode():s.nextNode();while(k(a,e.current));(t.preventDefault(),t.stopPropagation(),a)?M(a,!0):S(o)?M(o,!0):r.blur()}};return r||i.addEventListener("keydown",o,!0),()=>{r||i.removeEventListener("keydown",o,!0)}},[e,t,r]),(0,s.b)(()=>{var r;let o=(0,n.r)(e.current?e.current[0]:void 0);if(!t)return;let s=I.getTreeNode(e);if(s)return s.nodeToRestore=null!==(r=i.current)&&void 0!==r?r:void 0,()=>{let r=I.getTreeNode(e);if(!r)return;let n=r.nodeToRestore;if(t&&n&&(k(o.activeElement,e.current)||o.activeElement===o.body&&function(e){let t=I.getTreeNode(m);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(null==t?void 0:t.scopeRef)===e}(e))){let t=I.clone();requestAnimationFrame(()=>{if(o.activeElement===o.body){let r=t.getTreeNode(e);for(;r;){if(r.nodeToRestore&&r.nodeToRestore.isConnected){M(r.nodeToRestore);return}r=r.parent}for(r=t.getTreeNode(e);r;){if(r.scopeRef&&r.scopeRef.current&&I.getTreeNode(r.scopeRef)){A(r.scopeRef.current,!0);return}r=r.parent}}})}}},[e,t])}(h,a,o),function(e,t){let r=u.useRef(t);(0,u.useEffect)(()=>{r.current&&(m=e,!k((0,n.r)(e.current?e.current[0]:void 0).activeElement,m.current)&&e.current&&A(e.current)),r.current=!1},[e])}(h,l),(0,u.useEffect)(()=>{let e=(0,n.r)(h.current?h.current[0]:void 0).activeElement,t=null;if(k(e,h.current)){for(let r of I.traverse())r.scopeRef&&k(e,r.scopeRef.current)&&(t=r);t===I.getTreeNode(h)&&(m=t.scopeRef)}},[h]),(0,s.b)(()=>()=>{var e,t,r;let n=null!==(r=null===(t=I.getTreeNode(h))||void 0===t?void 0:null===(e=t.parent)||void 0===e?void 0:e.scopeRef)&&void 0!==r?r:null;(h===m||T(h,m))&&(!n||I.getTreeNode(n))&&(m=n),I.removeTreeNode(h)},[h]);let y=(0,u.useMemo)(()=>({focusNext(e={}){let t=h.current,{from:r,tabbable:i,wrap:o,accept:s}=e,a=r||(0,n.r)(t[0]).activeElement,l=t[0].previousElementSibling,u=P(x(t),{tabbable:i,accept:s},t);u.currentNode=k(a,t)?a:l;let c=u.nextNode();return!c&&o&&(u.currentNode=l,c=u.nextNode()),c&&M(c,!0),c},focusPrevious(e={}){let t=h.current,{from:r,tabbable:i,wrap:o,accept:s}=e,a=r||(0,n.r)(t[0]).activeElement,l=t[t.length-1].nextElementSibling,u=P(x(t),{tabbable:i,accept:s},t);u.currentNode=k(a,t)?a:l;let c=u.previousNode();return!c&&o&&(u.currentNode=l,c=u.previousNode()),c&&M(c,!0),c},focusFirst(e={}){let t=h.current,{tabbable:r,accept:n}=e,i=P(x(t),{tabbable:r,accept:n},t);i.currentNode=t[0].previousElementSibling;let o=i.nextNode();return o&&M(o,!0),o},focusLast(e={}){let t=h.current,{tabbable:r,accept:n}=e,i=P(x(t),{tabbable:r,accept:n},t);i.currentNode=t[t.length-1].nextElementSibling;let o=i.previousNode();return o&&M(o,!0),o}}),[]),v=(0,u.useMemo)(()=>({focusManager:y,parentNode:p}),[p,y]);return u.createElement(g.Provider,{value:v},u.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:c}),i,u.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:d}))}let v=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],b=v.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";v.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let w=v.join(':not([hidden]):not([tabindex="-1"]),');function x(e){return e[0].parentElement}function E(e){let t=I.getTreeNode(m);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function k(e,t){return!!e&&!!t&&t.some(t=>t.contains(e))}function S(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:r}of I.traverse(I.getTreeNode(t)))if(r&&k(e,r.current))return!0;return!1}function T(e,t){var r;let n=null===(r=I.getTreeNode(t))||void 0===r?void 0:r.parent;for(;n;){if(n.scopeRef===e)return!0;n=n.parent}return!1}function M(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch(e){}}else try{p(e)}catch(e){}}function A(e,t=!0){let r=e[0].previousElementSibling,n=x(e),i=P(n,{tabbable:t},e);i.currentNode=r;let o=i.nextNode();t&&!o&&((i=P(n=x(e),{tabbable:!1},e)).currentNode=r,o=i.nextNode()),M(o)}function P(e,t,r){let i=(null==t?void 0:t.tabbable)?w:b,o=(0,n.r)(e).createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(e){var o;return(null==t?void 0:null===(o=t.from)||void 0===o?void 0:o.contains(e))?NodeFilter.FILTER_REJECT:e.matches(i)&&function e(t,r){return"#comment"!==t.nodeName&&function(e){let t=(0,n.k)(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:r,visibility:i}=e.style,o="none"!==r&&"hidden"!==i&&"collapse"!==i;if(o){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:r,visibility:n}=t(e);o="none"!==r&&"hidden"!==n&&"collapse"!==n}return o}(t)&&!t.hasAttribute("hidden")&&("DETAILS"!==t.nodeName||!r||"SUMMARY"===r.nodeName||t.hasAttribute("open"))&&(!t.parentElement||e(t.parentElement,t))}(e)&&(!r||k(e,r))&&(!(null==t?void 0:t.accept)||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return(null==t?void 0:t.from)&&(o.currentNode=t.from),o}class C{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,r){let n=this.fastMap.get(null!=t?t:null);if(!n)return;let i=new _({scopeRef:e});n.addChild(i),i.parent=n,this.fastMap.set(e,i),r&&(i.nodeToRestore=r)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(null===e)return;let t=this.fastMap.get(e);if(!t)return;let r=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&k(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let n=t.children;r&&(r.removeChild(t),n.size>0&&n.forEach(e=>r&&r.addChild(e))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(null!=e.scopeRef&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){var e,t;let r=new C;for(let n of this.traverse())r.addTreeNode(n.scopeRef,null!==(t=null===(e=n.parent)||void 0===e?void 0:e.scopeRef)&&void 0!==t?t:null,n.nodeToRestore);return r}constructor(){this.fastMap=new Map,this.root=new _({scopeRef:null}),this.fastMap.set(null,this.root)}}class _{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}let I=new C;function O(e={}){let{autoFocus:t=!1,isTextInput:r,within:n}=e,i=(0,u.useRef)({isFocused:!1,isFocusVisible:t||(0,c.E)()}),[o,s]=(0,u.useState)(!1),[a,l]=(0,u.useState)(()=>i.current.isFocused&&i.current.isFocusVisible),f=(0,u.useCallback)(()=>l(i.current.isFocused&&i.current.isFocusVisible),[]),p=(0,u.useCallback)(e=>{i.current.isFocused=e,s(e),f()},[f]);(0,c.mG)(e=>{i.current.isFocusVisible=e,f()},[],{isTextInput:r});let{focusProps:g}=(0,d.K)({isDisabled:n,onFocusChange:p}),{focusWithinProps:m}=(0,h.L)({isDisabled:!n,onFocusWithinChange:p});return{isFocused:o,isFocusVisible:a,focusProps:n?m:g}}let L=u.createContext(null);function R(e,t){let{focusProps:r}=(0,d.K)(e),{keyboardProps:n}=(0,f.v)(e),i=(0,l.d)(r,n),o=function(e){let t=(0,u.useContext)(L)||{};(0,a.l)(t,e);let{ref:r,...n}=t;return n}(t),s=e.isDisabled?{}:o,c=(0,u.useRef)(e.autoFocus);return(0,u.useEffect)(()=>{c.current&&t.current&&p(t.current),c.current=!1},[t]),{focusableProps:(0,l.d)({...i,tabIndex:e.excludeFromTabOrder&&!e.isDisabled?-1:void 0},s)}}},3175:function(e,t,r){"use strict";let n;r.d(t,{bd:function(){return E},Xe:function(){return A},L0:function(){return P},bU:function(){return k},qb:function(){return T}});var i=r(67294),o=r(16769);let s=Symbol.for("react-aria.i18n.locale"),a=Symbol.for("react-aria.i18n.strings");class l{getStringForLocale(e,t){let r=this.getStringsForLocale(t)[e];if(!r)throw Error(`Could not find intl message ${e} in ${t} locale`);return r}getStringsForLocale(e){let t=this.strings[e];return t||(t=function(e,t,r="en-US"){if(t[e])return t[e];let n=Intl.Locale?new Intl.Locale(e).language:e.split("-")[0];if(t[n])return t[n];for(let e in t)if(e.startsWith(n+"-"))return t[e];return t[r]}(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(e){if("undefined"==typeof window)return null;let t=window[s];if(void 0===n){let e=window[a];if(!e)return null;for(let r in n={},e)n[r]=new l({[t]:e[r]},t)}let r=null==n?void 0:n[e];if(!r)throw Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(e,t="en-US"){this.strings={...e},this.defaultLocale=t}}let u=new Map,c=new Map;class d{format(e,t){let r=this.strings.getStringForLocale(e,this.locale);return"function"==typeof r?r(t,this):r}plural(e,t,r="cardinal"){let n=t["="+e];if(n)return"function"==typeof n?n():n;let i=this.locale+":"+r,o=u.get(i);return o||(o=new Intl.PluralRules(this.locale,{type:r}),u.set(i,o)),"function"==typeof(n=t[o.select(e)]||t.other)?n():n}number(e){let t=c.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),c.set(this.locale,t)),t.format(e)}select(e,t){let r=e[t]||e.other;return"function"==typeof r?r():r}constructor(e,t){this.locale=e,this.strings=t}}let h=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),f=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function p(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),r="function"==typeof t.getTextInfo?t.getTextInfo():t.textInfo;if(r)return"rtl"===r.direction;if(t.script)return h.has(t.script)}let t=e.split("-")[0];return f.has(t)}let g=Symbol.for("react-aria.i18n.locale");function m(){let e="undefined"!=typeof window&&window[g]||"undefined"!=typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch(t){e="en-US"}return{locale:e,direction:p(e)?"rtl":"ltr"}}let y=m(),v=new Set;function b(){for(let e of(y=m(),v))e(y)}function w(){let e=(0,o.Av)(),[t,r]=(0,i.useState)(y);return((0,i.useEffect)(()=>(0===v.size&&window.addEventListener("languagechange",b),v.add(r),()=>{v.delete(r),0===v.size&&window.removeEventListener("languagechange",b)}),[]),e)?{locale:"en-US",direction:"ltr"}:t}let x=i.createContext(null);function E(e){let{locale:t,children:r}=e,n=w(),o=t?{locale:t,direction:p(t)?"rtl":"ltr"}:n;return i.createElement(x.Provider,{value:o},r)}function k(){let e=w();return(0,i.useContext)(x)||e}let S=new WeakMap;function T(e,t){let r,{locale:n}=k(),o=t&&l.getGlobalDictionaryForPackage(t)||((r=S.get(e))||(r=new l(e),S.set(e,r)),r);return(0,i.useMemo)(()=>new d(n,o),[n,o])}let M=new Map;function A(e){let{locale:t}=k(),r=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(M.has(r))return M.get(r);let n=new Intl.Collator(t,e);return M.set(r,n),n}function P(e){let t=A({usage:"search",...e}),r=(0,i.useCallback)((e,r)=>0===r.length||(e=e.normalize("NFC"),r=r.normalize("NFC"),0===t.compare(e.slice(0,r.length),r)),[t]),n=(0,i.useCallback)((e,r)=>0===r.length||(e=e.normalize("NFC"),r=r.normalize("NFC"),0===t.compare(e.slice(-r.length),r)),[t]),o=(0,i.useCallback)((e,r)=>{if(0===r.length)return!0;e=e.normalize("NFC");let n=0,i=(r=r.normalize("NFC")).length;for(;n+i<=e.length;n++){let o=e.slice(n,n+i);if(0===t.compare(r,o))return!0}return!1},[t]);return(0,i.useMemo)(()=>({startsWith:r,endsWith:n,contains:o}),[r,n,o])}},4942:function(e,t,r){"use strict";r.d(t,{O:function(){return n}});let n=r(67294).createContext({register:()=>{}});n.displayName="PressResponderContext"},47234:function(e,t,r){"use strict";r.d(t,{K:function(){return s}});var n=r(34247),i=r(67294),o=r(48098);function s(e){let{isDisabled:t,onFocus:r,onBlur:s,onFocusChange:a}=e,l=(0,i.useCallback)(e=>{if(e.target===e.currentTarget)return s&&s(e),a&&a(!1),!0},[s,a]),u=(0,n.d)(l),c=(0,i.useCallback)(e=>{let t=(0,o.r3)(e.target);e.target===e.currentTarget&&t.activeElement===e.target&&(r&&r(e),a&&a(!0),u(e))},[a,r,u]);return{focusProps:{onFocus:!t&&(r||a||s)?c:void 0,onBlur:!t&&(s||a)?l:void 0}}}},9975:function(e,t,r){"use strict";r.d(t,{E:function(){return b},Jz:function(){return w},_w:function(){return x},mG:function(){return k}});var n=r(48098),i=r(67294);let o=null,s=new Set,a=new Map,l=!1,u=!1,c={Tab:!0,Escape:!0};function d(e,t){for(let r of s)r(e,t)}function h(e){l=!0,e.metaKey||!(0,n.V5)()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(o="keyboard",d("keyboard",e))}function f(e){o="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(l=!0,d("pointer",e))}function p(e){(0,n.Zj)(e)&&(l=!0,o="virtual")}function g(e){e.target!==window&&e.target!==document&&(l||u||(o="virtual",d("virtual",e)),l=!1,u=!1)}function m(){l=!1,u=!0}function y(e){if("undefined"==typeof window||a.get((0,n.kR)(e)))return;let t=(0,n.kR)(e),r=(0,n.r3)(e),i=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){l=!0,i.apply(this,arguments)},r.addEventListener("keydown",h,!0),r.addEventListener("keyup",h,!0),r.addEventListener("click",p,!0),t.addEventListener("focus",g,!0),t.addEventListener("blur",m,!1),"undefined"!=typeof PointerEvent?(r.addEventListener("pointerdown",f,!0),r.addEventListener("pointermove",f,!0),r.addEventListener("pointerup",f,!0)):(r.addEventListener("mousedown",f,!0),r.addEventListener("mousemove",f,!0),r.addEventListener("mouseup",f,!0)),t.addEventListener("beforeunload",()=>{v(e)},{once:!0}),a.set(t,{focus:i})}let v=(e,t)=>{let r=(0,n.kR)(e),i=(0,n.r3)(e);t&&i.removeEventListener("DOMContentLoaded",t),a.has(r)&&(r.HTMLElement.prototype.focus=a.get(r).focus,i.removeEventListener("keydown",h,!0),i.removeEventListener("keyup",h,!0),i.removeEventListener("click",p,!0),r.removeEventListener("focus",g,!0),r.removeEventListener("blur",m,!1),"undefined"!=typeof PointerEvent?(i.removeEventListener("pointerdown",f,!0),i.removeEventListener("pointermove",f,!0),i.removeEventListener("pointerup",f,!0)):(i.removeEventListener("mousedown",f,!0),i.removeEventListener("mousemove",f,!0),i.removeEventListener("mouseup",f,!0)),a.delete(r))};function b(){return"pointer"!==o}function w(){return o}function x(e){o=e,d(e,null)}"undefined"!=typeof document&&function(e){let t;let r=(0,n.r3)(void 0);"loading"!==r.readyState?y(void 0):(t=()=>{y(void 0)},r.addEventListener("DOMContentLoaded",t)),()=>v(e,t)}();let E=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function k(e,t,r){y(),(0,i.useEffect)(()=>{let t=(t,i)=>{(function(e,t,r){var i;let o="undefined"!=typeof window?(0,n.kR)(null==r?void 0:r.target).HTMLInputElement:HTMLInputElement,s="undefined"!=typeof window?(0,n.kR)(null==r?void 0:r.target).HTMLTextAreaElement:HTMLTextAreaElement,a="undefined"!=typeof window?(0,n.kR)(null==r?void 0:r.target).HTMLElement:HTMLElement,l="undefined"!=typeof window?(0,n.kR)(null==r?void 0:r.target).KeyboardEvent:KeyboardEvent;return!((e=e||(null==r?void 0:r.target)instanceof o&&!E.has(null==r?void 0:null===(i=r.target)||void 0===i?void 0:i.type)||(null==r?void 0:r.target)instanceof s||(null==r?void 0:r.target)instanceof a&&(null==r?void 0:r.target.isContentEditable))&&"keyboard"===t&&r instanceof l&&!c[r.key])})(!!(null==r?void 0:r.isTextInput),t,i)&&e(b())};return s.add(t),()=>{s.delete(t)}},t)}},44971:function(e,t,r){"use strict";r.d(t,{L:function(){return o}});var n=r(34247),i=r(67294);function o(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:o,onFocusWithinChange:s}=e,a=(0,i.useRef)({isFocusWithin:!1}),l=(0,i.useCallback)(e=>{a.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(a.current.isFocusWithin=!1,r&&r(e),s&&s(!1))},[r,s,a]),u=(0,n.d)(l),c=(0,i.useCallback)(e=>{a.current.isFocusWithin||document.activeElement!==e.target||(o&&o(e),s&&s(!0),a.current.isFocusWithin=!0,u(e))},[o,s,u]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:l}}}},91243:function(e,t,r){"use strict";function n(e){if(!e)return;let t=!0;return r=>{e({...r,preventDefault(){r.preventDefault()},isDefaultPrevented:()=>r.isDefaultPrevented(),stopPropagation(){console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.")},continuePropagation(){t=!1}}),t&&r.stopPropagation()}}function i(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:n(e.onKeyDown),onKeyUp:n(e.onKeyUp)}}}r.d(t,{v:function(){return i}})},51889:function(e,t,r){"use strict";r.d(t,{T:function(){return s}});var n=r(2317),i=r(48098),o=r(67294);function s(e){let{isDisabled:t,onLongPressStart:r,onLongPressEnd:s,onLongPress:a,threshold:l=500,accessibilityDescription:u}=e,c=(0,o.useRef)(),{addGlobalListener:d,removeGlobalListener:h}=(0,i.xi)(),{pressProps:f}=(0,n.r)({isDisabled:t,onPressStart(e){if(e.continuePropagation(),("mouse"===e.pointerType||"touch"===e.pointerType)&&(r&&r({...e,type:"longpressstart"}),c.current=setTimeout(()=>{e.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),a&&a({...e,type:"longpress"}),c.current=void 0},l),"touch"===e.pointerType)){let t=e=>{e.preventDefault()};d(e.target,"contextmenu",t,{once:!0}),d(window,"pointerup",()=>{setTimeout(()=>{h(e.target,"contextmenu",t)},30)},{once:!0})}},onPressEnd(e){c.current&&clearTimeout(c.current),s&&("mouse"===e.pointerType||"touch"===e.pointerType)&&s({...e,type:"longpressend"})}}),p=(0,i.PK)(a&&!t?u:void 0);return{longPressProps:(0,i.dG)(f,p)}}},2317:function(e,t,r){"use strict";r.d(t,{r:function(){return y}});var n=r(48098);let i="default",o="",s=new WeakMap;function a(e){if((0,n.gn)()){if("default"===i){let t=(0,n.r3)(e);o=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}i="disabled"}else(e instanceof HTMLElement||e instanceof SVGElement)&&(s.set(e,e.style.userSelect),e.style.userSelect="none")}function l(e){if((0,n.gn)())"disabled"===i&&(i="restoring",setTimeout(()=>{(0,n.QB)(()=>{if("restoring"===i){let t=(0,n.r3)(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=o||""),o="",i="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&s.has(e)){let t=s.get(e);"none"===e.style.userSelect&&(e.style.userSelect=t),""===e.getAttribute("style")&&e.removeAttribute("style"),s.delete(e)}}var u=r(4942),c=r(13094),d=r(7321),h=r(29677),f=r(67294),p=new WeakMap;class g{continuePropagation(){(0,h._)(this,p,!1)}get shouldStopPropagation(){return(0,c._)(this,p)}constructor(e,t,r){(0,d._)(this,p,{writable:!0,value:void 0}),(0,h._)(this,p,!0),this.type=e,this.pointerType=t,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey}}let m=Symbol("linkClicked");function y(e){let{onPress:t,onPressChange:r,onPressStart:i,onPressEnd:o,onPressUp:s,isDisabled:c,isPressed:d,preventFocusOnPress:h,shouldCancelOnPointerExit:p,allowTextSelectionOnPress:y,ref:T,...M}=function(e){let t=(0,f.useContext)(u.O);if(t){let{register:r,...i}=t;e=(0,n.dG)(i,e),r()}return(0,n.lE)(t,e.ref),e}(e),[A,P]=(0,f.useState)(!1),C=(0,f.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:_,removeAllGlobalListeners:I}=(0,n.xi)(),O=(0,n.iW)((e,t)=>{let n=C.current;if(c||n.didFirePressStart)return!1;let o=!0;if(n.isTriggeringEvent=!0,i){let r=new g("pressstart",t,e);i(r),o=r.shouldStopPropagation}return r&&r(!0),n.isTriggeringEvent=!1,n.didFirePressStart=!0,P(!0),o}),L=(0,n.iW)((e,n,i=!0)=>{let s=C.current;if(!s.didFirePressStart)return!1;s.ignoreClickAfterPress=!0,s.didFirePressStart=!1,s.isTriggeringEvent=!0;let a=!0;if(o){let t=new g("pressend",n,e);o(t),a=t.shouldStopPropagation}if(r&&r(!1),P(!1),t&&i&&!c){let r=new g("press",n,e);t(r),a&&(a=r.shouldStopPropagation)}return s.isTriggeringEvent=!1,a}),R=(0,n.iW)((e,t)=>{let r=C.current;if(c)return!1;if(s){r.isTriggeringEvent=!0;let n=new g("pressup",t,e);return s(n),r.isTriggeringEvent=!1,n.shouldStopPropagation}return!0}),j=(0,n.iW)(e=>{let t=C.current;t.isPressed&&t.target&&(t.isOverTarget&&null!=t.pointerType&&L(x(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,I(),y||l(t.target))}),B=(0,n.iW)(e=>{p&&j(e)}),N=(0,f.useMemo)(()=>{let e=C.current,t={onKeyDown(t){if(b(t.nativeEvent,t.currentTarget)&&t.currentTarget.contains(t.target)){var i;S(t.target,t.key)&&t.preventDefault();let o=!0;if(!e.isPressed&&!t.repeat){e.target=t.currentTarget,e.isPressed=!0,o=O(t,"keyboard");let i=t.currentTarget;_((0,n.r3)(t.currentTarget),"keyup",(0,n.tS)(t=>{b(t,i)&&!t.repeat&&i.contains(t.target)&&e.target&&R(x(e.target,t),"keyboard")},r),!0)}o&&t.stopPropagation(),t.metaKey&&(0,n.V5)()&&(null===(i=e.metaKeyEvents)||void 0===i||i.set(t.key,t.nativeEvent))}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||t.currentTarget.contains(t.target))&&t&&0===t.button&&!e.isTriggeringEvent&&!n.nG.isOpening){let r=!0;if(c&&t.preventDefault(),!e.ignoreClickAfterPress&&!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||(0,n.Zj)(t.nativeEvent))){c||h||(0,n.Ao)(t.currentTarget);let e=O(t,"virtual"),i=R(t,"virtual"),o=L(t,"virtual");r=e&&i&&o}e.ignoreEmulatedMouseEvents=!1,e.ignoreClickAfterPress=!1,r&&t.stopPropagation()}}},r=t=>{var r,i,o;if(e.isPressed&&e.target&&b(t,e.target)){S(t.target,t.key)&&t.preventDefault();let r=t.target;L(x(e.target,t),"keyboard",e.target.contains(r)),I(),"Enter"!==t.key&&v(e.target)&&e.target.contains(r)&&!t[m]&&(t[m]=!0,(0,n.nG)(e.target,t,!1)),e.isPressed=!1,null===(i=e.metaKeyEvents)||void 0===i||i.delete(t.key)}else if("Meta"===t.key&&(null===(r=e.metaKeyEvents)||void 0===r?void 0:r.size)){let t=e.metaKeyEvents;for(let r of(e.metaKeyEvents=void 0,t.values()))null===(o=e.target)||void 0===o||o.dispatchEvent(new KeyboardEvent("keyup",r))}};if("undefined"!=typeof PointerEvent){t.onPointerDown=t=>{if(0!==t.button||!t.currentTarget.contains(t.target))return;if((0,n.cr)(t.nativeEvent)){e.pointerType="virtual";return}k(t.currentTarget)&&t.preventDefault(),e.pointerType=t.pointerType;let s=!0;e.isPressed||(e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,c||h||(0,n.Ao)(t.currentTarget),y||a(e.target),s=O(t,e.pointerType),_((0,n.r3)(t.currentTarget),"pointermove",r,!1),_((0,n.r3)(t.currentTarget),"pointerup",i,!1),_((0,n.r3)(t.currentTarget),"pointercancel",o,!1)),s&&t.stopPropagation()},t.onMouseDown=e=>{e.currentTarget.contains(e.target)&&0===e.button&&(k(e.currentTarget)&&e.preventDefault(),e.stopPropagation())},t.onPointerUp=t=>{t.currentTarget.contains(t.target)&&"virtual"!==e.pointerType&&0===t.button&&E(t,t.currentTarget)&&R(t,e.pointerType||t.pointerType)};let r=t=>{t.pointerId===e.activePointerId&&(e.target&&E(t,e.target)?e.isOverTarget||null==e.pointerType||(e.isOverTarget=!0,O(x(e.target,t),e.pointerType)):e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,L(x(e.target,t),e.pointerType,!1),B(t)))},i=t=>{t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target&&(E(t,e.target)&&null!=e.pointerType?L(x(e.target,t),e.pointerType):e.isOverTarget&&null!=e.pointerType&&L(x(e.target,t),e.pointerType,!1),e.isPressed=!1,e.isOverTarget=!1,e.activePointerId=null,e.pointerType=null,I(),y||l(e.target))},o=e=>{j(e)};t.onDragStart=e=>{e.currentTarget.contains(e.target)&&j(e)}}else{t.onMouseDown=t=>{if(0===t.button&&t.currentTarget.contains(t.target)){if(k(t.currentTarget)&&t.preventDefault(),e.ignoreEmulatedMouseEvents){t.stopPropagation();return}e.isPressed=!0,e.isOverTarget=!0,e.target=t.currentTarget,e.pointerType=(0,n.Zj)(t.nativeEvent)?"virtual":"mouse",c||h||(0,n.Ao)(t.currentTarget),O(t,e.pointerType)&&t.stopPropagation(),_((0,n.r3)(t.currentTarget),"mouseup",r,!1)}},t.onMouseEnter=t=>{if(!t.currentTarget.contains(t.target))return;let r=!0;e.isPressed&&!e.ignoreEmulatedMouseEvents&&null!=e.pointerType&&(e.isOverTarget=!0,r=O(t,e.pointerType)),r&&t.stopPropagation()},t.onMouseLeave=t=>{if(!t.currentTarget.contains(t.target))return;let r=!0;e.isPressed&&!e.ignoreEmulatedMouseEvents&&null!=e.pointerType&&(e.isOverTarget=!1,r=L(t,e.pointerType,!1),B(t)),r&&t.stopPropagation()},t.onMouseUp=t=>{t.currentTarget.contains(t.target)&&!e.ignoreEmulatedMouseEvents&&0===t.button&&R(t,e.pointerType||"mouse")};let r=t=>{if(0===t.button){if(e.isPressed=!1,I(),e.ignoreEmulatedMouseEvents){e.ignoreEmulatedMouseEvents=!1;return}e.target&&E(t,e.target)&&null!=e.pointerType?L(x(e.target,t),e.pointerType):e.target&&e.isOverTarget&&null!=e.pointerType&&L(x(e.target,t),e.pointerType,!1),e.isOverTarget=!1}};t.onTouchStart=t=>{if(!t.currentTarget.contains(t.target))return;let r=function(e){let{targetTouches:t}=e;return t.length>0?t[0]:null}(t.nativeEvent);r&&(e.activePointerId=r.identifier,e.ignoreEmulatedMouseEvents=!0,e.isOverTarget=!0,e.isPressed=!0,e.target=t.currentTarget,e.pointerType="touch",c||h||(0,n.Ao)(t.currentTarget),y||a(e.target),O(t,e.pointerType)&&t.stopPropagation(),_((0,n.kR)(t.currentTarget),"scroll",i,!0))},t.onTouchMove=t=>{if(!t.currentTarget.contains(t.target))return;if(!e.isPressed){t.stopPropagation();return}let r=w(t.nativeEvent,e.activePointerId),n=!0;r&&E(r,t.currentTarget)?e.isOverTarget||null==e.pointerType||(e.isOverTarget=!0,n=O(t,e.pointerType)):e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,n=L(t,e.pointerType,!1),B(t)),n&&t.stopPropagation()},t.onTouchEnd=t=>{if(!t.currentTarget.contains(t.target))return;if(!e.isPressed){t.stopPropagation();return}let r=w(t.nativeEvent,e.activePointerId),n=!0;r&&E(r,t.currentTarget)&&null!=e.pointerType?(R(t,e.pointerType),n=L(t,e.pointerType)):e.isOverTarget&&null!=e.pointerType&&(n=L(t,e.pointerType,!1)),n&&t.stopPropagation(),e.isPressed=!1,e.activePointerId=null,e.isOverTarget=!1,e.ignoreEmulatedMouseEvents=!0,e.target&&!y&&l(e.target),I()},t.onTouchCancel=t=>{t.currentTarget.contains(t.target)&&(t.stopPropagation(),e.isPressed&&j(t))};let i=t=>{e.isPressed&&t.target.contains(e.target)&&j({currentTarget:e.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};t.onDragStart=e=>{e.currentTarget.contains(e.target)&&j(e)}}return t},[_,c,h,I,y,j,B,L,O,R]);return(0,f.useEffect)(()=>()=>{var e;y||l(null!==(e=C.current.target)&&void 0!==e?e:void 0)},[y]),{isPressed:d||A,pressProps:(0,n.dG)(M,N)}}function v(e){return"A"===e.tagName&&e.hasAttribute("href")}function b(e,t){let{key:r,code:i}=e,o=t.getAttribute("role");return("Enter"===r||" "===r||"Spacebar"===r||"Space"===i)&&!(t instanceof(0,n.kR)(t).HTMLInputElement&&!M(t,r)||t instanceof(0,n.kR)(t).HTMLTextAreaElement||t.isContentEditable)&&!(("link"===o||!o&&v(t))&&"Enter"!==r)}function w(e,t){let r=e.changedTouches;for(let e=0;e<r.length;e++){let n=r[e];if(n.identifier===t)return n}return null}function x(e,t){return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey}}function E(e,t){let r,n,i=t.getBoundingClientRect(),o=(r=0,n=0,void 0!==e.width?r=e.width/2:void 0!==e.radiusX&&(r=e.radiusX),void 0!==e.height?n=e.height/2:void 0!==e.radiusY&&(n=e.radiusY),{top:e.clientY-n,right:e.clientX+r,bottom:e.clientY+n,left:e.clientX-r});return!(i.left>o.right)&&!(o.left>i.right)&&!(i.top>o.bottom)&&!(o.top>i.bottom)}function k(e){return!(e instanceof HTMLElement)||!e.hasAttribute("draggable")}function S(e,t){return e instanceof HTMLInputElement?!M(e,t):e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!v(e)}let T=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function M(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:T.has(e.type)}},34247:function(e,t,r){"use strict";r.d(t,{d:function(){return s}});var n=r(67294),i=r(48098);class o{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,t){this.nativeEvent=t,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.bubbles=t.bubbles,this.cancelable=t.cancelable,this.defaultPrevented=t.defaultPrevented,this.eventPhase=t.eventPhase,this.isTrusted=t.isTrusted,this.timeStamp=t.timeStamp,this.type=e}}function s(e){let t=(0,n.useRef)({isFocused:!1,observer:null});(0,i.bt)(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let r=(0,i.iW)(t=>{null==e||e(t)});return(0,n.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let n=e.target;n.addEventListener("focusout",e=>{t.current.isFocused=!1,n.disabled&&r(new o("blur",e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&n.disabled){var e;null===(e=t.current.observer)||void 0===e||e.disconnect();let r=n===document.activeElement?null:document.activeElement;n.dispatchEvent(new FocusEvent("blur",{relatedTarget:r})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:r}))}}),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]})}},[r])}},48098:function(e,t,r){"use strict";r.d(t,{Ao:function(){return h},PK:function(){return C},QB:function(){return S},V5:function(){return m},Zj:function(){return _},bt:function(){return o},cr:function(){return I},dG:function(){return d},gn:function(){return v},iW:function(){return s},kR:function(){return c},lE:function(){return M},nG:function(){return w},r3:function(){return u},tS:function(){return l},xi:function(){return T}});var n=r(67294),i=r(90512);let o="undefined"!=typeof document?n.useLayoutEffect:()=>{};function s(e){let t=(0,n.useRef)(null);return o(()=>{t.current=e},[e]),(0,n.useCallback)((...e)=>{let r=t.current;return null==r?void 0:r(...e)},[])}"undefined"!=typeof window&&window.document&&window.document.createElement;let a=new Map;function l(...e){return(...t)=>{for(let r of e)"function"==typeof r&&r(...t)}}let u=e=>{var t;return null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document},c=e=>e&&"window"in e&&e.window===e?e:u(e).defaultView||window;function d(...e){let t={...e[0]};for(let r=1;r<e.length;r++){let n=e[r];for(let e in n){let r=t[e],o=n[e];"function"==typeof r&&"function"==typeof o&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=l(r,o):("className"===e||"UNSAFE_className"===e)&&"string"==typeof r&&"string"==typeof o?t[e]=(0,i.Z)(r,o):"id"===e&&r&&o?t.id=function(e,t){if(e===t)return e;let r=a.get(e);if(r)return r(t),t;let n=a.get(t);return n?(n(e),e):t}(r,o):t[e]=void 0!==o?o:r}}return t}function h(e){if(function(){if(null==f){f=!1;try{document.createElement("div").focus({get preventScroll(){return f=!0,!0}})}catch(e){}}return f}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==n;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}(e);e.focus(),function(e){for(let{element:t,scrollTop:r,scrollLeft:n}of e)t.scrollTop=r,t.scrollLeft=n}(t)}}let f=null;function p(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands.some(t=>e.test(t.brand)))||e.test(window.navigator.userAgent))}function g(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function m(){return g(/^Mac/i)}function y(){return g(/^iPad/i)||m()&&navigator.maxTouchPoints>1}function v(){return g(/^iPhone/i)||y()}function b(){return p(/Android/i)}function w(e,t,r=!0){var n,i;let{metaKey:o,ctrlKey:s,altKey:a,shiftKey:l}=t;p(/Firefox/i)&&(null===(i=window.event)||void 0===i?void 0:null===(n=i.type)||void 0===n?void 0:n.startsWith("key"))&&"_blank"===e.target&&(m()?o=!0:s=!0);let u=p(/AppleWebKit/i)&&!p(/Chrome/i)&&m()&&!y()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:s,altKey:a,shiftKey:l}):new MouseEvent("click",{metaKey:o,ctrlKey:s,altKey:a,shiftKey:l,bubbles:!0,cancelable:!0});w.isOpening=r,h(e),e.dispatchEvent(u),w.isOpening=!1}w.isOpening=!1;let x=new Map,E=new Set;function k(){if("undefined"==typeof window)return;function e(e){return"propertyName"in e}let t=r=>{if(!e(r)||!r.target)return;let n=x.get(r.target);if(n&&(n.delete(r.propertyName),0===n.size&&(r.target.removeEventListener("transitioncancel",t),x.delete(r.target)),0===x.size)){for(let e of E)e();E.clear()}};document.body.addEventListener("transitionrun",r=>{if(!e(r)||!r.target)return;let n=x.get(r.target);n||(n=new Set,x.set(r.target,n),r.target.addEventListener("transitioncancel",t,{once:!0})),n.add(r.propertyName)}),document.body.addEventListener("transitionend",t)}function S(e){requestAnimationFrame(()=>{0===x.size?e():E.add(e)})}function T(){let e=(0,n.useRef)(new Map),t=(0,n.useCallback)((t,r,n,i)=>{let o=(null==i?void 0:i.once)?(...t)=>{e.current.delete(n),n(...t)}:n;e.current.set(n,{type:r,eventTarget:t,fn:o,options:i}),t.addEventListener(r,n,i)},[]),r=(0,n.useCallback)((t,r,n,i)=>{var o;let s=(null===(o=e.current.get(n))||void 0===o?void 0:o.fn)||n;t.removeEventListener(r,s,i),e.current.delete(n)},[]),i=(0,n.useCallback)(()=>{e.current.forEach((e,t)=>{r(e.eventTarget,e.type,t,e.options)})},[r]);return(0,n.useEffect)(()=>i,[i]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:i}}function M(e,t){o(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}"undefined"!=typeof document&&("loading"!==document.readyState?k():document.addEventListener("DOMContentLoaded",k)),"undefined"!=typeof document&&window.visualViewport;let A=0,P=new Map;function C(e){let[t,r]=(0,n.useState)();return o(()=>{if(!e)return;let t=P.get(e);if(t)r(t.element.id);else{let n=`react-aria-description-${A++}`;r(n);let i=document.createElement("div");i.id=n,i.style.display="none",i.textContent=e,document.body.appendChild(i),t={refCount:0,element:i},P.set(e,t)}return t.refCount++,()=>{t&&0==--t.refCount&&(t.element.remove(),P.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function _(e){return 0===e.mozInputSource&&!!e.isTrusted||(b()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function I(e){return!b()&&0===e.width&&0===e.height||1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType}},5411:function(e,t,r){"use strict";r.d(t,{x7:function(){return Y},u4:function(){return J}});var n={};n={longPressMessage:`\u{627}\u{636}\u{63A}\u{637} \u{645}\u{637}\u{648}\u{644}\u{627}\u{64B} \u{623}\u{648} \u{627}\u{636}\u{63A}\u{637} \u{639}\u{644}\u{649} Alt + \u{627}\u{644}\u{633}\u{647}\u{645} \u{644}\u{623}\u{633}\u{641}\u{644} \u{644}\u{641}\u{62A}\u{62D} \u{627}\u{644}\u{642}\u{627}\u{626}\u{645}\u{629}`};var i={};i={longPressMessage:`\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{435}\u{442}\u{435} \u{43F}\u{440}\u{43E}\u{434}\u{44A}\u{43B}\u{436}\u{438}\u{442}\u{435}\u{43B}\u{43D}\u{43E} \u{438}\u{43B}\u{438} \u{43D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{435}\u{442}\u{435} Alt+ \u{441}\u{442}\u{440}\u{435}\u{43B}\u{43A}\u{430} \u{43D}\u{430}\u{434}\u{43E}\u{43B}\u{443}, \u{437}\u{430} \u{434}\u{430} \u{43E}\u{442}\u{432}\u{43E}\u{440}\u{438}\u{442}\u{435} \u{43C}\u{435}\u{43D}\u{44E}\u{442}\u{43E}`};var o={};o={longPressMessage:`Dlouh\xfdm stiskem nebo stisknut\xedm kl\xe1ves Alt + \u{161}ipka dol\u{16F} otev\u{159}ete nab\xeddku`};var s={};s={longPressMessage:`Langt tryk eller tryk p\xe5 Alt + pil ned for at \xe5bne menuen`};var a={};a={longPressMessage:`Dr\xfccken Sie lange oder dr\xfccken Sie Alt + Nach-unten, um das Men\xfc zu \xf6ffnen`};var l={};l={longPressMessage:`\u{3A0}\u{3B9}\u{3AD}\u{3C3}\u{3C4}\u{3B5} \u{3C0}\u{3B1}\u{3C1}\u{3B1}\u{3C4}\u{3B5}\u{3C4}\u{3B1}\u{3BC}\u{3AD}\u{3BD}\u{3B1} \u{3AE} \u{3C0}\u{3B1}\u{3C4}\u{3AE}\u{3C3}\u{3C4}\u{3B5} Alt + \u{3BA}\u{3AC}\u{3C4}\u{3C9} \u{3B2}\u{3AD}\u{3BB}\u{3BF}\u{3C2} \u{3B3}\u{3B9}\u{3B1} \u{3BD}\u{3B1} \u{3B1}\u{3BD}\u{3BF}\u{3AF}\u{3BE}\u{3B5}\u{3C4}\u{3B5} \u{3C4}\u{3BF} \u{3BC}\u{3B5}\u{3BD}\u{3BF}\u{3CD}`};var u={};u={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var c={};c={longPressMessage:`Mantenga pulsado o pulse Alt + flecha abajo para abrir el men\xfa`};var d={};d={longPressMessage:`Men\xfc\xfc avamiseks vajutage pikalt v\xf5i vajutage klahve Alt + allanool`};var h={};h={longPressMessage:`Avaa valikko painamalla pohjassa tai n\xe4pp\xe4inyhdistelm\xe4ll\xe4 Alt + Alanuoli`};var f={};f={longPressMessage:`Appuyez de mani\xe8re prolong\xe9e ou appuyez sur Alt\xa0+\xa0Fl\xe8che vers le bas pour ouvrir le menu.`};var p={};p={longPressMessage:`\u{5DC}\u{5D7}\u{5E5} \u{5DC}\u{5D7}\u{5D9}\u{5E6}\u{5D4} \u{5D0}\u{5E8}\u{5D5}\u{5DB}\u{5D4} \u{5D0}\u{5D5} \u{5D4}\u{5E7}\u{5E9} Alt + ArrowDown \u{5DB}\u{5D3}\u{5D9} \u{5DC}\u{5E4}\u{5EA}\u{5D5}\u{5D7} \u{5D0}\u{5EA} \u{5D4}\u{5EA}\u{5E4}\u{5E8}\u{5D9}\u{5D8}`};var g={};g={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var m={};m={longPressMessage:`Nyomja meg hosszan, vagy nyomja meg az Alt + lefele ny\xedl gombot a men\xfc megnyit\xe1s\xe1hoz`};var y={};y={longPressMessage:`Premere a lungo o premere Alt + Freccia gi\xf9 per aprire il menu`};var v={};v={longPressMessage:`\u{9577}\u{62BC}\u{3057}\u{307E}\u{305F}\u{306F} Alt+\u{4E0B}\u{77E2}\u{5370}\u{30AD}\u{30FC}\u{3067}\u{30E1}\u{30CB}\u{30E5}\u{30FC}\u{3092}\u{958B}\u{304F}`};var b={};b={longPressMessage:`\u{AE38}\u{AC8C} \u{B204}\u{B974}\u{AC70}\u{B098} Alt + \u{C544}\u{B798}\u{CABD} \u{D654}\u{C0B4}\u{D45C}\u{B97C} \u{B20C}\u{B7EC} \u{BA54}\u{B274} \u{C5F4}\u{AE30}`};var w={};w={longPressMessage:`Nor\u{117}dami atidaryti meniu, nuspaud\u{119} palaikykite arba paspauskite \u{201E}Alt + ArrowDown\u{201C}.`};var x={};x={longPressMessage:`Lai atv\u{113}rtu izv\u{113}lni, turiet nospiestu vai nospiediet tausti\u{146}u kombin\u{101}ciju Alt + lejupv\u{113}rst\u{101} bulti\u{146}a`};var E={};E={longPressMessage:`Langt trykk eller trykk Alt + PilNed for \xe5 \xe5pne menyen`};var k={};k={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var S={};S={longPressMessage:`Naci\u{15B}nij i przytrzymaj lub naci\u{15B}nij klawisze Alt + Strza\u{142}ka w d\xf3\u{142}, aby otworzy\u{107} menu`};var T={};T={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var M={};M={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var A={};A={longPressMessage:`Ap\u{103}sa\u{21B}i lung sau ap\u{103}sa\u{21B}i pe Alt + s\u{103}geat\u{103} \xeen jos pentru a deschide meniul`};var P={};P={longPressMessage:`\u{41D}\u{430}\u{436}\u{43C}\u{438}\u{442}\u{435} \u{438} \u{443}\u{434}\u{435}\u{440}\u{436}\u{438}\u{432}\u{430}\u{439}\u{442}\u{435} \u{438}\u{43B}\u{438} \u{43D}\u{430}\u{436}\u{43C}\u{438}\u{442}\u{435} Alt + \u{421}\u{442}\u{440}\u{435}\u{43B}\u{43A}\u{430} \u{432}\u{43D}\u{438}\u{437}, \u{447}\u{442}\u{43E}\u{431}\u{44B} \u{43E}\u{442}\u{43A}\u{440}\u{44B}\u{442}\u{44C} \u{43C}\u{435}\u{43D}\u{44E}`};var C={};C={longPressMessage:`Ponuku otvor\xedte dlh\xfdm stla\u{10D}en\xedm alebo stla\u{10D}en\xedm kl\xe1vesu Alt + kl\xe1vesu so \u{161}\xedpkou nadol`};var _={};_={longPressMessage:`Za odprtje menija pritisnite in dr\u{17E}ite gumb ali pritisnite Alt+pu\u{161}\u{10D}ica navzdol`};var I={};I={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var O={};O={longPressMessage:`H\xe5ll nedtryckt eller tryck p\xe5 Alt + pil ned\xe5t f\xf6r att \xf6ppna menyn`};var L={};L={longPressMessage:`Men\xfcy\xfc a\xe7mak i\xe7in uzun bas\u{131}n veya Alt + A\u{15F}a\u{11F}\u{131} Ok tu\u{15F}una bas\u{131}n`};var R={};R={longPressMessage:`\u{414}\u{43E}\u{432}\u{433}\u{43E} \u{430}\u{431}\u{43E} \u{437}\u{432}\u{438}\u{447}\u{430}\u{439}\u{43D}\u{43E} \u{43D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{456}\u{442}\u{44C} \u{43A}\u{43E}\u{43C}\u{431}\u{456}\u{43D}\u{430}\u{446}\u{456}\u{44E} \u{43A}\u{43B}\u{430}\u{432}\u{456}\u{448} Alt \u{456} \u{441}\u{442}\u{440}\u{456}\u{43B}\u{43A}\u{430} \u{432}\u{43D}\u{438}\u{437}, \u{449}\u{43E}\u{431} \u{432}\u{456}\u{434}\u{43A}\u{440}\u{438}\u{442}\u{438} \u{43C}\u{435}\u{43D}\u{44E}`};var j={};j={longPressMessage:`\u{957F}\u{6309}\u{6216}\u{6309} Alt + \u{5411}\u{4E0B}\u{65B9}\u{5411}\u{952E}\u{4EE5}\u{6253}\u{5F00}\u{83DC}\u{5355}`};var B={};B={longPressMessage:`\u{9577}\u{6309}\u{6216}\u{6309} Alt+\u{5411}\u{4E0B}\u{9375}\u{4EE5}\u{958B}\u{555F}\u{529F}\u{80FD}\u{8868}`};var N=r(67294),D=r(16769);let K="undefined"!=typeof document?N.useLayoutEffect:()=>{},U=!!("undefined"!=typeof window&&window.document&&window.document.createElement),z=new Map;function F(e){let[t,r]=(0,N.useState)(e),n=(0,N.useRef)(null),i=(0,D.gP)(t),o=(0,N.useCallback)(e=>{n.current=e},[]);return U&&z.set(i,o),K(()=>()=>{z.delete(i)},[i]),(0,N.useEffect)(()=>{let e=n.current;e&&(n.current=null,r(e))}),i}let W=new Map,V=new Set;function $(){if("undefined"==typeof window)return;function e(e){return"propertyName"in e}let t=r=>{if(!e(r)||!r.target)return;let n=W.get(r.target);if(n&&(n.delete(r.propertyName),0===n.size&&(r.target.removeEventListener("transitioncancel",t),W.delete(r.target)),0===W.size)){for(let e of V)e();V.clear()}};document.body.addEventListener("transitionrun",r=>{if(!e(r)||!r.target)return;let n=W.get(r.target);n||(n=new Set,W.set(r.target,n),r.target.addEventListener("transitioncancel",t,{once:!0})),n.add(r.propertyName)}),document.body.addEventListener("transitionend",t)}"undefined"!=typeof document&&("loading"!==document.readyState?$():document.addEventListener("DOMContentLoaded",$)),"undefined"!=typeof document&&window.visualViewport;var H=r(3175),q=r(51889),Z=r(31190),G={};function J(e,t,r){var n;let{type:i="menu",isDisabled:o,trigger:s="press"}=e,a=F(),{triggerProps:l,overlayProps:u}=(0,Z.IB)({type:i},t,r),c=(0,H.qb)((n=G)&&n.__esModule?n.default:n,"@react-aria/menu"),{longPressProps:d}=(0,q.T)({isDisabled:o||"longPress"!==s,accessibilityDescription:c.format("longPressMessage"),onLongPressStart(){t.close()},onLongPress(){t.open("first")}});return delete l.onPress,{menuTriggerProps:{...l,..."press"===s?{onPressStart(e){"touch"===e.pointerType||"keyboard"===e.pointerType||o||t.toggle("virtual"===e.pointerType?"first":null)},onPress(e){"touch"!==e.pointerType||o||t.toggle()}}:d,id:a,onKeyDown:e=>{if(!o&&("longPress"!==s||e.altKey)&&r&&r.current)switch(e.key){case"Enter":case" ":if("longPress"===s)return;case"ArrowDown":"continuePropagation"in e||e.stopPropagation(),e.preventDefault(),t.toggle("first");break;case"ArrowUp":"continuePropagation"in e||e.stopPropagation(),e.preventDefault(),t.toggle("last");break;default:"continuePropagation"in e&&e.continuePropagation()}}},menuProps:{...u,"aria-labelledby":a,autoFocus:t.focusStrategy||!0,onClose:t.close}}}function Y(e){let{heading:t,"aria-label":r}=e,n=F();return{itemProps:{role:"presentation"},headingProps:t?{id:n,role:"presentation"}:{},groupProps:{role:"group","aria-label":r,"aria-labelledby":t?n:void 0}}}G={"ar-AE":n,"bg-BG":i,"cs-CZ":o,"da-DK":s,"de-DE":a,"el-GR":l,"en-US":u,"es-ES":c,"et-EE":d,"fi-FI":h,"fr-FR":f,"he-IL":p,"hr-HR":g,"hu-HU":m,"it-IT":y,"ja-JP":v,"ko-KR":b,"lt-LT":w,"lv-LV":x,"nb-NO":E,"nl-NL":k,"pl-PL":S,"pt-BR":T,"pt-PT":M,"ro-RO":A,"ru-RU":P,"sk-SK":C,"sl-SI":_,"sr-SP":I,"sv-SE":O,"tr-TR":L,"uk-UA":R,"zh-CN":j,"zh-TW":B},new WeakMap},31190:function(e,t,r){"use strict";let n;r.d(t,{U4:function(){return tr},aV:function(){return ta},Xj:function(){return te},N3:function(){return e9},RP:function(){return to},Ir:function(){return eJ},Bq:function(){return tl},tN:function(){return eZ},IB:function(){return eY},tk:function(){return e1}});var i={};i={dismiss:`\u{62A}\u{62C}\u{627}\u{647}\u{644}`};var o={};o={dismiss:`\u{41E}\u{442}\u{445}\u{432}\u{44A}\u{440}\u{43B}\u{44F}\u{43D}\u{435}`};var s={};s={dismiss:"Odstranit"};var a={};a={dismiss:"Luk"};var l={};l={dismiss:`Schlie\xdfen`};var u={};u={dismiss:`\u{391}\u{3C0}\u{3CC}\u{3C1}\u{3C1}\u{3B9}\u{3C8}\u{3B7}`};var c={};c={dismiss:"Dismiss"};var d={};d={dismiss:"Descartar"};var h={};h={dismiss:`L\xf5peta`};var f={};f={dismiss:`Hylk\xe4\xe4`};var p={};p={dismiss:"Rejeter"};var g={};g={dismiss:`\u{5D4}\u{5EA}\u{5E2}\u{5DC}\u{5DD}`};var m={};m={dismiss:"Odbaci"};var y={};y={dismiss:`Elutas\xedt\xe1s`};var v={};v={dismiss:"Ignora"};var b={};b={dismiss:`\u{9589}\u{3058}\u{308B}`};var w={};w={dismiss:`\u{BB34}\u{C2DC}`};var x={};x={dismiss:"Atmesti"};var E={};E={dismiss:`Ner\u{101}d\u{12B}t`};var k={};k={dismiss:"Lukk"};var S={};S={dismiss:"Negeren"};var T={};T={dismiss:"Zignoruj"};var M={};M={dismiss:"Descartar"};var A={};A={dismiss:"Dispensar"};var P={};P={dismiss:"Revocare"};var C={};C={dismiss:`\u{41F}\u{440}\u{43E}\u{43F}\u{443}\u{441}\u{442}\u{438}\u{442}\u{44C}`};var _={};_={dismiss:`Zru\u{161}i\u{165}`};var I={};I={dismiss:"Opusti"};var O={};O={dismiss:"Odbaci"};var L={};L={dismiss:"Avvisa"};var R={};R={dismiss:"Kapat"};var j={};j={dismiss:`\u{421}\u{43A}\u{430}\u{441}\u{443}\u{432}\u{430}\u{442}\u{438}`};var B={};B={dismiss:`\u{53D6}\u{6D88}`};var N={};N={dismiss:`\u{95DC}\u{9589}`};var D=r(67294),K=r(16769),U=r(90512);let z="undefined"!=typeof document?D.useLayoutEffect:()=>{},F=!!("undefined"!=typeof window&&window.document&&window.document.createElement),W=new Map;function V(e){let[t,r]=(0,D.useState)(e),n=(0,D.useRef)(null),i=(0,K.gP)(t),o=(0,D.useCallback)(e=>{n.current=e},[]);return F&&W.set(i,o),z(()=>()=>{W.delete(i)},[i]),(0,D.useEffect)(()=>{let e=n.current;e&&(n.current=null,r(e))}),i}function $(...e){return(...t)=>{for(let r of e)"function"==typeof r&&r(...t)}}let H=e=>{var t;return null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document},q=e=>e&&"window"in e&&e.window===e?e:H(e).defaultView||window;function Z(e){if(function(){if(null==G){G=!1;try{document.createElement("div").focus({get preventScroll(){return G=!0,!0}})}catch(e){}}return G}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==n;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}(e);e.focus(),function(e){for(let{element:t,scrollTop:r,scrollLeft:n}of e)t.scrollTop=r,t.scrollLeft=n}(t)}}let G=null;function J(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands.some(t=>e.test(t.brand)))||e.test(window.navigator.userAgent))}function Y(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}let X=new Map,Q=new Set;function ee(){if("undefined"==typeof window)return;function e(e){return"propertyName"in e}let t=r=>{if(!e(r)||!r.target)return;let n=X.get(r.target);if(n&&(n.delete(r.propertyName),0===n.size&&(r.target.removeEventListener("transitioncancel",t),X.delete(r.target)),0===X.size)){for(let e of Q)e();Q.clear()}};document.body.addEventListener("transitionrun",r=>{if(!e(r)||!r.target)return;let n=X.get(r.target);n||(n=new Set,X.set(r.target,n),r.target.addEventListener("transitioncancel",t,{once:!0})),n.add(r.propertyName)}),document.body.addEventListener("transitionend",t)}function et(e,t){let r=e;for(er(r,t)&&(r=r.parentElement);r&&!er(r,t);)r=r.parentElement;return r||document.scrollingElement||document.documentElement}function er(e,t){let r=window.getComputedStyle(e),n=/(auto|scroll)/.test(r.overflow+r.overflowX+r.overflowY);return n&&t&&(n=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),n}"undefined"!=typeof document&&("loading"!==document.readyState?ee():document.addEventListener("DOMContentLoaded",ee)),"undefined"!=typeof document&&window.visualViewport;var en=r(65897),ei=r(3175),eo=r(9975);let es=D.createContext(null),ea=null;function el(e){var t,r,n;let i,o,{children:s,contain:a,restoreFocus:l,autoFocus:u}=e,c=(0,D.useRef)(null),d=(0,D.useRef)(null),h=(0,D.useRef)([]),{parentNode:f}=(0,D.useContext)(es)||{},p=(0,D.useMemo)(()=>new ex({scopeRef:h}),[h]);z(()=>{let e=f||eE.root;if(eE.getTreeNode(e.scopeRef)&&ea&&!em(ea,e.scopeRef)){let t=eE.getTreeNode(ea);t&&(e=t)}e.addChild(p),eE.addNode(p)},[p,f]),z(()=>{let e=eE.getTreeNode(h);e&&(e.contain=!!a)},[a]),z(()=>{var e;let t=null===(e=c.current)||void 0===e?void 0:e.nextSibling,r=[];for(;t&&t!==d.current;)r.push(t),t=t.nextSibling;h.current=r},[s]),z(()=>{if(r||n)return;let e=t.current,i=H(e?e[0]:void 0),o=e=>{let r=e.target;ep(r,t.current)?ea=t:eg(r)||(ea=null)};return i.addEventListener("focusin",o,!1),null==e||e.forEach(e=>e.addEventListener("focusin",o,!1)),()=>{i.removeEventListener("focusin",o,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",o,!1))}},[t=h,r=l,n=a]),i=(0,D.useRef)(),o=(0,D.useRef)(),z(()=>{let e=h.current;if(!a){o.current&&(cancelAnimationFrame(o.current),o.current=void 0);return}let t=H(e?e[0]:void 0),r=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!ef(h)||e.isComposing)return;let r=t.activeElement,n=h.current;if(!n||!ep(r,n))return;let i=eb(eh(n),{tabbable:!0},n);if(!r)return;i.currentNode=r;let o=e.shiftKey?i.previousNode():i.nextNode();o||(i.currentNode=e.shiftKey?n[n.length-1].nextElementSibling:n[0].previousElementSibling,o=e.shiftKey?i.previousNode():i.nextNode()),e.preventDefault(),o&&ey(o,!0)},n=e=>{(!ea||em(ea,h))&&ep(e.target,h.current)?(ea=h,i.current=e.target):ef(h)&&!eg(e.target,h)?i.current?i.current.focus():ea&&ea.current&&ev(ea.current):ef(h)&&(i.current=e.target)},s=e=>{o.current&&cancelAnimationFrame(o.current),o.current=requestAnimationFrame(()=>{if(t.activeElement&&ef(h)&&!eg(t.activeElement,h)){if(ea=h,t.body.contains(e.target)){var r;i.current=e.target,null===(r=i.current)||void 0===r||r.focus()}else ea.current&&ev(ea.current)}})};return t.addEventListener("keydown",r,!1),t.addEventListener("focusin",n,!1),null==e||e.forEach(e=>e.addEventListener("focusin",n,!1)),null==e||e.forEach(e=>e.addEventListener("focusout",s,!1)),()=>{t.removeEventListener("keydown",r,!1),t.removeEventListener("focusin",n,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",n,!1)),null==e||e.forEach(e=>e.removeEventListener("focusout",s,!1))}},[h,a]),z(()=>()=>{o.current&&cancelAnimationFrame(o.current)},[o]),function(e,t,r){let n=(0,D.useRef)("undefined"!=typeof document?H(e.current?e.current[0]:void 0).activeElement:null);z(()=>{let n=e.current,i=H(n?n[0]:void 0);if(!t||r)return;let o=()=>{(!ea||em(ea,e))&&ep(i.activeElement,e.current)&&(ea=e)};return i.addEventListener("focusin",o,!1),null==n||n.forEach(e=>e.addEventListener("focusin",o,!1)),()=>{i.removeEventListener("focusin",o,!1),null==n||n.forEach(e=>e.removeEventListener("focusin",o,!1))}},[e,r]),z(()=>{let n=H(e.current?e.current[0]:void 0);if(!t)return;let i=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!ef(e)||t.isComposing)return;let r=n.activeElement;if(!ep(r,e.current))return;let i=eE.getTreeNode(e);if(!i)return;let o=i.nodeToRestore,s=eb(n.body,{tabbable:!0});s.currentNode=r;let a=t.shiftKey?s.previousNode():s.nextNode();if(o&&n.body.contains(o)&&o!==n.body||(o=void 0,i.nodeToRestore=void 0),(!a||!ep(a,e.current))&&o){s.currentNode=o;do a=t.shiftKey?s.previousNode():s.nextNode();while(ep(a,e.current));(t.preventDefault(),t.stopPropagation(),a)?ey(a,!0):eg(o)?ey(o,!0):r.blur()}};return r||n.addEventListener("keydown",i,!0),()=>{r||n.removeEventListener("keydown",i,!0)}},[e,t,r]),z(()=>{var r;let i=H(e.current?e.current[0]:void 0);if(!t)return;let o=eE.getTreeNode(e);if(o)return o.nodeToRestore=null!==(r=n.current)&&void 0!==r?r:void 0,()=>{let r=eE.getTreeNode(e);if(!r)return;let n=r.nodeToRestore;if(t&&n&&(ep(i.activeElement,e.current)||i.activeElement===i.body&&function(e){let t=eE.getTreeNode(ea);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(null==t?void 0:t.scopeRef)===e}(e))){let t=eE.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let r=t.getTreeNode(e);for(;r;){if(r.nodeToRestore&&r.nodeToRestore.isConnected){ey(r.nodeToRestore);return}r=r.parent}for(r=t.getTreeNode(e);r;){if(r.scopeRef&&r.scopeRef.current&&eE.getTreeNode(r.scopeRef)){ev(r.scopeRef.current,!0);return}r=r.parent}}})}}},[e,t])}(h,l,a),function(e,t){let r=D.useRef(t);(0,D.useEffect)(()=>{r.current&&(ea=e,!ep(H(e.current?e.current[0]:void 0).activeElement,ea.current)&&e.current&&ev(e.current)),r.current=!1},[e])}(h,u),(0,D.useEffect)(()=>{let e=H(h.current?h.current[0]:void 0).activeElement,t=null;if(ep(e,h.current)){for(let r of eE.traverse())r.scopeRef&&ep(e,r.scopeRef.current)&&(t=r);t===eE.getTreeNode(h)&&(ea=t.scopeRef)}},[h]),z(()=>()=>{var e,t,r;let n=null!==(r=null===(t=eE.getTreeNode(h))||void 0===t?void 0:null===(e=t.parent)||void 0===e?void 0:e.scopeRef)&&void 0!==r?r:null;(h===ea||em(h,ea))&&(!n||eE.getTreeNode(n))&&(ea=n),eE.removeTreeNode(h)},[h]);let g=(0,D.useMemo)(()=>({focusNext(e={}){let t=h.current,{from:r,tabbable:n,wrap:i,accept:o}=e,s=r||H(t[0]).activeElement,a=t[0].previousElementSibling,l=eb(eh(t),{tabbable:n,accept:o},t);l.currentNode=ep(s,t)?s:a;let u=l.nextNode();return!u&&i&&(l.currentNode=a,u=l.nextNode()),u&&ey(u,!0),u},focusPrevious(e={}){let t=h.current,{from:r,tabbable:n,wrap:i,accept:o}=e,s=r||H(t[0]).activeElement,a=t[t.length-1].nextElementSibling,l=eb(eh(t),{tabbable:n,accept:o},t);l.currentNode=ep(s,t)?s:a;let u=l.previousNode();return!u&&i&&(l.currentNode=a,u=l.previousNode()),u&&ey(u,!0),u},focusFirst(e={}){let t=h.current,{tabbable:r,accept:n}=e,i=eb(eh(t),{tabbable:r,accept:n},t);i.currentNode=t[0].previousElementSibling;let o=i.nextNode();return o&&ey(o,!0),o},focusLast(e={}){let t=h.current,{tabbable:r,accept:n}=e,i=eb(eh(t),{tabbable:r,accept:n},t);i.currentNode=t[t.length-1].nextElementSibling;let o=i.previousNode();return o&&ey(o,!0),o}}),[]),m=(0,D.useMemo)(()=>({focusManager:g,parentNode:p}),[p,g]);return D.createElement(es.Provider,{value:m},D.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:c}),s,D.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:d}))}let eu=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],ec=eu.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";eu.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let ed=eu.join(':not([hidden]):not([tabindex="-1"]),');function eh(e){return e[0].parentElement}function ef(e){let t=eE.getTreeNode(ea);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function ep(e,t){return!!e&&!!t&&t.some(t=>t.contains(e))}function eg(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:r}of eE.traverse(eE.getTreeNode(t)))if(r&&ep(e,r.current))return!0;return!1}function em(e,t){var r;let n=null===(r=eE.getTreeNode(t))||void 0===r?void 0:r.parent;for(;n;){if(n.scopeRef===e)return!0;n=n.parent}return!1}function ey(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch(e){}}else try{!function(e){let t=H(e);if("virtual"===(0,eo.Jz)()){var r;let n=t.activeElement;r=()=>{t.activeElement===n&&e.isConnected&&Z(e)},requestAnimationFrame(()=>{0===X.size?r():Q.add(r)})}else Z(e)}(e)}catch(e){}}function ev(e,t=!0){let r=e[0].previousElementSibling,n=eh(e),i=eb(n,{tabbable:t},e);i.currentNode=r;let o=i.nextNode();t&&!o&&((i=eb(n=eh(e),{tabbable:!1},e)).currentNode=r,o=i.nextNode()),ey(o)}function eb(e,t,r){let n=(null==t?void 0:t.tabbable)?ed:ec,i=H(e).createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(e){var i;return(null==t?void 0:null===(i=t.from)||void 0===i?void 0:i.contains(e))?NodeFilter.FILTER_REJECT:e.matches(n)&&function e(t,r){return"#comment"!==t.nodeName&&function(e){let t=q(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:r,visibility:n}=e.style,i="none"!==r&&"hidden"!==n&&"collapse"!==n;if(i){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:r,visibility:n}=t(e);i="none"!==r&&"hidden"!==n&&"collapse"!==n}return i}(t)&&!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&("DETAILS"!==t.nodeName||!r||"SUMMARY"===r.nodeName||t.hasAttribute("open"))&&(!t.parentElement||e(t.parentElement,t))}(e)&&(!r||ep(e,r))&&(!(null==t?void 0:t.accept)||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return(null==t?void 0:t.from)&&(i.currentNode=t.from),i}class ew{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,r){let n=this.fastMap.get(null!=t?t:null);if(!n)return;let i=new ex({scopeRef:e});n.addChild(i),i.parent=n,this.fastMap.set(e,i),r&&(i.nodeToRestore=r)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(null===e)return;let t=this.fastMap.get(e);if(!t)return;let r=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&ep(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let n=t.children;r&&(r.removeChild(t),n.size>0&&n.forEach(e=>r&&r.addChild(e))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(null!=e.scopeRef&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){var e,t;let r=new ew;for(let n of this.traverse())r.addTreeNode(n.scopeRef,null!==(t=null===(e=n.parent)||void 0===e?void 0:e.scopeRef)&&void 0!==t?t:null,n.nodeToRestore);return r}constructor(){this.fastMap=new Map,this.root=new ex({scopeRef:null}),this.fastMap.set(null,this.root)}}class ex{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}let eE=new ew;var ek=r(48098);function eS(e,t){if(e.button>0)return!1;if(e.target){let t=e.target.ownerDocument;if(!t||!t.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return t.current&&!t.current.contains(e.target)}var eT=r(44971),eM=r(4942);function eA({children:e}){let t=(0,D.useMemo)(()=>({register:()=>{}}),[]);return D.createElement(eM.O.Provider,{value:t},e)}var eP=r(73935);let eC={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function e_(e){let{children:t,elementType:r="div",isFocusable:n,style:i,...o}=e,{visuallyHiddenProps:s}=function(e={}){let{style:t,isFocusable:r}=e,[n,i]=(0,D.useState)(!1),{focusWithinProps:o}=(0,eT.L)({isDisabled:!r,onFocusWithinChange:e=>i(e)}),s=(0,D.useMemo)(()=>n?t:t?{...eC,...t}:eC,[n]);return{visuallyHiddenProps:{...o,style:s}}}(e);return D.createElement(r,function(...e){let t={...e[0]};for(let r=1;r<e.length;r++){let n=e[r];for(let e in n){let r=t[e],i=n[e];"function"==typeof r&&"function"==typeof i&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=$(r,i):("className"===e||"UNSAFE_className"===e)&&"string"==typeof r&&"string"==typeof i?t[e]=(0,U.Z)(r,i):"id"===e&&r&&i?t.id=function(e,t){if(e===t)return e;let r=W.get(e);if(r)return r(t),t;let n=W.get(t);return n?(n(e),e):t}(r,i):t[e]=void 0!==i?i:r}}return t}(o,s),t)}let eI={top:"top",bottom:"top",left:"left",right:"left"},eO={top:"bottom",bottom:"top",left:"right",right:"left"},eL={top:"left",left:"top"},eR={top:"height",left:"width"},ej={width:"totalWidth",height:"totalHeight"},eB={},eN="undefined"!=typeof document&&window.visualViewport;function eD(e){let t=0,r=0,n=0,i=0,o=0,s=0,a={},l=(null==eN?void 0:eN.scale)>1;if("BODY"===e.tagName){var u,c;let l=document.documentElement;n=l.clientWidth,i=l.clientHeight,t=null!==(u=null==eN?void 0:eN.width)&&void 0!==u?u:n,r=null!==(c=null==eN?void 0:eN.height)&&void 0!==c?c:i,a.top=l.scrollTop||e.scrollTop,a.left=l.scrollLeft||e.scrollLeft,eN&&(o=eN.offsetTop,s=eN.offsetLeft)}else({width:t,height:r,top:o,left:s}=eW(e)),a.top=e.scrollTop,a.left=e.scrollLeft,n=t,i=r;return J(/AppleWebKit/i)&&!J(/Chrome/i)&&("BODY"===e.tagName||"HTML"===e.tagName)&&l&&(a.top=0,a.left=0,o=eN.pageTop,s=eN.pageLeft),{width:t,height:r,totalWidth:n,totalHeight:i,scroll:a,top:o,left:s}}function eK(e,t,r,n,i,o,s){let a=i.scroll[e],l=n[eR[e]],u=n.scroll[eI[e]]+o,c=l+n.scroll[eI[e]]-o,d=t-a+s[e]-n[eI[e]],h=t-a+r+s[e]-n[eI[e]];return d<u?u-d:h>c?Math.max(c-h,u-d):0}function eU(e){if(eB[e])return eB[e];let[t,r]=e.split(" "),n=eI[t]||"right",i=eL[n];eI[r]||(r="center");let o=eR[n],s=eR[i];return eB[e]={placement:t,crossPlacement:r,axis:n,crossAxis:i,size:o,crossSize:s},eB[e]}function ez(e,t,r,n,i,o,s,a,l,u){let{placement:c,crossPlacement:d,axis:h,crossAxis:f,size:p,crossSize:g}=n,m={};m[f]=e[f],"center"===d?m[f]+=(e[g]-r[g])/2:d!==f&&(m[f]+=e[g]-r[g]),m[f]+=o;let y=e[f]-r[g]+l+u,v=e[f]+e[g]-l-u;if(m[f]=(0,en.uZ)(m[f],y,v),c===h){let r=a?s[p]:t[ej[p]];m[eO[h]]=Math.floor(r-e[h]+i)}else m[h]=Math.floor(e[h]+e[p]+i);return m}function eF(e,t,r,n,i,o){let{placement:s,axis:a,size:l}=o;return s===a?Math.max(0,r[a]-e[a]-e.scroll[a]+t[a]-n[a]-n[eO[a]]-i):Math.max(0,e[l]+e[a]+e.scroll[a]-t[a]-r[a]-r[l]-n[a]-n[eO[a]]-i)}function eW(e){let{top:t,left:r,width:n,height:i}=e.getBoundingClientRect(),{scrollTop:o,scrollLeft:s,clientTop:a,clientLeft:l}=document.documentElement;return{top:t+o-a,left:r+s-l,width:n,height:i}}function eV(e,t){let r,n=window.getComputedStyle(e);if("fixed"===n.position){let{top:t,left:n,width:i,height:o}=e.getBoundingClientRect();r={top:t,left:n,width:i,height:o}}else{r=eW(e);let n=eW(t),i=window.getComputedStyle(t);n.top+=(parseInt(i.borderTopWidth,10)||0)-t.scrollTop,n.left+=(parseInt(i.borderLeftWidth,10)||0)-t.scrollLeft,r.top-=n.top,r.left-=n.left}return r.top-=parseInt(n.marginTop,10)||0,r.left-=parseInt(n.marginLeft,10)||0,r}function e$(e){let t=window.getComputedStyle(e);return"none"!==t.transform||/transform|perspective/.test(t.willChange)||"none"!==t.filter||"paint"===t.contain||"backdropFilter"in t&&"none"!==t.backdropFilter||"WebkitBackdropFilter"in t&&"none"!==t.WebkitBackdropFilter}let eH=new WeakMap,eq="undefined"!=typeof document&&window.visualViewport;function eZ(e){var t;let{direction:r}=(0,ei.bU)(),{arrowSize:n=0,targetRef:i,overlayRef:o,scrollRef:s=o,placement:a="bottom",containerPadding:l=12,shouldFlip:u=!0,boundaryElement:c="undefined"!=typeof document?document.body:null,offset:d=0,crossOffset:h=0,shouldUpdatePosition:f=!0,isOpen:p=!0,onClose:g,maxHeight:m,arrowBoundaryOffset:y=0}=e,[v,b]=(0,D.useState)({position:{},arrowOffsetLeft:void 0,arrowOffsetTop:void 0,maxHeight:void 0,placement:void 0}),w=[f,a,o.current,i.current,s.current,l,u,c,d,h,p,r,m,y,n],x=(0,D.useRef)(null==eq?void 0:eq.scale);(0,D.useEffect)(()=>{p&&(x.current=null==eq?void 0:eq.scale)},[p]);let E=(0,D.useCallback)(()=>{if(!1===f||!p||!o.current||!i.current||!s.current||!c||(null==eq?void 0:eq.scale)!==x.current)return;!m&&o.current&&(o.current.style.maxHeight="none");let e=function(e){let t,{placement:r,targetNode:n,overlayNode:i,scrollNode:o,padding:s,shouldFlip:a,boundaryElement:l,offset:u,crossOffset:c,maxHeight:d,arrowSize:h=0,arrowBoundaryOffset:f=0}=e,p=i instanceof HTMLElement?function(e){let t=e.offsetParent;if(t&&t===document.body&&"static"===window.getComputedStyle(t).position&&!e$(t)&&(t=document.documentElement),null==t)for(t=e.parentElement;t&&!e$(t);)t=t.parentElement;return t||document.documentElement}(i):document.documentElement,g=p===document.documentElement,m=window.getComputedStyle(p).position,y=g?eW(n):eV(n,p);if(!g){let{marginTop:e,marginLeft:t}=window.getComputedStyle(n);y.top+=parseInt(e,10)||0,y.left+=parseInt(t,10)||0}let v=eW(i),b={top:parseInt((t=window.getComputedStyle(i)).marginTop,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0,right:parseInt(t.marginRight,10)||0};v.width+=b.left+b.right,v.height+=b.top+b.bottom;let w={top:o.scrollTop,left:o.scrollLeft,width:o.scrollWidth,height:o.scrollHeight},x=eD(l),E=eD(p),k="BODY"===l.tagName?eW(p):eV(p,l);return"HTML"===p.tagName&&"BODY"===l.tagName&&(E.scroll.top=0,E.scroll.left=0),function(e,t,r,n,i,o,s,a,l,u,c,d,h,f,p,g){let m=eU(e),{size:y,crossAxis:v,crossSize:b,placement:w,crossPlacement:x}=m,E=ez(t,a,r,m,c,d,u,h,p,g),k=c,S=eF(a,u,t,i,o+c,m);if(s&&n[y]>S){let e=eU(`${eO[w]} ${x}`),n=ez(t,a,r,e,c,d,u,h,p,g);eF(a,u,t,i,o+c,e)>S&&(m=e,E=n,k=c)}let T="bottom";"top"===m.axis?"top"===m.placement?T="top":"bottom"===m.placement&&(T="bottom"):"top"===m.crossAxis&&("top"===m.crossPlacement?T="bottom":"bottom"===m.crossPlacement&&(T="top"));let M=eK(v,E[v],r[b],a,l,o,u);E[v]+=M;let A=function(e,t,r,n,i,o,s,a){let l=n?r.height:t[ej.height],u=null!=e.top?r.top+e.top:r.top+(l-e.bottom-s),c="top"!==a?Math.max(0,t.height+t.top+t.scroll.top-u-(i.top+i.bottom+o)):Math.max(0,u+s-(t.top+t.scroll.top)-(i.top+i.bottom+o));return Math.min(t.height-2*o,c)}(E,a,u,h,i,o,r.height,T);f&&f<A&&(A=f),r.height=Math.min(r.height,A),M=eK(v,(E=ez(t,a,r,m,k,d,u,h,p,g))[v],r[b],a,l,o,u),E[v]+=M;let P={},C=t[v]+.5*t[b]-r[v],_=p/2+g,I=r[b]-p/2-g,O=t[v]-r[v]+p/2,L=t[v]+t[b]-r[v]-p/2,R=(0,en.uZ)(C,O,L);return P[v]=(0,en.uZ)(R,_,I),{position:E,maxHeight:A,arrowOffsetLeft:P.left,arrowOffsetTop:P.top,placement:m.placement}}(r,y,v,w,b,s,a,x,E,k,u,c,!!m&&"static"!==m,d,h,f)}({placement:"rtl"===r?a.replace("start","right").replace("end","left"):a.replace("start","left").replace("end","right"),overlayNode:o.current,targetNode:i.current,scrollNode:s.current,padding:l,shouldFlip:u,boundaryElement:c,offset:d,crossOffset:h,maxHeight:m,arrowSize:n,arrowBoundaryOffset:y});Object.keys(e.position).forEach(t=>o.current.style[t]=e.position[t]+"px"),o.current.style.maxHeight=null!=e.maxHeight?e.maxHeight+"px":void 0,b(e)},w);z(E,w),z(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t=E]),function(e){let{ref:t,onResize:r}=e;(0,D.useEffect)(()=>{let e=null==t?void 0:t.current;if(e){if(!(void 0!==window.ResizeObserver))return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)};{let t=new window.ResizeObserver(e=>{e.length&&r()});return t.observe(e),()=>{e&&t.unobserve(e)}}}},[r,t])}({ref:o,onResize:E});let k=(0,D.useRef)(!1);z(()=>{let e;let t=()=>{k.current=!0,clearTimeout(e),e=setTimeout(()=>{k.current=!1},500),E()},r=()=>{k.current&&t()};return null==eq||eq.addEventListener("resize",t),null==eq||eq.addEventListener("scroll",r),()=>{null==eq||eq.removeEventListener("resize",t),null==eq||eq.removeEventListener("scroll",r)}},[E]);let S=(0,D.useCallback)(()=>{k.current||g()},[g,k]);return!function(e){let{triggerRef:t,isOpen:r,onClose:n}=e;(0,D.useEffect)(()=>{if(!r||null===n)return;let e=e=>{let r=e.target;if(!t.current||r instanceof Node&&!r.contains(t.current))return;let i=n||eH.get(t.current);i&&i()};return window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("scroll",e,!0)}},[r,n,t])}({triggerRef:i,isOpen:p,onClose:g&&S}),{overlayProps:{style:{position:"absolute",zIndex:1e5,...v.position,maxHeight:v.maxHeight}},placement:v.placement,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:v.arrowOffsetLeft,top:v.arrowOffsetTop}},updatePosition:E}}let eG=[];function eJ(e,t){let{onClose:r,shouldCloseOnBlur:n,isOpen:i,isDismissable:o=!1,isKeyboardDismissDisabled:s=!1,shouldCloseOnInteractOutside:a}=e;(0,D.useEffect)(()=>(i&&eG.push(t),()=>{let e=eG.indexOf(t);e>=0&&eG.splice(e,1)}),[i,t]);let l=()=>{eG[eG.length-1]===t&&r&&r()};!function(e){let{ref:t,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:i}=e,o=(0,D.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),s=(0,ek.iW)(e=>{r&&eS(e,t)&&(i&&i(e),o.current.isPointerDown=!0)}),a=(0,ek.iW)(e=>{r&&r(e)});(0,D.useEffect)(()=>{let e=o.current;if(n)return;let r=t.current,i=(0,ek.r3)(r);if("undefined"!=typeof PointerEvent){let r=r=>{e.isPointerDown&&eS(r,t)&&a(r),e.isPointerDown=!1};return i.addEventListener("pointerdown",s,!0),i.addEventListener("pointerup",r,!0),()=>{i.removeEventListener("pointerdown",s,!0),i.removeEventListener("pointerup",r,!0)}}{let r=r=>{e.ignoreEmulatedMouseEvents?e.ignoreEmulatedMouseEvents=!1:e.isPointerDown&&eS(r,t)&&a(r),e.isPointerDown=!1},n=r=>{e.ignoreEmulatedMouseEvents=!0,e.isPointerDown&&eS(r,t)&&a(r),e.isPointerDown=!1};return i.addEventListener("mousedown",s,!0),i.addEventListener("mouseup",r,!0),i.addEventListener("touchstart",s,!0),i.addEventListener("touchend",n,!0),()=>{i.removeEventListener("mousedown",s,!0),i.removeEventListener("mouseup",r,!0),i.removeEventListener("touchstart",s,!0),i.removeEventListener("touchend",n,!0)}}},[t,n,s,a])}({ref:t,onInteractOutside:o&&i?e=>{(!a||a(e.target))&&(eG[eG.length-1]===t&&(e.stopPropagation(),e.preventDefault()),l())}:null,onInteractOutsideStart:e=>{(!a||a(e.target))&&eG[eG.length-1]===t&&(e.stopPropagation(),e.preventDefault())}});let{focusWithinProps:u}=(0,eT.L)({isDisabled:!n,onBlurWithin:e=>{!(!e.relatedTarget||eg(e.relatedTarget,ea))&&(!a||a(e.relatedTarget))&&r()}});return{overlayProps:{onKeyDown:e=>{"Escape"!==e.key||s||(e.stopPropagation(),e.preventDefault(),l())},...u},underlayProps:{onPointerDown:e=>{e.target===e.currentTarget&&e.preventDefault()}}}}function eY(e,t,r){let n,{type:i}=e,{isOpen:o}=t;(0,D.useEffect)(()=>{r&&r.current&&eH.set(r.current,t.close)}),"menu"===i?n=!0:"listbox"===i&&(n="listbox");let s=V();return{triggerProps:{"aria-haspopup":n,"aria-expanded":o,"aria-controls":o?s:null,onPress:t.toggle},overlayProps:{id:s}}}let eX="undefined"!=typeof document&&window.visualViewport,eQ=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),e0=0;function e1(e={}){let{isDisabled:t}=e;z(()=>{if(!t){let e,t,r,i,o;return 1==++e0&&(n=Y(/^iPhone/i)||Y(/^iPad/i)||Y(/^Mac/i)&&navigator.maxTouchPoints>1?(r=null,i=()=>{if(r)return;let e=window.pageXOffset,t=window.pageYOffset;r=$(e5(window,"scroll",()=>{window.scrollTo(0,0)}),e2(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),e2(document.documentElement,"overflow","hidden"),e2(document.body,"marginTop",`-${t}px`),()=>{window.scrollTo(e,t)}),window.scrollTo(0,0)},o=$(e5(document,"touchstart",r=>{((e=et(r.target,!0))!==document.documentElement||e!==document.body)&&e instanceof HTMLElement&&"auto"===window.getComputedStyle(e).overscrollBehavior&&(t=e2(e,"overscrollBehavior","contain"))},{passive:!1,capture:!0}),e5(document,"touchmove",t=>{if(!e||e===document.documentElement||e===document.body){t.preventDefault();return}e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&t.preventDefault()},{passive:!1,capture:!0}),e5(document,"touchend",e=>{let r=e.target;e3(r)&&r!==document.activeElement&&(e.preventDefault(),i(),r.style.transform="translateY(-2000px)",r.focus(),requestAnimationFrame(()=>{r.style.transform=""})),t&&t()},{passive:!1,capture:!0}),e5(document,"focus",e=>{let t=e.target;e3(t)&&(i(),t.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{t.style.transform="",eX&&(eX.height<window.innerHeight?requestAnimationFrame(()=>{e6(t)}):eX.addEventListener("resize",()=>e6(t),{once:!0}))}))},!0)),()=>{null==t||t(),null==r||r(),o()}):$(e2(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),e2(document.documentElement,"overflow","hidden"))),()=>{0==--e0&&n()}}},[t])}function e2(e,t,r){let n=e.style[t];return e.style[t]=r,()=>{e.style[t]=n}}function e5(e,t,r,n){return e.addEventListener(t,r,n),()=>{e.removeEventListener(t,r,n)}}function e6(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=et(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let r=t.getBoundingClientRect().top,n=e.getBoundingClientRect().top;n>r+e.clientHeight&&(t.scrollTop+=n-r)}e=t.parentElement}}function e3(e){return e instanceof HTMLInputElement&&!eQ.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}let e4=D.createContext(null);function e8(e){let{children:t}=e,r=(0,D.useContext)(e4),[n,i]=(0,D.useState)(0),o=(0,D.useMemo)(()=>({parent:r,modalCount:n,addModal(){i(e=>e+1),r&&r.addModal()},removeModal(){i(e=>e-1),r&&r.removeModal()}}),[r,n]);return D.createElement(e4.Provider,{value:o},t)}function e7(e){let t;let{modalProviderProps:r}={modalProviderProps:{"aria-hidden":!!(t=(0,D.useContext)(e4))&&t.modalCount>0||null}};return D.createElement("div",{"data-overlay-container":!0,...e,...r})}function e9(e){return D.createElement(e8,null,D.createElement(e7,e))}function te(e){let t=(0,K.Av)(),{portalContainer:r=t?null:document.body,...n}=e;if(D.useEffect(()=>{if(null==r?void 0:r.closest("[data-overlay-container]"))throw Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.")},[r]),!r)return null;let i=D.createElement(e9,n);return eP.createPortal(i,r)}var tt={};function tr(e){var t;let{onDismiss:r,...n}=e,i=function(e,t){let{id:r,"aria-label":n,"aria-labelledby":i}=e;return r=V(r),i&&n?i=[...new Set([r,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),n||i||!t||(n=t),{id:r,"aria-label":n,"aria-labelledby":i}}(n,(0,ei.qb)((t=tt)&&t.__esModule?t.default:t,"@react-aria/overlays").format("dismiss"));return D.createElement(e_,null,D.createElement("button",{...i,tabIndex:-1,onClick:()=>{r&&r()},style:{width:1,height:1}}))}tt={"ar-AE":i,"bg-BG":o,"cs-CZ":s,"da-DK":a,"de-DE":l,"el-GR":u,"en-US":c,"es-ES":d,"et-EE":h,"fi-FI":f,"fr-FR":p,"he-IL":g,"hr-HR":m,"hu-HU":y,"it-IT":v,"ja-JP":b,"ko-KR":w,"lt-LT":x,"lv-LV":E,"nb-NO":k,"nl-NL":S,"pl-PL":T,"pt-BR":M,"pt-PT":A,"ro-RO":P,"ru-RU":C,"sk-SK":_,"sl-SI":I,"sr-SP":O,"sv-SE":L,"tr-TR":R,"uk-UA":j,"zh-CN":B,"zh-TW":N};let tn=new WeakMap,ti=[];function to(e,t=document.body){let r=new Set(e),n=new Set,i=e=>{for(let t of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))r.add(t);let t=e=>{if(r.has(e)||n.has(e.parentElement)&&"row"!==e.parentElement.getAttribute("role"))return NodeFilter.FILTER_REJECT;for(let t of r)if(e.contains(t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),s=t(e);if(s===NodeFilter.FILTER_ACCEPT&&o(e),s!==NodeFilter.FILTER_REJECT){let e=i.nextNode();for(;null!=e;)o(e),e=i.nextNode()}},o=e=>{var t;let r=null!==(t=tn.get(e))&&void 0!==t?t:0;("true"!==e.getAttribute("aria-hidden")||0!==r)&&(0===r&&e.setAttribute("aria-hidden","true"),n.add(e),tn.set(e,r+1))};ti.length&&ti[ti.length-1].disconnect(),i(t);let s=new MutationObserver(e=>{for(let t of e)if("childList"===t.type&&0!==t.addedNodes.length&&![...r,...n].some(e=>e.contains(t.target))){for(let e of t.removedNodes)e instanceof Element&&(r.delete(e),n.delete(e));for(let e of t.addedNodes)(e instanceof HTMLElement||e instanceof SVGElement)&&("true"===e.dataset.liveAnnouncer||"true"===e.dataset.reactAriaTopLayer)?r.add(e):e instanceof Element&&i(e)}});s.observe(t,{childList:!0,subtree:!0});let a={observe(){s.observe(t,{childList:!0,subtree:!0})},disconnect(){s.disconnect()}};return ti.push(a),()=>{for(let e of(s.disconnect(),n)){let t=tn.get(e);1===t?(e.removeAttribute("aria-hidden"),tn.delete(e)):tn.set(e,t-1)}a===ti[ti.length-1]?(ti.pop(),ti.length&&ti[ti.length-1].observe()):ti.splice(ti.indexOf(a),1)}}let ts=D.createContext(null);function ta(e){let t=(0,K.Av)(),{portalContainer:r=t?null:document.body,isExiting:n}=e,[i,o]=(0,D.useState)(!1),s=(0,D.useMemo)(()=>({contain:i,setContain:o}),[i,o]);if(!r)return null;let a=e.children;return e.disableFocusManagement||(a=D.createElement(el,{restoreFocus:!0,contain:i&&!n},a)),a=D.createElement(ts.Provider,{value:s},D.createElement(eA,null,a)),eP.createPortal(a,r)}function tl(){let e=(0,D.useContext)(ts),t=null==e?void 0:e.setContain;z(()=>{null==t||t(!0)},[t])}},75081:function(e,t,r){"use strict";r.d(t,{dp:function(){return $},gq:function(){return z},Cs:function(){return F},_t:function(){return H},ip:function(){return U}});var n=r(73935),i=r(67294),o=r(90512);let s="undefined"!=typeof document?i.useLayoutEffect:()=>{};"undefined"!=typeof window&&window.document&&window.document.createElement;let a=new Map,l=e=>{var t;return null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document},u=e=>e&&"window"in e&&e.window===e?e:l(e).defaultView||window;function c(...e){let t={...e[0]};for(let r=1;r<e.length;r++){let n=e[r];for(let e in n){let r=t[e],i=n[e];"function"==typeof r&&"function"==typeof i&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=function(...e){return(...t)=>{for(let r of e)"function"==typeof r&&r(...t)}}(r,i):("className"===e||"UNSAFE_className"===e)&&"string"==typeof r&&"string"==typeof i?t[e]=(0,o.Z)(r,i):"id"===e&&r&&i?t.id=function(e,t){if(e===t)return e;let r=a.get(e);if(r)return r(t),t;let n=a.get(t);return n?(n(e),e):t}(r,i):t[e]=void 0!==i?i:r}}return t}function d(e){if(function(){if(null==h){h=!1;try{document.createElement("div").focus({get preventScroll(){return h=!0,!0}})}catch(e){}}return h}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==n;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}(e);e.focus(),function(e){for(let{element:t,scrollTop:r,scrollLeft:n}of e)t.scrollTop=r,t.scrollLeft=n}(t)}}let h=null;function f(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands.some(t=>e.test(t.brand)))||e.test(window.navigator.userAgent))}function p(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function g(){return p(/^Mac/i)}function m(){return p(/^iPad/i)||g()&&navigator.maxTouchPoints>1}let y=(0,i.createContext)({isNative:!0,open:function(e,t){!function(e,t){if(e instanceof HTMLAnchorElement)t(e);else if(e.hasAttribute("data-href")){let r=document.createElement("a");r.href=e.getAttribute("data-href"),e.hasAttribute("data-target")&&(r.target=e.getAttribute("data-target")),e.hasAttribute("data-rel")&&(r.rel=e.getAttribute("data-rel")),e.hasAttribute("data-download")&&(r.download=e.getAttribute("data-download")),e.hasAttribute("data-ping")&&(r.ping=e.getAttribute("data-ping")),e.hasAttribute("data-referrer-policy")&&(r.referrerPolicy=e.getAttribute("data-referrer-policy")),e.appendChild(r),t(r),e.removeChild(r)}}(e,e=>b(e,t))}});function v(){return(0,i.useContext)(y)}function b(e,t,r=!0){var n,i;let{metaKey:o,ctrlKey:s,altKey:a,shiftKey:l}=t;f(/Firefox/i)&&(null===(i=window.event)||void 0===i?void 0:null===(n=i.type)||void 0===n?void 0:n.startsWith("key"))&&"_blank"===e.target&&(g()?o=!0:s=!0);let u=f(/AppleWebKit/i)&&!f(/Chrome/i)&&g()&&!m()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:s,altKey:a,shiftKey:l}):new MouseEvent("click",{metaKey:o,ctrlKey:s,altKey:a,shiftKey:l,bubbles:!0,cancelable:!0});b.isOpening=r,d(e),e.dispatchEvent(u),b.isOpening=!1}b.isOpening=!1;let w=new Map,x=new Set;function E(){if("undefined"==typeof window)return;function e(e){return"propertyName"in e}let t=r=>{if(!e(r)||!r.target)return;let n=w.get(r.target);if(n&&(n.delete(r.propertyName),0===n.size&&(r.target.removeEventListener("transitioncancel",t),w.delete(r.target)),0===w.size)){for(let e of x)e();x.clear()}};document.body.addEventListener("transitionrun",r=>{if(!e(r)||!r.target)return;let n=w.get(r.target);n||(n=new Set,w.set(r.target,n),r.target.addEventListener("transitioncancel",t,{once:!0})),n.add(r.propertyName)}),document.body.addEventListener("transitionend",t)}function k(e,t){let r=e;for(S(r,t)&&(r=r.parentElement);r&&!S(r,t);)r=r.parentElement;return r||document.scrollingElement||document.documentElement}function S(e,t){let r=window.getComputedStyle(e),n=/(auto|scroll)/.test(r.overflow+r.overflowX+r.overflowY);return n&&t&&(n=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),n}function T(e,t){let r=M(e,t,"left"),n=M(e,t,"top"),i=t.offsetWidth,o=t.offsetHeight,s=e.scrollLeft,a=e.scrollTop,{borderTopWidth:l,borderLeftWidth:u}=getComputedStyle(e),c=e.scrollLeft+parseInt(u,10),d=e.scrollTop+parseInt(l,10),h=c+e.clientWidth,f=d+e.clientHeight;r<=s?s=r-parseInt(u,10):r+i>h&&(s+=r+i-h),n<=d?a=n-parseInt(l,10):n+o>f&&(a+=n+o-f),e.scrollLeft=s,e.scrollTop=a}function M(e,t,r){let n="left"===r?"offsetLeft":"offsetTop",i=0;for(;t.offsetParent&&(i+=t[n],t.offsetParent!==e);){if(t.offsetParent.contains(e)){i-=e[n];break}t=t.offsetParent}return i}function A(e,t){if(document.contains(e)){let s=document.scrollingElement||document.documentElement;if("hidden"===window.getComputedStyle(s).overflow){let t=k(e);for(;e&&t&&e!==s&&t!==s;)T(t,e),t=k(e=t)}else{var r,n,i,o;let{left:s,top:a}=e.getBoundingClientRect();null==e||null===(r=e.scrollIntoView)||void 0===r||r.call(e,{block:"nearest"});let{left:l,top:u}=e.getBoundingClientRect();(Math.abs(s-l)>1||Math.abs(a-u)>1)&&(null==t||null===(i=t.containingElement)||void 0===i||null===(n=i.scrollIntoView)||void 0===n||n.call(i,{block:"center",inline:"center"}),null===(o=e.scrollIntoView)||void 0===o||o.call(e,{block:"nearest"}))}}}"undefined"!=typeof document&&("loading"!==document.readyState?E():document.addEventListener("DOMContentLoaded",E)),"undefined"!=typeof document&&window.visualViewport;let P=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],C=P.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";P.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let _=P.join(':not([hidden]):not([tabindex="-1"]),');class I{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,r){let n=this.fastMap.get(null!=t?t:null);if(!n)return;let i=new O({scopeRef:e});n.addChild(i),i.parent=n,this.fastMap.set(e,i),r&&(i.nodeToRestore=r)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(null===e)return;let t=this.fastMap.get(e);if(!t)return;let r=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&function(e,t){return!!e&&!!t&&t.some(t=>t.contains(e))}(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let n=t.children;r&&(r.removeChild(t),n.size>0&&n.forEach(e=>r&&r.addChild(e))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(null!=e.scopeRef&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){var e,t;let r=new I;for(let n of this.traverse())r.addTreeNode(n.scopeRef,null!==(t=null===(e=n.parent)||void 0===e?void 0:e.scopeRef)&&void 0!==t?t:null,n.nodeToRestore);return r}constructor(){this.fastMap=new Map,this.root=new O({scopeRef:null}),this.fastMap.set(null,this.root)}}class O{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}new I;var L=r(9975);function R(e){let t=l(e);if("virtual"===(0,L.Jz)()){var r;let n=t.activeElement;r=()=>{t.activeElement===n&&e.isConnected&&d(e)},requestAnimationFrame(()=>{0===w.size?r():x.add(r)})}else d(e)}var j=r(2317),B=r(51889),N=r(3175);function D(e){return g()||p(/^iPhone/i)||m()?e.altKey:e.ctrlKey}function K(e){return g()?e.metaKey:e.ctrlKey}function U(e){let{keyboardDelegate:t,selectionManager:r,onTypeSelect:n}=e,o=(0,i.useRef)({search:"",timeout:null}).current;return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?e=>{var i;let s=1!==(i=e.key).length&&/^[A-Z]/i.test(i)?"":i;if(!s||e.ctrlKey||e.metaKey||!e.currentTarget.contains(e.target))return;" "!==s||!(o.search.trim().length>0)||(e.preventDefault(),"continuePropagation"in e||e.stopPropagation()),o.search+=s;let a=t.getKeyForSearch(o.search,r.focusedKey);null==a&&(a=t.getKeyForSearch(o.search)),null!=a&&(r.setFocusedKey(a),n&&n(a)),clearTimeout(o.timeout),o.timeout=setTimeout(()=>{o.search=""},1e3)}:null}}}function z(e){var t,r,o;let a,h,f,{selectionManager:p,keyboardDelegate:g,ref:m,autoFocus:y=!1,shouldFocusWrap:b=!1,disallowEmptySelection:w=!1,disallowSelectAll:x=!1,selectOnFocus:E="replace"===p.selectionBehavior,disallowTypeAhead:k=!1,shouldUseVirtualFocus:S,allowsTabNavigation:M=!1,isVirtualized:P,scrollRef:I=m,linkBehavior:O="action"}=e,{direction:j}=(0,N.bU)(),B=v(),z=(0,i.useRef)({top:0,left:0});t="scroll",a=function(e){let t=(0,i.useRef)(null);return s(()=>{t.current=e},[e]),(0,i.useCallback)((...e)=>{let r=t.current;return null==r?void 0:r(...e)},[])}(r=P?null:()=>{z.current={top:I.current.scrollTop,left:I.current.scrollLeft}}),h=null==r,(0,i.useEffect)(()=>{if(h||!I.current)return;let e=I.current;return e.addEventListener(t,a,void 0),()=>{e.removeEventListener(t,a,o)}},[I,t,o,h,a]);let F=(0,i.useRef)(y);(0,i.useEffect)(()=>{if(F.current){let e=null;"first"===y&&(e=g.getFirstKey()),"last"===y&&(e=g.getLastKey());let t=p.selectedKeys;if(t.size){for(let r of t)if(p.canSelectItem(r)){e=r;break}}p.setFocused(!0),p.setFocusedKey(e),null!=e||S||R(m.current)}},[]);let W=(0,i.useRef)(p.focusedKey);(0,i.useEffect)(()=>{let e=(0,L.Jz)();if(p.isFocused&&null!=p.focusedKey&&(null==I?void 0:I.current)){let t=I.current.querySelector(`[data-key="${CSS.escape(p.focusedKey.toString())}"]`);t&&("keyboard"===e||F.current)&&(P||T(I.current,t),"virtual"!==e&&A(t,{containingElement:m.current}))}p.isFocused&&null==p.focusedKey&&null!=W.current&&R(m.current),W.current=p.focusedKey,F.current=!1},[P,I,p.focusedKey,p.isFocused,m]);let V={onKeyDown:e=>{var t,r,i,o,s,a,c,h,f,y;if(e.altKey&&"Tab"===e.key&&e.preventDefault(),!m.current.contains(e.target))return;let v=(t,r)=>{if(null!=t){if(p.isLink(t)&&"selection"===O&&E&&!D(e)){(0,n.flushSync)(()=>{p.setFocusedKey(t,r)});let i=I.current.querySelector(`[data-key="${CSS.escape(t.toString())}"]`);B.open(i,e);return}p.setFocusedKey(t,r),p.isLink(t)&&"override"===O||(e.shiftKey&&"multiple"===p.selectionMode?p.extendSelection(t):E&&!D(e)&&p.replaceSelection(t))}};switch(e.key){case"ArrowDown":if(g.getKeyBelow){e.preventDefault();let n=null!=p.focusedKey?g.getKeyBelow(p.focusedKey):null===(t=g.getFirstKey)||void 0===t?void 0:t.call(g);null==n&&b&&(n=null===(r=g.getFirstKey)||void 0===r?void 0:r.call(g,p.focusedKey)),v(n)}break;case"ArrowUp":if(g.getKeyAbove){e.preventDefault();let t=null!=p.focusedKey?g.getKeyAbove(p.focusedKey):null===(i=g.getLastKey)||void 0===i?void 0:i.call(g);null==t&&b&&(t=null===(o=g.getLastKey)||void 0===o?void 0:o.call(g,p.focusedKey)),v(t)}break;case"ArrowLeft":if(g.getKeyLeftOf){e.preventDefault();let t=g.getKeyLeftOf(p.focusedKey);null==t&&b&&(t="rtl"===j?null===(s=g.getFirstKey)||void 0===s?void 0:s.call(g,p.focusedKey):null===(a=g.getLastKey)||void 0===a?void 0:a.call(g,p.focusedKey)),v(t,"rtl"===j?"first":"last")}break;case"ArrowRight":if(g.getKeyRightOf){e.preventDefault();let t=g.getKeyRightOf(p.focusedKey);null==t&&b&&(t="rtl"===j?null===(c=g.getLastKey)||void 0===c?void 0:c.call(g,p.focusedKey):null===(h=g.getFirstKey)||void 0===h?void 0:h.call(g,p.focusedKey)),v(t,"rtl"===j?"last":"first")}break;case"Home":if(g.getFirstKey){e.preventDefault();let t=g.getFirstKey(p.focusedKey,K(e));p.setFocusedKey(t),K(e)&&e.shiftKey&&"multiple"===p.selectionMode?p.extendSelection(t):E&&p.replaceSelection(t)}break;case"End":if(g.getLastKey){e.preventDefault();let t=g.getLastKey(p.focusedKey,K(e));p.setFocusedKey(t),K(e)&&e.shiftKey&&"multiple"===p.selectionMode?p.extendSelection(t):E&&p.replaceSelection(t)}break;case"PageDown":g.getKeyPageBelow&&(e.preventDefault(),v(g.getKeyPageBelow(p.focusedKey)));break;case"PageUp":g.getKeyPageAbove&&(e.preventDefault(),v(g.getKeyPageAbove(p.focusedKey)));break;case"a":K(e)&&"multiple"===p.selectionMode&&!0!==x&&(e.preventDefault(),p.selectAll());break;case"Escape":e.preventDefault(),w||p.clearSelection();break;case"Tab":if(!M){if(e.shiftKey)m.current.focus();else{let e,t;let r,n,i=(f=m.current,e=(y={tabbable:!0}).tabbable?_:C,t=l(f).createTreeWalker(f,NodeFilter.SHOW_ELEMENT,{acceptNode(t){var r;return(null==y?void 0:null===(r=y.from)||void 0===r?void 0:r.contains(t))?NodeFilter.FILTER_REJECT:t.matches(e)&&function e(t,r){return"#comment"!==t.nodeName&&function(e){let t=u(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:r,visibility:n}=e.style,i="none"!==r&&"hidden"!==n&&"collapse"!==n;if(i){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:r,visibility:n}=t(e);i="none"!==r&&"hidden"!==n&&"collapse"!==n}return i}(t)&&!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&("DETAILS"!==t.nodeName||!r||"SUMMARY"===r.nodeName||t.hasAttribute("open"))&&(!t.parentElement||e(t.parentElement,t))}(t)&&(!(null==y?void 0:y.accept)||y.accept(t))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}}),(null==y?void 0:y.from)&&(t.currentNode=y.from),t);do(n=i.lastChild())&&(r=n);while(n);r&&!r.contains(document.activeElement)&&d(r)}}}},onFocus:e=>{if(p.isFocused){e.currentTarget.contains(e.target)||p.setFocused(!1);return}if(e.currentTarget.contains(e.target)){if(p.setFocused(!0),null==p.focusedKey){var t,r;let n=e=>{null!=e&&(p.setFocusedKey(e),E&&p.replaceSelection(e))},i=e.relatedTarget;i&&e.currentTarget.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_FOLLOWING?n(null!==(t=p.lastSelectedKey)&&void 0!==t?t:g.getLastKey()):n(null!==(r=p.firstSelectedKey)&&void 0!==r?r:g.getFirstKey())}else P||(I.current.scrollTop=z.current.top,I.current.scrollLeft=z.current.left);if(!P&&null!=p.focusedKey){let e=I.current.querySelector(`[data-key="${CSS.escape(p.focusedKey.toString())}"]`);e&&(e.contains(document.activeElement)||d(e),"keyboard"===(0,L.Jz)()&&A(e,{containingElement:m.current}))}}},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||p.setFocused(!1)},onMouseDown(e){I.current===e.target&&e.preventDefault()}},{typeSelectProps:$}=U({keyboardDelegate:g,selectionManager:p});return k||(V=c($,V)),S||(f=null==p.focusedKey?0:-1),{collectionProps:{...V,tabIndex:f}}}function F(e){let{selectionManager:t,key:r,ref:n,shouldSelectOnPressUp:o,shouldUseVirtualFocus:s,focus:a,isDisabled:l,onAction:u,allowsDifferentPressOrigin:d,linkBehavior:h="action"}=e,f=v(),p=e=>{if("keyboard"===e.pointerType&&D(e))t.toggleSelection(r);else{if("none"===t.selectionMode)return;if(t.isLink(r)){if("selection"===h){f.open(n.current,e),t.setSelectedKeys(t.selectedKeys);return}if("override"===h||"none"===h)return}"single"===t.selectionMode?t.isSelected(r)&&!t.disallowEmptySelection?t.toggleSelection(r):t.replaceSelection(r):e&&e.shiftKey?t.extendSelection(r):"toggle"===t.selectionBehavior||e&&(K(e)||"touch"===e.pointerType||"virtual"===e.pointerType)?t.toggleSelection(r):t.replaceSelection(r)}};(0,i.useEffect)(()=>{r===t.focusedKey&&t.isFocused&&!s&&(a?a():document.activeElement!==n.current&&R(n.current))},[n,r,t.focusedKey,t.childFocusStrategy,t.isFocused,s]),l=l||t.isDisabled(r);let g={};s||l?l&&(g.onMouseDown=e=>{e.preventDefault()}):g={tabIndex:r===t.focusedKey?0:-1,onFocus(e){e.target===n.current&&t.setFocusedKey(r)}};let m=t.isLink(r)&&"override"===h,y=t.isLink(r)&&"selection"!==h&&"none"!==h,w=!l&&t.canSelectItem(r)&&!m,x=(u||y)&&!l,E=x&&("replace"===t.selectionBehavior?!w:!w||t.isEmpty),k=x&&w&&"replace"===t.selectionBehavior,S=E||k,T=(0,i.useRef)(null),M=S&&w,A=(0,i.useRef)(!1),P=(0,i.useRef)(!1),C=e=>{u&&u(),y&&f.open(n.current,e)},_={};o?(_.onPressStart=e=>{T.current=e.pointerType,A.current=M,"keyboard"===e.pointerType&&(!S||V())&&p(e)},d?(_.onPressUp=E?null:e=>{"keyboard"!==e.pointerType&&w&&p(e)},_.onPress=E?C:null):_.onPress=e=>{E||k&&"mouse"!==e.pointerType?("keyboard"!==e.pointerType||W())&&C(e):"keyboard"!==e.pointerType&&w&&p(e)}):(_.onPressStart=e=>{T.current=e.pointerType,A.current=M,P.current=E,w&&("mouse"===e.pointerType&&!E||"keyboard"===e.pointerType&&(!x||V()))&&p(e)},_.onPress=e=>{("touch"===e.pointerType||"pen"===e.pointerType||"virtual"===e.pointerType||"keyboard"===e.pointerType&&S&&W()||"mouse"===e.pointerType&&P.current)&&(S?C(e):w&&p(e))}),g["data-key"]=r,_.preventFocusOnPress=s;let{pressProps:I,isPressed:O}=(0,j.r)(_),L=k?e=>{"mouse"===T.current&&(e.stopPropagation(),e.preventDefault(),C(e))}:void 0,{longPressProps:N}=(0,B.T)({isDisabled:!M,onLongPress(e){"touch"===e.pointerType&&(p(e),t.setSelectionBehavior("toggle"))}});return{itemProps:c(g,w||E?I:{},M?N:{},{onDoubleClick:L,onDragStartCapture:e=>{"touch"===T.current&&A.current&&e.preventDefault()},onClick:t.isLink(r)?e=>{b.isOpening||e.preventDefault()}:void 0}),isPressed:O,isSelected:t.isSelected(r),isFocused:t.isFocused&&t.focusedKey===r,isDisabled:l,allowsSelection:w,hasAction:S}}function W(){let e=window.event;return(null==e?void 0:e.key)==="Enter"}function V(){let e=window.event;return(null==e?void 0:e.key)===" "||(null==e?void 0:e.code)==="Space"}class ${getNextKey(e){for(e=this.collection.getKeyAfter(e);null!=e;){if("item"===this.collection.getItem(e).type&&!this.disabledKeys.has(e))return e;e=this.collection.getKeyAfter(e)}return null}getPreviousKey(e){for(e=this.collection.getKeyBefore(e);null!=e;){if("item"===this.collection.getItem(e).type&&!this.disabledKeys.has(e))return e;e=this.collection.getKeyBefore(e)}return null}findKey(e,t,r){let n=this.getItem(e);if(!n)return null;let i=n.getBoundingClientRect();do e=t(e),n=this.getItem(e);while(n&&r(i,n.getBoundingClientRect()));return e}isSameRow(e,t){return e.top===t.top||e.left!==t.left}isSameColumn(e,t){return e.left===t.left||e.top!==t.top}getKeyBelow(e){return"grid"===this.layout&&"vertical"===this.orientation?this.findKey(e,e=>this.getNextKey(e),this.isSameRow):this.getNextKey(e)}getKeyAbove(e){return"grid"===this.layout&&"vertical"===this.orientation?this.findKey(e,e=>this.getPreviousKey(e),this.isSameRow):this.getPreviousKey(e)}getNextColumn(e,t){return t?this.getPreviousKey(e):this.getNextKey(e)}getKeyRightOf(e){return"grid"===this.layout?"vertical"===this.orientation?this.getNextColumn(e,"rtl"===this.direction):this.findKey(e,e=>this.getNextColumn(e,"rtl"===this.direction),this.isSameColumn):"horizontal"===this.orientation?this.getNextColumn(e,"rtl"===this.direction):null}getKeyLeftOf(e){return"grid"===this.layout?"vertical"===this.orientation?this.getNextColumn(e,"ltr"===this.direction):this.findKey(e,e=>this.getNextColumn(e,"ltr"===this.direction),this.isSameColumn):"horizontal"===this.orientation?this.getNextColumn(e,"ltr"===this.direction):null}getFirstKey(){let e=this.collection.getFirstKey();for(;null!=e;){let t=this.collection.getItem(e);if((null==t?void 0:t.type)==="item"&&!this.disabledKeys.has(e))return e;e=this.collection.getKeyAfter(e)}return null}getLastKey(){let e=this.collection.getLastKey();for(;null!=e;){if("item"===this.collection.getItem(e).type&&!this.disabledKeys.has(e))return e;e=this.collection.getKeyBefore(e)}return null}getItem(e){return this.ref.current.querySelector(`[data-key="${CSS.escape(e.toString())}"]`)}getKeyPageAbove(e){let t=this.ref.current,r=this.getItem(e);if(!r)return null;if(!S(t))return this.getFirstKey();let n=t.getBoundingClientRect(),i=r.getBoundingClientRect();if("horizontal"===this.orientation){let o=n.x-t.scrollLeft,s=Math.max(0,i.x-o+i.width-n.width);for(;r&&i.x-o>s;)i=null==(r=null==(e=this.getKeyAbove(e))?null:this.getItem(e))?void 0:r.getBoundingClientRect()}else{let o=n.y-t.scrollTop,s=Math.max(0,i.y-o+i.height-n.height);for(;r&&i.y-o>s;)i=null==(r=null==(e=this.getKeyAbove(e))?null:this.getItem(e))?void 0:r.getBoundingClientRect()}return null!=e?e:this.getFirstKey()}getKeyPageBelow(e){let t=this.ref.current,r=this.getItem(e);if(!r)return null;if(!S(t))return this.getLastKey();let n=t.getBoundingClientRect(),i=r.getBoundingClientRect();if("horizontal"===this.orientation){let o=n.x-t.scrollLeft,s=Math.min(t.scrollWidth,i.x-o-i.width+n.width);for(;r&&i.x-o<s;)i=null==(r=null==(e=this.getKeyBelow(e))?null:this.getItem(e))?void 0:r.getBoundingClientRect()}else{let o=n.y-t.scrollTop,s=Math.min(t.scrollHeight,i.y-o-i.height+n.height);for(;r&&i.y-o<s;)i=null==(r=null==(e=this.getKeyBelow(e))?null:this.getItem(e))?void 0:r.getBoundingClientRect()}return null!=e?e:this.getLastKey()}getKeyForSearch(e,t){if(!this.collator)return null;let r=this.collection,n=t||this.getFirstKey();for(;null!=n;){let t=r.getItem(n),i=t.textValue.slice(0,e.length);if(t.textValue&&0===this.collator.compare(i,e))return n;n=this.getKeyBelow(n)}return null}constructor(...e){if(1===e.length){let t=e[0];this.collection=t.collection,this.ref=t.ref,this.collator=t.collator,this.disabledKeys=t.disabledKeys||new Set,this.orientation=t.orientation,this.direction=t.direction,this.layout=t.layout||"stack"}else this.collection=e[0],this.disabledKeys=e[1],this.ref=e[2],this.collator=e[3],this.layout="stack",this.orientation="vertical";"stack"===this.layout&&"vertical"===this.orientation&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}function H(e){let{selectionManager:t,collection:r,disabledKeys:n,ref:o,keyboardDelegate:s}=e,a=(0,N.Xe)({usage:"search",sensitivity:"base"}),l=t.disabledBehavior,u=(0,i.useMemo)(()=>s||new $(r,"selection"===l?new Set:n,o,a),[s,r,n,o,a,l]),{collectionProps:c}=z({...e,ref:o,selectionManager:t,keyboardDelegate:u});return{listProps:c}}},16769:function(e,t,r){"use strict";r.d(t,{Av:function(){return f},gP:function(){return u}});var n=r(67294);let i={prefix:String(Math.round(1e10*Math.random())),current:0},o=n.createContext(i),s=n.createContext(!1),a=!!("undefined"!=typeof window&&window.document&&window.document.createElement),l=new WeakMap,u="function"==typeof n.useId?function(e){let t=n.useId(),[r]=(0,n.useState)(f()),o=r?"react-aria":`react-aria${i.prefix}`;return e||`${o}-${t}`}:function(e){let t=(0,n.useContext)(o);t!==i||a||console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let r=function(e=!1){let t=(0,n.useContext)(o),r=(0,n.useRef)(null);if(null===r.current&&!e){var i,s;let e=null===(s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||void 0===s?void 0:null===(i=s.ReactCurrentOwner)||void 0===i?void 0:i.current;if(e){let r=l.get(e);null==r?l.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==r.state&&(t.current=r.id,l.delete(e))}r.current=++t.current}return r.current}(!!e),s=`react-aria${t.prefix}`;return e||`${s}-${r}`};function c(){return!1}function d(){return!0}function h(e){return()=>{}}function f(){return"function"==typeof n.useSyncExternalStore?n.useSyncExternalStore(h,c,d):(0,n.useContext)(s)}},34154:function(e,t,r){"use strict";r.d(t,{O:function(){return k}});var n=r(67294),i=r(90512);let o="undefined"!=typeof document?n.useLayoutEffect:()=>{};"undefined"!=typeof window&&window.document&&window.document.createElement;let s=new Map,a=e=>{var t;return null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document};function l(...e){let t={...e[0]};for(let r=1;r<e.length;r++){let n=e[r];for(let e in n){let r=t[e],o=n[e];"function"==typeof r&&"function"==typeof o&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=function(...e){return(...t)=>{for(let r of e)"function"==typeof r&&r(...t)}}(r,o):("className"===e||"UNSAFE_className"===e)&&"string"==typeof r&&"string"==typeof o?t[e]=(0,i.Z)(r,o):"id"===e&&r&&o?t.id=function(e,t){if(e===t)return e;let r=s.get(e);if(r)return r(t),t;let n=s.get(t);return n?(n(e),e):t}(r,o):t[e]=void 0!==o?o:r}}return t}let u=new Set(["id"]),c=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),d=new Set(["href","target","rel","download","ping","referrerPolicy"]),h=/^(data-.*)$/;function f(e){if(function(){if(null==p){p=!1;try{document.createElement("div").focus({get preventScroll(){return p=!0,!0}})}catch(e){}}return p}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==n;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}(e);e.focus(),function(e){for(let{element:t,scrollTop:r,scrollLeft:n}of e)t.scrollTop=r,t.scrollLeft=n}(t)}}let p=null,g=new Map,m=new Set;function y(){if("undefined"==typeof window)return;function e(e){return"propertyName"in e}let t=r=>{if(!e(r)||!r.target)return;let n=g.get(r.target);if(n&&(n.delete(r.propertyName),0===n.size&&(r.target.removeEventListener("transitioncancel",t),g.delete(r.target)),0===g.size)){for(let e of m)e();m.clear()}};document.body.addEventListener("transitionrun",r=>{if(!e(r)||!r.target)return;let n=g.get(r.target);n||(n=new Set,g.set(r.target,n),r.target.addEventListener("transitioncancel",t,{once:!0})),n.add(r.propertyName)}),document.body.addEventListener("transitionend",t)}"undefined"!=typeof document&&("loading"!==document.readyState?y():document.addEventListener("DOMContentLoaded",y)),"undefined"!=typeof document&&window.visualViewport;var v=r(9975),b=r(47234),w=r(91243);let x=n.createContext(null);var E=r(2317);function k(e,t,r){var i,s;let p,y,{isDisabled:k=!1,isReadOnly:S=!1,value:T,name:M,children:A,"aria-label":P,"aria-labelledby":C,validationState:_="valid",isInvalid:I}=e;null!=A||null!=P||null!=C||console.warn("If you do not provide children, you must specify an aria-label for accessibility");let{pressProps:O,isPressed:L}=(0,E.r)({isDisabled:k}),{pressProps:R,isPressed:j}=(0,E.r)({isDisabled:k||S,onPress(){t.toggle()}}),{focusableProps:B}=function(e,t){let{focusProps:r}=(0,b.K)(e),{keyboardProps:i}=(0,w.v)(e),s=l(r,i),u=function(e){let t=(0,n.useContext)(x)||{};o(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}});let{ref:r,...i}=t;return i}(t),c=e.isDisabled?{}:u,d=(0,n.useRef)(e.autoFocus);return(0,n.useEffect)(()=>{d.current&&t.current&&function(e){let t=a(e);if("virtual"===(0,v.Jz)()){var r;let n=t.activeElement;r=()=>{t.activeElement===n&&e.isConnected&&f(e)},requestAnimationFrame(()=>{0===g.size?r():m.add(r)})}else f(e)}(t.current),d.current=!1},[t]),{focusableProps:l({...s,tabIndex:e.excludeFromTabOrder&&!e.isDisabled?-1:void 0},c)}}(e,r),N=l(O,B),D=function(e,t={}){let{labelable:r,isLink:n,propNames:i}=t,o={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(u.has(t)||r&&c.has(t)||n&&d.has(t)||(null==i?void 0:i.has(t))||h.test(t))&&(o[t]=e[t]);return o}(e,{labelable:!0});return i=t.isSelected,s=t.setSelected,p=(0,n.useRef)(i),y=function(e){let t=(0,n.useRef)(null);return o(()=>{t.current=e},[e]),(0,n.useCallback)((...e)=>{let r=t.current;return null==r?void 0:r(...e)},[])}(()=>{s&&s(p.current)}),(0,n.useEffect)(()=>{var e;let t=null==r?void 0:null===(e=r.current)||void 0===e?void 0:e.form;return null==t||t.addEventListener("reset",y),()=>{null==t||t.removeEventListener("reset",y)}},[r,y]),{labelProps:l(R,{onClick:e=>e.preventDefault()}),inputProps:l(D,{"aria-invalid":I||"invalid"===_||void 0,"aria-errormessage":e["aria-errormessage"],"aria-controls":e["aria-controls"],"aria-readonly":S||void 0,onChange:e=>{e.stopPropagation(),t.setSelected(e.target.checked)},disabled:k,...null==T?{}:{value:T},name:M,type:"checkbox",...N}),isSelected:t.isSelected,isPressed:L||j,isDisabled:k,isReadOnly:S,isInvalid:I||"invalid"===_}}},11086:function(e,t,r){"use strict";function n(...e){return(...t)=>{for(let r of e)"function"==typeof r&&r(...t)}}r.d(t,{t:function(){return n}})},78837:function(e,t,r){"use strict";r.d(t,{k:function(){return i},r:function(){return n}});let n=e=>{var t;return null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document},i=e=>e&&"window"in e&&e.window===e?e:n(e).defaultView||window},3136:function(e,t,r){"use strict";r.d(t,{z:function(){return a}});let n=new Set(["id"]),i=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),o=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),s=/^(data-.*)$/;function a(e,t={}){let{labelable:r,isLink:a,propNames:l}=t,u={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n.has(t)||r&&i.has(t)||a&&o.has(t)||(null==l?void 0:l.has(t))||s.test(t))&&(u[t]=e[t]);return u}},77604:function(e,t,r){"use strict";function n(e){if(function(){if(null==i){i=!1;try{document.createElement("div").focus({get preventScroll(){return i=!0,!0}})}catch(e){}}return i}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==n;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}(e);e.focus(),function(e){for(let{element:t,scrollTop:r,scrollLeft:n}of e)t.scrollTop=r,t.scrollLeft=n}(t)}}r.d(t,{A:function(){return n}});let i=null},26301:function(e,t,r){"use strict";r.d(t,{Z:function(){return i},c:function(){return o}});var n=r(68806);function i(e){return 0===e.mozInputSource&&!!e.isTrusted||((0,n.Dt)()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function o(e){return!(0,n.Dt)()&&0===e.width&&0===e.height||1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType}},28349:function(e,t,r){"use strict";r.d(t,{d:function(){return s}});var n=r(11086),i=r(22587),o=r(90512);function s(...e){let t={...e[0]};for(let r=1;r<e.length;r++){let s=e[r];for(let e in s){let r=t[e],a=s[e];"function"==typeof r&&"function"==typeof a&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=(0,n.t)(r,a):("className"===e||"UNSAFE_className"===e)&&"string"==typeof r&&"string"==typeof a?t[e]=(0,o.Z)(r,a):"id"===e&&r&&a?t.id=(0,i.ur)(r,a):t[e]=void 0!==a?a:r}}return t}},36303:function(e,t,r){"use strict";function n(...e){return 1===e.length?e[0]:t=>{for(let r of e)"function"==typeof r?r(t):null!=r&&(r.current=t)}}r.d(t,{l:function(){return n}})},32433:function(e,t,r){"use strict";r.d(t,{b0:function(){return u},eY:function(){return f},ib:function(){return h},nG:function(){return c},pG:function(){return a},tv:function(){return l}});var n=r(77604),i=r(68806),o=r(67294);let s=(0,o.createContext)({isNative:!0,open:function(e,t){d(e,e=>c(e,t))},useHref:e=>e});function a(e){let{children:t,navigate:r,useHref:n}=e,i=(0,o.useMemo)(()=>({isNative:!1,open:(e,t,n,i)=>{d(e,e=>{u(e,t)?r(n,i):c(e,t)})},useHref:n||(e=>e)}),[r,n]);return o.createElement(s.Provider,{value:i},t)}function l(){return(0,o.useContext)(s)}function u(e,t){let r=e.getAttribute("target");return(!r||"_self"===r)&&e.origin===location.origin&&!e.hasAttribute("download")&&!t.metaKey&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}function c(e,t,r=!0){var o,s;let{metaKey:a,ctrlKey:l,altKey:u,shiftKey:d}=t;(0,i.vU)()&&(null===(s=window.event)||void 0===s?void 0:null===(o=s.type)||void 0===o?void 0:o.startsWith("key"))&&"_blank"===e.target&&((0,i.V5)()?a=!0:l=!0);let h=(0,i.Pf)()&&(0,i.V5)()&&!(0,i.zc)()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:a,ctrlKey:l,altKey:u,shiftKey:d}):new MouseEvent("click",{metaKey:a,ctrlKey:l,altKey:u,shiftKey:d,bubbles:!0,cancelable:!0});c.isOpening=r,(0,n.A)(e),e.dispatchEvent(h),c.isOpening=!1}function d(e,t){if(e instanceof HTMLAnchorElement)t(e);else if(e.hasAttribute("data-href")){let r=document.createElement("a");r.href=e.getAttribute("data-href"),e.hasAttribute("data-target")&&(r.target=e.getAttribute("data-target")),e.hasAttribute("data-rel")&&(r.rel=e.getAttribute("data-rel")),e.hasAttribute("data-download")&&(r.download=e.getAttribute("data-download")),e.hasAttribute("data-ping")&&(r.ping=e.getAttribute("data-ping")),e.hasAttribute("data-referrer-policy")&&(r.referrerPolicy=e.getAttribute("data-referrer-policy")),e.appendChild(r),t(r),e.removeChild(r)}}function h(e){return{"data-href":e.href,"data-target":e.target,"data-rel":e.rel,"data-download":e.download,"data-ping":e.ping,"data-referrer-policy":e.referrerPolicy}}function f(e){let t=l();return{href:(null==e?void 0:e.href)?t.useHref(null==e?void 0:e.href):void 0,target:null==e?void 0:e.target,rel:null==e?void 0:e.rel,download:null==e?void 0:e.download,ping:null==e?void 0:e.ping,referrerPolicy:null==e?void 0:e.referrerPolicy}}c.isOpening=!1},68806:function(e,t,r){"use strict";function n(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands.some(t=>e.test(t.brand)))||e.test(window.navigator.userAgent))}function i(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function o(){return i(/^Mac/i)}function s(){return i(/^iPad/i)||o()&&navigator.maxTouchPoints>1}function a(){return i(/^iPhone/i)||s()}function l(){return o()||a()}function u(){return n(/AppleWebKit/i)&&!n(/Chrome/i)}function c(){return n(/Android/i)}function d(){return n(/Firefox/i)}r.d(t,{Dt:function(){return c},Pf:function(){return u},V5:function(){return o},ad:function(){return l},gn:function(){return a},vU:function(){return d},zc:function(){return s}})},85007:function(e,t,r){"use strict";r.d(t,{Q:function(){return s}});let n=new Map,i=new Set;function o(){if("undefined"==typeof window)return;function e(e){return"propertyName"in e}let t=r=>{if(!e(r)||!r.target)return;let o=n.get(r.target);if(o&&(o.delete(r.propertyName),0===o.size&&(r.target.removeEventListener("transitioncancel",t),n.delete(r.target)),0===n.size)){for(let e of i)e();i.clear()}};document.body.addEventListener("transitionrun",r=>{if(!e(r)||!r.target)return;let i=n.get(r.target);i||(i=new Set,n.set(r.target,i),r.target.addEventListener("transitioncancel",t,{once:!0})),i.add(r.propertyName)}),document.body.addEventListener("transitionend",t)}function s(e){requestAnimationFrame(()=>{0===n.size?e():i.add(e)})}"undefined"!=typeof document&&("loading"!==document.readyState?o():document.addEventListener("DOMContentLoaded",o))},61718:function(e,t,r){"use strict";r.d(t,{i:function(){return o}});var n=r(69786),i=r(67294);function o(e){let t=(0,i.useRef)(null);return(0,n.b)(()=>{t.current=e},[e]),(0,i.useCallback)((...e)=>{let r=t.current;return null==r?void 0:r(...e)},[])}},36116:function(e,t,r){"use strict";r.d(t,{x:function(){return i}});var n=r(67294);function i(){let e=(0,n.useRef)(new Map),t=(0,n.useCallback)((t,r,n,i)=>{let o=(null==i?void 0:i.once)?(...t)=>{e.current.delete(n),n(...t)}:n;e.current.set(n,{type:r,eventTarget:t,fn:o,options:i}),t.addEventListener(r,n,i)},[]),r=(0,n.useCallback)((t,r,n,i)=>{var o;let s=(null===(o=e.current.get(n))||void 0===o?void 0:o.fn)||n;t.removeEventListener(r,s,i),e.current.delete(n)},[]),i=(0,n.useCallback)(()=>{e.current.forEach((e,t)=>{r(e.eventTarget,e.type,t,e.options)})},[r]);return(0,n.useEffect)(()=>i,[i]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:i}}},22587:function(e,t,r){"use strict";r.d(t,{ur:function(){return v},Me:function(){return y},mp:function(){return b}});var n=r(69786),i=r(61718),o=r(67294);let s={prefix:String(Math.round(1e10*Math.random())),current:0},a=o.createContext(s),l=o.createContext(!1),u=!!("undefined"!=typeof window&&window.document&&window.document.createElement),c=new WeakMap,d="function"==typeof o.useId?function(e){let t=o.useId(),[r]=(0,o.useState)("function"==typeof o.useSyncExternalStore?o.useSyncExternalStore(p,h,f):(0,o.useContext)(l)),n=r?"react-aria":`react-aria${s.prefix}`;return e||`${n}-${t}`}:function(e){let t=(0,o.useContext)(a);t!==s||u||console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let r=function(e=!1){let t=(0,o.useContext)(a),r=(0,o.useRef)(null);if(null===r.current&&!e){var n,i;let e=null===(i=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||void 0===i?void 0:null===(n=i.ReactCurrentOwner)||void 0===n?void 0:n.current;if(e){let r=c.get(e);null==r?c.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==r.state&&(t.current=r.id,c.delete(e))}r.current=++t.current}return r.current}(!!e),n=`react-aria${t.prefix}`;return e||`${n}-${r}`};function h(){return!1}function f(){return!0}function p(e){return()=>{}}let g=!!("undefined"!=typeof window&&window.document&&window.document.createElement),m=new Map;function y(e){let[t,r]=(0,o.useState)(e),i=(0,o.useRef)(null),s=d(t),a=(0,o.useCallback)(e=>{i.current=e},[]);return g&&m.set(s,a),(0,n.b)(()=>()=>{m.delete(s)},[s]),(0,o.useEffect)(()=>{let e=i.current;e&&(i.current=null,r(e))}),s}function v(e,t){if(e===t)return e;let r=m.get(e);if(r)return r(t),t;let n=m.get(t);return n?(n(e),e):t}function b(e=[]){let t=y(),[r,s]=function(e){let[t,r]=(0,o.useState)(e),s=(0,o.useRef)(null),a=(0,i.i)(()=>{if(!s.current)return;let e=s.current.next();if(e.done){s.current=null;return}t===e.value?a():r(e.value)});(0,n.b)(()=>{s.current&&a()});let l=(0,i.i)(e=>{s.current=e(t),a()});return[t,l]}(t),a=(0,o.useCallback)(()=>{s(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,s]);return(0,n.b)(a,[t,a,...e]),r}},69786:function(e,t,r){"use strict";r.d(t,{b:function(){return i}});var n=r(67294);let i="undefined"!=typeof document?n.useLayoutEffect:()=>{}},72970:function(e,t,r){"use strict";r.d(t,{l:function(){return i}});var n=r(69786);function i(e,t){(0,n.b)(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}},46822:function(e,t,r){"use strict";r.d(t,{S:function(){return a},T:function(){return l}});var n=r(28349),i=r(67294),o=r(44971);let s={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function a(e={}){let{style:t,isFocusable:r}=e,[n,a]=(0,i.useState)(!1),{focusWithinProps:l}=(0,o.L)({isDisabled:!r,onFocusWithinChange:e=>a(e)}),u=(0,i.useMemo)(()=>n?t:t?{...s,...t}:s,[n]);return{visuallyHiddenProps:{...l,style:u}}}function l(e){let{children:t,elementType:r="div",isFocusable:o,style:s,...l}=e,{visuallyHiddenProps:u}=a(e);return i.createElement(r,(0,n.d)(l,u),t)}},67911:function(e,t,r){"use strict";r.d(t,{$0:function(){return a},Em:function(){return p},Kx:function(){return d},_P:function(){return h},ck:function(){return o},eg:function(){return m},is:function(){return b},l8:function(){return f},s:function(){return g}});var n=r(67294);function i(e){return null}i.getCollectionNode=function*(e,t){let{childItems:r,title:i,children:o}=e,s=e.title||e.children,a=e.textValue||("string"==typeof s?s:"")||e["aria-label"]||"";a||(null==t?void 0:t.suppressTextValueWarning)||console.warn("<Item> with non-plain text contents is unsupported by type to select for accessibility. Please add a `textValue` prop."),yield{type:"item",props:e,rendered:s,textValue:a,"aria-label":e["aria-label"],hasChildNodes:null!=e.hasChildItems?e.hasChildItems:!!(e.childItems||e.title&&n.Children.count(e.children)>0),*childNodes(){if(r)for(let e of r)yield{type:"item",value:e};else if(i){let e=[];n.Children.forEach(o,t=>{e.push({type:"item",element:t})}),yield*e}}}};let o=i;function s(e){return null}s.getCollectionNode=function*(e){let{children:t,title:r,items:i}=e;yield{type:"section",props:e,hasChildNodes:!0,rendered:r,"aria-label":e["aria-label"],*childNodes(){if("function"==typeof t){if(!i)throw Error("props.children was a function but props.items is missing");for(let e of i)yield{type:"item",value:e,renderer:t}}else{let e=[];n.Children.forEach(t,t=>{e.push({type:"item",element:t})}),yield*e}}}};let a=s;class l{build(e,t){return this.context=t,u(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:t,items:r}=e;if("function"==typeof t){if(!r)throw Error("props.children was a function but props.items is missing");for(let r of e.items)yield*this.getFullNode({value:r},{renderer:t})}else{let e=[];n.Children.forEach(t,t=>{e.push(t)});let r=0;for(let t of e)for(let e of this.getFullNode({element:t,index:r},{}))r++,yield e}}getKey(e,t,r,n){if(null!=e.key)return e.key;if("cell"===t.type&&null!=t.key)return`${n}${t.key}`;let i=t.value;if(null!=i){var o;let e=null!==(o=i.key)&&void 0!==o?o:i.id;if(null==e)throw Error("No key found for item");return e}return n?`${n}.${t.index}`:`$.${t.index}`}getChildState(e,t){return{renderer:t.renderer||e.renderer}}*getFullNode(e,t,r,i){let o=e.element;if(!o&&e.value&&t&&t.renderer){let r=this.cache.get(e.value);if(r&&(!r.shouldInvalidate||!r.shouldInvalidate(this.context))){r.index=e.index,r.parentKey=i?i.key:null,yield r;return}o=t.renderer(e.value)}if(n.isValidElement(o)){let n=o.type;if("function"!=typeof n&&"function"!=typeof n.getCollectionNode){let e="function"==typeof o.type?o.type.name:o.type;throw Error(`Unknown element <${e}> in collection.`)}let s=n.getCollectionNode(o.props,this.context),a=e.index,l=s.next();for(;!l.done&&l.value;){let n=l.value;e.index=a;let u=n.key;u||(u=n.element?null:this.getKey(o,e,t,r));let d=[...this.getFullNode({...n,key:u,index:a,wrapper:function(e,t){return e&&t?r=>e(t(r)):e||t||void 0}(e.wrapper,n.wrapper)},this.getChildState(t,n),r?`${r}${o.key}`:o.key,i)];for(let t of d){if(t.value=n.value||e.value,t.value&&this.cache.set(t.value,t),e.type&&t.type!==e.type)throw Error(`Unsupported type <${c(t.type)}> in <${c(i.type)}>. Only <${c(e.type)}> is supported.`);a++,yield t}l=s.next(d)}return}if(null==e.key)return;let s=this,a={type:e.type,props:e.props,key:e.key,parentKey:i?i.key:null,value:e.value,level:i?i.level+1:0,index:e.index,rendered:e.rendered,textValue:e.textValue,"aria-label":e["aria-label"],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes,childNodes:u(function*(){if(!e.hasChildNodes)return;let r=0;for(let n of e.childNodes())for(let e of(null!=n.key&&(n.key=`${a.key}${n.key}`),n.index=r,s.getFullNode(n,s.getChildState(t,n),a.key,a)))r++,yield e})};yield a}constructor(){this.cache=new WeakMap}}function u(e){let t=[],r=null;return{*[Symbol.iterator](){for(let e of t)yield e;for(let n of(r||(r=e()),r))t.push(n),yield n}}}function c(e){return e[0].toUpperCase()+e.slice(1)}function d(e,t,r){let i=(0,n.useMemo)(()=>new l,[]),{children:o,items:s,collection:a}=e;return(0,n.useMemo)(()=>a||t(i.build({children:o,items:s},r)),[i,o,s,a,r,t])}function h(e,t){return"function"==typeof t.getChildren?t.getChildren(e.key):e.childNodes}function f(e){return p(e,0)}function p(e,t){if(t<0)return;let r=0;for(let n of e){if(r===t)return n;r++}}function g(e){let t;for(let r of e)t=r;return t}function m(e,t,r){if(t.parentKey===r.parentKey)return t.index-r.index;let n=[...y(e,t),t],i=[...y(e,r),r],o=n.slice(0,i.length).findIndex((e,t)=>e!==i[t]);return -1!==o?(t=n[o],r=i[o],t.index-r.index):n.findIndex(e=>e===r)>=0?1:(i.findIndex(e=>e===t),-1)}function y(e,t){let r=[];for(;(null==t?void 0:t.parentKey)!=null;)r.unshift(t=e.getItem(t.parentKey));return r}let v=new WeakMap;function b(e){let t=v.get(e);if(null!=t)return t;t=0;let r=n=>{for(let i of n)"section"===i.type?r(h(i,e)):t++};return r(e),v.set(e,t),t}},94482:function(e,t,r){"use strict";r.d(t,{W:function(){return o}});var n=r(5698),i=r(67294);function o(e){let t=(0,n.d)(e),[r,o]=(0,i.useState)(null),[s,a]=(0,i.useState)([]),l=()=>{a([]),t.close()};return{focusStrategy:r,...t,open(e=null){o(e),t.open()},toggle(e=null){o(e),t.toggle()},close(){l()},UNSTABLE_expandedKeysStack:s,UNSTABLE_openSubmenu:(e,t)=>{a(r=>t>r.length?r:[...r.slice(0,t),e])},UNSTABLE_closeSubmenu:(e,t)=>{a(r=>r[t]===e?r.slice(0,t):r)}}}},5698:function(e,t,r){"use strict";r.d(t,{d:function(){return o}});var n=r(67294),i=r(65897);function o(e){let[t,r]=(0,i.zk)(e.isOpen,e.defaultOpen||!1,e.onOpenChange),o=(0,n.useCallback)(()=>{r(!0)},[r]),s=(0,n.useCallback)(()=>{r(!1)},[r]),a=(0,n.useCallback)(()=>{r(!t)},[r,t]);return{isOpen:t,setOpen:r,open:o,close:s,toggle:a}}},96417:function(e,t,r){"use strict";r.d(t,{Z:function(){return u},q:function(){return a}});var n=r(65897),i=r(67294),o=r(67911);class s extends Set{constructor(e,t,r){super(e),e instanceof s?(this.anchorKey=t||e.anchorKey,this.currentKey=r||e.currentKey):(this.anchorKey=t,this.currentKey=r)}}function a(e){let{selectionMode:t="none",disallowEmptySelection:r,allowDuplicateSelectionEvents:o,selectionBehavior:a="toggle",disabledBehavior:u="all"}=e,c=(0,i.useRef)(!1),[,d]=(0,i.useState)(!1),h=(0,i.useRef)(null),f=(0,i.useRef)(null),[,p]=(0,i.useState)(null),g=(0,i.useMemo)(()=>l(e.selectedKeys),[e.selectedKeys]),m=(0,i.useMemo)(()=>l(e.defaultSelectedKeys,new s),[e.defaultSelectedKeys]),[y,v]=(0,n.zk)(g,m,e.onSelectionChange),b=(0,i.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[w,x]=(0,i.useState)(a);"replace"===a&&"toggle"===w&&"object"==typeof y&&0===y.size&&x("replace");let E=(0,i.useRef)(a);return(0,i.useEffect)(()=>{a!==E.current&&(x(a),E.current=a)},[a]),{selectionMode:t,disallowEmptySelection:r,selectionBehavior:w,setSelectionBehavior:x,get isFocused(){return c.current},setFocused(e){c.current=e,d(e)},get focusedKey(){return h.current},get childFocusStrategy(){return f.current},setFocusedKey(e,t="first"){h.current=e,f.current=t,p(e)},selectedKeys:y,setSelectedKeys(e){(o||!function(e,t){if(e.size!==t.size)return!1;for(let r of e)if(!t.has(r))return!1;return!0}(e,y))&&v(e)},disabledKeys:b,disabledBehavior:u}}function l(e,t){return e?"all"===e?"all":new s(e):t}class u{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,t){(null==e||this.collection.getItem(e))&&this.state.setFocusedKey(e,t)}get selectedKeys(){return"all"===this.state.selectedKeys?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){return"none"!==this.state.selectionMode&&(e=this.getKey(e),"all"===this.state.selectedKeys?this.canSelectItem(e):this.state.selectedKeys.has(e))}get isEmpty(){return"all"!==this.state.selectedKeys&&0===this.state.selectedKeys.size}get isSelectAll(){if(this.isEmpty)return!1;if("all"===this.state.selectedKeys)return!0;if(null!=this._isSelectAll)return this._isSelectAll;let e=this.getSelectAllKeys(),t=this.state.selectedKeys;return this._isSelectAll=e.every(e=>t.has(e)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let r=this.collection.getItem(t);(!e||r&&0>(0,o.eg)(this.collection,r,e))&&(e=r)}return null==e?void 0:e.key}get lastSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let r=this.collection.getItem(t);(!e||r&&(0,o.eg)(this.collection,r,e)>0)&&(e=r)}return null==e?void 0:e.key}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){let t;if("none"!==this.selectionMode){if("single"===this.selectionMode){this.replaceSelection(e);return}if(e=this.getKey(e),"all"===this.state.selectedKeys)t=new s([e],e,e);else{let r=this.state.selectedKeys,n=r.anchorKey||e;for(let i of(t=new s(r,n,e),this.getKeyRange(n,r.currentKey||e)))t.delete(i);for(let r of this.getKeyRange(e,n))this.canSelectItem(r)&&t.add(r)}this.state.setSelectedKeys(t)}}getKeyRange(e,t){let r=this.collection.getItem(e),n=this.collection.getItem(t);return r&&n?0>=(0,o.eg)(this.collection,r,n)?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){let r=[],n=e;for(;n;){let e=this.collection.getItem(n);if((e&&"item"===e.type||"cell"===e.type&&this.allowsCellSelection)&&r.push(n),n===t)return r;n=this.collection.getKeyAfter(n)}return[]}getKey(e){let t=this.collection.getItem(e);if(!t||"cell"===t.type&&this.allowsCellSelection)return e;for(;"item"!==t.type&&null!=t.parentKey;)t=this.collection.getItem(t.parentKey);return t&&"item"===t.type?t.key:null}toggleSelection(e){if("none"===this.selectionMode)return;if("single"===this.selectionMode&&!this.isSelected(e)){this.replaceSelection(e);return}if(null==(e=this.getKey(e)))return;let t=new s("all"===this.state.selectedKeys?this.getSelectAllKeys():this.state.selectedKeys);t.has(e)?t.delete(e):this.canSelectItem(e)&&(t.add(e),t.anchorKey=e,t.currentKey=e),this.disallowEmptySelection&&0===t.size||this.state.setSelectedKeys(t)}replaceSelection(e){if("none"===this.selectionMode||null==(e=this.getKey(e)))return;let t=this.canSelectItem(e)?new s([e],e,e):new s;this.state.setSelectedKeys(t)}setSelectedKeys(e){if("none"===this.selectionMode)return;let t=new s;for(let r of e)if(null!=(r=this.getKey(r))&&(t.add(r),"single"===this.selectionMode))break;this.state.setSelectedKeys(t)}getSelectAllKeys(){let e=[],t=r=>{for(;r;){if(this.canSelectItem(r)){let n=this.collection.getItem(r);"item"===n.type&&e.push(r),n.hasChildNodes&&(this.allowsCellSelection||"item"!==n.type)&&t((0,o.l8)((0,o._P)(n,this.collection)).key)}r=this.collection.getKeyAfter(r)}};return t(this.collection.getFirstKey()),e}selectAll(){this.isSelectAll||"multiple"!==this.selectionMode||this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&("all"===this.state.selectedKeys||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new s)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,t){"none"!==this.selectionMode&&("single"===this.selectionMode?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):"toggle"===this.selectionBehavior||t&&("touch"===t.pointerType||"virtual"===t.pointerType)?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let t=this.selectedKeys;if(e.size!==t.size)return!1;for(let r of e)if(!t.has(r))return!1;for(let r of t)if(!e.has(r))return!1;return!0}canSelectItem(e){if("none"===this.state.selectionMode||this.state.disabledKeys.has(e))return!1;let t=this.collection.getItem(e);return!!t&&("cell"!==t.type||!!this.allowsCellSelection)}isDisabled(e){return this.state.disabledKeys.has(e)&&"all"===this.state.disabledBehavior}isLink(e){var t,r;return!!(null===(r=this.collection.getItem(e))||void 0===r?void 0:null===(t=r.props)||void 0===t?void 0:t.href)}constructor(e,t,r){var n;this.collection=e,this.state=t,this.allowsCellSelection=null!==(n=null==r?void 0:r.allowsCellSelection)&&void 0!==n&&n,this._isSelectAll=null}}},94470:function(e,t,r){"use strict";r.d(t,{l:function(){return i}});var n=r(65897);function i(e={}){let{isReadOnly:t}=e,[r,i]=(0,n.zk)(e.isSelected,e.defaultSelected||!1,e.onChange);return{isSelected:r,setSelected:function(e){t||i(e)},toggle:function(){t||i(!r)}}}},54774:function(e,t,r){"use strict";r.d(t,{D:function(){return l}});var n=r(96417),i=r(67294),o=r(67911),s=r(65897);class a{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let t=this.keyMap.get(e);return t?t.prevKey:null}getKeyAfter(e){let t=this.keyMap.get(e);return t?t.nextKey:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)}at(e){let t=[...this.getKeys()];return this.getItem(t[e])}constructor(e,{expandedKeys:t}={}){let r;this.keyMap=new Map,this.iterable=e,t=t||new Set;let n=e=>{if(this.keyMap.set(e.key,e),e.childNodes&&("section"===e.type||t.has(e.key)))for(let t of e.childNodes)n(t)};for(let t of e)n(t);let i=0;for(let[e,t]of this.keyMap)r?(r.nextKey=e,t.prevKey=r.key):(this.firstKey=e,t.prevKey=void 0),"item"===t.type&&(t.index=i++),(r=t).nextKey=void 0;this.lastKey=null==r?void 0:r.key}}function l(e){let[t,r]=(0,s.zk)(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,e.onExpandedChange),l=(0,n.q)(e),u=(0,i.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),c=(0,o.Kx)(e,(0,i.useCallback)(e=>new a(e,{expandedKeys:t}),[t]),null);return(0,i.useEffect)(()=>{null==l.focusedKey||c.getItem(l.focusedKey)||l.setFocusedKey(null)},[c,l.focusedKey]),{collection:c,expandedKeys:t,disabledKeys:u,toggleKey:e=>{let n;r(((n=new Set(t)).has(e)?n.delete(e):n.add(e),n))},setExpandedKeys:r,selectionManager:new n.Z(c,l)}}},65897:function(e,t,r){"use strict";r.d(t,{uZ:function(){return o},zk:function(){return i}});var n=r(67294);function i(e,t,r){let[i,o]=(0,n.useState)(e||t),s=(0,n.useRef)(void 0!==e),a=void 0!==e;(0,n.useEffect)(()=>{let e=s.current;e!==a&&console.warn(`WARN: A component changed from ${e?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}.`),s.current=a},[a]);let l=a?e:i,u=(0,n.useCallback)((e,...t)=>{let n=(e,...t)=>{r&&!Object.is(l,e)&&r(e,...t),a||(l=e)};"function"==typeof e?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),o((r,...i)=>{let o=e(a?l:r,...i);return(n(o,...t),a)?r:o})):(a||o(e),n(e,...t))},[a,l,r]);return[l,u]}function o(e,t=-1/0,r=1/0){return Math.min(Math.max(e,t),r)}},69607:function(e,t,r){"use strict";r.d(t,{i1:function(){return i},mI:function(){return a}});var n,i,o=r(26729),s=r(35615);(n=i||(i={})).Installed="Installed",n.NotDetected="NotDetected",n.Loadable="Loadable",n.Unsupported="Unsupported";class a extends o{get connected(){return!!this.publicKey}async autoConnect(){await this.connect()}async prepareTransaction(e,t,r={}){let n=this.publicKey;if(!n)throw new s.oS;return e.feePayer=e.feePayer||n,e.recentBlockhash=e.recentBlockhash||(await t.getLatestBlockhash({commitment:r.preflightCommitment,minContextSlot:r.minContextSlot})).blockhash,e}}},35615:function(e,t,r){"use strict";r.d(t,{$w:function(){return s},IW:function(){return h},Nx:function(){return c},OZ:function(){return i},PY:function(){return f},UG:function(){return l},at:function(){return a},bD:function(){return g},cO:function(){return u},fk:function(){return p},lj:function(){return n},oS:function(){return d},p6:function(){return o}});class n extends Error{constructor(e,t){super(e),this.error=t}}class i extends n{constructor(){super(...arguments),this.name="WalletNotReadyError"}}class o extends n{constructor(){super(...arguments),this.name="WalletConfigError"}}class s extends n{constructor(){super(...arguments),this.name="WalletConnectionError"}}class a extends n{constructor(){super(...arguments),this.name="WalletDisconnectedError"}}class l extends n{constructor(){super(...arguments),this.name="WalletDisconnectionError"}}class u extends n{constructor(){super(...arguments),this.name="WalletAccountError"}}class c extends n{constructor(){super(...arguments),this.name="WalletPublicKeyError"}}class d extends n{constructor(){super(...arguments),this.name="WalletNotConnectedError"}}class h extends n{constructor(){super(...arguments),this.name="WalletSendTransactionError"}}class f extends n{constructor(){super(...arguments),this.name="WalletSignTransactionError"}}class p extends n{constructor(){super(...arguments),this.name="WalletSignMessageError"}}class g extends n{constructor(){super(...arguments),this.name="WalletSignInError"}}},44718:function(e,t,r){"use strict";r.d(t,{R:function(){return o},h:function(){return i}});var n=r(67294);let i=(0,n.createContext)({});function o(){return(0,n.useContext)(i)}},54306:function(e,t,r){"use strict";r.d(t,{O:function(){return l},z:function(){return a}});var n=r(67294);let i=[],o={autoConnect:!1,connecting:!1,connected:!1,disconnecting:!1,select(){s("call","select")},connect:()=>Promise.reject(s("call","connect")),disconnect:()=>Promise.reject(s("call","disconnect")),sendTransaction:()=>Promise.reject(s("call","sendTransaction")),signTransaction:()=>Promise.reject(s("call","signTransaction")),signAllTransactions:()=>Promise.reject(s("call","signAllTransactions")),signMessage:()=>Promise.reject(s("call","signMessage")),signIn:()=>Promise.reject(s("call","signIn"))};function s(e,t){let r=Error(`You have tried to ${e} "${t}" on a WalletContext without providing one. Make sure to render a WalletProvider as an ancestor of the component that uses WalletContext.`);return console.error(r),r}Object.defineProperty(o,"wallets",{get:()=>(s("read","wallets"),i)}),Object.defineProperty(o,"wallet",{get:()=>(s("read","wallet"),null)}),Object.defineProperty(o,"publicKey",{get:()=>(s("read","publicKey"),null)});let a=(0,n.createContext)(o);function l(){return(0,n.useContext)(a)}},90512:function(e,t,r){"use strict";t.Z=function(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=function e(t){var r,n,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t){if(Array.isArray(t)){var o=t.length;for(r=0;r<o;r++)t[r]&&(n=e(t[r]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n)}return i}(e))&&(n&&(n+=" "),n+=t);return n}},56728:function(e,t,r){"use strict";r.d(t,{v:function(){return eI}});var n=r(86917),i=r(94714);let o={type:"spring",stiffness:500,damping:25,restSpeed:10},s=e=>({type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restSpeed:10}),a={type:"keyframes",duration:.8},l={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},u=(e,{keyframes:t})=>t.length>2?a:i.G.has(e)?e.startsWith("scale")?s(t[1]):o:l;var c=r(31056),d=r(22081);let h={current:!1},f=e=>null!==e;function p(e,{repeat:t,repeatType:r="loop"},n){let i=e.filter(f),o=t&&"loop"!==r&&t%2==1?0:i.length-1;return o&&void 0!==n?n:i[o]}var g=r(26166),m=r(1117),y=r(66484);function v(e){let t;return()=>(void 0===t&&(t=e()),t)}var b=r(81662),w=r(41568),x=r(45487),E=r(51550);let k=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&(E.P.test(e)||"0"===e)&&!e.startsWith("url("));class S{constructor({autoplay:e=!0,delay:t=0,type:r="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:o="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:e,delay:t,type:r,repeat:n,repeatDelay:i,repeatType:o,...s},this.updateFinishedPromise()}get resolved(){return this._resolved||this.hasAttemptedResolve||(0,w.m)(),this._resolved}onKeyframesResolved(e,t){this.hasAttemptedResolve=!0;let{name:r,type:n,velocity:i,delay:o,onComplete:s,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(e,t,r,n){let i=e[0];if(null===i)return!1;if("display"===t||"visibility"===t)return!0;let o=e[e.length-1],s=k(i,t),a=k(o,t);return(0,x.K)(s===a,`You are trying to animate ${t} from "${i}" to "${o}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${o} via the \`style\` property.`),!!s&&!!a&&(function(e){let t=e[0];if(1===e.length)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}(e)||"spring"===r&&n)}(e,r,n,i)){if(h.current||!o){null==a||a(p(e,this.options,t)),null==s||s(),this.resolveFinishedPromise();return}this.options.duration=0}let u=this.initPlayback(e,t);!1!==u&&(this._resolved={keyframes:e,finalKeyframe:t,...u},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}var T=r(3038);function M(e,t,r){let n=Math.max(t-5,0);return(0,T.R)(r-e(n),t-n)}var A=r(24169);function P(e,t){return e*Math.sqrt(1-t*t)}let C=["duration","bounce"],_=["stiffness","damping","mass"];function I(e,t){return t.some(t=>void 0!==e[t])}function O({keyframes:e,restDelta:t,restSpeed:r,...i}){let o;let s=e[0],a=e[e.length-1],l={done:!1,value:s},{stiffness:u,damping:c,mass:d,duration:h,velocity:f,isResolvedFromDuration:p}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!I(e,_)&&I(e,C)){let r=function({duration:e=800,bounce:t=.25,velocity:r=0,mass:i=1}){let o,s;(0,x.K)(e<=(0,n.w)(10),"Spring duration must be 10 seconds or less");let a=1-t;a=(0,A.u)(.05,1,a),e=(0,A.u)(.01,10,(0,n.X)(e)),a<1?(o=t=>{let n=t*a,i=n*e;return .001-(n-r)/P(t,a)*Math.exp(-i)},s=t=>{let n=t*a*e,i=Math.pow(a,2)*Math.pow(t,2)*e,s=P(Math.pow(t,2),a);return(n*r+r-i)*Math.exp(-n)*(-o(t)+.001>0?-1:1)/s}):(o=t=>-.001+Math.exp(-t*e)*((t-r)*e+1),s=t=>e*e*(r-t)*Math.exp(-t*e));let l=function(e,t,r){let n=r;for(let r=1;r<12;r++)n-=e(n)/t(n);return n}(o,s,5/e);if(e=(0,n.w)(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{let t=Math.pow(l,2)*i;return{stiffness:t,damping:2*a*Math.sqrt(i*t),duration:e}}}(e);(t={...t,...r,mass:1}).isResolvedFromDuration=!0}return t}({...i,velocity:-(0,n.X)(i.velocity||0)}),g=f||0,m=c/(2*Math.sqrt(u*d)),y=a-s,v=(0,n.X)(Math.sqrt(u/d)),b=5>Math.abs(y);if(r||(r=b?.01:2),t||(t=b?.005:.5),m<1){let e=P(v,m);o=t=>a-Math.exp(-m*v*t)*((g+m*v*y)/e*Math.sin(e*t)+y*Math.cos(e*t))}else if(1===m)o=e=>a-Math.exp(-v*e)*(y+(g+v*y)*e);else{let e=v*Math.sqrt(m*m-1);o=t=>{let r=Math.exp(-m*v*t),n=Math.min(e*t,300);return a-r*((g+m*v*y)*Math.sinh(n)+e*y*Math.cosh(n))/e}}return{calculatedDuration:p&&h||null,next:e=>{let n=o(e);if(p)l.done=e>=h;else{let i=g;0!==e&&(i=m<1?M(o,e,n):0);let s=Math.abs(i)<=r,u=Math.abs(a-n)<=t;l.done=s&&u}return l.value=l.done?a:n,l}}}function L({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:c}){let d,h;let f=e[0],p={done:!1,value:f},g=e=>void 0!==a&&e<a||void 0!==l&&e>l,m=e=>void 0===a?l:void 0===l?a:Math.abs(a-e)<Math.abs(l-e)?a:l,y=r*t,v=f+y,b=void 0===s?v:s(v);b!==v&&(y=b-f);let w=e=>-y*Math.exp(-e/n),x=e=>b+w(e),E=e=>{let t=w(e),r=x(e);p.done=Math.abs(t)<=u,p.value=p.done?b:r},k=e=>{g(p.value)&&(d=e,h=O({keyframes:[p.value,m(p.value)],velocity:M(x,e,p.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return k(0),{calculatedDuration:null,next:e=>{let t=!1;return(h||void 0!==d||(t=!0,E(e),k(e)),void 0!==d&&e>=d)?h.next(e-d):(t||E(e),p)}}}let R=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e;function j(e,t,r,n){if(e===t&&r===n)return b.Z;let i=t=>(function(e,t,r,n,i){let o,s;let a=0;do(o=R(s=t+(r-t)/2,n,i)-e)>0?r=s:t=s;while(Math.abs(o)>1e-7&&++a<12);return s})(t,0,1,e,r);return e=>0===e||1===e?e:R(i(e),t,n)}let B=j(.42,0,1,1),N=j(0,0,.58,1),D=j(.42,0,.58,1),K=e=>Array.isArray(e)&&"number"!=typeof e[0];var U=r(27255),z=r(90415),F=r(75129);let W=j(.33,1.53,.69,.99),V=(0,F.M)(W),$=(0,z.o)(V),H={linear:b.Z,easeIn:B,easeInOut:D,easeOut:N,circIn:U.Z7,circInOut:U.X7,circOut:U.Bn,backIn:V,backInOut:$,backOut:W,anticipate:e=>(e*=2)<1?.5*V(e):.5*(2-Math.pow(2,-10*(e-1)))},q=e=>{if(Array.isArray(e)){(0,x.k)(4===e.length,"Cubic bezier arrays must contain four numerical values.");let[t,r,n,i]=e;return j(t,r,n,i)}return"string"==typeof e?((0,x.k)(void 0!==H[e],`Invalid easing type '${e}'`),H[e]):e};var Z=r(83624),G=r(23967),J=r(40179);function Y(e,t,r){return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?e+(t-e)*6*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}var X=r(26382),Q=r(40819),ee=r(93184);function et(e,t){return r=>r>0?t:e}let er=(e,t,r)=>{let n=e*e,i=r*(t*t-n)+n;return i<0?0:Math.sqrt(i)},en=[X.$,Q.m,ee.J],ei=e=>en.find(t=>t.test(e));function eo(e){let t=ei(e);if((0,x.K)(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let r=t.parse(e);return t===ee.J&&(r=function({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,r/=100;let i=0,o=0,s=0;if(t/=100){let n=r<.5?r*(1+t):r+t-r*t,a=2*r-n;i=Y(a,n,e+1/3),o=Y(a,n,e),s=Y(a,n,e-1/3)}else i=o=s=r;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*s),alpha:n}}(r)),r}let es=(e,t)=>{let r=eo(e),n=eo(t);if(!r||!n)return et(e,t);let i={...r};return e=>(i.red=er(r.red,n.red,e),i.green=er(r.green,n.green,e),i.blue=er(r.blue,n.blue,e),i.alpha=(0,J.t)(r.alpha,n.alpha,e),Q.m.transform(i))};var ea=r(85385),el=r(57630);let eu=new Set(["none","hidden"]);function ec(e,t){return r=>(0,J.t)(e,t,r)}function ed(e){return"number"==typeof e?ec:"string"==typeof e?(0,el.t)(e)?et:ea.$.test(e)?es:ep:Array.isArray(e)?eh:"object"==typeof e?ea.$.test(e)?es:ef:et}function eh(e,t){let r=[...e],n=r.length,i=e.map((e,r)=>ed(e)(e,t[r]));return e=>{for(let t=0;t<n;t++)r[t]=i[t](e);return r}}function ef(e,t){let r={...e,...t},n={};for(let i in r)void 0!==e[i]&&void 0!==t[i]&&(n[i]=ed(e[i])(e[i],t[i]));return e=>{for(let t in n)r[t]=n[t](e);return r}}let ep=(e,t)=>{let r=E.P.createTransformer(t),n=(0,E.V)(e),i=(0,E.V)(t);return n.indexes.var.length===i.indexes.var.length&&n.indexes.color.length===i.indexes.color.length&&n.indexes.number.length>=i.indexes.number.length?eu.has(e)&&!i.values.length||eu.has(t)&&!n.values.length?eu.has(e)?r=>r<=0?e:t:r=>r>=1?t:e:(0,Z.z)(eh(function(e,t){var r;let n=[],i={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){let s=t.types[o],a=e.indexes[s][i[s]],l=null!==(r=e.values[a])&&void 0!==r?r:0;n[o]=l,i[s]++}return n}(n,i),i.values),r):((0,x.K)(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),et(e,t))};function eg(e,t,r){return"number"==typeof e&&"number"==typeof t&&"number"==typeof r?(0,J.t)(e,t,r):ed(e)(e,t)}function em({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){let i=K(n)?n.map(q):q(n),o={done:!1,value:t[0]},s=function(e,t,{clamp:r=!0,ease:n,mixer:i}={}){let o=e.length;if((0,x.k)(o===t.length,"Both input and output ranges must be the same length"),1===o)return()=>t[0];if(2===o&&e[0]===e[1])return()=>t[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=function(e,t,r){let n=[],i=r||eg,o=e.length-1;for(let r=0;r<o;r++){let o=i(e[r],e[r+1]);if(t){let e=Array.isArray(t)?t[r]||b.Z:t;o=(0,Z.z)(e,o)}n.push(o)}return n}(t,n,i),a=s.length,l=t=>{let r=0;if(a>1)for(;r<e.length-2&&!(t<e[r+1]);r++);let n=(0,G.Y)(e[r],e[r+1],t);return s[r](n)};return r?t=>l((0,A.u)(e[0],e[o-1],t)):l}((r&&r.length===t.length?r:function(e){let t=[0];return function(e,t){let r=e[e.length-1];for(let n=1;n<=t;n++){let i=(0,G.Y)(0,t,n);e.push((0,J.t)(r,1,i))}}(t,e.length-1),t}(t)).map(t=>t*e),t,{ease:Array.isArray(i)?i:t.map(()=>i||D).splice(0,t.length-1)});return{calculatedDuration:e,next:t=>(o.value=s(t),o.done=t>=e,o)}}let ey=e=>{let t=({timestamp:t})=>e(t);return{start:()=>g.Wi.update(t,!0),stop:()=>(0,g.Pn)(t),now:()=>g.frameData.isProcessing?g.frameData.timestamp:m.X.now()}},ev={decay:L,inertia:L,tween:em,keyframes:em,spring:O},eb=e=>e/100;class ew extends S{constructor({KeyframeResolver:e=w.e,...t}){super(t),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();let{onStop:e}=this.options;e&&e()};let{name:r,motionValue:n,keyframes:i}=this.options,o=(e,t)=>this.onKeyframesResolved(e,t);r&&n&&n.owner?this.resolver=n.owner.resolveKeyframes(i,o,r,n):this.resolver=new e(i,o,r,n),this.resolver.scheduleResolve()}initPlayback(e){let t,r;let{type:n="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:s,velocity:a=0}=this.options,l=ev[n]||em;l!==em&&"number"!=typeof e[0]&&(t=(0,Z.z)(eb,eg(e[0],e[1])),e=[0,100]);let u=l({...this.options,keyframes:e});"mirror"===s&&(r=l({...this.options,keyframes:[...e].reverse(),velocity:-a})),null===u.calculatedDuration&&(u.calculatedDuration=function(e){let t=0,r=e.next(t);for(;!r.done&&t<2e4;)t+=50,r=e.next(t);return t>=2e4?1/0:t}(u));let{calculatedDuration:c}=u,d=c+o;return{generator:u,mirroredGenerator:r,mapPercentToKeyframes:t,calculatedDuration:c,resolvedDuration:d,totalDuration:d*(i+1)-o}}onPostResolved(){let{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){let{resolved:r}=this;if(!r){let{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}let{finalKeyframe:n,generator:i,mirroredGenerator:o,mapPercentToKeyframes:s,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=r;if(null===this.startTime)return i.next(0);let{delay:d,repeat:h,repeatType:f,repeatDelay:g,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-u/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;let y=this.currentTime-d*(this.speed>=0?1:-1),v=this.speed>=0?y<0:y>u;this.currentTime=Math.max(y,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let b=this.currentTime,w=i;if(h){let e=Math.min(this.currentTime,u)/c,t=Math.floor(e),r=e%1;!r&&e>=1&&(r=1),1===r&&t--,(t=Math.min(t,h+1))%2&&("reverse"===f?(r=1-r,g&&(r-=g/c)):"mirror"===f&&(w=o)),b=(0,A.u)(0,1,r)*c}let x=v?{done:!1,value:a[0]}:w.next(b);s&&(x.value=s(x.value));let{done:E}=x;v||null===l||(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);let k=null===this.holdTime&&("finished"===this.state||"running"===this.state&&E);return k&&void 0!==n&&(x.value=p(a,this.options,n)),m&&m(x.value),k&&this.finish(),x}get duration(){let{resolved:e}=this;return e?(0,n.X)(e.calculatedDuration):0}get time(){return(0,n.X)(this.currentTime)}set time(e){e=(0,n.w)(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=(0,n.X)(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;let{driver:e=ey,onPlay:t}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),t&&t();let r=this.driver.now();null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime&&"finished"!==this.state||(this.startTime=r),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";let{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}let ex=e=>Array.isArray(e)&&"number"==typeof e[0],eE=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,ek={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:eE([0,.65,.55,1]),circOut:eE([.55,0,1,.45]),backIn:eE([.31,.01,.66,-.59]),backOut:eE([.33,1.53,.69,.99])};function eS(e){return eT(e)||ek.easeOut}function eT(e){if(e)return ex(e)?eE(e):Array.isArray(e)?e.map(eS):ek[e]}let eM=v(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),eA=new Set(["opacity","clipPath","filter","transform"]);class eP extends S{constructor(e){super(e);let{name:t,motionValue:r,keyframes:n}=this.options;this.resolver=new y.s(n,(e,t)=>this.onKeyframesResolved(e,t),t,r),this.resolver.scheduleResolve()}initPlayback(e,t){var r,n;let{duration:i=300,times:o,ease:s,type:a,motionValue:l,name:u}=this.options;if(!(null===(r=l.owner)||void 0===r?void 0:r.current))return!1;if("spring"===(n=this.options).type||"backgroundColor"===n.name||!function e(t){return!!(!t||"string"==typeof t&&t in ek||ex(t)||Array.isArray(t)&&t.every(e))}(n.ease)){let{onComplete:t,onUpdate:r,motionValue:n,...l}=this.options,u=function(e,t){let r=new ew({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0}),n={done:!1,value:e[0]},i=[],o=0;for(;!n.done&&o<2e4;)i.push((n=r.sample(o)).value),o+=10;return{times:void 0,keyframes:i,duration:o-10,ease:"linear"}}(e,l);1===(e=u.keyframes).length&&(e[1]=e[0]),i=u.duration,o=u.times,s=u.ease,a="keyframes"}let c=function(e,t,r,{delay:n=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a,times:l}={}){let u={[t]:r};l&&(u.offset=l);let c=eT(a);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:n,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:"reverse"===s?"alternate":"normal"})}(l.owner.current,u,e,{...this.options,duration:i,times:o,ease:s});return c.startTime=m.X.now(),this.pendingTimeline?(c.timeline=this.pendingTimeline,this.pendingTimeline=void 0):c.onfinish=()=>{let{onComplete:r}=this.options;l.set(p(e,this.options,t)),r&&r(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:i,times:o,type:a,ease:s,keyframes:e}}get duration(){let{resolved:e}=this;if(!e)return 0;let{duration:t}=e;return(0,n.X)(t)}get time(){let{resolved:e}=this;if(!e)return 0;let{animation:t}=e;return(0,n.X)(t.currentTime||0)}set time(e){let{resolved:t}=this;if(!t)return;let{animation:r}=t;r.currentTime=(0,n.w)(e)}get speed(){let{resolved:e}=this;if(!e)return 1;let{animation:t}=e;return t.playbackRate}set speed(e){let{resolved:t}=this;if(!t)return;let{animation:r}=t;r.playbackRate=e}get state(){let{resolved:e}=this;if(!e)return"idle";let{animation:t}=e;return t.playState}attachTimeline(e){if(this._resolved){let{resolved:t}=this;if(!t)return b.Z;let{animation:r}=t;r.timeline=e,r.onfinish=null}else this.pendingTimeline=e;return b.Z}play(){if(this.isStopped)return;let{resolved:e}=this;if(!e)return;let{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){let{resolved:e}=this;if(!e)return;let{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;let{resolved:e}=this;if(!e)return;let{animation:t,keyframes:r,duration:i,type:o,ease:s,times:a}=e;if("idle"!==t.playState&&"finished"!==t.playState){if(this.time){let{motionValue:e,onUpdate:t,onComplete:l,...u}=this.options,c=new ew({...u,keyframes:r,duration:i,type:o,ease:s,times:a,isGenerator:!0}),d=(0,n.w)(this.time);e.setWithVelocity(c.sample(d-10).value,c.sample(d).value,10)}this.cancel()}}complete(){let{resolved:e}=this;e&&e.animation.finish()}cancel(){let{resolved:e}=this;e&&e.animation.cancel()}static supports(e){let{motionValue:t,name:r,repeatDelay:n,repeatType:i,damping:o,type:s}=e;return eM()&&r&&eA.has(r)&&t&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate&&!n&&"mirror"!==i&&0!==o&&"inertia"!==s}}let eC=v(()=>void 0!==window.ScrollTimeline);class e_{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,t){return Promise.all(this.animations).then(e).catch(t)}getAll(e){return this.animations[0][e]}setAll(e,t){for(let r=0;r<this.animations.length;r++)this.animations[r][e]=t}attachTimeline(e){let t=this.animations.map(t=>{if(!eC()||!t.attachTimeline)return t.pause(),function(e,t){let r;let n=()=>{let{currentTime:n}=t,i=(null===n?0:n.value)/100;r!==i&&e(i),r=i};return g.Wi.update(n,!0),()=>(0,g.Pn)(n)}(e=>{t.time=t.duration*e},e);t.attachTimeline(e)});return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}let eI=(e,t,r,i={},o,s)=>a=>{let l=(0,c.e)(i,e)||{},f=l.delay||i.delay||0,{elapsed:m=0}=i;m-=(0,n.w)(f);let y={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-m,onUpdate:e=>{t.set(e),l.onUpdate&&l.onUpdate(e)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:s?void 0:o};(0,c.r)(l)||(y={...y,...u(e,y)}),y.duration&&(y.duration=(0,n.w)(y.duration)),y.repeatDelay&&(y.repeatDelay=(0,n.w)(y.repeatDelay)),void 0!==y.from&&(y.keyframes[0]=y.from);let v=!1;if(!1!==y.type&&(0!==y.duration||y.repeatDelay)||(y.duration=0,0!==y.delay||(v=!0)),(h.current||d.c.skipAnimations)&&(v=!0,y.duration=0,y.delay=0),v&&!s&&void 0!==t.get()){let e=p(y.keyframes,l);if(void 0!==e)return g.Wi.update(()=>{y.onUpdate(e),y.onComplete()}),new e_([])}return!s&&eP.supports(y)?new eP(y):new ew(y)}},68588:function(e,t,r){"use strict";r.d(t,{M:function(){return n}});let n="data-"+(0,r(93193).D)("framerAppearId")},93785:function(e,t,r){"use strict";r.d(t,{s:function(){return i}});var n=r(68588);function i(e){return e.getProps()[n.M]}},2445:function(e,t,r){"use strict";function n(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}r.d(t,{H:function(){return n}})},48488:function(e,t,r){"use strict";r.d(t,{C:function(){return n}});let n=e=>Array.isArray(e)},31056:function(e,t,r){"use strict";function n({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}function i(e,t){return e[t]||e.default||e}r.d(t,{e:function(){return i},r:function(){return n}})},82703:function(e,t,r){"use strict";r.d(t,{M:function(){return v}});var n=r(85893),i=r(67294),o=r(6337),s=r(4454),a=r(240),l=r(96681),u=r(16014);class c extends i.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function d({children:e,isPresent:t}){let r=(0,i.useId)(),o=(0,i.useRef)(null),s=(0,i.useRef)({width:0,height:0,top:0,left:0}),{nonce:a}=(0,i.useContext)(u._);return(0,i.useInsertionEffect)(()=>{let{width:e,height:n,top:i,left:l}=s.current;if(t||!o.current||!e||!n)return;o.current.dataset.motionPopId=r;let u=document.createElement("style");return a&&(u.nonce=a),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
          [data-motion-pop-id="${r}"] {
            position: absolute !important;
            width: ${e}px !important;
            height: ${n}px !important;
            top: ${i}px !important;
            left: ${l}px !important;
          }
        `),()=>{document.head.removeChild(u)}},[t]),(0,n.jsx)(c,{isPresent:t,childRef:o,sizeRef:s,children:i.cloneElement(e,{ref:o})})}let h=({children:e,initial:t,isPresent:r,onExitComplete:o,custom:s,presenceAffectsLayout:u,mode:c})=>{let h=(0,l.h)(f),p=(0,i.useId)(),g=(0,i.useMemo)(()=>({id:p,initial:t,isPresent:r,custom:s,onExitComplete:e=>{for(let t of(h.set(e,!0),h.values()))if(!t)return;o&&o()},register:e=>(h.set(e,!1),()=>h.delete(e))}),u?[Math.random()]:[r]);return(0,i.useMemo)(()=>{h.forEach((e,t)=>h.set(t,!1))},[r]),i.useEffect(()=>{r||h.size||!o||o()},[r]),"popLayout"===c&&(e=(0,n.jsx)(d,{isPresent:r,children:e})),(0,n.jsx)(a.O.Provider,{value:g,children:e})};function f(){return new Map}var p=r(25364),g=r(58868),m=r(45487);let y=e=>e.key||"",v=({children:e,custom:t,initial:r=!0,onExitComplete:a,exitBeforeEnter:l,presenceAffectsLayout:u=!0,mode:c="sync"})=>{var d;(0,m.k)(!l,"Replace exitBeforeEnter with mode='wait'");let f=(0,i.useContext)(p.p).forceRender||(0,o.N)()[0],v=(0,s.t)(),b=function(e){let t=[];return i.Children.forEach(e,e=>{(0,i.isValidElement)(e)&&t.push(e)}),t}(e),w=b,x=(0,i.useRef)(new Map).current,E=(0,i.useRef)(w),k=(0,i.useRef)(new Map).current,S=(0,i.useRef)(!0);if((0,g.L)(()=>{S.current=!1,function(e,t){e.forEach(e=>{let r=y(e);t.set(r,e)})}(b,k),E.current=w}),d=()=>{S.current=!0,k.clear(),x.clear()},(0,i.useEffect)(()=>()=>d(),[]),S.current)return(0,n.jsx)(n.Fragment,{children:w.map(e=>(0,n.jsx)(h,{isPresent:!0,initial:!!r&&void 0,presenceAffectsLayout:u,mode:c,children:e},y(e)))});w=[...w];let T=E.current.map(y),M=b.map(y),A=T.length;for(let e=0;e<A;e++){let t=T[e];-1!==M.indexOf(t)||x.has(t)||x.set(t,void 0)}return"wait"===c&&x.size&&(w=[]),x.forEach((e,r)=>{if(-1!==M.indexOf(r))return;let i=k.get(r);if(!i)return;let o=T.indexOf(r),s=e;s||(s=(0,n.jsx)(h,{isPresent:!1,onExitComplete:()=>{x.delete(r);let e=Array.from(k.keys()).filter(e=>!M.includes(e));if(e.forEach(e=>k.delete(e)),E.current=b.filter(t=>{let n=y(t);return n===r||e.includes(n)}),!x.size){if(!1===v.current)return;f(),a&&a()}},custom:t,presenceAffectsLayout:u,mode:c,children:i},y(i)),x.set(r,s)),w.splice(o,0,s)}),w=w.map(e=>{let t=e.key;return x.has(t)?e:(0,n.jsx)(h,{isPresent:!0,presenceAffectsLayout:u,mode:c,children:e},y(e))}),(0,n.jsx)(n.Fragment,{children:x.size?w:w.map(e=>(0,i.cloneElement)(e))})}},18522:function(e,t,r){"use strict";r.d(t,{X:function(){return a}});var n=r(85893),i=r(67294),o=r(70398),s=r(81879);function a({children:e,features:t,strict:r=!1}){let[,a]=(0,i.useState)(!l(t)),u=(0,i.useRef)(void 0);if(!l(t)){let{renderer:e,...r}=t;u.current=e,(0,s.K)(r)}return(0,i.useEffect)(()=>{l(t)&&t().then(({renderer:e,...t})=>{(0,s.K)(t),u.current=e,a(!0)})},[]),(0,n.jsx)(o.u.Provider,{value:{renderer:u.current,strict:r},children:e})}function l(e){return"function"==typeof e}},25364:function(e,t,r){"use strict";r.d(t,{p:function(){return n}});let n=(0,r(67294).createContext)({})},70398:function(e,t,r){"use strict";r.d(t,{u:function(){return n}});let n=(0,r(67294).createContext)({strict:!1})},16014:function(e,t,r){"use strict";r.d(t,{_:function(){return n}});let n=(0,r(67294).createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"})},24451:function(e,t,r){"use strict";r.d(t,{v:function(){return n}});let n=(0,r(67294).createContext)({})},240:function(e,t,r){"use strict";r.d(t,{O:function(){return n}});let n=(0,r(67294).createContext)(null)},41705:function(e,t,r){"use strict";r.d(t,{g:function(){return n}});let n=(0,r(67294).createContext)({})},27255:function(e,t,r){"use strict";r.d(t,{Bn:function(){return s},X7:function(){return a},Z7:function(){return o}});var n=r(90415),i=r(75129);let o=e=>1-Math.sin(Math.acos(e)),s=(0,i.M)(o),a=(0,n.o)(o)},90415:function(e,t,r){"use strict";r.d(t,{o:function(){return n}});let n=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2},75129:function(e,t,r){"use strict";r.d(t,{M:function(){return n}});let n=e=>t=>1-e(1-t)},18456:function(e,t,r){"use strict";function n(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}r.d(t,{E:function(){return n}})},70486:function(e,t,r){"use strict";r.d(t,{a:function(){return o}});var n=r(18456),i=r(28148);function o(e,t,r,o){return(0,n.E)(e,t,(0,i.s)(r),o)}},28148:function(e,t,r){"use strict";r.d(t,{Q:function(){return i},s:function(){return o}});var n=r(9403);function i(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}let o=e=>t=>(0,n.D)(t)&&e(t,i(t))},9403:function(e,t,r){"use strict";r.d(t,{D:function(){return n}});let n=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary},89727:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var n=r(22081);class i{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){let t=this.order.indexOf(e);-1!==t&&(this.order.splice(t,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}let o=["read","resolveKeyframes","update","preRender","render","postRender"];function s(e,t){let r=!1,s=!0,a={delta:0,timestamp:0,isProcessing:!1},l=o.reduce((e,t)=>(e[t]=function(e){let t=new i,r=new i,n=0,o=!1,s=!1,a=new WeakSet,l={schedule:(e,i=!1,s=!1)=>{let l=s&&o,u=l?t:r;return i&&a.add(e),u.add(e)&&l&&o&&(n=t.order.length),e},cancel:e=>{r.remove(e),a.delete(e)},process:i=>{if(o){s=!0;return}if(o=!0,[t,r]=[r,t],r.clear(),n=t.order.length)for(let r=0;r<n;r++){let n=t.order[r];a.has(n)&&(l.schedule(n),e()),n(i)}o=!1,s&&(s=!1,l.process(i))}};return l}(()=>r=!0),e),{}),u=e=>{l[e].process(a)},c=()=>{let i=n.c.useManualTiming?a.timestamp:performance.now();r=!1,a.delta=s?1e3/60:Math.max(Math.min(i-a.timestamp,40),1),a.timestamp=i,a.isProcessing=!0,o.forEach(u),a.isProcessing=!1,r&&t&&(s=!1,e(c))},d=()=>{r=!0,s=!0,a.isProcessing||e(c)};return{schedule:o.reduce((e,t)=>{let n=l[t];return e[t]=(e,t=!1,i=!1)=>(r||d(),n.schedule(e,t,i)),e},{}),cancel:e=>o.forEach(t=>l[t].cancel(e)),state:a,steps:l}}},26166:function(e,t,r){"use strict";r.d(t,{Pn:function(){return o},S6:function(){return a},Wi:function(){return i},frameData:function(){return s}});var n=r(81662);let{schedule:i,cancel:o,state:s,steps:a}=(0,r(89727).Z)("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:n.Z,!0)},83582:function(e,t,r){"use strict";r.d(t,{g:function(){return n}});let{schedule:n,cancel:i}=(0,r(89727).Z)(queueMicrotask,!1)},1117:function(e,t,r){"use strict";let n;r.d(t,{X:function(){return a}});var i=r(22081),o=r(26166);function s(){n=void 0}let a={now:()=>(void 0===n&&a.set(o.frameData.isProcessing||i.c.useManualTiming?o.frameData.timestamp:performance.now()),n),set:e=>{n=e,queueMicrotask(s)}}},37544:function(e,t,r){"use strict";function n(e){let t=null;return()=>null===t&&(t=e,()=>{t=null})}r.d(t,{fJ:function(){return s},gD:function(){return a}});let i=n("dragHorizontal"),o=n("dragVertical");function s(e){let t=!1;if("y"===e)t=o();else if("x"===e)t=i();else{let e=i(),r=o();e&&r?t=()=>{e(),r()}:(e&&e(),r&&r())}return t}function a(){let e=s(!0);return!e||(e(),!1)}},50806:function(e,t,r){"use strict";r.d(t,{L:function(){return n}});class n{constructor(e){this.isMounted=!1,this.node=e}update(){}}},60534:function(e,t,r){"use strict";r.d(t,{s:function(){return C}});var n=r(2445),i=r(48488);function o(e,t){if(!Array.isArray(t))return!1;let r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}var s=r(97732),a=r(79432);function l(e,t,r){let n=e.getProps();return(0,a.o)(n,t,void 0!==r?r:n.custom,e)}var u=r(22963),c=r(94714),d=r(56728),h=r(12490),f=r(8715),p=r(33234),g=r(31056),m=r(93785),y=r(26166);function v(e,t,{delay:r=0,transitionOverride:n,type:i}={}){var o;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...u}=t,v=e.getValue("willChange");n&&(s=n);let b=[],w=i&&e.animationState&&e.animationState.getState()[i];for(let t in u){let n=e.getValue(t,null!==(o=e.latestValues[t])&&void 0!==o?o:null),i=u[t];if(void 0===i||w&&function({protectedKeys:e,needsAnimating:t},r){let n=e.hasOwnProperty(r)&&!0!==t[r];return t[r]=!1,n}(w,t))continue;let a={delay:r,elapsed:0,...(0,g.e)(s||{},t)},l=!1;if(window.HandoffAppearAnimations){let r=(0,m.s)(e);if(r){let e=window.HandoffAppearAnimations(r,t,n,y.Wi);null!==e&&(a.elapsed=e,l=!0)}}n.start((0,d.v)(t,n,i,e.shouldReduceMotion&&c.G.has(t)?{type:!1}:a,e,l));let f=n.animation;f&&((0,h.L)(v)&&(v.add(t),f.then(()=>v.remove(t))),b.push(f))}return a&&Promise.all(b).then(()=>{y.Wi.update(()=>{a&&function(e,t){let{transitionEnd:r={},transition:n={},...i}=l(e,t)||{};for(let t in i={...i,...r}){let r=(0,f.Y)(i[t]);e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,(0,p.BX)(r))}}(e,a)})}),b}function b(e,t,r={}){var n;let i=l(e,t,"exit"===r.type?null===(n=e.presenceContext)||void 0===n?void 0:n.custom:void 0),{transition:o=e.getDefaultTransition()||{}}=i||{};r.transitionOverride&&(o=r.transitionOverride);let s=i?()=>Promise.all(v(e,i,r)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(n=0)=>{let{delayChildren:i=0,staggerChildren:s,staggerDirection:a}=o;return function(e,t,r=0,n=0,i=1,o){let s=[],a=(e.variantChildren.size-1)*n,l=1===i?(e=0)=>e*n:(e=0)=>a-e*n;return Array.from(e.variantChildren).sort(w).forEach((e,n)=>{e.notify("AnimationStart",t),s.push(b(e,t,{...o,delay:r+l(n)}).then(()=>e.notify("AnimationComplete",t)))}),Promise.all(s)}(e,t,i+n,s,a,r)}:()=>Promise.resolve(),{when:u}=o;if(!u)return Promise.all([s(),a(r.delay)]);{let[e,t]="beforeChildren"===u?[s,a]:[a,s];return e().then(()=>t())}}function w(e,t){return e.sortNodePosition(t)}let x=[...u.e].reverse(),E=u.e.length;function k(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function S(){return{animate:k(!0),whileInView:k(),whileHover:k(),whileTap:k(),whileDrag:k(),whileFocus:k(),exit:k()}}var T=r(50806);class M extends T.L{constructor(e){super(e),e.animationState||(e.animationState=function(e){let t=t=>Promise.all(t.map(({animation:t,options:r})=>(function(e,t,r={}){let n;if(e.notify("AnimationStart",t),Array.isArray(t))n=Promise.all(t.map(t=>b(e,t,r)));else if("string"==typeof t)n=b(e,t,r);else{let i="function"==typeof t?l(e,t,r.custom):t;n=Promise.all(v(e,i,r))}return n.then(()=>{y.Wi.postRender(()=>{e.notify("AnimationComplete",t)})})})(e,t,r))),r=S(),a=!0,u=t=>(r,n)=>{var i;let o=l(e,n,"exit"===t?null===(i=e.presenceContext)||void 0===i?void 0:i.custom:void 0);if(o){let{transition:e,transitionEnd:t,...n}=o;r={...r,...n,...t}}return r};function c(l){let c=e.getProps(),d=e.getVariantContext(!0)||{},h=[],f=new Set,p={},g=1/0;for(let t=0;t<E;t++){var m;let y=x[t],v=r[y],b=void 0!==c[y]?c[y]:d[y],w=(0,s.$)(b),E=y===l?v.isActive:null;!1===E&&(g=t);let k=b===d[y]&&b!==c[y]&&w;if(k&&a&&e.manuallyAnimateOnMount&&(k=!1),v.protectedKeys={...p},!v.isActive&&null===E||!b&&!v.prevProp||(0,n.H)(b)||"boolean"==typeof b)continue;let S=(m=v.prevProp,("string"==typeof b?b!==m:!!Array.isArray(b)&&!o(b,m))||y===l&&v.isActive&&!k&&w||t>g&&w),T=!1,M=Array.isArray(b)?b:[b],A=M.reduce(u(y),{});!1===E&&(A={});let{prevResolvedValues:P={}}=v,C={...P,...A},_=t=>{S=!0,f.has(t)&&(T=!0,f.delete(t)),v.needsAnimating[t]=!0;let r=e.getValue(t);r&&(r.liveStyle=!1)};for(let e in C){let t=A[e],r=P[e];if(!p.hasOwnProperty(e))((0,i.C)(t)&&(0,i.C)(r)?o(t,r):t===r)?void 0!==t&&f.has(e)?_(e):v.protectedKeys[e]=!0:null!=t?_(e):f.add(e)}v.prevProp=b,v.prevResolvedValues=A,v.isActive&&(p={...p,...A}),a&&e.blockInitialAnimation&&(S=!1),S&&(!k||T)&&h.push(...M.map(e=>({animation:e,options:{type:y}})))}if(f.size){let t={};f.forEach(r=>{let n=e.getBaseTarget(r),i=e.getValue(r);i&&(i.liveStyle=!0),t[r]=null!=n?n:null}),h.push({animation:t})}let y=!!h.length;return a&&(!1===c.initial||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(y=!1),a=!1,y?t(h):Promise.resolve()}return{animateChanges:c,setActive:function(t,n){var i;if(r[t].isActive===n)return Promise.resolve();null===(i=e.variantChildren)||void 0===i||i.forEach(e=>{var r;return null===(r=e.animationState)||void 0===r?void 0:r.setActive(t,n)}),r[t].isActive=n;let o=c(t);for(let e in r)r[e].protectedKeys={};return o},setAnimateFunction:function(r){t=r(e)},getState:()=>r,reset:()=>{r=S(),a=!0}}}(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();(0,n.H)(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}let A=0;class P extends T.L{constructor(){super(...arguments),this.id=A++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;let n=this.node.animationState.setActive("exit",!e);t&&!e&&n.then(()=>t(this.id))}mount(){let{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}let C={animation:{Feature:M},exit:{Feature:P}}},9442:function(e,t,r){"use strict";r.d(t,{featureDefinitions:function(){return i}});let n={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"]},i={};for(let e in n)i[e]={isEnabled:t=>n[e].some(e=>!!t[e])}},33899:function(e,t,r){"use strict";r.d(t,{E:function(){return k}});var n=r(70486),i=r(83624),o=r(37544),s=r(50806),a=r(26166);function l(e,t){let r=t?"onHoverStart":"onHoverEnd";return(0,n.a)(e.current,t?"pointerenter":"pointerleave",(n,i)=>{if("touch"===n.pointerType||(0,o.gD)())return;let s=e.getProps();e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",t);let l=s[r];l&&a.Wi.postRender(()=>l(n,i))},{passive:!e.getProps()[r]})}class u extends s.L{mount(){this.unmount=(0,i.z)(l(this.node,!0),l(this.node,!1))}unmount(){}}var c=r(18456);class d extends s.L{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&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=(0,i.z)((0,c.E)(this.node.current,"focus",()=>this.onFocus()),(0,c.E)(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}var h=r(28148);let f=(e,t)=>!!t&&(e===t||f(e,t.parentElement));var p=r(81662);function g(e,t){if(!t)return;let r=new PointerEvent("pointer"+e);t(r,(0,h.Q)(r))}class m extends s.L{constructor(){super(...arguments),this.removeStartListeners=p.Z,this.removeEndListeners=p.Z,this.removeAccessibleListeners=p.Z,this.startPointerPress=(e,t)=>{if(this.isPressing)return;this.removeEndListeners();let r=this.node.getProps(),o=(0,n.a)(window,"pointerup",(e,t)=>{if(!this.checkPressEnd())return;let{onTap:r,onTapCancel:n,globalTapTarget:i}=this.node.getProps(),o=i||f(this.node.current,e.target)?r:n;o&&a.Wi.update(()=>o(e,t))},{passive:!(r.onTap||r.onPointerUp)}),s=(0,n.a)(window,"pointercancel",(e,t)=>this.cancelPress(e,t),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=(0,i.z)(o,s),this.startPress(e,t)},this.startAccessiblePress=()=>{let e=(0,c.E)(this.node.current,"keydown",e=>{"Enter"!==e.key||this.isPressing||(this.removeEndListeners(),this.removeEndListeners=(0,c.E)(this.node.current,"keyup",e=>{"Enter"===e.key&&this.checkPressEnd()&&g("up",(e,t)=>{let{onTap:r}=this.node.getProps();r&&a.Wi.postRender(()=>r(e,t))})}),g("down",(e,t)=>{this.startPress(e,t)}))}),t=(0,c.E)(this.node.current,"blur",()=>{this.isPressing&&g("cancel",(e,t)=>this.cancelPress(e,t))});this.removeAccessibleListeners=(0,i.z)(e,t)}}startPress(e,t){this.isPressing=!0;let{onTapStart:r,whileTap:n}=this.node.getProps();n&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&a.Wi.postRender(()=>r(e,t))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!(0,o.gD)()}cancelPress(e,t){if(!this.checkPressEnd())return;let{onTapCancel:r}=this.node.getProps();r&&a.Wi.postRender(()=>r(e,t))}mount(){let e=this.node.getProps(),t=(0,n.a)(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),r=(0,c.E)(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=(0,i.z)(t,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}let y=new WeakMap,v=new WeakMap,b=e=>{let t=y.get(e.target);t&&t(e)},w=e=>{e.forEach(b)},x={some:0,all:1};class E extends s.L{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:e={}}=this.node.getProps(),{root:t,margin:r,amount:n="some",once:i}=e,o={root:t?t.current:void 0,rootMargin:r,threshold:"number"==typeof n?n:x[n]};return function(e,t,r){let n=function({root:e,...t}){let r=e||document;v.has(r)||v.set(r,{});let n=v.get(r),i=JSON.stringify(t);return n[i]||(n[i]=new IntersectionObserver(w,{root:e,...t})),n[i]}(t);return y.set(e,r),n.observe(e),()=>{y.delete(e),n.unobserve(e)}}(this.node.current,o,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:r,onViewportLeave:n}=this.node.getProps(),o=t?r:n;o&&o(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;let{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}(e,t))&&this.startObserver()}unmount(){}}let k={inView:{Feature:E},tap:{Feature:m},focus:{Feature:d},hover:{Feature:u}}},81879:function(e,t,r){"use strict";r.d(t,{K:function(){return i}});var n=r(9442);function i(e){for(let t in e)n.featureDefinitions[t]={...n.featureDefinitions[t],...e[t]}}},56816:function(e,t,r){"use strict";r.d(t,{j:function(){return o}});var n=r(64561),i=r(94714);function o(e,{layout:t,layoutId:r}){return i.G.has(e)||e.startsWith("origin")||(t||void 0!==r)&&(!!n.P[e]||"opacity"===e)}},76117:function(e,t,r){"use strict";function n({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function i({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function o(e,t){if(!t)return e;let r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}r.d(t,{d7:function(){return o},i8:function(){return n},z2:function(){return i}})},16e3:function(e,t,r){"use strict";r.d(t,{D2:function(){return g},YY:function(){return u},am:function(){return d},o2:function(){return l},q2:function(){return o}});var n=r(40179),i=r(99527);function o(e,t,r){return r+t*(e-r)}function s(e,t,r,n,i){return void 0!==i&&(e=n+i*(e-n)),n+r*(e-n)+t}function a(e,t=0,r=1,n,i){e.min=s(e.min,t,r,n,i),e.max=s(e.max,t,r,n,i)}function l(e,{x:t,y:r}){a(e.x,t.translate,t.scale,t.originPoint),a(e.y,r.translate,r.scale,r.originPoint)}function u(e,t,r,n=!1){let o,s;let a=r.length;if(a){t.x=t.y=1;for(let u=0;u<a;u++){s=(o=r[u]).projectionDelta;let a=o.instance;(!a||!a.style||"contents"!==a.style.display)&&(n&&o.options.layoutScroll&&o.scroll&&o!==o.root&&g(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,l(e,s)),n&&(0,i.ud)(o.latestValues)&&g(e,o.latestValues))}t.x=c(t.x),t.y=c(t.y)}}function c(e){return Number.isInteger(e)?e:e>1.0000000000001||e<.999999999999?e:1}function d(e,t){e.min=e.min+t,e.max=e.max+t}function h(e,t,[r,i,o]){let s=void 0!==t[o]?t[o]:.5,l=(0,n.t)(e.min,e.max,s);a(e,t[r],t[i],l,t.scale)}let f=["x","scaleX","originX"],p=["y","scaleY","originY"];function g(e,t){h(e.x,t,f),h(e.y,t,p)}},61512:function(e,t,r){"use strict";r.d(t,{dO:function(){return s},wc:function(){return i}});let n=()=>({translate:0,scale:1,origin:0,originPoint:0}),i=()=>({x:n(),y:n()}),o=()=>({min:0,max:0}),s=()=>({x:o(),y:o()})},64561:function(e,t,r){"use strict";r.d(t,{B:function(){return i},P:function(){return n}});let n={};function i(e){Object.assign(n,e)}},99527:function(e,t,r){"use strict";function n(e){return void 0===e||1===e}function i({scale:e,scaleX:t,scaleY:r}){return!n(e)||!n(t)||!n(r)}function o(e){return i(e)||s(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function s(e){var t,r;return(t=e.x)&&"0%"!==t||(r=e.y)&&"0%"!==r}r.d(t,{D_:function(){return s},Lj:function(){return i},ud:function(){return o}})},56460:function(e,t,r){"use strict";r.d(t,{J:function(){return o},z:function(){return s}});var n=r(76117),i=r(16e3);function o(e,t){return(0,n.i8)((0,n.d7)(e.getBoundingClientRect(),t))}function s(e,t,r){let n=o(e,r),{scroll:s}=t;return s&&((0,i.am)(n.x,s.offset.x),(0,i.am)(n.y,s.offset.y)),n}},66484:function(e,t,r){"use strict";r.d(t,{s:function(){return p}});var n=r(30681),i=r(45487),o=r(33441),s=r(57630);let a=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;var l=r(6383),u=r(56440),c=r(41568),d=r(51550),h=r(79135);let f=new Set(["auto","none","0"]);class p extends c.e{constructor(e,t,r,n){super(e,t,r,n,null==n?void 0:n.owner,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:r}=this;if(!t.current)return;super.readKeyframes();for(let r=0;r<e.length;r++){let n=e[r];if("string"==typeof n&&(n=n.trim(),(0,s.t)(n))){let l=function e(t,r,n=1){(0,i.k)(n<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);let[l,u]=function(e){let t=a.exec(e);if(!t)return[,];let[,r,n,i]=t;return[`--${null!=r?r:n}`,i]}(t);if(!l)return;let c=window.getComputedStyle(r).getPropertyValue(l);if(c){let e=c.trim();return(0,o.P)(e)?parseFloat(e):e}return(0,s.t)(u)?e(u,r,n+1):u}(n,t.current);void 0!==l&&(e[r]=l),r===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!l.z2.has(r)||2!==e.length)return;let[n,c]=e,d=(0,u.C)(n),h=(0,u.C)(c);if(d!==h){if((0,l.mP)(d)&&(0,l.mP)(h))for(let t=0;t<e.length;t++){let r=e[t];"string"==typeof r&&(e[t]=parseFloat(r))}else this.needsMeasurement=!0}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,r=[];for(let t=0;t<e.length;t++){var i;("number"==typeof(i=e[t])?0===i:null===i||"none"===i||"0"===i||(0,n.W)(i))&&r.push(t)}r.length&&function(e,t,r){let n,i=0;for(;i<e.length&&!n;){let t=e[i];"string"==typeof t&&!f.has(t)&&(0,d.V)(t).values.length&&(n=e[i]),i++}if(n&&r)for(let i of t)e[i]=(0,h.T)(r,n)}(e,r,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:r}=this;if(!e.current)return;"height"===r&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=l.lw[r](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let n=t[t.length-1];void 0!==n&&e.getValue(r,n).jump(n,!1)}measureEndState(){var e;let{element:t,name:r,unresolvedKeyframes:n}=this;if(!t.current)return;let i=t.getValue(r);i&&i.jump(this.measuredOrigin,!1);let o=n.length-1,s=n[o];n[o]=l.lw[r](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach(([e,r])=>{t.getValue(e).set(r)}),this.resolveNoneKeyframes()}}},3319:function(e,t,r){"use strict";r.d(t,{b:function(){return J}});var n=r(67294),i=r(38057),o=r(57630),s=r(94714),a=r(50189),l=r(34242),u=r(2728),c=r(56460),d=r(61512),h=r(11741);let f={current:null},p={current:!1};var g=r(21560),m=r(33234),y=r(12490),v=r(40406),b=r(7504),w=r(97732),x=r(79432),E=r(9442),k=r(22963);let S=new WeakMap;var T=r(41568),M=r(33441),A=r(30681),P=r(85385),C=r(51550),_=r(56440),I=r(88340);let O=[..._.$,P.$,C.P],L=e=>O.find((0,I.l)(e));var R=r(79135),j=r(26166);let B=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],N=k.V.length;class D{scrapeMotionValuesFromProps(e,t,r){return{}}constructor({parent:e,props:t,presenceContext:r,reducedMotionConfig:n,blockInitialAnimation:i,visualState:o},s={}){this.resolveKeyframes=(e,t,r,n)=>new this.KeyframeResolver(e,t,r,n,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=T.e,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=()=>j.Wi.render(this.render,!1,!0);let{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.options=s,this.blockInitialAnimation=!!i,this.isControllingVariants=(0,b.G)(t),this.isVariantNode=(0,b.M)(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...c}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in c){let t=c[e];void 0!==a[e]&&(0,v.i)(t)&&(t.set(a[e],!1),(0,y.L)(u)&&u.add(e))}}mount(e){this.current=e,S.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),p.current||function(){if(p.current=!0,h.j){if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>f.current=e.matches;e.addListener(t),t()}else f.current=!1}}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||f.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){for(let e in S.delete(this.current),this.projection&&this.projection.unmount(),(0,j.Pn)(this.notifyUpdate),(0,j.Pn)(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){let r=s.G.has(e),n=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&j.Wi.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=t.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{n(),i(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in E.featureDefinitions){let t=E.featureDefinitions[e];if(!t)continue;let{isEnabled:r,Feature:n}=t;if(!this.features[e]&&n&&r(this.props)&&(this.features[e]=new n(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):(0,d.dO)()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<B.length;t++){let r=B[t];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);let n=e["on"+r];n&&(this.propEventSubscriptions[r]=this.on(r,n))}this.prevMotionValues=function(e,t,r){let{willChange:n}=t;for(let i in t){let o=t[i],s=r[i];if((0,v.i)(o))e.addValue(i,o),(0,y.L)(n)&&n.add(i);else if((0,v.i)(s))e.addValue(i,(0,m.BX)(o,{owner:e})),(0,y.L)(n)&&n.remove(i);else if(s!==o){if(e.hasValue(i)){let t=e.getValue(i);!0===t.liveStyle?t.jump(o):t.hasAnimated||t.set(o)}else{let t=e.getStaticValue(i);e.addValue(i,(0,m.BX)(void 0!==t?t:o,{owner:e}))}}}for(let n in r)void 0===t[n]&&e.removeValue(n);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){let e=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(e.initial=this.props.initial),e}let t={};for(let e=0;e<N;e++){let r=k.V[e],n=this.props[r];((0,w.$)(n)||!1===n)&&(t[r]=n)}return t}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let r=this.values.get(e);t!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return void 0===r&&void 0!==t&&(r=(0,m.BX)(null===t?void 0:t,{owner:this}),this.addValue(e,r)),r}readValue(e,t){var r;let n=void 0===this.latestValues[e]&&this.current?null!==(r=this.getBaseTargetFromProps(this.props,e))&&void 0!==r?r:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=n&&("string"==typeof n&&((0,M.P)(n)||(0,A.W)(n))?n=parseFloat(n):!L(n)&&C.P.test(t)&&(n=(0,R.T)(e,t)),this.setBaseTarget(e,(0,v.i)(n)?n.get():n)),(0,v.i)(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;let r;let{initial:n}=this.props;if("string"==typeof n||"object"==typeof n){let i=(0,x.o)(this.props,n,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);i&&(r=i[e])}if(n&&void 0!==r)return r;let i=this.getBaseTargetFromProps(this.props,e);return void 0===i||(0,v.i)(i)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new g.L),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}var K=r(66484);class U extends D{constructor(){super(...arguments),this.KeyframeResolver=K.s}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:r}){delete t[e],delete r[e]}}class z extends U{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,t){if(s.G.has(t)){let e=(0,u.A)(t);return e&&e.default||0}{let r=window.getComputedStyle(e),n=((0,o.f)(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof n?n.trim():n}}measureInstanceViewportBox(e,{transformPagePoint:t}){return(0,c.J)(e,t)}build(e,t,r,n){(0,i.r)(e,t,r,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,r){return(0,a.U)(e,t,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;(0,v.i)(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}renderInstance(e,t,r,n){(0,l.N)(e,t,r,n)}}var F=r(16832),W=r(85415),V=r(93193),$=r(77302),H=r(68504),q=r(79854);class Z extends U{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(s.G.has(t)){let e=(0,u.A)(t);return e&&e.default||0}return t=$.s.has(t)?t:(0,V.D)(t),e.getAttribute(t)}measureInstanceViewportBox(){return(0,d.dO)()}scrapeMotionValuesFromProps(e,t,r){return(0,F.U)(e,t,r)}build(e,t,r,n){(0,W.i)(e,t,r,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,r,n){(0,H.K)(e,t,r,n)}mount(e){this.isSVGTag=(0,q.a)(e.tagName),super.mount(e)}}var G=r(62627);let J=(e,t)=>(0,G.q)(e)?new Z(t,{enableHardwareAcceleration:!1}):new z(t,{allowProjection:e!==n.Fragment,enableHardwareAcceleration:!0})},1673:function(e,t,r){"use strict";r.d(t,{H:function(){return o}});var n=r(60534),i=r(33899);let o={renderer:r(3319).b,...n.s,...i.E}},12560:function(e,t,r){"use strict";r.d(t,{m:function(){return o}});var n=r(5401),i=r(4007);let o=(0,n.D)(i.w)},5401:function(e,t,r){"use strict";r.d(t,{D:function(){return S}});var n=r(85893),i=r(67294),o=r(16014),s=r(24451),a=r(240),l=r(58868),u=r(70398),c=r(68588),d=r(83582),h=r(51804),f=r(41705);let p=!1;function g(){window.HandoffComplete=!0}var m=r(97732),y=r(7504);function v(e){return Array.isArray(e)?e.join(" "):e}var b=r(81879),w=r(11741),x=r(25364);let E=Symbol.for("motionComponentSymbol");var k=r(9442);function S(e){function t(t,r={}){return function({preloadedFeatures:e,createVisualElement:t,useRender:r,useVisualState:S,Component:T}){e&&(0,b.K)(e);let M=(0,i.forwardRef)(function(e,b){var E;let M;let A={...(0,i.useContext)(o._),...e,layoutId:function({layoutId:e}){let t=(0,i.useContext)(x.p).id;return t&&void 0!==e?t+"-"+e:e}(e)},{isStatic:P}=A,C=function(e){let{initial:t,animate:r}=function(e,t){if((0,y.G)(e)){let{initial:t,animate:r}=e;return{initial:!1===t||(0,m.$)(t)?t:void 0,animate:(0,m.$)(r)?r:void 0}}return!1!==e.inherit?t:{}}(e,(0,i.useContext)(s.v));return(0,i.useMemo)(()=>({initial:t,animate:r}),[v(t),v(r)])}(e),_=S(e,P);if(!P&&w.j){(0,i.useContext)(u.u).strict;let e=function(e){let{drag:t,layout:r}=k.featureDefinitions;if(!t&&!r)return{};let n={...t,...r};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==r?void 0:r.isEnabled(e))?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}(A);M=e.MeasureLayout,C.visualElement=function(e,t,r,n,m){let{visualElement:y}=(0,i.useContext)(s.v),v=(0,i.useContext)(u.u),b=(0,i.useContext)(a.O),w=(0,i.useContext)(o._).reducedMotion,x=(0,i.useRef)();n=n||v.renderer,!x.current&&n&&(x.current=n(e,{visualState:t,parent:y,props:r,presenceContext:b,blockInitialAnimation:!!b&&!1===b.initial,reducedMotionConfig:w}));let E=x.current,k=(0,i.useContext)(f.g);E&&!E.projection&&m&&("html"===E.type||"svg"===E.type)&&function(e,t,r,n){let{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:u}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:function e(t){if(t)return!1!==t.options.allowProjection?t.projection:e(t.parent)}(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!s||a&&(0,h.I)(a),visualElement:e,scheduleRender:()=>e.scheduleRender(),animationType:"string"==typeof o?o:"both",initialPromotionConfig:n,layoutScroll:l,layoutRoot:u})}(x.current,r,m,k),(0,i.useInsertionEffect)(()=>{E&&E.update(r,b)});let S=(0,i.useRef)(!!(r[c.M]&&!window.HandoffComplete));return(0,l.L)(()=>{E&&(E.updateFeatures(),d.g.render(E.render),S.current&&E.animationState&&E.animationState.animateChanges())}),(0,i.useEffect)(()=>{E&&(!S.current&&E.animationState&&E.animationState.animateChanges(),S.current&&(S.current=!1,p||(p=!0,queueMicrotask(g))))}),E}(T,_,A,t,e.ProjectionNode)}return(0,n.jsxs)(s.v.Provider,{value:C,children:[M&&C.visualElement?(0,n.jsx)(M,{visualElement:C.visualElement,...A}):null,r(T,e,(E=C.visualElement,(0,i.useCallback)(e=>{e&&_.mount&&_.mount(e),E&&(e?E.mount(e):E.unmount()),b&&("function"==typeof b?b(e):(0,h.I)(b)&&(b.current=e))},[E])),_,P,C.visualElement)]})});return M[E]=T,M}(e(t,r))}if("undefined"==typeof Proxy)return t;let r=new Map;return new Proxy(t,{get:(e,n)=>(r.has(n)||r.set(n,t(n)),r.get(n))})}},93193:function(e,t,r){"use strict";r.d(t,{D:function(){return n}});let n=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase()},4007:function(e,t,r){"use strict";r.d(t,{w:function(){return _}});var n,i=r(62627),o=r(67294),s=r(56816),a=r(40406),l=r(38057);let u=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function c(e,t,r){for(let n in t)(0,a.i)(t[n])||(0,s.j)(n,r)||(e[n]=t[n])}let d=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function h(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||d.has(e)}let f=e=>!h(e);try{(n=require("@emotion/is-prop-valid").default)&&(f=e=>e.startsWith("on")?!h(e):n(e))}catch(e){}var p=r(85415);let g=()=>({...u(),attrs:{}});var m=r(79854),y=r(68504),v=r(16832),b=r(2445),w=r(240),x=r(79432),E=r(96681),k=r(16399),S=r(24451),T=r(7504);let M=e=>(t,r)=>{let n=(0,o.useContext)(S.v),i=(0,o.useContext)(w.O),s=()=>(function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:r},n,i,o){let s={latestValues:function(e,t,r,n){let i={},o=n(e,{});for(let e in o)i[e]=(0,k.b)(o[e]);let{initial:s,animate:a}=e,l=(0,T.G)(e),u=(0,T.M)(e);t&&u&&!l&&!1!==e.inherit&&(void 0===s&&(s=t.initial),void 0===a&&(a=t.animate));let c=!!r&&!1===r.initial,d=(c=c||!1===s)?a:s;return d&&"boolean"!=typeof d&&!(0,b.H)(d)&&(Array.isArray(d)?d:[d]).forEach(t=>{let r=(0,x.o)(e,t);if(!r)return;let{transitionEnd:n,transition:o,...s}=r;for(let e in s){let t=s[e];if(Array.isArray(t)){let e=c?t.length-1:0;t=t[e]}null!==t&&(i[e]=t)}for(let e in n)i[e]=n[e]}),i}(n,i,o,e),renderState:t()};return r&&(s.mount=e=>r(n,e,s)),s})(e,t,n,i);return r?s():(0,E.h)(s)};var A=r(26166);let P={useVisualState:M({scrapeMotionValuesFromProps:v.U,createRenderState:g,onMount:(e,t,{renderState:r,latestValues:n})=>{A.Wi.read(()=>{try{r.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){r.dimensions={x:0,y:0,width:0,height:0}}}),A.Wi.render(()=>{(0,p.i)(r,n,{enableHardwareAcceleration:!1},(0,m.a)(t.tagName),e.transformTemplate),(0,y.K)(t,r)})}})},C={useVisualState:M({scrapeMotionValuesFromProps:r(50189).U,createRenderState:u})};function _(e,{forwardMotionProps:t=!1},r,n){return{...(0,i.q)(e)?P:C,preloadedFeatures:r,useRender:function(e=!1){return(t,r,n,{latestValues:s},d)=>{let y=((0,i.q)(t)?function(e,t,r,n){let i=(0,o.useMemo)(()=>{let r=g();return(0,p.i)(r,t,{enableHardwareAcceleration:!1},(0,m.a)(n),e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){let t={};c(t,e.style,e),i.style={...t,...i.style}}return i}:function(e,t,r){let n={},i=function(e,t,r){let n=e.style||{},i={};return c(i,n,e),Object.assign(i,function({transformTemplate:e},t,r){return(0,o.useMemo)(()=>{let n=u();return(0,l.r)(n,t,{enableHardwareAcceleration:!r},e),Object.assign({},n.vars,n.style)},[t])}(e,t,r)),i}(e,t,r);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===e.drag?"none":`pan-${"x"===e.drag?"y":"x"}`),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=i,n})(r,s,d,t),v=function(e,t,r){let n={};for(let i in e)("values"!==i||"object"!=typeof e.values)&&(f(i)||!0===r&&h(i)||!t&&!h(i)||e.draggable&&i.startsWith("onDrag"))&&(n[i]=e[i]);return n}(r,"string"==typeof t,e),b=t!==o.Fragment?{...v,...y,ref:n}:{},{children:w}=r,x=(0,o.useMemo)(()=>(0,a.i)(w)?w.get():w,[w]);return(0,o.createElement)(t,{...b,children:x})}}(t),createVisualElement:n,Component:e}}},57630:function(e,t,r){"use strict";r.d(t,{f:function(){return i},t:function(){return s}});let n=e=>t=>"string"==typeof t&&t.startsWith(e),i=n("--"),o=n("var(--"),s=e=>!!o(e)&&a.test(e.split("/*")[0].trim()),a=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu},62627:function(e,t,r){"use strict";r.d(t,{q:function(){return i}});let n=["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 i(e){if("string"!=typeof e||e.includes("-"));else if(n.indexOf(e)>-1||/[A-Z]/u.test(e))return!0;return!1}},6383:function(e,t,r){"use strict";r.d(t,{Ei:function(){return h},lw:function(){return f},mP:function(){return a},z2:function(){return s}});var n=r(94714),i=r(61649),o=r(96190);let s=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),a=e=>e===i.Rx||e===o.px,l=(e,t)=>parseFloat(e.split(", ")[t]),u=(e,t)=>(r,{transform:n})=>{if("none"===n||!n)return 0;let i=n.match(/^matrix3d\((.+)\)$/u);if(i)return l(i[1],t);{let t=n.match(/^matrix\((.+)\)$/u);return t?l(t[1],e):0}},c=new Set(["x","y","z"]),d=n._.filter(e=>!c.has(e));function h(e){let t=[];return d.forEach(r=>{let n=e.getValue(r);void 0!==n&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}let f={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),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:u(4,13),y:u(5,14)};f.translateX=f.x,f.translateY=f.y},79135:function(e,t,r){"use strict";r.d(t,{T:function(){return s}});var n=r(51550),i=r(97197),o=r(2728);function s(e,t){let r=(0,o.A)(e);return r!==i.h&&(r=n.P),r.getAnimatableNone?r.getAnimatableNone(t):void 0}},2728:function(e,t,r){"use strict";r.d(t,{A:function(){return s}});var n=r(85385),i=r(97197);let o={...r(36173).j,color:n.$,backgroundColor:n.$,outlineColor:n.$,fill:n.$,stroke:n.$,borderColor:n.$,borderTopColor:n.$,borderRightColor:n.$,borderBottomColor:n.$,borderLeftColor:n.$,filter:i.h,WebkitFilter:i.h},s=e=>o[e]},56440:function(e,t,r){"use strict";r.d(t,{$:function(){return s},C:function(){return a}});var n=r(61649),i=r(96190),o=r(88340);let s=[n.Rx,i.px,i.aQ,i.RW,i.vw,i.vh,{test:e=>"auto"===e,parse:e=>e}],a=e=>s.find((0,o.l)(e))},36173:function(e,t,r){"use strict";r.d(t,{j:function(){return s}});var n=r(61649),i=r(96190);let o={...n.Rx,transform:Math.round},s={borderWidth:i.px,borderTopWidth:i.px,borderRightWidth:i.px,borderBottomWidth:i.px,borderLeftWidth:i.px,borderRadius:i.px,radius:i.px,borderTopLeftRadius:i.px,borderTopRightRadius:i.px,borderBottomRightRadius:i.px,borderBottomLeftRadius:i.px,width:i.px,maxWidth:i.px,height:i.px,maxHeight:i.px,size:i.px,top:i.px,right:i.px,bottom:i.px,left:i.px,padding:i.px,paddingTop:i.px,paddingRight:i.px,paddingBottom:i.px,paddingLeft:i.px,margin:i.px,marginTop:i.px,marginRight:i.px,marginBottom:i.px,marginLeft:i.px,rotate:i.RW,rotateX:i.RW,rotateY:i.RW,rotateZ:i.RW,scale:n.bA,scaleX:n.bA,scaleY:n.bA,scaleZ:n.bA,skew:i.RW,skewX:i.RW,skewY:i.RW,distance:i.px,translateX:i.px,translateY:i.px,translateZ:i.px,x:i.px,y:i.px,z:i.px,perspective:i.px,transformPerspective:i.px,opacity:n.Fq,originX:i.$C,originY:i.$C,originZ:i.px,zIndex:o,backgroundPositionX:i.px,backgroundPositionY:i.px,fillOpacity:n.Fq,strokeOpacity:n.Fq,numOctaves:o}},88340:function(e,t,r){"use strict";r.d(t,{l:function(){return n}});let n=e=>t=>t.test(e)},38057:function(e,t,r){"use strict";r.d(t,{r:function(){return u}});var n=r(94714);let i={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},o=n._.length;var s=r(57630);let a=(e,t)=>t&&"number"==typeof e?t.transform(e):e;var l=r(36173);function u(e,t,r,u){let{style:c,vars:d,transform:h,transformOrigin:f}=e,p=!1,g=!1,m=!0;for(let e in t){let r=t[e];if((0,s.f)(e)){d[e]=r;continue}let i=l.j[e],o=a(r,i);if(n.G.has(e)){if(p=!0,h[e]=o,!m)continue;r!==(i.default||0)&&(m=!1)}else e.startsWith("origin")?(g=!0,f[e]=o):c[e]=o}if(!t.transform&&(p||u?c.transform=function(e,{enableHardwareAcceleration:t=!0,allowTransformNone:r=!0},s,a){let l="";for(let t=0;t<o;t++){let r=n._[t];if(void 0!==e[r]){let t=i[r]||r;l+=`${t}(${e[r]}) `}}return t&&!e.z&&(l+="translateZ(0)"),l=l.trim(),a?l=a(e,s?"":l):r&&s&&(l="none"),l}(e.transform,r,m,u):c.transform&&(c.transform="none")),g){let{originX:e="50%",originY:t="50%",originZ:r=0}=f;c.transformOrigin=`${e} ${t} ${r}`}}},34242:function(e,t,r){"use strict";function n(e,{style:t,vars:r},n,i){for(let o in Object.assign(e.style,t,i&&i.getProjectionStyles(n)),r)e.style.setProperty(o,r[o])}r.d(t,{N:function(){return n}})},50189:function(e,t,r){"use strict";r.d(t,{U:function(){return o}});var n=r(56816),i=r(40406);function o(e,t,r){var o;let{style:s}=e,a={};for(let l in s)((0,i.i)(s[l])||t.style&&(0,i.i)(t.style[l])||(0,n.j)(l,e)||(null===(o=null==r?void 0:r.getValue(l))||void 0===o?void 0:o.liveStyle)!==void 0)&&(a[l]=s[l]);return a}},94714:function(e,t,r){"use strict";r.d(t,{G:function(){return i},_:function(){return n}});let n=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],i=new Set(n)},85415:function(e,t,r){"use strict";r.d(t,{i:function(){return l}});var n=r(38057),i=r(96190);function o(e,t,r){return"string"==typeof e?e:i.px.transform(t+r*e)}let s={offset:"stroke-dashoffset",array:"stroke-dasharray"},a={offset:"strokeDashoffset",array:"strokeDasharray"};function l(e,{attrX:t,attrY:r,attrScale:l,originX:u,originY:c,pathLength:d,pathSpacing:h=1,pathOffset:f=0,...p},g,m,y){if((0,n.r)(e,p,g,y),m){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:v,style:b,dimensions:w}=e;v.transform&&(w&&(b.transform=v.transform),delete v.transform),w&&(void 0!==u||void 0!==c||b.transform)&&(b.transformOrigin=function(e,t,r){let n=o(t,e.x,e.width),i=o(r,e.y,e.height);return`${n} ${i}`}(w,void 0!==u?u:.5,void 0!==c?c:.5)),void 0!==t&&(v.x=t),void 0!==r&&(v.y=r),void 0!==l&&(v.scale=l),void 0!==d&&function(e,t,r=1,n=0,o=!0){e.pathLength=1;let l=o?s:a;e[l.offset]=i.px.transform(-n);let u=i.px.transform(t),c=i.px.transform(r);e[l.array]=`${u} ${c}`}(v,d,h,f,!1)}},77302:function(e,t,r){"use strict";r.d(t,{s:function(){return n}});let n=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"])},79854:function(e,t,r){"use strict";r.d(t,{a:function(){return n}});let n=e=>"string"==typeof e&&"svg"===e.toLowerCase()},68504:function(e,t,r){"use strict";r.d(t,{K:function(){return s}});var n=r(93193),i=r(34242),o=r(77302);function s(e,t,r,s){for(let r in(0,i.N)(e,t,void 0,s),t.attrs)e.setAttribute(o.s.has(r)?r:(0,n.D)(r),t.attrs[r])}},16832:function(e,t,r){"use strict";r.d(t,{U:function(){return s}});var n=r(40406),i=r(50189),o=r(94714);function s(e,t,r){let s=(0,i.U)(e,t,r);for(let r in e)((0,n.i)(e[r])||(0,n.i)(t[r]))&&(s[-1!==o._.indexOf(r)?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r]=e[r]);return s}},41568:function(e,t,r){"use strict";r.d(t,{e:function(){return d},m:function(){return c}});var n=r(6383),i=r(26166);let o=new Set,s=!1,a=!1;function l(){if(a){let e=Array.from(o).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),r=new Map;t.forEach(e=>{let t=(0,n.Ei)(e);t.length&&(r.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=r.get(e);t&&t.forEach(([t,r])=>{var n;null===(n=e.getValue(t))||void 0===n||n.set(r)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}a=!1,s=!1,o.forEach(e=>e.complete()),o.clear()}function u(){o.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(a=!0)})}function c(){u(),l()}class d{constructor(e,t,r,n,i,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=r,this.motionValue=n,this.element=i,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(o.add(this),s||(s=!0,i.Wi.read(u),i.Wi.resolveKeyframes(l))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:r,motionValue:n}=this;for(let i=0;i<e.length;i++)if(null===e[i]){if(0===i){let i=null==n?void 0:n.get(),o=e[e.length-1];if(void 0!==i)e[0]=i;else if(r&&t){let n=r.readValue(t,o);null!=n&&(e[0]=n)}void 0===e[0]&&(e[0]=o),n&&void 0===i&&n.set(e[0])}else e[i]=e[i-1]}}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),o.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,o.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}},7504:function(e,t,r){"use strict";r.d(t,{G:function(){return s},M:function(){return a}});var n=r(2445),i=r(97732),o=r(22963);function s(e){return(0,n.H)(e.animate)||o.V.some(t=>(0,i.$)(e[t]))}function a(e){return!!(s(e)||e.variants)}},97732:function(e,t,r){"use strict";function n(e){return"string"==typeof e||Array.isArray(e)}r.d(t,{$:function(){return n}})},79432:function(e,t,r){"use strict";function n(e){let t=[{},{}];return null==e||e.values.forEach((e,r)=>{t[0][r]=e.get(),t[1][r]=e.getVelocity()}),t}function i(e,t,r,i){if("function"==typeof t){let[o,s]=n(i);t=t(void 0!==r?r:e.custom,o,s)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){let[o,s]=n(i);t=t(void 0!==r?r:e.custom,o,s)}return t}r.d(t,{o:function(){return i}})},22963:function(e,t,r){"use strict";r.d(t,{V:function(){return i},e:function(){return n}});let n=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],i=["initial",...n]},22081:function(e,t,r){"use strict";r.d(t,{c:function(){return n}});let n={skipAnimations:!1,useManualTiming:!1}},10010:function(e,t,r){"use strict";function n(e,t){-1===e.indexOf(t)&&e.push(t)}function i(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}r.d(t,{cl:function(){return i},y4:function(){return n}})},24169:function(e,t,r){"use strict";r.d(t,{u:function(){return n}});let n=(e,t,r)=>r>t?t:r<e?e:r},45487:function(e,t,r){"use strict";r.d(t,{K:function(){return i},k:function(){return o}});var n=r(81662);let i=n.Z,o=n.Z},11741:function(e,t,r){"use strict";r.d(t,{j:function(){return n}});let n="undefined"!=typeof document},33441:function(e,t,r){"use strict";r.d(t,{P:function(){return n}});let n=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e)},51804:function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}r.d(t,{I:function(){return n}})},30681:function(e,t,r){"use strict";r.d(t,{W:function(){return n}});let n=e=>/^0[^.\s]+$/u.test(e)},40179:function(e,t,r){"use strict";r.d(t,{t:function(){return n}});let n=(e,t,r)=>e+(t-e)*r},81662:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=e=>e},83624:function(e,t,r){"use strict";r.d(t,{z:function(){return i}});let n=(e,t)=>r=>t(e(r)),i=(...e)=>e.reduce(n)},23967:function(e,t,r){"use strict";r.d(t,{Y:function(){return n}});let n=(e,t,r)=>{let n=t-e;return 0===n?1:(r-e)/n}},8715:function(e,t,r){"use strict";r.d(t,{Y:function(){return o},p:function(){return i}});var n=r(48488);let i=e=>!!(e&&"object"==typeof e&&e.mix&&e.toValue),o=e=>(0,n.C)(e)?e[e.length-1]||0:e},21560:function(e,t,r){"use strict";r.d(t,{L:function(){return i}});var n=r(10010);class i{constructor(){this.subscriptions=[]}add(e){return(0,n.y4)(this.subscriptions,e),()=>(0,n.cl)(this.subscriptions,e)}notify(e,t,r){let n=this.subscriptions.length;if(n){if(1===n)this.subscriptions[0](e,t,r);else for(let i=0;i<n;i++){let n=this.subscriptions[i];n&&n(e,t,r)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}},86917:function(e,t,r){"use strict";r.d(t,{X:function(){return i},w:function(){return n}});let n=e=>1e3*e,i=e=>e/1e3},96681:function(e,t,r){"use strict";r.d(t,{h:function(){return i}});var n=r(67294);function i(e){let t=(0,n.useRef)(null);return null===t.current&&(t.current=e()),t.current}},6337:function(e,t,r){"use strict";r.d(t,{N:function(){return s}});var n=r(67294),i=r(4454),o=r(26166);function s(){let e=(0,i.t)(),[t,r]=(0,n.useState)(0),s=(0,n.useCallback)(()=>{e.current&&r(t+1)},[t]);return[(0,n.useCallback)(()=>o.Wi.postRender(s),[s]),t]}},4454:function(e,t,r){"use strict";r.d(t,{t:function(){return o}});var n=r(67294),i=r(58868);function o(){let e=(0,n.useRef)(!1);return(0,i.L)(()=>(e.current=!0,()=>{e.current=!1}),[]),e}},58868:function(e,t,r){"use strict";r.d(t,{L:function(){return i}});var n=r(67294);let i=r(11741).j?n.useLayoutEffect:n.useEffect},3038:function(e,t,r){"use strict";function n(e,t){return t?1e3/t*e:0}r.d(t,{R:function(){return n}})},33234:function(e,t,r){"use strict";r.d(t,{BX:function(){return c},Hg:function(){return u}});var n=r(21560),i=r(3038),o=r(1117),s=r(26166);let a=e=>!isNaN(parseFloat(e)),l={current:void 0};class u{constructor(e,t={}){this.version="11.2.12",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{let r=o.X.now();this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=o.X.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=a(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new n.L);let r=this.events[e].add(t);return"change"===e?()=>{r(),s.Wi.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,r){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return l.current&&l.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=o.X.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return(0,i.R)(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),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 c(e,t){return new u(e,t)}},26382:function(e,t,r){"use strict";r.d(t,{$:function(){return i}});var n=r(40819);let i={test:(0,r(98834).i)("#"),parse:function(e){let t="",r="",n="",i="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),i=e.substring(4,5),t+=t,r+=r,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}},transform:n.m.transform}},93184:function(e,t,r){"use strict";r.d(t,{J:function(){return a}});var n=r(61649),i=r(96190),o=r(36430),s=r(98834);let a={test:(0,s.i)("hsl","hue"),parse:(0,s.d)("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:s=1})=>"hsla("+Math.round(e)+", "+i.aQ.transform((0,o.Nw)(t))+", "+i.aQ.transform((0,o.Nw)(r))+", "+(0,o.Nw)(n.Fq.transform(s))+")"}},85385:function(e,t,r){"use strict";r.d(t,{$:function(){return a}});var n=r(36430),i=r(26382),o=r(93184),s=r(40819);let a={test:e=>s.m.test(e)||i.$.test(e)||o.J.test(e),parse:e=>s.m.test(e)?s.m.parse(e):o.J.test(e)?o.J.parse(e):i.$.parse(e),transform:e=>(0,n.HD)(e)?e:e.hasOwnProperty("red")?s.m.transform(e):o.J.transform(e)}},40819:function(e,t,r){"use strict";r.d(t,{m:function(){return u}});var n=r(24169),i=r(61649),o=r(36430),s=r(98834);let a=e=>(0,n.u)(0,255,e),l={...i.Rx,transform:e=>Math.round(a(e))},u={test:(0,s.i)("rgb","red"),parse:(0,s.d)("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+l.transform(e)+", "+l.transform(t)+", "+l.transform(r)+", "+(0,o.Nw)(i.Fq.transform(n))+")"}},98834:function(e,t,r){"use strict";r.d(t,{d:function(){return o},i:function(){return i}});var n=r(36430);let i=(e,t)=>r=>!!((0,n.HD)(r)&&n.mj.test(r)&&r.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(r,t)),o=(e,t,r)=>i=>{if(!(0,n.HD)(i))return i;let[o,s,a,l]=i.match(n.KP);return{[e]:parseFloat(o),[t]:parseFloat(s),[r]:parseFloat(a),alpha:void 0!==l?parseFloat(l):1}}},97197:function(e,t,r){"use strict";r.d(t,{h:function(){return l}});var n=r(51550),i=r(36430);let o=new Set(["brightness","contrast","saturate","opacity"]);function s(e){let[t,r]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[n]=r.match(i.KP)||[];if(!n)return e;let s=r.replace(n,""),a=o.has(t)?1:0;return n!==r&&(a*=100),t+"("+a+s+")"}let a=/\b([a-z-]*)\(.*?\)/gu,l={...n.P,getAnimatableNone:e=>{let t=e.match(a);return t?t.map(s).join(" "):e}}},51550:function(e,t,r){"use strict";r.d(t,{P:function(){return h},V:function(){return l}});var n=r(85385),i=r(36430);let o="number",s="color",a=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function l(e){let t=e.toString(),r=[],i={color:[],number:[],var:[]},l=[],u=0,c=t.replace(a,e=>(n.$.test(e)?(i.color.push(u),l.push(s),r.push(n.$.parse(e))):e.startsWith("var(")?(i.var.push(u),l.push("var"),r.push(e)):(i.number.push(u),l.push(o),r.push(parseFloat(e))),++u,"${}")).split("${}");return{values:r,split:c,indexes:i,types:l}}function u(e){return l(e).values}function c(e){let{split:t,types:r}=l(e),a=t.length;return e=>{let l="";for(let u=0;u<a;u++)if(l+=t[u],void 0!==e[u]){let t=r[u];t===o?l+=(0,i.Nw)(e[u]):t===s?l+=n.$.transform(e[u]):l+=e[u]}return l}}let d=e=>"number"==typeof e?0:e,h={test:function(e){var t,r;return isNaN(e)&&(0,i.HD)(e)&&((null===(t=e.match(i.KP))||void 0===t?void 0:t.length)||0)+((null===(r=e.match(i.dA))||void 0===r?void 0:r.length)||0)>0},parse:u,createTransformer:c,getAnimatableNone:function(e){let t=u(e);return c(e)(t.map(d))}}},61649:function(e,t,r){"use strict";r.d(t,{Fq:function(){return o},Rx:function(){return i},bA:function(){return s}});var n=r(24169);let i={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},o={...i,transform:e=>(0,n.u)(0,1,e)},s={...i,default:1}},96190:function(e,t,r){"use strict";r.d(t,{$C:function(){return c},RW:function(){return o},aQ:function(){return s},px:function(){return a},vh:function(){return l},vw:function(){return u}});var n=r(36430);let i=e=>({test:t=>(0,n.HD)(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),o=i("deg"),s=i("%"),a=i("px"),l=i("vh"),u=i("vw"),c={...s,parse:e=>s.parse(e)/100,transform:e=>s.transform(100*e)}},36430:function(e,t,r){"use strict";r.d(t,{HD:function(){return a},KP:function(){return i},Nw:function(){return n},dA:function(){return o},mj:function(){return s}});let n=e=>Math.round(1e5*e)/1e5,i=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,o=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,s=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function a(e){return"string"==typeof e}},12490:function(e,t,r){"use strict";r.d(t,{L:function(){return i}});var n=r(40406);function i(e){return!!((0,n.i)(e)&&e.add)}},40406:function(e,t,r){"use strict";r.d(t,{i:function(){return n}});let n=e=>!!(e&&e.getVelocity)},16399:function(e,t,r){"use strict";r.d(t,{b:function(){return o}});var n=r(8715),i=r(40406);function o(e){let t=(0,i.i)(e)?e.get():e;return(0,n.p)(t)?t.toValue():t}},1571:function(e,t,r){"use strict";r.d(t,{F:function(){return u},f:function(){return c}});var n=r(67294),i=["light","dark"],o="(prefers-color-scheme: dark)",s="undefined"==typeof window,a=n.createContext(void 0),l={setTheme:e=>{},themes:[]},u=()=>{var e;return null!=(e=n.useContext(a))?e:l},c=e=>n.useContext(a)?e.children:n.createElement(h,{...e}),d=["light","dark"],h=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:r=!0,enableColorScheme:s=!0,storageKey:l="theme",themes:u=d,defaultTheme:c=r?"system":"light",attribute:h="data-theme",value:y,children:v,nonce:b})=>{let[w,x]=n.useState(()=>p(l,c)),[E,k]=n.useState(()=>p(l)),S=y?Object.values(y):u,T=n.useCallback(e=>{let n=e;if(!n)return;"system"===e&&r&&(n=m());let o=y?y[n]:n,a=t?g():null,l=document.documentElement;if("class"===h?(l.classList.remove(...S),o&&l.classList.add(o)):o?l.setAttribute(h,o):l.removeAttribute(h),s){let e=i.includes(c)?c:null,t=i.includes(n)?n:e;l.style.colorScheme=t}null==a||a()},[]),M=n.useCallback(e=>{let t="function"==typeof e?e(e):e;x(t);try{localStorage.setItem(l,t)}catch(e){}},[e]),A=n.useCallback(t=>{k(m(t)),"system"===w&&r&&!e&&T("system")},[w,e]);n.useEffect(()=>{let e=window.matchMedia(o);return e.addListener(A),A(e),()=>e.removeListener(A)},[A]),n.useEffect(()=>{let e=e=>{e.key===l&&M(e.newValue||c)};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[M]),n.useEffect(()=>{T(null!=e?e:w)},[e,w]);let P=n.useMemo(()=>({theme:w,setTheme:M,forcedTheme:e,resolvedTheme:"system"===w?E:w,themes:r?[...u,"system"]:u,systemTheme:r?E:void 0}),[w,M,e,E,r,u]);return n.createElement(a.Provider,{value:P},n.createElement(f,{forcedTheme:e,disableTransitionOnChange:t,enableSystem:r,enableColorScheme:s,storageKey:l,themes:u,defaultTheme:c,attribute:h,value:y,children:v,attrs:S,nonce:b}),v)},f=n.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:s,enableColorScheme:a,defaultTheme:l,value:u,attrs:c,nonce:d})=>{let h="system"===l,f="class"===r?`var d=document.documentElement,c=d.classList;c.remove(${c.map(e=>`'${e}'`).join(",")});`:`var d=document.documentElement,n='${r}',s='setAttribute';`,p=a?(i.includes(l)?l:null)?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${l}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",g=(e,t=!1,n=!0)=>{let o=u?u[e]:e,s=t?e+"|| ''":`'${o}'`,l="";return a&&n&&!t&&i.includes(e)&&(l+=`d.style.colorScheme = '${e}';`),"class"===r?t||o?l+=`c.add(${s})`:l+="null":o&&(l+=`d[s](n,${s})`),l},m=e?`!function(){${f}${g(e)}}()`:s?`!function(){try{${f}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${h})){var t='${o}',m=window.matchMedia(t);if(m.media!==t||m.matches){${g("dark")}}else{${g("light")}}}else if(e){${u?`var x=${JSON.stringify(u)};`:""}${g(u?"x[e]":"e",!0)}}${h?"":"else{"+g(l,!1,!1)+"}"}${p}}catch(e){}}()`:`!function(){try{${f}var e=localStorage.getItem('${t}');if(e){${u?`var x=${JSON.stringify(u)};`:""}${g(u?"x[e]":"e",!0)}}else{${g(l,!1,!1)};}${p}}catch(t){}}();`;return n.createElement("script",{nonce:d,dangerouslySetInnerHTML:{__html:m}})}),p=(e,t)=>{let r;if(!s){try{r=localStorage.getItem(e)||void 0}catch(e){}return r||t}},g=()=>{let e=document.createElement("style");return e.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(e),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(e)},1)}},m=e=>(e||(e=window.matchMedia(o)),e.matches?"dark":"light")},52587:function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}r.d(t,{Z:function(){return n}})},50029:function(e,t,r){"use strict";function n(e,t,r,n,i,o,s){try{var a=e[o](s),l=a.value}catch(e){r(e);return}a.done?t(l):Promise.resolve(l).then(n,i)}function i(e){return function(){var t=this,r=arguments;return new Promise(function(i,o){var s=e.apply(t,r);function a(e){n(s,i,o,a,l,"next",e)}function l(e){n(s,i,o,a,l,"throw",e)}a(void 0)})}}r.d(t,{Z:function(){return i}})},59499:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(15358);function i(e,t,r){return(t=(0,n.Z)(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},4730:function(e,t,r){"use strict";function n(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}r.d(t,{Z:function(){return n}})},16835:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(2937);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,s,a=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return a}}(e,t)||(0,n.Z)(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},15358:function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}r.d(t,{Z:function(){return i}})},2937:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(52587);function i(e,t){if(e){if("string"==typeof e)return(0,n.Z)(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return(0,n.Z)(e,t)}}},79169:function(e,t,r){"use strict";function n(e,t,r){if(!t.has(e))throw TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}r.d(t,{J:function(){return n}})},13094:function(e,t,r){"use strict";r.d(t,{_:function(){return i}});var n=r(79169);function i(e,t){var r=(0,n.J)(e,t,"get");return r.get?r.get.call(e):r.value}},7321:function(e,t,r){"use strict";function n(e,t,r){!function(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}r.d(t,{_:function(){return n}})},29677:function(e,t,r){"use strict";r.d(t,{_:function(){return i}});var n=r(79169);function i(e,t,r){var i=(0,n.J)(e,t,"set");return!function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw TypeError("attempted to set read only private field");t.value=r}}(e,i,r),r}},55678:function(e,t,r){"use strict";r.d(t,{Am:function(){return M},Ix:function(){return R},sm:function(){return O}});var n=r(67294),i=r(90512);let o=e=>"number"==typeof e&&!isNaN(e),s=e=>"string"==typeof e,a=e=>"function"==typeof e,l=e=>s(e)||a(e)?e:null,u=e=>(0,n.isValidElement)(e)||s(e)||a(e)||o(e);function c(e){let{enter:t,exit:r,appendPosition:i=!1,collapse:o=!0,collapseDuration:s=300}=e;return function(e){let{children:a,position:l,preventExitTransition:u,done:c,nodeRef:d,isIn:h,playToast:f}=e,p=i?`${t}--${l}`:t,g=i?`${r}--${l}`:r,m=(0,n.useRef)(0);return(0,n.useLayoutEffect)(()=>{let e=d.current,t=p.split(" "),r=n=>{n.target===d.current&&(f(),e.removeEventListener("animationend",r),e.removeEventListener("animationcancel",r),0===m.current&&"animationcancel"!==n.type&&e.classList.remove(...t))};e.classList.add(...t),e.addEventListener("animationend",r),e.addEventListener("animationcancel",r)},[]),(0,n.useEffect)(()=>{let e=d.current,t=()=>{e.removeEventListener("animationend",t),o?function(e,t,r){void 0===r&&(r=300);let{scrollHeight:n,style:i}=e;requestAnimationFrame(()=>{i.minHeight="initial",i.height=n+"px",i.transition=`all ${r}ms`,requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(t,r)})})}(e,c,s):c()};h||(u?t():(m.current=1,e.className+=` ${g}`,e.addEventListener("animationend",t)))},[h]),n.createElement(n.Fragment,null,a)}}function d(e,t){return null!=e?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}let h=new Map,f=[],p=new Set,g=e=>p.forEach(t=>t(e)),m=()=>h.size>0;function y(e,t){var r;if(t)return!(null==(r=h.get(t))||!r.isToastActive(e));let n=!1;return h.forEach(t=>{t.isToastActive(e)&&(n=!0)}),n}function v(e,t){u(e)&&(m()||f.push({content:e,options:t}),h.forEach(r=>{r.buildToast(e,t)}))}function b(e,t){h.forEach(r=>{null!=t&&null!=t&&t.containerId?(null==t?void 0:t.containerId)===r.id&&r.toggle(e,null==t?void 0:t.id):r.toggle(e,null==t?void 0:t.id)})}function w(e){let{delay:t,isRunning:r,closeToast:o,type:s="default",hide:l,className:u,style:c,controlledProgress:d,progress:h,rtl:f,isIn:p,theme:g}=e,m=l||d&&0===h,y={...c,animationDuration:`${t}ms`,animationPlayState:r?"running":"paused"};d&&(y.transform=`scaleX(${h})`);let v=(0,i.Z)("Toastify__progress-bar",d?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${g}`,`Toastify__progress-bar--${s}`,{"Toastify__progress-bar--rtl":f}),b=a(u)?u({rtl:f,type:s,defaultClassName:v}):(0,i.Z)(v,u);return n.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":m},n.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${g} Toastify__progress-bar--${s}`}),n.createElement("div",{role:"progressbar","aria-hidden":m?"true":"false","aria-label":"notification timer",className:b,style:y,[d&&h>=1?"onTransitionEnd":"onAnimationEnd"]:d&&h<1?null:()=>{p&&o()}}))}let x=1,E=()=>""+x++;function k(e,t){return v(e,t),t.toastId}function S(e,t){return{...t,type:t&&t.type||e,toastId:t&&(s(t.toastId)||o(t.toastId))?t.toastId:E()}}function T(e){return(t,r)=>k(t,S(e,r))}function M(e,t){return k(e,S("default",t))}M.loading=(e,t)=>k(e,S("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),M.promise=function(e,t,r){let n,{pending:i,error:o,success:l}=t;i&&(n=s(i)?M.loading(i,r):M.loading(i.render,{...r,...i}));let u={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=(e,t,i)=>{if(null==t)return void M.dismiss(n);let o={type:e,...u,...r,data:i},a=s(t)?{render:t}:t;return n?M.update(n,{...o,...a}):M(a.render,{...o,...a}),i},d=a(e)?e():e;return d.then(e=>c("success",l,e)).catch(e=>c("error",o,e)),d},M.success=T("success"),M.info=T("info"),M.error=T("error"),M.warning=T("warning"),M.warn=M.warning,M.dark=(e,t)=>k(e,S("default",{theme:"dark",...t})),M.dismiss=function(e){!function(e){var t;if(m()){if(null==e||s(t=e)||o(t))h.forEach(t=>{t.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){let t=h.get(e.containerId);t?t.removeToast(e.id):h.forEach(t=>{t.removeToast(e.id)})}}else f=f.filter(t=>null!=e&&t.options.toastId!==e)}(e)},M.clearWaitingQueue=function(e){void 0===e&&(e={}),h.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},M.isActive=y,M.update=function(e,t){void 0===t&&(t={});let r=((e,t)=>{var r;let{containerId:n}=t;return null==(r=h.get(n||1))?void 0:r.toasts.get(e)})(e,t);if(r){let{props:n,content:i}=r,o={delay:100,...n,...t,toastId:t.toastId||e,updateId:E()};o.toastId!==e&&(o.staleId=e);let s=o.render||i;delete o.render,k(s,o)}},M.done=e=>{M.update(e,{progress:1})},M.onChange=function(e){return p.add(e),()=>{p.delete(e)}},M.play=e=>b(!0,e),M.pause=e=>b(!1,e);let A="undefined"!=typeof window?n.useLayoutEffect:n.useEffect,P=e=>{let{theme:t,type:r,isLoading:i,...o}=e;return n.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===t?"currentColor":`var(--toastify-icon-color-${r})`,...o})},C={info:function(e){return n.createElement(P,{...e},n.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return n.createElement(P,{...e},n.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return n.createElement(P,{...e},n.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return n.createElement(P,{...e},n.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return n.createElement("div",{className:"Toastify__spinner"})}},_=e=>{let{isRunning:t,preventExitTransition:r,toastRef:o,eventHandlers:s,playToast:l}=function(e){var t,r;let[i,o]=(0,n.useState)(!1),[s,a]=(0,n.useState)(!1),l=(0,n.useRef)(null),u=(0,n.useRef)({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:c,pauseOnHover:d,closeToast:f,onClick:p,closeOnClick:g}=e;function m(){o(!0)}function y(){o(!1)}function v(t){let r=l.current;u.canDrag&&r&&(u.didMove=!0,i&&y(),u.delta="x"===e.draggableDirection?t.clientX-u.start:t.clientY-u.start,u.start!==t.clientX&&(u.canCloseOnClick=!1),r.style.transform=`translate3d(${"x"===e.draggableDirection?`${u.delta}px, var(--y)`:`0, calc(${u.delta}px + var(--y))`},0)`,r.style.opacity=""+(1-Math.abs(u.delta/u.removalDistance)))}function b(){document.removeEventListener("pointermove",v),document.removeEventListener("pointerup",b);let t=l.current;if(u.canDrag&&u.didMove&&t){if(u.canDrag=!1,Math.abs(u.delta)>u.removalDistance)return a(!0),e.closeToast(),void e.collapseAll();t.style.transition="transform 0.2s, opacity 0.2s",t.style.removeProperty("transform"),t.style.removeProperty("opacity")}}null==(r=h.get((t={id:e.toastId,containerId:e.containerId,fn:o}).containerId||1))||r.setToggle(t.id,t.fn),(0,n.useEffect)(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||y(),window.addEventListener("focus",m),window.addEventListener("blur",y),()=>{window.removeEventListener("focus",m),window.removeEventListener("blur",y)}},[e.pauseOnFocusLoss]);let w={onPointerDown:function(t){if(!0===e.draggable||e.draggable===t.pointerType){u.didMove=!1,document.addEventListener("pointermove",v),document.addEventListener("pointerup",b);let r=l.current;u.canCloseOnClick=!0,u.canDrag=!0,r.style.transition="none","x"===e.draggableDirection?(u.start=t.clientX,u.removalDistance=r.offsetWidth*(e.draggablePercent/100)):(u.start=t.clientY,u.removalDistance=r.offsetHeight*(80===e.draggablePercent?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(t){let{top:r,bottom:n,left:i,right:o}=l.current.getBoundingClientRect();"touchend"!==t.nativeEvent.type&&e.pauseOnHover&&t.clientX>=i&&t.clientX<=o&&t.clientY>=r&&t.clientY<=n?y():m()}};return c&&d&&(w.onMouseEnter=y,e.stacked||(w.onMouseLeave=m)),g&&(w.onClick=e=>{p&&p(e),u.canCloseOnClick&&f()}),{playToast:m,pauseToast:y,isRunning:i,preventExitTransition:s,toastRef:l,eventHandlers:w}}(e),{closeButton:u,children:c,autoClose:d,onClick:f,type:p,hideProgressBar:g,closeToast:m,transition:y,position:v,className:b,style:x,bodyClassName:E,bodyStyle:k,progressClassName:S,progressStyle:T,updateId:M,role:A,progress:P,rtl:_,toastId:I,deleteToast:O,isIn:L,isLoading:R,closeOnClick:j,theme:B}=e,N=(0,i.Z)("Toastify__toast",`Toastify__toast-theme--${B}`,`Toastify__toast--${p}`,{"Toastify__toast--rtl":_},{"Toastify__toast--close-on-click":j}),D=a(b)?b({rtl:_,position:v,type:p,defaultClassName:N}):(0,i.Z)(N,b),K=function(e){let{theme:t,type:r,isLoading:i,icon:o}=e,s=null,l={theme:t,type:r};return!1===o||(a(o)?s=o({...l,isLoading:i}):(0,n.isValidElement)(o)?s=(0,n.cloneElement)(o,l):i?s=C.spinner():r in C&&(s=C[r](l))),s}(e),U=!!P||!d,z={closeToast:m,type:p,theme:B},F=null;return!1===u||(F=a(u)?u(z):(0,n.isValidElement)(u)?(0,n.cloneElement)(u,z):function(e){let{closeToast:t,theme:r,ariaLabel:i="close"}=e;return n.createElement("button",{className:`Toastify__close-button Toastify__close-button--${r}`,type:"button",onClick:e=>{e.stopPropagation(),t(e)},"aria-label":i},n.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},n.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(z)),n.createElement(y,{isIn:L,done:O,position:v,preventExitTransition:r,nodeRef:o,playToast:l},n.createElement("div",{id:I,onClick:f,"data-in":L,className:D,...s,style:x,ref:o},n.createElement("div",{...L&&{role:A},className:a(E)?E({type:p}):(0,i.Z)("Toastify__toast-body",E),style:k},null!=K&&n.createElement("div",{className:(0,i.Z)("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!R})},K),n.createElement("div",null,c)),F,n.createElement(w,{...M&&!U?{key:`pb-${M}`}:{},rtl:_,theme:B,delay:d,isRunning:t,isIn:L,closeToast:m,hide:g,type:p,style:T,className:S,controlledProgress:U,progress:P||0})))},I=function(e,t){return void 0===t&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},O=c(I("bounce",!0)),L=(c(I("slide",!0)),c(I("zoom")),c(I("flip")),{position:"top-right",transition:O,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"});function R(e){let t={...L,...e},r=e.stacked,[c,p]=(0,n.useState)(!0),m=(0,n.useRef)(null),{getToastToRender:b,isToastActive:w,count:x}=function(e){let{subscribe:t,getSnapshot:r,setProps:i}=(0,n.useRef)(function(e){let t=e.containerId||1;return{subscribe(r){let i=function(e,t,r){let i=1,c=0,h=[],f=[],p=[],g=t,m=new Map,y=new Set,v=()=>{p=Array.from(m.values()),y.forEach(e=>e())},b=e=>{f=null==e?[]:f.filter(t=>t!==e),v()},w=e=>{let{toastId:t,onOpen:i,updateId:o,children:s}=e.props,l=null==o;e.staleId&&m.delete(e.staleId),m.set(t,e),f=[...f,e.props.toastId].filter(t=>t!==e.staleId),v(),r(d(e,l?"added":"updated")),l&&a(i)&&i((0,n.isValidElement)(s)&&s.props)};return{id:e,props:g,observe:e=>(y.add(e),()=>y.delete(e)),toggle:(e,t)=>{m.forEach(r=>{null!=t&&t!==r.props.toastId||a(r.toggle)&&r.toggle(e)})},removeToast:b,toasts:m,clearQueue:()=>{c-=h.length,h=[]},buildToast:(t,f)=>{var p,y;if((t=>{let{containerId:r,toastId:n,updateId:i}=t,o=m.has(n)&&null==i;return(r?r!==e:1!==e)||o})(f))return;let{toastId:x,updateId:E,data:k,staleId:S,delay:T}=f,M=()=>{b(x)},A=null==E;A&&c++;let P={...g,style:g.toastStyle,key:i++,...Object.fromEntries(Object.entries(f).filter(e=>{let[t,r]=e;return null!=r})),toastId:x,updateId:E,data:k,closeToast:M,isIn:!1,className:l(f.className||g.toastClassName),bodyClassName:l(f.bodyClassName||g.bodyClassName),progressClassName:l(f.progressClassName||g.progressClassName),autoClose:!f.isLoading&&(p=f.autoClose,y=g.autoClose,!1===p||o(p)&&p>0?p:y),deleteToast(){let e=m.get(x),{onClose:t,children:i}=e.props;a(t)&&t((0,n.isValidElement)(i)&&i.props),r(d(e,"removed")),m.delete(x),--c<0&&(c=0),h.length>0?w(h.shift()):v()}};P.closeButton=g.closeButton,!1===f.closeButton||u(f.closeButton)?P.closeButton=f.closeButton:!0===f.closeButton&&(P.closeButton=!u(g.closeButton)||g.closeButton);let C=t;(0,n.isValidElement)(t)&&!s(t.type)?C=(0,n.cloneElement)(t,{closeToast:M,toastProps:P,data:k}):a(t)&&(C=t({closeToast:M,toastProps:P,data:k}));let _={content:C,props:P,staleId:S};g.limit&&g.limit>0&&c>g.limit&&A?h.push(_):o(T)?setTimeout(()=>{w(_)},T):w(_)},setProps(e){g=e},setToggle:(e,t)=>{m.get(e).toggle=t},isToastActive:e=>f.some(t=>t===e),getSnapshot:()=>g.newestOnTop?p.reverse():p}}(t,e,g);h.set(t,i);let c=i.observe(r);return f.forEach(e=>v(e.content,e.options)),f=[],()=>{c(),h.delete(t)}},setProps(e){var r;null==(r=h.get(t))||r.setProps(e)},getSnapshot(){var e;return null==(e=h.get(t))?void 0:e.getSnapshot()}}}(e)).current;i(e);let c=(0,n.useSyncExternalStore)(t,r,r);return{getToastToRender:function(e){if(!c)return[];let t=new Map;return c.forEach(e=>{let{position:r}=e.props;t.has(r)||t.set(r,[]),t.get(r).push(e)}),Array.from(t,t=>e(t[0],t[1]))},isToastActive:y,count:null==c?void 0:c.length}}(t),{className:E,style:k,rtl:S,containerId:T}=t;function P(){r&&(p(!0),M.play())}return A(()=>{if(r){var e;let r=m.current.querySelectorAll('[data-in="true"]'),n=null==(e=t.position)?void 0:e.includes("top"),i=0,o=0;Array.from(r).reverse().forEach((e,t)=>{e.classList.add("Toastify__toast--stacked"),t>0&&(e.dataset.collapsed=`${c}`),e.dataset.pos||(e.dataset.pos=n?"top":"bot");let r=i*(c?.2:1)+(c?0:12*t);e.style.setProperty("--y",`${n?r:-1*r}px`),e.style.setProperty("--g","12"),e.style.setProperty("--s",""+(1-(c?o:0))),i+=e.offsetHeight,o+=.025})}},[c,x,r]),n.createElement("div",{ref:m,className:"Toastify",id:T,onMouseEnter:()=>{r&&(p(!1),M.pause())},onMouseLeave:P},b((e,t)=>{let o=t.length?{...k}:{...k,pointerEvents:"none"};return n.createElement("div",{className:function(e){let t=(0,i.Z)("Toastify__toast-container",`Toastify__toast-container--${e}`,{"Toastify__toast-container--rtl":S});return a(E)?E({position:e,rtl:S,defaultClassName:t}):(0,i.Z)(t,l(E))}(e),style:o,key:`container-${e}`},t.map(e=>{let{content:t,props:i}=e;return n.createElement(_,{...i,stacked:r,collapseAll:P,isIn:w(i.toastId,i.containerId),style:i.style,key:`toast-${i.key}`},t)}))}))}},21098:function(e,t,r){"use strict";r.d(t,{I:function(){return a}});var n=/^\[(.+)\]$/;function i(e,t){var r=e;return t.split("-").forEach(function(e){r.nextPart.has(e)||r.nextPart.set(e,{nextPart:new Map,validators:[]}),r=r.nextPart.get(e)}),r}var o=/\s+/;function s(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=function e(t){if("string"==typeof t)return t;for(var r,n="",i=0;i<t.length;i++)t[i]&&(r=e(t[i]))&&(n&&(n+=" "),n+=r);return n}(e))&&(n&&(n+=" "),n+=t);return n}function a(){for(var e,t,r,a=arguments.length,l=Array(a),u=0;u<a;u++)l[u]=arguments[u];var c=function(o){var s=l[0];return t=(e=function(e){var t,r,o,s,a,l,u,c,d,h,f;return{cache:function(e){if(e<1)return{get:function(){},set:function(){}};var t=0,r=new Map,n=new Map;function i(i,o){r.set(i,o),++t>e&&(t=0,n=r,r=new Map)}return{get:function(e){var t=r.get(e);return void 0!==t?t:void 0!==(t=n.get(e))?(i(e,t),t):void 0},set:function(e,t){r.has(e)?r.set(e,t):i(e,t)}}}(e.cacheSize),splitModifiers:(r=1===(t=e.separator||":").length,o=t[0],s=t.length,function(e){for(var n,i=[],a=0,l=0,u=0;u<e.length;u++){var c=e[u];if(0===a){if(c===o&&(r||e.slice(u,u+s)===t)){i.push(e.slice(l,u)),l=u+s;continue}if("/"===c){n=u;continue}}"["===c?a++:"]"===c&&a--}var d=0===i.length?e:e.substring(l),h=d.startsWith("!"),f=h?d.substring(1):d;return{modifiers:i,hasImportantModifier:h,baseClassName:f,maybePostfixModifierPosition:n&&n>l?n-l:void 0}}),...(c=e.theme,d=e.prefix,h={nextPart:new Map,validators:[]},(f=Object.entries(e.classGroups),d?f.map(function(e){return[e[0],e[1].map(function(e){return"string"==typeof e?d+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(function(e){return[d+e[0],e[1]]})):e})]}):f).forEach(function(e){var t=e[0];(function e(t,r,n,o){t.forEach(function(t){if("string"==typeof t){(""===t?r:i(r,t)).classGroupId=n;return}if("function"==typeof t){if(t.isThemeGetter){e(t(o),r,n,o);return}r.validators.push({validator:t,classGroupId:n});return}Object.entries(t).forEach(function(t){var s=t[0];e(t[1],i(r,s),n,o)})})})(e[1],h,t,c)}),a=e.conflictingClassGroups,u=void 0===(l=e.conflictingClassGroupModifiers)?{}:l,{getClassGroupId:function(e){var t=e.split("-");return""===t[0]&&1!==t.length&&t.shift(),function e(t,r){if(0===t.length)return r.classGroupId;var n=t[0],i=r.nextPart.get(n),o=i?e(t.slice(1),i):void 0;if(o)return o;if(0!==r.validators.length){var s=t.join("-");return r.validators.find(function(e){return(0,e.validator)(s)})?.classGroupId}}(t,h)||function(e){if(n.test(e)){var t=n.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}(e)},getConflictingClassGroupIds:function(e,t){var r=a[e]||[];return t&&u[e]?[].concat(r,u[e]):r}})}}(l.slice(1).reduce(function(e,t){return t(e)},s()))).cache.get,r=e.cache.set,c=d,d(o)};function d(n){var i,s,a,l,u,c=t(n);if(c)return c;var d=(s=(i=e).splitModifiers,a=i.getClassGroupId,l=i.getConflictingClassGroupIds,u=new Set,n.trim().split(o).map(function(e){var t=s(e),r=t.modifiers,n=t.hasImportantModifier,i=t.baseClassName,o=t.maybePostfixModifierPosition,l=a(o?i.substring(0,o):i),u=!!o;if(!l){if(!o||!(l=a(i)))return{isTailwindClass:!1,originalClassName:e};u=!1}var c=(function(e){if(e.length<=1)return e;var t=[],r=[];return e.forEach(function(e){"["===e[0]?(t.push.apply(t,r.sort().concat([e])),r=[]):r.push(e)}),t.push.apply(t,r.sort()),t})(r).join(":");return{isTailwindClass:!0,modifierId:n?c+"!":c,classGroupId:l,originalClassName:e,hasPostfixModifier:u}}).reverse().filter(function(e){if(!e.isTailwindClass)return!0;var t=e.modifierId,r=e.classGroupId,n=e.hasPostfixModifier,i=t+r;return!u.has(i)&&(u.add(i),l(r,n).forEach(function(e){return u.add(t+e)}),!0)}).reverse().map(function(e){return e.originalClassName}).join(" "));return r(n,d),d}return function(){return c(s.apply(null,arguments))}}},12178:function(e,t,r){"use strict";function n(e){var t=function(t){return t[e]||[]};return t.isThemeGetter=!0,t}r.d(t,{_:function(){return C}});var i=/^\[(?:([a-z-]+):)?(.+)\]$/i,o=/^\d+\/\d+$/,s=new Set(["px","full","screen"]),a=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,l=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,u=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function c(e){return m(e)||s.has(e)||o.test(e)||d(e)}function d(e){return k(e,"length",S)}function h(e){return k(e,"size",T)}function f(e){return k(e,"position",T)}function p(e){return k(e,"url",M)}function g(e){return k(e,"number",m)}function m(e){return!Number.isNaN(Number(e))}function y(e){return e.endsWith("%")&&m(e.slice(0,-1))}function v(e){return A(e)||k(e,"number",A)}function b(e){return i.test(e)}function w(){return!0}function x(e){return a.test(e)}function E(e){return k(e,"",P)}function k(e,t,r){var n=i.exec(e);return!!n&&(n[1]?n[1]===t:r(n[2]))}function S(e){return l.test(e)}function T(){return!1}function M(e){return e.startsWith("url(")}function A(e){return Number.isInteger(Number(e))}function P(e){return u.test(e)}function C(){var e=n("colors"),t=n("spacing"),r=n("blur"),i=n("brightness"),o=n("borderColor"),s=n("borderRadius"),a=n("borderSpacing"),l=n("borderWidth"),u=n("contrast"),k=n("grayscale"),S=n("hueRotate"),T=n("invert"),M=n("gap"),A=n("gradientColorStops"),P=n("gradientColorStopPositions"),C=n("inset"),_=n("margin"),I=n("opacity"),O=n("padding"),L=n("saturate"),R=n("scale"),j=n("sepia"),B=n("skew"),N=n("space"),D=n("translate"),K=function(){return["auto","contain","none"]},U=function(){return["auto","hidden","clip","visible","scroll"]},z=function(){return["auto",b,t]},F=function(){return[b,t]},W=function(){return["",c]},V=function(){return["auto",m,b]},$=function(){return["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"]},H=function(){return["solid","dashed","dotted","double","none"]},q=function(){return["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]},Z=function(){return["start","end","center","between","around","evenly","stretch"]},G=function(){return["","0",b]},J=function(){return["auto","avoid","all","avoid-page","page","left","right","column"]},Y=function(){return[m,g]},X=function(){return[m,b]};return{cacheSize:500,theme:{colors:[w],spacing:[c],blur:["none","",x,b],brightness:Y(),borderColor:[e],borderRadius:["none","","full",x,b],borderSpacing:F(),borderWidth:W(),contrast:Y(),grayscale:G(),hueRotate:X(),invert:G(),gap:F(),gradientColorStops:[e],gradientColorStopPositions:[y,d],inset:z(),margin:z(),opacity:Y(),padding:F(),saturate:Y(),scale:Y(),sepia:G(),skew:X(),space:F(),translate:F()},classGroups:{aspect:[{aspect:["auto","square","video",b]}],container:["container"],columns:[{columns:[x]}],"break-after":[{"break-after":J()}],"break-before":[{"break-before":J()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[].concat($(),[b])}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:K()}],"overscroll-x":[{"overscroll-x":K()}],"overscroll-y":[{"overscroll-y":K()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[C]}],"inset-x":[{"inset-x":[C]}],"inset-y":[{"inset-y":[C]}],start:[{start:[C]}],end:[{end:[C]}],top:[{top:[C]}],right:[{right:[C]}],bottom:[{bottom:[C]}],left:[{left:[C]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",v]}],basis:[{basis:z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",b]}],grow:[{grow:G()}],shrink:[{shrink:G()}],order:[{order:["first","last","none",v]}],"grid-cols":[{"grid-cols":[w]}],"col-start-end":[{col:["auto",{span:["full",v]},b]}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":[w]}],"row-start-end":[{row:["auto",{span:[v]},b]}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",b]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",b]}],gap:[{gap:[M]}],"gap-x":[{"gap-x":[M]}],"gap-y":[{"gap-y":[M]}],"justify-content":[{justify:["normal"].concat(Z())}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal"].concat(Z(),["baseline"])}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[].concat(Z(),["baseline"])}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[O]}],px:[{px:[O]}],py:[{py:[O]}],ps:[{ps:[O]}],pe:[{pe:[O]}],pt:[{pt:[O]}],pr:[{pr:[O]}],pb:[{pb:[O]}],pl:[{pl:[O]}],m:[{m:[_]}],mx:[{mx:[_]}],my:[{my:[_]}],ms:[{ms:[_]}],me:[{me:[_]}],mt:[{mt:[_]}],mr:[{mr:[_]}],mb:[{mb:[_]}],ml:[{ml:[_]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",b,t]}],"min-w":[{"min-w":["min","max","fit",b,c]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[x]},x,b]}],h:[{h:[b,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",b,c]}],"max-h":[{"max-h":[b,t,"min","max","fit"]}],"font-size":[{text:["base",x,d]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",g]}],"font-family":[{font:[w]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",b]}],"line-clamp":[{"line-clamp":["none",m,g]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",b,c]}],"list-image":[{"list-image":["none",b]}],"list-style-type":[{list:["none","disc","decimal",b]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[I]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[I]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[].concat(H(),["wavy"])}],"text-decoration-thickness":[{decoration:["auto","from-font",c]}],"underline-offset":[{"underline-offset":["auto",b,c]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:F()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",b]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",b]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[I]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[].concat($(),[f])}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",h]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},p]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[P]}],"gradient-via-pos":[{via:[P]}],"gradient-to-pos":[{to:[P]}],"gradient-from":[{from:[A]}],"gradient-via":[{via:[A]}],"gradient-to":[{to:[A]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[I]}],"border-style":[{border:[].concat(H(),["hidden"])}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[I]}],"divide-style":[{divide:H()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:[""].concat(H())}],"outline-offset":[{"outline-offset":[b,c]}],"outline-w":[{outline:[c]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[I]}],"ring-offset-w":[{"ring-offset":[c]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",x,E]}],"shadow-color":[{shadow:[w]}],opacity:[{opacity:[I]}],"mix-blend":[{"mix-blend":q()}],"bg-blend":[{"bg-blend":q()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[i]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",x,b]}],grayscale:[{grayscale:[k]}],"hue-rotate":[{"hue-rotate":[S]}],invert:[{invert:[T]}],saturate:[{saturate:[L]}],sepia:[{sepia:[j]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[k]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[S]}],"backdrop-invert":[{"backdrop-invert":[T]}],"backdrop-opacity":[{"backdrop-opacity":[I]}],"backdrop-saturate":[{"backdrop-saturate":[L]}],"backdrop-sepia":[{"backdrop-sepia":[j]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",b]}],duration:[{duration:X()}],ease:[{ease:["linear","in","out","in-out",b]}],delay:[{delay:X()}],animate:[{animate:["none","spin","ping","pulse","bounce",b]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[R]}],"scale-x":[{"scale-x":[R]}],"scale-y":[{"scale-y":[R]}],rotate:[{rotate:[v,b]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"skew-x":[{"skew-x":[B]}],"skew-y":[{"skew-y":[B]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",b]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",b]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":F()}],"scroll-mx":[{"scroll-mx":F()}],"scroll-my":[{"scroll-my":F()}],"scroll-ms":[{"scroll-ms":F()}],"scroll-me":[{"scroll-me":F()}],"scroll-mt":[{"scroll-mt":F()}],"scroll-mr":[{"scroll-mr":F()}],"scroll-mb":[{"scroll-mb":F()}],"scroll-ml":[{"scroll-ml":F()}],"scroll-p":[{"scroll-p":F()}],"scroll-px":[{"scroll-px":F()}],"scroll-py":[{"scroll-py":F()}],"scroll-ps":[{"scroll-ps":F()}],"scroll-pe":[{"scroll-pe":F()}],"scroll-pt":[{"scroll-pt":F()}],"scroll-pr":[{"scroll-pr":F()}],"scroll-pb":[{"scroll-pb":F()}],"scroll-pl":[{"scroll-pl":F()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","pinch-zoom","manipulation",{pan:["x","left","right","y","up","down"]}]}],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",b]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[c,g]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}},20126:function(e,t,r){"use strict";r.d(t,{q:function(){return a}});var n=r(21098),i=r(12178),o=Object.prototype.hasOwnProperty,s=new Set(["string","number","boolean"]);function a(e){for(var t=arguments.length,r=Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];return"function"==typeof e?n.I.apply(void 0,[i._,e].concat(r)):n.I.apply(void 0,[function(){return function(e,t){for(var r in t)!function e(t,r,n){if(!o.call(t,r)||s.has(typeof n)||null===n){t[r]=n;return}if(Array.isArray(n)&&Array.isArray(t[r])){t[r]=t[r].concat(n);return}if("object"==typeof n&&"object"==typeof t[r]){if(null===t[r]){t[r]=n;return}for(var i in n)e(t[r],i,n[i])}}(e,r,t[r]);return e}((0,i._)(),e)}].concat(r))}},83815:function(e,t,r){"use strict";r.d(t,{tv:function(){return E}});var n=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,i=e=>!e||"object"!=typeof e||0===Object.keys(e).length,o=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function s(e){let t=[];return function e(t,r){t.forEach(function(t){Array.isArray(t)?e(t,r):r.push(t)})}(e,t),t}var a=(...e)=>s(e).filter(Boolean),l=(e,t)=>{let r={},n=Object.keys(e),i=Object.keys(t);for(let o of n)if(i.includes(o)){let n=e[o],i=t[o];"object"==typeof n&&"object"==typeof i?r[o]=l(n,i):Array.isArray(n)||Array.isArray(i)?r[o]=a(i,n):r[o]=i+" "+n}else r[o]=e[o];for(let e of i)n.includes(e)||(r[e]=t[e]);return r},u=e=>e&&"string"==typeof e?e.replace(/\s+/g," ").trim():e,c=r(21098),d=r(12178),h=(0,c.I)(d._),f=r(20126),p={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},g=e=>e||void 0,m=(...e)=>g(s(e).filter(Boolean).join(" ")),y=null,v={},b=!1,w=(...e)=>t=>t.twMerge?((!y||b)&&(b=!1,y=i(v)?h:(0,f.q)(v)),g(y(m(e)))):m(e),x=(e,t)=>{for(let r in t)e.hasOwnProperty(r)?e[r]=m(e[r],t[r]):e[r]=t[r];return e},E=(e,t)=>{let{extend:r=null,slots:s={},variants:c={},compoundVariants:d=[],compoundSlots:h=[],defaultVariants:f={}}=e,g={...p,...t},y=null!=r&&r.base?m(r.base,null==e?void 0:e.base):null==e?void 0:e.base,E=null!=r&&r.variants&&!i(r.variants)?l(c,r.variants):c,k=null!=r&&r.defaultVariants&&!i(r.defaultVariants)?{...r.defaultVariants,...f}:f;i(g.twMergeConfig)||o(g.twMergeConfig,v)||(b=!0,v=g.twMergeConfig);let S=i(null==r?void 0:r.slots),T=i(s)?{}:{base:m(null==e?void 0:e.base,S&&(null==r?void 0:r.base)),...s},M=S?T:x({...null==r?void 0:r.slots},i(T)?{base:null==e?void 0:e.base}:T),A=e=>{if(i(E)&&i(s)&&S)return w(y,null==e?void 0:e.class,null==e?void 0:e.className)(g);if(d&&!Array.isArray(d))throw TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof d}`);if(h&&!Array.isArray(h))throw TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof h}`);let t=(e,t,r=[],n)=>{let i=r;if("string"==typeof t)i=i.concat(u(t).split(" ").map(t=>`${e}:${t}`));else if(Array.isArray(t))i=i.concat(t.reduce((t,r)=>t.concat(`${e}:${r}`),[]));else if("object"==typeof t&&"string"==typeof n){for(let r in t)if(t.hasOwnProperty(r)&&r===n){let o=t[r];if(o&&"string"==typeof o){let t=u(o);i[n]?i[n]=i[n].concat(t.split(" ").map(t=>`${e}:${t}`)):i[n]=t.split(" ").map(t=>`${e}:${t}`)}else Array.isArray(o)&&o.length>0&&(i[n]=o.reduce((t,r)=>t.concat(`${e}:${r}`),[]))}}return i},o=(r,o=E,s=null,a=null)=>{var l;let u=o[r];if(!u||i(u))return null;let c=null!=(l=null==a?void 0:a[r])?l:null==e?void 0:e[r];if(null===c)return null;let d=n(c),h=Array.isArray(g.responsiveVariants)&&g.responsiveVariants.length>0||!0===g.responsiveVariants,f=null==k?void 0:k[r],p=[];if("object"==typeof d&&h)for(let[e,r]of Object.entries(d)){let n=u[r];if("initial"===e){f=r;continue}Array.isArray(g.responsiveVariants)&&!g.responsiveVariants.includes(e)||(p=t(e,n,p,s))}let m=u[d]||u[n(f)];return"object"==typeof p&&"string"==typeof s&&p[s]?x(p,m):p.length>0?(p.push(m),p):m},l=(e,t)=>{if(!E||"object"!=typeof E)return null;let r=[];for(let n in E){let i=o(n,E,e,t),s="base"===e&&"string"==typeof i?i:i&&i[e];s&&(r[r.length]=s)}return r},c={};for(let t in e)void 0!==e[t]&&(c[t]=e[t]);let f=(t,r)=>{var n;let i="object"==typeof(null==e?void 0:e[t])?{[t]:null==(n=e[t])?void 0:n.initial}:{};return{...k,...c,...i,...r}},p=(e=[],t)=>{let r=[];for(let{class:n,className:i,...o}of e){let e=!0;for(let[r,n]of Object.entries(o)){let i=f(r,t);if(Array.isArray(n)){if(!n.includes(i[r])){e=!1;break}}else if(i[r]!==n){e=!1;break}}e&&(n&&r.push(n),i&&r.push(i))}return r},m=e=>{let t=p(d,e);return a(p(null==r?void 0:r.compoundVariants,e),t)},v=e=>{let t=m(e);if(!Array.isArray(t))return t;let r={};for(let e of t)if("string"==typeof e&&(r.base=w(r.base,e)(g)),"object"==typeof e)for(let[t,n]of Object.entries(e))r[t]=w(r[t],n)(g);return r},b=e=>{if(h.length<1)return null;let t={};for(let{slots:r=[],class:n,className:o,...s}of h){if(!i(s)){let t=!0;for(let r of Object.keys(s)){let n=f(r,e)[r];if(void 0===n||(Array.isArray(s[r])?!s[r].includes(n):s[r]!==n)){t=!1;break}}if(!t)continue}for(let e of r)t[e]=t[e]||[],t[e].push([n,o])}return t};if(!i(s)||!S){let e={};if("object"==typeof M&&!i(M))for(let t of Object.keys(M))e[t]=e=>{var r,n;return w(M[t],l(t,e),(null!=(r=v(e))?r:[])[t],(null!=(n=b(e))?n:[])[t],null==e?void 0:e.class,null==e?void 0:e.className)(g)};return e}return w(y,E?Object.keys(E).map(e=>o(e,E)):null,m(),null==e?void 0:e.class,null==e?void 0:e.className)(g)};return A.variantKeys=(()=>{if(!(!E||"object"!=typeof E))return Object.keys(E)})(),A.extend=r,A.base=y,A.slots=M,A.variants=E,A.defaultVariants=k,A.compoundSlots=h,A.compoundVariants=d,A}}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[774,179],function(){return t(6840),t(58194)}),_N_E=e.O()}]);