1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1629],{32452:function(t,e,r){"use strict";e._O=e.Jq=e.KB=e.u8=e.cv=void 0,e.Ik=e.A9=e.n_=e.gM=void 0;let n=r(67133);function checkUint8Array(t){if(!(t instanceof Uint8Array))throw TypeError("b must be a Uint8Array")}function uint8ArrayToBuffer(t){return checkUint8Array(t),n.Buffer.from(t.buffer,t.byteOffset,t.length)}let Layout=class Layout{constructor(t,e){if(!Number.isInteger(t))throw TypeError("span must be an integer");this.span=t,this.property=e}makeDestinationObject(){return{}}getSpan(t,e){if(0>this.span)throw RangeError("indeterminate span");return this.span}replicate(t){let e=Object.create(this.constructor.prototype);return Object.assign(e,this),e.property=t,e}fromArray(t){}};function nameWithProperty(t,e){return e.property?t+"["+e.property+"]":t}let ExternalLayout=class ExternalLayout extends Layout{isCount(){throw Error("ExternalLayout is abstract")}};let OffsetLayout=class OffsetLayout extends ExternalLayout{constructor(t,e=0,r){if(!(t instanceof Layout))throw TypeError("layout must be a Layout");if(!Number.isInteger(e))throw TypeError("offset must be integer or undefined");super(t.span,r||t.property),this.layout=t,this.offset=e}isCount(){return this.layout instanceof UInt||this.layout instanceof UIntBE}decode(t,e=0){return this.layout.decode(t,e+this.offset)}encode(t,e,r=0){return this.layout.encode(t,e,r+this.offset)}};let UInt=class UInt extends Layout{constructor(t,e){if(super(t,e),6<this.span)throw RangeError("span must not exceed 6 bytes")}decode(t,e=0){return uint8ArrayToBuffer(t).readUIntLE(e,this.span)}encode(t,e,r=0){return uint8ArrayToBuffer(e).writeUIntLE(t,r,this.span),this.span}};let UIntBE=class UIntBE extends Layout{constructor(t,e){if(super(t,e),6<this.span)throw RangeError("span must not exceed 6 bytes")}decode(t,e=0){return uint8ArrayToBuffer(t).readUIntBE(e,this.span)}encode(t,e,r=0){return uint8ArrayToBuffer(e).writeUIntBE(t,r,this.span),this.span}};function divmodInt64(t){let e=Math.floor(t/4294967296);return{hi32:e,lo32:t-4294967296*e}}
1function roundedInt64(t,e){return 4294967296*t+e}let NearUInt64=class NearUInt64 extends Layout{constructor(t){super(8,t)}decode(t,e=0){let r=uint8ArrayToBuffer(t),n=r.readUInt32LE(e),o=r.readUInt32LE(e+4);return roundedInt64(o,n)}encode(t,e,r=0){let n=divmodInt64(t),o=uint8ArrayToBuffer(e);return o.writeUInt32LE(n.lo32,r),o.writeUInt32LE(n.hi32,r+4),8}};let NearInt64=class NearInt64 extends Layout{constructor(t){super(8,t)}decode(t,e=0){let r=uint8ArrayToBuffer(t),n=r.readUInt32LE(e),o=r.readInt32LE(e+4);return roundedInt64(o,n)}encode(t,e,r=0){let n=divmodInt64(t),o=uint8ArrayToBuffer(e);return o.writeUInt32LE(n.lo32,r),o.writeInt32LE(n.hi32,r+4),8}};let Sequence=class Sequence extends Layout{constructor(t,e,r){if(!(t instanceof Layout))throw TypeError("elementLayout must be a Layout");if(!(e instanceof ExternalLayout&&e.isCount()||Number.isInteger(e)&&0<=e))throw TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let n=-1;e instanceof ExternalLayout||!(0<t.span)||(n=e*t.span),super(n,r),this.elementLayout=t,this.count=e}getSpan(t,e=0){if(0<=this.span)return this.span;let r=0,n=this.count;if(n instanceof ExternalLayout&&(n=n.decode(t,e)),0<this.elementLayout.span)r=n*this.elementLayout.span;else{let o=0;for(;o<n;)r+=this.elementLayout.getSpan(t,e+r),++o}return r}decode(t,e=0){let r=[],n=0,o=this.count;for(o instanceof ExternalLayout&&(o=o.decode(t,e));n<o;)r.push(this.elementLayout.decode(t,e)),e+=this.elementLayout.getSpan(t,e),n+=1;return r}encode(t,e,r=0){let n=this.elementLayout,o=t.reduce((t,o)=>t+n.encode(o,e,r+t),0);return this.count instanceof ExternalLayout&&this.count.encode(t.length,e,r),o}};let Structure=class Structure extends Layout{constructor(t,e,r){if(!(Array.isArray(t)&&t.reduce((t,e)=>t&&e instanceof Layout,!0)))throw TypeError("fields must be array of Layout instances");for(let n of("boolean"==typeof e&&void 0===r&&(r=e,e=void 0),t))if(0>n.span&&void 0===n.property)throw Error("fields cannot contain unnamed variable-length layout");let n=-1;try{n=t.reduce((t,e)=>t+e.getSpan(),0)}catch(t){}super(n,e),this.fields=t,this.decodePrefixes=!!r}getSpan(t,e=0){if(0<=this.span)return this.span;let r=0;try{r=this.fields.reduce((r,n)=>{let o=n.getSpan(t,e);return e+=o,r+o},0)}catch(t){throw RangeError("indeterminate span")}return r}decode(t,e=0){checkUint8Array(t);let r=this.makeDestinationObject();for(let n of this.fields)if(void 0!==n.property&&(r[n.property]=n.decode(t,e)),e+=n.getSpan(t,e),this.decodePrefixes&&t.length===e)break;return r}encode(t,e,r=0){let n=r,o=0,s=0;for(let n of this.fields){let a=n.span;if(s=0<a?a:0,void 0!==n.property){let o=t[n.property];void 0!==o&&(s=n.encode(o,e,r),0>a&&(a=n.getSpan(e,r)))}o=r,r+=a}return o+s-n}fromArray(t){let e=this.makeDestinationObject();for(let r of this.fields)void 0!==r.property&&0<t.length&&(e[r.property]=t.shift());return e}layoutFor(t){if("string"!=typeof t)throw TypeError("property must be string");for(let e of this.fields)if(e.property===t)return e}offsetOf(t){if("string"!=typeof t)throw TypeError("property must be string");let e=0;for(let r of this.fields){if(r.property===t)return e;0>r.span?e=-1:0<=e&&(e+=r.span)}}};let UnionDiscriminator=class UnionDiscriminator{constructor(t){this.property=t}decode(t,e){throw Error("UnionDiscriminator is abstract")}encode(t,e,r){throw Error("UnionDiscriminator is abstract")}};let UnionLayoutDiscriminator=class UnionLayoutDiscriminator extends UnionDiscriminator{constructor(t,e){if(!(t instanceof ExternalLayout&&t.isCount()))throw TypeError("layout must be an unsigned integer ExternalLayout");super(e||t.property||"variant"),this.layout=t}decode(t,e){return this.layout.decode(t,e)}encode(t,e,r){return this.layout.encode(t,e,r)}};let Union=class Union extends Layout{constructor(t,e,r){let n;if(t instanceof UInt||t instanceof UIntBE)n=new UnionLayoutDiscriminator(new OffsetLayout(t));else if(t instanceof ExternalLayout&&t.isCount())n=new UnionLayoutDiscriminator(t);else if(t instanceof UnionDiscriminator)n=t;else throw TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(void 0===e&&(e=null),!(null===e||e instanceof Layout))throw TypeError("defaultLayout must be null or a Layout");if(null!==e){if(0>e.span)throw Error("defaultLayout must have constant span");void 0===e.property&&(e=e.replicate("content"))}let o=-1;e&&0<=(o=e.span)&&(t instanceof UInt||t instanceof UIntBE)&&(o+=n.layout.span),super(o,r),this.discriminator=n,this.usesPrefixDiscriminator=t instanceof UInt||t instanceof UIntBE,this.defaultLayout=e,this.registry={};let s=this.defaultGetSourceVariant.bind(this);
1this.getSourceVariant=function(t){return s(t)},this.configGetSourceVariant=function(t){s=t.bind(this)}}getSpan(t,e=0){if(0<=this.span)return this.span;let r=this.getVariant(t,e);if(!r)throw Error("unable to determine span for unrecognized variant");return r.getSpan(t,e)}defaultGetSourceVariant(t){if(Object.prototype.hasOwnProperty.call(t,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(t,this.defaultLayout.property))return;let e=this.registry[t[this.discriminator.property]];if(e&&(!e.layout||e.property&&Object.prototype.hasOwnProperty.call(t,e.property)))return e}else for(let e in this.registry){let r=this.registry[e];if(r.property&&Object.prototype.hasOwnProperty.call(t,r.property))return r}throw Error("unable to infer src variant")}decode(t,e=0){let r;let n=this.discriminator,o=n.decode(t,e),s=this.registry[o];if(void 0===s){let s=this.defaultLayout,a=0;this.usesPrefixDiscriminator&&(a=n.layout.span),(r=this.makeDestinationObject())[n.property]=o,r[s.property]=s.decode(t,e+a)}else r=s.decode(t,e);return r}encode(t,e,r=0){let n=this.getSourceVariant(t);if(void 0===n){let n=this.discriminator,o=this.defaultLayout,s=0;return this.usesPrefixDiscriminator&&(s=n.layout.span),n.encode(t[n.property],e,r),s+o.encode(t[o.property],e,r+s)}return n.encode(t,e,r)}addVariant(t,e,r){let n=new VariantLayout(this,t,e,r);return this.registry[t]=n,n}getVariant(t,e=0){let r;return r=t instanceof Uint8Array?this.discriminator.decode(t,e):t,this.registry[r]}};let VariantLayout=class VariantLayout extends Layout{constructor(t,e,r,n){if(!(t instanceof Union))throw TypeError("union must be a Union");if(!Number.isInteger(e)||0>e)throw TypeError("variant must be a (non-negative) integer");if("string"==typeof r&&void 0===n&&(n=r,r=null),r){if(!(r instanceof Layout))throw TypeError("layout must be a Layout");if(null!==t.defaultLayout&&0<=r.span&&r.span>t.defaultLayout.span)throw Error("variant span exceeds span of containing union");if("string"!=typeof n)throw TypeError("variant must have a String property")}let o=t.span;0>t.span&&0<=(o=r?r.span:0)&&t.usesPrefixDiscriminator&&(o+=t.discriminator.layout.span),super(o,n),this.union=t,this.variant=e,this.layout=r||null}getSpan(t,e=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(t,e+r)),r+n}decode(t,e=0){let r=this.makeDestinationObject();if(this!==this.union.getVariant(t,e))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(t,e+n):this.property?r[this.property]=!0:this.union.usesPrefixDiscriminator&&(r[this.union.discriminator.property]=this.variant),r}encode(t,e,r=0){let n=0;if(this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout&&!Object.prototype.hasOwnProperty.call(t,this.property))throw TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,e,r);let o=n;if(this.layout&&(this.layout.encode(t[this.property],e,r+n),o+=this.layout.getSpan(e,r+n),0<=this.union.span&&o>this.union.span))throw Error("encoded variant overruns containing union");return o}fromArray(t){if(this.layout)return this.layout.fromArray(t)}};function fixBitwiseResult(t){return 0>t&&(t+=4294967296),t}let BitStructure=class BitStructure extends Layout{constructor(t,e,r){if(!(t instanceof UInt||t instanceof UIntBE))throw TypeError("word must be a UInt or UIntBE layout");if("string"==typeof e&&void 0===r&&(r=e,e=!1),4<t.span)throw RangeError("word cannot exceed 32 bits");super(t.span,r),this.word=t,this.msb=!!e,this.fields=[];let n=0;this._packedSetValue=function(t){return n=fixBitwiseResult(t),this},this._packedGetValue=function(){return n}}decode(t,e=0){let r=this.makeDestinationObject(),n=this.word.decode(t,e);for(let e of(this._packedSetValue(n),this.fields))void 0!==e.property&&(r[e.property]=e.decode(t));return r}encode(t,e,r=0){let n=this.word.decode(e,r);for(let e of(this._packedSetValue(n),this.fields))if(void 0!==e.property){let r=t[e.property];void 0!==r&&e.encode(r)}return this.word.encode(this._packedGetValue(),e,r)}addField(t,e){let r=new BitField(this,t,e);return this.fields.push(r),r}addBoolean(t){let e=new Boolean(this,t);return this.fields.push(e),e}fieldFor(t){if("string"!=typeof t)throw TypeError("property must be string");for(let e of this.fields)if(e.property===t)return e}};let BitField=class BitField{constructor(t,e,r){if(!(t instanceof BitStructure))throw TypeError("container must be a BitStructure");
1if(!Number.isInteger(e)||0>=e)throw TypeError("bits must be positive integer");let n=8*t.span,o=t.fields.reduce((t,e)=>t+e.bits,0);if(e+o>n)throw Error("bits too long for span remainder ("+(n-o)+" of "+n+" remain)");this.container=t,this.bits=e,this.valueMask=(1<<e)-1,32===e&&(this.valueMask=4294967295),this.start=o,this.container.msb&&(this.start=n-o-e),this.wordMask=fixBitwiseResult(this.valueMask<<this.start),this.property=r}decode(t,e){let r=this.container._packedGetValue(),n=fixBitwiseResult(r&this.wordMask),o=n>>>this.start;return o}encode(t){if("number"!=typeof t||!Number.isInteger(t)||t!==fixBitwiseResult(t&this.valueMask))throw TypeError(nameWithProperty("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);let e=this.container._packedGetValue(),r=fixBitwiseResult(t<<this.start);this.container._packedSetValue(fixBitwiseResult(e&~this.wordMask)|r)}};let Boolean=class Boolean extends BitField{constructor(t,e){super(t,1,e)}decode(t,e){return!!super.decode(t,e)}encode(t){"boolean"==typeof t&&(t=+t),super.encode(t)}};let Blob=class Blob extends Layout{constructor(t,e){if(!(t instanceof ExternalLayout&&t.isCount()||Number.isInteger(t)&&0<=t))throw TypeError("length must be positive integer or an unsigned integer ExternalLayout");let r=-1;t instanceof ExternalLayout||(r=t),super(r,e),this.length=t}getSpan(t,e){let r=this.span;return 0>r&&(r=this.length.decode(t,e)),r}decode(t,e=0){let r=this.span;return 0>r&&(r=this.length.decode(t,e)),uint8ArrayToBuffer(t).slice(e,e+r)}encode(t,e,r){let n=this.length;if(this.length instanceof ExternalLayout&&(n=t.length),!(t instanceof Uint8Array&&n===t.length))throw TypeError(nameWithProperty("Blob.encode",this)+" requires (length "+n+") Uint8Array as src");if(r+n>e.length)throw RangeError("encoding overruns Uint8Array");let o=uint8ArrayToBuffer(t);return uint8ArrayToBuffer(e).write(o.toString("hex"),r,n,"hex"),this.length instanceof ExternalLayout&&this.length.encode(n,e,r),n}};e.cv=(t,e,r)=>new OffsetLayout(t,e,r),e.u8=t=>new UInt(1,t),e.KB=t=>new UInt(2,t),e.Jq=t=>new UInt(4,t),e._O=t=>new NearUInt64(t),e.gM=t=>new NearInt64(t),e.n_=(t,e,r)=>new Structure(t,e,r),e.A9=(t,e,r)=>new Sequence(t,e,r),e.Ik=(t,e)=>new Blob(t,e)},54462:function(t,e,r){var n=r(68679);t.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},68679:function(t,e,r){"use strict";var n=r(92336).Buffer;function base(t){if(t.length>=255)throw TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r<e.length;r++)e[r]=255;for(var o=0;o<t.length;o++){var s=t.charAt(o),a=s.charCodeAt(0);if(255!==e[a])throw TypeError(s+" is ambiguous");e[a]=o}var u=t.length,c=t.charAt(0),l=Math.log(u)/Math.log(256),f=Math.log(256)/Math.log(u);function decodeUnsafe(t){if("string"!=typeof t)throw TypeError("Expected String");if(0===t.length)return n.alloc(0);for(var r=0,o=0,s=0;t[r]===c;)o++,r++;for(var a=(t.length-r)*l+1>>>0,f=new Uint8Array(a);t[r];){var d=e[t.charCodeAt(r)];if(255===d)return;for(var p=0,y=a-1;(0!==d||p<s)&&-1!==y;y--,p++)d+=u*f[y]>>>0,f[y]=d%256>>>0,d=d/256>>>0;if(0!==d)throw Error("Non-zero carry");s=p,r++}for(var g=a-s;g!==a&&0===f[g];)g++;var m=n.allocUnsafe(o+(a-g));m.fill(0,0,o);for(var v=o;g!==a;)m[v++]=f[g++];return m}function decode(t){var e=decodeUnsafe(t);if(e)return e;throw Error("Non-base"+u+" character")}return{encode:function(e){if((Array.isArray(e)||e instanceof Uint8Array)&&(e=n.from(e)),!n.isBuffer(e))throw TypeError("Expected Buffer");if(0===e.length)return"";for(var r=0,o=0,s=0,a=e.length;s!==a&&0===e[s];)s++,r++;for(var l=(a-s)*f+1>>>0,d=new Uint8Array(l);s!==a;){for(var p=e[s],y=0,g=l-1;(0!==p||y<o)&&-1!==g;g--,y++)p+=256*d[g]>>>0,d[g]=p%u>>>0,p=p/u>>>0;if(0!==p)throw Error("Non-zero carry");o=y,s++}for(var m=l-o;m!==l&&0===d[m];)m++;for(var v=c.repeat(r);m<l;++m)v+=t.charAt(d[m]);return v},decodeUnsafe:decodeUnsafe,decode:decode}}t.exports=base},45230:function(t,e,r){"use strict";r.d(e,{Os:function(){return TorusInjectedProvider},SolanaPrivateKeyProvider:function(){return SolanaPrivateKeyProvider},kL:function(){return PhantomInjectedProvider}});var n=r(21076),o=r(15484),s=r(29978),a=r(60974),u=r(7649),c=r(9745),l=r.n(c),f=r(46281),d=r(63438),p=r(96318),y=r.n(p),g=r(67133).Buffer;function createChainIdMiddleware(t){return(e,r,n,o)=>"solana_chainId"===e.method?(r.result=t,o()):n()}function createProviderConfigMiddleware(t){return(e,r,n,o)=>"solana_provider_config"===e.method?(r.result=t,o()):n()}function createConfigMiddleware(t){let{chainId:e}=t;return(0,s.UZ)([createChainIdMiddleware(e),createProviderConfigMiddleware(t)])}function createJsonRpcClient(t){let{rpcTarget:e}=t,r=(0,o.v$)({rpcTarget:e}),n=(0,s.UZ)([createConfigMiddleware(t),r]);return{networkMiddleware:n,fetchMiddleware:r}}function createGetAccountsMiddleware(t){let{getAccounts:e}=t;return(0,s.Pk)(async(t,r,n)=>{let{method:o}=t;if("getAccounts"!==o)return n();if(!e)throw Error("WalletMiddleware - opts.getAccounts not provided");let s=await e(t);r.result=s})}function createRequestAccountsMiddleware(t){let{requestAccounts:e}=t;return(0,s.Pk)(async(t,r,n)=>{let{method:o}=t;if("requestAccounts"!==o)return n();if(!e)throw Error("WalletMiddleware - opts.requestAccounts not provided");let s=await e(t);r.result=s})}function createGenericJRPCMiddleware(t,e){return(0,s.Pk)(async(r,n,o)=>{let{method:s}=r;if(s!==t)return o();if(!e)throw Error(`WalletMiddleware - ${t} not provided`);let a=await e(r);n.result=a})}function createSolanaMiddleware(t){let{getAccounts:e,requestAccounts:r,signTransaction:n,signAndSendTransaction:o,signAllTransactions:a,signMessage:u,getPrivateKey:c,getSecretKey:l}=t;return(0,s.UZ)([createRequestAccountsMiddleware({requestAccounts:r}),createGetAccountsMiddleware({getAccounts:e}),createGenericJRPCMiddleware("signTransaction",n),createGenericJRPCMiddleware("signAndSendTransaction",o),createGenericJRPCMiddleware("signAllTransactions",a),createGenericJRPCMiddleware("signMessage",u),createGenericJRPCMiddleware("solanaPrivateKey",c),createGenericJRPCMiddleware("private_key",c),createGenericJRPCMiddleware("solanaSecretKey",l)])}function createChainSwitchMiddleware(t){let{addNewChainConfig:e,switchSolanaChain:r}=t;return(0,s.UZ)([createGenericJRPCMiddleware("addSolanaChain",e),createGenericJRPCMiddleware("switchSolanaChain",r)])}function createAccountMiddleware(t){let{updatePrivatekey:e}=t;return(0,s.UZ)([createGenericJRPCMiddleware("updateAccount",e)])}function ownKeys$3(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function _objectSpread$3(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};
1e%2?ownKeys$3(Object(r),!0).forEach(function(e){(0,n.Z)(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys$3(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}let BaseInjectedProvider=class BaseInjectedProvider extends u.Zk{constructor(t){let{config:e,state:r}=t;super({config:{chainConfig:_objectSpread$3(_objectSpread$3({},e.chainConfig),{},{chainNamespace:a.EN.SOLANA})},state:r})}async switchChain(t){return Promise.resolve()}async setupProvider(t){let e=new s.eI,r=this.getProviderHandlers(t),n=createSolanaMiddleware(r);e.push(n);let a=createConfigMiddleware(this.config.chainConfig);e.push(a);let u=this.getInjectedProviderProxy(t);u&&e.push(u);let c=(0,o.Xj)(e);this.updateProviderEngineProxy(c),await this.lookupNetwork()}async lookupNetwork(){let{chainConfig:t}=this.config;return this.update({chainId:t.chainId}),t.chainId||""}getInjectedProviderProxy(t){}};let getBaseProviderHandlers=t=>({requestAccounts:async()=>t.publicKey?[l().encode(t.publicKey.toBytes())]:[],getAccounts:async()=>t.publicKey?[l().encode(t.publicKey.toBytes())]:[],getPrivateKey:async()=>{throw f.Sy.rpc.methodNotSupported()},getSecretKey:async()=>{throw f.Sy.rpc.methodNotSupported()},signTransaction:async e=>{let r=await t.signTransaction(e.params.message);return r},signMessage:async e=>{let r=await t.signMessage(e.params.message,e.params.display);return r.signature},signAllTransactions:async e=>{var r,n;if(!(null!==(r=e.params)&&void 0!==r&&r.message)||!(null!==(n=e.params)&&void 0!==n&&n.message.length))throw f.Sy.rpc.invalidParams("message");let o=await t.signAllTransactions(e.params.message);return o},signAndSendTransaction:async e=>{let r=await t.signAndSendTransaction(e.params.message);return{signature:r.signature}}});function ownKeys$2(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function _objectSpread$2(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ownKeys$2(Object(r),!0).forEach(function(e){(0,n.Z)(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys$2(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function createInjectedProviderProxyMiddleware(t){return(0,s.Pk)(async(e,r,n)=>{let o=await t.request(_objectSpread$2({},e));r.result=o})}let PhantomInjectedProvider=class PhantomInjectedProvider extends BaseInjectedProvider{getProviderHandlers(t){return getBaseProviderHandlers(t)}getInjectedProviderProxy(t){return createInjectedProviderProxyMiddleware(t)}};let getTorusHandlers=t=>({requestAccounts:async()=>{let e=await t.request({method:"solana_requestAccounts",params:{}});return e},getAccounts:async()=>{let e=await t.request({method:"solana_requestAccounts",params:{}});return e},getPrivateKey:async()=>{throw f.Sy.rpc.methodNotSupported()},getSecretKey:async()=>{throw f.Sy.rpc.methodNotSupported()},signMessage:async e=>{var r;if(!(null!==(r=e.params)&&void 0!==r&&r.message))throw f.Sy.rpc.invalidParams("message");let n=await t.signMessage(e.params.message);return n},signTransaction:async e=>{var r;if(!(null!==(r=e.params)&&void 0!==r&&r.message))throw f.Sy.rpc.invalidParams("message");let n=e.params.message,o=await t.signTransaction(n);return o},signAndSendTransaction:async e=>{var r;if(!(null!==(r=e.params)&&void 0!==r&&r.message))throw f.Sy.rpc.invalidParams("message");let n=e.params.message,o=await t.sendTransaction(n);return{signature:o}},signAllTransactions:async e=>{var r,n;if(!(null!==(r=e.params)&&void 0!==r&&r.message)||!(null!==(n=e.params)&&void 0!==n&&n.message.length))throw f.Sy.rpc.invalidParams("message");let o=e.params.message,s=await t.signAllTransactions(o);return s}});function ownKeys$1(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function _objectSpread$1(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};
1e%2?ownKeys$1(Object(r),!0).forEach(function(e){(0,n.Z)(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys$1(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}let TorusInjectedProvider=class TorusInjectedProvider extends u.Zk{constructor(t){let{config:e,state:r}=t;super({config:{chainConfig:_objectSpread$1(_objectSpread$1({},e.chainConfig),{},{chainNamespace:a.EN.SOLANA})},state:r})}async switchChain(t){return Promise.resolve()}async setupProvider(t){this.handleInjectedProviderUpdate(t),await this.setupEngine(t)}async lookupNetwork(){if(!this.provider)throw f.Sy.provider.custom({message:"Torus solana provider is not initialized",code:4902});let{chainId:t}=this.config.chainConfig,e=await this.provider.request({method:"solana_chainId"}),r=(0,a.H2)(e.toString())?e:`0x${parseInt(e,10).toString(16)}`;if(t!==r)throw a.Ty.rpcConnectionError(`Invalid network, net_version is: ${r}, expected: ${t}`);return this.update({chainId:r}),this.provider.emit("connect",{chainId:this.state.chainId}),this.provider.emit("chainChanged",this.state.chainId),this.state.chainId}async setupEngine(t){let e=getTorusHandlers(t),r=createSolanaMiddleware(e),n=createInjectedProviderProxyMiddleware(t),a=new s.eI;a.push(r),a.push(n);let u=(0,o.Xj)(a);this.updateProviderEngineProxy(u),await this.lookupNetwork()}async handleInjectedProviderUpdate(t){t.on("accountsChanged",async t=>{this.provider.emit("accountsChanged",t)}),t.on("chainChanged",async e=>{let r=(0,a.H2)(e)?e:`0x${parseInt(e,10).toString(16)}`;this.configure({chainConfig:_objectSpread$1(_objectSpread$1({},this.config.chainConfig),{},{chainId:r})}),await this.setupProvider(t)})}};async function getProviderHandlers(t){let{privKey:e,getProviderEngineProxy:r}=t;if("string"!=typeof e)throw a.Ty.invalidParams("privKey must be a string");let n=d.RG.fromSecretKey(g.from(e,"hex"));return{requestAccounts:async()=>[n.publicKey.toBase58()],getAccounts:async()=>[n.publicKey.toBase58()],getPrivateKey:async()=>e,getSecretKey:async()=>l().encode(n.secretKey),signTransaction:async t=>{var e;if(!(null!==(e=t.params)&&void 0!==e&&e.message))throw f.Sy.rpc.invalidParams("message");let r=t.params.message;return void 0!==r.version||r instanceof d.GS?r.sign([n]):r.partialSign(n),r},signMessage:async t=>{var e;if(!(null!==(e=t.params)&&void 0!==e&&e.message))throw f.Sy.rpc.invalidParams("message");let r=y().sign.detached(t.params.message,n.secretKey);return r},signAndSendTransaction:async t=>{var e;if(!(null!==(e=t.params)&&void 0!==e&&e.message))throw f.Sy.rpc.invalidParams("message");let o=r();if(!o)throw f.Sy.provider.custom({message:"Provider is not initialized",code:4902});let s=t.params.message;void 0!==s.version||s instanceof d.GS?s.sign([n]):s.partialSign(n);let a=await o.request({method:"sendTransaction",params:[g.from(s.serialize()).toString("base64"),{encoding:"base64"}]});return{signature:a}},signAllTransactions:async t=>{var e,r,o;if(!(null!==(e=t.params)&&void 0!==e&&e.message)||!(null!==(r=t.params)&&void 0!==r&&r.message.length))throw f.Sy.rpc.invalidParams("message");let s=null===(o=t.params)||void 0===o?void 0:o.message;for(let t of s||[])void 0!==t.version||t instanceof d.GS?t.sign([n]):t.partialSign(n);return s}}}function ownKeys(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(r),!0).forEach(function(e){(0,n.Z)(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}let SolanaPrivateKeyProvider=class SolanaPrivateKeyProvider extends u.Zk{constructor(t){let{config:e,state:r}=t;super({config:{chainConfig:_objectSpread(_objectSpread({},e.chainConfig),{},{chainNamespace:a.EN.SOLANA})},state:r})}async enable(){if(!this.state.privateKey)throw f.Sy.provider.custom({message:"Private key is not found in state, plz pass it in constructor state param",code:4902});return await this.setupProvider(this.state.privateKey),this._providerEngineProxy.request({method:"eth_accounts"})}async setupProvider(t){let e=await getProviderHandlers({privKey:t,getProviderEngineProxy:this.getProviderEngineProxy.bind(this)}
1),r=createSolanaMiddleware(e),n=new s.eI,{networkMiddleware:a}=createJsonRpcClient(this.config.chainConfig);n.push(this.getChainSwitchMiddleware()),n.push(this.getAccountMiddleware()),n.push(r),n.push(a);let u=(0,o.Xj)(n);this.updateProviderEngineProxy(u),await this.lookupNetwork()}async updateAccount(t){if(!this._providerEngineProxy)throw f.Sy.provider.custom({message:"Provider is not initialized",code:4902});let e=await this._providerEngineProxy.request({method:"solanaPrivateKey"});e!==t.privateKey&&(await this.setupProvider(t.privateKey),this._providerEngineProxy.emit("accountsChanged",{accounts:await this._providerEngineProxy.request({method:"requestAccounts"})}))}async switchChain(t){if(!this._providerEngineProxy)throw f.Sy.provider.custom({message:"Provider is not initialized",code:4902});let e=this.getChainConfig(t.chainId);this.update({chainId:"loading"}),this.configure({chainConfig:e});let r=await this._providerEngineProxy.request({method:"solanaPrivateKey"});await this.setupProvider(r)}async lookupNetwork(){if(!this._providerEngineProxy)throw f.Sy.provider.custom({message:"Provider is not initialized",code:4902});let t=await this._providerEngineProxy.request({method:"getHealth",params:[]}),{chainConfig:e}=this.config;if("ok"!==t)throw a.Ty.rpcConnectionError(`Failed to lookup network for following rpc target: ${e.rpcTarget}`);return this.update({chainId:e.chainId}),this.state.chainId!==e.chainId&&(this.provider.emit("chainChanged",this.state.chainId),this.provider.emit("connect",{chainId:this.state.chainId})),this.state.chainId}getChainSwitchMiddleware(){let t=createChainSwitchMiddleware({addNewChainConfig:async t=>{if(!t.params)throw f.Sy.rpc.invalidParams("Missing request params");let{chainId:e,chainName:r,rpcUrls:n,blockExplorerUrls:o,nativeCurrency:s}=t.params;if(!e)throw f.Sy.rpc.invalidParams("Missing chainId in chainParams");if(!n||0===n.length)throw f.Sy.rpc.invalidParams("Missing rpcUrls in chainParams");if(!s)throw f.Sy.rpc.invalidParams("Missing nativeCurrency in chainParams");this.addChain({chainNamespace:a.EN.SOLANA,chainId:e,ticker:(null==s?void 0:s.symbol)||"SOL",tickerName:(null==s?void 0:s.name)||"Solana",displayName:r,rpcTarget:n[0],blockExplorer:(null==o?void 0:o[0])||"",decimals:(null==s?void 0:s.decimals)||9})},switchSolanaChain:async t=>{if(!t.params)throw f.Sy.rpc.invalidParams("Missing request params");if(!t.params.chainId)throw f.Sy.rpc.invalidParams("Missing chainId");await this.switchChain(t.params)}});return t}getAccountMiddleware(){return createAccountMiddleware({updatePrivatekey:async t=>{if(!t.params)throw f.Sy.rpc.invalidParams("Missing request params");if(!t.params.privateKey)throw f.Sy.rpc.invalidParams("Missing privateKey");let{privateKey:e}=t.params;await this.updateAccount({privateKey:e})}})}};(0,n.Z)(SolanaPrivateKeyProvider,"getProviderInstance",async t=>{let e=new SolanaPrivateKeyProvider({config:{chainConfig:t.chainConfig}});return await e.setupProvider(t.privKey),e})},9745:function(t,e,r){var n=r(2799);t.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},2799:function(t,e,r){"use strict";var n=r(92336).Buffer;function base(t){if(t.length>=255)throw TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r<e.length;r++)e[r]=255;for(var o=0;o<t.length;o++){var s=t.charAt(o),a=s.charCodeAt(0);if(255!==e[a])throw TypeError(s+" is ambiguous");e[a]=o}var u=t.length,c=t.charAt(0),l=Math.log(u)/Math.log(256),f=Math.log(256)/Math.log(u);function decodeUnsafe(t){if("string"!=typeof t)throw TypeError("Expected String");if(0===t.length)return n.alloc(0);for(var r=0,o=0,s=0;t[r]===c;)o++,r++;for(var a=(t.length-r)*l+1>>>0,f=new Uint8Array(a);t[r];){var d=e[t.charCodeAt(r)];if(255===d)return;for(var p=0,y=a-1;(0!==d||p<s)&&-1!==y;y--,p++)d+=u*f[y]>>>0,f[y]=d%256>>>0,d=d/256>>>0;if(0!==d)throw Error("Non-zero carry");s=p,r++}for(var g=a-s;g!==a&&0===f[g];)g++;var m=n.allocUnsafe(o+(a-g));m.fill(0,0,o);for(var v=o;g!==a;)m[v++]=f[g++];return m}function decode(t){var e=decodeUnsafe(t);if(e)return e;throw Error("Non-base"+u+" character")}return{encode:function(e){if((Array.isArray(e)||e instanceof Uint8Array)&&(e=n.from(e)),!n.isBuffer(e))throw TypeError("Expected Buffer");if(0===e.length)return"";for(var r=0,o=0,s=0,a=e.length;s!==a&&0===e[s];)s++,r++;for(var l=(a-s)*f+1>>>0,d=new Uint8Array(l);s!==a;){for(var p=e[s],y=0,g=l-1;(0!==p||y<o)&&-1!==g;g--,y++)p+=256*d[g]>>>0,d[g]=p%u>>>0,p=p/u>>>0;
1if(0!==p)throw Error("Non-zero carry");o=y,s++}for(var m=l-o;m!==l&&0===d[m];)m++;for(var v=c.repeat(r);m<l;++m)v+=t.charAt(d[m]);return v},decodeUnsafe:decodeUnsafe,decode:decode}}t.exports=base},40265:function(t,e,r){"use strict";var n=r(67133).Buffer;function toBigIntLE(t){{let e=n.from(t);e.reverse();let r=e.toString("hex");return 0===r.length?BigInt(0):BigInt(`0x${r}`)}}function toBufferLE(t,e){{let r=t.toString(16),o=n.from(r.padStart(2*e,"0").slice(0,2*e),"hex");return o.reverse(),o}}e.oU=toBigIntLE,e.k$=toBufferLE},84453:function(t,e,r){"use strict";var n=r(67133).Buffer,o=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),s=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__decorate||function(t,e,r,n){var o,s=arguments.length,a=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(a=(s<3?o(a):s>3?o(e,r,a):o(e,r))||a);return s>3&&a&&Object.defineProperty(e,r,a),a},u=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.hasOwnProperty.call(t,r)&&o(e,t,r);return s(e,t),e},c=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.deserializeUnchecked=e.deserialize=e.serialize=e.BinaryReader=e.BinaryWriter=e.BorshError=e.baseDecode=e.baseEncode=void 0;let l=c(r(56662)),f=c(r(76031)),d=u(r(71332)),p="function"!=typeof TextDecoder?d.TextDecoder:TextDecoder,y=new p("utf-8",{fatal:!0});function baseEncode(t){return"string"==typeof t&&(t=n.from(t,"utf8")),f.default.encode(n.from(t))}function baseDecode(t){return n.from(f.default.decode(t))}e.baseEncode=baseEncode,e.baseDecode=baseDecode;let BorshError=class BorshError extends Error{constructor(t){super(t),this.fieldPath=[],this.originalMessage=t}addToFieldPath(t){this.fieldPath.splice(0,0,t),this.message=this.originalMessage+": "+this.fieldPath.join(".")}};e.BorshError=BorshError;let BinaryWriter=class BinaryWriter{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(t){this.maybeResize(),this.buf.writeUInt8(t,this.length),this.length+=1}writeU16(t){this.maybeResize(),this.buf.writeUInt16LE(t,this.length),this.length+=2}writeU32(t){this.maybeResize(),this.buf.writeUInt32LE(t,this.length),this.length+=4}writeU64(t){this.maybeResize(),this.writeBuffer(n.from(new l.default(t).toArray("le",8)))}writeU128(t){this.maybeResize(),this.writeBuffer(n.from(new l.default(t).toArray("le",16)))}writeU256(t){this.maybeResize(),this.writeBuffer(n.from(new l.default(t).toArray("le",32)))}writeU512(t){this.maybeResize(),this.writeBuffer(n.from(new l.default(t).toArray("le",64)))}writeBuffer(t){this.buf=n.concat([n.from(this.buf.subarray(0,this.length)),t,n.alloc(1024)]),this.length+=t.length}writeString(t){this.maybeResize();let e=n.from(t,"utf8");this.writeU32(e.length),this.writeBuffer(e)}writeFixedArray(t){this.writeBuffer(n.from(t))}writeArray(t,e){for(let r of(this.maybeResize(),this.writeU32(t.length),t))this.maybeResize(),e(r)}toArray(){return this.buf.subarray(0,this.length)}};function handlingRangeError(t,e,r){let n=r.value;r.value=function(...t){try{return n.apply(this,t)}catch(t){if(t instanceof RangeError){let e=t.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(e)>=0)throw new BorshError("Reached the end of buffer when deserializing")}throw t}}}e.BinaryWriter=BinaryWriter;let BinaryReader=class BinaryReader{constructor(t){this.buf=t,this.offset=0}readU8(){let t=this.buf.readUInt8(this.offset);return this.offset+=1,t}readU16(){let t=this.buf.readUInt16LE(this.offset);return this.offset+=2,t}readU32(){let t=this.buf.readUInt32LE(this.offset);return this.offset+=4,t}readU64(){let t=this.readBuffer(8);return new l.default(t,"le")}readU128(){let t=this.readBuffer(16);return new l.default(t,"le")}readU256(){let t=this.readBuffer(32);return new l.default(t,"le")}readU512(){let t=this.readBuffer(64);return new l.default(t,"le")}readBuffer(t){if(this.offset+t>this.buf.length)throw new BorshError(`Expected buffer length ${t} isn't within bounds`);let e=this.buf.slice(this.offset,this.offset+t);return this.offset+=t,e}readString(){let t=this.readU32(),e=this.readBuffer(t);try{return y.decode(e)}catch(t){throw new BorshError(`Error decoding UTF-8 string: ${t}`)}}readFixedArray(t){return new Uint8Array(this.readBuffer(t))}readArray(t){let e=this.readU32(),r=[];for(let n=0;n<e;++n)r.push(t());return r}};function capitalizeFirstLetter(t){return t.charAt(0).toUpperCase()+t.slice(1)}function serializeField(t,e,r,n,o){try{if("string"==typeof n)o[`write${capitalizeFirstLetter(n)}`](r);
1else if(n instanceof Array){if("number"==typeof n[0]){if(r.length!==n[0])throw new BorshError(`Expecting byte array of length ${n[0]}, but got ${r.length} bytes`);o.writeFixedArray(r)}else if(2===n.length&&"number"==typeof n[1]){if(r.length!==n[1])throw new BorshError(`Expecting byte array of length ${n[1]}, but got ${r.length} bytes`);for(let e=0;e<n[1];e++)serializeField(t,null,r[e],n[0],o)}else o.writeArray(r,r=>{serializeField(t,e,r,n[0],o)})}else if(void 0!==n.kind)switch(n.kind){case"option":null==r?o.writeU8(0):(o.writeU8(1),serializeField(t,e,r,n.type,o));break;case"map":o.writeU32(r.size),r.forEach((r,s)=>{serializeField(t,e,s,n.key,o),serializeField(t,e,r,n.value,o)});break;default:throw new BorshError(`FieldType ${n} unrecognized`)}else serializeStruct(t,r,o)}catch(t){throw t instanceof BorshError&&t.addToFieldPath(e),t}}function serializeStruct(t,e,r){if("function"==typeof e.borshSerialize){e.borshSerialize(r);return}let n=t.get(e.constructor);if(!n)throw new BorshError(`Class ${e.constructor.name} is missing in schema`);if("struct"===n.kind)n.fields.map(([n,o])=>{serializeField(t,n,e[n],o,r)});else if("enum"===n.kind){let o=e[n.field];for(let s=0;s<n.values.length;++s){let[a,u]=n.values[s];if(a===o){r.writeU8(s),serializeField(t,a,e[a],u,r);break}}}else throw new BorshError(`Unexpected schema kind: ${n.kind} for ${e.constructor.name}`)}function serialize(t,e,r=BinaryWriter){let n=new r;return serializeStruct(t,e,n),n.toArray()}function deserializeField(t,e,r,n){try{if("string"==typeof r)return n[`read${capitalizeFirstLetter(r)}`]();if(r instanceof Array){if("number"==typeof r[0])return n.readFixedArray(r[0]);if("number"!=typeof r[1])return n.readArray(()=>deserializeField(t,e,r[0],n));{let e=[];for(let o=0;o<r[1];o++)e.push(deserializeField(t,null,r[0],n));return e}}if("option"===r.kind){let o=n.readU8();if(o)return deserializeField(t,e,r.type,n);return}if("map"===r.kind){let o=new Map,s=n.readU32();for(let a=0;a<s;a++){let s=deserializeField(t,e,r.key,n),a=deserializeField(t,e,r.value,n);o.set(s,a)}return o}return deserializeStruct(t,r,n)}catch(t){throw t instanceof BorshError&&t.addToFieldPath(e),t}}function deserializeStruct(t,e,r){if("function"==typeof e.borshDeserialize)return e.borshDeserialize(r);let n=t.get(e);if(!n)throw new BorshError(`Class ${e.name} is missing in schema`);if("struct"===n.kind){let n={};for(let[o,s]of t.get(e).fields)n[o]=deserializeField(t,o,s,r);return new e(n)}if("enum"===n.kind){let o=r.readU8();if(o>=n.values.length)throw new BorshError(`Enum index: ${o} is out of range`);let[s,a]=n.values[o],u=deserializeField(t,s,a,r);return new e({[s]:u})}throw new BorshError(`Unexpected schema kind: ${n.kind} for ${e.constructor.name}`)}function deserialize(t,e,r,n=BinaryReader){let o=new n(r),s=deserializeStruct(t,e,o);if(o.offset<r.length)throw new BorshError(`Unexpected ${r.length-o.offset} bytes after deserialized data`);return s}function deserializeUnchecked(t,e,r,n=BinaryReader){let o=new n(r);return deserializeStruct(t,e,o)}a([handlingRangeError],BinaryReader.prototype,"readU8",null),a([handlingRangeError],BinaryReader.prototype,"readU16",null),a([handlingRangeError],BinaryReader.prototype,"readU32",null),a([handlingRangeError],BinaryReader.prototype,"readU64",null),a([handlingRangeError],BinaryReader.prototype,"readU128",null),a([handlingRangeError],BinaryReader.prototype,"readU256",null),a([handlingRangeError],BinaryReader.prototype,"readU512",null),a([handlingRangeError],BinaryReader.prototype,"readString",null),a([handlingRangeError],BinaryReader.prototype,"readFixedArray",null),a([handlingRangeError],BinaryReader.prototype,"readArray",null),e.BinaryReader=BinaryReader,e.serialize=serialize,e.deserialize=deserialize,e.deserializeUnchecked=deserializeUnchecked},76031:function(t,e,r){var n=r(46432);t.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},46432:function(t,e,r){"use strict";var n=r(92336).Buffer;function base(t){if(t.length>=255)throw TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r<e.length;r++)e[r]=255;for(var o=0;o<t.length;o++){var s=t.charAt(o),a=s.charCodeAt(0);if(255!==e[a])throw TypeError(s+" is ambiguous");e[a]=o}var u=t.length,c=t.charAt(0),l=Math.log(u)/Math.log(256),f=Math.log(256)/Math.log(u);
vendor: 4,198 bytes, line 1
1function decodeUnsafe(t){if("string"!=typeof t)throw TypeError("Expected String");if(0===t.length)return n.alloc(0);for(var r=0,o=0,s=0;t[r]===c;)o++,r++;for(var a=(t.length-r)*l+1>>>0,f=new Uint8Array(a);t[r];){var d=e[t.charCodeAt(r)];if(255===d)return;for(var p=0,y=a-1;(0!==d||p<s)&&-1!==y;y--,p++)d+=u*f[y]>>>0,f[y]=d%256>>>0,d=d/256>>>0;if(0!==d)throw Error("Non-zero carry");s=p,r++}for(var g=a-s;g!==a&&0===f[g];)g++;var m=n.allocUnsafe(o+(a-g));m.fill(0,0,o);for(var v=o;g!==a;)m[v++]=f[g++];return m}function decode(t){var e=decodeUnsafe(t);if(e)return e;throw Error("Non-base"+u+" character")}return{encode:function(e){if((Array.isArray(e)||e instanceof Uint8Array)&&(e=n.from(e)),!n.isBuffer(e))throw TypeError("Expected Buffer");if(0===e.length)return"";for(var r=0,o=0,s=0,a=e.length;s!==a&&0===e[s];)s++,r++;for(var l=(a-s)*f+1>>>0,d=new Uint8Array(l);s!==a;){for(var p=e[s],y=0,g=l-1;(0!==p||y<o)&&-1!==g;g--,y++)p+=256*d[g]>>>0,d[g]=p%u>>>0,p=p/u>>>0;if(0!==p)throw Error("Non-zero carry");o=y,s++}for(var m=l-o;m!==l&&0===d[m];)m++;for(var v=c.repeat(r);m<l;++m)v+=t.charAt(d[m]);return v},decodeUnsafe:decodeUnsafe,decode:decode}}t.exports=base},28729:function(t){"use strict";var e=Object.prototype.hasOwnProperty,r="~";function Events(){}function EE(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function addListener(t,e,n,o,s){if("function"!=typeof n)throw TypeError("The listener must be a function");var a=new EE(n,o||t,s),u=r?r+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],a]:t._events[u].push(a):(t._events[u]=a,t._eventsCount++),t}function clearEvent(t,e){0==--t._eventsCount?t._events=new Events:delete t._events[e]}function EventEmitter(){this._events=new Events,this._eventsCount=0}Object.create&&(Events.prototype=Object.create(null),new Events().__proto__||(r=!1)),EventEmitter.prototype.eventNames=function(){var t,n,o=[];if(0===this._eventsCount)return o;for(n in t=this._events)e.call(t,n)&&o.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(t)):o},EventEmitter.prototype.listeners=function(t){var e=r?r+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,s=n.length,a=Array(s);o<s;o++)a[o]=n[o].fn;return a},EventEmitter.prototype.listenerCount=function(t){var e=r?r+t:t,n=this._events[e];return n?n.fn?1:n.length:0},EventEmitter.prototype.emit=function(t,e,n,o,s,a){var u=r?r+t:t;if(!this._events[u])return!1;var c,l,f=this._events[u],d=arguments.length;if(f.fn){switch(f.once&&this.removeListener(t,f.fn,void 0,!0),d){case 1:return f.fn.call(f.context),!0;case 2:return f.fn.call(f.context,e),!0;case 3:return f.fn.call(f.context,e,n),!0;case 4:return f.fn.call(f.context,e,n,o),!0;case 5:return f.fn.call(f.context,e,n,o,s),!0;case 6:return f.fn.call(f.context,e,n,o,s,a),!0}for(l=1,c=Array(d-1);l<d;l++)c[l-1]=arguments[l];f.fn.apply(f.context,c)}else{var p,y=f.length;for(l=0;l<y;l++)switch(f[l].once&&this.removeListener(t,f[l].fn,void 0,!0),d){case 1:f[l].fn.call(f[l].context);break;case 2:f[l].fn.call(f[l].context,e);break;case 3:f[l].fn.call(f[l].context,e,n);break;case 4:f[l].fn.call(f[l].context,e,n,o);break;default:if(!c)for(p=1,c=Array(d-1);p<d;p++)c[p-1]=arguments[p];f[l].fn.apply(f[l].context,c)}}return!0},EventEmitter.prototype.on=function(t,e,r){return addListener(this,t,e,r,!1)},EventEmitter.prototype.once=function(t,e,r){return addListener(this,t,e,r,!0)},EventEmitter.prototype.removeListener=function(t,e,n,o){var s=r?r+t:t;if(!this._events[s])return this;if(!e)return clearEvent(this,s),this;var a=this._events[s];if(a.fn)a.fn!==e||o&&!a.once||n&&a.context!==n||clearEvent(this,s);else{for(var u=0,c=[],l=a.length;u<l;u++)(a[u].fn!==e||o&&!a[u].once||n&&a[u].context!==n)&&c.push(a[u]);c.length?this._events[s]=1===c.length?c[0]:c:clearEvent(this,s)}return this},EventEmitter.prototype.removeAllListeners=function(t){var e;return t?(e=r?r+t:t,this._events[e]&&clearEvent(this,e)):(this._events=new Events,this._eventsCount=0),this},EventEmitter.prototype.off=EventEmitter.prototype.removeListener,EventEmitter.prototype.addListener=EventEmitter.prototype.on,EventEmitter.prefixed=r,EventEmitter.EventEmitter=EventEmitter,t.exports=EventEmitter}
1,152:function(t,e,r){"use strict";let n=r(86808).v4,o=r(89559),ClientBrowser=function(t,e){if(!(this instanceof ClientBrowser))return new ClientBrowser(t,e);e||(e={}),this.options={reviver:void 0!==e.reviver?e.reviver:null,replacer:void 0!==e.replacer?e.replacer:null,generator:void 0!==e.generator?e.generator:function(){return n()},version:void 0!==e.version?e.version:2,notificationIdNull:"boolean"==typeof e.notificationIdNull&&e.notificationIdNull},this.callServer=t};t.exports=ClientBrowser,ClientBrowser.prototype.request=function(t,e,r,n){let s;let a=this,u=null,c=Array.isArray(t)&&"function"==typeof e;if(1===this.options.version&&c)throw TypeError("JSON-RPC 1.0 does not support batching");let l=!c&&t&&"object"==typeof t&&"function"==typeof e;if(c||l)n=e,u=t;else{"function"==typeof r&&(n=r,r=void 0);let s="function"==typeof n;try{u=o(t,e,r,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(t){if(s)return n(t);throw t}if(!s)return u}try{s=JSON.stringify(u,this.options.replacer)}catch(t){return n(t)}return this.callServer(s,function(t,e){a._parseResponse(t,e,n)}),u},ClientBrowser.prototype._parseResponse=function(t,e,r){let n;if(t){r(t);return}if(!e)return r();try{n=JSON.parse(e,this.options.reviver)}catch(t){return r(t)}if(3===r.length){if(!Array.isArray(n))return r(null,n.error,n.result);{let isError=function(t){return void 0!==t.error};return r(null,n.filter(isError),n.filter(function(t){return!isError(t)}))}}r(null,n)}},89559:function(t,e,r){"use strict";let n=r(86808).v4;t.exports=function(t,e,r,o){if("string"!=typeof t)throw TypeError(t+" must be a string");o=o||{};let s="number"==typeof o.version?o.version:2;if(1!==s&&2!==s)throw TypeError(s+" must be 1 or 2");let a={method:t};if(2===s&&(a.jsonrpc="2.0"),e){if("object"!=typeof e&&!Array.isArray(e))throw TypeError(e+" must be an object, array or omitted");a.params=e}if(void 0===r){let t="function"==typeof o.generator?o.generator:function(){return n()};a.id=t(a,o)}else 2===s&&null===r?o.notificationIdNull&&(a.id=null):a.id=r;return a}},86808:function(t,e,r){"use strict";r.d(e,{v4:function(){return esm_browser_v4}});var n,o=new Uint8Array(16);function rng(){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(o)}for(var s=/^(?:[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,a=[],u=0;u<256;++u)a.push((u+256).toString(16).substr(1));var esm_browser_stringify=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(a[t[e+0]]+a[t[e+1]]+a[t[e+2]]+a[t[e+3]]+"-"+a[t[e+4]]+a[t[e+5]]+"-"+a[t[e+6]]+a[t[e+7]]+"-"+a[t[e+8]]+a[t[e+9]]+"-"+a[t[e+10]]+a[t[e+11]]+a[t[e+12]]+a[t[e+13]]+a[t[e+14]]+a[t[e+15]]).toLowerCase();if(!("string"==typeof r&&s.test(r)))throw TypeError("Stringified UUID is invalid");return r},esm_browser_v4=function(t,e,r){var n=(t=t||{}).random||(t.rng||rng)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){r=r||0;for(var o=0;o<16;++o)e[r+o]=n[o];return e}return esm_browser_stringify(n)}},17449:function(t,e,r){"use strict";r(67133).Buffer;var n=r(26314),o=(n(r(74001)),n(r(64662)),n(r(61565)),n(r(86358)),n(r(1127)),n(r(35684)),n(r(60746))),s=n(r(83654)),a=r(28729);function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}a.EventEmitter},95400:function(t,e,r){"use strict";var n=r(26314),o=n(r(86358)),s=n(r(1127)),a=n(r(35684)),u=n(r(60746)),c=n(r(83654));function _createSuper(t){var e=_isNativeReflectConstruct();return function(){var r,n=(0,c.default)(t);if(e){var o=(0,c.default)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return(0,u.default)(this,r)}}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}r(28729).EventEmitter},95248:function(t){function _assertThisInitialized(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}
1t.exports=_assertThisInitialized,t.exports.__esModule=!0,t.exports.default=t.exports},64662:function(t){function asyncGeneratorStep(t,e,r,n,o,s,a){try{var u=t[s](a),c=u.value}catch(t){r(t);return}u.done?e(c):Promise.resolve(c).then(n,o)}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var s=t.apply(e,r);function _next(t){asyncGeneratorStep(s,n,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(s,n,o,_next,_throw,"throw",t)}_next(void 0)})}}t.exports=_asyncToGenerator,t.exports.__esModule=!0,t.exports.default=t.exports},86358:function(t){function _classCallCheck(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}t.exports=_classCallCheck,t.exports.__esModule=!0,t.exports.default=t.exports},1127:function(t,e,r){var n=r(19040);function _defineProperties(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,n(o.key),o)}}function _createClass(t,e,r){return e&&_defineProperties(t.prototype,e),r&&_defineProperties(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}t.exports=_createClass,t.exports.__esModule=!0,t.exports.default=t.exports},83654:function(t){function _getPrototypeOf(e){return t.exports=_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.__esModule=!0,t.exports.default=t.exports,_getPrototypeOf(e)}t.exports=_getPrototypeOf,t.exports.__esModule=!0,t.exports.default=t.exports},35684:function(t,e,r){var n=r(60795);function _inherits(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&n(t,e)}t.exports=_inherits,t.exports.__esModule=!0,t.exports.default=t.exports},26314:function(t){function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}t.exports=_interopRequireDefault,t.exports.__esModule=!0,t.exports.default=t.exports},60746:function(t,e,r){var n=r(61565).default,o=r(95248);function _possibleConstructorReturn(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");return o(t)}t.exports=_possibleConstructorReturn,t.exports.__esModule=!0,t.exports.default=t.exports},14436:function(t,e,r){var n=r(61565).default;function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */t.exports=_regeneratorRuntime=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var e,r={},o=Object.prototype,s=o.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var o=Object.create((e&&e.prototype instanceof Generator?e:Generator).prototype);return a(o,"_invoke",{value:makeInvokeMethod(t,r,new Context(n||[]))}),o}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var d="suspendedStart",p="executing",y="completed",g={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};define(m,c,function(){return this});var v=Object.getPrototypeOf,w=v&&v(v(values([])));w&&w!==o&&s.call(w,c)&&(m=w);var b=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(m);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t)})})}function AsyncIterator(t,e){var r;function invoke(r,o,a,u){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==n(f)&&s.call(f,"__await")?e.resolve(f.__await).then(function(t){invoke("next",t,a,u)},function(t){invoke("throw",t,a,u)}):e.resolve(f).then(function(t){l.value=t,a(l)},function(t){return invoke("throw",t,a,u)})}u(c.arg)}a(this,"_invoke",{value:function(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r)})}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,n){var o=d;return function(s,a){if(o===p)throw Error("Generator is already running");if(o===y){if("throw"===s)throw a;return{value:e,done:!0}}
vendor: 4,485 bytes, line 1
1for(n.method=s,n.arg=a;;){var u=n.delegate;if(u){var c=maybeInvokeDelegate(u,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var l=tryCatch(t,r,n);if("normal"===l.type){if(o=n.done?y:"suspendedYield",l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function maybeInvokeDelegate(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=TypeError("The iterator does not provide a '"+n+"' method")),g;var s=tryCatch(o,t.iterator,r.arg);if("throw"===s.type)return r.method="throw",r.arg=s.arg,r.delegate=null,g;var a=s.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=TypeError("iterator result is not an object"),r.delegate=null,g)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function next(){for(;++o<t.length;)if(s.call(t,o))return next.value=t[o],next.done=!1,next;return next.value=e,next.done=!0,next};return i.next=i}}throw TypeError(n(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(b,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,f,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,f,"GeneratorFunction")),t.prototype=Object.create(b),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,l,function(){return this}),r.AsyncIterator=AsyncIterator,r.async=function(t,e,n,o,s){void 0===s&&(s=Promise);var a=new AsyncIterator(wrap(t,e,n,o),s);return r.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},defineIteratorMethods(b),define(b,f,"Generator"),define(b,c,function(){return this}),define(b,"toString",function(){return"[object Generator]"}),r.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&s.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function handle(n,o){return a.type="throw",a.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],a=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=s.call(o,"catchLoc"),c=s.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&s.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);
1var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:values(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},r}t.exports=_regeneratorRuntime,t.exports.__esModule=!0,t.exports.default=t.exports},60795:function(t){function _setPrototypeOf(e,r){return t.exports=_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports.default=t.exports,_setPrototypeOf(e,r)}t.exports=_setPrototypeOf,t.exports.__esModule=!0,t.exports.default=t.exports},89944:function(t,e,r){var n=r(61565).default;function _toPrimitive(t,e){if("object"!==n(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!==n(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}t.exports=_toPrimitive,t.exports.__esModule=!0,t.exports.default=t.exports},19040:function(t,e,r){var n=r(61565).default,o=r(89944);function _toPropertyKey(t){var e=o(t,"string");return"symbol"===n(e)?e:String(e)}t.exports=_toPropertyKey,t.exports.__esModule=!0,t.exports.default=t.exports},61565:function(t){function _typeof(e){return t.exports=_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,_typeof(e)}t.exports=_typeof,t.exports.__esModule=!0,t.exports.default=t.exports},74001:function(t,e,r){var n=r(14436)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},63606:function(t,e,r){"use strict";r.d(e,{K:function(){return validateBasic},M:function(){return wNAF}});var n=r(52948),o=r(57843);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */let s=BigInt(0),a=BigInt(1);function wNAF(t,e){let constTimeNegate=(t,e)=>{let r=e.negate();return t?r:e},opts=t=>({windows:Math.ceil(e/t)+1,windowSize:2**(t-1)});return{constTimeNegate,unsafeLadder(e,r){let n=t.ZERO,o=e;for(;r>s;)r&a&&(n=n.add(o)),o=o.double(),r>>=a;return n},precomputeWindow(t,e){let{windows:r,windowSize:n}=opts(e),o=[],s=t,a=s;for(let t=0;t<r;t++){a=s,o.push(a);for(let t=1;t<n;t++)a=a.add(s),o.push(a);s=a.double()}return o},wNAF(e,r,n){let{windows:o,windowSize:s}=opts(e),u=t.ZERO,c=t.BASE,l=BigInt(2**e-1),f=2**e,d=BigInt(e);for(let t=0;t<o;t++){let e=t*s,o=Number(n&l);n>>=d,o>s&&(o-=f,n+=a);let p=e+Math.abs(o)-1,y=t%2!=0,g=o<0;0===o?c=c.add(constTimeNegate(y,r[e])):u=u.add(constTimeNegate(g,r[p]))}return{p:u,f:c}},wNAFCached(t,e,r,n){let o=t._WINDOW_SIZE||1,s=e.get(t);return s||(s=this.precomputeWindow(t,o),1!==o&&e.set(t,n(s))),this.wNAF(o,s,r)}}}function validateBasic(t){return(0,n.OP)(t.Fp),(0,o.FF)(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,n.kK)(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}},52948:function(t,e,r){"use strict";r.d(e,{DV:function(){return FpSqrtEven},OP:function(){return validateField},PS:function(){return getMinHashLength},Tu:function(){return isNegativeLE},U_:function(){return invert},Us:function(){return mapHashToField},gN:function(){return Field},kK:function(){return nLength},oA:function(){return pow2},wQ:function(){return mod}});var n=r(57843);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */let o=BigInt(0),s=BigInt(1),a=BigInt(2),u=BigInt(3),c=BigInt(4),l=BigInt(5),f=BigInt(8);function mod(t,e){let r=t%e;return r>=o?r:e+r}function pow(t,e,r){if(r<=o||e<o)throw Error("Expected power/modulo > 0");if(r===s)return o;let n=s;for(;e>o;)e&s&&(n=n*t%r),t=t*t%r,e>>=s;return n}function pow2(t,e,r){let n=t;for(;e-- >o;)n*=n,n%=r;return n}function invert(t,e){if(t===o||e<=o)throw Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=mod(t,e),n=e,a=o,u=s,c=s,l=o;for(;r!==o;){let t=n/r,e=n%r,o=a-c*t,s=u-l*t;n=r,r=e,a=c,u=l,c=o,l=s}let f=n;if(f!==s)throw Error("invert: does not exist");return mod(a,e)}function tonelliShanks(t){let e,r,n;let u=(t-s)/a;for(e=t-s,r=0;e%a===o;e/=a,r++);for(n=a;n<t&&pow(n,u,t)!==t-s;n++);if(1===r){let e=(t+s)/c;return function(t,r){let n=t.pow(r,e);if(!t.eql(t.sqr(n),r))throw Error("Cannot find square root");return n}}let l=(e+s)/a;return function(t,o){if(t.pow(o,u)===t.neg(t.ONE))throw Error("Cannot find square root");let a=r,c=t.pow(t.mul(t.ONE,n),e),f=t.pow(o,l),d=t.pow(o,e);for(;!t.eql(d,t.ONE);){if(t.eql(d,t.ZERO))return t.ZERO;let e=1;for(let r=t.sqr(d);e<a&&!t.eql(r,t.ONE);e++)r=t.sqr(r);let r=t.pow(c,s<<BigInt(a-e-1));c=t.sqr(r),f=t.mul(f,r),d=t.mul(d,c),a=e}return f}}function FpSqrt(t){if(t%c===u){let e=(t+s)/c;return function(t,r){let n=t.pow(r,e);if(!t.eql(t.sqr(n),r))throw Error("Cannot find square root");return n}}if(t%f===l){let e=(t-l)/f;return function(t,r){let n=t.mul(r,a),o=t.pow(n,e),s=t.mul(r,o),u=t.mul(t.mul(s,a),o),c=t.mul(s,t.sub(u,t.ONE));if(!t.eql(t.sqr(c),r))throw Error("Cannot find square root");return c}}return tonelliShanks(t)}BigInt(9),BigInt(16);let isNegativeLE=(t,e)=>(mod(t,e)&s)===s,d=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function validateField(t){let e=d.reduce((t,e)=>(t[e]="function",t),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,n.FF)(t,e)}function FpPow(t,e,r){if(r<o)throw Error("Expected power > 0");if(r===o)return t.ONE;if(r===s)return e;let n=t.ONE,a=e;for(;r>o;)r&s&&(n=t.mul(n,a)),a=t.sqr(a),r>>=s;return n}function FpInvertBatch(t,e){let r=Array(e.length),n=e.reduce((e,n,o)=>t.is0(n)?e:(r[o]=e,t.mul(e,n)),t.ONE),o=t.inv(n);return e.reduceRight((e,n,o)=>t.is0(n)?e:(r[o]=t.mul(e,r[o]),t.mul(e,n)),o),r}function nLength(t,e){let r=void 0!==e?e:t.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function Field(t,e,r=!1,a={}){if(t<=o)throw Error(`Expected Field ORDER > 0, got ${t}`);let{nBitLength:u,nByteLength:c}=nLength(t,e);if(c>2048)throw Error("Field lengths over 2048 bytes are not supported");let l=FpSqrt(t),f=Object.freeze({ORDER:t,BITS:u,BYTES:c,MASK:(0,n.dQ)(u),ZERO:o,ONE:s,create:e=>mod(e,t),isValid:e=>{if("bigint"!=typeof e)throw Error(`Invalid field element: expected bigint, got ${typeof e}`);return o<=e&&e<t},is0:t=>t===o,isOdd:t=>(t&s)===s,neg:e=>mod(-e,t),eql:(t,e)=>t===e,sqr:e=>mod(e*e,t),add:(e,r)=>mod(e+r,t),sub:(e,r)=>mod(e-r,t),mul:(e,r)=>mod(e*r,t),pow:(t,e)=>FpPow(f,t,e),div:(e,r)=>mod(e*invert(r,t),t),sqrN:t=>t*t,addN:(t,e)=>t+e,subN:(t,e)=>t-e,mulN:(t,e)=>t*e,inv:e=>invert(e,t),sqrt:a.sqrt||(t=>l(f,t)),invertBatch:t=>
1FpInvertBatch(f,t),cmov:(t,e,r)=>r?e:t,toBytes:t=>r?(0,n.S5)(t,c):(0,n.tL)(t,c),fromBytes:t=>{if(t.length!==c)throw Error(`Fp.fromBytes: expected ${c}, got ${t.length}`);return r?(0,n.ty)(t):(0,n.bytesToNumberBE)(t)}});return Object.freeze(f)}function FpSqrtEven(t,e){if(!t.isOdd)throw Error("Field doesn't have isOdd");let r=t.sqrt(e);return t.isOdd(r)?t.neg(r):r}function getFieldBytesLength(t){if("bigint"!=typeof t)throw Error("field order must be bigint");let e=t.toString(2).length;return Math.ceil(e/8)}function getMinHashLength(t){let e=getFieldBytesLength(t);return e+Math.ceil(e/2)}function mapHashToField(t,e,r=!1){let o=t.length,a=getFieldBytesLength(e),u=getMinHashLength(e);if(o<16||o<u||o>1024)throw Error(`expected ${u}-1024 bytes of input, got ${o}`);let c=r?(0,n.bytesToNumberBE)(t):(0,n.ty)(t),l=mod(c,e-s)+s;return r?(0,n.S5)(l,a):(0,n.tL)(l,a)}},57843:function(t,e,r){"use strict";r.d(e,{FF:function(){return validateObject},S5:function(){return numberToBytesLE},bytesToNumberBE:function(){return bytesToNumberBE},ci:function(){return bytesToHex},dQ:function(){return bitMask},eV:function(){return concatBytes},hexToBytes:function(){return hexToBytes},n$:function(){return createHmacDrbg},ql:function(){return ensureBytes},tL:function(){return numberToBytesBE},ty:function(){return bytesToNumberLE}}),BigInt(0);let n=BigInt(1),o=BigInt(2),u8a=t=>t instanceof Uint8Array,s=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function bytesToHex(t){if(!u8a(t))throw Error("Uint8Array expected");let e="";for(let r=0;r<t.length;r++)e+=s[t[r]];return e}function hexToNumber(t){if("string"!=typeof t)throw Error("hex string expected, got "+typeof t);return BigInt(""===t?"0":`0x${t}`)}function hexToBytes(t){if("string"!=typeof t)throw Error("hex string expected, got "+typeof t);let e=t.length;if(e%2)throw Error("padded hex string expected, got unpadded hex of length "+e);let r=new Uint8Array(e/2);for(let e=0;e<r.length;e++){let n=2*e,o=t.slice(n,n+2),s=Number.parseInt(o,16);if(Number.isNaN(s)||s<0)throw Error("Invalid byte sequence");r[e]=s}return r}function bytesToNumberBE(t){return hexToNumber(bytesToHex(t))}function bytesToNumberLE(t){if(!u8a(t))throw Error("Uint8Array expected");return hexToNumber(bytesToHex(Uint8Array.from(t).reverse()))}function numberToBytesBE(t,e){return hexToBytes(t.toString(16).padStart(2*e,"0"))}function numberToBytesLE(t,e){return numberToBytesBE(t,e).reverse()}function ensureBytes(t,e,r){let n;if("string"==typeof e)try{n=hexToBytes(e)}catch(r){throw Error(`${t} must be valid hex string, got "${e}". Cause: ${r}`)}else if(u8a(e))n=Uint8Array.from(e);else throw Error(`${t} must be hex string or Uint8Array`);let o=n.length;if("number"==typeof r&&o!==r)throw Error(`${t} expected ${r} bytes, got ${o}`);return n}function concatBytes(...t){let e=new Uint8Array(t.reduce((t,e)=>t+e.length,0)),r=0;return t.forEach(t=>{if(!u8a(t))throw Error("Uint8Array expected");e.set(t,r),r+=t.length}),e}let bitMask=t=>(o<<BigInt(t-1))-n,u8n=t=>new Uint8Array(t),u8fr=t=>Uint8Array.from(t);function createHmacDrbg(t,e,r){if("number"!=typeof t||t<2)throw Error("hashLen must be a number");if("number"!=typeof e||e<2)throw Error("qByteLen must be a number");if("function"!=typeof r)throw Error("hmacFn must be a function");let n=u8n(t),o=u8n(t),s=0,reset=()=>{n.fill(1),o.fill(0),s=0},h=(...t)=>r(o,n,...t),reseed=(t=u8n())=>{o=h(u8fr([0]),t),n=h(),0!==t.length&&(o=h(u8fr([1]),t),n=h())},gen=()=>{if(s++>=1e3)throw Error("drbg: tried 1000 values");let t=0,r=[];for(;t<e;){n=h();let e=n.slice();r.push(e),t+=n.length}return concatBytes(...r)};return(t,e)=>{let r;for(reset(),reseed(t);!(r=e(gen()));)reseed();return reset(),r}}let a={bigint:t=>"bigint"==typeof t,function:t=>"function"==typeof t,boolean:t=>"boolean"==typeof t,string:t=>"string"==typeof t,stringOrUint8Array:t=>"string"==typeof t||t instanceof Uint8Array,isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>"function"==typeof t&&Number.isSafeInteger(t.outputLen)};function validateObject(t,e,r={}){let checkField=(e,r,n)=>{let o=a[r];if("function"!=typeof o)throw Error(`Invalid validator "${r}", expected function`);let s=t[e];if((!n||void 0!==s)&&!o(s,t))throw Error(`Invalid param ${String(e)}=${s} (${typeof s}), expected ${r}`)};for(let[t,r]of Object.entries(e))checkField(t,r,!1);for(let[t,e]of Object.entries(r))checkField(t,e,!0);return t}},4107:function(t,e,r){"use strict";r.d(e,{UN:function(){return U}});var n=r(4727),o=r(10606),s=r(32305);let[a,u]=o.ZP.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b89
16f","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(t=>BigInt(t))),c=new Uint32Array(80),l=new Uint32Array(80);let SHA512=class SHA512 extends n.N{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:t,Al:e,Bh:r,Bl:n,Ch:o,Cl:s,Dh:a,Dl:u,Eh:c,El:l,Fh:f,Fl:d,Gh:p,Gl:y,Hh:g,Hl:m}=this;return[t,e,r,n,o,s,a,u,c,l,f,d,p,y,g,m]}set(t,e,r,n,o,s,a,u,c,l,f,d,p,y,g,m){this.Ah=0|t,this.Al=0|e,this.Bh=0|r,this.Bl=0|n,this.Ch=0|o,this.Cl=0|s,this.Dh=0|a,this.Dl=0|u,this.Eh=0|c,this.El=0|l,this.Fh=0|f,this.Fl=0|d,this.Gh=0|p,this.Gl=0|y,this.Hh=0|g,this.Hl=0|m}process(t,e){for(let r=0;r<16;r++,e+=4)c[r]=t.getUint32(e),l[r]=t.getUint32(e+=4);for(let t=16;t<80;t++){let e=0|c[t-15],r=0|l[t-15],n=o.ZP.rotrSH(e,r,1)^o.ZP.rotrSH(e,r,8)^o.ZP.shrSH(e,r,7),s=o.ZP.rotrSL(e,r,1)^o.ZP.rotrSL(e,r,8)^o.ZP.shrSL(e,r,7),a=0|c[t-2],u=0|l[t-2],f=o.ZP.rotrSH(a,u,19)^o.ZP.rotrBH(a,u,61)^o.ZP.shrSH(a,u,6),d=o.ZP.rotrSL(a,u,19)^o.ZP.rotrBL(a,u,61)^o.ZP.shrSL(a,u,6),p=o.ZP.add4L(s,d,l[t-7],l[t-16]),y=o.ZP.add4H(p,n,f,c[t-7],c[t-16]);c[t]=0|y,l[t]=0|p}let{Ah:r,Al:n,Bh:s,Bl:f,Ch:d,Cl:p,Dh:y,Dl:g,Eh:m,El:v,Fh:w,Fl:b,Gh:E,Gl:x,Hh:B,Hl:P}=this;for(let t=0;t<80;t++){let e=o.ZP.rotrSH(m,v,14)^o.ZP.rotrSH(m,v,18)^o.ZP.rotrBH(m,v,41),S=o.ZP.rotrSL(m,v,14)^o.ZP.rotrSL(m,v,18)^o.ZP.rotrBL(m,v,41),A=m&w^~m&E,O=v&b^~v&x,I=o.ZP.add5L(P,S,O,u[t],l[t]),_=o.ZP.add5H(I,B,e,A,a[t],c[t]),L=0|I,R=o.ZP.rotrSH(r,n,28)^o.ZP.rotrBH(r,n,34)^o.ZP.rotrBH(r,n,39),T=o.ZP.rotrSL(r,n,28)^o.ZP.rotrBL(r,n,34)^o.ZP.rotrBL(r,n,39),U=r&s^r&d^s&d,N=n&f^n&p^f&p;B=0|E,P=0|x,E=0|w,x=0|b,w=0|m,b=0|v,({h:m,l:v}=o.ZP.add(0|y,0|g,0|_,0|L)),y=0|d,g=0|p,d=0|s,p=0|f,s=0|r,f=0|n;let k=o.ZP.add3L(L,T,N);r=o.ZP.add3H(k,_,R,U),n=0|k}({h:r,l:n}=o.ZP.add(0|this.Ah,0|this.Al,0|r,0|n)),({h:s,l:f}=o.ZP.add(0|this.Bh,0|this.Bl,0|s,0|f)),({h:d,l:p}=o.ZP.add(0|this.Ch,0|this.Cl,0|d,0|p)),({h:y,l:g}=o.ZP.add(0|this.Dh,0|this.Dl,0|y,0|g)),({h:m,l:v}=o.ZP.add(0|this.Eh,0|this.El,0|m,0|v)),({h:w,l:b}=o.ZP.add(0|this.Fh,0|this.Fl,0|w,0|b)),({h:E,l:x}=o.ZP.add(0|this.Gh,0|this.Gl,0|E,0|x)),({h:B,l:P}=o.ZP.add(0|this.Hh,0|this.Hl,0|B,0|P)),this.set(r,n,s,f,d,p,y,g,m,v,w,b,E,x,B,P)}roundClean(){c.fill(0),l.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 f=(0,s.hE)(()=>new SHA512);var d=r(52948),p=r(57843),y=r(63606);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */let g=BigInt(0),m=BigInt(1),v=BigInt(2),w=BigInt(8),b={zip215:!0};function validateOpts(t){let e=(0,y.K)(t);return p.FF(t,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...e})}function twistedEdwards(t){let e=validateOpts(t),{Fp:r,n:n,prehash:o,hash:s,randomBytes:a,nByteLength:u,h:c}=e,l=v<<BigInt(8*u)-m,f=r.create,E=e.uvRatio||((t,e)=>{try{return{isValid:!0,value:r.sqrt(t*r.inv(e))}}catch(t){return{isValid:!1,value:g}}}),x=e.adjustScalarBytes||(t=>t),B=e.domain||((t,e,r)=>{if(e.length||r)throw Error("Contexts/pre-hash are not supported");return t}),inBig=t=>"bigint"==typeof t&&g<t,inRange=(t,e)=>inBig(t)&&inBig(e)&&t<e,in0MaskRange=t=>t===g||inRange(t,l);function assertInRange(t,e){if(inRange(t,e))return t;throw Error(`Expected valid scalar < ${e}, got ${typeof t} ${t}`)}function assertGE0(t){return t===g?t:assertInRange(t,n)}let P=new Map;function isPoint(t){if(!(t instanceof Point))throw Error("ExtendedPoint expected")}let Point=class Point{constructor(t,e,r,n){if(this.ex=t,this.ey=e,this.ez=r,this.et=n,!in0MaskRange(t))throw Error("x required");if(!in0MaskRange(e))throw Error("y required");if(!in0MaskRange(r))throw Error("z required");if(!in0MaskRange(n))throw Error("t required")}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(t){if(t instanceof Point)throw Error("extended point not allowed");let{x:e,y:r}=t||{};if(!in0MaskRange(e)||!in0MaskRange(r))throw Error("invalid affine point");return new Point(e,r,m,f(e*r))}static normalizeZ(t){let e=r.invertBatch(t.map(t=>t.ez));return t.map((t,r)=>t.toAffine(e[r])).map(Point.fromAffine)}_setWindowSize(t){this._WINDOW_SIZE=t,P.delete(this)}assertValidity(){let{a:t,d:r}=e;if(this.is0())throw Error("bad point: ZERO");let{ex:n,ey:o,ez:s,et:a}=this,u=f(n*n),c=f(o*o),l=f(s*s),d=f(l*l),p=f(u*t),y=f(l*f(p+c)),g=f(d+f(r*f(u*c)));if(y!==g)throw Error("bad point: equation left != right (1)");let m=f(n*o),v=f(s*a);if(m!==v)throw Error("bad point: equation left != right (2)")}equals(t){isPoint(t);let{ex:e,ey:r,ez:n}=this,{ex:o,ey:s,ez:a}=t,u=f(e*a),c=f(o*n),l=f(r*a),d=f(s*n);return u===c&&l===d}is0(){return this.equals(Point.ZERO)}negate(){return new Point(f(-this.ex),this.ey,this.ez,f(-this.et))}double(){let{a:t}=e,{ex:r,ey:n,ez:o}=this,s=f(r*r),a=f(n*n),u=f(v*f(o*o)),c=f(t*s),l=r+n,d=f(f(l*l)-s-a),p=c+a,y=p-u,g=c-a,m=f(d*y),w=f(p*g),b=f(d*g),E=f(y*p);return new Point(m,w,E,b)}add(t){isPoint(t);let{a:r,d:n}=e,{ex:o,ey:s,ez:a,et:u}=this,{ex:c,ey:l,ez:d,et:p}=t;if(r===BigInt(-1)){let t=f((s-o)*(l+c)),e=f((s+o)*(l-c)),r=f(e-t);if(r===g)return this.double();let n=f(a*v*p),y=f(u*v*d),m=y+n,w=e+t,b=y-n,E=f(m*r),x=f(w*b),B=f(m*b),P=f(r*w);return new Point(E,x,P,B)}let y=f(o*c),m=f(s*l),w=f(u*n*p),b=f(a*d),E=f((o+s)*(c+l)-y-m),x=b-w,B=b+w,P=f(m-r*y),S=f(E*x),A=f(B*P),O=f(E*P),I=f(x*B);return new Point(S,A,I,O)}subtract(t){return this.add(t.negate())}wNAF(t){return O.wNAFCached(this,P,t,Point.normalizeZ)}multiply(t){let{p:e,f:r}=this.wNAF(assertInRange(t,n));return Point.normalizeZ([e,r])[0]}multiplyUnsafe(t){let e=assertGE0(t);return e===g?A:this.equals(A)||e===m?this:this.equals(S)?this.wNAF(e).p:O.unsafeLadder(this,e)}isSmallOrder(){return this.multiplyUnsafe(c).is0()}isTorsionFree(){return O.unsafeLadder(this,n).is0()}toAffine(t){let{ex:e,ey:n,ez:o}=this,s=this.is0();null==t&&(t=s?w:r.inv(o));let a=f(e*t),u=f(n*t),c=f(o*t);if(s)return{x:g,y:m};
1if(c!==m)throw Error("invZ was invalid");return{x:a,y:u}}clearCofactor(){let{h:t}=e;return t===m?this:this.multiplyUnsafe(t)}static fromHex(t,n=!1){let{d:o,a:s}=e,a=r.BYTES;t=(0,p.ql)("pointHex",t,a);let u=t.slice(),c=t[a-1];u[a-1]=-129&c;let d=p.ty(u);d===g||(n?assertInRange(d,l):assertInRange(d,r.ORDER));let y=f(d*d),v=f(y-m),w=f(o*y-s),{isValid:b,value:x}=E(v,w);if(!b)throw Error("Point.fromHex: invalid y coordinate");let B=(x&m)===m,P=(128&c)!=0;if(!n&&x===g&&P)throw Error("Point.fromHex: x=0 and x_0=1");return P!==B&&(x=f(-x)),Point.fromAffine({x,y:d})}static fromPrivateKey(t){return getExtendedPublicKey(t).point}toRawBytes(){let{x:t,y:e}=this.toAffine(),n=p.S5(e,r.BYTES);return n[n.length-1]|=t&m?128:0,n}toHex(){return p.ci(this.toRawBytes())}};Point.BASE=new Point(e.Gx,e.Gy,m,f(e.Gx*e.Gy)),Point.ZERO=new Point(g,m,m,g);let{BASE:S,ZERO:A}=Point,O=(0,y.M)(Point,8*u);function modN_LE(t){var e;return e=p.ty(t),(0,d.wQ)(e,n)}function getExtendedPublicKey(t){t=(0,p.ql)("private key",t,u);let e=(0,p.ql)("hashed private key",s(t),2*u),r=x(e.slice(0,u)),n=e.slice(u,2*u),o=modN_LE(r),a=S.multiply(o),c=a.toRawBytes();return{head:r,prefix:n,scalar:o,point:a,pointBytes:c}}function getPublicKey(t){return getExtendedPublicKey(t).pointBytes}function hashDomainToScalar(t=new Uint8Array,...e){let r=p.eV(...e);return modN_LE(s(B(r,(0,p.ql)("context",t),!!o)))}function sign(t,e,s={}){var a;t=(0,p.ql)("message",t),o&&(t=o(t));let{prefix:c,scalar:l,pointBytes:f}=getExtendedPublicKey(e),y=hashDomainToScalar(s.context,c,t),g=S.multiply(y).toRawBytes(),m=hashDomainToScalar(s.context,g,f,t),v=(a=y+m*l,(0,d.wQ)(a,n));assertGE0(v);let w=p.eV(g,p.S5(v,r.BYTES));return(0,p.ql)("result",w,2*u)}function verify(t,e,n,s=b){let a,u,c;let{context:l,zip215:f}=s,d=r.BYTES;t=(0,p.ql)("signature",t,2*d),e=(0,p.ql)("message",e),o&&(e=o(e));let y=p.ty(t.slice(d,2*d));try{a=Point.fromHex(n,f),u=Point.fromHex(t.slice(0,d),f),c=S.multiplyUnsafe(y)}catch(t){return!1}if(!f&&a.isSmallOrder())return!1;let g=hashDomainToScalar(l,u.toRawBytes(),a.toRawBytes(),e),m=u.add(a.multiplyUnsafe(g));return m.subtract(c).clearCofactor().equals(Point.ZERO)}return S._setWindowSize(8),{CURVE:e,getPublicKey,sign,verify,ExtendedPoint:Point,utils:{getExtendedPublicKey,randomPrivateKey:()=>a(r.BYTES),precompute:(t=8,e=Point.BASE)=>(e._setWindowSize(t),e.multiply(BigInt(3)),e)}}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */let E=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),x=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752"),B=BigInt(0),P=BigInt(1),S=BigInt(2),A=BigInt(5),O=BigInt(10),I=BigInt(20),_=BigInt(40),L=BigInt(80);function ed25519_pow_2_252_3(t){let e=t*t%E,r=e*t%E,n=(0,d.oA)(r,S,E)*r%E,o=(0,d.oA)(n,P,E)*t%E,s=(0,d.oA)(o,A,E)*o%E,a=(0,d.oA)(s,O,E)*s%E,u=(0,d.oA)(a,I,E)*a%E,c=(0,d.oA)(u,_,E)*u%E,l=(0,d.oA)(c,L,E)*c%E,f=(0,d.oA)(l,L,E)*c%E,p=(0,d.oA)(f,O,E)*s%E,y=(0,d.oA)(p,S,E)*t%E;return{pow_p_5_8:y,b2:r}}function adjustScalarBytes(t){return t[0]&=248,t[31]&=127,t[31]|=64,t}function uvRatio(t,e){let r=(0,d.wQ)(e*e*e,E),n=(0,d.wQ)(r*r*e,E),o=ed25519_pow_2_252_3(t*n).pow_p_5_8,s=(0,d.wQ)(t*r*o,E),a=(0,d.wQ)(e*s*s,E),u=s,c=(0,d.wQ)(s*x,E),l=a===t,f=a===(0,d.wQ)(-t,E),p=a===(0,d.wQ)(-t*x,E);return l&&(s=u),(f||p)&&(s=c),(0,d.Tu)(s,E)&&(s=(0,d.wQ)(-s,E)),{isValid:l||f,value:s}}let R=(0,d.gN)(E,void 0,!0),T={a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:R,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:BigInt(8),Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:f,randomBytes:s.O6,adjustScalarBytes,uvRatio},U=twistedEdwards(T);({...T});let N=(R.ORDER+BigInt(3))/BigInt(8);function assertRstPoint(t){if(!(t instanceof RistPoint))throw Error("RistrettoPoint expected")}R.pow(S,N),R.sqrt(R.neg(R.ONE)),R.ORDER,BigInt(5),BigInt(8),BigInt(486662),(0,d.DV)(R,R.neg(BigInt(486664)));let k=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),j=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),C=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),M=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),invertSqrt=t=>uvRatio(P,t),F=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),bytes255ToNumberLE=t=>U.CURVE.Fp.create(bytesToNumberLE(t)&F);function calcElligatorRistrettoMap(t){let{d:e}=U.CURVE,r=U.CURVE.Fp.ORDER,n=U.CURVE.Fp.create,o=n(null*t*t),s=n((o+P)*C),a=BigInt(-1),u=n((a-e*o)*n(o+e)),{isValid:c,value:l}=uvRatio(s,u),f=n(l*t);isNegativeLE(f,r)||(f=n(-f)),c||(l=f),c||(a=o);let d=n(a*(o-P)*M-u),p=l*l,y=n((l+l)*u),g=n(d*k),m=n(P-p),v=n(P+p);return new U.ExtendedPoint(n(y*v),n(m*g),n(g*v),n(y*m))}let RistPoint=class RistPoint{constructor(t){this.ep=t}static fromAffine(t){return new RistPoint(U.ExtendedPoint.fromAffine(t))}static hashToCurve(t){t=ensureBytes("ristrettoHash",t,64);let e=bytes255ToNumberLE(t.slice(0,32)),r=calcElligatorRistrettoMap(e),n=bytes255ToNumberLE(t.slice(32,64)),o=calcElligatorRistrettoMap(n);return new RistPoint(r.add(o))}static fromHex(t){t=ensureBytes("ristrettoHex",t,32);let{a:e,d:r}=U.CURVE,n=U.CURVE.Fp.ORDER,o=U.CURVE.Fp.create,s="RistrettoPoint.fromHex: the hex is not val
1id encoding of RistrettoPoint",a=bytes255ToNumberLE(t);if(!equalBytes(numberToBytesLE(a,32),t)||isNegativeLE(a,n))throw Error(s);let u=o(a*a),c=o(P+e*u),l=o(P-e*u),f=o(c*c),d=o(l*l),p=o(e*r*f-d),{isValid:y,value:g}=invertSqrt(o(p*d)),m=o(g*l),v=o(g*m*p),w=o((a+a)*m);isNegativeLE(w,n)&&(w=o(-w));let b=o(c*v),E=o(w*b);if(!y||isNegativeLE(E,n)||b===B)throw Error(s);return new RistPoint(new U.ExtendedPoint(w,b,P,E))}toRawBytes(){let t,{ex:e,ey:r,ez:n,et:o}=this.ep,s=U.CURVE.Fp.ORDER,a=U.CURVE.Fp.create,u=a(a(n+r)*a(n-r)),c=a(e*r),l=a(c*c),{value:f}=invertSqrt(a(u*l)),d=a(f*u),p=a(f*c),y=a(d*p*o);if(isNegativeLE(o*y,s)){let n=a(null*r),o=a(null*e);e=n,r=o,t=a(d*j)}else t=p;isNegativeLE(e*y,s)&&(r=a(-r));let g=a((n-r)*t);return isNegativeLE(g,s)&&(g=a(-g)),numberToBytesLE(g,32)}toHex(){return bytesToHex(this.toRawBytes())}toString(){return this.toHex()}equals(t){assertRstPoint(t);let{ex:e,ey:r}=this.ep,{ex:n,ey:o}=t.ep,s=U.CURVE.Fp.create,a=s(e*o)===s(r*n),u=s(r*o)===s(e*n);return a||u}add(t){return assertRstPoint(t),new RistPoint(this.ep.add(t.ep))}subtract(t){return assertRstPoint(t),new RistPoint(this.ep.subtract(t.ep))}multiply(t){return new RistPoint(this.ep.multiply(t))}multiplyUnsafe(t){return new RistPoint(this.ep.multiplyUnsafe(t))}}},79604:function(t,e,r){"use strict";r.d(e,{kA:function(){return x}});var n=r(89802),o=r(52948),s=r(15493),a=r(32305);let HMAC=class HMAC extends a.kb{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,(0,s.vp)(t);let r=(0,a.O0)(e);if(this.iHash=t.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,o=new Uint8Array(n);o.set(r.length>n?t.create().update(r).digest():r);for(let t=0;t<o.length;t++)o[t]^=54;this.iHash.update(o),this.oHash=t.create();for(let t=0;t<o.length;t++)o[t]^=106;this.oHash.update(o),o.fill(0)}update(t){return(0,s.Gg)(this),this.iHash.update(t),this}digestInto(t){(0,s.Gg)(this),(0,s.aI)(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){let t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));let{oHash:e,iHash:r,finished:n,destroyed:o,blockLen:s,outputLen:a}=this;return t.finished=n,t.destroyed=o,t.blockLen=s,t.outputLen=a,t.oHash=e._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}};let hmac=(t,e,r)=>new HMAC(t,e).update(r).digest();hmac.create=(t,e)=>new HMAC(t,e);var u=r(57843),c=r(63606);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function validatePointOpts(t){let e=(0,c.K)(t);u.FF(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:r,Fp:n,a:o}=e;if(r){if(!n.eql(o,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({...e})}let{bytesToNumberBE:l,hexToBytes:f}=u,d={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(t){let{Err:e}=d;if(t.length<2||2!==t[0])throw new e("Invalid signature integer tag");let r=t[1],n=t.subarray(2,r+2);if(!r||n.length!==r)throw new e("Invalid signature integer: wrong length");if(128&n[0])throw new e("Invalid signature integer: negative");if(0===n[0]&&!(128&n[1]))throw new e("Invalid signature integer: unnecessary leading zero");return{d:l(n),l:t.subarray(r+2)}},toSig(t){let{Err:e}=d,r="string"==typeof t?f(t):t;if(!(r instanceof Uint8Array))throw Error("ui8a expected");let n=r.length;if(n<2||48!=r[0])throw new e("Invalid signature tag");if(r[1]!==n-2)throw new e("Invalid signature: incorrect length");let{d:o,l:s}=d._parseInt(r.subarray(2)),{d:a,l:u}=d._parseInt(s);if(u.length)throw new e("Invalid signature: left bytes after parsing");return{r:o,s:a}},hexFromSig(t){let slice=t=>8&Number.parseInt(t[0],16)?"00"+t:t,h=t=>{let e=t.toString(16);return 1&e.length?`0${e}`:e},e=slice(h(t.s)),r=slice(h(t.r)),n=e.length/2,o=r.length/2,s=h(n),a=h(o);return`30${h(o+n+4)}02${a}${r}02${s}${e}`}},p=BigInt(0),y=BigInt(1),g=(BigInt(2),BigInt(3));function weierstrassPoints(t){let e=validatePointOpts(t),{Fp:r}=e,n=e.toBytes||((t,e,n)=>{let o=e.toAffine();return u.eV(Uint8Array.from([4]),r.toBytes(o.x),r.toBytes(o.y))}),s=e.fromBytes||(t=>{let e=t.subarray(1),n=r.fromBytes(e.subarray(0,r.BYTES)),o=r.fromBytes(e.subarray(r.BYTES,2*r.BYTES));return{x:n,y:o}});function weierstrassEquation(t){let{a:n,b:o}=e,s=r.sqr(t),a=r.mul(s,t);return r.add(r.add(a,r.mul(t,n)),o)}if(!r.eql(r.sqr(e.Gy),weierstrassEquation(e.Gx)))throw Error("bad generator point: equation left != right");function isWithinCurveOrder(t){return"bigint"==typeof t&&p<t&&t<e.n}function assertGE(t){if(!isWithinCurveOrder(t))throw Error("Expected valid bigint: 0 < bigint < curve.n")}function normPrivateKeyToScalar(t){let r;let{allowedPrivateKeyLengths:n,nByteLength:s,wrapPrivateKey:a,n:c}=e;if(n&&"bigint"!=typeof t){if(t instanceof Uint8Array&&(t=u.ci(t)),"string"!=typeof t||!n.includes(t.length))throw Error("Invalid key");t=t.padStart(2*s,"0")}try{r="bigint"==typeof t?t:u.bytesToNumberBE((0,u.ql)("private key",t,s))}catch(e){throw Error(`private key must be ${s} bytes, hex or bigint, not ${typeof t}`)}return a&&(r=o.wQ(r,c)),assertGE(r),r}let a=new Map;function assertPrjPoint(t){if(!(t instanceof Point))throw Error("ProjectivePoint expected")}let Point=class Point{constructor(t,e,n){if(this.px=t,this.py=e,this.pz=n,null==t||!r.isValid(t))throw Error("x required");if(null==e||!r.isValid(e))throw Error("y required");if(null==n||!r.isValid(n))throw Error("z required")}static fromAffine(t){let{x:e,y:n}=t||{};if(!t||!r.isValid(e)||!r.isValid(n))throw Error("invalid affine point");if(t instanceof Point)throw Error("projective point not allowed");let is0=t=>r.eql(t,r.ZERO);return is0(e)&&is0(n)?Point.ZERO:new Point(e,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(t){let e=r.invertBatch(t.map(t=>t.pz));return t.map((t,r)=>t.toAffine(e[r])).map(Point.fromAffine)}static fromHex(t){let e=Point.fromAffine(s((0,u.ql)("pointHex",t)));return e.assertValidity(),e}static fromPrivateKey(t){return Point.BASE.multiply(normPrivateKeyToScalar(t))}_setWindowSize(t){this._WINDOW_SIZE=t,a.delete(this)}
1assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!r.is0(this.py))return;throw Error("bad point: ZERO")}let{x:t,y:n}=this.toAffine();if(!r.isValid(t)||!r.isValid(n))throw Error("bad point: x or y not FE");let o=r.sqr(n),s=weierstrassEquation(t);if(!r.eql(o,s))throw Error("bad point: equation left != right");if(!this.isTorsionFree())throw Error("bad point: not in prime-order subgroup")}hasEvenY(){let{y:t}=this.toAffine();if(r.isOdd)return!r.isOdd(t);throw Error("Field doesn't support isOdd")}equals(t){assertPrjPoint(t);let{px:e,py:n,pz:o}=this,{px:s,py:a,pz:u}=t,c=r.eql(r.mul(e,u),r.mul(s,o)),l=r.eql(r.mul(n,u),r.mul(a,o));return c&&l}negate(){return new Point(this.px,r.neg(this.py),this.pz)}double(){let{a:t,b:n}=e,o=r.mul(n,g),{px:s,py:a,pz:u}=this,c=r.ZERO,l=r.ZERO,f=r.ZERO,d=r.mul(s,s),p=r.mul(a,a),y=r.mul(u,u),m=r.mul(s,a);return m=r.add(m,m),f=r.mul(s,u),f=r.add(f,f),c=r.mul(t,f),l=r.mul(o,y),l=r.add(c,l),c=r.sub(p,l),l=r.add(p,l),l=r.mul(c,l),c=r.mul(m,c),f=r.mul(o,f),y=r.mul(t,y),m=r.sub(d,y),m=r.mul(t,m),m=r.add(m,f),f=r.add(d,d),d=r.add(f,d),d=r.add(d,y),d=r.mul(d,m),l=r.add(l,d),y=r.mul(a,u),y=r.add(y,y),d=r.mul(y,m),c=r.sub(c,d),f=r.mul(y,p),f=r.add(f,f),new Point(c,l,f=r.add(f,f))}add(t){assertPrjPoint(t);let{px:n,py:o,pz:s}=this,{px:a,py:u,pz:c}=t,l=r.ZERO,f=r.ZERO,d=r.ZERO,p=e.a,y=r.mul(e.b,g),m=r.mul(n,a),v=r.mul(o,u),w=r.mul(s,c),b=r.add(n,o),E=r.add(a,u);b=r.mul(b,E),E=r.add(m,v),b=r.sub(b,E),E=r.add(n,s);let x=r.add(a,c);return E=r.mul(E,x),x=r.add(m,w),E=r.sub(E,x),x=r.add(o,s),l=r.add(u,c),x=r.mul(x,l),l=r.add(v,w),x=r.sub(x,l),d=r.mul(p,E),l=r.mul(y,w),d=r.add(l,d),l=r.sub(v,d),d=r.add(v,d),f=r.mul(l,d),v=r.add(m,m),v=r.add(v,m),w=r.mul(p,w),E=r.mul(y,E),v=r.add(v,w),w=r.sub(m,w),w=r.mul(p,w),E=r.add(E,w),m=r.mul(v,E),f=r.add(f,m),m=r.mul(x,E),l=r.mul(b,l),l=r.sub(l,m),m=r.mul(b,v),d=r.mul(x,d),new Point(l,f,d=r.add(d,m))}subtract(t){return this.add(t.negate())}is0(){return this.equals(Point.ZERO)}wNAF(t){return f.wNAFCached(this,a,t,t=>{let e=r.invertBatch(t.map(t=>t.pz));return t.map((t,r)=>t.toAffine(e[r])).map(Point.fromAffine)})}multiplyUnsafe(t){let n=Point.ZERO;if(t===p)return n;if(assertGE(t),t===y)return this;let{endo:o}=e;if(!o)return f.unsafeLadder(this,t);let{k1neg:s,k1:a,k2neg:u,k2:c}=o.splitScalar(t),l=n,d=n,g=this;for(;a>p||c>p;)a&y&&(l=l.add(g)),c&y&&(d=d.add(g)),g=g.double(),a>>=y,c>>=y;return s&&(l=l.negate()),u&&(d=d.negate()),d=new Point(r.mul(d.px,o.beta),d.py,d.pz),l.add(d)}multiply(t){let n,o;assertGE(t);let{endo:s}=e;if(s){let{k1neg:e,k1:a,k2neg:u,k2:c}=s.splitScalar(t),{p:l,f:d}=this.wNAF(a),{p:p,f:y}=this.wNAF(c);l=f.constTimeNegate(e,l),p=f.constTimeNegate(u,p),p=new Point(r.mul(p.px,s.beta),p.py,p.pz),n=l.add(p),o=d.add(y)}else{let{p:e,f:r}=this.wNAF(t);n=e,o=r}return Point.normalizeZ([n,o])[0]}multiplyAndAddUnsafe(t,e,r){let n=Point.BASE,mul=(t,e)=>e!==p&&e!==y&&t.equals(n)?t.multiply(e):t.multiplyUnsafe(e),o=mul(this,e).add(mul(t,r));return o.is0()?void 0:o}toAffine(t){let{px:e,py:n,pz:o}=this,s=this.is0();null==t&&(t=s?r.ONE:r.inv(o));let a=r.mul(e,t),u=r.mul(n,t),c=r.mul(o,t);if(s)return{x:r.ZERO,y:r.ZERO};if(!r.eql(c,r.ONE))throw Error("invZ was invalid");return{x:a,y:u}}isTorsionFree(){let{h:t,isTorsionFree:r}=e;if(t===y)return!0;if(r)return r(Point,this);throw Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:t,clearCofactor:r}=e;return t===y?this:r?r(Point,this):this.multiplyUnsafe(e.h)}toRawBytes(t=!0){return this.assertValidity(),n(Point,this,t)}toHex(t=!0){return u.ci(this.toRawBytes(t))}};Point.BASE=new Point(e.Gx,e.Gy,r.ONE),Point.ZERO=new Point(r.ZERO,r.ONE,r.ZERO);let l=e.nBitLength,f=(0,c.M)(Point,e.endo?Math.ceil(l/2):l);return{CURVE:e,ProjectivePoint:Point,normPrivateKeyToScalar,weierstrassEquation,isWithinCurveOrder}}function validateOpts(t){let e=(0,c.K)(t);return u.FF(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function weierstrass(t){let e=validateOpts(t),{Fp:r,n:n}=e,s=r.BYTES+1,a=2*r.BYTES+1;function isValidFieldElement(t){return p<t&&t<r.ORDER}function modN(t){return o.wQ(t,n)}function invN(t){return o.U_(t,n)}let{ProjectivePoint:c,normPrivateKeyToScalar:l,weierstrassEquation:f,isWithinCurveOrder:g}=weierstrassPoints({...e,toBytes(t,e,n){let o=e.toAffine(),s=r.toBytes(o.x),a=u.eV;return n?a(Uint8Array.from([e.hasEvenY()?2:3]),s):a(Uint8Array.from([4]),s,r.toBytes(o.y))},fromBytes(t){let e=t.length,n=t[0],o=t.subarray(1);if(e===s&&(2===n||3===n)){let t=u.bytesToNumberBE(o);if(!isValidFieldElement(t))throw Error("Point is not on curve");let e=f(t),s=r.sqrt(e),a=(s&y)===y;return(1&n)==1!==a&&(s=r.neg(s)),{x:t,y:s}}if(e===a&&4===n){let t=r.fromBytes(o.subarray(0,r.BYTES)),e=r.fromBytes(o.subarray(r.BYTES,2*r.BYTES));return{x:t,y:e}}throw Error(`Point of length ${e}
1 was invalid. Expected ${s} compressed bytes or ${a} uncompressed bytes`)}}),numToNByteStr=t=>u.ci(u.tL(t,e.nByteLength));function isBiggerThanHalfOrder(t){let e=n>>y;return t>e}function normalizeS(t){return isBiggerThanHalfOrder(t)?modN(-t):t}let slcNum=(t,e,r)=>u.bytesToNumberBE(t.slice(e,r));let Signature=class Signature{constructor(t,e,r){this.r=t,this.s=e,this.recovery=r,this.assertValidity()}static fromCompact(t){let r=e.nByteLength;return new Signature(slcNum(t=(0,u.ql)("compactSignature",t,2*r),0,r),slcNum(t,r,2*r))}static fromDER(t){let{r:e,s:r}=d.toSig((0,u.ql)("DER",t));return new Signature(e,r)}assertValidity(){if(!g(this.r))throw Error("r must be 0 < r < CURVE.n");if(!g(this.s))throw Error("s must be 0 < s < CURVE.n")}addRecoveryBit(t){return new Signature(this.r,this.s,t)}recoverPublicKey(t){let{r:n,s:o,recovery:s}=this,a=v((0,u.ql)("msgHash",t));if(null==s||![0,1,2,3].includes(s))throw Error("recovery id invalid");let l=2===s||3===s?n+e.n:n;if(l>=r.ORDER)throw Error("recovery id 2 or 3 invalid");let f=(1&s)==0?"02":"03",d=c.fromHex(f+numToNByteStr(l)),p=invN(l),y=modN(-a*p),g=modN(o*p),m=c.BASE.multiplyAndAddUnsafe(d,y,g);if(!m)throw Error("point at infinify");return m.assertValidity(),m}hasHighS(){return isBiggerThanHalfOrder(this.s)}normalizeS(){return this.hasHighS()?new Signature(this.r,modN(-this.s),this.recovery):this}toDERRawBytes(){return u.hexToBytes(this.toDERHex())}toDERHex(){return d.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return u.hexToBytes(this.toCompactHex())}toCompactHex(){return numToNByteStr(this.r)+numToNByteStr(this.s)}};function getPublicKey(t,e=!0){return c.fromPrivateKey(t).toRawBytes(e)}function isProbPub(t){let e=t instanceof Uint8Array,r="string"==typeof t,n=(e||r)&&t.length;return e?n===s||n===a:r?n===2*s||n===2*a:t instanceof c}function getSharedSecret(t,e,r=!0){if(isProbPub(t))throw Error("first arg must be private key");if(!isProbPub(e))throw Error("second arg must be public key");let n=c.fromHex(e);return n.multiply(l(t)).toRawBytes(r)}let m=e.bits2int||function(t){let r=u.bytesToNumberBE(t),n=8*t.length-e.nBitLength;return n>0?r>>BigInt(n):r},v=e.bits2int_modN||function(t){return modN(m(t))},w=u.dQ(e.nBitLength);function int2octets(t){if("bigint"!=typeof t)throw Error("bigint expected");if(!(p<=t&&t<w))throw Error(`bigint expected < 2^${e.nBitLength}`);return u.tL(t,e.nByteLength)}function prepSig(t,n,o=b){if(["recovered","canonical"].some(t=>t in o))throw Error("sign() legacy options not supported");let{hash:s,randomBytes:a}=e,{lowS:f,prehash:d,extraEntropy:w}=o;null==f&&(f=!0),t=(0,u.ql)("msgHash",t),d&&(t=(0,u.ql)("prehashed msgHash",s(t)));let E=v(t),x=l(n),B=[int2octets(x),int2octets(E)];if(null!=w){let t=!0===w?a(r.BYTES):w;B.push((0,u.ql)("extraEntropy",t))}let P=u.eV(...B);return{seed:P,k2sig:function(t){let e=m(t);if(!g(e))return;let r=invN(e),n=c.BASE.multiply(e).toAffine(),o=modN(n.x);if(o===p)return;let s=modN(r*modN(E+o*x));if(s===p)return;let a=(n.x===o?0:2)|Number(n.y&y),u=s;return f&&isBiggerThanHalfOrder(s)&&(u=normalizeS(s),a^=1),new Signature(o,u,a)}}}let b={lowS:e.lowS,prehash:!1},E={lowS:e.lowS,prehash:!1};function sign(t,r,n=b){let{seed:o,k2sig:s}=prepSig(t,r,n),a=u.n$(e.hash.outputLen,e.nByteLength,e.hmac);return a(o,s)}function verify(t,r,n,o=E){let s,a;if(r=(0,u.ql)("msgHash",r),n=(0,u.ql)("publicKey",n),"strict"in o)throw Error("options.strict was renamed to lowS");let{lowS:l,prehash:f}=o;try{if("string"==typeof t||t instanceof Uint8Array)try{a=Signature.fromDER(t)}catch(e){if(!(e instanceof d.Err))throw e;a=Signature.fromCompact(t)}else if("object"==typeof t&&"bigint"==typeof t.r&&"bigint"==typeof t.s){let{r:e,s:r}=t;a=new Signature(e,r)}else throw Error("PARSE");s=c.fromHex(n)}catch(t){if("PARSE"===t.message)throw Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(l&&a.hasHighS())return!1;f&&(r=e.hash(r));let{r:p,s:y}=a,g=v(r),m=invN(y),w=modN(g*m),b=modN(p*m),x=c.BASE.multiplyAndAddUnsafe(s,w,b)?.toAffine();if(!x)return!1;let B=modN(x.x);return B===p}return c.BASE._setWindowSize(8),{CURVE:e,getPublicKey,getSharedSecret,sign,verify,ProjectivePoint:c,Signature,utils:{isValidPrivateKey(t){try{return l(t),!0}catch(t){return!1}},normPrivateKeyToScalar:l,randomPrivateKey:()=>
1{let t=o.PS(e.n);return o.Us(e.randomBytes(t),e.n)},precompute:(t=8,e=c.BASE)=>(e._setWindowSize(t),e.multiply(BigInt(3)),e)}}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function getHash(t){return{hash:t,hmac:(e,...r)=>hmac(t,e,(0,a.eV)(...r)),randomBytes:a.O6}}function createCurve(t,e){let create=e=>weierstrass({...t,...getHash(e)});return Object.freeze({...create(e),create})}BigInt(4);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */let m=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),v=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),w=BigInt(1),b=BigInt(2),divNearest=(t,e)=>(t+e/b)/e;function sqrtMod(t){let e=BigInt(3),r=BigInt(6),n=BigInt(11),s=BigInt(22),a=BigInt(23),u=BigInt(44),c=BigInt(88),l=t*t*t%m,f=l*l*t%m,d=(0,o.oA)(f,e,m)*f%m,p=(0,o.oA)(d,e,m)*f%m,y=(0,o.oA)(p,b,m)*l%m,g=(0,o.oA)(y,n,m)*y%m,v=(0,o.oA)(g,s,m)*g%m,w=(0,o.oA)(v,u,m)*v%m,x=(0,o.oA)(w,c,m)*w%m,B=(0,o.oA)(x,u,m)*v%m,P=(0,o.oA)(B,e,m)*f%m,S=(0,o.oA)(P,a,m)*g%m,A=(0,o.oA)(S,r,m)*l%m,O=(0,o.oA)(A,b,m);if(!E.eql(E.sqr(O),t))throw Error("Cannot find square root");return O}let E=(0,o.gN)(m,void 0,void 0,{sqrt:sqrtMod}),x=createCurve({a:BigInt(0),b:BigInt(7),Fp:E,n:v,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{let e=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-w*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),n=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=BigInt("0x100000000000000000000000000000000"),a=divNearest(e*t,v),u=divNearest(-r*t,v),c=(0,o.wQ)(t-a*e-u*n,v),l=(0,o.wQ)(-a*r-u*e,v),f=c>s,d=l>s;if(f&&(c=v-c),d&&(l=v-l),c>s||l>s)throw Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:f,k1:c,k2neg:d,k2:l}}}},n.J),B=BigInt(0),fe=t=>"bigint"==typeof t&&B<t&&t<m,P={};function taggedHash(t,...e){let r=P[t];if(void 0===r){let e=sha256(Uint8Array.from(t,t=>t.charCodeAt(0)));r=concatBytes(e,e),P[t]=r}return sha256(concatBytes(r,...e))}let modP=t=>mod(t,m),modN=t=>mod(t,v),S=x.ProjectivePoint},15493:function(t,e,r){"use strict";function number(t){if(!Number.isSafeInteger(t)||t<0)throw Error(`Wrong positive integer: ${t}`)}function bytes(t,...e){if(!(t instanceof Uint8Array))throw Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function hash(t){if("function"!=typeof t||"function"!=typeof t.create)throw Error("Hash should be wrapped by utils.wrapConstructor");number(t.outputLen),number(t.blockLen)}function exists(t,e=!0){if(t.destroyed)throw Error("Hash instance has been destroyed");if(e&&t.finished)throw Error("Hash#digest() has already been called")}function output(t,e){bytes(t);let r=e.outputLen;if(t.length<r)throw Error(`digestInto() expects output buffer of length at least ${r}`)}r.d(e,{Gg:function(){return exists},J8:function(){return output},Rx:function(){return number},aI:function(){return bytes},vp:function(){return hash}})},4727:function(t,e,r){"use strict";r.d(e,{N:function(){return SHA2}});var n=r(15493),o=r(32305);function setBigUint64(t,e,r,n){if("function"==typeof t.setBigUint64)return t.setBigUint64(e,r,n);let o=BigInt(32),s=BigInt(4294967295),a=Number(r>>o&s),u=Number(r&s),c=n?4:0,l=n?0:4;t.setUint32(e+c,a,n),t.setUint32(e+l,u,n)}let SHA2=class SHA2 extends o.kb{constructor(t,e,r,n){super(),this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=(0,o.GL)(this.buffer)}update(t){(0,n.Gg)(this);let{view:e,buffer:r,blockLen:s}=this;t=(0,o.O0)(t);let a=t.length;for(let n=0;n<a;){let u=Math.min(s-this.pos,a-n);if(u===s){let e=(0,o.GL)(t);for(;s<=a-n;n+=s)this.process(e,n);continue}r.set(t.subarray(n,n+u),this.pos),this.pos+=u,n+=u,this.pos===s&&(this.process(e,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){(0,n.Gg)(this),(0,n.J8)(t,this),this.finished=!0;let{buffer:e,view:r,blockLen:s,isLE:a}=this,{pos:u}=this;e[u++]=128,this.buffer.subarray(u).fill(0),this.padOffset>s-u&&(this.process(r,0),u=0);for(let t=u;t<s;t++)e[t]=0;setBigUint64(r,s-8,BigInt(8*this.length),a),this.process(r,0);let c=(0,o.GL)(t),l=this.outputLen;if(l%4)throw Error("_sha2: outputLen should be aligned to 32bit");let f=l/4,d=this.get();if(f>d.length)throw Error("_sha2: outputLen bigger than state");for(let t=0;t<f;t++)c.setUint32(4*t,d[t],a)}digest(){let{buffer:t,outputLen:e}=this;this.digestInto(t);let r=t.slice(0,e);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());let{blockLen:e,buffer:r,length:n,finished:o,destroyed:s,pos:a}=this;return t.length=n,t.pos=a,t.finished=o,t.destroyed=s,n%e&&t.buffer.set(r),t}}},10606:function(t,e,r){"use strict";r.d(e,{EP:function(){return rotlSH},SD:function(){return rotlBH},Vl:function(){return split},gm:function(){return rotlSL},mk:function(){return rotlBL}});let n=BigInt(4294967296-1),o=BigInt(32);function fromBig(t,e=!1){return e?{h:Number(t&n),l:Number(t>>o&n)}:{h:0|Number(t>>o&n),l:0|Number(t&n)}}function split(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let o=0;o<t.length;o++){let{h:s,l:a}=fromBig(t[o],e);[r[o],n[o]]=[s,a]}return[r,n]}let rotlSH=(t,e,r)=>t<<r|e>>>32-r,rotlSL=(t,e,r)=>e<<r|t>>>32-r,rotlBH=(t,e,r)=>e<<r-32|t>>>64-r,rotlBL=(t,e,r)=>t<<r-32|e>>>64-r;function add(t,e,r,n){let o=(e>>>0)+(n>>>0);return{h:t+r+(o/4294967296|0)|0,l:0|o}}e.ZP={fromBig,split,toBig:(t,e)=>BigInt(t>>>0)<<o|BigInt(e>>>0),shrSH:(t,e,r)=>t>>>r,shrSL:(t,e,r)=>t<<32-r|e>>
1>r,rotrSH:(t,e,r)=>t>>>r|e<<32-r,rotrSL:(t,e,r)=>t<<32-r|e>>>r,rotrBH:(t,e,r)=>t<<64-r|e>>>r-32,rotrBL:(t,e,r)=>t>>>r-32|e<<64-r,rotr32H:(t,e)=>e,rotr32L:(t,e)=>t,rotlSH,rotlSL,rotlBH,rotlBL,add,add3L:(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),add3H:(t,e,r,n)=>e+r+n+(t/4294967296|0)|0,add4L:(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),add4H:(t,e,r,n,o)=>e+r+n+o+(t/4294967296|0)|0,add5H:(t,e,r,n,o,s)=>e+r+n+o+s+(t/4294967296|0)|0,add5L:(t,e,r,n,o)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(o>>>0)}},89802:function(t,e,r){"use strict";r.d(e,{J:function(){return c}});var n=r(4727),o=r(32305);let Chi=(t,e,r)=>t&e^~t&r,Maj=(t,e,r)=>t&e^t&r^e&r,s=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]),a=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=new Uint32Array(64);let SHA256=class SHA256 extends n.N{constructor(){super(64,32,8,!1),this.A=0|a[0],this.B=0|a[1],this.C=0|a[2],this.D=0|a[3],this.E=0|a[4],this.F=0|a[5],this.G=0|a[6],this.H=0|a[7]}get(){let{A:t,B:e,C:r,D:n,E:o,F:s,G:a,H:u}=this;return[t,e,r,n,o,s,a,u]}set(t,e,r,n,o,s,a,u){this.A=0|t,this.B=0|e,this.C=0|r,this.D=0|n,this.E=0|o,this.F=0|s,this.G=0|a,this.H=0|u}process(t,e){for(let r=0;r<16;r++,e+=4)u[r]=t.getUint32(e,!1);for(let t=16;t<64;t++){let e=u[t-15],r=u[t-2],n=(0,o.np)(e,7)^(0,o.np)(e,18)^e>>>3,s=(0,o.np)(r,17)^(0,o.np)(r,19)^r>>>10;u[t]=s+u[t-7]+n+u[t-16]|0}let{A:r,B:n,C:a,D:c,E:l,F:f,G:d,H:p}=this;for(let t=0;t<64;t++){let e=(0,o.np)(l,6)^(0,o.np)(l,11)^(0,o.np)(l,25),y=p+e+Chi(l,f,d)+s[t]+u[t]|0,g=(0,o.np)(r,2)^(0,o.np)(r,13)^(0,o.np)(r,22),m=g+Maj(r,n,a)|0;p=d,d=f,f=l,l=c+y|0,c=a,a=n,n=r,r=y+m|0}r=r+this.A|0,n=n+this.B|0,a=a+this.C|0,c=c+this.D|0,l=l+this.E|0,f=f+this.F|0,d=d+this.G|0,p=p+this.H|0,this.set(r,n,a,c,l,f,d,p)}roundClean(){u.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};let c=(0,o.hE)(()=>new SHA256)},49658:function(t,e,r){"use strict";r.d(e,{fr:function(){return w}});var n=r(15493),o=r(10606),s=r(32305);let[a,u,c]=[[],[],[]],l=BigInt(0),f=BigInt(1),d=BigInt(2),p=BigInt(7),y=BigInt(256),g=BigInt(113);for(let t=0,e=f,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],a.push(2*(5*n+r)),u.push((t+1)*(t+2)/2%64);let o=l;for(let t=0;t<7;t++)(e=(e<<f^(e>>p)*g)%y)&d&&(o^=f<<(f<<BigInt(t))-f);c.push(o)}let[m,v]=(0,o.Vl)(c,!0),rotlH=(t,e,r)=>r>32?(0,o.SD)(t,e,r):(0,o.EP)(t,e,r),rotlL=(t,e,r)=>r>32?(0,o.mk)(t,e,r):(0,o.gm)(t,e,r);function keccakP(t,e=24){let r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let e=0;e<10;e++)r[e]=t[e]^t[e+10]^t[e+20]^t[e+30]^t[e+40];for(let e=0;e<10;e+=2){let n=(e+8)%10,o=(e+2)%10,s=r[o],a=r[o+1],u=rotlH(s,a,1)^r[n],c=rotlL(s,a,1)^r[n+1];for(let r=0;r<50;r+=10)t[e+r]^=u,t[e+r+1]^=c}let e=t[2],o=t[3];for(let r=0;r<24;r++){let n=u[r],s=rotlH(e,o,n),c=rotlL(e,o,n),l=a[r];e=t[l],o=t[l+1],t[l]=s,t[l+1]=c}for(let e=0;e<50;e+=10){for(let n=0;n<10;n++)r[n]=t[e+n];for(let n=0;n<10;n++)t[e+n]^=~r[(n+2)%10]&r[(n+4)%10]}t[0]^=m[n],t[1]^=v[n]}r.fill(0)}let Keccak=class Keccak extends s.kb{constructor(t,e,r,o=!1,a=24){if(super(),this.blockLen=t,this.suffix=e,this.outputLen=r,this.enableXOF=o,this.rounds=a,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.Rx)(r),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,s.Jq)(this.state)}keccak(){keccakP(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){(0,n.Gg)(this);let{blockLen:e,state:r}=this;t=(0,s.O0)(t);let o=t.length;for(let n=0;n<o;){let s=Math.min(e-this.pos,o-n);for(let e=0;e<s;e++)r[this.pos++]^=t[n++];this.pos===e&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:t,suffix:e,pos:r,blockLen:n}=this;t[r]^=e,(128&e)!=0&&r===n-1&&this.keccak(),t[n-1]^=128,this.keccak()}writeInto(t){(0,n.Gg)(this,!1),(0,n.aI)(t),this.finish();let e=this.state,{blockLen:r}=this;for(let n=0,o=t.length;n<o;){this.posOut>=r&&this.keccak();let s=Math.min(r-this.posOut,o-n);t.set(e.subarray(this.posOut,this.posOut+s),n),this.posOut+=s,n+=s}return t}xofInto(t){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return(0,n.Rx)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,n.J8)(t,this),this.finished)throw Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:e,suffix:r,outputLen:n,rounds:o,enableXOF:s}=this;return t||(t=new Keccak(e,r,n,s,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=r,t.outputLen=n,t.enableXOF=s,t.destroyed=this.destroyed,t}};let w=(0,s.hE)(()=>new Keccak(136,1,32))},32305:function(t,e,r){"use strict";r.d(e,{kb:function(){return Hash},eV:function(){return concatBytes},GL:function(){return createView},O6:function(){return randomBytes},np:function(){return rotr},O0:function(){return toBytes},Jq:function(){return u32},iY:function(){return utf8ToBytes},hE:function(){return wrapConstructor}});let n="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,u8a=t=>t instanceof Uint8Array,u32=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),createView=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),rotr=(t,e)=>t<<32-e|t>>>e,o=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0];if(!o)throw Error("Non little-endian hardware is not supported");function utf8ToBytes(t){if("string"!=typeof t)throw Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function toBytes(t){if("string"==typeof t&&(t=utf8ToBytes(t)),!u8a(t))throw Error(`expected Uint8Array, got ${typeof t}`);return t}function concatBytes(...t){let e=new Uint8Array(t.reduce((t,e)=>t+e.length,0)),r=0;return t.forEach(t=>{if(!u8a(t))throw Error("Uint8Array expected");
1e.set(t,r),r+=t.length}),e}let Hash=class Hash{clone(){return this._cloneInto()}};function wrapConstructor(t){let hashC=e=>t().update(toBytes(e)).digest(),e=t();return hashC.outputLen=e.outputLen,hashC.blockLen=e.blockLen,hashC.create=()=>t(),hashC}function randomBytes(t=32){if(n&&"function"==typeof n.getRandomValues)return n.getRandomValues(new Uint8Array(t));throw Error("crypto.getRandomValues must be defined")}},88111:function(t,e,r){"use strict";r.d(e,{AG:function(){return nullable},G0:function(){return union},IM:function(){return record},IX:function(){return array},O7:function(){return boolean},Rx:function(){return number},Ue:function(){return create},Yj:function(){return any},Z_:function(){return string},_4:function(){return unknown},bc:function(){return tuple},dt:function(){return type},eE:function(){return instance},i0:function(){return literal},jt:function(){return optional},oQ:function(){return coerce}});let StructError=class StructError extends TypeError{constructor(t,e){let r;let{message:n,...o}=t,{path:s}=t,a=0===s.length?n:"At path: "+s.join(".")+" -- "+n;super(a),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>{var n;return null!=(n=r)?n:r=[t,...e()]}}};function isIterable(t){return isObject(t)&&"function"==typeof t[Symbol.iterator]}function isObject(t){return"object"==typeof t&&null!=t}function print(t){return"string"==typeof t?JSON.stringify(t):""+t}function shiftIterator(t){let{done:e,value:r}=t.next();return e?void 0:r}function toFailure(t,e,r,n){if(!0===t)return;!1===t?t={}:"string"==typeof t&&(t={message:t});let{path:o,branch:s}=e,{type:a}=r,{refinement:u,message:c="Expected a value of type `"+a+"`"+(u?" with refinement `"+u+"`":"")+", but received: `"+print(n)+"`"}=t;return{value:n,type:a,refinement:u,key:o[o.length-1],path:o,branch:s,...t,message:c}}function*toFailures(t,e,r,n){for(let o of(isIterable(t)||(t=[t]),t)){let t=toFailure(o,e,r,n);t&&(yield t)}}function*run(t,e,r={}){let{path:n=[],branch:o=[t],coerce:s=!1,mask:a=!1}=r,u={path:n,branch:o};if(s&&(t=e.coercer(t,u),a&&"type"!==e.type&&isObject(e.schema)&&isObject(t)&&!Array.isArray(t)))for(let r in t)void 0===e.schema[r]&&delete t[r];let c=!0;for(let r of e.validator(t,u))c=!1,yield[r,void 0];for(let[r,l,f]of e.entries(t,u)){let e=run(l,f,{path:void 0===r?n:[...n,r],branch:void 0===r?o:[...o,l],coerce:s,mask:a});for(let n of e)n[0]?(c=!1,yield[n[0],void 0]):s&&(l=n[1],void 0===r?t=l:t instanceof Map?t.set(r,l):t instanceof Set?t.add(l):isObject(t)&&(t[r]=l))}if(c)for(let r of e.refiner(t,u))c=!1,yield[r,void 0];c&&(yield[void 0,t])}let Struct=class Struct{constructor(t){let{type:e,schema:r,validator:n,refiner:o,coercer:s=t=>t,entries:a=function*(){}}=t;this.type=e,this.schema=r,this.entries=a,this.coercer=s,n?this.validator=(t,e)=>{let r=n(t,e);return toFailures(r,e,this,t)}:this.validator=()=>[],o?this.refiner=(t,e)=>{let r=o(t,e);return toFailures(r,e,this,t)}:this.refiner=()=>[]}assert(t){return assert(t,this)}create(t){return create(t,this)}is(t){return is(t,this)}mask(t){return mask(t,this)}validate(t,e={}){return validate(t,this,e)}};function assert(t,e){let r=validate(t,e);if(r[0])throw r[0]}function create(t,e){let r=validate(t,e,{coerce:!0});if(!r[0])return r[1];throw r[0]}function mask(t,e){let r=validate(t,e,{coerce:!0,mask:!0});if(!r[0])return r[1];throw r[0]}function is(t,e){let r=validate(t,e);return!r[0]}function validate(t,e,r={}){let n=run(t,e,r),o=shiftIterator(n);if(o[0]){let t=new StructError(o[0],function*(){for(let t of n)t[0]&&(yield t[0])});return[t,void 0]}{let t=o[1];return[void 0,t]}}function define(t,e){return new Struct({type:t,schema:null,validator:e})}function any(){return define("any",()=>!0)}function array(t){return new Struct({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(let[r,n]of e.entries())yield[r,n,t]},coercer:t=>Array.isArray(t)?t.slice():t,validator:t=>Array.isArray(t)||"Expected an array value, but received: "+print(t)})}function boolean(){return define("boolean",t=>"boolean"==typeof t)}function instance(t){return define("instance",e=>
1e instanceof t||"Expected a `"+t.name+"` instance, but received: "+print(e))}function literal(t){let e=print(t),r=typeof t;return new Struct({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?t:null,validator:r=>r===t||"Expected the literal `"+e+"`, but received: "+print(r)})}function never(){return define("never",()=>!1)}function nullable(t){return new Struct({...t,validator:(e,r)=>null===e||t.validator(e,r),refiner:(e,r)=>null===e||t.refiner(e,r)})}function number(){return define("number",t=>"number"==typeof t&&!isNaN(t)||"Expected a number, but received: "+print(t))}function optional(t){return new Struct({...t,validator:(e,r)=>void 0===e||t.validator(e,r),refiner:(e,r)=>void 0===e||t.refiner(e,r)})}function record(t,e){return new Struct({type:"record",schema:null,*entries(r){if(isObject(r))for(let n in r){let o=r[n];yield[n,n,t],yield[n,o,e]}},validator:t=>isObject(t)||"Expected an object, but received: "+print(t)})}function string(){return define("string",t=>"string"==typeof t||"Expected a string, but received: "+print(t))}function tuple(t){let e=never();return new Struct({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){let n=Math.max(t.length,r.length);for(let o=0;o<n;o++)yield[o,r[o],t[o]||e]}},validator:t=>Array.isArray(t)||"Expected an array, but received: "+print(t)})}function type(t){let e=Object.keys(t);return new Struct({type:"type",schema:t,*entries(r){if(isObject(r))for(let n of e)yield[n,r[n],t[n]]},validator:t=>isObject(t)||"Expected an object, but received: "+print(t)})}function union(t){let e=t.map(t=>t.type).join(" | ");return new Struct({type:"union",schema:null,validator(r,n){let o=[];for(let e of t){let[...t]=run(r,e,n),[s]=t;if(!s[0])return[];for(let[e]of t)e&&o.push(e)}return["Expected the value to satisfy a union of `"+e+"`, but received: "+print(r),...o]}})}function unknown(){return define("unknown",()=>!0)}function coerce(t,e,r){return new Struct({...t,coercer:(n,o)=>is(n,e)?t.coercer(r(n,o),o):t.coercer(n,o)})}},71332:function(t,e,r){"use strict";function inRange(t,e,r){return e<=t&&t<=r}function ToDictionary(t){if(void 0===t)return{};if(t===Object(t))return t;throw TypeError("Could not convert argument to dictionary")}function stringToCodePoints(t){for(var e=String(t),r=e.length,n=0,o=[];n<r;){var s=e.charCodeAt(n);if(s<55296||s>57343)o.push(s);else if(56320<=s&&s<=57343)o.push(65533);else if(55296<=s&&s<=56319){if(n===r-1)o.push(65533);else{var a=t.charCodeAt(n+1);if(56320<=a&&a<=57343){var u=1023&s,c=1023&a;o.push(65536+(u<<10)+c),n+=1}else o.push(65533)}}n+=1}return o}function codePointsToString(t){for(var e="",r=0;r<t.length;++r){var n=t[r];n<=65535?e+=String.fromCharCode(n):(n-=65536,e+=String.fromCharCode((n>>10)+55296,(1023&n)+56320))}return e}function Stream(t){this.tokens=[].slice.call(t)}function decoderError(t,e){if(t)throw TypeError("Decoder error");return e||65533}r.r(e),r.d(e,{TextDecoder:function(){return TextDecoder},TextEncoder:function(){return TextEncoder}}),Stream.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():-1},prepend:function(t){if(Array.isArray(t))for(;t.length;)this.tokens.unshift(t.pop());else this.tokens.unshift(t)},push:function(t){if(Array.isArray(t))for(;t.length;)this.tokens.push(t.shift());else this.tokens.push(t)}};var n="utf-8";function TextDecoder(t,e){if(!(this instanceof TextDecoder))return new TextDecoder(t,e);if((t=void 0!==t?String(t).toLowerCase():n)!==n)throw Error("Encoding not supported. Only utf-8 is supported");e=ToDictionary(e),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=!!e.fatal,this._ignoreBOM=!!e.ignoreBOM,Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}function TextEncoder(t,e){if(!(this instanceof TextEncoder))return new TextEncoder(t,e);if((t=void 0!==t?String(t).toLowerCase():n)!==n)throw Error("Encoding not supported. Only utf-8 is supported");e=ToDictionary(e),this._streaming=!1,this._encoder=null,this._options={fatal:!!e.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"})}function UTF8Decoder(t){var e=t.fatal,r=0,n=0,o=0,s=128,a=191;this.handler=function(t,u){if(-1===u&&0!==o)return o=0,decoderError(e);
vendor: 2,113 bytes, line 1
1if(-1===u)return -1;if(0===o){if(inRange(u,0,127))return u;if(inRange(u,194,223))o=1,r=u-192;else if(inRange(u,224,239))224===u&&(s=160),237===u&&(a=159),o=2,r=u-224;else{if(!inRange(u,240,244))return decoderError(e);240===u&&(s=144),244===u&&(a=143),o=3,r=u-240}return r<<=6*o,null}if(!inRange(u,s,a))return r=o=n=0,s=128,a=191,t.prepend(u),decoderError(e);if(s=128,a=191,n+=1,r+=u-128<<6*(o-n),n!==o)return null;var c=r;return r=o=n=0,c}}function UTF8Encoder(t){t.fatal,this.handler=function(t,e){if(-1===e)return -1;if(inRange(e,0,127))return e;inRange(e,128,2047)?(r=1,n=192):inRange(e,2048,65535)?(r=2,n=224):inRange(e,65536,1114111)&&(r=3,n=240);for(var r,n,o=[(e>>6*r)+n];r>0;){var s=e>>6*(r-1);o.push(128|63&s),r-=1}return o}}TextDecoder.prototype={decode:function(t,e){r="object"==typeof t&&t instanceof ArrayBuffer?new Uint8Array(t):"object"==typeof t&&"buffer"in t&&t.buffer instanceof ArrayBuffer?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(0),e=ToDictionary(e),this._streaming||(this._decoder=new UTF8Decoder({fatal:this._fatal}),this._BOMseen=!1),this._streaming=!!e.stream;for(var r,n,o=new Stream(r),s=[];!o.endOfStream()&&-1!==(n=this._decoder.handler(o,o.read()));)null!==n&&(Array.isArray(n)?s.push.apply(s,n):s.push(n));if(!this._streaming){do{if(-1===(n=this._decoder.handler(o,o.read())))break;if(null===n)continue;Array.isArray(n)?s.push.apply(s,n):s.push(n)}while(!o.endOfStream());this._decoder=null}return!s.length||-1===["utf-8"].indexOf(this.encoding)||this._ignoreBOM||this._BOMseen||(65279===s[0]?(this._BOMseen=!0,s.shift()):this._BOMseen=!0),codePointsToString(s)}},TextEncoder.prototype={encode:function(t,e){t=t?String(t):"",e=ToDictionary(e),this._streaming||(this._encoder=new UTF8Encoder(this._options)),this._streaming=!!e.stream;for(var r,n=[],o=new Stream(stringToCodePoints(t));!o.endOfStream()&&-1!==(r=this._encoder.handler(o,o.read()));)Array.isArray(r)?n.push.apply(n,r):n.push(r);if(!this._streaming){for(;-1!==(r=this._encoder.handler(o,o.read()));)Array.isArray(r)?n.push.apply(n,r):n.push(r);this._encoder=null}return new Uint8Array(n)}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.