@defdone/annon 0.0.0-stage → 0.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +63 -0
- package/CLI.md +378 -0
- package/LICENSE +201 -0
- package/NOTICE +7 -0
- package/README.md +591 -2
- package/dist/api/annon-types.d.ts +108 -0
- package/dist/api/annon-types.js +2 -0
- package/dist/api/annon.d.ts +117 -0
- package/dist/api/annon.js +1152 -0
- package/dist/api/hosted-record.d.ts +13 -0
- package/dist/api/hosted-record.js +149 -0
- package/dist/api/sharing-types.d.ts +109 -0
- package/dist/api/sharing-types.js +1 -0
- package/dist/api/sharing.d.ts +36 -0
- package/dist/api/sharing.js +879 -0
- package/dist/browser/download.d.ts +19 -0
- package/dist/browser/download.js +52 -0
- package/dist/browser/index.d.ts +23 -0
- package/dist/browser/index.js +22 -0
- package/dist/browser/login-bundle.js +151 -0
- package/dist/browser/login.d.ts +1 -0
- package/dist/browser/login.js +216 -0
- package/dist/browser/purchase-bundle.js +84 -0
- package/dist/browser/purchases.d.ts +98 -0
- package/dist/browser/purchases.js +735 -0
- package/dist/browser/record.d.ts +55 -0
- package/dist/browser/record.js +16 -0
- package/dist/browser/selling.d.ts +146 -0
- package/dist/browser/selling.js +418 -0
- package/dist/browser/wallets.d.ts +53 -0
- package/dist/browser/wallets.js +286 -0
- package/dist/bytes.d.ts +4 -0
- package/dist/bytes.js +16 -0
- package/dist/download/download.d.ts +59 -0
- package/dist/download/download.js +384 -0
- package/dist/download/host.d.ts +56 -0
- package/dist/download/host.js +161 -0
- package/dist/download/http.d.ts +23 -0
- package/dist/download/http.js +87 -0
- package/dist/download/proof.d.ts +20 -0
- package/dist/download/proof.js +79 -0
- package/dist/download/upload.d.ts +130 -0
- package/dist/download/upload.js +408 -0
- package/dist/envelope/evm.d.ts +4 -0
- package/dist/envelope/evm.js +32 -0
- package/dist/envelope/pay2.d.ts +176 -0
- package/dist/envelope/pay2.js +541 -0
- package/dist/envelope/replay.d.ts +45 -0
- package/dist/envelope/replay.js +186 -0
- package/dist/envelope/stream.d.ts +78 -0
- package/dist/envelope/stream.js +372 -0
- package/dist/errors.d.ts +21 -0
- package/dist/errors.js +300 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.js +23 -0
- package/dist/keys/near-ckd.d.ts +47 -0
- package/dist/keys/near-ckd.js +96 -0
- package/dist/limits.d.ts +4 -0
- package/dist/limits.js +4 -0
- package/dist/near/nep413.d.ts +22 -0
- package/dist/near/nep413.js +39 -0
- package/dist/near/rpc.d.ts +170 -0
- package/dist/near/rpc.js +423 -0
- package/dist/near/texts.d.ts +39 -0
- package/dist/near/texts.js +60 -0
- package/dist/net/ip.d.ts +7 -0
- package/dist/net/ip.js +62 -0
- package/dist/net/retry.d.ts +3 -0
- package/dist/net/retry.js +31 -0
- package/dist/node/adapter-checks.d.ts +6 -0
- package/dist/node/adapter-checks.js +13 -0
- package/dist/node/adapter.d.ts +8 -0
- package/dist/node/adapter.js +98 -0
- package/dist/node/agent.d.ts +49 -0
- package/dist/node/agent.js +266 -0
- package/dist/node/amounts.d.ts +2 -0
- package/dist/node/amounts.js +20 -0
- package/dist/node/browser-login.d.ts +25 -0
- package/dist/node/browser-login.js +219 -0
- package/dist/node/budget.d.ts +24 -0
- package/dist/node/budget.js +59 -0
- package/dist/node/buy-commands.d.ts +24 -0
- package/dist/node/buy-commands.js +301 -0
- package/dist/node/cli.d.ts +60 -0
- package/dist/node/cli.js +201 -0
- package/dist/node/command-context.d.ts +82 -0
- package/dist/node/command-context.js +77 -0
- package/dist/node/config.d.ts +37 -0
- package/dist/node/config.js +189 -0
- package/dist/node/core-adapter.d.ts +43 -0
- package/dist/node/core-adapter.js +122 -0
- package/dist/node/errors.d.ts +8 -0
- package/dist/node/errors.js +12 -0
- package/dist/node/index.d.ts +7 -0
- package/dist/node/index.js +5 -0
- package/dist/node/io.d.ts +13 -0
- package/dist/node/io.js +112 -0
- package/dist/node/keychain.d.ts +10 -0
- package/dist/node/keychain.js +67 -0
- package/dist/node/main.d.ts +2 -0
- package/dist/node/main.js +21 -0
- package/dist/node/offers.d.ts +16 -0
- package/dist/node/offers.js +91 -0
- package/dist/node/origin.d.ts +11 -0
- package/dist/node/origin.js +80 -0
- package/dist/node/paths.d.ts +3 -0
- package/dist/node/paths.js +71 -0
- package/dist/node/payment-terms.d.ts +26 -0
- package/dist/node/payment-terms.js +127 -0
- package/dist/node/purchase-commands.d.ts +16 -0
- package/dist/node/purchase-commands.js +237 -0
- package/dist/node/purchase-guard.d.ts +19 -0
- package/dist/node/purchase-guard.js +53 -0
- package/dist/node/relay-transport.d.ts +6 -0
- package/dist/node/relay-transport.js +173 -0
- package/dist/node/resources.d.ts +2 -0
- package/dist/node/resources.js +26 -0
- package/dist/node/retry-gate.d.ts +15 -0
- package/dist/node/retry-gate.js +53 -0
- package/dist/node/seller-commands.d.ts +12 -0
- package/dist/node/seller-commands.js +207 -0
- package/dist/node/sharing.d.ts +3 -0
- package/dist/node/sharing.js +28 -0
- package/dist/node/shops.d.ts +17 -0
- package/dist/node/shops.js +74 -0
- package/dist/node/signer-mock.d.ts +11 -0
- package/dist/node/signer-mock.js +79 -0
- package/dist/node/signer-wallet.d.ts +8 -0
- package/dist/node/signer-wallet.js +149 -0
- package/dist/node/signing.d.ts +29 -0
- package/dist/node/signing.js +200 -0
- package/dist/node/storage-commands.d.ts +11 -0
- package/dist/node/storage-commands.js +50 -0
- package/dist/node/sync-dir.d.ts +1 -0
- package/dist/node/sync-dir.js +11 -0
- package/dist/node/wallets.d.ts +13 -0
- package/dist/node/wallets.js +146 -0
- package/dist/oneclick/oneclick.d.ts +132 -0
- package/dist/oneclick/oneclick.js +342 -0
- package/dist/pay/backup.d.ts +70 -0
- package/dist/pay/backup.js +402 -0
- package/dist/pay/base.d.ts +135 -0
- package/dist/pay/base.js +386 -0
- package/dist/pay/eip3009.d.ts +59 -0
- package/dist/pay/eip3009.js +72 -0
- package/dist/pay/pay.d.ts +86 -0
- package/dist/pay/pay.js +297 -0
- package/dist/pay/purchase.d.ts +103 -0
- package/dist/pay/purchase.js +20 -0
- package/dist/pay/recover.d.ts +31 -0
- package/dist/pay/recover.js +34 -0
- package/dist/pay/seller.d.ts +130 -0
- package/dist/pay/seller.js +444 -0
- package/dist/pay/settle.d.ts +96 -0
- package/dist/pay/settle.js +308 -0
- package/dist/pay/split.d.ts +115 -0
- package/dist/pay/split.js +256 -0
- package/dist/pay/store-node.d.ts +8 -0
- package/dist/pay/store-node.js +224 -0
- package/dist/pay/store.d.ts +54 -0
- package/dist/pay/store.js +135 -0
- package/dist/pay/x402.d.ts +95 -0
- package/dist/pay/x402.js +136 -0
- package/dist/relay/admission.d.ts +8 -0
- package/dist/relay/admission.js +58 -0
- package/dist/relay/capabilities.d.ts +36 -0
- package/dist/relay/capabilities.js +232 -0
- package/dist/relay/fees.d.ts +17 -0
- package/dist/relay/fees.js +105 -0
- package/dist/relay/index.d.ts +10 -0
- package/dist/relay/index.js +8 -0
- package/dist/relay/keeper-balance.d.ts +17 -0
- package/dist/relay/keeper-balance.js +46 -0
- package/dist/relay/keeper-runner.d.ts +114 -0
- package/dist/relay/keeper-runner.js +703 -0
- package/dist/relay/keeper.d.ts +38 -0
- package/dist/relay/keeper.js +73 -0
- package/dist/relay/ledger.d.ts +155 -0
- package/dist/relay/ledger.js +392 -0
- package/dist/relay/relay-checks.d.ts +3 -0
- package/dist/relay/relay-checks.js +244 -0
- package/dist/relay/relay-reconciliation.d.ts +15 -0
- package/dist/relay/relay-reconciliation.js +293 -0
- package/dist/relay/relay-request.d.ts +6 -0
- package/dist/relay/relay-request.js +139 -0
- package/dist/relay/relay-transactions.d.ts +23 -0
- package/dist/relay/relay-transactions.js +182 -0
- package/dist/relay/relay-types.d.ts +128 -0
- package/dist/relay/relay-types.js +17 -0
- package/dist/relay/relay.d.ts +102 -0
- package/dist/relay/relay.js +426 -0
- package/dist/relay/reservation.d.ts +29 -0
- package/dist/relay/reservation.js +132 -0
- package/dist/relay/sponsorship.d.ts +42 -0
- package/dist/relay/sponsorship.js +184 -0
- package/dist/routes.d.ts +2 -0
- package/dist/routes.js +1 -0
- package/dist/settle-near/codec.d.ts +17 -0
- package/dist/settle-near/codec.js +86 -0
- package/dist/settle-near/identity.d.ts +27 -0
- package/dist/settle-near/identity.js +80 -0
- package/dist/settle-near/purchase.d.ts +40 -0
- package/dist/settle-near/purchase.js +153 -0
- package/dist/settle-near/terms.d.ts +37 -0
- package/dist/settle-near/terms.js +89 -0
- package/dist/shops/discovery.d.ts +95 -0
- package/dist/shops/discovery.js +384 -0
- package/dist/wallet/account-only.d.ts +11 -0
- package/dist/wallet/account-only.js +6 -0
- package/dist/wallet/uncertain.d.ts +8 -0
- package/dist/wallet/uncertain.js +13 -0
- package/dist/wallet/wallet.d.ts +100 -0
- package/dist/wallet/wallet.js +204 -0
- package/package.json +136 -3
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";(()=>{var jJ=Object.create;var Cw=Object.defineProperty;var UJ=Object.getOwnPropertyDescriptor;var DJ=Object.getOwnPropertyNames;var zJ=Object.getPrototypeOf,KJ=Object.prototype.hasOwnProperty;var N=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(n){throw r=[n],n}};var G=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},r0=(t,e)=>{for(var r in e)Cw(t,r,{get:e[r],enumerable:!0})},qJ=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of DJ(e))!KJ.call(t,o)&&o!==r&&Cw(t,o,{get:()=>e[o],enumerable:!(n=UJ(e,o))||n.enumerable});return t};var Jt=(t,e,r)=>(r=t!=null?jJ(zJ(t)):{},qJ(e||!t||!t.__esModule?Cw(r,"default",{value:t,enumerable:!0}):r,t));var $T=G(_m=>{"use strict";_m.byteLength=GJ;_m.toByteArray=VJ;_m.fromByteArray=JJ;var Lo=[],Pn=[],HJ=typeof Uint8Array<"u"?Uint8Array:Array,Nw="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(dc=0,MT=Nw.length;dc<MT;++dc)Lo[dc]=Nw[dc],Pn[Nw.charCodeAt(dc)]=dc;var dc,MT;Pn[45]=62;Pn[95]=63;function kT(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function GJ(t){var e=kT(t),r=e[0],n=e[1];return(r+n)*3/4-n}function WJ(t,e,r){return(e+r)*3/4-r}function VJ(t){var e,r=kT(t),n=r[0],o=r[1],i=new HJ(WJ(t,n,o)),a=0,s=o>0?n-4:n,c;for(c=0;c<s;c+=4)e=Pn[t.charCodeAt(c)]<<18|Pn[t.charCodeAt(c+1)]<<12|Pn[t.charCodeAt(c+2)]<<6|Pn[t.charCodeAt(c+3)],i[a++]=e>>16&255,i[a++]=e>>8&255,i[a++]=e&255;return o===2&&(e=Pn[t.charCodeAt(c)]<<2|Pn[t.charCodeAt(c+1)]>>4,i[a++]=e&255),o===1&&(e=Pn[t.charCodeAt(c)]<<10|Pn[t.charCodeAt(c+1)]<<4|Pn[t.charCodeAt(c+2)]>>2,i[a++]=e>>8&255,i[a++]=e&255),i}function YJ(t){return Lo[t>>18&63]+Lo[t>>12&63]+Lo[t>>6&63]+Lo[t&63]}function ZJ(t,e,r){for(var n,o=[],i=e;i<r;i+=3)n=(t[i]<<16&16711680)+(t[i+1]<<8&65280)+(t[i+2]&255),o.push(YJ(n));return o.join("")}function JJ(t){for(var e,r=t.length,n=r%3,o=[],i=16383,a=0,s=r-n;a<s;a+=i)o.push(ZJ(t,a,a+i>s?s:a+i));return n===1?(e=t[r-1],o.push(Lo[e>>2]+Lo[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],o.push(Lo[e>>10]+Lo[e>>4&63]+Lo[e<<2&63]+"=")),o.join("")}});var FT=G(Mw=>{Mw.read=function(t,e,r,n,o){var i,a,s=o*8-n-1,c=(1<<s)-1,u=c>>1,f=-7,l=r?o-1:0,h=r?-1:1,m=t[e+l];for(l+=h,i=m&(1<<-f)-1,m>>=-f,f+=s;f>0;i=i*256+t[e+l],l+=h,f-=8);for(a=i&(1<<-f)-1,i>>=-f,f+=n;f>0;a=a*256+t[e+l],l+=h,f-=8);if(i===0)i=1-u;else{if(i===c)return a?NaN:(m?-1:1)*(1/0);a=a+Math.pow(2,n),i=i-u}return(m?-1:1)*a*Math.pow(2,i-n)};Mw.write=function(t,e,r,n,o,i){var a,s,c,u=i*8-o-1,f=(1<<u)-1,l=f>>1,h=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=n?0:i-1,x=n?1:-1,S=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-a))<1&&(a--,c*=2),a+l>=1?e+=h/c:e+=h*Math.pow(2,1-l),e*c>=2&&(a++,c/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(e*c-1)*Math.pow(2,o),a=a+l):(s=e*Math.pow(2,l-1)*Math.pow(2,o),a=0));o>=8;t[r+m]=s&255,m+=x,s/=256,o-=8);for(a=a<<o|s,u+=o;u>0;t[r+m]=a&255,m+=x,a/=256,u-=8);t[r+m-x]|=S*128}});var Kw=G(Kf=>{"use strict";var kw=$T(),Df=FT(),LT=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Kf.Buffer=H;Kf.SlowBuffer=nX;Kf.INSPECT_MAX_BYTES=50;var Sm=2147483647;Kf.kMaxLength=Sm;H.TYPED_ARRAY_SUPPORT=XJ();!H.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function XJ(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch{return!1}}Object.defineProperty(H.prototype,"parent",{enumerable:!0,get:function(){if(H.isBuffer(this))return this.buffer}});Object.defineProperty(H.prototype,"offset",{enumerable:!0,get:function(){if(H.isBuffer(this))return this.byteOffset}});function Mi(t){if(t>Sm)throw new RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,H.prototype),e}function H(t,e,r){if(typeof t=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return jw(t)}return zT(t,e,r)}H.poolSize=8192;function zT(t,e,r){if(typeof t=="string")return eX(t,e);if(ArrayBuffer.isView(t))return tX(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(jo(t,ArrayBuffer)||t&&jo(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(jo(t,SharedArrayBuffer)||t&&jo(t.buffer,SharedArrayBuffer)))return Fw(t,e,r);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=t.valueOf&&t.valueOf();if(n!=null&&n!==t)return H.from(n,e,r);let o=rX(t);if(o)return o;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return H.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}H.from=function(t,e,r){return zT(t,e,r)};Object.setPrototypeOf(H.prototype,Uint8Array.prototype);Object.setPrototypeOf(H,Uint8Array);function KT(t){if(typeof t!="number")throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function QJ(t,e,r){return KT(t),t<=0?Mi(t):e!==void 0?typeof r=="string"?Mi(t).fill(e,r):Mi(t).fill(e):Mi(t)}H.alloc=function(t,e,r){return QJ(t,e,r)};function jw(t){return KT(t),Mi(t<0?0:Uw(t)|0)}H.allocUnsafe=function(t){return jw(t)};H.allocUnsafeSlow=function(t){return jw(t)};function eX(t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!H.isEncoding(e))throw new TypeError("Unknown encoding: "+e);let r=qT(t,e)|0,n=Mi(r),o=n.write(t,e);return o!==r&&(n=n.slice(0,o)),n}function $w(t){let e=t.length<0?0:Uw(t.length)|0,r=Mi(e);for(let n=0;n<e;n+=1)r[n]=t[n]&255;return r}function tX(t){if(jo(t,Uint8Array)){let e=new Uint8Array(t);return Fw(e.buffer,e.byteOffset,e.byteLength)}return $w(t)}function Fw(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return e===void 0&&r===void 0?n=new Uint8Array(t):r===void 0?n=new Uint8Array(t,e):n=new Uint8Array(t,e,r),Object.setPrototypeOf(n,H.prototype),n}function rX(t){if(H.isBuffer(t)){let e=Uw(t.length)|0,r=Mi(e);return r.length===0||t.copy(r,0,0,e),r}if(t.length!==void 0)return typeof t.length!="number"||zw(t.length)?Mi(0):$w(t);if(t.type==="Buffer"&&Array.isArray(t.data))return $w(t.data)}function Uw(t){if(t>=Sm)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Sm.toString(16)+" bytes");return t|0}function nX(t){return+t!=t&&(t=0),H.alloc(+t)}H.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==H.prototype};H.compare=function(e,r){if(jo(e,Uint8Array)&&(e=H.from(e,e.offset,e.byteLength)),jo(r,Uint8Array)&&(r=H.from(r,r.offset,r.byteLength)),!H.isBuffer(e)||!H.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===r)return 0;let n=e.length,o=r.length;for(let i=0,a=Math.min(n,o);i<a;++i)if(e[i]!==r[i]){n=e[i],o=r[i];break}return n<o?-1:o<n?1:0};H.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};H.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return H.alloc(0);let n;if(r===void 0)for(r=0,n=0;n<e.length;++n)r+=e[n].length;let o=H.allocUnsafe(r),i=0;for(n=0;n<e.length;++n){let a=e[n];if(jo(a,Uint8Array))i+a.length>o.length?(H.isBuffer(a)||(a=H.from(a)),a.copy(o,i)):Uint8Array.prototype.set.call(o,a,i);else if(H.isBuffer(a))a.copy(o,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=a.length}return o};function qT(t,e){if(H.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||jo(t,ArrayBuffer))return t.byteLength;if(typeof t!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);let r=t.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let o=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Lw(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return QT(t).length;default:if(o)return n?-1:Lw(t).length;e=(""+e).toLowerCase(),o=!0}}H.byteLength=qT;function oX(t,e,r){let n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,e>>>=0,r<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":return hX(this,e,r);case"utf8":case"utf-8":return GT(this,e,r);case"ascii":return lX(this,e,r);case"latin1":case"binary":return pX(this,e,r);case"base64":return uX(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return mX(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}H.prototype._isBuffer=!0;function lc(t,e,r){let n=t[e];t[e]=t[r],t[r]=n}H.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;r<e;r+=2)lc(this,r,r+1);return this};H.prototype.swap32=function(){let e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let r=0;r<e;r+=4)lc(this,r,r+3),lc(this,r+1,r+2);return this};H.prototype.swap64=function(){let e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let r=0;r<e;r+=8)lc(this,r,r+7),lc(this,r+1,r+6),lc(this,r+2,r+5),lc(this,r+3,r+4);return this};H.prototype.toString=function(){let e=this.length;return e===0?"":arguments.length===0?GT(this,0,e):oX.apply(this,arguments)};H.prototype.toLocaleString=H.prototype.toString;H.prototype.equals=function(e){if(!H.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:H.compare(this,e)===0};H.prototype.inspect=function(){let e="",r=Kf.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"};LT&&(H.prototype[LT]=H.prototype.inspect);H.prototype.compare=function(e,r,n,o,i){if(jo(e,Uint8Array)&&(e=H.from(e,e.offset,e.byteLength)),!H.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(r===void 0&&(r=0),n===void 0&&(n=e?e.length:0),o===void 0&&(o=0),i===void 0&&(i=this.length),r<0||n>e.length||o<0||i>this.length)throw new RangeError("out of range index");if(o>=i&&r>=n)return 0;if(o>=i)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,o>>>=0,i>>>=0,this===e)return 0;let a=i-o,s=n-r,c=Math.min(a,s),u=this.slice(o,i),f=e.slice(r,n);for(let l=0;l<c;++l)if(u[l]!==f[l]){a=u[l],s=f[l];break}return a<s?-1:s<a?1:0};function HT(t,e,r,n,o){if(t.length===0)return-1;if(typeof r=="string"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,zw(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0)if(o)r=0;else return-1;if(typeof e=="string"&&(e=H.from(e,n)),H.isBuffer(e))return e.length===0?-1:jT(t,e,r,n,o);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):jT(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function jT(t,e,r,n,o){let i=1,a=t.length,s=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(t.length<2||e.length<2)return-1;i=2,a/=2,s/=2,r/=2}function c(f,l){return i===1?f[l]:f.readUInt16BE(l*i)}let u;if(o){let f=-1;for(u=r;u<a;u++)if(c(t,u)===c(e,f===-1?0:u-f)){if(f===-1&&(f=u),u-f+1===s)return f*i}else f!==-1&&(u-=u-f),f=-1}else for(r+s>a&&(r=a-s),u=r;u>=0;u--){let f=!0;for(let l=0;l<s;l++)if(c(t,u+l)!==c(e,l)){f=!1;break}if(f)return u}return-1}H.prototype.includes=function(e,r,n){return this.indexOf(e,r,n)!==-1};H.prototype.indexOf=function(e,r,n){return HT(this,e,r,n,!0)};H.prototype.lastIndexOf=function(e,r,n){return HT(this,e,r,n,!1)};function iX(t,e,r,n){r=Number(r)||0;let o=t.length-r;n?(n=Number(n),n>o&&(n=o)):n=o;let i=e.length;n>i/2&&(n=i/2);let a;for(a=0;a<n;++a){let s=parseInt(e.substr(a*2,2),16);if(zw(s))return a;t[r+a]=s}return a}function aX(t,e,r,n){return Im(Lw(e,t.length-r),t,r,n)}function sX(t,e,r,n){return Im(vX(e),t,r,n)}function cX(t,e,r,n){return Im(QT(e),t,r,n)}function fX(t,e,r,n){return Im(xX(e,t.length-r),t,r,n)}H.prototype.write=function(e,r,n,o){if(r===void 0)o="utf8",n=this.length,r=0;else if(n===void 0&&typeof r=="string")o=r,n=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(n)?(n=n>>>0,o===void 0&&(o="utf8")):(o=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-r;if((n===void 0||n>i)&&(n=i),e.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");let a=!1;for(;;)switch(o){case"hex":return iX(this,e,r,n);case"utf8":case"utf-8":return aX(this,e,r,n);case"ascii":case"latin1":case"binary":return sX(this,e,r,n);case"base64":return cX(this,e,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fX(this,e,r,n);default:if(a)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),a=!0}};H.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function uX(t,e,r){return e===0&&r===t.length?kw.fromByteArray(t):kw.fromByteArray(t.slice(e,r))}function GT(t,e,r){r=Math.min(t.length,r);let n=[],o=e;for(;o<r;){let i=t[o],a=null,s=i>239?4:i>223?3:i>191?2:1;if(o+s<=r){let c,u,f,l;switch(s){case 1:i<128&&(a=i);break;case 2:c=t[o+1],(c&192)===128&&(l=(i&31)<<6|c&63,l>127&&(a=l));break;case 3:c=t[o+1],u=t[o+2],(c&192)===128&&(u&192)===128&&(l=(i&15)<<12|(c&63)<<6|u&63,l>2047&&(l<55296||l>57343)&&(a=l));break;case 4:c=t[o+1],u=t[o+2],f=t[o+3],(c&192)===128&&(u&192)===128&&(f&192)===128&&(l=(i&15)<<18|(c&63)<<12|(u&63)<<6|f&63,l>65535&&l<1114112&&(a=l))}}a===null?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|a&1023),n.push(a),o+=s}return dX(n)}var UT=4096;function dX(t){let e=t.length;if(e<=UT)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=UT));return r}function lX(t,e,r){let n="";r=Math.min(t.length,r);for(let o=e;o<r;++o)n+=String.fromCharCode(t[o]&127);return n}function pX(t,e,r){let n="";r=Math.min(t.length,r);for(let o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function hX(t,e,r){let n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let o="";for(let i=e;i<r;++i)o+=wX[t[i]];return o}function mX(t,e,r){let n=t.slice(e,r),o="";for(let i=0;i<n.length-1;i+=2)o+=String.fromCharCode(n[i]+n[i+1]*256);return o}H.prototype.slice=function(e,r){let n=this.length;e=~~e,r=r===void 0?n:~~r,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<e&&(r=e);let o=this.subarray(e,r);return Object.setPrototypeOf(o,H.prototype),o};function Ut(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}H.prototype.readUintLE=H.prototype.readUIntLE=function(e,r,n){e=e>>>0,r=r>>>0,n||Ut(e,r,this.length);let o=this[e],i=1,a=0;for(;++a<r&&(i*=256);)o+=this[e+a]*i;return o};H.prototype.readUintBE=H.prototype.readUIntBE=function(e,r,n){e=e>>>0,r=r>>>0,n||Ut(e,r,this.length);let o=this[e+--r],i=1;for(;r>0&&(i*=256);)o+=this[e+--r]*i;return o};H.prototype.readUint8=H.prototype.readUInt8=function(e,r){return e=e>>>0,r||Ut(e,1,this.length),this[e]};H.prototype.readUint16LE=H.prototype.readUInt16LE=function(e,r){return e=e>>>0,r||Ut(e,2,this.length),this[e]|this[e+1]<<8};H.prototype.readUint16BE=H.prototype.readUInt16BE=function(e,r){return e=e>>>0,r||Ut(e,2,this.length),this[e]<<8|this[e+1]};H.prototype.readUint32LE=H.prototype.readUInt32LE=function(e,r){return e=e>>>0,r||Ut(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};H.prototype.readUint32BE=H.prototype.readUInt32BE=function(e,r){return e=e>>>0,r||Ut(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};H.prototype.readBigUInt64LE=Pa(function(e){e=e>>>0,zf(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&n0(e,this.length-8);let o=r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+n*2**24;return BigInt(o)+(BigInt(i)<<BigInt(32))});H.prototype.readBigUInt64BE=Pa(function(e){e=e>>>0,zf(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&n0(e,this.length-8);let o=r*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n;return(BigInt(o)<<BigInt(32))+BigInt(i)});H.prototype.readIntLE=function(e,r,n){e=e>>>0,r=r>>>0,n||Ut(e,r,this.length);let o=this[e],i=1,a=0;for(;++a<r&&(i*=256);)o+=this[e+a]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*r)),o};H.prototype.readIntBE=function(e,r,n){e=e>>>0,r=r>>>0,n||Ut(e,r,this.length);let o=r,i=1,a=this[e+--o];for(;o>0&&(i*=256);)a+=this[e+--o]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*r)),a};H.prototype.readInt8=function(e,r){return e=e>>>0,r||Ut(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};H.prototype.readInt16LE=function(e,r){e=e>>>0,r||Ut(e,2,this.length);let n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};H.prototype.readInt16BE=function(e,r){e=e>>>0,r||Ut(e,2,this.length);let n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};H.prototype.readInt32LE=function(e,r){return e=e>>>0,r||Ut(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};H.prototype.readInt32BE=function(e,r){return e=e>>>0,r||Ut(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};H.prototype.readBigInt64LE=Pa(function(e){e=e>>>0,zf(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&n0(e,this.length-8);let o=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(n<<24);return(BigInt(o)<<BigInt(32))+BigInt(r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)});H.prototype.readBigInt64BE=Pa(function(e){e=e>>>0,zf(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&n0(e,this.length-8);let o=(r<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(o)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n)});H.prototype.readFloatLE=function(e,r){return e=e>>>0,r||Ut(e,4,this.length),Df.read(this,e,!0,23,4)};H.prototype.readFloatBE=function(e,r){return e=e>>>0,r||Ut(e,4,this.length),Df.read(this,e,!1,23,4)};H.prototype.readDoubleLE=function(e,r){return e=e>>>0,r||Ut(e,8,this.length),Df.read(this,e,!0,52,8)};H.prototype.readDoubleBE=function(e,r){return e=e>>>0,r||Ut(e,8,this.length),Df.read(this,e,!1,52,8)};function Cr(t,e,r,n,o,i){if(!H.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}H.prototype.writeUintLE=H.prototype.writeUIntLE=function(e,r,n,o){if(e=+e,r=r>>>0,n=n>>>0,!o){let s=Math.pow(2,8*n)-1;Cr(this,e,r,n,s,0)}let i=1,a=0;for(this[r]=e&255;++a<n&&(i*=256);)this[r+a]=e/i&255;return r+n};H.prototype.writeUintBE=H.prototype.writeUIntBE=function(e,r,n,o){if(e=+e,r=r>>>0,n=n>>>0,!o){let s=Math.pow(2,8*n)-1;Cr(this,e,r,n,s,0)}let i=n-1,a=1;for(this[r+i]=e&255;--i>=0&&(a*=256);)this[r+i]=e/a&255;return r+n};H.prototype.writeUint8=H.prototype.writeUInt8=function(e,r,n){return e=+e,r=r>>>0,n||Cr(this,e,r,1,255,0),this[r]=e&255,r+1};H.prototype.writeUint16LE=H.prototype.writeUInt16LE=function(e,r,n){return e=+e,r=r>>>0,n||Cr(this,e,r,2,65535,0),this[r]=e&255,this[r+1]=e>>>8,r+2};H.prototype.writeUint16BE=H.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=r>>>0,n||Cr(this,e,r,2,65535,0),this[r]=e>>>8,this[r+1]=e&255,r+2};H.prototype.writeUint32LE=H.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=r>>>0,n||Cr(this,e,r,4,4294967295,0),this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=e&255,r+4};H.prototype.writeUint32BE=H.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=r>>>0,n||Cr(this,e,r,4,4294967295,0),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};function WT(t,e,r,n,o){XT(e,n,o,t,r,7);let i=Number(e&BigInt(4294967295));t[r++]=i,i=i>>8,t[r++]=i,i=i>>8,t[r++]=i,i=i>>8,t[r++]=i;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=a,a=a>>8,t[r++]=a,a=a>>8,t[r++]=a,a=a>>8,t[r++]=a,r}function VT(t,e,r,n,o){XT(e,n,o,t,r,7);let i=Number(e&BigInt(4294967295));t[r+7]=i,i=i>>8,t[r+6]=i,i=i>>8,t[r+5]=i,i=i>>8,t[r+4]=i;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=a,a=a>>8,t[r+2]=a,a=a>>8,t[r+1]=a,a=a>>8,t[r]=a,r+8}H.prototype.writeBigUInt64LE=Pa(function(e,r=0){return WT(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});H.prototype.writeBigUInt64BE=Pa(function(e,r=0){return VT(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});H.prototype.writeIntLE=function(e,r,n,o){if(e=+e,r=r>>>0,!o){let c=Math.pow(2,8*n-1);Cr(this,e,r,n,c-1,-c)}let i=0,a=1,s=0;for(this[r]=e&255;++i<n&&(a*=256);)e<0&&s===0&&this[r+i-1]!==0&&(s=1),this[r+i]=(e/a>>0)-s&255;return r+n};H.prototype.writeIntBE=function(e,r,n,o){if(e=+e,r=r>>>0,!o){let c=Math.pow(2,8*n-1);Cr(this,e,r,n,c-1,-c)}let i=n-1,a=1,s=0;for(this[r+i]=e&255;--i>=0&&(a*=256);)e<0&&s===0&&this[r+i+1]!==0&&(s=1),this[r+i]=(e/a>>0)-s&255;return r+n};H.prototype.writeInt8=function(e,r,n){return e=+e,r=r>>>0,n||Cr(this,e,r,1,127,-128),e<0&&(e=255+e+1),this[r]=e&255,r+1};H.prototype.writeInt16LE=function(e,r,n){return e=+e,r=r>>>0,n||Cr(this,e,r,2,32767,-32768),this[r]=e&255,this[r+1]=e>>>8,r+2};H.prototype.writeInt16BE=function(e,r,n){return e=+e,r=r>>>0,n||Cr(this,e,r,2,32767,-32768),this[r]=e>>>8,this[r+1]=e&255,r+2};H.prototype.writeInt32LE=function(e,r,n){return e=+e,r=r>>>0,n||Cr(this,e,r,4,2147483647,-2147483648),this[r]=e&255,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24,r+4};H.prototype.writeInt32BE=function(e,r,n){return e=+e,r=r>>>0,n||Cr(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};H.prototype.writeBigInt64LE=Pa(function(e,r=0){return WT(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});H.prototype.writeBigInt64BE=Pa(function(e,r=0){return VT(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function YT(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function ZT(t,e,r,n,o){return e=+e,r=r>>>0,o||YT(t,e,r,4,34028234663852886e22,-34028234663852886e22),Df.write(t,e,r,n,23,4),r+4}H.prototype.writeFloatLE=function(e,r,n){return ZT(this,e,r,!0,n)};H.prototype.writeFloatBE=function(e,r,n){return ZT(this,e,r,!1,n)};function JT(t,e,r,n,o){return e=+e,r=r>>>0,o||YT(t,e,r,8,17976931348623157e292,-17976931348623157e292),Df.write(t,e,r,n,52,8),r+8}H.prototype.writeDoubleLE=function(e,r,n){return JT(this,e,r,!0,n)};H.prototype.writeDoubleBE=function(e,r,n){return JT(this,e,r,!1,n)};H.prototype.copy=function(e,r,n,o){if(!H.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),!o&&o!==0&&(o=this.length),r>=e.length&&(r=e.length),r||(r=0),o>0&&o<n&&(o=n),o===n||e.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-r<o-n&&(o=e.length-r+n);let i=o-n;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,n,o):Uint8Array.prototype.set.call(e,this.subarray(n,o),r),i};H.prototype.fill=function(e,r,n,o){if(typeof e=="string"){if(typeof r=="string"?(o=r,r=0,n=this.length):typeof n=="string"&&(o=n,n=this.length),o!==void 0&&typeof o!="string")throw new TypeError("encoding must be a string");if(typeof o=="string"&&!H.isEncoding(o))throw new TypeError("Unknown encoding: "+o);if(e.length===1){let a=e.charCodeAt(0);(o==="utf8"&&a<128||o==="latin1")&&(e=a)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r=r>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);let i;if(typeof e=="number")for(i=r;i<n;++i)this[i]=e;else{let a=H.isBuffer(e)?e:H.from(e,o),s=a.length;if(s===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-r;++i)this[i+r]=a[i%s]}return this};var Uf={};function Dw(t,e,r){Uf[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(o){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:o,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}Dw("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);Dw("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError);Dw("ERR_OUT_OF_RANGE",function(t,e,r){let n=`The value of "${t}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=DT(String(r)):typeof r=="bigint"&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=DT(o)),o+="n"),n+=` It must be ${e}. Received ${o}`,n},RangeError);function DT(t){let e="",r=t.length,n=t[0]==="-"?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function yX(t,e,r){zf(e,"offset"),(t[e]===void 0||t[e+r]===void 0)&&n0(e,t.length-(r+1))}function XT(t,e,r,n,o,i){if(t>r||t<e){let a=typeof e=="bigint"?"n":"",s;throw i>3?e===0||e===BigInt(0)?s=`>= 0${a} and < 2${a} ** ${(i+1)*8}${a}`:s=`>= -(2${a} ** ${(i+1)*8-1}${a}) and < 2 ** ${(i+1)*8-1}${a}`:s=`>= ${e}${a} and <= ${r}${a}`,new Uf.ERR_OUT_OF_RANGE("value",s,t)}yX(n,o,i)}function zf(t,e){if(typeof t!="number")throw new Uf.ERR_INVALID_ARG_TYPE(e,"number",t)}function n0(t,e,r){throw Math.floor(t)!==t?(zf(t,r),new Uf.ERR_OUT_OF_RANGE(r||"offset","an integer",t)):e<0?new Uf.ERR_BUFFER_OUT_OF_BOUNDS:new Uf.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}var bX=/[^+/0-9A-Za-z-_]/g;function gX(t){if(t=t.split("=")[0],t=t.trim().replace(bX,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function Lw(t,e){e=e||1/0;let r,n=t.length,o=null,i=[];for(let a=0;a<n;++a){if(r=t.charCodeAt(a),r>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}else if(a+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return i}function vX(t){let e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function xX(t,e){let r,n,o,i=[];for(let a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}function QT(t){return kw.toByteArray(gX(t))}function Im(t,e,r,n){let o;for(o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function jo(t,e){return t instanceof e||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===e.name}function zw(t){return t!==t}var wX=(function(){let t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let o=0;o<16;++o)e[n+o]=t[r]+t[o]}return e})();function Pa(t){return typeof BigInt>"u"?EX:t}function EX(){throw new Error("BigInt not supported")}});function _X(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in t&&t.BYTES_PER_ELEMENT===1}function Hw(t){if(!_X(t))throw new TypeError("Uint8Array expected")}function n7(t,e){if(typeof e!="string")throw new TypeError(`${t}: string expected`);return!0}function SX(t){let e=t.length;if(t7!==void 0&&e>=12)return t7.decode(t);if(e<=qw)return String.fromCharCode.apply(null,t);let r="";for(let n=0;n<e;n+=qw)r+=String.fromCharCode.apply(null,t.subarray(n,n+qw));return r}function IX(t,e){let r=t.length;if(r>128)throw new Error("alphabet: max 128 letters");let n=new Uint8Array(r),o=new Int8Array(128).fill(-1);for(let i=0;i<r;i++){let a=t.charCodeAt(i);if(t.codePointAt(i)!==a||a>127)throw new Error("alphabet: single-char ASCII letters only");n[i]=a,o[a]=i}if(e!==void 0)for(let i of Object.keys(e)){let a=i.charCodeAt(0),s=o[e[i].charCodeAt(0)];if(i.length!==1||a>127||s===void 0||s===-1)throw new Error(`alphabet: invalid alias ${i}`);o[a]=s}return{encode:i=>{let a=new Uint8Array(i.length);for(let s=0;s<i.length;s++){let c=i[s],u=n[c];if(u===void 0)throw new Error(`alphabet.encode: invalid digit ${c}`);a[s]=u}return SX(a)},decode:i=>{n7("decode",i);let a=i.length,s=new Uint8Array(a);for(let c=0;c<a;c++){let u=i.charCodeAt(c),f=u<128?o[u]:-1;if(f===-1)throw new Error(`Unknown letter "${i[c]}". Allowed: ${t}`);s[c]=f}return s}}}var AX,t7,qw,TX,r7,BX,OX,PX,RX,CX,NX,o0,Gw=N(()=>{AX=t=>Object.freeze(t());t7=(()=>{try{let t=new TextDecoder;return t.decode(Uint8Array.of(65,48,43,127))==="A0+\x7F"?t:void 0}catch{return}})(),qw=8192;TX=656356768,r7=65536,BX=2048,OX=4096,PX=(t,e)=>({encode:r=>{Hw(r);let n=r.length;if(n===0)return new Uint8Array(0);if(n>=r7)throw new Error("invalid length");let o=0;for(;o<n-1&&r[o]===0;)o++;let i=Math.ceil(n/2),a=new Uint16Array(i),s=n&1;s&&(a[0]=r[0]);for(let x=s,S=s;x<n;x+=2,S++)a[S]=r[x]<<8|r[x+1];let c=[],u=0;for(;u<i;){let x=0;for(let S=u;S<i;S++){let O=x*65536+a[S],P=Math.floor(O/e);x=O-P*e,a[S]=P,P===0&&S===u&&u++}c.push(x)}let f=c.length-1,l=f*5;for(let x=c[f];l++,!(x<t);x=Math.floor(x/t));let h=new Uint8Array(o+l),m=h.length-1;for(let x=0;x<f;x++){let S=c[x];for(let O=0;O<5;O++)h[m--]=S%t,S=Math.floor(S/t)}for(let x=c[f];m>=o;x=Math.floor(x/t))h[m--]=x%t;return h},decode:r=>{Hw(r);let n=r.length;if(n===0)return new Uint8Array(0);if(n>=r7)throw new Error("invalid length");let o=0;for(;o<n-1&&r[o]===0;)o++;let i=new Uint16Array(Math.ceil(n*6/16)+1),a=0,s=0,c=n%5||5;for(;s<n;){let h=0,m=1;for(let S=s+c;s<S;s++){let O=r[s];if(O>=t)throw new Error(`invalid integer: ${O}`);h=h*t+O,m*=t}c=5;let x=h;for(let S=0;S<a;S++){let O=i[S]*m+x;x=Math.floor(O/65536),i[S]=O-x*65536}for(;x>0;x=Math.floor(x/65536))i[a++]=x%65536}let u=a===0?1:a*2-(i[a-1]<256?1:0),f=new Uint8Array(o+u),l=f.length-1;for(let h=0;h<a;h++){let m=i[h];f[l--]=m&255,l>=o&&(f[l--]=m>>8)}return f}}),RX=(t,e)=>{let r=IX(e);return{encode(n){if(Hw(n),n.length>BX)throw new Error("invalid length");return r.encode(t.encode(n))},decode(n){if(n7("baseN.decode",n),n.length>OX)throw new Error("invalid length");return t.decode(r.decode(n))}}},CX=PX(58,TX),NX=t=>RX(CX,t),o0=AX(()=>NX("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"))});var qf,Tm=N(()=>{qf=["u8","u16","u32","u64","u128","i8","i16","i32","i64","i128","f32","f64"]});var o7,i7,Ww=N(()=>{o7=(function(){function t(){this.offset=0,this.buffer_size=256,this.buffer=new ArrayBuffer(this.buffer_size),this.view=new DataView(this.buffer)}return t.prototype.resize_if_necessary=function(e){if(this.buffer_size-this.offset<e){this.buffer_size=Math.max(this.buffer_size*2,this.buffer_size+e);var r=new ArrayBuffer(this.buffer_size);new Uint8Array(r).set(new Uint8Array(this.buffer)),this.buffer=r,this.view=new DataView(r)}},t.prototype.get_used_buffer=function(){return new Uint8Array(this.buffer).slice(0,this.offset)},t.prototype.store_value=function(e,r){var n=r.substring(1),o=parseInt(n)/8;this.resize_if_necessary(o);var i=r[0]==="f"?"setFloat".concat(n):r[0]==="i"?"setInt".concat(n):"setUint".concat(n);this.view[i](this.offset,e,!0),this.offset+=o},t.prototype.store_bytes=function(e){this.resize_if_necessary(e.length),new Uint8Array(this.buffer).set(new Uint8Array(e),this.offset),this.offset+=e.length},t})(),i7=(function(){function t(e){this.offset=0,this.buffer_size=e.length,this.buffer=new ArrayBuffer(e.length),new Uint8Array(this.buffer).set(e),this.view=new DataView(this.buffer)}return t.prototype.assert_enough_buffer=function(e){if(this.offset+e>this.buffer.byteLength)throw new Error("Error in schema, the buffer is smaller than expected")},t.prototype.consume_value=function(e){var r=e.substring(1),n=parseInt(r)/8;this.assert_enough_buffer(n);var o=e[0]==="f"?"getFloat".concat(r):e[0]==="i"?"getInt".concat(r):"getUint".concat(r),i=this.view[o](this.offset,!0);return this.offset+=n,i},t.prototype.consume_bytes=function(e){this.assert_enough_buffer(e);var r=this.buffer.slice(this.offset,this.offset+e);return this.offset+=e,r},t})()});function c7(t){return Array.isArray(t)||!!t&&typeof t=="object"&&"length"in t&&typeof t.length=="number"&&(t.length===0||t.length>0&&t.length-1 in t)}function pc(t,e,r){if(typeof t!==e)throw new Error("Expected ".concat(e," not ").concat(typeof t,"(").concat(t,") at ").concat(r.join(".")))}function f7(t,e){var r=["number","string","bigint","boolean"].includes(typeof t),n=typeof t=="object"&&t!==null&&"toString"in t;if(!r&&!n)throw new Error("Expected bigint, number, boolean or string not ".concat(typeof t,"(").concat(t,") at ").concat(e.join(".")))}function Vw(t,e,r){if(t!==e)throw new Error("Array length ".concat(t," does not match schema length ").concat(e," at ").concat(r.join(".")))}function u7(t,e){if(typeof t!="object"||t===null)throw new Error("Expected object not ".concat(typeof t,"(").concat(t,") at ").concat(e.join(".")))}function ki(t){if(!(typeof t=="string"&&a7.includes(t))){if(t&&typeof t=="object"){var e=Object.keys(t);if(e.length===1&&s7.includes(e[0])){var r=e[0];if(r==="option")return ki(t[r]);if(r==="enum")return kX(t[r]);if(r==="array")return $X(t[r]);if(r==="set")return ki(t[r]);if(r==="map")return FX(t[r]);if(r==="struct")return LX(t[r])}}throw new Hf(t,s7.join(", ")+" or "+a7.join(", "))}}function kX(t){if(!Array.isArray(t))throw new Hf(t,"Array");for(var e=0,r=t;e<r.length;e++){var n=r[e];if(typeof n!="object"||!("struct"in n))throw new Error('Missing "struct" key in enum schema');if(typeof n.struct!="object"||Object.keys(n.struct).length!==1)throw new Error('The "struct" in each enum must have a single key');ki({struct:n.struct})}}function $X(t){if(typeof t!="object")throw new Hf(t,"{ type, len? }");if(t.len&&typeof t.len!="number")throw new Error("Invalid schema: ".concat(t));if("type"in t)return ki(t.type);throw new Hf(t,"{ type, len? }")}function FX(t){if(typeof t=="object"&&"key"in t&&"value"in t)ki(t.key),ki(t.value);else throw new Hf(t,"{ key, value }")}function LX(t){if(typeof t!="object")throw new Hf(t,"object");for(var e in t)ki(t[e])}var MX,a7,s7,Hf,Yw=N(()=>{Tm();MX=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();a7=qf.concat(["bool","string"]),s7=["option","enum","array","set","map","struct"],Hf=(function(t){MX(e,t);function e(r,n){var o="Invalid schema: ".concat(JSON.stringify(r)," expected ").concat(n);return t.call(this,o)||this}return e})(Error)});var l7,p7=N(()=>{Tm();Ww();Yw();l7=(function(){function t(e){this.encoded=new o7,this.fieldPath=["value"],this.checkTypes=e}return t.prototype.encode=function(e,r){return this.encode_value(e,r),this.encoded.get_used_buffer()},t.prototype.encode_value=function(e,r){if(typeof r=="string"){if(qf.includes(r))return this.encode_integer(e,r);if(r==="string")return this.encode_string(e);if(r==="bool")return this.encode_boolean(e)}if(typeof r=="object"){if("option"in r)return this.encode_option(e,r);if("enum"in r)return this.encode_enum(e,r);if("array"in r)return this.encode_array(e,r);if("set"in r)return this.encode_set(e,r);if("map"in r)return this.encode_map(e,r);if("struct"in r)return this.encode_struct(e,r)}},t.prototype.encode_integer=function(e,r){var n=parseInt(r.substring(1));n<=32||r=="f64"?(this.checkTypes&&pc(e,"number",this.fieldPath),this.encoded.store_value(e,r)):(this.checkTypes&&f7(e,this.fieldPath),this.encode_bigint(BigInt(e),n))},t.prototype.encode_bigint=function(e,r){for(var n=r/8,o=new Uint8Array(n),i=0;i<n;i++)o[i]=Number(e&BigInt(255)),e=e>>BigInt(8);this.encoded.store_bytes(new Uint8Array(o))},t.prototype.encode_string=function(e){this.checkTypes&&pc(e,"string",this.fieldPath);for(var r=e,n=[],o=0;o<r.length;o++){var i=r.charCodeAt(o);i<128?n.push(i):i<2048?n.push(192|i>>6,128|i&63):i<55296||i>=57344?n.push(224|i>>12,128|i>>6&63,128|i&63):(o++,i=65536+((i&1023)<<10|r.charCodeAt(o)&1023),n.push(240|i>>18,128|i>>12&63,128|i>>6&63,128|i&63))}this.encoded.store_value(n.length,"u32"),this.encoded.store_bytes(new Uint8Array(n))},t.prototype.encode_boolean=function(e){this.checkTypes&&pc(e,"boolean",this.fieldPath),this.encoded.store_value(e?1:0,"u8")},t.prototype.encode_option=function(e,r){e==null?this.encoded.store_value(0,"u8"):(this.encoded.store_value(1,"u8"),this.encode_value(e,r.option))},t.prototype.encode_enum=function(e,r){this.checkTypes&&u7(e,this.fieldPath);for(var n=Object.keys(e)[0],o=0;o<r.enum.length;o++){var i=r.enum[o];if(n===Object.keys(i.struct)[0])return this.encoded.store_value(o,"u8"),this.encode_struct(e,i)}throw new Error("Enum key (".concat(n,") not found in enum schema: ").concat(JSON.stringify(r)," at ").concat(this.fieldPath.join(".")))},t.prototype.encode_array=function(e,r){if(c7(e))return this.encode_arraylike(e,r);if(e instanceof ArrayBuffer)return this.encode_buffer(e,r);throw new Error("Expected Array-like not ".concat(typeof e,"(").concat(e,") at ").concat(this.fieldPath.join(".")))},t.prototype.encode_arraylike=function(e,r){r.array.len?Vw(e.length,r.array.len,this.fieldPath):this.encoded.store_value(e.length,"u32");for(var n=0;n<e.length;n++)this.encode_value(e[n],r.array.type)},t.prototype.encode_buffer=function(e,r){r.array.len?Vw(e.byteLength,r.array.len,this.fieldPath):this.encoded.store_value(e.byteLength,"u32"),this.encoded.store_bytes(new Uint8Array(e))},t.prototype.encode_set=function(e,r){this.checkTypes&&pc(e,"object",this.fieldPath);var n=e instanceof Set,o=n?Array.from(e.values()):Object.values(e);this.encoded.store_value(o.length,"u32");for(var i=0,a=o;i<a.length;i++){var s=a[i];this.encode_value(s,r.set)}},t.prototype.encode_map=function(e,r){this.checkTypes&&pc(e,"object",this.fieldPath);var n=e instanceof Map,o=n?Array.from(e.keys()):Object.keys(e);this.encoded.store_value(o.length,"u32");for(var i=0,a=o;i<a.length;i++){var s=a[i];this.encode_value(s,r.map.key),this.encode_value(n?e.get(s):e[s],r.map.value)}},t.prototype.encode_struct=function(e,r){this.checkTypes&&pc(e,"object",this.fieldPath);for(var n=0,o=Object.keys(r.struct);n<o.length;n++){var i=o[n];this.fieldPath.push(i),this.encode_value(e[i],r.struct[i]),this.fieldPath.pop()}},t})()});var jX,h7=N(()=>{Tm();Ww();jX=(function(){function t(e){this.buffer=new i7(e)}return t.prototype.decode=function(e){return this.decode_value(e)},t.prototype.decode_value=function(e){if(typeof e=="string"){if(qf.includes(e))return this.decode_integer(e);if(e==="string")return this.decode_string();if(e==="bool")return this.decode_boolean()}if(typeof e=="object"){if("option"in e)return this.decode_option(e);if("enum"in e)return this.decode_enum(e);if("array"in e)return this.decode_array(e);if("set"in e)return this.decode_set(e);if("map"in e)return this.decode_map(e);if("struct"in e)return this.decode_struct(e)}throw new Error("Unsupported type: ".concat(e))},t.prototype.decode_integer=function(e){var r=parseInt(e.substring(1));return r<=32||e=="f64"?this.buffer.consume_value(e):this.decode_bigint(r,e.startsWith("i"))},t.prototype.decode_bigint=function(e,r){r===void 0&&(r=!1);var n=e/8,o=new Uint8Array(this.buffer.consume_bytes(n)),i=o.reduceRight(function(a,s){return a+s.toString(16).padStart(2,"0")},"");return r&&o[n-1]?BigInt.asIntN(e,BigInt("0x".concat(i))):BigInt("0x".concat(i))},t.prototype.decode_string=function(){for(var e=this.decode_integer("u32"),r=new Uint8Array(this.buffer.consume_bytes(e)),n=[],o=0;o<e;++o){var i=r[o];if(i<128)n.push(i);else if(i<224)n.push((i&31)<<6|r[++o]&63);else if(i<240)n.push((i&15)<<12|(r[++o]&63)<<6|r[++o]&63);else{var a=(i&7)<<18|(r[++o]&63)<<12|(r[++o]&63)<<6|r[++o]&63;n.push(a)}}return String.fromCodePoint.apply(String,n)},t.prototype.decode_boolean=function(){return this.buffer.consume_value("u8")>0},t.prototype.decode_option=function(e){var r=this.buffer.consume_value("u8");if(r===1)return this.decode_value(e.option);if(r!==0)throw new Error("Invalid option ".concat(r));return null},t.prototype.decode_enum=function(e){var r,n=this.buffer.consume_value("u8");if(n>e.enum.length)throw new Error("Enum option ".concat(n," is not available"));var o=e.enum[n].struct,i=Object.keys(o)[0];return r={},r[i]=this.decode_value(o[i]),r},t.prototype.decode_array=function(e){for(var r=[],n=e.array.len?e.array.len:this.decode_integer("u32"),o=0;o<n;++o)r.push(this.decode_value(e.array.type));return r},t.prototype.decode_set=function(e){for(var r=this.decode_integer("u32"),n=new Set,o=0;o<r;++o)n.add(this.decode_value(e.set));return n},t.prototype.decode_map=function(e){for(var r=this.decode_integer("u32"),n=new Map,o=0;o<r;++o){var i=this.decode_value(e.map.key),a=this.decode_value(e.map.value);n.set(i,a)}return n},t.prototype.decode_struct=function(e){var r={};for(var n in e.struct)r[n]=this.decode_value(e.struct[n]);return r},t})()});function Zw(t,e,r){r===void 0&&(r=!0),r&&ki(t);var n=new l7(r);return n.encode(e,t)}var m7=N(()=>{p7();h7();Yw()});var y7,b7=N(()=>{y7="1.2.3"});var Nt,Gf=N(()=>{b7();Nt=class t extends Error{constructor(e,r={}){let n=r.cause instanceof t?r.cause.details:r.cause?.message?r.cause.message:r.details,o=r.cause instanceof t&&r.cause.docsPath||r.docsPath,i=[e||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...o?[`Docs: https://abitype.dev${o}`]:[],...n?[`Details: ${n}`]:[],`Version: abitype@${y7}`].join(`
|
|
2
|
+
`);super(i),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),r.cause&&(this.cause=r.cause),this.details=n,this.docsPath=o,this.metaMessages=r.metaMessages,this.shortMessage=e}}});function ln(t,e){return t.exec(e)?.groups}var Jw,Xw,Bm,i0=N(()=>{Jw=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Xw=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,Bm=/^\(.+?\).*?$/});function Om(t){let e=t.type;if(g7.test(t.type)&&"components"in t){e="(";let r=t.components.length;for(let o=0;o<r;o++){let i=t.components[o];e+=Om(i),o<r-1&&(e+=", ")}let n=ln(g7,t.type);return e+=`)${n?.array||""}`,Om({...t,type:e})}return"indexed"in t&&t.indexed&&(e=`${e} indexed`),t.name?`${e} ${t.name}`:e}var g7,v7=N(()=>{i0();g7=/^tuple(?<array>(\[(\d*)\])*)$/});function Wf(t){let e="",r=t.length;for(let n=0;n<r;n++){let o=t[n];e+=Om(o),n!==r-1&&(e+=", ")}return e}var x7=N(()=>{v7()});function Qw(t){return t.type==="function"?`function ${t.name}(${Wf(t.inputs)})${t.stateMutability&&t.stateMutability!=="nonpayable"?` ${t.stateMutability}`:""}${t.outputs?.length?` returns (${Wf(t.outputs)})`:""}`:t.type==="event"?`event ${t.name}(${Wf(t.inputs)})`:t.type==="error"?`error ${t.name}(${Wf(t.inputs)})`:t.type==="constructor"?`constructor(${Wf(t.inputs)})${t.stateMutability==="payable"?" payable":""}`:t.type==="fallback"?`fallback() external${t.stateMutability==="payable"?" payable":""}`:"receive() external payable"}var w7=N(()=>{x7()});function A7(t){return E7.test(t)}function _7(t){return ln(E7,t)}function I7(t){return S7.test(t)}function T7(t){return ln(S7,t)}function O7(t){return B7.test(t)}function P7(t){return ln(B7,t)}function Pm(t){return R7.test(t)}function C7(t){return ln(R7,t)}function M7(t){return N7.test(t)}function k7(t){return ln(N7,t)}function F7(t){return $7.test(t)}function L7(t){return ln($7,t)}function j7(t){return UX.test(t)}var E7,S7,B7,R7,N7,$7,UX,U7,Rm,Cm=N(()=>{i0();E7=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;S7=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;B7=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;R7=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;N7=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;$7=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;UX=/^receive\(\) external payable$/;U7=new Set(["indexed"]),Rm=new Set(["calldata","memory","storage"])});var Nm,Mm,e6=N(()=>{Gf();Nm=class extends Nt{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}},Mm=class extends Nt{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}});var km,$m,Fm,Lm,jm,t6=N(()=>{Gf();km=class extends Nt{constructor({param:e}){super("Invalid ABI parameter.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}},$m=class extends Nt{constructor({param:e,name:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`"${r}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}},Fm=class extends Nt{constructor({param:e,type:r,modifier:n}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${n}" not allowed${r?` in "${r}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}},Lm=class extends Nt{constructor({param:e,type:r,modifier:n}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${n}" not allowed${r?` in "${r}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${n}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}},jm=class extends Nt{constructor({abiParameter:e}){super("Invalid ABI parameter.",{details:JSON.stringify(e,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}});var Uo,Um,Dm,r6=N(()=>{Gf();Uo=class extends Nt{constructor({signature:e,type:r}){super(`Invalid ${r} signature.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}},Um=class extends Nt{constructor({signature:e}){super("Unknown signature.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}},Dm=class extends Nt{constructor({signature:e}){super("Invalid struct signature.",{details:e,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}});var zm,D7=N(()=>{Gf();zm=class extends Nt{constructor({type:e}){super("Circular reference detected.",{metaMessages:[`Struct "${e}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}});var Km,z7=N(()=>{Gf();Km=class extends Nt{constructor({current:e,depth:r}){super("Unbalanced parentheses.",{metaMessages:[`"${e.trim()}" has too many ${r>0?"opening":"closing"} parentheses.`],details:`Depth "${r}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}});function K7(t,e,r){let n="";if(r)for(let o of Object.entries(r)){if(!o)continue;let i="";for(let a of o[1])i+=`[${a.type}${a.name?`:${a.name}`:""}]`;n+=`(${o[0]}{${i}})`}return e?`${e}:${t}${n}`:`${t}${n}`}var qm,q7=N(()=>{qm=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]])});function H7(t,e={}){if(O7(t))return DX(t,e);if(I7(t))return zX(t,e);if(A7(t))return KX(t,e);if(M7(t))return qX(t,e);if(F7(t))return HX(t);if(j7(t))return{type:"receive",stateMutability:"payable"};throw new Um({signature:t})}function DX(t,e={}){let r=P7(t);if(!r)throw new Uo({signature:t,type:"function"});let n=Zn(r.parameters),o=[],i=n.length;for(let s=0;s<i;s++)o.push(Ra(n[s],{modifiers:Rm,structs:e,type:"function"}));let a=[];if(r.returns){let s=Zn(r.returns),c=s.length;for(let u=0;u<c;u++)a.push(Ra(s[u],{modifiers:Rm,structs:e,type:"function"}))}return{name:r.name,type:"function",stateMutability:r.stateMutability??"nonpayable",inputs:o,outputs:a}}function zX(t,e={}){let r=T7(t);if(!r)throw new Uo({signature:t,type:"event"});let n=Zn(r.parameters),o=[],i=n.length;for(let a=0;a<i;a++)o.push(Ra(n[a],{modifiers:U7,structs:e,type:"event"}));return{name:r.name,type:"event",inputs:o}}function KX(t,e={}){let r=_7(t);if(!r)throw new Uo({signature:t,type:"error"});let n=Zn(r.parameters),o=[],i=n.length;for(let a=0;a<i;a++)o.push(Ra(n[a],{structs:e,type:"error"}));return{name:r.name,type:"error",inputs:o}}function qX(t,e={}){let r=k7(t);if(!r)throw new Uo({signature:t,type:"constructor"});let n=Zn(r.parameters),o=[],i=n.length;for(let a=0;a<i;a++)o.push(Ra(n[a],{structs:e,type:"constructor"}));return{type:"constructor",stateMutability:r.stateMutability??"nonpayable",inputs:o}}function HX(t){let e=L7(t);if(!e)throw new Uo({signature:t,type:"fallback"});return{type:"fallback",stateMutability:e.stateMutability??"nonpayable"}}function Ra(t,e){let r=K7(t,e?.type,e?.structs);if(qm.has(r))return qm.get(r);let n=Bm.test(t),o=ln(n?WX:GX,t);if(!o)throw new km({param:t});if(o.name&&ZX(o.name))throw new $m({param:t,name:o.name});let i=o.name?{name:o.name}:{},a=o.modifier==="indexed"?{indexed:!0}:{},s=e?.structs??{},c,u={};if(n){c="tuple";let l=Zn(o.type),h=[],m=l.length;for(let x=0;x<m;x++)h.push(Ra(l[x],{structs:s}));u={components:h}}else if(o.type in s)c="tuple",u={components:s[o.type]};else if(VX.test(o.type))c=`${o.type}256`;else if(o.type==="address payable")c="address";else if(c=o.type,e?.type!=="struct"&&!n6(c))throw new Mm({type:c});if(o.modifier){if(!e?.modifiers?.has?.(o.modifier))throw new Fm({param:t,type:e?.type,modifier:o.modifier});if(Rm.has(o.modifier)&&!JX(c,!!o.array))throw new Lm({param:t,type:e?.type,modifier:o.modifier})}let f={type:`${c}${o.array??""}`,...i,...a,...u};return qm.set(r,f),f}function Zn(t,e=[],r="",n=0){let o=t.trim().length;for(let i=0;i<o;i++){let a=t[i],s=t.slice(i+1);switch(a){case",":return n===0?Zn(s,[...e,r.trim()]):Zn(s,e,`${r}${a}`,n);case"(":return Zn(s,e,`${r}${a}`,n+1);case")":return Zn(s,e,`${r}${a}`,n-1);default:return Zn(s,e,`${r}${a}`,n)}}if(r==="")return e;if(n!==0)throw new Km({current:r,depth:n});return e.push(r.trim()),e}function n6(t){return t==="address"||t==="bool"||t==="function"||t==="string"||Jw.test(t)||Xw.test(t)}function ZX(t){return t==="address"||t==="bool"||t==="function"||t==="string"||t==="tuple"||Jw.test(t)||Xw.test(t)||YX.test(t)}function JX(t,e){return e||t==="bytes"||t==="string"||t==="tuple"}var GX,WX,VX,YX,o6=N(()=>{i0();e6();t6();r6();z7();q7();Cm();GX=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,WX=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,VX=/^u?int$/;YX=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/});function G7(t){let e={},r=t.length;for(let a=0;a<r;a++){let s=t[a];if(!Pm(s))continue;let c=C7(s);if(!c)throw new Uo({signature:s,type:"struct"});let u=c.properties.split(";"),f=[],l=u.length;for(let h=0;h<l;h++){let x=u[h].trim();if(!x)continue;let S=Ra(x,{type:"struct"});f.push(S)}if(!f.length)throw new Dm({signature:s});e[c.name]=f}let n={},o=Object.entries(e),i=o.length;for(let a=0;a<i;a++){let[s,c]=o[a];n[s]=W7(c,e)}return n}function W7(t=[],e={},r=new Set){let n=[],o=t.length;for(let i=0;i<o;i++){let a=t[i];if(Bm.test(a.type))n.push(a);else{let c=ln(XX,a.type);if(!c?.type)throw new jm({abiParameter:a});let{array:u,type:f}=c;if(f in e){if(r.has(f))throw new zm({type:f});n.push({...a,type:`tuple${u??""}`,components:W7(e[f],e,new Set([...r,f]))})}else if(n6(f))n.push(a);else throw new Nm({type:f})}}return n}var XX,V7=N(()=>{i0();e6();t6();r6();D7();Cm();o6();XX=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/});function Hm(t){let e=G7(t),r=[],n=t.length;for(let o=0;o<n;o++){let i=t[o];Pm(i)||r.push(H7(i,e))}return r}var Y7=N(()=>{Cm();V7();o6()});var i6=N(()=>{w7();Y7()});function oe(t,e,r){let n=t[e.name];if(typeof n=="function")return n;let o=t[r];return typeof o=="function"?o:i=>e(t,i)}var cr=N(()=>{});function Xt(t,{includeName:e=!1}={}){if(t.type!=="function"&&t.type!=="event"&&t.type!=="error")throw new Gm(t.type);return`${t.name}(${a0(t.inputs,{includeName:e})})`}function a0(t,{includeName:e=!1}={}){return t?t.map(r=>QX(r,{includeName:e})).join(e?", ":","):""}function QX(t,{includeName:e}){return t.type.startsWith("tuple")?`(${a0(t.components,{includeName:e})})${t.type.slice(5)}`:t.type+(e&&t.name?` ${t.name}`:"")}var Ca=N(()=>{fr()});function Qt(t,{strict:e=!0}={}){return!t||typeof t!="string"?!1:e?/^0x[0-9a-fA-F]*$/.test(t):t.startsWith("0x")}var $i=N(()=>{});function he(t){return Qt(t,{strict:!1})?Math.ceil((t.length-2)/2):t.length}var Jn=N(()=>{$i()});var a6,Z7=N(()=>{a6="2.57.10"});function J7(t,e){return e?.(t)?t:t&&typeof t=="object"&&"cause"in t&&t.cause!==void 0?J7(t.cause,e):e?null:t}var s6,K,de=N(()=>{Z7();s6={getDocsUrl:({docsBaseUrl:t,docsPath:e="",docsSlug:r})=>e?`${t??"https://viem.sh"}${e}${r?`#${r}`:""}`:void 0,version:`viem@${a6}`},K=class t extends Error{constructor(e,r={}){let n=r.cause instanceof t?r.cause.details:r.cause?.message?r.cause.message:r.details,o=r.cause instanceof t&&r.cause.docsPath||r.docsPath,i=s6.getDocsUrl?.({...r,docsPath:o}),a=[e||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...i?[`Docs: ${i}`]:[],...n?[`Details: ${n}`]:[],...s6.version?[`Version: ${s6.version}`]:[]].join(`
|
|
3
|
+
`);super(a,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=n,this.docsPath=o,this.metaMessages=r.metaMessages,this.name=r.name??this.name,this.shortMessage=e,this.version=a6}walk(e){return J7(this,e)}}});var Wm,s0,Vf,Na,Vm,Ym,Zm,Jm,c0,Yf,Xm,Qm,Xn,Zf,ey,ty,ry,f0,ny,oy,iy,Jf,Gm,fr=N(()=>{Ca();Jn();de();Wm=class extends K{constructor({docsPath:e}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(`
|
|
4
|
+
`),{docsPath:e,name:"AbiConstructorNotFoundError"})}},s0=class extends K{constructor({docsPath:e}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(`
|
|
5
|
+
`),{docsPath:e,name:"AbiConstructorParamsNotFoundError"})}},Vf=class extends K{constructor({data:e,params:r,size:n}){super([`Data size of ${n} bytes is too small for given parameters.`].join(`
|
|
6
|
+
`),{metaMessages:[`Params: (${a0(r,{includeName:!0})})`,`Data: ${e} (${n} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=r,this.size=n}},Na=class extends K{constructor({cause:e}={}){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError",cause:e})}},Vm=class extends K{constructor({expectedLength:e,givenLength:r,type:n}){super([`ABI encoding array length mismatch for type ${n}.`,`Expected length: ${e}`,`Given length: ${r}`].join(`
|
|
7
|
+
`),{name:"AbiEncodingArrayLengthMismatchError"})}},Ym=class extends K{constructor({expectedSize:e,value:r}){super(`Size of bytes "${r}" (bytes${he(r)}) does not match expected size (bytes${e}).`,{name:"AbiEncodingBytesSizeMismatchError"})}},Zm=class extends K{constructor({expectedLength:e,givenLength:r}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${e}`,`Given length (values): ${r}`].join(`
|
|
8
|
+
`),{name:"AbiEncodingLengthMismatchError"})}},Jm=class extends K{constructor(e,{docsPath:r}){super([`Arguments (\`args\`) were provided to "${e}", but "${e}" on the ABI does not contain any parameters (\`inputs\`).`,"Cannot encode error result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the inputs exist on it."].join(`
|
|
9
|
+
`),{docsPath:r,name:"AbiErrorInputsNotFoundError"})}},c0=class extends K{constructor(e,{docsPath:r}={}){super([`Error ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it."].join(`
|
|
10
|
+
`),{docsPath:r,name:"AbiErrorNotFoundError"})}},Yf=class extends K{constructor(e,{docsPath:r,cause:n}){super([`Encoded error signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${e}.`].join(`
|
|
11
|
+
`),{docsPath:r,name:"AbiErrorSignatureNotFoundError",cause:n}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}},Xm=class extends K{constructor({docsPath:e}){super("Cannot extract event signature from empty topics.",{docsPath:e,name:"AbiEventSignatureEmptyTopicsError"})}},Qm=class extends K{constructor(e,{docsPath:r}){super([`Encoded event signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://4byte.sourcify.dev/?q=${e}.`].join(`
|
|
12
|
+
`),{docsPath:r,name:"AbiEventSignatureNotFoundError"})}},Xn=class extends K{constructor(e,{docsPath:r}={}){super([`Function ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(`
|
|
13
|
+
`),{docsPath:r,name:"AbiFunctionNotFoundError"})}},Zf=class extends K{constructor(e,{docsPath:r}){super([`Function "${e}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(`
|
|
14
|
+
`),{docsPath:r,name:"AbiFunctionOutputsNotFoundError"})}},ey=class extends K{constructor(e,{docsPath:r}){super([`Encoded function signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it.",`You can look up the signature here: https://4byte.sourcify.dev/?q=${e}.`].join(`
|
|
15
|
+
`),{docsPath:r,name:"AbiFunctionSignatureNotFoundError"})}},ty=class extends K{constructor(e,r){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${e.type}\` in \`${Xt(e.abiItem)}\`, and`,`\`${r.type}\` in \`${Xt(r.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}},ry=class extends K{constructor({expectedSize:e,givenSize:r}){super(`Expected bytes${e}, got bytes${r}.`,{name:"BytesSizeMismatchError"})}},f0=class extends K{constructor({abiItem:e,data:r,params:n,size:o}){super([`Data size of ${o} bytes is too small for non-indexed event parameters.`].join(`
|
|
16
|
+
`),{metaMessages:[`Params: (${a0(n,{includeName:!0})})`,`Data: ${r} (${o} bytes)`],name:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e,this.data=r,this.params=n,this.size=o}},ny=class extends K{constructor({abiItem:e,param:r}){super([`Expected a topic for indexed event parameter${r.name?` "${r.name}"`:""} on event "${Xt(e,{includeName:!0})}".`].join(`
|
|
17
|
+
`),{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}},oy=class extends K{constructor(e,{docsPath:r}){super([`Type "${e}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(`
|
|
18
|
+
`),{docsPath:r,name:"InvalidAbiEncodingType"})}},iy=class extends K{constructor(e,{docsPath:r}){super([`Type "${e}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(`
|
|
19
|
+
`),{docsPath:r,name:"InvalidAbiDecodingType"})}},Jf=class extends K{constructor(e){super([`Value "${e}" is not a valid array.`].join(`
|
|
20
|
+
`),{name:"InvalidArrayError"})}},Gm=class extends K{constructor(e){super([`"${e}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
|
|
21
|
+
`),{name:"InvalidDefinitionTypeError"})}}});var u0,d0,l0,ay=N(()=>{de();u0=class extends K{constructor({offset:e,position:r,size:n}){super(`Slice ${r==="start"?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${n}).`,{name:"SliceOffsetOutOfBoundsError"})}},d0=class extends K{constructor({size:e,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${r}).`,{name:"SizeExceedsPaddingSizeError"})}},l0=class extends K{constructor({size:e,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} is expected to be ${r} ${n} long, but is ${e} ${n} long.`,{name:"InvalidBytesLengthError"})}}});function Ma(t,{dir:e,size:r=32}={}){return typeof t=="string"?Fi(t,{dir:e,size:r}):eQ(t,{dir:e,size:r})}function Fi(t,{dir:e,size:r=32}={}){if(r===null)return t;let n=t.replace("0x","");if(n.length>r*2)throw new d0({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n[e==="right"?"padEnd":"padStart"](r*2,"0")}`}function eQ(t,{dir:e,size:r=32}={}){if(r===null)return t;if(t.length>r)throw new d0({size:t.length,targetSize:r,type:"bytes"});let n=new Uint8Array(r);for(let o=0;o<r;o++){let i=e==="right";n[i?o:r-o-1]=t[i?o:t.length-o-1]}return n}var sy=N(()=>{ay()});var ka,cy,fy,p0=N(()=>{de();ka=class extends K{constructor({max:e,min:r,signed:n,size:o,value:i}){super(`Number "${i}" is not in safe ${o?`${o*8}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${r} to ${e})`:`(above ${r})`}`,{name:"IntegerOutOfRangeError"})}},cy=class extends K{constructor(e){super(`Bytes value "${e}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}},fy=class extends K{constructor({givenSize:e,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}});function Do(t,{dir:e="left"}={}){let r=typeof t=="string"?t.replace("0x",""):t,n=0;for(let o=0;o<r.length-1&&r[e==="left"?o:r.length-o-1].toString()==="0";o++)n++;return r=e==="left"?r.slice(n):r.slice(0,r.length-n),typeof t=="string"?(r.length===1&&e==="right"&&(r=`${r}0`),`0x${r.length%2===1?`0${r}`:r}`):r}var uy=N(()=>{});function pn(t,{size:e}){if(he(t)>e)throw new fy({givenSize:he(t),maxSize:e})}function Xe(t,e={}){let{signed:r}=e;e.size&&pn(t,{size:e.size});let n=BigInt(t);if(!r)return n;let o=Math.ceil((t.length-2)/2),i=(1n<<BigInt(o)*8n-1n)-1n;return n<=i?n:n-BigInt(`0x${"f".padStart(o*2,"f")}`)-1n}function Ot(t,e={}){let r=Xe(t,e),n=Number(r);if(!Number.isSafeInteger(n))throw new ka({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:e.signed,size:e.size,value:`${r}n`});return n}var xr=N(()=>{p0();Jn()});function ur(t,e={}){return typeof t=="number"||typeof t=="bigint"?Z(t,e):typeof t=="string"?h0(t,e):typeof t=="boolean"?c6(t,e):He(t,e)}function c6(t,e={}){let r=`0x${Number(t)}`;return typeof e.size=="number"?(pn(r,{size:e.size}),Ma(r,{size:e.size})):r}function He(t,e={}){let r="";for(let o=0;o<t.length;o++)r+=tQ[t[o]];let n=`0x${r}`;return typeof e.size=="number"?(pn(n,{size:e.size}),Ma(n,{dir:"right",size:e.size})):n}function Z(t,e={}){let{signed:r,size:n}=e,o=BigInt(t),i;n?r?i=(1n<<BigInt(n)*8n-1n)-1n:i=2n**(BigInt(n)*8n)-1n:typeof t=="number"&&(i=BigInt(Number.MAX_SAFE_INTEGER));let a=typeof i=="bigint"&&r?-i-1n:0;if(i&&o>i||o<a){let c=typeof t=="bigint"?"n":"";throw new ka({max:i?`${i}${c}`:void 0,min:`${a}${c}`,signed:r,size:n,value:`${t}${c}`})}let s=`0x${(r&&o<0?(1n<<BigInt(n*8))+BigInt(o):o).toString(16)}`;return n?Ma(s,{size:n}):s}function h0(t,e={}){let r=rQ.encode(t);return He(r,e)}var tQ,rQ,we=N(()=>{p0();sy();xr();tQ=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));rQ=new TextEncoder});function $a(t,e={}){return typeof t=="number"||typeof t=="bigint"?iQ(t,e):typeof t=="boolean"?oQ(t,e):Qt(t)?wr(t,e):m0(t,e)}function oQ(t,e={}){let r=new Uint8Array(1);return r[0]=Number(t),typeof e.size=="number"?(pn(r,{size:e.size}),Ma(r,{size:e.size})):r}function X7(t){if(t>=Li.zero&&t<=Li.nine)return t-Li.zero;if(t>=Li.A&&t<=Li.F)return t-(Li.A-10);if(t>=Li.a&&t<=Li.f)return t-(Li.a-10)}function wr(t,e={}){let r=t;e.size&&(pn(r,{size:e.size}),r=Ma(r,{dir:"right",size:e.size}));let n=r.slice(2);n.length%2&&(n=`0${n}`);let o=n.length/2,i=new Uint8Array(o);for(let a=0,s=0;a<o;a++){let c=X7(n.charCodeAt(s++)),u=X7(n.charCodeAt(s++));if(c===void 0||u===void 0)throw new K(`Invalid byte sequence ("${n[s-2]}${n[s-1]}" in "${n}").`);i[a]=c*16+u}return i}function iQ(t,e){let r=Z(t,e);return wr(r)}function m0(t,e={}){let r=nQ.encode(t);return typeof e.size=="number"?(pn(r,{size:e.size}),Ma(r,{dir:"right",size:e.size})):r}var nQ,Li,Rn=N(()=>{de();$i();sy();xr();we();nQ=new TextEncoder;Li={zero:48,nine:57,A:65,F:70,a:97,f:102}});function aQ(t,e=!1){return e?{h:Number(t&dy),l:Number(t>>Q7&dy)}:{h:Number(t>>Q7&dy)|0,l:Number(t&dy)|0}}function eB(t,e=!1){let r=t.length,n=new Uint32Array(r),o=new Uint32Array(r);for(let i=0;i<r;i++){let{h:a,l:s}=aQ(t[i],e);[n[i],o[i]]=[a,s]}return[n,o]}var dy,Q7,tB,rB,nB,oB,iB=N(()=>{dy=BigInt(4294967295),Q7=BigInt(32);tB=(t,e,r)=>t<<r|e>>>32-r,rB=(t,e,r)=>e<<r|t>>>32-r,nB=(t,e,r)=>e<<r-32|t>>>64-r,oB=(t,e,r)=>t<<r-32|e>>>64-r});var hc,aB=N(()=>{hc=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0});function sQ(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function mc(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function zo(t,...e){if(!sQ(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function sB(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");mc(t.outputLen),mc(t.blockLen)}function ji(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function ly(t,e){zo(t);let r=e.outputLen;if(t.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function cB(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function Ko(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function py(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Qn(t,e){return t<<32-e|t>>>e}function fQ(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}function uQ(t){for(let e=0;e<t.length;e++)t[e]=fQ(t[e]);return t}function dQ(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}function yc(t){return typeof t=="string"&&(t=dQ(t)),zo(t),t}function fB(...t){let e=0;for(let n=0;n<t.length;n++){let o=t[n];zo(o),e+=o.length}let r=new Uint8Array(e);for(let n=0,o=0;n<t.length;n++){let i=t[n];r.set(i,o),o+=i.length}return r}function hy(t){let e=n=>t().update(yc(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function La(t=32){if(hc&&typeof hc.getRandomValues=="function")return hc.getRandomValues(new Uint8Array(t));if(hc&&typeof hc.randomBytes=="function")return Uint8Array.from(hc.randomBytes(t));throw new Error("crypto.getRandomValues must be defined")}var cQ,f6,Fa,qo=N(()=>{aB();cQ=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;f6=cQ?t=>t:uQ;Fa=class{}});function vQ(t,e=24){let r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let a=0;a<10;a++)r[a]=t[a]^t[a+10]^t[a+20]^t[a+30]^t[a+40];for(let a=0;a<10;a+=2){let s=(a+8)%10,c=(a+2)%10,u=r[c],f=r[c+1],l=uB(u,f,1)^r[s],h=dB(u,f,1)^r[s+1];for(let m=0;m<50;m+=10)t[a+m]^=l,t[a+m+1]^=h}let o=t[2],i=t[3];for(let a=0;a<24;a++){let s=pB[a],c=uB(o,i,s),u=dB(o,i,s),f=lB[a];o=t[f],i=t[f+1],t[f]=c,t[f+1]=u}for(let a=0;a<50;a+=10){for(let s=0;s<10;s++)r[s]=t[a+s];for(let s=0;s<10;s++)t[a+s]^=~r[(s+2)%10]&r[(s+4)%10]}t[0]^=bQ[n],t[1]^=gQ[n]}Ko(r)}var lQ,y0,pQ,hQ,mQ,yQ,lB,pB,hB,mB,bQ,gQ,uB,dB,u6,xQ,yB,bB=N(()=>{iB();qo();lQ=BigInt(0),y0=BigInt(1),pQ=BigInt(2),hQ=BigInt(7),mQ=BigInt(256),yQ=BigInt(113),lB=[],pB=[],hB=[];for(let t=0,e=y0,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],lB.push(2*(5*n+r)),pB.push((t+1)*(t+2)/2%64);let o=lQ;for(let i=0;i<7;i++)e=(e<<y0^(e>>hQ)*yQ)%mQ,e&pQ&&(o^=y0<<(y0<<BigInt(i))-y0);hB.push(o)}mB=eB(hB,!0),bQ=mB[0],gQ=mB[1],uB=(t,e,r)=>r>32?nB(t,e,r):tB(t,e,r),dB=(t,e,r)=>r>32?oB(t,e,r):rB(t,e,r);u6=class t extends Fa{constructor(e,r,n,o=!1,i=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=o,this.rounds=i,mc(n),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=cB(this.state)}clone(){return this._cloneInto()}keccak(){f6(this.state32),vQ(this.state32,this.rounds),f6(this.state32),this.posOut=0,this.pos=0}update(e){ji(this),e=yc(e),zo(e);let{blockLen:r,state:n}=this,o=e.length;for(let i=0;i<o;){let a=Math.min(r-this.pos,o-i);for(let s=0;s<a;s++)n[this.pos++]^=e[i++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:r,pos:n,blockLen:o}=this;e[n]^=r,(r&128)!==0&&n===o-1&&this.keccak(),e[o-1]^=128,this.keccak()}writeInto(e){ji(this,!1),zo(e),this.finish();let r=this.state,{blockLen:n}=this;for(let o=0,i=e.length;o<i;){this.posOut>=n&&this.keccak();let a=Math.min(n-this.posOut,i-o);e.set(r.subarray(this.posOut,this.posOut+a),o),this.posOut+=a,o+=a}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return mc(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(ly(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,Ko(this.state)}_cloneInto(e){let{blockLen:r,suffix:n,outputLen:o,rounds:i,enableXOF:a}=this;return e||(e=new t(r,n,o,a,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=o,e.enableXOF=a,e.destroyed=this.destroyed,e}},xQ=(t,e,r)=>hy(()=>new u6(e,t,r)),yB=xQ(1,136,256/8)});function eo(t,e){let r=e||"hex",n=yB(Qt(t,{strict:!1})?$a(t):t);return r==="bytes"?n:ur(n)}var Xf=N(()=>{bB();$i();Rn();we()});function gB(t){return wQ(t)}var wQ,vB=N(()=>{Rn();Xf();wQ=t=>eo($a(t))});function xB(t){let e=!0,r="",n=0,o="",i=!1;for(let a=0;a<t.length;a++){let s=t[a];if(["(",")",","].includes(s)&&(e=!0),s==="("&&n++,s===")"&&n--,!!e){if(n===0){if(s===" "&&["event","function",""].includes(o))o="";else if(o+=s,s===")"){i=!0;break}continue}if(s===" "){!r.endsWith(",")&&!r.endsWith("(")&&(r="",e=!1);continue}o+=s,r+=s}}if(!i)throw new K("Unable to normalize signature.");return o}var wB=N(()=>{de()});var EB,AB=N(()=>{i6();wB();EB=t=>{let e=typeof t=="string"?t:Qw(t);return xB(e)}});function my(t){return gB(EB(t))}var d6=N(()=>{vB();AB()});var Qf,yy=N(()=>{d6();Qf=my});var De,Ho=N(()=>{de();De=class extends K{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}});var Nr,bc=N(()=>{Nr=class extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){let r=super.get(e);return super.has(e)&&(super.delete(e),super.set(e,r)),r}set(e,r){if(super.has(e)&&super.delete(e),super.set(e,r),this.maxSize&&this.size>this.maxSize){let n=super.keys().next().value;n!==void 0&&super.delete(n)}return this}}});function Ui(t,e){if(l6.has(`${t}.${e}`))return l6.get(`${t}.${e}`);let r=e?`${e}${t.toLowerCase()}`:t.substring(2).toLowerCase(),n=eo(m0(r),"bytes"),o=(e?r.substring(`${e}0x`.length):r).split("");for(let a=0;a<40;a+=2)n[a>>1]>>4>=8&&o[a]&&(o[a]=o[a].toUpperCase()),(n[a>>1]&15)>=8&&o[a+1]&&(o[a+1]=o[a+1].toUpperCase());let i=`0x${o.join("")}`;return l6.set(`${t}.${e}`,i),i}function _B(t,e){if(!ge(t,{strict:!1}))throw new De({address:t});return Ui(t,e)}var l6,eu=N(()=>{Ho();Rn();Xf();bc();Cn();l6=new Nr(8192)});function ge(t,e){let{strict:r=!0}=e??{},n=`${t}.${r}`;if(p6.has(n))return p6.get(n);let o=EQ.test(t)?t.toLowerCase()===t?!0:r?Ui(t)===t:!0:!1;return p6.set(n,o),o}var EQ,p6,Cn=N(()=>{bc();eu();EQ=/^0x[a-fA-F0-9]{40}$/,p6=new Nr(8192)});function to(t){return typeof t[0]=="string"?Ze(t):AQ(t)}function AQ(t){let e=0;for(let o of t)e+=o.length;let r=new Uint8Array(e),n=0;for(let o of t)r.set(o,n),n+=o.length;return r}function Ze(t){return`0x${t.reduce((e,r)=>e+r.replace("0x",""),"")}`}var Nn=N(()=>{});function Mn(t,e,r,{strict:n}={}){return Qt(t,{strict:!1})?by(t,e,r,{strict:n}):h6(t,e,r,{strict:n})}function SB(t,e){if(typeof e=="number"&&e>0&&e>he(t)-1)throw new u0({offset:e,position:"start",size:he(t)})}function IB(t,e,r){if(typeof e=="number"&&typeof r=="number"&&he(t)!==r-e)throw new u0({offset:r,position:"end",size:he(t)})}function h6(t,e,r,{strict:n}={}){SB(t,e);let o=t.slice(e,r);return n&&IB(o,e,r),o}function by(t,e,r,{strict:n}={}){SB(t,e);let o=`0x${t.replace("0x","").slice((e??0)*2,(r??t.length)*2)}`;return n&&IB(o,e,r),o}var ja=N(()=>{ay();$i();Jn()});var TB,gy,m6=N(()=>{TB=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,gy=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/});function Go(t,e){if(t.length!==e.length)throw new Zm({expectedLength:t.length,givenLength:e.length});let r=_Q({params:t,values:e});return g6(r)}function _Q({params:t,values:e}){let r=[];for(let n=0;n<t.length;n++)r.push(b6({param:t[n],value:e[n]}));return r}function b6({param:t,value:e}){let r=b0(t.type);if(r){let[n,o]=r;return IQ(e,{length:n,param:{...t,type:o}})}if(t.type==="tuple")return RQ(e,{param:t});if(t.type==="address")return SQ(e);if(t.type==="bool")return BQ(e);if(t.type.startsWith("uint")||t.type.startsWith("int")){let n=t.type.startsWith("int"),[,,o="256"]=gy.exec(t.type)??[];return OQ(e,{signed:n,size:Number(o)})}if(t.type.startsWith("bytes"))return TQ(e,{param:t});if(t.type==="string")return PQ(e);throw new oy(t.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function g6(t){let e=0;for(let i=0;i<t.length;i++){let{dynamic:a,encoded:s}=t[i];a?e+=32:e+=he(s)}let r=[],n=[],o=0;for(let i=0;i<t.length;i++){let{dynamic:a,encoded:s}=t[i];a?(r.push(Z(e+o,{size:32})),n.push(s),o+=he(s)):r.push(s)}return Ze([...r,...n])}function SQ(t){if(!ge(t))throw new De({address:t});return{dynamic:!1,encoded:Fi(t.toLowerCase())}}function IQ(t,{length:e,param:r}){let n=e===null;if(!Array.isArray(t))throw new Jf(t);if(!n&&t.length!==e)throw new Vm({expectedLength:e,givenLength:t.length,type:`${r.type}[${e}]`});let o=t.length===0&&y6(r),i=[];for(let a=0;a<t.length;a++){let s=b6({param:r,value:t[a]});s.dynamic&&(o=!0),i.push(s)}if(n||o){let a=g6(i);if(n){let s=Z(i.length,{size:32});return{dynamic:!0,encoded:Ze([s,a])}}if(o)return{dynamic:!0,encoded:a}}return{dynamic:!1,encoded:Ze(i.map(({encoded:a})=>a))}}function TQ(t,{param:e}){let[,r]=e.type.split("bytes"),n=he(t);if(!r){let o=t;return n%32!==0&&(o=Fi(o,{dir:"right",size:Math.ceil((t.length-2)/2/32)*32})),{dynamic:!0,encoded:Ze([Fi(Z(n,{size:32})),o])}}if(n!==Number.parseInt(r,10))throw new Ym({expectedSize:Number.parseInt(r,10),value:t});return{dynamic:!1,encoded:Fi(t,{dir:"right"})}}function BQ(t){if(typeof t!="boolean")throw new K(`Invalid boolean value: "${t}" (type: ${typeof t}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:Fi(c6(t))}}function OQ(t,{signed:e,size:r=256}){if(typeof r=="number"){let n=2n**(BigInt(r)-(e?1n:0n))-1n,o=e?-n-1n:0n;if(t>n||t<o)throw new ka({max:n.toString(),min:o.toString(),signed:e,size:r/8,value:t.toString()})}return{dynamic:!1,encoded:Z(t,{size:32,signed:e})}}function PQ(t){let e=h0(t),r=Math.ceil(he(e)/32),n=[];for(let o=0;o<r;o++)n.push(Fi(Mn(e,o*32,(o+1)*32),{dir:"right"}));return{dynamic:!0,encoded:Ze([Fi(Z(he(e),{size:32})),...n])}}function RQ(t,{param:e}){let r=!1,n=[];for(let o=0;o<e.components.length;o++){let i=e.components[o],a=Array.isArray(t)?o:i.name,s=b6({param:i,value:t[a]});n.push(s),s.dynamic&&(r=!0)}return{dynamic:r,encoded:r?g6(n):Ze(n.map(({encoded:o})=>o))}}function b0(t){let e=t.match(/^(.*)\[(\d+)?\]$/);return e?[e[2]?Number(e[2]):null,e[1]]:void 0}function y6(t){let{type:e}=t;if(e==="string"||e==="bytes"||e.endsWith("[]"))return!0;if(e==="tuple")return t.components.some(y6);let r=b0(e);return r?y6({...t,type:r[1]}):!1}var gc=N(()=>{fr();Ho();de();p0();Cn();Nn();sy();Jn();ja();we();m6()});var Wo,tu=N(()=>{ja();d6();Wo=t=>Mn(my(t),0,4)});function Vo(t){let{abi:e,args:r=[],name:n}=t,o=Qt(n,{strict:!1}),i=e.filter(s=>o?s.type==="function"?Wo(s)===n:s.type==="event"?Qf(s)===n:!1:"name"in s&&s.name===n);if(i.length===0)return;if(i.length===1)return i[0];let a;for(let s of i){if(!("inputs"in s))continue;if(!r||r.length===0){if(!s.inputs||s.inputs.length===0)return s;continue}if(!s.inputs||s.inputs.length===0||s.inputs.length!==r.length)continue;if(r.every((u,f)=>{let l="inputs"in s&&s.inputs[f];return l?v6(u,l):!1})){if(a&&"inputs"in a&&a.inputs){let u=BB(s.inputs,a.inputs,r);if(u)throw new ty({abiItem:s,type:u[0]},{abiItem:a,type:u[1]})}a=s}}return a||i[0]}function v6(t,e){let r=typeof t,n=e.type;switch(n){case"address":return ge(t,{strict:!1});case"bool":return r==="boolean";case"function":return r==="string";case"string":return r==="string";default:return n==="tuple"&&"components"in e?Object.values(e.components).every((o,i)=>r==="object"&&v6(Object.values(t)[i],o)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(n)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n)?r==="string"||t instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(n)?Array.isArray(t)&&t.every(o=>v6(o,{...e,type:n.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function BB(t,e,r){for(let n in t){let o=t[n],i=e[n];if(o.type==="tuple"&&i.type==="tuple"&&"components"in o&&"components"in i)return BB(o.components,i.components,r[n]);let a=[o.type,i.type];if(a.includes("address")&&a.includes("bytes20")?!0:a.includes("address")&&a.includes("string")?ge(r[n],{strict:!1}):a.includes("address")&&a.includes("bytes")?ge(r[n],{strict:!1}):!1)return a}}var ru=N(()=>{fr();$i();Cn();yy();tu()});function ce(t){return typeof t=="string"?{address:t,type:"json-rpc"}:t}var Pt=N(()=>{});function PB(t){let{abi:e,args:r,functionName:n}=t,o=e[0];if(n){let i=Vo({abi:e,args:r,name:n});if(!i)throw new Xn(n,{docsPath:OB});o=i}if(o.type!=="function")throw new Xn(void 0,{docsPath:OB});return{abi:[o],functionName:Wo(Xt(o))}}var OB,RB=N(()=>{fr();tu();Ca();ru();OB="/docs/contract/encodeFunctionData"});function hn(t){let{args:e}=t,{abi:r,functionName:n}=t.abi.length===1&&t.functionName?.startsWith("0x")?t:PB(t),o=r[0],i=n,a="inputs"in o&&o.inputs?Go(o.inputs,e??[]):void 0;return Ze([i,a??"0x"])}var vc=N(()=>{Nn();gc();RB()});var CB,vy,NB,xy=N(()=>{CB={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},vy={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},NB={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}});var g0,nu,wy,x6=N(()=>{de();g0=class extends K{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`,{name:"NegativeOffsetError"})}},nu=class extends K{constructor({length:e,position:r}){super(`Position \`${r}\` is out of bounds (\`0 < position < ${e}\`).`,{name:"PositionOutOfBoundsError"})}},wy=class extends K{constructor({count:e,limit:r}){super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${e}\`).`,{name:"RecursiveReadLimitExceededError"})}}});function ou(t,{recursiveReadLimit:e=8192}={}){let r=Object.create(CQ);return r.bytes=t,r.dataView=new DataView(t.buffer??t,t.byteOffset,t.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=e,r}var CQ,Ey=N(()=>{x6();CQ={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new wy({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(t){if(t<0||t>this.bytes.length-1)throw new nu({length:this.bytes.length,position:t})},decrementPosition(t){if(t<0)throw new g0({offset:t});let e=this.position-t;this.assertPosition(e),this.position=e},getReadCount(t){return this.positionReadCount.get(t||this.position)||0},incrementPosition(t){if(t<0)throw new g0({offset:t});let e=this.position+t;this.assertPosition(e),this.position=e},inspectByte(t){let e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectBytes(t,e){let r=e??this.position;return this.assertPosition(r+t-1),this.bytes.subarray(r,r+t)},inspectUint8(t){let e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectUint16(t){let e=t??this.position;return this.assertPosition(e+1),this.dataView.getUint16(e)},inspectUint24(t){let e=t??this.position;return this.assertPosition(e+2),(this.dataView.getUint16(e)<<8)+this.dataView.getUint8(e+2)},inspectUint32(t){let e=t??this.position;return this.assertPosition(e+3),this.dataView.getUint32(e)},pushByte(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushBytes(t){this.assertPosition(this.position+t.length-1),this.bytes.set(t,this.position),this.position+=t.length},pushUint8(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushUint16(t){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,t),this.position+=2},pushUint24(t){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,t>>8),this.dataView.setUint8(this.position+2,t&255),this.position+=3},pushUint32(t){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,t),this.position+=4},readByte(){this.assertReadLimit(),this._touch();let t=this.inspectByte();return this.position++,t},readBytes(t,e){this.assertReadLimit(),this._touch();let r=this.inspectBytes(t);return this.position+=e??t,r},readUint8(){this.assertReadLimit(),this._touch();let t=this.inspectUint8();return this.position+=1,t},readUint16(){this.assertReadLimit(),this._touch();let t=this.inspectUint16();return this.position+=2,t},readUint24(){this.assertReadLimit(),this._touch();let t=this.inspectUint24();return this.position+=3,t},readUint32(){this.assertReadLimit(),this._touch();let t=this.inspectUint32();return this.position+=4,t},get remaining(){return this.bytes.length-this.position},setPosition(t){let e=this.position;return this.assertPosition(t),this.position=t,()=>this.position=e},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let t=this.getReadCount();this.positionReadCount.set(this.position,t+1),t>0&&this.recursiveReadCount++}}});function MB(t,e={}){typeof e.size<"u"&&pn(t,{size:e.size});let r=He(t);return Xe(r,e)}function kB(t,e={}){let r=t;if(typeof e.size<"u"&&(pn(r,{size:e.size}),r=Do(r)),r.length>1||r[0]>1)throw new cy(r);return!!r[0]}function Yo(t,e={}){typeof e.size<"u"&&pn(t,{size:e.size});let r=He(t);return Ot(r,e)}function $B(t,e={}){let r=t;return typeof e.size<"u"&&(pn(r,{size:e.size}),r=Do(r,{dir:"right"})),new TextDecoder().decode(r)}var FB=N(()=>{p0();uy();xr();we()});function Di(t,e){let r=typeof e=="string"?wr(e):e,n=ou(r);if(he(r)===0&&t.length>0)throw new Na;if(he(e)&&he(e)<32)throw new Vf({data:typeof e=="string"?e:He(e),params:t,size:he(e)});let o=0,i=[];for(let a=0;a<t.length;++a){let s=t[a];o<r.length&&n.setPosition(o);let[c,u]=iu(n,s,{staticPosition:0});o+=u,i.push(c)}return i}function iu(t,e,{staticPosition:r}){let n=b0(e.type);if(n){let[o,i]=n;return MQ(t,{...e,type:i},{length:o,staticPosition:r})}if(e.type==="tuple")return LQ(t,e,{staticPosition:r});if(e.type==="address")return NQ(t);if(e.type==="bool")return kQ(t);if(e.type.startsWith("bytes"))return $Q(t,e,{staticPosition:r});if(e.type.startsWith("uint")||e.type.startsWith("int"))return FQ(t,e);if(e.type==="string")return jQ(t,{staticPosition:r});throw new iy(e.type,{docsPath:"/docs/contract/decodeAbiParameters"})}function NQ(t){let e=t.readBytes(32);return[Ui(He(h6(e,-20))),32]}function MQ(t,e,{length:r,staticPosition:n}){if(r===null){let a=Yo(t.readBytes(w6)),s=n+a,c=s+LB;t.setPosition(s);let u=Yo(t.readBytes(LB)),f=v0(e),l=0,h=[];for(let m=0;m<u;++m){t.setPosition(c+(f?m*32:l));let[x,S]=iu(t,e,{staticPosition:c});l+=S,h.push(x),S===0&&(t.assertReadLimit(),t._touch())}return t.setPosition(n+32),[h,32]}if(v0(e)){let a=Yo(t.readBytes(w6)),s=n+a,c=[];for(let u=0;u<r;++u){t.setPosition(s+u*32);let[f]=iu(t,e,{staticPosition:s});c.push(f)}return t.setPosition(n+32),[c,32]}let o=0,i=[];for(let a=0;a<r;++a){let[s,c]=iu(t,e,{staticPosition:n+o});o+=c,i.push(s),c===0&&(t.assertReadLimit(),t._touch())}return[i,o]}function kQ(t){return[kB(t.readBytes(32),{size:32}),32]}function $Q(t,e,{staticPosition:r}){let[n,o]=e.type.split("bytes");if(!o){let a=Yo(t.readBytes(32));t.setPosition(r+a);let s=Yo(t.readBytes(32));if(s===0)return t.setPosition(r+32),["0x",32];let c=t.readBytes(s);return t.setPosition(r+32),[He(c),32]}return[He(t.readBytes(Number.parseInt(o,10),32)),32]}function FQ(t,e){let r=e.type.startsWith("int"),n=Number.parseInt(e.type.split("int")[1]||"256",10),o=t.readBytes(32);return[n>48?MB(o,{signed:r}):Yo(o,{signed:r}),32]}function LQ(t,e,{staticPosition:r}){let n=e.components.length===0||e.components.some(({name:a})=>!a),o=n?[]:{},i=0;if(v0(e)){let a=Yo(t.readBytes(w6)),s=r+a;for(let c=0;c<e.components.length;++c){let u=e.components[c];t.setPosition(s+i);let[f,l]=iu(t,u,{staticPosition:s});i+=l,o[n?c:u?.name]=f}return t.setPosition(r+32),[o,32]}for(let a=0;a<e.components.length;++a){let s=e.components[a],[c,u]=iu(t,s,{staticPosition:r});o[n?a:s?.name]=c,i+=u}return[o,i]}function jQ(t,{staticPosition:e}){let r=Yo(t.readBytes(32)),n=e+r;t.setPosition(n);let o=Yo(t.readBytes(32));if(o===0)return t.setPosition(e+32),["",32];let i=t.readBytes(o,32),a=$B(i);return t.setPosition(e+32),[a,32]}function v0(t){let{type:e}=t;if(e==="string"||e==="bytes"||e.endsWith("[]"))return!0;if(e==="tuple")return t.components?.some(v0);let r=b0(t.type);return!!(r&&v0({...t,type:r[1]}))}var LB,w6,x0=N(()=>{fr();eu();Ey();Jn();ja();FB();Rn();we();gc();LB=32,w6=32});function Ay(t){let{abi:e,data:r,cause:n}=t,o=Mn(r,0,4);if(o==="0x")throw new Na({cause:n});let a=[...e||[],vy,NB].find(s=>s.type==="error"&&o===Wo(Xt(s)));if(!a)throw new Yf(o,{docsPath:"/docs/contract/decodeErrorResult",cause:n});return{abiItem:a,args:"inputs"in a&&a.inputs&&a.inputs.length>0?Di(a.inputs,Mn(r,4)):void 0,errorName:a.name}}var E6=N(()=>{xy();fr();ja();tu();x0();Ca()});var Qe,ro=N(()=>{Qe=(t,e,r)=>JSON.stringify(t,(n,o)=>{let i=typeof o=="bigint"?o.toString():o;return typeof e=="function"?e(n,i):i},r)});function A6({abiItem:t,args:e,includeFunctionName:r=!0,includeName:n=!1}){if("name"in t&&"inputs"in t&&t.inputs)return`${r?t.name:""}(${t.inputs.map((o,i)=>`${n&&o.name?`${o.name}: `:""}${typeof e[i]=="object"?Qe(e[i]):e[i]}`).join(", ")})`}var jB=N(()=>{ro()});function Iy(t,e=0){if(!Number.isInteger(e)||e<0)throw new Sy({decimals:e});let r=t.toString(),n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(e,"0");let[o,i]=[r.slice(0,r.length-e),r.slice(r.length-e)];return i=i.replace(/(0+)$/,""),`${n?"-":""}${o||"0"}${i?`.${i}`:""}`}function UB(t,e="wei"){return Iy(t,_y.ether-_y[e])}function DB(t,e="wei"){return Iy(t,_y.gwei-_y[e])}function zB(t,e=0){if(!Number.isInteger(e)||e<0)throw new Sy({decimals:e});if(!/^-?(?:[0-9]+(?:\.[0-9]*)?|\.[0-9]+)$/.test(t))throw new _6({value:t});let[r="",n="0"]=t.split("."),o=r.startsWith("-");if(o&&(r=r.slice(1)),r===""&&(r="0"),n=n.replace(/(0+)$/,""),e===0)n.length>0&&Number.parseInt(n[0],10)>=5&&(r=`${BigInt(r)+1n}`),n="";else if(n.length>e){let i=n.slice(0,e);if(Number.parseInt(n.slice(e,e+1),10)>=5){let s=UQ(i);s.length>e?(n=s.slice(1),r=`${BigInt(r)+1n}`):n=s}else n=i}else n=n.padEnd(e,"0");return BigInt(`${o?"-":""}${r}${n}`)}function UQ(t){let e=t.split(""),r=e.length-1;for(;r>=0;){let n=Number.parseInt(e[r],10)+1;if(n<10)return e[r]=String(n),e.join("");e[r]="0",r--}return`1${e.join("")}`}var _y,_6,Sy,w0=N(()=>{_y={wei:0,gwei:9,szabo:12,finney:15,ether:18};_6=class extends Error{constructor({value:e}){super(`Value \`${e}\` is not a valid decimal number.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Value.InvalidDecimalNumberError"})}},Sy=class extends Error{constructor({decimals:e}){super(`\`decimals\` must be a non-negative integer. Got \`${e}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Value.InvalidDecimalsError"})}}});function au(t,e="wei"){return UB(t,e)}var By=N(()=>{w0()});function Mt(t,e="wei"){return DB(t,e)}var su=N(()=>{w0()});function KB(t){return t.reduce((e,{slot:r,value:n})=>`${e} ${r}: ${n}
|
|
22
|
+
`,"")}function qB(t){return t.reduce((e,{address:r,...n})=>{let o=`${e} ${r}:
|
|
23
|
+
`;return n.nonce&&(o+=` nonce: ${n.nonce}
|
|
24
|
+
`),n.balance&&(o+=` balance: ${n.balance}
|
|
25
|
+
`),n.code&&(o+=` code: ${n.code}
|
|
26
|
+
`),n.state&&(o+=` state:
|
|
27
|
+
`,o+=KB(n.state)),n.stateDiff&&(o+=` stateDiff:
|
|
28
|
+
`,o+=KB(n.stateDiff)),o},` State Override:
|
|
29
|
+
`).slice(0,-1)}var Oy,Py,S6=N(()=>{de();Oy=class extends K{constructor({address:e}){super(`State for account "${e}" is set multiple times.`,{name:"AccountStateConflictError"})}},Py=class extends K{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}});function wc(t){let e=Object.entries(t).map(([n,o])=>o===void 0||o===!1?null:[n,o]).filter(Boolean),r=e.reduce((n,[o])=>Math.max(n,o.length),0);return e.map(([n,o])=>` ${`${n}:`.padEnd(r+1)} ${o}`).join(`
|
|
30
|
+
`)}var cu,Ry,Cy,Ny,My,fu,uu,xc,ky,Mr=N(()=>{By();su();de();cu=class extends K{constructor({filledNonce:e,requestedNonce:r}){super("The filled transaction nonce does not match the requested nonce.",{metaMessages:[`Requested Nonce: ${r}`,`Filled Nonce: ${e}`],name:"FeePayerNonceMismatchError"})}},Ry=class extends K{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}},Cy=class extends K{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",wc(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}},Ny=class extends K{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}},My=class extends K{constructor(e,{account:r,docsPath:n,chain:o,data:i,gas:a,gasPrice:s,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:f,to:l,value:h}){let m=wc({chain:o&&`${o?.name} (id: ${o?.id})`,from:r?.address,to:l,value:typeof h<"u"&&`${au(h)} ${o?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:a,gasPrice:typeof s<"u"&&`${Mt(s)} gwei`,maxFeePerGas:typeof c<"u"&&`${Mt(c)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${Mt(u)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",m].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}},fu=class extends K{constructor({blockHash:e,blockNumber:r,blockTag:n,hash:o,index:i}){let a="Transaction";n&&i!==void 0&&(a=`Transaction at block time "${n}" at index "${i}"`),e&&i!==void 0&&(a=`Transaction at block hash "${e}" at index "${i}"`),r&&i!==void 0&&(a=`Transaction at block number "${r}" at index "${i}"`),o&&(a=`Transaction with hash "${o}"`),super(`${a} could not be found.`,{name:"TransactionNotFoundError"})}},uu=class extends K{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}},xc=class extends K{constructor({receipt:e}){super(`Transaction with hash "${e.transactionHash}" reverted.`,{metaMessages:['The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.'," ","You can attempt to extract the revert reason by:","- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract","- using the `call` Action with raw `data`"],name:"TransactionReceiptRevertedError"}),Object.defineProperty(this,"receipt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.receipt=e}},ky=class extends K{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}});function dr(t){if(t?.reason)return t.reason;if(typeof DOMException=="function")return new DOMException("This operation was aborted","AbortError");let e=new Error("This operation was aborted");return e.name="AbortError",e}function Zo(t){return typeof t=="object"&&t!==null&&"name"in t&&t.name==="AbortError"}var HB,du,zi=N(()=>{HB=t=>t;du=t=>{try{let e=new URL(t);return!e.username&&!e.password?t:(e.username="",e.password="",e.toString())}catch{return t}}});var $y,Fy,Ly,jy,Uy,lu,Dy=N(()=>{Pt();xy();E6();Ca();jB();ru();By();su();fr();de();S6();Mr();zi();$y=class extends K{constructor(e,{account:r,docsPath:n,chain:o,data:i,gas:a,gasPrice:s,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:f,to:l,value:h,stateOverride:m}){let x=r?ce(r):void 0,S=wc({from:x?.address,to:l,value:typeof h<"u"&&`${au(h)} ${o?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:a,gasPrice:typeof s<"u"&&`${Mt(s)} gwei`,maxFeePerGas:typeof c<"u"&&`${Mt(c)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${Mt(u)} gwei`,nonce:f});m&&(S+=`
|
|
31
|
+
${qB(m)}`),super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",S].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}},Fy=class extends K{constructor(e,{abi:r,args:n,contractAddress:o,docsPath:i,functionName:a,sender:s}){let c=Vo({abi:r,args:n,name:a}),u=c?A6({abiItem:c,args:n,includeFunctionName:!1,includeName:!1}):void 0,f=c?Xt(c,{includeName:!0}):void 0,l=wc({address:o&&HB(o),function:f,args:u&&u!=="()"&&`${[...Array(a?.length??0).keys()].map(()=>" ").join("")}${u}`,sender:s});super(e.shortMessage||`An unknown error occurred while executing the contract function "${a}".`,{cause:e,docsPath:i,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],l&&"Contract Call:",l].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=r,this.args=n,this.cause=e,this.contractAddress=o,this.functionName=a,this.sender=s}},Ly=class extends K{constructor({abi:e,data:r,functionName:n,message:o,cause:i}){let a,s,c,u;if(r&&r!=="0x")try{s=Ay({abi:e,data:r,cause:i});let{abiItem:l,errorName:h,args:m}=s;if(h==="Error")u=m[0];else if(h==="Panic"){let[x]=m;u=CB[x]}else{let x=l?Xt(l,{includeName:!0}):void 0,S=l&&m?A6({abiItem:l,args:m,includeFunctionName:!1,includeName:!1}):void 0;c=[x?`Error: ${x}`:"",S&&S!=="()"?` ${[...Array(h?.length??0).keys()].map(()=>" ").join("")}${S}`:""]}}catch(l){a=l}else o&&(u=o);let f;a instanceof Yf&&(f=a.signature,c=[`Unable to decode signature "${f}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${f}.`]),super(u&&u!=="execution reverted"||f?[`The contract function "${n}" reverted with the following ${f?"signature":"reason"}:`,u||f].join(`
|
|
32
|
+
`):`The contract function "${n}" reverted.`,{cause:a??i,metaMessages:c,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=s,this.raw=r,this.reason=u,this.signature=f}},jy=class extends K{constructor({functionName:e,cause:r}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${e}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError",cause:r})}},Uy=class extends K{constructor({factory:e}){super(`Deployment for counterfactual contract call failed${e?` for factory "${e}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}},lu=class extends K{constructor({data:e,message:r}){super(r||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}});var Ua,pu,E0=N(()=>{ro();de();zi();Ua=class extends K{constructor({body:e,cause:r,details:n,headers:o,status:i,url:a}){super("HTTP request failed.",{cause:r,details:n,metaMessages:[i&&`Status: ${i}`,`URL: ${du(a)}`,e&&`Request body: ${Qe(e)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=o,this.status=i,this.url=a}},pu=class extends K{constructor({body:e,error:r,url:n}){super("RPC Request failed.",{cause:r,details:r.message,metaMessages:[`URL: ${du(n)}`,`Request body: ${Qe(e)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=r.code,this.data=r.data,this.url=n}}});var DQ,lr,pr,hu,mu,yu,bu,Ki,Da,gu,vu,xu,za,Ec,wu,Ac,Eu,Au,_u,Su,Iu,Ka,Tu,Bu,Ou,Pu,Ru,qa,Cu,zy,Ky=N(()=>{de();E0();DQ=-1,lr=class extends K{constructor(e,{code:r,docsPath:n,metaMessages:o,name:i,shortMessage:a}){super(a,{cause:e,docsPath:n,metaMessages:o||e?.metaMessages,name:i||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=i||e.name,this.code=e instanceof pu?e.code:r??DQ}},pr=class extends lr{constructor(e,r){super(e,r),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=r.data}},hu=class t extends lr{constructor(e){super(e,{code:t.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}};Object.defineProperty(hu,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});mu=class t extends lr{constructor(e){super(e,{code:t.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}};Object.defineProperty(mu,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});yu=class t extends lr{constructor(e,{method:r}={}){super(e,{code:t.code,name:"MethodNotFoundRpcError",shortMessage:`The method${r?` "${r}"`:""} does not exist / is not available.`})}};Object.defineProperty(yu,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});bu=class t extends lr{constructor(e){super(e,{code:t.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(`
|
|
33
|
+
`)})}};Object.defineProperty(bu,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});Ki=class t extends lr{constructor(e){super(e,{code:t.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}};Object.defineProperty(Ki,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});Da=class t extends lr{constructor(e){super(e,{code:t.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(`
|
|
34
|
+
`)})}};Object.defineProperty(Da,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});gu=class t extends lr{constructor(e){super(e,{code:t.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}};Object.defineProperty(gu,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});vu=class t extends lr{constructor(e){super(e,{code:t.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}};Object.defineProperty(vu,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});xu=class t extends lr{constructor(e){super(e,{code:t.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}};Object.defineProperty(xu,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});za=class t extends lr{constructor(e,{method:r}={}){super(e,{code:t.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${r?` "${r}"`:""} is not supported.`})}};Object.defineProperty(za,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});Ec=class t extends lr{constructor(e){super(e,{code:t.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}};Object.defineProperty(Ec,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});wu=class t extends lr{constructor(e){super(e,{code:t.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}};Object.defineProperty(wu,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});Ac=class t extends pr{constructor(e){super(e,{code:t.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}};Object.defineProperty(Ac,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});Eu=class t extends pr{constructor(e){super(e,{code:t.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}};Object.defineProperty(Eu,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});Au=class t extends pr{constructor(e,{method:r}={}){super(e,{code:t.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${r?` " ${r}"`:""}.`})}};Object.defineProperty(Au,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});_u=class t extends pr{constructor(e){super(e,{code:t.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}};Object.defineProperty(_u,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});Su=class t extends pr{constructor(e){super(e,{code:t.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}};Object.defineProperty(Su,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});Iu=class t extends pr{constructor(e){super(e,{code:t.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}};Object.defineProperty(Iu,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});Ka=class t extends pr{constructor(e){super(e,{code:t.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}};Object.defineProperty(Ka,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});Tu=class t extends pr{constructor(e){super(e,{code:t.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}};Object.defineProperty(Tu,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});Bu=class t extends pr{constructor(e){super(e,{code:t.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}};Object.defineProperty(Bu,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});Ou=class t extends pr{constructor(e){super(e,{code:t.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}};Object.defineProperty(Ou,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});Pu=class t extends pr{constructor(e){super(e,{code:t.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}};Object.defineProperty(Pu,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});Ru=class t extends pr{constructor(e){super(e,{code:t.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}};Object.defineProperty(Ru,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});qa=class t extends pr{constructor(e){super(e,{code:t.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}};Object.defineProperty(qa,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});Cu=class t extends pr{constructor(e){super(e,{code:t.code,name:"WalletConnectSessionSettlementError",shortMessage:"WalletConnect session settlement failed."})}};Object.defineProperty(Cu,"code",{enumerable:!0,configurable:!0,writable:!0,value:7e3});zy=class extends lr{constructor(e){super(e,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}});function Nu(t,{abi:e,address:r,args:n,docsPath:o,functionName:i,sender:a}){let s=t instanceof lu?t:t instanceof K?t.walk(x=>typeof x=="object"&&x!==null&&"data"in x)||t.walk():{},{code:c,data:u,details:f,message:l,shortMessage:h}=s,m=t instanceof Na?new jy({functionName:i,cause:t}):[zQ,Ki.code].includes(c)&&(u||f||l||h)||c===Da.code&&f==="execution reverted"&&u?new Ly({abi:e,data:typeof u=="object"?u.data:u,functionName:i,message:s instanceof pu?f:h??l,cause:t}):t;return new Fy(m,{abi:e,args:n,contractAddress:r,docsPath:o,functionName:i,sender:a})}var zQ,qy=N(()=>{fr();de();Dy();E0();Ky();zQ=3});function GB(t){let e=eo(`0x${t.substring(4)}`).substring(26);return Ui(`0x${e}`)}var WB=N(()=>{eu();Xf()});function KQ(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);let o=BigInt(32),i=BigInt(4294967295),a=Number(r>>o&i),s=Number(r&i),c=n?4:0,u=n?0:4;t.setUint32(e+c,a,n),t.setUint32(e+u,s,n)}function VB(t,e,r){return t&e^~t&r}function YB(t,e,r){return t&e^t&r^e&r}var Hy,qi,ZB=N(()=>{qo();Hy=class extends Fa{constructor(e,r,n,o){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=o,this.buffer=new Uint8Array(e),this.view=py(this.buffer)}update(e){ji(this),e=yc(e),zo(e);let{view:r,buffer:n,blockLen:o}=this,i=e.length;for(let a=0;a<i;){let s=Math.min(o-this.pos,i-a);if(s===o){let c=py(e);for(;o<=i-a;a+=o)this.process(c,a);continue}n.set(e.subarray(a,a+s),this.pos),this.pos+=s,a+=s,this.pos===o&&(this.process(r,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){ji(this),ly(e,this),this.finished=!0;let{buffer:r,view:n,blockLen:o,isLE:i}=this,{pos:a}=this;r[a++]=128,Ko(this.buffer.subarray(a)),this.padOffset>o-a&&(this.process(n,0),a=0);for(let l=a;l<o;l++)r[l]=0;KQ(n,o-8,BigInt(this.length*8),i),this.process(n,0);let s=py(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let u=c/4,f=this.get();if(u>f.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;l<u;l++)s.setUint32(4*l,f[l],i)}digest(){let{buffer:e,outputLen:r}=this;this.digestInto(e);let n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:r,buffer:n,length:o,finished:i,destroyed:a,pos:s}=this;return e.destroyed=a,e.finished=i,e.length=o,e.pos=s,o%r&&e.buffer.set(n),e}clone(){return this._cloneInto()}},qi=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225])});var qQ,Ha,Gy,_c,I6=N(()=>{ZB();qo();qQ=Uint32Array.from([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]),Ha=new Uint32Array(64),Gy=class extends Hy{constructor(e=32){super(64,e,8,!1),this.A=qi[0]|0,this.B=qi[1]|0,this.C=qi[2]|0,this.D=qi[3]|0,this.E=qi[4]|0,this.F=qi[5]|0,this.G=qi[6]|0,this.H=qi[7]|0}get(){let{A:e,B:r,C:n,D:o,E:i,F:a,G:s,H:c}=this;return[e,r,n,o,i,a,s,c]}set(e,r,n,o,i,a,s,c){this.A=e|0,this.B=r|0,this.C=n|0,this.D=o|0,this.E=i|0,this.F=a|0,this.G=s|0,this.H=c|0}process(e,r){for(let l=0;l<16;l++,r+=4)Ha[l]=e.getUint32(r,!1);for(let l=16;l<64;l++){let h=Ha[l-15],m=Ha[l-2],x=Qn(h,7)^Qn(h,18)^h>>>3,S=Qn(m,17)^Qn(m,19)^m>>>10;Ha[l]=S+Ha[l-7]+x+Ha[l-16]|0}let{A:n,B:o,C:i,D:a,E:s,F:c,G:u,H:f}=this;for(let l=0;l<64;l++){let h=Qn(s,6)^Qn(s,11)^Qn(s,25),m=f+h+VB(s,c,u)+qQ[l]+Ha[l]|0,S=(Qn(n,2)^Qn(n,13)^Qn(n,22))+YB(n,o,i)|0;f=u,u=c,c=s,s=a+m|0,a=i,i=o,o=n,n=m+S|0}n=n+this.A|0,o=o+this.B|0,i=i+this.C|0,a=a+this.D|0,s=s+this.E|0,c=c+this.F|0,u=u+this.G|0,f=f+this.H|0,this.set(n,o,i,a,s,c,u,f)}roundClean(){Ko(Ha)}destroy(){this.set(0,0,0,0,0,0,0,0),Ko(this.buffer)}},_c=hy(()=>new Gy)});var Wy,T6,JB=N(()=>{qo();Wy=class extends Fa{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,sB(e);let n=yc(r);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let o=this.blockLen,i=new Uint8Array(o);i.set(n.length>o?e.create().update(n).digest():n);for(let a=0;a<i.length;a++)i[a]^=54;this.iHash.update(i),this.oHash=e.create();for(let a=0;a<i.length;a++)i[a]^=106;this.oHash.update(i),Ko(i)}update(e){return ji(this),this.iHash.update(e),this}digestInto(e){ji(this),zo(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));let{oHash:r,iHash:n,finished:o,destroyed:i,blockLen:a,outputLen:s}=this;return e=e,e.finished=o,e.destroyed=i,e.blockLen=a,e.outputLen=s,e.oHash=r._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}},T6=(t,e,r)=>new Wy(t,e).update(r).digest();T6.create=(t,e)=>new Wy(t,e)});function Mu(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function Gi(t){if(!Mu(t))throw new Error("Uint8Array expected")}function ku(t,e){if(typeof e!="boolean")throw new Error(t+" boolean expected, got "+e)}function A0(t){let e=t.toString(16);return e.length&1?"0"+e:e}function eO(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return t===""?R6:BigInt("0x"+t)}function $u(t){if(Gi(t),tO)return t.toHex();let e="";for(let r=0;r<t.length;r++)e+=HQ[t[r]];return e}function XB(t){if(t>=Hi._0&&t<=Hi._9)return t-Hi._0;if(t>=Hi.A&&t<=Hi.F)return t-(Hi.A-10);if(t>=Hi.a&&t<=Hi.f)return t-(Hi.a-10)}function _0(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);if(tO)return Uint8Array.fromHex(t);let e=t.length,r=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);let n=new Uint8Array(r);for(let o=0,i=0;o<r;o++,i+=2){let a=XB(t.charCodeAt(i)),s=XB(t.charCodeAt(i+1));if(a===void 0||s===void 0){let c=t[i]+t[i+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+i)}n[o]=a*16+s}return n}function kr(t){return eO($u(t))}function C6(t){return Gi(t),eO($u(Uint8Array.from(t).reverse()))}function Jo(t,e){return _0(t.toString(16).padStart(e*2,"0"))}function N6(t,e){return Jo(t,e).reverse()}function Rt(t,e,r){let n;if(typeof e=="string")try{n=_0(e)}catch(i){throw new Error(t+" must be hex string or Uint8Array, cause: "+i)}else if(Mu(e))n=Uint8Array.from(e);else throw new Error(t+" must be hex string or Uint8Array");let o=n.length;if(typeof r=="number"&&o!==r)throw new Error(t+" of length "+r+" expected, got "+o);return n}function Er(...t){let e=0;for(let n=0;n<t.length;n++){let o=t[n];Gi(o),e+=o.length}let r=new Uint8Array(e);for(let n=0,o=0;n<t.length;n++){let i=t[n];r.set(i,o),o+=i.length}return r}function Vy(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}function Sc(t,e,r){return B6(t)&&B6(e)&&B6(r)&&e<=t&&t<r}function Wi(t,e,r,n){if(!Sc(e,r,n))throw new Error("expected valid "+t+": "+r+" <= n < "+n+", got "+e)}function rO(t){let e;for(e=0;t>R6;t>>=P6,e+=1);return e}function nO(t,e,r){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let n=O6(t),o=O6(t),i=0,a=()=>{n.fill(1),o.fill(0),i=0},s=(...l)=>r(o,n,...l),c=(l=O6(0))=>{o=s(QB([0]),l),n=s(),l.length!==0&&(o=s(QB([1]),l),n=s())},u=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let l=0,h=[];for(;l<e;){n=s();let m=n.slice();h.push(m),l+=n.length}return Er(...h)};return(l,h)=>{a(),c(l);let m;for(;!(m=h(u()));)c();return a(),m}}function Vi(t,e,r={}){let n=(o,i,a)=>{let s=GQ[i];if(typeof s!="function")throw new Error("invalid validator function");let c=t[o];if(!(a&&c===void 0)&&!s(c,t))throw new Error("param "+String(o)+" is invalid. Expected "+i+", got "+c)};for(let[o,i]of Object.entries(e))n(o,i,!1);for(let[o,i]of Object.entries(r))n(o,i,!0);return t}function M6(t){let e=new WeakMap;return(r,...n)=>{let o=e.get(r);if(o!==void 0)return o;let i=t(r,...n);return e.set(r,i),i}}var R6,P6,tO,HQ,Hi,B6,Ic,O6,QB,GQ,Fu=N(()=>{R6=BigInt(0),P6=BigInt(1);tO=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",HQ=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));Hi={_0:48,_9:57,A:65,F:70,a:97,f:102};B6=t=>typeof t=="bigint"&&R6<=t;Ic=t=>(P6<<BigInt(t))-P6,O6=t=>new Uint8Array(t),QB=t=>Uint8Array.from(t);GQ={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||Mu(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)}});function rt(t,e){let r=t%e;return r>=Ar?r:e+r}function mn(t,e,r){let n=t;for(;e-- >Ar;)n*=n,n%=r;return n}function Yy(t,e){if(t===Ar)throw new Error("invert: expected non-zero number");if(e<=Ar)throw new Error("invert: expected positive modulus, got "+e);let r=rt(t,e),n=e,o=Ar,i=hr,a=hr,s=Ar;for(;r!==Ar;){let u=n/r,f=n%r,l=o-a*u,h=i-s*u;n=r,r=f,o=a,i=s,a=l,s=h}if(n!==hr)throw new Error("invert: does not exist");return rt(o,e)}function cO(t,e){let r=(t.ORDER+hr)/iO,n=t.pow(e,r);if(!t.eql(t.sqr(n),e))throw new Error("Cannot find square root");return n}function VQ(t,e){let r=(t.ORDER-aO)/sO,n=t.mul(e,Tc),o=t.pow(n,r),i=t.mul(e,o),a=t.mul(t.mul(i,Tc),o),s=t.mul(i,t.sub(a,t.ONE));if(!t.eql(t.sqr(s),e))throw new Error("Cannot find square root");return s}function YQ(t){if(t<BigInt(3))throw new Error("sqrt is not defined for small field");let e=t-hr,r=0;for(;e%Tc===Ar;)e/=Tc,r++;let n=Tc,o=S0(t);for(;oO(o,n)===1;)if(n++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(r===1)return cO;let i=o.pow(n,e),a=(e+hr)/Tc;return function(c,u){if(c.is0(u))return u;if(oO(c,u)!==1)throw new Error("Cannot find square root");let f=r,l=c.mul(c.ONE,i),h=c.pow(u,e),m=c.pow(u,a);for(;!c.eql(h,c.ONE);){if(c.is0(h))return c.ZERO;let x=1,S=c.sqr(h);for(;!c.eql(S,c.ONE);)if(x++,S=c.sqr(S),x===f)throw new Error("Cannot find square root");let O=hr<<BigInt(f-x-1),P=c.pow(l,O);f=x,l=c.sqr(P),h=c.mul(h,l),m=c.mul(m,P)}return m}}function ZQ(t){return t%iO===WQ?cO:t%sO===aO?VQ:YQ(t)}function Zy(t){let e={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=JQ.reduce((n,o)=>(n[o]="function",n),e);return Vi(t,r)}function XQ(t,e,r){if(r<Ar)throw new Error("invalid exponent, negatives unsupported");if(r===Ar)return t.ONE;if(r===hr)return e;let n=t.ONE,o=e;for(;r>Ar;)r&hr&&(n=t.mul(n,o)),o=t.sqr(o),r>>=hr;return n}function Lu(t,e,r=!1){let n=new Array(e.length).fill(r?t.ZERO:void 0),o=e.reduce((a,s,c)=>t.is0(s)?a:(n[c]=a,t.mul(a,s)),t.ONE),i=t.inv(o);return e.reduceRight((a,s,c)=>t.is0(s)?a:(n[c]=t.mul(a,n[c]),t.mul(a,s)),i),n}function oO(t,e){let r=(t.ORDER-hr)/Tc,n=t.pow(e,r),o=t.eql(n,t.ONE),i=t.eql(n,t.ZERO),a=t.eql(n,t.neg(t.ONE));if(!o&&!i&&!a)throw new Error("invalid Legendre symbol result");return o?1:i?0:-1}function k6(t,e){e!==void 0&&mc(e);let r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function S0(t,e,r=!1,n={}){if(t<=Ar)throw new Error("invalid field: expected ORDER > 0, got "+t);let{nBitLength:o,nByteLength:i}=k6(t,e);if(i>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let a,s=Object.freeze({ORDER:t,isLE:r,BITS:o,BYTES:i,MASK:Ic(o),ZERO:Ar,ONE:hr,create:c=>rt(c,t),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return Ar<=c&&c<t},is0:c=>c===Ar,isOdd:c=>(c&hr)===hr,neg:c=>rt(-c,t),eql:(c,u)=>c===u,sqr:c=>rt(c*c,t),add:(c,u)=>rt(c+u,t),sub:(c,u)=>rt(c-u,t),mul:(c,u)=>rt(c*u,t),pow:(c,u)=>XQ(s,c,u),div:(c,u)=>rt(c*Yy(u,t),t),sqrN:c=>c*c,addN:(c,u)=>c+u,subN:(c,u)=>c-u,mulN:(c,u)=>c*u,inv:c=>Yy(c,t),sqrt:n.sqrt||(c=>(a||(a=ZQ(t)),a(s,c))),toBytes:c=>r?N6(c,i):Jo(c,i),fromBytes:c=>{if(c.length!==i)throw new Error("Field.fromBytes: expected "+i+" bytes, got "+c.length);return r?C6(c):kr(c)},invertBatch:c=>Lu(s,c),cmov:(c,u,f)=>f?u:c});return Object.freeze(s)}function fO(t){if(typeof t!="bigint")throw new Error("field order must be bigint");let e=t.toString(2).length;return Math.ceil(e/8)}function $6(t){let e=fO(t);return e+Math.ceil(e/2)}function uO(t,e,r=!1){let n=t.length,o=fO(e),i=$6(e);if(n<16||n<i||n>1024)throw new Error("expected "+i+"-1024 bytes of input, got "+n);let a=r?C6(t):kr(t),s=rt(a,e-hr)+hr;return r?N6(s,o):Jo(s,o)}var Ar,hr,Tc,WQ,iO,aO,sO,JQ,I0=N(()=>{qo();Fu();Ar=BigInt(0),hr=BigInt(1),Tc=BigInt(2),WQ=BigInt(3),iO=BigInt(4),aO=BigInt(5),sO=BigInt(8);JQ=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"]});function F6(t,e){let r=e.negate();return t?r:e}function pO(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw new Error("invalid window size, expected [1.."+e+"], got W="+t)}function L6(t,e){pO(t,e);let r=Math.ceil(e/t)+1,n=2**(t-1),o=2**t,i=Ic(t),a=BigInt(t);return{windows:r,windowSize:n,mask:i,maxNumber:o,shiftBy:a}}function lO(t,e,r){let{windowSize:n,mask:o,maxNumber:i,shiftBy:a}=r,s=Number(t&o),c=t>>a;s>n&&(s-=i,c+=D6);let u=e*n,f=u+Math.abs(s)-1,l=s===0,h=s<0,m=e%2!==0;return{nextN:c,offset:f,isZero:l,isNeg:h,isNegF:m,offsetF:u}}function QQ(t,e){if(!Array.isArray(t))throw new Error("array expected");t.forEach((r,n)=>{if(!(r instanceof e))throw new Error("invalid point at index "+n)})}function eee(t,e){if(!Array.isArray(t))throw new Error("array of scalars expected");t.forEach((r,n)=>{if(!e.isValid(r))throw new Error("invalid scalar at index "+n)})}function U6(t){return hO.get(t)||1}function mO(t,e){return{constTimeNegate:F6,hasPrecomputes(r){return U6(r)!==1},unsafeLadder(r,n,o=t.ZERO){let i=r;for(;n>dO;)n&D6&&(o=o.add(i)),i=i.double(),n>>=D6;return o},precomputeWindow(r,n){let{windows:o,windowSize:i}=L6(n,e),a=[],s=r,c=s;for(let u=0;u<o;u++){c=s,a.push(c);for(let f=1;f<i;f++)c=c.add(s),a.push(c);s=c.double()}return a},wNAF(r,n,o){let i=t.ZERO,a=t.BASE,s=L6(r,e);for(let c=0;c<s.windows;c++){let{nextN:u,offset:f,isZero:l,isNeg:h,isNegF:m,offsetF:x}=lO(o,c,s);o=u,l?a=a.add(F6(m,n[x])):i=i.add(F6(h,n[f]))}return{p:i,f:a}},wNAFUnsafe(r,n,o,i=t.ZERO){let a=L6(r,e);for(let s=0;s<a.windows&&o!==dO;s++){let{nextN:c,offset:u,isZero:f,isNeg:l}=lO(o,s,a);if(o=c,!f){let h=n[u];i=i.add(l?h.negate():h)}}return i},getPrecomputes(r,n,o){let i=j6.get(n);return i||(i=this.precomputeWindow(n,r),r!==1&&j6.set(n,o(i))),i},wNAFCached(r,n,o){let i=U6(r);return this.wNAF(i,this.getPrecomputes(i,r,o),n)},wNAFCachedUnsafe(r,n,o,i){let a=U6(r);return a===1?this.unsafeLadder(r,n,i):this.wNAFUnsafe(a,this.getPrecomputes(a,r,o),n,i)},setWindowSize(r,n){pO(n,e),hO.set(r,n),j6.delete(r)}}}function yO(t,e,r,n){QQ(r,t),eee(n,e);let o=r.length,i=n.length;if(o!==i)throw new Error("arrays of points and scalars must have equal length");let a=t.ZERO,s=rO(BigInt(o)),c=1;s>12?c=s-3:s>4?c=s-2:s>0&&(c=2);let u=Ic(c),f=new Array(Number(u)+1).fill(a),l=Math.floor((e.BITS-1)/c)*c,h=a;for(let m=l;m>=0;m-=c){f.fill(a);for(let S=0;S<i;S++){let O=n[S],P=Number(O>>BigInt(m)&u);f[P]=f[P].add(r[S])}let x=a;for(let S=f.length-1,O=a;S>0;S--)O=O.add(f[S]),x=x.add(O);if(h=h.add(x),m!==0)for(let S=0;S<c;S++)h=h.double()}return h}function z6(t){return Zy(t.Fp),Vi(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...k6(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}var dO,D6,j6,hO,bO=N(()=>{I0();Fu();dO=BigInt(0),D6=BigInt(1);j6=new WeakMap,hO=new WeakMap});function gO(t){t.lowS!==void 0&&ku("lowS",t.lowS),t.prehash!==void 0&&ku("prehash",t.prehash)}function tee(t){let e=z6(t);Vi(e,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});let{endo:r,Fp:n,a:o}=e;if(r){if(!n.eql(o,n.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...e})}function K6(t,e){return $u(Jo(t,e))}function ree(t){let e=tee(t),{Fp:r}=e,n=S0(e.n,e.nBitLength),o=e.toBytes||((B,R,L)=>{let T=R.toAffine();return Er(Uint8Array.from([4]),r.toBytes(T.x),r.toBytes(T.y))}),i=e.fromBytes||(B=>{let R=B.subarray(1),L=r.fromBytes(R.subarray(0,r.BYTES)),T=r.fromBytes(R.subarray(r.BYTES,2*r.BYTES));return{x:L,y:T}});function a(B){let{a:R,b:L}=e,T=r.sqr(B),M=r.mul(T,B);return r.add(r.add(M,r.mul(B,R)),L)}function s(B,R){let L=r.sqr(R),T=a(B);return r.eql(L,T)}if(!s(e.Gx,e.Gy))throw new Error("bad curve params: generator point");let c=r.mul(r.pow(e.a,T0),H6),u=r.mul(r.sqr(e.b),BigInt(27));if(r.is0(r.add(c,u)))throw new Error("bad curve params: a or b");function f(B){return Sc(B,Oe,e.n)}function l(B){let{allowedPrivateKeyLengths:R,nByteLength:L,wrapPrivateKey:T,n:M}=e;if(R&&typeof B!="bigint"){if(Mu(B)&&(B=$u(B)),typeof B!="string"||!R.includes(B.length))throw new Error("invalid private key");B=B.padStart(L*2,"0")}let $;try{$=typeof B=="bigint"?B:kr(Rt("private key",B,L))}catch{throw new Error("invalid private key, expected hex or "+L+" bytes, got "+typeof B)}return T&&($=rt($,M)),Wi("private key",$,Oe,M),$}function h(B){if(!(B instanceof S))throw new Error("ProjectivePoint expected")}let m=M6((B,R)=>{let{px:L,py:T,pz:M}=B;if(r.eql(M,r.ONE))return{x:L,y:T};let $=B.is0();R==null&&(R=$?r.ONE:r.inv(M));let k=r.mul(L,R),v=r.mul(T,R),d=r.mul(M,R);if($)return{x:r.ZERO,y:r.ZERO};if(!r.eql(d,r.ONE))throw new Error("invZ was invalid");return{x:k,y:v}}),x=M6(B=>{if(B.is0()){if(e.allowInfinityPoint&&!r.is0(B.py))return;throw new Error("bad point: ZERO")}let{x:R,y:L}=B.toAffine();if(!r.isValid(R)||!r.isValid(L))throw new Error("bad point: x or y not FE");if(!s(R,L))throw new Error("bad point: equation left != right");if(!B.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class S{constructor(R,L,T){if(R==null||!r.isValid(R))throw new Error("x required");if(L==null||!r.isValid(L)||r.is0(L))throw new Error("y required");if(T==null||!r.isValid(T))throw new Error("z required");this.px=R,this.py=L,this.pz=T,Object.freeze(this)}static fromAffine(R){let{x:L,y:T}=R||{};if(!R||!r.isValid(L)||!r.isValid(T))throw new Error("invalid affine point");if(R instanceof S)throw new Error("projective point not allowed");let M=$=>r.eql($,r.ZERO);return M(L)&&M(T)?S.ZERO:new S(L,T,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(R){let L=Lu(r,R.map(T=>T.pz));return R.map((T,M)=>T.toAffine(L[M])).map(S.fromAffine)}static fromHex(R){let L=S.fromAffine(i(Rt("pointHex",R)));return L.assertValidity(),L}static fromPrivateKey(R){return S.BASE.multiply(l(R))}static msm(R,L){return yO(S,n,R,L)}_setWindowSize(R){F.setWindowSize(this,R)}assertValidity(){x(this)}hasEvenY(){let{y:R}=this.toAffine();if(r.isOdd)return!r.isOdd(R);throw new Error("Field doesn't support isOdd")}equals(R){h(R);let{px:L,py:T,pz:M}=this,{px:$,py:k,pz:v}=R,d=r.eql(r.mul(L,v),r.mul($,M)),y=r.eql(r.mul(T,v),r.mul(k,M));return d&&y}negate(){return new S(this.px,r.neg(this.py),this.pz)}double(){let{a:R,b:L}=e,T=r.mul(L,T0),{px:M,py:$,pz:k}=this,v=r.ZERO,d=r.ZERO,y=r.ZERO,b=r.mul(M,M),g=r.mul($,$),A=r.mul(k,k),E=r.mul(M,$);return E=r.add(E,E),y=r.mul(M,k),y=r.add(y,y),v=r.mul(R,y),d=r.mul(T,A),d=r.add(v,d),v=r.sub(g,d),d=r.add(g,d),d=r.mul(v,d),v=r.mul(E,v),y=r.mul(T,y),A=r.mul(R,A),E=r.sub(b,A),E=r.mul(R,E),E=r.add(E,y),y=r.add(b,b),b=r.add(y,b),b=r.add(b,A),b=r.mul(b,E),d=r.add(d,b),A=r.mul($,k),A=r.add(A,A),b=r.mul(A,E),v=r.sub(v,b),y=r.mul(A,g),y=r.add(y,y),y=r.add(y,y),new S(v,d,y)}add(R){h(R);let{px:L,py:T,pz:M}=this,{px:$,py:k,pz:v}=R,d=r.ZERO,y=r.ZERO,b=r.ZERO,g=e.a,A=r.mul(e.b,T0),E=r.mul(L,$),w=r.mul(T,k),_=r.mul(M,v),p=r.add(L,T),I=r.add($,k);p=r.mul(p,I),I=r.add(E,w),p=r.sub(p,I),I=r.add(L,M);let C=r.add($,v);return I=r.mul(I,C),C=r.add(E,_),I=r.sub(I,C),C=r.add(T,M),d=r.add(k,v),C=r.mul(C,d),d=r.add(w,_),C=r.sub(C,d),b=r.mul(g,I),d=r.mul(A,_),b=r.add(d,b),d=r.sub(w,b),b=r.add(w,b),y=r.mul(d,b),w=r.add(E,E),w=r.add(w,E),_=r.mul(g,_),I=r.mul(A,I),w=r.add(w,_),_=r.sub(E,_),_=r.mul(g,_),I=r.add(I,_),E=r.mul(w,I),y=r.add(y,E),E=r.mul(C,I),d=r.mul(p,d),d=r.sub(d,E),E=r.mul(p,w),b=r.mul(C,b),b=r.add(b,E),new S(d,y,b)}subtract(R){return this.add(R.negate())}is0(){return this.equals(S.ZERO)}wNAF(R){return F.wNAFCached(this,R,S.normalizeZ)}multiplyUnsafe(R){let{endo:L,n:T}=e;Wi("scalar",R,no,T);let M=S.ZERO;if(R===no)return M;if(this.is0()||R===Oe)return this;if(!L||F.hasPrecomputes(this))return F.wNAFCachedUnsafe(this,R,S.normalizeZ);let{k1neg:$,k1:k,k2neg:v,k2:d}=L.splitScalar(R),y=M,b=M,g=this;for(;k>no||d>no;)k&Oe&&(y=y.add(g)),d&Oe&&(b=b.add(g)),g=g.double(),k>>=Oe,d>>=Oe;return $&&(y=y.negate()),v&&(b=b.negate()),b=new S(r.mul(b.px,L.beta),b.py,b.pz),y.add(b)}multiply(R){let{endo:L,n:T}=e;Wi("scalar",R,Oe,T);let M,$;if(L){let{k1neg:k,k1:v,k2neg:d,k2:y}=L.splitScalar(R),{p:b,f:g}=this.wNAF(v),{p:A,f:E}=this.wNAF(y);b=F.constTimeNegate(k,b),A=F.constTimeNegate(d,A),A=new S(r.mul(A.px,L.beta),A.py,A.pz),M=b.add(A),$=g.add(E)}else{let{p:k,f:v}=this.wNAF(R);M=k,$=v}return S.normalizeZ([M,$])[0]}multiplyAndAddUnsafe(R,L,T){let M=S.BASE,$=(v,d)=>d===no||d===Oe||!v.equals(M)?v.multiplyUnsafe(d):v.multiply(d),k=$(this,L).add($(R,T));return k.is0()?void 0:k}toAffine(R){return m(this,R)}isTorsionFree(){let{h:R,isTorsionFree:L}=e;if(R===Oe)return!0;if(L)return L(S,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:R,clearCofactor:L}=e;return R===Oe?this:L?L(S,this):this.multiplyUnsafe(e.h)}toRawBytes(R=!0){return ku("isCompressed",R),this.assertValidity(),o(S,this,R)}toHex(R=!0){return ku("isCompressed",R),$u(this.toRawBytes(R))}}S.BASE=new S(e.Gx,e.Gy,r.ONE),S.ZERO=new S(r.ZERO,r.ONE,r.ZERO);let{endo:O,nBitLength:P}=e,F=mO(S,O?Math.ceil(P/2):P);return{CURVE:e,ProjectivePoint:S,normPrivateKeyToScalar:l,weierstrassEquation:a,isWithinCurveOrder:f}}function nee(t){let e=z6(t);return Vi(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function vO(t){let e=nee(t),{Fp:r,n,nByteLength:o,nBitLength:i}=e,a=r.BYTES+1,s=2*r.BYTES+1;function c(A){return rt(A,n)}function u(A){return Yy(A,n)}let{ProjectivePoint:f,normPrivateKeyToScalar:l,weierstrassEquation:h,isWithinCurveOrder:m}=ree({...e,toBytes(A,E,w){let _=E.toAffine(),p=r.toBytes(_.x),I=Er;return ku("isCompressed",w),w?I(Uint8Array.from([E.hasEvenY()?2:3]),p):I(Uint8Array.from([4]),p,r.toBytes(_.y))},fromBytes(A){let E=A.length,w=A[0],_=A.subarray(1);if(E===a&&(w===2||w===3)){let p=kr(_);if(!Sc(p,Oe,r.ORDER))throw new Error("Point is not on curve");let I=h(p),C;try{C=r.sqrt(I)}catch(D){let z=D instanceof Error?": "+D.message:"";throw new Error("Point is not on curve"+z)}let j=(C&Oe)===Oe;return(w&1)===1!==j&&(C=r.neg(C)),{x:p,y:C}}else if(E===s&&w===4){let p=r.fromBytes(_.subarray(0,r.BYTES)),I=r.fromBytes(_.subarray(r.BYTES,2*r.BYTES));return{x:p,y:I}}else{let p=a,I=s;throw new Error("invalid Point, expected length of "+p+", or uncompressed "+I+", got "+E)}}});function x(A){let E=n>>Oe;return A>E}function S(A){return x(A)?c(-A):A}let O=(A,E,w)=>kr(A.slice(E,w));class P{constructor(E,w,_){Wi("r",E,Oe,n),Wi("s",w,Oe,n),this.r=E,this.s=w,_!=null&&(this.recovery=_),Object.freeze(this)}static fromCompact(E){let w=o;return E=Rt("compactSignature",E,w*2),new P(O(E,0,w),O(E,w,2*w))}static fromDER(E){let{r:w,s:_}=Yi.toSig(Rt("DER",E));return new P(w,_)}assertValidity(){}addRecoveryBit(E){return new P(this.r,this.s,E)}recoverPublicKey(E){let{r:w,s:_,recovery:p}=this,I=M(Rt("msgHash",E));if(p==null||![0,1,2,3].includes(p))throw new Error("recovery id invalid");let C=p===2||p===3?w+e.n:w;if(C>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");let j=(p&1)===0?"02":"03",U=f.fromHex(j+K6(C,r.BYTES)),D=u(C),z=c(-I*D),q=c(_*D),V=f.BASE.multiplyAndAddUnsafe(U,z,q);if(!V)throw new Error("point at infinify");return V.assertValidity(),V}hasHighS(){return x(this.s)}normalizeS(){return this.hasHighS()?new P(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return _0(this.toDERHex())}toDERHex(){return Yi.hexFromSig(this)}toCompactRawBytes(){return _0(this.toCompactHex())}toCompactHex(){let E=o;return K6(this.r,E)+K6(this.s,E)}}let F={isValidPrivateKey(A){try{return l(A),!0}catch{return!1}},normPrivateKeyToScalar:l,randomPrivateKey:()=>{let A=$6(e.n);return uO(e.randomBytes(A),e.n)},precompute(A=8,E=f.BASE){return E._setWindowSize(A),E.multiply(BigInt(3)),E}};function B(A,E=!0){return f.fromPrivateKey(A).toRawBytes(E)}function R(A){if(typeof A=="bigint")return!1;if(A instanceof f)return!0;let w=Rt("key",A).length,_=r.BYTES,p=_+1,I=2*_+1;if(!(e.allowedPrivateKeyLengths||o===p))return w===p||w===I}function L(A,E,w=!0){if(R(A)===!0)throw new Error("first arg must be private key");if(R(E)===!1)throw new Error("second arg must be public key");return f.fromHex(E).multiply(l(A)).toRawBytes(w)}let T=e.bits2int||function(A){if(A.length>8192)throw new Error("input is too large");let E=kr(A),w=A.length*8-i;return w>0?E>>BigInt(w):E},M=e.bits2int_modN||function(A){return c(T(A))},$=Ic(i);function k(A){return Wi("num < 2^"+i,A,no,$),Jo(A,o)}function v(A,E,w=d){if(["recovered","canonical"].some(Y=>Y in w))throw new Error("sign() legacy options not supported");let{hash:_,randomBytes:p}=e,{lowS:I,prehash:C,extraEntropy:j}=w;I==null&&(I=!0),A=Rt("msgHash",A),gO(w),C&&(A=Rt("prehashed msgHash",_(A)));let U=M(A),D=l(E),z=[k(D),k(U)];if(j!=null&&j!==!1){let Y=j===!0?p(r.BYTES):j;z.push(Rt("extraEntropy",Y))}let q=Er(...z),V=U;function W(Y){let J=T(Y);if(!m(J))return;let X=u(J),ee=f.BASE.multiply(J).toAffine(),se=c(ee.x);if(se===no)return;let ne=c(X*c(V+se*D));if(ne===no)return;let re=(ee.x===se?0:2)|Number(ee.y&Oe),be=ne;return I&&x(ne)&&(be=S(ne),re^=1),new P(se,be,re)}return{seed:q,k2sig:W}}let d={lowS:e.lowS,prehash:!1},y={lowS:e.lowS,prehash:!1};function b(A,E,w=d){let{seed:_,k2sig:p}=v(A,E,w),I=e;return nO(I.hash.outputLen,I.nByteLength,I.hmac)(_,p)}f.BASE._setWindowSize(8);function g(A,E,w,_=y){let p=A;E=Rt("msgHash",E),w=Rt("publicKey",w);let{lowS:I,prehash:C,format:j}=_;if(gO(_),"strict"in _)throw new Error("options.strict was renamed to lowS");if(j!==void 0&&j!=="compact"&&j!=="der")throw new Error("format must be compact or der");let U=typeof p=="string"||Mu(p),D=!U&&!j&&typeof p=="object"&&p!==null&&typeof p.r=="bigint"&&typeof p.s=="bigint";if(!U&&!D)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let z,q;try{if(D&&(z=new P(p.r,p.s)),U){try{j!=="compact"&&(z=P.fromDER(p))}catch(re){if(!(re instanceof Yi.Err))throw re}!z&&j!=="der"&&(z=P.fromCompact(p))}q=f.fromHex(w)}catch{return!1}if(!z||I&&z.hasHighS())return!1;C&&(E=e.hash(E));let{r:V,s:W}=z,Y=M(E),J=u(W),X=c(Y*J),ee=c(V*J),se=f.BASE.multiplyAndAddUnsafe(q,X,ee)?.toAffine();return se?c(se.x)===V:!1}return{CURVE:e,getPublicKey:B,getSharedSecret:L,sign:b,verify:g,ProjectivePoint:f,Signature:P,utils:F}}function oee(t,e){let r=t.ORDER,n=no;for(let x=r-Oe;x%Ga===no;x/=Ga)n+=Oe;let o=n,i=Ga<<o-Oe-Oe,a=i*Ga,s=(r-Oe)/a,c=(s-Oe)/Ga,u=a-Oe,f=i,l=t.pow(e,s),h=t.pow(e,(s+Oe)/Ga),m=(x,S)=>{let O=l,P=t.pow(S,u),F=t.sqr(P);F=t.mul(F,S);let B=t.mul(x,F);B=t.pow(B,c),B=t.mul(B,P),P=t.mul(B,S),F=t.mul(B,x);let R=t.mul(F,P);B=t.pow(R,f);let L=t.eql(B,t.ONE);P=t.mul(F,h),B=t.mul(R,O),F=t.cmov(P,F,L),R=t.cmov(B,R,L);for(let T=o;T>Oe;T--){let M=T-Ga;M=Ga<<M-Oe;let $=t.pow(R,M),k=t.eql($,t.ONE);P=t.mul(F,O),O=t.mul(O,O),$=t.mul(R,O),F=t.cmov(P,F,k),R=t.cmov($,R,k)}return{isValid:L,value:F}};if(t.ORDER%H6===T0){let x=(t.ORDER-T0)/H6,S=t.sqrt(t.neg(e));m=(O,P)=>{let F=t.sqr(P),B=t.mul(O,P);F=t.mul(F,B);let R=t.pow(F,x);R=t.mul(R,B);let L=t.mul(R,S),T=t.mul(t.sqr(R),P),M=t.eql(T,O),$=t.cmov(L,R,M);return{isValid:M,value:$}}}return m}function xO(t,e){if(Zy(t),!t.isValid(e.A)||!t.isValid(e.B)||!t.isValid(e.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");let r=oee(t,e.Z);if(!t.isOdd)throw new Error("Fp.isOdd is not implemented!");return n=>{let o,i,a,s,c,u,f,l;o=t.sqr(n),o=t.mul(o,e.Z),i=t.sqr(o),i=t.add(i,o),a=t.add(i,t.ONE),a=t.mul(a,e.B),s=t.cmov(e.Z,t.neg(i),!t.eql(i,t.ZERO)),s=t.mul(s,e.A),i=t.sqr(a),u=t.sqr(s),c=t.mul(u,e.A),i=t.add(i,c),i=t.mul(i,a),u=t.mul(u,s),c=t.mul(u,e.B),i=t.add(i,c),f=t.mul(o,a);let{isValid:h,value:m}=r(i,u);l=t.mul(o,n),l=t.mul(l,m),f=t.cmov(f,a,h),l=t.cmov(l,m,h);let x=t.isOdd(n)===t.isOdd(l);l=t.cmov(t.neg(l),l,x);let S=Lu(t,[s],!0)[0];return f=t.mul(f,S),{x:f,y:l}}}var q6,Yi,no,Oe,Ga,T0,H6,G6=N(()=>{bO();I0();Fu();q6=class extends Error{constructor(e=""){super(e)}},Yi={Err:q6,_tlv:{encode:(t,e)=>{let{Err:r}=Yi;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(e.length&1)throw new r("tlv.encode: unpadded data");let n=e.length/2,o=A0(n);if(o.length/2&128)throw new r("tlv.encode: long form length too big");let i=n>127?A0(o.length/2|128):"";return A0(t)+i+o+e},decode(t,e){let{Err:r}=Yi,n=0;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(e.length<2||e[n++]!==t)throw new r("tlv.decode: wrong tlv");let o=e[n++],i=!!(o&128),a=0;if(!i)a=o;else{let c=o&127;if(!c)throw new r("tlv.decode(long): indefinite length not supported");if(c>4)throw new r("tlv.decode(long): byte length is too big");let u=e.subarray(n,n+c);if(u.length!==c)throw new r("tlv.decode: length bytes not complete");if(u[0]===0)throw new r("tlv.decode(long): zero leftmost byte");for(let f of u)a=a<<8|f;if(n+=c,a<128)throw new r("tlv.decode(long): not minimal encoding")}let s=e.subarray(n,n+a);if(s.length!==a)throw new r("tlv.decode: wrong value length");return{v:s,l:e.subarray(n+a)}}},_int:{encode(t){let{Err:e}=Yi;if(t<no)throw new e("integer: negative integers are not allowed");let r=A0(t);if(Number.parseInt(r[0],16)&8&&(r="00"+r),r.length&1)throw new e("unexpected DER parsing assertion: unpadded hex");return r},decode(t){let{Err:e}=Yi;if(t[0]&128)throw new e("invalid signature integer: negative");if(t[0]===0&&!(t[1]&128))throw new e("invalid signature integer: unnecessary leading zero");return kr(t)}},toSig(t){let{Err:e,_int:r,_tlv:n}=Yi,o=Rt("signature",t),{v:i,l:a}=n.decode(48,o);if(a.length)throw new e("invalid signature: left bytes after parsing");let{v:s,l:c}=n.decode(2,i),{v:u,l:f}=n.decode(2,c);if(f.length)throw new e("invalid signature: left bytes after parsing");return{r:r.decode(s),s:r.decode(u)}},hexFromSig(t){let{_tlv:e,_int:r}=Yi,n=e.encode(2,r.encode(t.r)),o=e.encode(2,r.encode(t.s)),i=n+o;return e.encode(48,i)}};no=BigInt(0),Oe=BigInt(1),Ga=BigInt(2),T0=BigInt(3),H6=BigInt(4)});function iee(t){return{hash:t,hmac:(e,...r)=>T6(t,e,fB(...r)),randomBytes:La}}function wO(t,e){let r=n=>vO({...t,...iee(n)});return{...r(e),create:r}}var EO=N(()=>{JB();qo();G6();});function Wa(t,e){if(B0(t),B0(e),t<0||t>=1<<8*e)throw new Error("invalid I2OSP input: "+t);let r=Array.from({length:e}).fill(0);for(let n=e-1;n>=0;n--)r[n]=t&255,t>>>=8;return new Uint8Array(r)}function see(t,e){let r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t[n]^e[n];return r}function B0(t){if(!Number.isSafeInteger(t))throw new Error("number expected")}function cee(t,e,r,n){Gi(t),Gi(e),B0(r),e.length>255&&(e=n(Er(Vy("H2C-OVERSIZE-DST-"),e)));let{outputLen:o,blockLen:i}=n,a=Math.ceil(r/o);if(r>65535||a>255)throw new Error("expand_message_xmd: invalid lenInBytes");let s=Er(e,Wa(e.length,1)),c=Wa(0,i),u=Wa(r,2),f=new Array(a),l=n(Er(c,t,u,Wa(0,1),s));f[0]=n(Er(l,Wa(1,1),s));for(let m=1;m<=a;m++){let x=[see(l,f[m-1]),Wa(m+1,1),s];f[m]=n(Er(...x))}return Er(...f).slice(0,r)}function fee(t,e,r,n,o){if(Gi(t),Gi(e),B0(r),e.length>255){let i=Math.ceil(2*n/8);e=o.create({dkLen:i}).update(Vy("H2C-OVERSIZE-DST-")).update(e).digest()}if(r>65535||e.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return o.create({dkLen:r}).update(t).update(Wa(r,2)).update(e).update(Wa(e.length,1)).digest()}function AO(t,e,r){Vi(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});let{p:n,k:o,m:i,hash:a,expand:s,DST:c}=r;Gi(t),B0(e);let u=typeof c=="string"?Vy(c):c,f=n.toString(2).length,l=Math.ceil((f+o)/8),h=e*i*l,m;if(s==="xmd")m=cee(t,u,h,a);else if(s==="xof")m=fee(t,u,h,o,a);else if(s==="_internal_pass")m=t;else throw new Error('expand must be "xmd" or "xof"');let x=new Array(e);for(let S=0;S<e;S++){let O=new Array(i);for(let P=0;P<i;P++){let F=l*(P+S*i),B=m.subarray(F,F+l);O[P]=rt(aee(B),n)}x[S]=O}return x}function _O(t,e){let r=e.map(n=>Array.from(n).reverse());return(n,o)=>{let[i,a,s,c]=r.map(l=>l.reduce((h,m)=>t.add(t.mul(h,n),m))),[u,f]=Lu(t,[a,c],!0);return n=t.mul(i,u),o=t.mul(o,t.mul(s,f)),{x:n,y:o}}}function SO(t,e,r){if(typeof e!="function")throw new Error("mapToCurve() must be defined");function n(i){return t.fromAffine(e(i))}function o(i){let a=i.clearCofactor();return a.equals(t.ZERO)?t.ZERO:(a.assertValidity(),a)}return{defaults:r,hashToCurve(i,a){let s=AO(i,2,{...r,DST:r.DST,...a}),c=n(s[0]),u=n(s[1]);return o(c.add(u))},encodeToCurve(i,a){let s=AO(i,1,{...r,DST:r.encodeDST,...a});return o(n(s[0]))},mapToCurve(i){if(!Array.isArray(i))throw new Error("expected array of bigints");for(let a of i)if(typeof a!="bigint")throw new Error("expected array of bigints");return o(n(i))}}}var aee,IO=N(()=>{I0();Fu();aee=kr});var NO={};r0(NO,{encodeToCurve:()=>bee,hashToCurve:()=>yee,schnorr:()=>pee,secp256k1:()=>C0,secp256k1_hasher:()=>Q6});function OO(t){let e=R0,r=BigInt(3),n=BigInt(6),o=BigInt(11),i=BigInt(22),a=BigInt(23),s=BigInt(44),c=BigInt(88),u=t*t*t%e,f=u*u*t%e,l=mn(f,r,e)*f%e,h=mn(l,r,e)*f%e,m=mn(h,Xy,e)*u%e,x=mn(m,o,e)*m%e,S=mn(x,i,e)*x%e,O=mn(S,s,e)*S%e,P=mn(O,c,e)*O%e,F=mn(P,s,e)*S%e,B=mn(F,r,e)*f%e,R=mn(B,a,e)*x%e,L=mn(R,n,e)*u%e,T=mn(L,Xy,e);if(!Va.eql(Va.sqr(T),t))throw new Error("Cannot find square root");return T}function Qy(t,...e){let r=BO[t];if(r===void 0){let n=_c(Uint8Array.from(t,o=>o.charCodeAt(0)));r=Er(n,n),BO[t]=r}return _c(Er(r,...e))}function Y6(t){let e=C0.utils.normPrivateKeyToScalar(t),r=X6.fromPrivateKey(e);return{scalar:r.hasEvenY()?e:P0(-e),bytes:J6(r)}}function PO(t){Wi("x",t,O0,R0);let e=W6(t*t),r=W6(e*t+BigInt(7)),n=OO(r);n%Xy!==Z6&&(n=W6(-n));let o=new X6(t,n,O0);return o.assertValidity(),o}function RO(...t){return P0(ju(Qy("BIP0340/challenge",...t)))}function dee(t){return Y6(t).bytes}function lee(t,e,r=La(32)){let n=Rt("message",t),{bytes:o,scalar:i}=Y6(e),a=Rt("auxRand",r,32),s=V6(i^ju(Qy("BIP0340/aux",a))),c=Qy("BIP0340/nonce",s,o,n),u=P0(ju(c));if(u===Z6)throw new Error("sign failed: k is zero");let{bytes:f,scalar:l}=Y6(u),h=RO(f,o,n),m=new Uint8Array(64);if(m.set(f,0),m.set(V6(P0(l+h*i)),32),!CO(m,n,o))throw new Error("sign: Invalid signature produced");return m}function CO(t,e,r){let n=Rt("signature",t,64),o=Rt("message",e),i=Rt("publicKey",r,32);try{let a=PO(ju(i)),s=ju(n.subarray(0,32));if(!Sc(s,O0,R0))return!1;let c=ju(n.subarray(32,64));if(!Sc(c,O0,Jy))return!1;let u=RO(V6(s),J6(a),o),f=uee(a,c,P0(-u));return!(!f||!f.hasEvenY()||f.toAffine().x!==s)}catch{return!1}}var R0,Jy,Z6,O0,Xy,TO,Va,C0,BO,J6,V6,W6,P0,X6,uee,ju,pee,hee,mee,Q6,yee,bee,MO=N(()=>{I6();qo();EO();IO();I0();Fu();G6();R0=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Jy=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Z6=BigInt(0),O0=BigInt(1),Xy=BigInt(2),TO=(t,e)=>(t+e/Xy)/e;Va=S0(R0,void 0,void 0,{sqrt:OO}),C0=wO({a:Z6,b:BigInt(7),Fp:Va,n:Jy,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{let e=Jy,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-O0*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=r,a=BigInt("0x100000000000000000000000000000000"),s=TO(i*t,e),c=TO(-n*t,e),u=rt(t-s*r-c*o,e),f=rt(-s*n-c*i,e),l=u>a,h=f>a;if(l&&(u=e-u),h&&(f=e-f),u>a||f>a)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:l,k1:u,k2neg:h,k2:f}}}},_c),BO={};J6=t=>t.toRawBytes(!0).slice(1),V6=t=>Jo(t,32),W6=t=>rt(t,R0),P0=t=>rt(t,Jy),X6=C0.ProjectivePoint,uee=(t,e,r)=>X6.BASE.multiplyAndAddUnsafe(t,e,r);ju=kr;pee={getPublicKey:dee,sign:lee,verify:CO,utils:{randomPrivateKey:C0.utils.randomPrivateKey,lift_x:PO,pointToBytes:J6,numberToBytesBE:Jo,bytesToNumberBE:kr,taggedHash:Qy,mod:rt}},hee=_O(Va,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(t=>t.map(e=>BigInt(e)))),mee=xO(Va,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:Va.create(BigInt("-11"))}),Q6=SO(C0.ProjectivePoint,t=>{let{x:e,y:r}=mee(Va.create(t[0]));return hee(e,r)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:Va.ORDER,m:1,k:128,expand:"xmd",hash:_c}),yee=Q6.hashToCurve,bee=Q6.encodeToCurve});async function $O({hash:t,signature:e}){let r=Qt(t)?t:ur(t),{secp256k1:n}=await Promise.resolve().then(()=>(MO(),NO));return`0x${(()=>{if(typeof e=="object"&&"r"in e&&"s"in e){let{r:u,s:f,v:l,yParity:h}=e,m=Number(h??l),x=kO(m);return new n.Signature(Xe(u),Xe(f)).addRecoveryBit(x)}let a=Qt(e)?e:ur(e);if(he(a)!==65)throw new Error("invalid signature length");let s=Ot(`0x${a.slice(130)}`),c=kO(s);return n.Signature.fromCompact(a.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(r.substring(2)).toHex(!1)}`}function kO(t){if(t===0||t===1)return t;if(t===27)return 0;if(t===28)return 1;throw new Error("Invalid yParityOrV value")}var FO=N(()=>{$i();Jn();xr();we()});async function LO({hash:t,signature:e}){return GB(await $O({hash:t,signature:e}))}var jO=N(()=>{WB();FO()});function oo(t,e="hex"){let r=UO(t),n=ou(new Uint8Array(r.length));return r.encode(n),e==="hex"?He(n.bytes):n.bytes}function UO(t){return Array.isArray(t)?gee(t.map(e=>UO(e))):vee(t)}function gee(t){let e=t.reduce((o,i)=>o+i.length,0),r=DO(e);return{length:e<=55?1+e:1+r+e,encode(o){e<=55?o.pushByte(192+e):(o.pushByte(247+r),r===1?o.pushUint8(e):r===2?o.pushUint16(e):r===3?o.pushUint24(e):o.pushUint32(e));for(let{encode:i}of t)i(o)}}}function vee(t){let e=typeof t=="string"?wr(t):t,r=DO(e.length);return{length:e.length===1&&e[0]<128?1:e.length<=55?1+e.length:1+r+e.length,encode(o){e.length===1&&e[0]<128?o.pushBytes(e):e.length<=55?(o.pushByte(128+e.length),o.pushBytes(e)):(o.pushByte(183+r),r===1?o.pushUint8(e.length):r===2?o.pushUint16(e.length):r===3?o.pushUint24(e.length):o.pushUint32(e.length),o.pushBytes(e))}}}function DO(t){if(t<2**8)return 1;if(t<2**16)return 2;if(t<2**24)return 3;if(t<2**32)return 4;throw new K("Length is too large.")}var eb=N(()=>{de();Ey();Rn();we()});function zO(t){let{chainId:e,nonce:r,to:n}=t,o=t.contractAddress??t.address,i=eo(Ze(["0x05",oo([e?Z(e):"0x",o,r?Z(r):"0x"])]));return n==="bytes"?wr(i):i}var KO=N(()=>{Nn();Rn();we();eb();Xf()});async function Uu(t){let{authorization:e,signature:r}=t;return LO({hash:zO(e),signature:r??e})}var tb=N(()=>{jO();KO()});var rb,qO=N(()=>{By();su();de();Mr();rb=class extends K{constructor(e,{account:r,docsPath:n,chain:o,data:i,gas:a,gasPrice:s,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:f,to:l,value:h}){let m=wc({from:r?.address,to:l,value:typeof h<"u"&&`${au(h)} ${o?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:a,gasPrice:typeof s<"u"&&`${Mt(s)} gwei`,maxFeePerGas:typeof c<"u"&&`${Mt(c)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${Mt(u)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",m].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}});var Zi,kn,Du,zu,Ku,qu,Hu,Gu,Wu,Vu,Xo,Qo,Bc=N(()=>{su();de();Zi=class extends K{constructor({cause:e,message:r}={}){let n=r?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:e,name:"ExecutionRevertedError"})}};Object.defineProperty(Zi,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(Zi,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted|gas required exceeds allowance/});kn=class extends K{constructor({cause:e,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${Mt(r)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e,name:"FeeCapTooHighError"})}};Object.defineProperty(kn,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});Du=class extends K{constructor({cause:e,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${Mt(r)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e,name:"FeeCapTooLowError"})}};Object.defineProperty(Du,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});zu=class extends K{constructor({cause:e,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}is higher than the next one expected.`,{cause:e,name:"NonceTooHighError"})}};Object.defineProperty(zu,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});Ku=class extends K{constructor({cause:e,nonce:r}={}){super([`Nonce provided for the transaction ${r?`(${r}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
|
|
35
|
+
`),{cause:e,name:"NonceTooLowError"})}};Object.defineProperty(Ku,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});qu=class extends K{constructor({cause:e,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}exceeds the maximum allowed nonce.`,{cause:e,name:"NonceMaxValueError"})}};Object.defineProperty(qu,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});Hu=class extends K{constructor({cause:e}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
|
|
36
|
+
`),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}};Object.defineProperty(Hu,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});Gu=class extends K{constructor({cause:e,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e,name:"IntrinsicGasTooHighError"})}};Object.defineProperty(Gu,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});Wu=class extends K{constructor({cause:e,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction is too low.`,{cause:e,name:"IntrinsicGasTooLowError"})}};Object.defineProperty(Wu,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});Vu=class extends K{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e,name:"TransactionTypeNotSupportedError"})}};Object.defineProperty(Vu,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});Xo=class extends K{constructor({cause:e,maxPriorityFeePerGas:r,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${r?` = ${Mt(r)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${Mt(n)} gwei`:""}).`].join(`
|
|
37
|
+
`),{cause:e,name:"TipAboveFeeCapError"})}};Object.defineProperty(Xo,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});Qo=class extends K{constructor({cause:e}){super(`An error occurred while executing: ${e?.shortMessage}`,{cause:e,name:"UnknownNodeError"})}}});function Yu(t,e){let r=(t.details||"").toLowerCase(),n=t instanceof K?t.walk(o=>o?.code===Zi.code):t;return n instanceof K?new Zi({cause:t,message:n.details}):Zi.nodeMessage.test(r)?new Zi({cause:t,message:t.details}):kn.nodeMessage.test(r)?new kn({cause:t,maxFeePerGas:e?.maxFeePerGas}):Du.nodeMessage.test(r)?new Du({cause:t,maxFeePerGas:e?.maxFeePerGas}):zu.nodeMessage.test(r)?new zu({cause:t,nonce:e?.nonce}):Ku.nodeMessage.test(r)?new Ku({cause:t,nonce:e?.nonce}):qu.nodeMessage.test(r)?new qu({cause:t,nonce:e?.nonce}):Hu.nodeMessage.test(r)?new Hu({cause:t}):Gu.nodeMessage.test(r)?new Gu({cause:t,gas:e?.gas}):Wu.nodeMessage.test(r)?new Wu({cause:t,gas:e?.gas}):Vu.nodeMessage.test(r)?new Vu({cause:t}):Xo.nodeMessage.test(r)?new Xo({cause:t,maxFeePerGas:e?.maxFeePerGas,maxPriorityFeePerGas:e?.maxPriorityFeePerGas}):new Qo({cause:t})}var nb=N(()=>{de();Bc()});function HO(t,{docsPath:e,...r}){let n=(()=>{let o=Yu(t,r);return o instanceof Qo?t:o})();return new rb(n,{docsPath:e,...r})}var GO=N(()=>{qO();Bc();nb()});function ei(t,{format:e}){if(!e)return{};let r={};function n(i){let a=Object.keys(i);for(let s of a)s in t&&(r[s]=t[s]),i[s]&&typeof i[s]=="object"&&!Array.isArray(i[s])&&n(i[s])}let o=e(t||{});return n(o),r}var Zu=N(()=>{});function Ju(t,e){return({exclude:r,format:n})=>({exclude:r,format:(o,i)=>{let a=e(o,i);if(r)for(let s of r)delete a[s];return{...a,...n(o,i)}},type:t})}var ob=N(()=>{});function $n(t,e){let r={};return typeof t.authorizationList<"u"&&(r.authorizationList=wee(t.authorizationList)),typeof t.accessList<"u"&&(r.accessList=t.accessList),typeof t.blobVersionedHashes<"u"&&(r.blobVersionedHashes=t.blobVersionedHashes),typeof t.blobs<"u"&&(typeof t.blobs[0]!="string"?r.blobs=t.blobs.map(n=>He(n)):r.blobs=t.blobs),typeof t.data<"u"&&(r.data=t.data),t.account&&(r.from=t.account.address),typeof t.from<"u"&&(r.from=t.from),typeof t.gas<"u"&&(r.gas=Z(t.gas)),typeof t.gasPrice<"u"&&(r.gasPrice=Z(t.gasPrice)),typeof t.maxFeePerBlobGas<"u"&&(r.maxFeePerBlobGas=Z(t.maxFeePerBlobGas)),typeof t.maxFeePerGas<"u"&&(r.maxFeePerGas=Z(t.maxFeePerGas)),typeof t.maxPriorityFeePerGas<"u"&&(r.maxPriorityFeePerGas=Z(t.maxPriorityFeePerGas)),typeof t.nonce<"u"&&(r.nonce=Z(t.nonce)),typeof t.to<"u"&&(r.to=t.to),typeof t.type<"u"&&(r.type=xee[t.type]),typeof t.value<"u"&&(r.value=Z(t.value)),r}function wee(t){return t.map(e=>({address:e.address,r:e.r?Z(BigInt(e.r)):e.r,s:e.s?Z(BigInt(e.s)):e.s,chainId:Z(e.chainId),nonce:Z(e.nonce),...typeof e.yParity<"u"?{yParity:Z(e.yParity)}:{},...typeof e.v<"u"&&typeof e.yParity>"u"?{v:Z(e.v)}:{}}))}var xee,Oc=N(()=>{we();xee={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"}});function WO(t){if(!(!t||t.length===0))return t.reduce((e,{slot:r,value:n})=>{if(r.length!==66)throw new l0({size:r.length,targetSize:66,type:"hex"});if(n.length!==66)throw new l0({size:n.length,targetSize:66,type:"hex"});return e[r]=n,e},{})}function Eee(t){let{balance:e,nonce:r,state:n,stateDiff:o,code:i}=t,a={};if(i!==void 0&&(a.code=i),e!==void 0&&(a.balance=Z(e)),r!==void 0&&(a.nonce=Z(r)),n!==void 0&&(a.state=WO(n)),o!==void 0){if(a.state)throw new Py;a.stateDiff=WO(o)}return a}function ib(t){if(!t)return;let e={};for(let{address:r,...n}of t){if(!ge(r,{strict:!1}))throw new De({address:r});if(e[r])throw new Oy({address:r});e[r]=Eee(n)}return e}var e5=N(()=>{Ho();ay();S6();Cn();we()});var GFe,WFe,VFe,YFe,ZFe,JFe,XFe,QFe,eLe,tLe,rLe,nLe,oLe,iLe,aLe,sLe,cLe,fLe,uLe,dLe,lLe,pLe,hLe,mLe,yLe,bLe,gLe,vLe,xLe,wLe,ELe,ALe,_Le,SLe,ILe,TLe,BLe,OLe,PLe,RLe,CLe,NLe,MLe,kLe,$Le,FLe,LLe,jLe,ULe,DLe,zLe,KLe,qLe,HLe,GLe,WLe,VLe,YLe,ZLe,JLe,XLe,QLe,eje,tje,rje,nje,oje,ije,aje,sje,cje,fje,uje,dje,lje,pje,hje,mje,yje,bje,gje,vje,xje,wje,Eje,Aje,_je,Sje,Ije,Tje,Bje,Oje,Pje,Rje,Cje,Xu,t5=N(()=>{GFe=2n**(8n-1n)-1n,WFe=2n**(16n-1n)-1n,VFe=2n**(24n-1n)-1n,YFe=2n**(32n-1n)-1n,ZFe=2n**(40n-1n)-1n,JFe=2n**(48n-1n)-1n,XFe=2n**(56n-1n)-1n,QFe=2n**(64n-1n)-1n,eLe=2n**(72n-1n)-1n,tLe=2n**(80n-1n)-1n,rLe=2n**(88n-1n)-1n,nLe=2n**(96n-1n)-1n,oLe=2n**(104n-1n)-1n,iLe=2n**(112n-1n)-1n,aLe=2n**(120n-1n)-1n,sLe=2n**(128n-1n)-1n,cLe=2n**(136n-1n)-1n,fLe=2n**(144n-1n)-1n,uLe=2n**(152n-1n)-1n,dLe=2n**(160n-1n)-1n,lLe=2n**(168n-1n)-1n,pLe=2n**(176n-1n)-1n,hLe=2n**(184n-1n)-1n,mLe=2n**(192n-1n)-1n,yLe=2n**(200n-1n)-1n,bLe=2n**(208n-1n)-1n,gLe=2n**(216n-1n)-1n,vLe=2n**(224n-1n)-1n,xLe=2n**(232n-1n)-1n,wLe=2n**(240n-1n)-1n,ELe=2n**(248n-1n)-1n,ALe=2n**(256n-1n)-1n,_Le=-(2n**(8n-1n)),SLe=-(2n**(16n-1n)),ILe=-(2n**(24n-1n)),TLe=-(2n**(32n-1n)),BLe=-(2n**(40n-1n)),OLe=-(2n**(48n-1n)),PLe=-(2n**(56n-1n)),RLe=-(2n**(64n-1n)),CLe=-(2n**(72n-1n)),NLe=-(2n**(80n-1n)),MLe=-(2n**(88n-1n)),kLe=-(2n**(96n-1n)),$Le=-(2n**(104n-1n)),FLe=-(2n**(112n-1n)),LLe=-(2n**(120n-1n)),jLe=-(2n**(128n-1n)),ULe=-(2n**(136n-1n)),DLe=-(2n**(144n-1n)),zLe=-(2n**(152n-1n)),KLe=-(2n**(160n-1n)),qLe=-(2n**(168n-1n)),HLe=-(2n**(176n-1n)),GLe=-(2n**(184n-1n)),WLe=-(2n**(192n-1n)),VLe=-(2n**(200n-1n)),YLe=-(2n**(208n-1n)),ZLe=-(2n**(216n-1n)),JLe=-(2n**(224n-1n)),XLe=-(2n**(232n-1n)),QLe=-(2n**(240n-1n)),eje=-(2n**(248n-1n)),tje=-(2n**(256n-1n)),rje=2n**8n-1n,nje=2n**16n-1n,oje=2n**24n-1n,ije=2n**32n-1n,aje=2n**40n-1n,sje=2n**48n-1n,cje=2n**56n-1n,fje=2n**64n-1n,uje=2n**72n-1n,dje=2n**80n-1n,lje=2n**88n-1n,pje=2n**96n-1n,hje=2n**104n-1n,mje=2n**112n-1n,yje=2n**120n-1n,bje=2n**128n-1n,gje=2n**136n-1n,vje=2n**144n-1n,xje=2n**152n-1n,wje=2n**160n-1n,Eje=2n**168n-1n,Aje=2n**176n-1n,_je=2n**184n-1n,Sje=2n**192n-1n,Ije=2n**200n-1n,Tje=2n**208n-1n,Bje=2n**216n-1n,Oje=2n**224n-1n,Pje=2n**232n-1n,Rje=2n**240n-1n,Cje=2n**248n-1n,Xu=2n**256n-1n});function $r(t){let{account:e,maxFeePerGas:r,maxPriorityFeePerGas:n,to:o}=t,i=e?ce(e):void 0;if(i&&!ge(i.address))throw new De({address:i.address});if(o&&!ge(o))throw new De({address:o});if(r&&r>Xu)throw new kn({maxFeePerGas:r});if(n&&r&&n>r)throw new Xo({maxFeePerGas:r,maxPriorityFeePerGas:n})}var Ya=N(()=>{Pt();t5();Ho();Bc();Cn()});var Qu,Za,ab,N0=N(()=>{su();de();Qu=class extends K{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}},Za=class extends K{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}},ab=class extends K{constructor({maxPriorityFeePerGas:e}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${Mt(e)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}});var ed,r5=N(()=>{de();ed=class extends K{constructor({blockHash:e,blockNumber:r}){let n="Block";e&&(n=`Block at hash "${e}"`),r&&(n=`Block at number "${r}"`),super(`${n} could not be found.`,{name:"BlockNotFoundError"})}}});function Ji(t,e){let r={...t,blockHash:t.blockHash?t.blockHash:null,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,...t.blockTimestamp!=null&&{blockTimestamp:BigInt(t.blockTimestamp)},chainId:t.chainId?Ot(t.chainId):void 0,gas:t.gas?BigInt(t.gas):void 0,gasPrice:t.gasPrice?BigInt(t.gasPrice):void 0,maxFeePerBlobGas:t.maxFeePerBlobGas?BigInt(t.maxFeePerBlobGas):void 0,maxFeePerGas:t.maxFeePerGas?BigInt(t.maxFeePerGas):void 0,maxPriorityFeePerGas:t.maxPriorityFeePerGas?BigInt(t.maxPriorityFeePerGas):void 0,nonce:t.nonce?Ot(t.nonce):void 0,to:t.to?t.to:null,transactionIndex:t.transactionIndex?Number(t.transactionIndex):null,type:t.type?n5[t.type]:void 0,typeHex:t.type?t.type:void 0,value:t.value?BigInt(t.value):void 0,v:t.v?BigInt(t.v):void 0};return t.authorizationList&&(r.authorizationList=Aee(t.authorizationList)),r.yParity=(()=>{if(t.yParity)return Number(t.yParity);if(typeof r.v=="bigint"){if(r.v===0n||r.v===27n)return 0;if(r.v===1n||r.v===28n)return 1;if(r.v>=35n)return r.v%2n===0n?1:0}})(),r.type==="legacy"&&(delete r.accessList,delete r.maxFeePerBlobGas,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas,delete r.yParity),r.type==="eip2930"&&(delete r.maxFeePerBlobGas,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas),r.type==="eip1559"&&delete r.maxFeePerBlobGas,r}function Aee(t){return t.map(e=>({address:e.address,chainId:Number(e.chainId),nonce:Number(e.nonce),r:e.r,s:e.s,yParity:Number(e.yParity)}))}var n5,VO,td=N(()=>{xr();ob();n5={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};VO=Ju("transaction",Ji)});function o5(t,e){let r=(t.transactions??[]).map(n=>typeof n=="string"?n:Ji(n));return{...t,baseFeePerGas:t.baseFeePerGas?BigInt(t.baseFeePerGas):null,blobGasUsed:t.blobGasUsed?BigInt(t.blobGasUsed):void 0,difficulty:t.difficulty?BigInt(t.difficulty):void 0,excessBlobGas:t.excessBlobGas?BigInt(t.excessBlobGas):void 0,gasLimit:t.gasLimit?BigInt(t.gasLimit):void 0,gasUsed:t.gasUsed?BigInt(t.gasUsed):void 0,hash:t.hash?t.hash:null,logsBloom:t.logsBloom?t.logsBloom:null,nonce:t.nonce?t.nonce:null,number:t.number?BigInt(t.number):null,size:t.size?BigInt(t.size):void 0,timestamp:t.timestamp?BigInt(t.timestamp):void 0,transactions:r,totalDifficulty:t.totalDifficulty?BigInt(t.totalDifficulty):null}}var YO,i5=N(()=>{ob();td();YO=Ju("block",o5)});async function io(t,{blockHash:e,blockNumber:r,blockTag:n=t.experimental_blockTag??"latest",includeTransactions:o}={}){let i=o??!1,a=r!==void 0?Z(r):void 0,s=null;if(e?s=await t.request({method:"eth_getBlockByHash",params:[e,i]},{dedupe:!0}):s=await t.request({method:"eth_getBlockByNumber",params:[a||n,i]},{dedupe:!!a}),!s)throw new ed({blockHash:e,blockNumber:r});return(t.chain?.formatters?.block?.format||o5)(s,"getBlock")}var rd=N(()=>{r5();we();i5()});async function sb(t){let e=await t.request({method:"eth_gasPrice"});return BigInt(e)}var a5=N(()=>{});async function ZO(t,e){let{block:r,chain:n=t.chain,request:o}=e||{};try{let i=n?.fees?.maxPriorityFeePerGas??n?.fees?.defaultPriorityFee;if(typeof i=="function"){let s=r||await oe(t,io,"getBlock")({}),c=await i({block:s,client:t,request:o});if(c===null)throw new Error;return c}if(typeof i<"u")return i;let a=await t.request({method:"eth_maxPriorityFeePerGas"});return Xe(a)}catch{let[i,a]=await Promise.all([r?Promise.resolve(r):oe(t,io,"getBlock")({}),oe(t,sb,"getGasPrice")({})]);if(typeof i.baseFeePerGas!="bigint")throw new Za;let s=a-i.baseFeePerGas;return s<0n?0n:s}}var JO=N(()=>{N0();xr();cr();rd();a5()});async function s5(t,e){let{block:r,chain:n=t.chain,request:o,type:i="eip1559"}=e||{},a=await(async()=>typeof n?.fees?.baseFeeMultiplier=="function"?n.fees.baseFeeMultiplier({block:r,client:t,request:o}):n?.fees?.baseFeeMultiplier??1.2)();if(a<1)throw new Qu;let c=10**(a.toString().split(".")[1]?.length??0),u=h=>h*BigInt(Math.round(a*c))/BigInt(c),f=r||await oe(t,io,"getBlock")({});if(typeof n?.fees?.estimateFeesPerGas=="function"){let h=await n.fees.estimateFeesPerGas({block:r,client:t,multiply:u,request:o,type:i});if(h!==null)return h}if(i==="eip1559"){if(typeof f.baseFeePerGas!="bigint")throw new Za;let h=typeof o?.maxPriorityFeePerGas=="bigint"?o.maxPriorityFeePerGas:await ZO(t,{block:f,chain:n,request:o}),m=u(f.baseFeePerGas);return{maxFeePerGas:o?.maxFeePerGas??m+h,maxPriorityFeePerGas:h}}return{gasPrice:o?.gasPrice??u(await oe(t,sb,"getGasPrice")({}))}}var XO=N(()=>{N0();cr();JO();rd();a5()});function M0(t){let{blockHash:e,blockNumber:r,blockTag:n,requireCanonical:o}=t;if(o!==void 0&&!e)throw new K("`requireCanonical` can only be provided when `blockHash` is set.");return e?o?{blockHash:e,requireCanonical:o}:{blockHash:e}:typeof r=="bigint"?Z(r):n??"latest"}var c5=N(()=>{de();we()});async function cb(t,{address:e,blockHash:r,blockNumber:n,blockTag:o="latest",requireCanonical:i}){let a=M0({blockHash:r,blockNumber:n,blockTag:o,requireCanonical:i}),s=await t.request({method:"eth_getTransactionCount",params:[e,a]},{dedupe:typeof n=="bigint"||r!==void 0});return Ot(s)}var f5=N(()=>{c5();xr()});function nd(t){let{kzg:e}=t,r=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),n=typeof t.blobs[0]=="string"?t.blobs.map(i=>wr(i)):t.blobs,o=[];for(let i of n)o.push(Uint8Array.from(e.blobToKzgCommitment(i)));return r==="bytes"?o:o.map(i=>He(i))}var fb=N(()=>{Rn();we()});function od(t){let{kzg:e}=t,r=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),n=typeof t.blobs[0]=="string"?t.blobs.map(a=>wr(a)):t.blobs,o=typeof t.commitments[0]=="string"?t.commitments.map(a=>wr(a)):t.commitments,i=[];for(let a=0;a<n.length;a++){let s=n[a],c=o[a];i.push(Uint8Array.from(e.computeBlobKzgProof(s,c)))}return r==="bytes"?i:i.map(a=>He(a))}var ub=N(()=>{Rn();we()});var QO,eP=N(()=>{I6();QO=_c});function tP(t,e){let r=e||"hex",n=QO(Qt(t,{strict:!1})?$a(t):t);return r==="bytes"?n:ur(n)}var rP=N(()=>{eP();$i();Rn();we()});function nP(t){let{commitment:e,version:r=1}=t,n=t.to??(typeof e=="string"?"hex":"bytes"),o=tP(e,"bytes");return o.set([r],0),n==="bytes"?o:He(o)}var oP=N(()=>{we();rP()});function db(t){let{commitments:e,version:r}=t,n=t.to??(typeof e[0]=="string"?"hex":"bytes"),o=[];for(let i of e)o.push(nP({commitment:i,to:n,version:r}));return o}var u5=N(()=>{oP()});var lb,id,pb,hb,d5=N(()=>{de();lb=class extends K{constructor({maxSize:e,size:r}){super("Blob size is too large.",{metaMessages:[`Max: ${e} bytes`,`Given: ${r} bytes`],name:"BlobSizeTooLargeError"})}},id=class extends K{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}},pb=class extends K{constructor({hash:e,size:r}){super(`Versioned hash "${e}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${r}`],name:"InvalidVersionedHashSizeError"})}},hb=class extends K{constructor({hash:e,version:r}){super(`Versioned hash "${e}" version is invalid.`,{metaMessages:[`Expected: ${1}`,`Received: ${r}`],name:"InvalidVersionedHashVersionError"})}}});function iP(t){let e=t.to??(typeof t.data=="string"?"hex":"bytes"),r=typeof t.data=="string"?wr(t.data):t.data,n=he(r);if(!n)throw new id;if(n>761855)throw new lb({maxSize:761855,size:n});let o=[],i=!0,a=0;for(;i;){let s=ou(new Uint8Array(131072)),c=0;for(;c<4096;){let u=r.slice(a,a+31);if(s.pushByte(0),s.pushBytes(u),u.length<31){s.pushByte(128),i=!1;break}c++,a+=31}o.push(s)}return e==="bytes"?o.map(s=>s.bytes):o.map(s=>He(s.bytes))}var aP=N(()=>{d5();Ey();Jn();Rn();we()});function mb(t){let{data:e,kzg:r,to:n}=t,o=t.blobs??iP({data:e,to:n}),i=t.commitments??nd({blobs:o,kzg:r,to:n}),a=t.proofs??od({blobs:o,commitments:i,kzg:r,to:n}),s=[];for(let c=0;c<o.length;c++)s.push({blob:o[c],commitment:i[c],proof:a[c]});return s}var l5=N(()=>{fb();ub();aP()});function yb(t){if(t.type)return t.type;if(typeof t.authorizationList<"u")return"eip7702";if(typeof t.blobs<"u"||typeof t.blobVersionedHashes<"u"||typeof t.maxFeePerBlobGas<"u"||typeof t.sidecars<"u")return"eip4844";if(typeof t.maxFeePerGas<"u"||typeof t.maxPriorityFeePerGas<"u")return"eip1559";if(typeof t.gasPrice<"u")return typeof t.accessList<"u"?"eip2930":"legacy";throw new Cy({transaction:t})}var p5=N(()=>{Mr()});function Ja(t,{docsPath:e,...r}){let n=(()=>{let o=Yu(t,r);return o instanceof Qo?t:o})();return new My(n,{docsPath:e,...r})}var k0=N(()=>{Bc();Mr();nb()});async function Fr(t){let e=await t.request({method:"eth_chainId"},{dedupe:!0});return Ot(e)}var Xa=N(()=>{xr()});async function bb(t,e){let{account:r=t.account,accessList:n,authorizationList:o,chain:i=t.chain,blobVersionedHashes:a,blobs:s,data:c,gas:u,gasPrice:f,maxFeePerBlobGas:l,maxFeePerGas:h,maxPriorityFeePerGas:m,nonce:x,nonceManager:S,to:O,type:P,value:F,...B}=e,R=await(async()=>{if(!r||!S||typeof x<"u")return x;let $=ce(r),k=i?i.id:await oe(t,Fr,"getChainId")({});return await S.consume({address:$.address,chainId:k,client:t})})();$r(e);let L=i?.formatters?.transactionRequest?.format,M=(L||$n)({...ei(B,{format:L}),account:r?ce(r):void 0,accessList:n,authorizationList:o,blobs:s,blobVersionedHashes:a,data:c,gas:u,gasPrice:f,maxFeePerBlobGas:l,maxFeePerGas:h,maxPriorityFeePerGas:m,nonce:R,to:O,type:P,value:F},"fillTransaction");try{let $=await t.request({method:"eth_fillTransaction",params:[M]}),v=(i?.formatters?.transaction?.format||Ji)($.tx);delete v.blockHash,delete v.blockNumber,delete v.r,delete v.s,delete v.transactionIndex,delete v.v,delete v.yParity,v.data=v.input;let d=typeof v.feePayerSignature<"u"&&v.feePayerSignature!==null;if(d&&typeof R<"u"&&v.nonce!==R)throw new cu({filledNonce:v.nonce,requestedNonce:R});if(!d){v.gas&&(v.gas=e.gas??v.gas),v.gasPrice&&(v.gasPrice=e.gasPrice??v.gasPrice),v.maxFeePerBlobGas&&(v.maxFeePerBlobGas=e.maxFeePerBlobGas??v.maxFeePerBlobGas),v.maxFeePerGas&&(v.maxFeePerGas=e.maxFeePerGas??v.maxFeePerGas),v.maxPriorityFeePerGas&&(v.maxPriorityFeePerGas=e.maxPriorityFeePerGas??v.maxPriorityFeePerGas),typeof v.nonce<"u"&&(v.nonce=e.nonce??v.nonce);let y=await(async()=>{if(typeof i?.fees?.baseFeeMultiplier=="function"){let E=await oe(t,io,"getBlock")({});return i.fees.baseFeeMultiplier({block:E,client:t,request:e})}return i?.fees?.baseFeeMultiplier??1.2})();if(y<1)throw new Qu;let g=10**(y.toString().split(".")[1]?.length??0),A=E=>E*BigInt(Math.round(y*g))/BigInt(g);v.maxFeePerGas&&!e.maxFeePerGas&&(v.maxFeePerGas=A(v.maxFeePerGas)),v.gasPrice&&!e.gasPrice&&(v.gasPrice=A(v.gasPrice))}return{raw:$.raw,transaction:{from:M.from,...v},...$.capabilities?{capabilities:$.capabilities}:{}}}catch($){throw Ja($,{...e,chain:t.chain})}}var h5=N(()=>{Pt();N0();Mr();k0();Zu();td();Oc();cr();Ya();rd();Xa()});async function Qa(t,e){let r=e;r.account??=t.account,r.parameters??=$0;let{account:n,chain:o=t.chain,nonceManager:i,parameters:a}=r,s=(()=>{if(typeof o?.prepareTransactionRequest=="function")return{fn:o.prepareTransactionRequest,runAt:["beforeFillTransaction"]};if(Array.isArray(o?.prepareTransactionRequest))return{fn:o.prepareTransactionRequest[0],runAt:o.prepareTransactionRequest[1].runAt}})(),c;async function u(){return c||(typeof r.chainId<"u"?r.chainId:o?o.id:(c=await oe(t,Fr,"getChainId")({}),c))}let f=n&&ce(n),l=r.nonce;if(s?.fn&&s.runAt?.includes("beforeFillTransaction")){r=await s.fn({...r,chain:o},{client:t,phase:"beforeFillTransaction"}),l??=r.nonce;let R=r.account??r.from;f=R?ce(R):void 0}if(a.includes("nonce")&&typeof l>"u"&&f&&i){let R=await u();l=await i.consume({address:f.address,chainId:R,client:t})}let m=((a.includes("blobVersionedHashes")||a.includes("sidecars"))&&r.kzg&&r.blobs?!1:a.length>0&&"feePayer"in r&&r.feePayer&&!("feePayerSignature"in r&&r.feePayerSignature)?!0:m5.get(t.uid)===!1||!["fees","gas"].some(L=>a.includes(L))?!1:!!(a.includes("chainId")&&typeof r.chainId!="number"||a.includes("nonce")&&typeof l!="number"||a.includes("fees")&&typeof r.gasPrice!="bigint"&&(typeof r.maxFeePerGas!="bigint"||typeof r.maxPriorityFeePerGas!="bigint")||a.includes("gas")&&typeof r.gas!="bigint"))?await oe(t,bb,"fillTransaction")({...r,nonce:l}).then(R=>{let{chainId:L,from:T,gas:M,gasPrice:$,nonce:k,maxFeePerBlobGas:v,maxFeePerGas:d,maxPriorityFeePerGas:y,type:b,...g}=R.transaction,A="feeToken"in g?g.feeToken:void 0,E="feePayerSignature"in g&&g.feePayerSignature!==null&&typeof g.feePayerSignature<"u",w=typeof A<"u"&&A!==null&&(!("feeToken"in r)||E);return m5.set(t.uid,!0),{...r,...T?{from:T}:{},...b&&!r.type?{type:b}:{},...typeof L<"u"?{chainId:L}:{},...typeof M<"u"?{gas:M}:{},...typeof $<"u"?{gasPrice:$}:{},...typeof k<"u"?{nonce:k}:{},...typeof v<"u"&&r.type!=="legacy"&&r.type!=="eip2930"?{maxFeePerBlobGas:v}:{},...typeof d<"u"&&r.type!=="legacy"&&r.type!=="eip2930"?{maxFeePerGas:d}:{},...typeof y<"u"&&r.type!=="legacy"&&r.type!=="eip2930"?{maxPriorityFeePerGas:y}:{},..."nonceKey"in g&&typeof g.nonceKey<"u"?{nonceKey:g.nonceKey}:{},..."validBefore"in g&&g.validBefore!==null&&typeof g.validBefore<"u"?{validBefore:g.validBefore}:{},..."validAfter"in g&&g.validAfter!==null&&typeof g.validAfter<"u"?{validAfter:g.validAfter}:{},..."keyAuthorization"in g&&typeof g.keyAuthorization<"u"&&g.keyAuthorization!==null&&!("keyAuthorization"in r)?{keyAuthorization:g.keyAuthorization}:{},..."feePayerSignature"in g&&typeof g.feePayerSignature<"u"&&g.feePayerSignature!==null?{feePayerSignature:g.feePayerSignature}:{},...w?{feeToken:A}:{},...R.capabilities?{_capabilities:R.capabilities}:{}}}).catch(R=>{let L=R;if(L.name!=="TransactionExecutionError")return r;if(L.walk?.(k=>k instanceof cu)||L.walk?.(k=>k.name==="ExecutionRevertedError"))throw R;return L.walk?.(k=>{let v=k;return v.name==="MethodNotFoundRpcError"||v.name==="MethodNotSupportedRpcError"||v.message?.includes("eth_fillTransaction is not available")})&&m5.set(t.uid,!1),r}):r;l??=m.nonce,r={...m,...f?{from:f?.address}:{},...typeof l<"u"?{nonce:l}:{}};let{blobs:x,gas:S,kzg:O,type:P}=r;s?.fn&&s.runAt?.includes("beforeFillParameters")&&(r=await s.fn({...r,chain:o},{client:t,phase:"beforeFillParameters"}));let F;async function B(){return F||(F=await oe(t,io,"getBlock")({blockTag:"latest"}),F)}if(a.includes("nonce")&&typeof l>"u"&&f&&!i&&(r.nonce=await oe(t,cb,"getTransactionCount")({address:f.address,blockTag:"pending"})),(a.includes("blobVersionedHashes")||a.includes("sidecars"))&&x&&O){let R=nd({blobs:x,kzg:O});if(a.includes("blobVersionedHashes")){let L=db({commitments:R,to:"hex"});r.blobVersionedHashes=L}if(a.includes("sidecars")){let L=od({blobs:x,commitments:R,kzg:O}),T=mb({blobs:x,commitments:R,proofs:L,to:"hex"});r.sidecars=T}}if(a.includes("chainId")&&(r.chainId=await u()),(a.includes("fees")||a.includes("type"))&&typeof P>"u")try{r.type=yb(r)}catch{let R=sP.get(t.uid);typeof R>"u"&&(R=typeof(await B())?.baseFeePerGas=="bigint",sP.set(t.uid,R)),r.type=R?"eip1559":"legacy"}if(a.includes("fees"))if(r.type!=="legacy"&&r.type!=="eip2930"){if(typeof r.maxFeePerGas>"u"||typeof r.maxPriorityFeePerGas>"u"){let R=await B(),{maxFeePerGas:L,maxPriorityFeePerGas:T}=await s5(t,{block:R,chain:o,request:r});if(typeof r.maxPriorityFeePerGas>"u"&&r.maxFeePerGas&&r.maxFeePerGas<T)throw new ab({maxPriorityFeePerGas:T});r.maxPriorityFeePerGas=T,r.maxFeePerGas=L}}else{if(typeof r.maxFeePerGas<"u"||typeof r.maxPriorityFeePerGas<"u")throw new Za;if(typeof r.gasPrice>"u"){let R=await B(),{gasPrice:L}=await s5(t,{block:R,chain:o,request:r,type:"legacy"});r.gasPrice=L}}return a.includes("gas")&&typeof S>"u"&&(r.gas=await oe(t,gb,"estimateGas")({...r,account:f,prepare:f?.type==="local"?[]:["blobVersionedHashes"]})),s?.fn&&s.runAt?.includes("afterFillParameters")&&(r=await s.fn({...r,chain:o},{client:t,phase:"afterFillParameters"})),$r(r),delete r.parameters,r}var $0,sP,m5,F0=N(()=>{Pt();XO();y5();rd();f5();N0();Mr();fb();ub();u5();l5();cr();bc();Ya();p5();h5();Xa();$0=["blobVersionedHashes","chainId","fees","gas","nonce","type"],sP=new Map,m5=new Nr(128)});async function gb(t,e){let{account:r=t.account,prepare:n=!0}=e,o=r?ce(r):void 0,i=(()=>{if(Array.isArray(n))return n;if(o?.type!=="local")return["blobVersionedHashes"]})();try{let a=await(async()=>{if(e.to)return e.to;if(e.authorizationList&&e.authorizationList.length>0)return await Uu({authorization:e.authorizationList[0]}).catch(()=>{throw new K("`to` is required. Could not infer from `authorizationList`")})})(),{accessList:s,authorizationList:c,blobs:u,blobVersionedHashes:f,blockNumber:l,blockTag:h,data:m,gas:x,gasPrice:S,maxFeePerBlobGas:O,maxFeePerGas:P,maxPriorityFeePerGas:F,nonce:B,value:R,stateOverride:L,...T}=n?await Qa(t,{...e,parameters:i,to:a}):e;if(x&&e.gas!==x)return x;let $=(typeof l=="bigint"?Z(l):void 0)||h,k=ib(L);$r(e);let v=t.chain?.formatters?.transactionRequest?.format,y=(v||$n)({...ei(T,{format:v}),account:o,accessList:s,authorizationList:c,blobs:u,blobVersionedHashes:f,data:m,gasPrice:S,maxFeePerBlobGas:O,maxFeePerGas:P,maxPriorityFeePerGas:F,nonce:B,to:a,value:R},"estimateGas");return BigInt(await t.request({method:"eth_estimateGas",params:k?[y,$??t.experimental_blockTag??"latest",k]:$?[y,$]:[y]}))}catch(a){throw HO(a,{...e,account:o,chain:t.chain})}}var y5=N(()=>{Pt();de();tb();we();GO();Zu();Oc();e5();Ya();F0()});async function vb(t,e){let{abi:r,address:n,args:o,functionName:i,dataSuffix:a=typeof t.dataSuffix=="string"?t.dataSuffix:t.dataSuffix?.value,...s}=e,c=hn({abi:r,args:o,functionName:i});try{return await oe(t,gb,"estimateGas")({data:`${c}${a?a.replace("0x",""):""}`,to:n,...s})}catch(u){let f=s.account?ce(s.account):void 0;throw Nu(u,{abi:r,address:n,args:o,docsPath:"/docs/contract/estimateContractGas",functionName:i,sender:f?.address})}}var b5=N(()=>{Pt();vc();qy();cr();y5()});function Lr(t,e){if(!ge(t,{strict:!1}))throw new De({address:t});if(!ge(e,{strict:!1}))throw new De({address:e});return t.toLowerCase()===e.toLowerCase()}var Pc=N(()=>{Ho();Cn()});function xb(t,{args:e,eventName:r}={}){return{...t,blockHash:t.blockHash?t.blockHash:null,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,blockTimestamp:t.blockTimestamp?BigInt(t.blockTimestamp):t.blockTimestamp===null?null:void 0,logIndex:t.logIndex?Number(t.logIndex):null,transactionHash:t.transactionHash?t.transactionHash:null,transactionIndex:t.transactionIndex?Number(t.transactionIndex):null,...r?{args:e,eventName:r}:{}}}var g5=N(()=>{});function v5(t){let{abi:e,data:r,strict:n,topics:o}=t,i=n??!0,[a,...s]=o;if(!a)throw new Xm({docsPath:cP});let c=e.find(P=>P.type==="event"&&a===Qf(Xt(P)));if(!(c&&"name"in c)||c.type!=="event")throw new Qm(a,{docsPath:cP});let{name:u,inputs:f}=c,l=f?.some(P=>!("name"in P&&P.name)),h=l?[]:{},m=f.map((P,F)=>[P,F]).filter(([P])=>"indexed"in P&&P.indexed),x=[];for(let P=0;P<m.length;P++){let[F,B]=m[P],R=s[P];if(!R){if(i)throw new ny({abiItem:c,param:F});x.push([F,B]);continue}h[l?B:F.name||B]=Iee({param:F,value:R})}let S=f.filter(P=>!("indexed"in P&&P.indexed)),O=i?S:[...x.map(([P])=>P),...S];if(O.length>0){if(r&&r!=="0x")try{let P=Di(O,r);if(P){let F=0;if(!i)for(let[B,R]of x)h[l?R:B.name||R]=P[F++];if(l)for(let B=0;B<f.length;B++)h[B]===void 0&&F<P.length&&(h[B]=P[F++]);else for(let B=0;B<S.length;B++)h[S[B].name]=P[F++]}}catch(P){if(i)throw P instanceof Vf||P instanceof nu?new f0({abiItem:c,data:r,params:O,size:he(r)}):P}else if(i)throw new f0({abiItem:c,data:"0x",params:O,size:0})}return{eventName:u,args:Object.values(h).length>0?h:void 0}}function Iee({param:t,value:e}){return t.type==="string"||t.type==="bytes"||t.type==="tuple"||t.type.match(/^(.*)\[(\d+)?\]$/)?e:(Di([t],e)||[])[0]}var cP,fP=N(()=>{fr();x6();Jn();yy();x0();Ca();cP="/docs/contract/decodeEventLog"});function wb(t){let{abi:e,args:r,logs:n,strict:o=!0}=t,i=(()=>{if(t.eventName)return Array.isArray(t.eventName)?t.eventName:[t.eventName]})(),a=e.filter(s=>s.type==="event").map(s=>({abi:s,selector:Qf(s)}));return n.map(s=>{let c=typeof s.blockNumber=="string"?xb(s):s,u=a.filter(h=>c.topics[0]===h.selector);if(u.length===0)return null;let f,l;for(let h of u)try{f=v5({...c,abi:[h.abi],strict:!0}),l=h;break}catch{}if(!f&&!o){l=u[0];try{f=v5({data:c.data,topics:c.topics,abi:[l.abi],strict:!1})}catch{let h=l.abi.inputs?.some(m=>!("name"in m&&m.name));return{...c,args:h?[]:{},eventName:l.abi.name}}}return!f||!l||i&&!i.includes(f.eventName)||!Tee({args:f.args,inputs:l.abi.inputs,matchArgs:r})?null:{...f,...c}}).filter(Boolean)}function Tee(t){let{args:e,inputs:r,matchArgs:n}=t;if(!n)return!0;if(!e)return!1;function o(i,a,s){try{return i.type==="address"?Lr(a,s):i.type==="string"?eo(m0(a))===s:i.type==="bytes"?eo($a(a))===s:a===s}catch{return!1}}return Array.isArray(e)&&Array.isArray(n)?n.every((i,a)=>{if(i==null)return!0;let s=r[a];return s?(Array.isArray(i)?i:[i]).some(u=>o(s,u,e[a])):!1}):typeof e=="object"&&!Array.isArray(e)&&typeof n=="object"&&!Array.isArray(n)?Object.entries(n).every(([i,a])=>{if(a==null)return!0;let s=r.find(u=>u.name===i);return s?(Array.isArray(a)?a:[a]).some(u=>o(s,u,e[i])):!1}):!1}var x5=N(()=>{Pc();Rn();g5();Xf();yy();fP()});function Eb(t){let{abi:e,args:r,functionName:n,data:o}=t,i=e[0];if(n){let s=Vo({abi:e,args:r,name:n});if(!s)throw new Xn(n,{docsPath:w5});i=s}if(i.type!=="function")throw new Xn(void 0,{docsPath:w5});if(!i.outputs)throw new Zf(i.name,{docsPath:w5});let a=Di(i.outputs,o);if(a&&a.length>1)return a;if(a&&a.length===1)return a[0]}var w5,E5=N(()=>{fr();x0();ru();w5="/docs/contract/decodeFunctionResult"});var uP,dP=N(()=>{uP="0.1.1"});function lP(){return uP}var pP=N(()=>{dP()});function hP(t,e){return e?.(t)?t:t&&typeof t=="object"&&"cause"in t&&t.cause?hP(t.cause,e):e?null:t}var es,mP=N(()=>{pP();es=class t extends Error{static setStaticOptions(e){t.prototype.docsOrigin=e.docsOrigin,t.prototype.showVersion=e.showVersion,t.prototype.version=e.version}constructor(e,r={}){let n=(()=>{if(r.cause instanceof t){if(r.cause.details)return r.cause.details;if(r.cause.shortMessage)return r.cause.shortMessage}return r.cause&&"details"in r.cause&&typeof r.cause.details=="string"?r.cause.details:r.cause?.message?r.cause.message:r.details})(),o=r.cause instanceof t&&r.cause.docsPath||r.docsPath,i=r.docsOrigin??t.prototype.docsOrigin,a=`${i}${o??""}`,s=!!(r.version??t.prototype.showVersion),c=r.version??t.prototype.version,u=[e||"An error occurred.",...r.metaMessages?["",...r.metaMessages]:[],...n||o||s?["",n?`Details: ${n}`:void 0,o?`See: ${a}`:void 0,s?`Version: ${c}`:void 0]:[]].filter(f=>typeof f=="string").join(`
|
|
38
|
+
`);super(u,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsOrigin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showVersion",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.cause=r.cause,this.details=n,this.docs=a,this.docsOrigin=i,this.docsPath=o,this.shortMessage=e,this.showVersion=s,this.version=c}walk(e){return hP(this,e)}};Object.defineProperty(es,"defaultStaticOptions",{enumerable:!0,configurable:!0,writable:!0,value:{docsOrigin:"https://oxlib.sh",showVersion:!1,version:`ox@${lP()}`}});es.setStaticOptions(es.defaultStaticOptions)});function yP(t,e={}){let{dir:r,size:n=32}=e;if(n===0)return t;let o=t.replace("0x","");if(o.length>n*2)throw new Ab({size:Math.ceil(o.length/2),targetSize:n,type:"Hex"});return`0x${o[r==="right"?"padEnd":"padStart"](n*2,"0")}`}var bP=N(()=>{_b()});function ao(t,e={}){let{signed:r,size:n}=e,o=BigInt(t),i;n?r?i=(1n<<BigInt(n)*8n-1n)-1n:i=2n**(BigInt(n)*8n)-1n:typeof t=="number"&&(i=BigInt(Number.MAX_SAFE_INTEGER));let a=typeof i=="bigint"&&r?-i-1n:0;if(i&&o>i||o<a){let u=typeof t=="bigint"?"n":"";throw new _5({max:i?`${i}${u}`:void 0,min:`${a}${u}`,signed:r,size:n,value:`${t}${u}`})}let c=`0x${(r&&o<0?BigInt.asUintN(n*8,BigInt(o)):o).toString(16)}`;return n?Pee(c,n):c}function Pee(t,e){return yP(t,{dir:"left",size:e})}var _5,Ab,_b=N(()=>{mP();bP();_5=class extends es{constructor({max:e,min:r,signed:n,size:o,value:i}){super(`Number \`${i}\` is not in safe${o?` ${o*8}-bit`:""}${n?" signed":" unsigned"} integer range ${e?`(\`${r}\` to \`${e}\`)`:`(above \`${r}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}},Ab=class extends es{constructor({size:e,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (\`${e}\`) exceeds padding size (\`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}});function gP(t){return{address:t.address,amount:ao(t.amount),index:ao(t.index),validatorIndex:ao(t.validatorIndex)}}var vP=N(()=>{_b()});function xP(t){return{...typeof t.baseFeePerGas=="bigint"&&{baseFeePerGas:ao(t.baseFeePerGas)},...typeof t.blobBaseFee=="bigint"&&{blobBaseFee:ao(t.blobBaseFee)},...typeof t.feeRecipient=="string"&&{feeRecipient:t.feeRecipient},...typeof t.gasLimit=="bigint"&&{gasLimit:ao(t.gasLimit)},...typeof t.number=="bigint"&&{number:ao(t.number)},...typeof t.prevRandao=="bigint"&&{prevRandao:ao(t.prevRandao)},...typeof t.time=="bigint"&&{time:ao(t.time)},...t.withdrawals&&{withdrawals:t.withdrawals.map(gP)}}}var wP=N(()=>{_b();vP()});var S5,Sb,EP,$ze,Fze,Rc,L0=N(()=>{S5=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{name:"addr",type:"address"}],name:"getEthBalance",outputs:[{name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],Sb=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}],EP=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"},{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}],$ze=[...EP,{name:"resolveWithGateways",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],Fze=[...EP,{name:"reverseWithGateways",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"uint256",name:"coinType"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolver"},{type:"address",name:"reverseResolver"}]}],Rc=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}]});var AP,_P=N(()=>{AP="0x82ad56cb"});var SP,IP,TP,BP=N(()=>{SP="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",IP="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",TP="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033"});var Cc,Ib,Tb,j0,Nc,U0=N(()=>{de();Cc=class extends K{constructor({blockNumber:e,chain:r,contract:n}){super(`Chain "${r.name}" does not support contract "${n.name}".`,{metaMessages:["This could be due to any of the following:",...e&&n.blockCreated&&n.blockCreated>e?[`- The contract "${n.name}" was not deployed until block ${n.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${n.name}" configured.`]],name:"ChainDoesNotSupportContract"})}},Ib=class extends K{constructor({chain:e,currentChainId:r}){super(`The current chain of the wallet (id: ${r}) does not match the target chain for the transaction (id: ${e.id} \u2013 ${e.name}).`,{metaMessages:[`Current Chain ID: ${r}`,`Expected Chain ID: ${e.id} \u2013 ${e.name}`],name:"ChainMismatchError"})}},Tb=class extends K{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(`
|
|
39
|
+
`),{name:"ChainNotFoundError"})}},j0=class extends K{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}},Nc=class extends K{constructor({chainId:e}){super(typeof e=="number"?`Chain ID "${e}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}});function D0(t){let{abi:e,args:r,bytecode:n}=t;if(!r||r.length===0)return n;let o=e.find(a=>"type"in a&&a.type==="constructor");if(!o)throw new Wm({docsPath:I5});if(!("inputs"in o))throw new s0({docsPath:I5});if(!o.inputs||o.inputs.length===0)throw new s0({docsPath:I5});let i=Go(o.inputs,r);return Ze([n,i])}var I5,T5=N(()=>{fr();Nn();gc();I5="/docs/contract/encodeDeployData"});function OP({blockNumber:t,chain:e,contract:r}){let n=e?.contracts?.[r];if(!n)throw new Cc({chain:e,contract:{name:r}});if(t&&n.blockCreated&&n.blockCreated>t)throw new Cc({blockNumber:t,chain:e,contract:{name:r,blockCreated:n.blockCreated}});return n.address}var PP=N(()=>{U0()});function RP(t,{docsPath:e,...r}){let n=(()=>{let o=Yu(t,r);return o instanceof Qo?t:o})();return new $y(n,{docsPath:e,...r})}var CP=N(()=>{Dy();Bc();nb()});function ad(){let t=()=>{},e=()=>{};return{promise:new Promise((n,o)=>{t=n,e=o}),resolve:t,reject:e}}var Bb=N(()=>{});function NP({fn:t,id:e,shouldSplitBatch:r,wait:n=0,sort:o}){let i=async()=>{let f=c();a();let l=f.map(({args:h})=>h);l.length!==0&&t(l).then(h=>{o&&Array.isArray(h)&&h.sort(o);for(let m=0;m<f.length;m++){let{resolve:x}=f[m];x?.([h[m],h])}}).catch(h=>{for(let m=0;m<f.length;m++){let{reject:x}=f[m];x?.(h)}})},a=()=>B5.delete(e),s=()=>c().map(({args:f})=>f),c=()=>B5.get(e)||[],u=f=>B5.set(e,[...c(),f]);return{flush:a,async schedule(f){let{promise:l,resolve:h,reject:m}=ad();return r?.([...s(),f])&&i(),c().length>0?(u({args:f,resolve:h,reject:m}),l):(u({args:f,resolve:h,reject:m}),setTimeout(i,n),l)}}}var B5,MP=N(()=>{Bb();B5=new Map});var Ob,Pb,Rb,kP=N(()=>{ro();de();zi();Ob=class extends K{constructor({callbackSelector:e,cause:r,data:n,extraData:o,sender:i,urls:a}){super(r.shortMessage||"An error occurred while fetching for an offchain result.",{cause:r,metaMessages:[...r.metaMessages||[],r.metaMessages?.length?"":[],"Offchain Gateway Call:",a&&[" Gateway URL(s):",...a.map(s=>` ${du(s)}`)],` Sender: ${i}`,` Data: ${n}`,` Callback selector: ${e}`,` Extra data: ${o}`].flat(),name:"OffchainLookupError"})}},Pb=class extends K{constructor({result:e,url:r}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${du(r)}`,`Response: ${Qe(e)}`],name:"OffchainLookupResponseMalformedError"})}},Rb=class extends K{constructor({sender:e,to:r}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${r}`,`OffchainLookup sender address: ${e}`],name:"OffchainLookupSenderMismatchError"})}}});function $P(t){let{abi:e,data:r}=t,n=Mn(r,0,4),o=e.find(i=>i.type==="function"&&n===Wo(Xt(i)));if(!o)throw new ey(n,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:o.name,args:"inputs"in o&&o.inputs&&o.inputs.length>0?Di(o.inputs,Mn(r,4)):void 0}}var FP=N(()=>{fr();ja();tu();x0();Ca()});function P5(t){let{abi:e,errorName:r,args:n}=t,o=e[0];if(r){let c=Vo({abi:e,args:n,name:r});if(!c)throw new c0(r,{docsPath:O5});o=c}if(o.type!=="error")throw new c0(void 0,{docsPath:O5});let i=Xt(o),a=Wo(i),s="0x";if(n&&n.length>0){if(!o.inputs)throw new Jm(o.name,{docsPath:O5});s=Go(o.inputs,n)}return Ze([a,s])}var O5,LP=N(()=>{fr();Nn();tu();gc();Ca();ru();O5="/docs/contract/encodeErrorResult"});function jP(t){let{abi:e,functionName:r,result:n}=t,o=e[0];if(r){let a=Vo({abi:e,name:r});if(!a)throw new Xn(r,{docsPath:R5});o=a}if(o.type!=="function")throw new Xn(void 0,{docsPath:R5});if(!o.outputs)throw new Zf(o.name,{docsPath:R5});let i=(()=>{if(o.outputs.length===0)return[];if(o.outputs.length===1)return[n];if(Array.isArray(n))return n;throw new Jf(n)})();return Go(o.outputs,i)}var R5,UP=N(()=>{fr();gc();ru();R5="/docs/contract/encodeFunctionResult"});async function N5(t){let{data:e,ccipRequest:r}=t,{args:[n]}=$P({abi:Sb,data:e}),o=[],i=[];return await Promise.all(n.map(async(a,s)=>{try{i[s]=a.urls.includes(C5)?await N5({data:a.data,ccipRequest:r}):await r(a),o[s]=!1}catch(c){o[s]=!0,i[s]=Nee(c)}})),jP({abi:Sb,functionName:"query",result:[o,i]})}function Nee(t){return t.name==="HttpRequestError"&&t.status?P5({abi:Sb,errorName:"HttpError",args:[t.status,t.shortMessage]}):P5({abi:[vy],errorName:"Error",args:["shortMessage"in t?t.shortMessage:t.message]})}var C5,DP=N(()=>{L0();xy();FP();LP();UP();C5="x-batch-gateway:true"});var qP={};r0(qP,{ccipRequest:()=>KP,offchainLookup:()=>kee,offchainLookupAbiItem:()=>zP,offchainLookupSignature:()=>Mee});async function kee(t,{blockNumber:e,blockTag:r,data:n,requestOptions:o,to:i}){let{args:a}=Ay({data:n,abi:[zP]}),[s,c,u,f,l]=a,{ccipRead:h}=t,m=h&&typeof h?.request=="function"?h.request:KP;try{if(!Lr(i,s))throw new Rb({sender:s,to:i});let x=c.includes(C5)?await N5({data:u,ccipRequest:O=>m({...O,requestOptions:o})}):await m({data:u,requestOptions:o,sender:s,urls:c}),{data:S}=await Cb(t,{blockNumber:e,blockTag:r,data:to([f,Go([{type:"bytes"},{type:"bytes"}],[x,l])]),requestOptions:o,to:i});return S}catch(x){throw o?.signal?.aborted?dr(o.signal):Zo(x)?x:new Ob({callbackSelector:f,cause:x,data:n,extraData:l,sender:s,urls:c})}}async function KP({data:t,requestOptions:e,sender:r,urls:n}){let o=new Error("An unknown error occurred.");for(let i=0;i<n.length;i++){if(e?.signal?.aborted)throw dr(e.signal);let a=n[i],s=a.includes("{data}")?"GET":"POST",c=s==="POST"?{data:t,sender:r}:void 0,u=s==="POST"?{"Content-Type":"application/json"}:{};try{let f=await fetch(a.replace("{sender}",r.toLowerCase()).replace("{data}",t),{body:JSON.stringify(c),headers:u,method:s,...e?.signal?{signal:e.signal}:{}}),l;if(f.headers.get("Content-Type")?.startsWith("application/json")?l=(await f.json()).data:l=await f.text(),!f.ok){o=new Ua({body:c,details:l?.error?Qe(l.error):f.statusText,headers:f.headers,status:f.status,url:a});continue}if(!Qt(l)){o=new Pb({result:l,url:a});continue}return l}catch(f){if(e?.signal?.aborted)throw dr(e.signal);if(Zo(f))throw f;o=new Ua({body:c,details:f.message,url:a})}}throw o}var Mee,zP,HP=N(()=>{M5();kP();E0();zi();E6();gc();Pc();Nn();$i();DP();ro();Mee="0x556f1830",zP={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]}});async function Cb(t,e){let{account:r=t.account,authorizationList:n,batch:o=!!t.batch?.multicall,blockHash:i,blockNumber:a,blockTag:s=t.experimental_blockTag??"latest",requireCanonical:c,accessList:u,blobs:f,blockOverrides:l,code:h,data:m,factory:x,factoryData:S,gas:O,gasPrice:P,maxFeePerBlobGas:F,maxFeePerGas:B,maxPriorityFeePerGas:R,nonce:L,requestOptions:T,to:M,value:$,stateOverride:k,...v}=e,d=r?ce(r):void 0;if(h&&(x||S))throw new K("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(h&&M)throw new K("Cannot provide both `code` & `to` as parameters.");let y=h&&m,b=x&&S&&M&&m,g=y||b,A=y?VP({code:h,data:m}):b?Dee({data:m,factory:x,factoryData:S,to:M}):m;try{$r(e);let E=M0({blockHash:i,blockNumber:a,blockTag:s,requireCanonical:c}),w=l?xP(l):void 0,_=ib(k),p=t.chain?.formatters?.transactionRequest?.format,C=(p||$n)({...ei(v,{format:p}),accessList:u,account:d,authorizationList:n,blobs:f,data:A,gas:O,gasPrice:P,maxFeePerBlobGas:F,maxFeePerGas:B,maxPriorityFeePerGas:R,nonce:L,to:g?void 0:M,value:$},"call");if(o&&$ee({request:C})&&!w&&i===void 0)try{let{deployless:D=!1}=typeof t.batch?.multicall=="object"?t.batch.multicall:{},z=WP(t,{blockNumber:a,deployless:D});if(!z||!Uee(_,z))return await jee(t,{...C,blockHash:i,blockNumber:a,blockTag:s,multicallAddress:z,requestOptions:T,requireCanonical:c,rpcStateOverride:_})}catch(D){if(!(D instanceof j0)&&!(D instanceof Cc))throw D}let j=(()=>{let D=[C,E];return _&&w?[...D,_,w]:_?[...D,_]:w?[...D,{},w]:D})(),U=await t.request({method:"eth_call",params:j},T);return U==="0x"?{data:void 0}:{data:U}}catch(E){if(T?.signal?.aborted)throw dr(T.signal);if(Zo(E))throw E;let w=zee(E),{offchainLookup:_,offchainLookupSignature:p}=await Promise.resolve().then(()=>(HP(),qP));if(t.ccipRead!==!1&&w?.slice(0,10)===p&&M)return{data:await _(t,{data:w,requestOptions:T,to:M})};throw g&&w?.slice(0,10)==="0x101bb98d"?new Uy({factory:x}):RP(E,{...e,account:d,chain:t.chain})}}function $ee({request:t}){let{data:e,to:r,...n}=t;return!(!e||e.startsWith(AP)||!r||Object.values(n).filter(o=>typeof o<"u").length>0)}function Lee(t){if(!t)return"default";let e=GP.get(t);if(e!==void 0)return e;let r=Fee++;return GP.set(t,r),r}async function jee(t,e){let{batchSize:r=1024,deployless:n=!1,wait:o=0}=typeof t.batch?.multicall=="object"?t.batch.multicall:{},{blockHash:i,blockNumber:a,blockTag:s=t.experimental_blockTag??"latest",requireCanonical:c,data:u,multicallAddress:f,requestOptions:l,rpcStateOverride:h,to:m}=e,x=f!==void 0?f:WP(t,{blockNumber:a,deployless:n}),S=M0({blockHash:i,blockNumber:a,blockTag:s,requireCanonical:c}),O=typeof S=="string"?S:JSON.stringify(S),P=h?`.${JSON.stringify(h)}`:"",{schedule:F}=NP({id:`${t.uid}.${O}.${Lee(l)}${P}`,wait:o,shouldSplitBatch(L){return L.reduce((M,{data:$})=>M+($.length-2),0)>r*2},fn:async L=>{let T=L.map(v=>({allowFailure:!0,callData:v.data,target:v.to})),M=hn({abi:S5,args:[T],functionName:"aggregate3"}),$={...x===null?{data:VP({code:TP,data:M})}:{to:x,data:M}},k=await t.request({method:"eth_call",params:h?[$,S,h]:[$,S]},l);return Eb({abi:S5,args:[T],functionName:"aggregate3",data:k||"0x"})}}),[{returnData:B,success:R}]=await F({data:u,to:m});if(!R)throw new lu({data:B});return B==="0x"?{data:void 0}:{data:B}}function WP(t,e){let{blockNumber:r,deployless:n}=e;if(n)return null;if(t.chain)return OP({blockNumber:r,chain:t.chain,contract:"multicall3"});throw new j0}function Uee(t,e){return t?Object.keys(t).some(r=>Lr(r,e)):!1}function VP(t){let{code:e,data:r}=t;return D0({abi:Hm(["constructor(bytes, bytes)"]),bytecode:SP,args:[e,r]})}function Dee(t){let{data:e,factory:r,factoryData:n,to:o}=t;return D0({abi:Hm(["constructor(address, bytes, address, bytes)"]),bytecode:IP,args:[o,e,r,n]})}function zee(t){if(!(t instanceof K))return;let e=t.walk();return typeof e?.data=="object"?e.data?.data:e.data}var Fee,GP,M5=N(()=>{i6();wP();Pt();L0();_P();BP();de();U0();Dy();zi();E5();T5();vc();Pc();c5();PP();CP();Zu();Oc();MP();e5();Ya();Fee=0,GP=new WeakMap});async function Nb(t,e){let{abi:r,address:n,args:o,functionName:i,dataSuffix:a=typeof t.dataSuffix=="string"?t.dataSuffix:t.dataSuffix?.value,...s}=e,c=s.account?ce(s.account):t.account,u=hn({abi:r,args:o,functionName:i});try{let{data:f}=await oe(t,Cb,"call")({batch:!1,data:`${u}${a?a.replace("0x",""):""}`,to:n,...s,account:c}),l=Eb({abi:r,args:o,functionName:i,data:f||"0x"}),h=r.filter(m=>"name"in m&&m.name===e.functionName);return{result:l,request:{abi:h,address:n,args:o,dataSuffix:a,functionName:i,...s,account:c}}}catch(f){throw Nu(f,{abi:r,address:n,args:o,docsPath:"/docs/contract/simulateContract",functionName:i,sender:c?.address})}}var k5=N(()=>{Pt();E5();vc();qy();cr();M5()});function Mc(t,e,r){let n=++Kee,o=()=>Mb.get(t)||[],i=()=>{let l=o().filter(h=>h.id!==n);if(l.length===0){Mb.delete(t),$5.delete(t);return}Mb.set(t,l)},a=()=>{let f=o();if(!f.some(h=>h.id===n))return;let l=$5.get(t);if(f.length===1&&l){let h=l();h instanceof Promise&&h.catch(()=>{})}i()},s=o();if(Mb.set(t,[...s,{id:n,fns:e}]),s&&s.length>0)return a;let c={};for(let f in e)c[f]=((...l)=>{let h=o();if(h.length!==0)for(let m of h)m.fns[f]?.(...l)});let u=r(c);return typeof u=="function"&&$5.set(t,u),a}var Mb,$5,Kee,kb=N(()=>{Mb=new Map,$5=new Map,Kee=0});async function z0(t,{signal:e}={}){return new Promise((r,n)=>{if(e?.aborted){n(dr(e));return}let o=()=>e?.removeEventListener("abort",a),i=setTimeout(()=>{o(),r()},t),a=()=>{clearTimeout(i),o(),n(dr(e))};e?.addEventListener("abort",a,{once:!0})})}var F5=N(()=>{zi()});function $b(t,{emitOnBegin:e,initialWaitTime:r,interval:n}){let o=!0,i=()=>o=!1;return(async()=>{let s;e&&(s=await t({unpoll:i}));let c=await r?.(s)??n;await z0(c);let u=async()=>{o&&(await t({unpoll:i}),await z0(n),u())};u()})(),i}var L5=N(()=>{F5()});function YP(t){let e=(o,i)=>({clear:()=>i.delete(o),get:()=>i.get(o),set:a=>i.set(o,a)}),r=e(t,qee),n=e(t,Hee);return{clear:()=>{r.clear(),n.clear()},promise:r,response:n}}async function ZP(t,{cacheKey:e,cacheTime:r=Number.POSITIVE_INFINITY}){let n=YP(e),o=n.response.get();if(o&&r>0&&Date.now()-o.created.getTime()<r)return o.data;let i=n.promise.get();i||(i=t(),n.promise.set(i));try{let a=await i;return n.response.set({created:new Date,data:a}),a}finally{n.promise.clear()}}var qee,Hee,JP=N(()=>{qee=new Map,Hee=new Map});async function XP(t,{cacheTime:e=t.cacheTime}={}){let r=await ZP(()=>t.request({method:"eth_blockNumber"}),{cacheKey:Gee(t.uid),cacheTime:e});return BigInt(r)}var Gee,QP=N(()=>{JP();Gee=t=>`blockNumber.${t}`});var Dt,Fn,Xi=N(()=>{de();Dt=class extends K{constructor({docsPath:e}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(`
|
|
40
|
+
`),{docsPath:e,docsSlug:"account",name:"AccountNotFoundError"})}},Fn=class extends K{constructor({docsPath:e,metaMessages:r,type:n}){super(`Account type "${n}" is not supported.`,{docsPath:e,metaMessages:r,name:"AccountTypeNotSupportedError"})}}});function sd({chain:t,currentChainId:e}){if(!t)throw new Tb;if(e!==t.id)throw new Ib({chain:t,currentChainId:e})}var Fb=N(()=>{U0()});async function Lb(t,{serializedTransaction:e}){return t.request({method:"eth_sendRawTransaction",params:[e]},{retryCount:0})}var j5=N(()=>{});async function ts(t,e){let{account:r=t.account,assertChainId:n=!0,chain:o=t.chain,accessList:i,authorizationList:a,blobs:s,data:c,dataSuffix:u=typeof t.dataSuffix=="string"?t.dataSuffix:t.dataSuffix?.value,gas:f,gasPrice:l,maxFeePerBlobGas:h,maxFeePerGas:m,maxPriorityFeePerGas:x,nonce:S,type:O,value:P,...F}=e;if(typeof r>"u")throw new Dt({docsPath:"/docs/actions/wallet/sendTransaction"});let B=r?ce(r):null,R;try{$r(e);let L=await(async()=>{if(e.to)return e.to;if(e.to!==null&&a&&a.length>0)return await Uu({authorization:a[0]}).catch(()=>{throw new K("`to` is required. Could not infer from `authorizationList`.")})})();if(B?.type==="json-rpc"||B===null){let T;o!==null&&(T=await oe(t,Fr,"getChainId")({}),n&&sd({currentChainId:T,chain:o}));let M=t.chain?.formatters?.transactionRequest?.format,k=(M||$n)({...ei(F,{format:M}),accessList:i,account:B,authorizationList:a,blobs:s,chainId:T,data:u?to([c??"0x",u]):c,gas:f,gasPrice:l,maxFeePerBlobGas:h,maxFeePerGas:m,maxPriorityFeePerGas:x,nonce:S,to:L,type:O,value:P},"sendTransaction"),v=U5.get(t.uid),d=v?"wallet_sendTransaction":"eth_sendTransaction";try{return await t.request({method:d,params:[k]},{retryCount:0})}catch(y){if(v===!1)throw y;let b=y;if(b.name==="InvalidInputRpcError"||b.name==="InvalidParamsRpcError"||b.name==="MethodNotFoundRpcError"||b.name==="MethodNotSupportedRpcError")return await t.request({method:"wallet_sendTransaction",params:[k]},{retryCount:0}).then(g=>(U5.set(t.uid,!0),g)).catch(g=>{let A=g;throw A.name==="MethodNotFoundRpcError"||A.name==="MethodNotSupportedRpcError"?(U5.set(t.uid,!1),b):A});throw b}}if(B?.type==="local"){let T=(()=>{if(!B.nonceManager||typeof S<"u")return B.nonceManager;let y=B.nonceManager;return{consume(b){return R={address:b.address,chainId:b.chainId},y.consume(b)},get(b){return y.get(b)},increment(b){return y.increment(b)},reset(b){return y.reset(b)}}})(),M=await oe(t,Qa,"prepareTransactionRequest")({account:B,accessList:i,authorizationList:a,blobs:s,chain:o,data:u?to([c??"0x",u]):c,gas:f,gasPrice:l,maxFeePerBlobGas:h,maxFeePerGas:m,maxPriorityFeePerGas:x,nonce:S,nonceManager:T,parameters:[...$0,"sidecars"],type:O,value:P,...F,to:L}),$=o?.serializers?.transaction,k=await B.signTransaction(M,{serializer:$}),v=(o??t.chain)?.serializers?.transactionEnvelope,d=v?await v({serializedTransaction:k,transaction:M}):k;return await oe(t,Lb,"sendRawTransaction")({serializedTransaction:d})}throw B?.type==="smart"?new Fn({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new Fn({docsPath:"/docs/actions/wallet/sendTransaction",type:B?.type})}catch(L){throw L instanceof Fn?L:(R&&B?.nonceManager?.reset(R),Ja(L,{...e,account:B,chain:e.chain||void 0}))}}var U5,K0=N(()=>{Pt();Xi();de();tb();Fb();Nn();k0();Zu();Oc();cr();bc();Ya();Xa();F0();j5();U5=new Nr(128)});async function so(t,e){return so.internal(t,ts,"sendTransaction",e)}var q0=N(()=>{Pt();Xi();vc();qy();cr();K0();(function(t){async function e(r,n,o,i){let{abi:a,account:s=r.account,address:c,args:u,functionName:f,...l}=i;if(typeof s>"u")throw new Dt({docsPath:"/docs/contract/writeContract"});let h=s?ce(s):null,m=hn({abi:a,args:u,functionName:f});try{return await oe(r,n,o)({data:m,to:c,account:h,...l})}catch(x){throw Nu(x,{abi:a,address:c,args:u,docsPath:"/docs/contract/writeContract",functionName:f,sender:h?.address})}}t.internal=e})(so||(so={}))});function kc(t,{delay:e=100,retryCount:r=2,shouldRetry:n=()=>!0,signal:o}={}){return new Promise((i,a)=>{let s=()=>a(dr(o));o?.addEventListener("abort",s,{once:!0});let c=async({count:u=0}={})=>{if(o?.aborted){a(dr(o));return}let f=async({error:l})=>{let h=typeof e=="function"?e({count:u,error:l}):e;if(h)try{await z0(h,{signal:o})}catch(m){a(m);return}return c({count:u+1})};try{let l=await t();i(l)}catch(l){if(o?.aborted){a(dr(o));return}if(Zo(l)){a(l);return}if(u<r&&await n({count:u,error:l}))return f({error:l});a(l)}};c().catch(a).finally(()=>o?.removeEventListener("abort",s))})}var Ub=N(()=>{zi();F5()});function H0(t,e){let r={...t,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,contractAddress:t.contractAddress?t.contractAddress:null,cumulativeGasUsed:t.cumulativeGasUsed?BigInt(t.cumulativeGasUsed):null,effectiveGasPrice:t.effectiveGasPrice?BigInt(t.effectiveGasPrice):null,gasUsed:t.gasUsed?BigInt(t.gasUsed):null,logs:t.logs?t.logs.map(n=>xb(n)):null,to:t.to?t.to:null,transactionIndex:t.transactionIndex?Ot(t.transactionIndex):null,status:t.status?D5[t.status]:null,type:t.type?n5[t.type]||t.type:null};return t.blobGasPrice&&(r.blobGasPrice=BigInt(t.blobGasPrice)),t.blobGasUsed&&(r.blobGasUsed=BigInt(t.blobGasUsed)),r}var D5,eR,G0=N(()=>{xr();ob();g5();td();D5={"0x0":"reverted","0x1":"success"};eR=Ju("transactionReceipt",H0)});function sR(t){let{authorizationList:e}=t;if(e)for(let r of e){let{chainId:n}=r,o=r.address;if(!ge(o))throw new De({address:o});if(n<0)throw new Nc({chainId:n})}Wb(t)}function cR(t){let{blobVersionedHashes:e}=t;if(e){if(e.length===0)throw new id;for(let r of e){let n=he(r),o=Ot(Mn(r,0,1));if(n!==32)throw new pb({hash:r,size:n});if(o!==1)throw new hb({hash:r,version:o})}}Wb(t)}function Wb(t){let{chainId:e,maxPriorityFeePerGas:r,maxFeePerGas:n,to:o}=t;if(e<=0)throw new Nc({chainId:e});if(o&&!ge(o))throw new De({address:o});if(n&&n>Xu)throw new kn({maxFeePerGas:n});if(r&&n&&r>n)throw new Xo({maxFeePerGas:n,maxPriorityFeePerGas:r})}function fR(t){let{chainId:e,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:o,to:i}=t;if(e<=0)throw new Nc({chainId:e});if(i&&!ge(i))throw new De({address:i});if(r||o)throw new K("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(n&&n>Xu)throw new kn({maxFeePerGas:n})}function uR(t){let{chainId:e,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:o,to:i}=t;if(i&&!ge(i))throw new De({address:i});if(typeof e<"u"&&e<=0)throw new Nc({chainId:e});if(r||o)throw new K("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(n&&n>Xu)throw new kn({maxFeePerGas:n})}var dR=N(()=>{t5();Ho();de();d5();U0();Bc();Cn();Jn();ja();xr()});function V0(t){if(!t||t.length===0)return[];let e=[];for(let r=0;r<t.length;r++){let{address:n,storageKeys:o}=t[r];for(let i=0;i<o.length;i++)if(o[i].length-2!==64)throw new Ny({storageKey:o[i]});if(!ge(n,{strict:!1}))throw new De({address:n});e.push([n,o])}return e}var lR=N(()=>{Ho();Mr();Cn()});function pR(t,e){let r=yb(t);return r==="eip1559"?Jee(t,e):r==="eip2930"?Xee(t,e):r==="eip4844"?Zee(t,e):r==="eip7702"?Yee(t,e):Qee(t,e)}function Yee(t,e){let{authorizationList:r,chainId:n,gas:o,nonce:i,to:a,value:s,maxFeePerGas:c,maxPriorityFeePerGas:u,accessList:f,data:l}=t;sR(t);let h=V0(f),m=hR(r);return Ze(["0x04",oo([Z(n),i?Z(i):"0x",u?Z(u):"0x",c?Z(c):"0x",o?Z(o):"0x",a??"0x",s?Z(s):"0x",l??"0x",h,m,...cd(t,e)])])}function Zee(t,e){let{chainId:r,gas:n,nonce:o,to:i,value:a,maxFeePerBlobGas:s,maxFeePerGas:c,maxPriorityFeePerGas:u,accessList:f,data:l}=t;cR(t);let h=t.blobVersionedHashes,m=t.sidecars;if(t.blobs&&(typeof h>"u"||typeof m>"u")){let B=typeof t.blobs[0]=="string"?t.blobs:t.blobs.map(T=>He(T)),R=t.kzg,L=nd({blobs:B,kzg:R});if(typeof h>"u"&&(h=db({commitments:L})),typeof m>"u"){let T=od({blobs:B,commitments:L,kzg:R});m=mb({blobs:B,commitments:L,proofs:T})}}let x=V0(f),S=[Z(r),o?Z(o):"0x",u?Z(u):"0x",c?Z(c):"0x",n?Z(n):"0x",i??"0x",a?Z(a):"0x",l??"0x",x,s?Z(s):"0x",h??[],...cd(t,e)],O=[],P=[],F=[];if(m)for(let B=0;B<m.length;B++){let{blob:R,commitment:L,proof:T}=m[B];O.push(R),P.push(L),F.push(T)}return Ze(["0x03",m?oo([S,O,P,F]):oo(S)])}function Jee(t,e){let{chainId:r,gas:n,nonce:o,to:i,value:a,maxFeePerGas:s,maxPriorityFeePerGas:c,accessList:u,data:f}=t;Wb(t);let l=V0(u),h=[Z(r),o?Z(o):"0x",c?Z(c):"0x",s?Z(s):"0x",n?Z(n):"0x",i??"0x",a?Z(a):"0x",f??"0x",l,...cd(t,e)];return Ze(["0x02",oo(h)])}function Xee(t,e){let{chainId:r,gas:n,data:o,nonce:i,to:a,value:s,accessList:c,gasPrice:u}=t;fR(t);let f=V0(c),l=[Z(r),i?Z(i):"0x",u?Z(u):"0x",n?Z(n):"0x",a??"0x",s?Z(s):"0x",o??"0x",f,...cd(t,e)];return Ze(["0x01",oo(l)])}function Qee(t,e){let{chainId:r=0,gas:n,data:o,nonce:i,to:a,value:s,gasPrice:c}=t;uR(t);let u=[i?Z(i):"0x",c?Z(c):"0x",n?Z(n):"0x",a??"0x",s?Z(s):"0x",o??"0x"];if(e){let f=(()=>{if(e.v>=35n)return(e.v-35n)/2n>0?e.v:27n+(e.v===35n?0n:1n);if(r>0)return BigInt(r*2)+BigInt(35n+e.v-27n);let m=27n+(e.v===27n?0n:1n);if(e.v!==m)throw new Ry({v:e.v});return m})(),l=Do(e.r),h=Do(e.s);u=[...u,Z(f),l==="0x00"?"0x":l,h==="0x00"?"0x":h]}else r>0&&(u=[...u,Z(r),"0x","0x"]);return oo(u)}function cd(t,e){let r=e??t,{v:n,yParity:o}=r;if(typeof r.r>"u")return[];if(typeof r.s>"u")return[];if(typeof n>"u"&&typeof o>"u")return[];let i=Do(r.r),a=Do(r.s);return[typeof o=="number"?o?Z(1):"0x":n===0n?"0x":n===1n?Z(1):n===27n?"0x":Z(1),i==="0x00"?"0x":i,a==="0x00"?"0x":a]}var H5=N(()=>{Mr();mR();fb();ub();u5();l5();Nn();uy();we();eb();dR();p5();lR()});function hR(t){if(!t||t.length===0)return[];let e=[];for(let r of t){let{chainId:n,nonce:o,...i}=r,a=r.address;e.push([n?ur(n):"0x",a,o?ur(o):"0x",...cd({},i)])}return e}var mR=N(()=>{we();H5()});function yR(t,{enabled:e=!0,id:r}){if(!e||!r)return t();if(Vb.get(r))return Vb.get(r);let n=t().finally(()=>Vb.delete(r));return Vb.set(r,n),n}var Vb,bR=N(()=>{bc();Vb=new Nr(8192)});function gR(t,e={}){return async(r,n={})=>{let{dedupe:o=!1,methods:i,retryDelay:a=150,retryCount:s=3,signal:c,uid:u}={...e,...n},{method:f}=r;if(i?.exclude?.includes(f))throw new za(new Error("method not supported"),{method:f});if(i?.include&&!i.include.includes(f))throw new za(new Error("method not supported"),{method:f});if(c?.aborted)throw dr(c);let l=o?tte(`${u}.${Qe(r)}`):void 0;return yR(()=>kc(async()=>{try{return await t(r,c?{signal:c}:void 0)}catch(h){if(c?.aborted)throw dr(c);if(Zo(h))throw h;let m=h;switch(m.code){case hu.code:throw new hu(m);case mu.code:throw new mu(m);case yu.code:throw new yu(m,{method:r.method});case bu.code:throw new bu(m);case Ki.code:throw new Ki(m);case Da.code:throw new Da(m);case gu.code:throw new gu(m);case vu.code:throw new vu(m);case xu.code:throw new xu(m);case za.code:throw new za(m,{method:r.method});case Ec.code:throw new Ec(m);case wu.code:throw new wu(m);case Ac.code:throw new Ac(m);case Eu.code:throw new Eu(m);case Au.code:throw new Au(m);case _u.code:throw new _u(m);case Su.code:throw new Su(m);case Iu.code:throw new Iu(m);case Ka.code:throw new Ka(m);case Tu.code:throw new Tu(m);case Bu.code:throw new Bu(m);case Ou.code:throw new Ou(m);case Pu.code:throw new Pu(m);case Ru.code:throw new Ru(m);case qa.code:throw new qa(m);case 5e3:throw new Ac(m);case Cu.code:throw new Cu(m);default:throw h instanceof K?h:new zy(m)}}},{delay:({count:h,error:m})=>{if(m&&m instanceof Ua){let x=m?.headers?.get("Retry-After");if(x?.match(/\d/))return Number.parseInt(x,10)*1e3}return~~(1<<h)*a},retryCount:s,signal:c,shouldRetry:({error:h})=>ete(h)}),{enabled:o,id:l})}}function ete(t){return Zo(t)?!1:"code"in t&&typeof t.code=="number"?t.code===-1||t.code===Ec.code||t.code===Ki.code||t.code===429||t.code===-32007:t instanceof Ua&&t.status?t.status===403||t.status===408||t.status===413||t.status===429||t.status===500||t.status===502||t.status===503||t.status===504:!0}function tte(t,e=0){let r=3735928559^e,n=1103547991^e;for(let o=0;o<t.length;o++){let i=t.charCodeAt(o);r=Math.imul(r^i,2654435761),n=Math.imul(n^i,1597334677)}return r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(n^n>>>16,3266489909),n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(r^r>>>16,3266489909),(4294967296*(2097151&n)+(r>>>0)).toString(36)}var vR=N(()=>{de();E0();Ky();zi();bR();Ub();ro()});function G5(t){let e={formatters:void 0,fees:void 0,serializers:void 0,...t};function r(n){return o=>{let i=typeof o=="function"?o(n):o,a={...n,...i};return Object.assign(a,{extend:r(a)})}}return Object.assign(e,{extend:r(e)})}var xR=N(()=>{});var Yb,Zb,Jb,Xb,wR=N(()=>{ro();de();Yb=class extends K{constructor({domain:e}){super(`Invalid domain "${Qe(e)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}},Zb=class extends K{constructor({primaryType:e,types:r}){super(`Invalid primary type \`${e}\` must be one of \`${JSON.stringify(Object.keys(r))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}},Jb=class extends K{constructor({type:e}){super(`Struct type "${e}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}},Xb=class extends K{constructor({type:e}){let r=e.replace(/^(u?int)/,"$&256");super(`Type "${e}" is not a valid EIP-712 type.`,{metaMessages:[`Use "${r}" instead.`],name:"InvalidTypedDataTypeError"})}}});function ER(t){let{domain:e,message:r,primaryType:n,types:o}=t,i=(c,u)=>{let f={...u};for(let l of c){let{name:h,type:m}=l;m==="address"&&(f[h]=f[h].toLowerCase())}return f},a=o.EIP712Domain?e?i(o.EIP712Domain,e):{}:{},s=(()=>{if(n!=="EIP712Domain")return i(o[n],r)})();return Qe({domain:a,message:s,primaryType:n,types:o})}function AR(t){let{domain:e,message:r,primaryType:n,types:o}=t,i=(a,s)=>{for(let c of a){let{name:u,type:f}=c,l=s[u],h=f.replace(/(\[[0-9]*\])+$/,"");if(h==="int"||h==="uint")throw new Xb({type:f});let m=f.match(gy);if(m&&(typeof l=="number"||typeof l=="bigint")){let[O,P,F]=m;Z(l,{signed:P==="int",size:Number.parseInt(F,10)/8})}if(f==="address"&&typeof l=="string"&&!ge(l))throw new De({address:l});let x=f.match(TB);if(x){let[O,P]=x;if(P&&he(l)!==Number.parseInt(P,10))throw new ry({expectedSize:Number.parseInt(P,10),givenSize:he(l)})}let S=o[f];S&&(rte(f),i(S,l))}};if(o.EIP712Domain&&e){if(typeof e!="object")throw new Yb({domain:e});i(o.EIP712Domain,e)}if(n!=="EIP712Domain")if(o[n])i(o[n],r);else throw new Zb({primaryType:n,types:o})}function _R({domain:t}){return[typeof t?.name=="string"&&{name:"name",type:"string"},typeof t?.version=="string"&&{name:"version",type:"string"},(typeof t?.chainId=="number"||typeof t?.chainId=="bigint")&&{name:"chainId",type:"uint256"},t?.verifyingContract&&{name:"verifyingContract",type:"address"},t?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}function rte(t){if(t==="address"||t==="bool"||t==="string"||t.startsWith("bytes")||t.startsWith("uint")||t.startsWith("int"))throw new Jb({type:t})}var SR=N(()=>{fr();Ho();wR();Cn();Jn();we();m6();ro()});function nte(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function TR(t,e){return Array.isArray(e)?e.length===0?!0:t?e.every(r=>typeof r=="string"):e.every(r=>Number.isSafeInteger(r)):!1}function W5(t,e){if(typeof e!="string")throw new Error(`${t}: string expected`);return!0}function BR(t){if(!Number.isSafeInteger(t))throw new Error(`invalid integer: ${t}`)}function V5(t){if(!Array.isArray(t))throw new Error("array expected")}function OR(t,e){if(!TR(!0,e))throw new Error(`${t}: array of strings expected`)}function ote(t,e){if(!TR(!1,e))throw new Error(`${t}: array of numbers expected`)}function ite(...t){let e=i=>i,r=(i,a)=>s=>i(a(s)),n=t.map(i=>i.encode).reduceRight(r,e),o=t.map(i=>i.decode).reduce(r,e);return{encode:n,decode:o}}function ate(t){let e=typeof t=="string"?t.split(""):t,r=e.length;OR("alphabet",e);let n=new Map(e.map((o,i)=>[o,i]));return{encode:o=>(V5(o),o.map(i=>{if(!Number.isSafeInteger(i)||i<0||i>=r)throw new Error(`alphabet.encode: digit index outside alphabet "${i}". Allowed: ${t}`);return e[i]})),decode:o=>(V5(o),o.map(i=>{W5("alphabet.decode",i);let a=n.get(i);if(a===void 0)throw new Error(`Unknown letter: "${i}". Allowed: ${t}`);return a}))}}function ste(t=""){return W5("join",t),{encode:e=>(OR("join.decode",e),e.join(t)),decode:e=>(W5("join.decode",e),e.split(t))}}function IR(t,e,r){if(e<2)throw new Error(`convertRadix: invalid from=${e}, base cannot be less than 2`);if(r<2)throw new Error(`convertRadix: invalid to=${r}, base cannot be less than 2`);if(V5(t),!t.length)return[];let n=0,o=[],i=Array.from(t,s=>{if(BR(s),s<0||s>=e)throw new Error(`invalid integer: ${s}`);return s}),a=i.length;for(;;){let s=0,c=!0;for(let u=n;u<a;u++){let f=i[u],l=e*s,h=l+f;if(!Number.isSafeInteger(h)||l/e!==s||h-f!==l)throw new Error("convertRadix: carry overflow");let m=h/r;s=h%r;let x=Math.floor(m);if(i[u]=x,!Number.isSafeInteger(x)||x*r+s!==h)throw new Error("convertRadix: carry overflow");if(c)x?c=!1:n=u;else continue}if(o.push(s),c)break}for(let s=0;s<t.length-1&&t[s]===0;s++)o.push(0);return o.reverse()}function cte(t){BR(t);let e=2**8;return{encode:r=>{if(!nte(r))throw new Error("radix.encode input should be Uint8Array");return IR(Array.from(r),e,t)},decode:r=>(ote("radix.decode",r),Uint8Array.from(IR(r,t,e)))}}var fte,Y5,PR=N(()=>{fte=t=>ite(cte(58),ate(t),ste("")),Y5=fte("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")});function Qb(t,e){return Iy(t,e)}var Z5=N(()=>{w0()});function RR(t,e){return zB(t,e)}var CR=N(()=>{w0()});var NR=N(()=>{vc()});async function MR(t,{blockHash:e,blockNumber:r,blockTag:n,hash:o,index:i,sender:a,nonce:s}){let c=n||"latest",u=r!==void 0?Z(r):void 0,f=null;if(o?f=await t.request({method:"eth_getTransactionByHash",params:[o]},{dedupe:!0}):e?f=await t.request({method:"eth_getTransactionByBlockHashAndIndex",params:[e,Z(i)]},{dedupe:!0}):(u||c)&&typeof i=="number"?f=await t.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[u||c,Z(i)]},{dedupe:!!u}):a&&typeof s=="number"&&(f=await t.request({method:"eth_getTransactionBySenderAndNonce",params:[a,Z(s)]},{dedupe:!0})),!f)throw new fu({blockHash:e,blockNumber:r,blockTag:c,hash:o,index:i});return(t.chain?.formatters?.transaction?.format||Ji)(f,"getTransaction")}var kR=N(()=>{Mr();we();td()});async function e1(t,{hash:e}){let r=await t.request({method:"eth_getTransactionReceipt",params:[e]},{dedupe:!0});if(!r)throw new uu({hash:e});return(t.chain?.formatters?.transactionReceipt?.format||H0)(r,"getTransactionReceipt")}var $R=N(()=>{Mr();G0()});function FR(t,{emitOnBegin:e=!1,emitMissed:r=!1,onBlockNumber:n,onError:o,poll:i,pollingInterval:a=t.pollingInterval}){let s=typeof i<"u"?i:!(t.transport.type==="webSocket"||t.transport.type==="ipc"||t.transport.type==="fallback"&&(t.transport.transports[0].config.type==="webSocket"||t.transport.transports[0].config.type==="ipc")),c;return s?(()=>{let l=Qe(["watchBlockNumber",t.uid,e,r,a]);return Mc(l,{onBlockNumber:n,onError:o},h=>$b(async()=>{try{let m=await oe(t,XP,"getBlockNumber")({cacheTime:0});if(c!==void 0){if(m===c)return;if(m-c>1&&r)for(let x=c+1n;x<m;x++)h.onBlockNumber(x,c),c=x}(c===void 0||m>c)&&(h.onBlockNumber(m,c),c=m)}catch(m){h.onError?.(m)}},{emitOnBegin:e,interval:a}))})():(()=>{let l=Qe(["watchBlockNumber",t.uid,e,r]);return Mc(l,{onBlockNumber:n,onError:o},h=>{let m=!0,x=()=>m=!1;return(async()=>{try{let S=(()=>{if(t.transport.type==="fallback"){let P=t.transport.transports.find(F=>F.config.type==="webSocket"||F.config.type==="ipc");return P?P.value:t.transport}return t.transport})(),{unsubscribe:O}=await S.subscribe({params:["newHeads"],onData(P){if(!m)return;let F=Xe(P.result?.number);h.onBlockNumber(F,c),c=F},onError(P){h.onError?.(P)}});x=O,m||x()}catch(S){o?.(S)}})(),()=>x()})})()}var LR=N(()=>{xr();cr();kb();L5();ro();QP()});async function jR(t,e){let{checkReplacement:r=t.chain?.supportsTransactionReplacementDetection??!0,confirmations:n=1,hash:o,onReplaced:i,retryCount:a=6,retryDelay:s=({count:T})=>~~(1<<T)*200,timeout:c=18e4}=e,u=T=>t.chain?.transactionReplacement?.getKey?.(T)??String(T.nonce),f=e.pollingInterval?e.pollingInterval:t.chain?.experimental_preconfirmationTime?t.chain.experimental_preconfirmationTime:t.pollingInterval,l=Qe(["waitForTransactionReceipt",t.uid,o,{checkReplacement:r,confirmations:n,pollingInterval:f,retryCount:a,timeout:c}]),h,m,x,S=!1,O,P,{promise:F,resolve:B,reject:R}=ad(),L=c?setTimeout(()=>{P?.(),O?.(),R(new ky({hash:o}))},c):void 0;return O=Mc(l,{onReplaced:i,resolve:B,reject:R},async T=>{if(x=await oe(t,e1,"getTransactionReceipt")({hash:o}).catch(()=>{}),x&&n<=1){clearTimeout(L),T.resolve(x),O?.();return}P=oe(t,FR,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:f,async onBlockNumber(M){let $=v=>{clearTimeout(L),P?.(),v(),O?.()},k=M;if(!S)try{if(x){if(n>1&&(!x.blockNumber||k-x.blockNumber+1n<n))return;$(()=>T.resolve(x));return}if(r&&!h&&(S=!0,await kc(async()=>{h=await oe(t,MR,"getTransaction")({hash:o}),h.blockNumber&&(k=h.blockNumber)},{delay:s,retryCount:a}),S=!1),x=await oe(t,e1,"getTransactionReceipt")({hash:o}),n>1&&(!x.blockNumber||k-x.blockNumber+1n<n))return;$(()=>T.resolve(x))}catch(v){if(v instanceof fu||v instanceof uu){if(!h){S=!1;return}if(h.blockNumber){S=!1;return}try{m=h,S=!0;let d=await kc(()=>oe(t,io,"getBlock")({blockNumber:k,includeTransactions:!0}),{delay:s,retryCount:a,shouldRetry:({error:A})=>A instanceof ed});S=!1;let y=u(m),b=d.transactions.find(A=>Lr(A.from,m.from)&&A.hash!==m.hash&&u(A)===y);if(!b||(x=await oe(t,e1,"getTransactionReceipt")({hash:b.hash}),n>1&&(!x.blockNumber||k-x.blockNumber+1n<n)))return;let g=t.chain?.transactionReplacement?.getReason?.({replaced:m,replacement:b})??ute(m,b);$(()=>{T.onReplaced?.({reason:g,replacedTransaction:m,transaction:b,transactionReceipt:x}),T.resolve(x)})}catch(d){$(()=>T.reject(d))}}else $(()=>T.reject(v))}}})}),F}function ute(t,e){return(e.to&&t.to?Lr(e.to,t.to):e.to===t.to)&&e.value===t.value&&e.input===t.input?"repriced":e.from===e.to&&e.value===0n?"cancelled":"replaced"}var UR=N(()=>{r5();Mr();Pc();cr();kb();Bb();Ub();ro();rd();kR();$R();LR()});function t1(t,e){if(typeof t=="bigint")return t;let r=t.decimals??e;return RR(t.formatted,dte(r))}function dte(t){if(t===void 0)throw new Error("Token decimals are required. Pass `amount.decimals` or select a declared token.");return t}function r1(t,e){return typeof t=="bigint"?e:t.decimals??e}function rs(t,e){let{decimals:r,token:n}=e,o=lte(t,n);if(o)return{address:o.address,decimals:r??o.decimals};if(ge(n,{strict:!1}))return{address:n,decimals:r??hte(t,n)};throw new Error(`Token "${n}" is not a declared ERC-20 token on the client's \`tokens\` array (with an address for the client's chain), and is not a valid address.`)}function lte(t,e){let r=t.tokens,n=t.chain?.id;if(!r||n===void 0)return;let o=pte(r,e);if(o)return J5(o,n);if(ge(e,{strict:!1}))for(let i of r){let a=J5(i,n);if(a&&Lr(a.address,e))return a}}function J5(t,e){let r=t.addresses[e];if(r)return{address:r,currency:t.currency,decimals:t.decimals,name:t.name,popular:t.popular,symbol:t.symbol}}function pte(t,e){let r=e.toLowerCase();for(let n of t)if(n.symbol?.toLowerCase()===r)return n}function hte(t,e){let r=t.tokens,n=t.chain?.id;if(r&&n!==void 0)for(let o of r){let i=J5(o,n);if(i&&Lr(i.address,e))return i.decimals}}function fd(t){let{account:e,chain:r,gas:n,maxFeePerGas:o,maxPriorityFeePerGas:i,nonce:a}=t;return{account:e,chain:r,gas:n,maxFeePerGas:o,maxPriorityFeePerGas:i,nonce:a}}function n1(t){return{...t,data:hn(t),to:t.address}}var Y0=N(()=>{Cn();Pc();NR();CR()});async function o1(t,{serializedTransaction:e,throwOnReceiptRevert:r,timeout:n}){let o=await t.request({method:"eth_sendRawTransactionSync",params:n?[e,n]:[e]},{retryCount:0}),a=(t.chain?.formatters?.transactionReceipt?.format||H0)(o);if(a.status==="reverted"&&r)throw new xc({receipt:a});return a}var X5=N(()=>{Mr();G0()});async function i1(t,e){let{account:r=t.account,assertChainId:n=!0,chain:o=t.chain,accessList:i,authorizationList:a,blobs:s,data:c,dataSuffix:u=typeof t.dataSuffix=="string"?t.dataSuffix:t.dataSuffix?.value,gas:f,gasPrice:l,maxFeePerBlobGas:h,maxFeePerGas:m,maxPriorityFeePerGas:x,nonce:S,pollingInterval:O,throwOnReceiptRevert:P,type:F,value:B,...R}=e,L=e.timeout??Math.max((o?.blockTime??0)*3,5e3);if(typeof r>"u")throw new Dt({docsPath:"/docs/actions/wallet/sendTransactionSync"});let T=r?ce(r):null,M;try{$r(e);let $=await(async()=>{if(e.to)return e.to;if(e.to!==null&&a&&a.length>0)return await Uu({authorization:a[0]}).catch(()=>{throw new K("`to` is required. Could not infer from `authorizationList`.")})})();if(T?.type==="json-rpc"||T===null){let k;o!==null&&(k=await oe(t,Fr,"getChainId")({}),n&&sd({currentChainId:k,chain:o}));let v=t.chain?.formatters?.transactionRequest?.format,y=(v||$n)({...ei(R,{format:v}),accessList:i,account:T,authorizationList:a,blobs:s,chainId:k,data:u?to([c??"0x",u]):c,gas:f,gasPrice:l,maxFeePerBlobGas:h,maxFeePerGas:m,maxPriorityFeePerGas:x,nonce:S,to:$,type:F,value:B},"sendTransaction"),b=Q5.get(t.uid),g=b?"wallet_sendTransaction":"eth_sendTransaction",A=await(async()=>{try{return await t.request({method:g,params:[y]},{retryCount:0})}catch(w){if(b===!1)throw w;let _=w;if(_.name==="InvalidInputRpcError"||_.name==="InvalidParamsRpcError"||_.name==="MethodNotFoundRpcError"||_.name==="MethodNotSupportedRpcError")return await t.request({method:"wallet_sendTransaction",params:[y]},{retryCount:0}).then(p=>(Q5.set(t.uid,!0),p)).catch(p=>{let I=p;throw I.name==="MethodNotFoundRpcError"||I.name==="MethodNotSupportedRpcError"?(Q5.set(t.uid,!1),_):I});throw _}})(),E=await oe(t,jR,"waitForTransactionReceipt")({checkReplacement:!1,hash:A,pollingInterval:O,timeout:L});if(P&&E.status==="reverted")throw new xc({receipt:E});return E}if(T?.type==="local"){let k=(()=>{if(!T.nonceManager||typeof S<"u")return T.nonceManager;let A=T.nonceManager;return{consume(E){return M={address:E.address,chainId:E.chainId},A.consume(E)},get(E){return A.get(E)},increment(E){return A.increment(E)},reset(E){return A.reset(E)}}})(),v=await oe(t,Qa,"prepareTransactionRequest")({account:T,accessList:i,authorizationList:a,blobs:s,chain:o,data:u?to([c??"0x",u]):c,gas:f,gasPrice:l,maxFeePerBlobGas:h,maxFeePerGas:m,maxPriorityFeePerGas:x,nonce:S,nonceManager:k,parameters:[...$0,"sidecars"],type:F,value:B,...R,to:$}),d=o?.serializers?.transaction,y=await T.signTransaction(v,{serializer:d}),b=(o??t.chain)?.serializers?.transactionEnvelope,g=b?await b({serializedTransaction:y,transaction:v}):y;return await oe(t,o1,"sendRawTransactionSync")({serializedTransaction:g,throwOnReceiptRevert:P,timeout:e.timeout})}throw T?.type==="smart"?new Fn({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new Fn({docsPath:"/docs/actions/wallet/sendTransactionSync",type:T?.type})}catch($){throw $ instanceof Fn?$:(M&&!($ instanceof xc)&&T?.nonceManager?.reset(M),Ja($,{...e,account:T,chain:e.chain||void 0}))}}var Q5,e8=N(()=>{Pt();Xi();de();Mr();tb();Fb();Nn();k0();Zu();Oc();cr();bc();Ya();Xa();UR();F0();X5();Q5=new Nr(128)});async function ud(t,e){return so.internal(t,i1,"sendTransactionSync",e)}var a1=N(()=>{e8();q0()});var AN=N(()=>{});var _N=N(()=>{});var ia,SN=N(()=>{ia=class{constructor(e){if(Object.keys(e).length!==1)throw new Error("Enum can only take single value");Object.keys(e).map(r=>{this[r]=e[r]})}}});var xd,zt,L1,IN=N(()=>{xd=class extends Error{constructor(){super("Contract method calls expect named arguments wrapped in object, e.g. { argName1: argValue1, argName2: argValue2 }")}},zt=class extends Error{type;context;constructor(e,r,n){super(e),this.type=r||"UntypedError",this.context=n}},L1=class{transactionHash;constructor(e){this.transactionHash=e}}});var TN=N(()=>{});var aa=N(()=>{AN();_N();SN();IN();TN()});var z8=G((U8,D8)=>{(function(t,e){typeof U8=="object"&&typeof D8<"u"?D8.exports=e():typeof define=="function"&&define.amd?define(e):(t=t||self,t.Mustache=e())})(U8,(function(){"use strict";var t=Object.prototype.toString,e=Array.isArray||function(d){return t.call(d)==="[object Array]"};function r(v){return typeof v=="function"}function n(v){return e(v)?"array":typeof v}function o(v){return v.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function i(v,d){return v!=null&&typeof v=="object"&&d in v}function a(v,d){return v!=null&&typeof v!="object"&&v.hasOwnProperty&&v.hasOwnProperty(d)}var s=RegExp.prototype.test;function c(v,d){return s.call(v,d)}var u=/\S/;function f(v){return!c(u,v)}var l={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function h(v){return String(v).replace(/[&<>"'`=\/]/g,function(y){return l[y]})}var m=/\s*/,x=/\s+/,S=/\s*=/,O=/\s*\}/,P=/#|\^|\/|>|\{|&|=|!/;function F(v,d){if(!v)return[];var y=!1,b=[],g=[],A=[],E=!1,w=!1,_="",p=0;function I(){if(E&&!w)for(;A.length;)delete g[A.pop()];else A=[];E=!1,w=!1}var C,j,U;function D(ne){if(typeof ne=="string"&&(ne=ne.split(x,2)),!e(ne)||ne.length!==2)throw new Error("Invalid tags: "+ne);C=new RegExp(o(ne[0])+"\\s*"),j=new RegExp("\\s*"+o(ne[1])),U=new RegExp("\\s*"+o("}"+ne[1]))}D(d||$.tags);for(var z=new L(v),q,V,W,Y,J,X;!z.eos();){if(q=z.pos,W=z.scanUntil(C),W)for(var ee=0,se=W.length;ee<se;++ee)Y=W.charAt(ee),f(Y)?(A.push(g.length),_+=Y):(w=!0,y=!0,_+=" "),g.push(["text",Y,q,q+1]),q+=1,Y===`
|
|
41
|
+
`&&(I(),_="",p=0,y=!1);if(!z.scan(C))break;if(E=!0,V=z.scan(P)||"name",z.scan(m),V==="="?(W=z.scanUntil(S),z.scan(S),z.scanUntil(j)):V==="{"?(W=z.scanUntil(U),z.scan(O),z.scanUntil(j),V="&"):W=z.scanUntil(j),!z.scan(j))throw new Error("Unclosed tag at "+z.pos);if(V==">"?J=[V,W,q,z.pos,_,p,y]:J=[V,W,q,z.pos],p++,g.push(J),V==="#"||V==="^")b.push(J);else if(V==="/"){if(X=b.pop(),!X)throw new Error('Unopened section "'+W+'" at '+q);if(X[1]!==W)throw new Error('Unclosed section "'+X[1]+'" at '+q)}else V==="name"||V==="{"||V==="&"?w=!0:V==="="&&D(W)}if(I(),X=b.pop(),X)throw new Error('Unclosed section "'+X[1]+'" at '+z.pos);return R(B(g))}function B(v){for(var d=[],y,b,g=0,A=v.length;g<A;++g)y=v[g],y&&(y[0]==="text"&&b&&b[0]==="text"?(b[1]+=y[1],b[3]=y[3]):(d.push(y),b=y));return d}function R(v){for(var d=[],y=d,b=[],g,A,E=0,w=v.length;E<w;++E)switch(g=v[E],g[0]){case"#":case"^":y.push(g),b.push(g),y=g[4]=[];break;case"/":A=b.pop(),A[5]=g[2],y=b.length>0?b[b.length-1][4]:d;break;default:y.push(g)}return d}function L(v){this.string=v,this.tail=v,this.pos=0}L.prototype.eos=function(){return this.tail===""},L.prototype.scan=function(d){var y=this.tail.match(d);if(!y||y.index!==0)return"";var b=y[0];return this.tail=this.tail.substring(b.length),this.pos+=b.length,b},L.prototype.scanUntil=function(d){var y=this.tail.search(d),b;switch(y){case-1:b=this.tail,this.tail="";break;case 0:b="";break;default:b=this.tail.substring(0,y),this.tail=this.tail.substring(y)}return this.pos+=b.length,b};function T(v,d){this.view=v,this.cache={".":this.view},this.parent=d}T.prototype.push=function(d){return new T(d,this)},T.prototype.lookup=function(d){var y=this.cache,b;if(y.hasOwnProperty(d))b=y[d];else{for(var g=this,A,E,w,_=!1;g;){if(d.indexOf(".")>0)for(A=g.view,E=d.split("."),w=0;A!=null&&w<E.length;)w===E.length-1&&(_=i(A,E[w])||a(A,E[w])),A=A[E[w++]];else A=g.view[d],_=i(g.view,d);if(_){b=A;break}g=g.parent}y[d]=b}return r(b)&&(b=b.call(this.view)),b};function M(){this.templateCache={_cache:{},set:function(d,y){this._cache[d]=y},get:function(d){return this._cache[d]},clear:function(){this._cache={}}}}M.prototype.clearCache=function(){typeof this.templateCache<"u"&&this.templateCache.clear()},M.prototype.parse=function(d,y){var b=this.templateCache,g=d+":"+(y||$.tags).join(":"),A=typeof b<"u",E=A?b.get(g):void 0;return E==null&&(E=F(d,y),A&&b.set(g,E)),E},M.prototype.render=function(d,y,b,g){var A=this.parse(d,g),E=y instanceof T?y:new T(y,void 0);return this.renderTokens(A,E,b,d,g)},M.prototype.renderTokens=function(d,y,b,g,A){for(var E="",w,_,p,I=0,C=d.length;I<C;++I)p=void 0,w=d[I],_=w[0],_==="#"?p=this.renderSection(w,y,b,g):_==="^"?p=this.renderInverted(w,y,b,g):_===">"?p=this.renderPartial(w,y,b,A):_==="&"?p=this.unescapedValue(w,y):_==="name"?p=this.escapedValue(w,y):_==="text"&&(p=this.rawValue(w)),p!==void 0&&(E+=p);return E},M.prototype.renderSection=function(d,y,b,g){var A=this,E="",w=y.lookup(d[1]);function _(C){return A.render(C,y,b)}if(w){if(e(w))for(var p=0,I=w.length;p<I;++p)E+=this.renderTokens(d[4],y.push(w[p]),b,g);else if(typeof w=="object"||typeof w=="string"||typeof w=="number")E+=this.renderTokens(d[4],y.push(w),b,g);else if(r(w)){if(typeof g!="string")throw new Error("Cannot use higher-order sections without the original template");w=w.call(y.view,g.slice(d[3],d[5]),_),w!=null&&(E+=w)}else E+=this.renderTokens(d[4],y,b,g);return E}},M.prototype.renderInverted=function(d,y,b,g){var A=y.lookup(d[1]);if(!A||e(A)&&A.length===0)return this.renderTokens(d[4],y,b,g)},M.prototype.indentPartial=function(d,y,b){for(var g=y.replace(/[^ \t]/g,""),A=d.split(`
|
|
42
|
+
`),E=0;E<A.length;E++)A[E].length&&(E>0||!b)&&(A[E]=g+A[E]);return A.join(`
|
|
43
|
+
`)},M.prototype.renderPartial=function(d,y,b,g){if(b){var A=r(b)?b(d[1]):b[d[1]];if(A!=null){var E=d[6],w=d[5],_=d[4],p=A;return w==0&&_&&(p=this.indentPartial(A,_,E)),this.renderTokens(this.parse(p,g),y,b,p)}}},M.prototype.unescapedValue=function(d,y){var b=y.lookup(d[1]);if(b!=null)return b},M.prototype.escapedValue=function(d,y){var b=y.lookup(d[1]);if(b!=null)return $.escape(b)},M.prototype.rawValue=function(d){return d[1]};var $={name:"mustache.js",version:"4.0.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(v){k.templateCache=v},get templateCache(){return k.templateCache}},k=new M;return $.clearCache=function(){return k.clearCache()},$.parse=function(d,y){return k.parse(d,y)},$.render=function(d,y,b,g){if(typeof d!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+n(d)+'" was given as the first argument for mustache#render(template, view, partials)');return k.render(d,y,b,g)},$.escape=h,$.Scanner=L,$.Context=T,$.Writer=M,$}))});var j1=G((SXe,BN)=>{"use strict";BN.exports=Lre;function Lre(t){if(!t)throw new TypeError("argument namespace is required");function e(r){}return e._file=void 0,e._ignored=!0,e._namespace=t,e._traced=!1,e._warned=Object.create(null),e.function=jre,e.property=Ure,e}function jre(t,e){if(typeof t!="function")throw new TypeError("argument fn must be a function");return t}function Ure(t,e,r){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("argument obj must be object");var n=Object.getOwnPropertyDescriptor(t,e);if(!n)throw new TypeError("must call property on owner object");if(!n.configurable)throw new TypeError("property must be configurable")}});function Kre(t,e=ls){let r=BigInt(t);if(e!==ls){let i=ls-e-1;i>0&&(r+=RN[i])}t=r.toString();let n=t.substring(0,t.length-ls)||"0",o=t.substring(t.length-ls).padStart(ls,"0").substring(0,e);return qre(`${Hre(n)}.${o}`)}function qre(t){return t.replace(/\.?0*$/,"")}function Hre(t){let e=/(-?\d+)(\d{3})/;for(;e.test(t);)t=t.replace(e,"$1,$2");return t}function me(t){if(typeof t=="string"){let e=[];for(let r=0;r<t.length;r++)e.push(t.charCodeAt(r));t=new Uint8Array(e)}return Y5.encode(t)}function nt(t){return Y5.decode(t)}function Ed(t){let e={},r=CN(t,Gre.schema,e,""),n=new wd(Kc(r,e),r);return Object.assign(n,e),n}function H8(t){let e=Ed(t.status.Failure),r=new Vre;return Object.assign(r,e),r.type=e.type,r.message=e.message,r.transaction_outcome=t.transaction_outcome,r}function Kc(t,e){return typeof ON[t]=="string"?PN.default.render(ON[t],{...e,...Wre}):JSON.stringify(e)}function CN(t,e,r,n){let o,i,a;for(let s in e){if(Yre(t[s]))return t[s];if(K8(t[s]))o=t[s],i=e[s],a=s;else if(K8(t.kind)&&K8(t.kind[s]))o=t.kind[s],i=e[s],a=s;else continue}if(o&&i){for(let s of Object.keys(i.props))r[s]=o[s];return CN(o,e,r,a)}else return r.kind=t,n}function ps(t,e){switch(!0){case/^account .*? does not exist while viewing$/.test(t):return"AccountDoesNotExist";case/^Account .*? doesn't exist$/.test(t):return"AccountDoesNotExist";case/^access key .*? does not exist while viewing$/.test(t):return"AccessKeyDoesNotExist";case/wasm execution failed with error: FunctionCallError\(CompilationError\(CodeDoesNotExist/.test(t):return"CodeDoesNotExist";case/wasm execution failed with error: CompilationError\(CodeDoesNotExist/.test(t):return"CodeDoesNotExist";case/wasm execution failed with error: FunctionCallError\(MethodResolveError\(MethodNotFound/.test(t):return"MethodNotFound";case/wasm execution failed with error: MethodResolveError\(MethodNotFound/.test(t):return"MethodNotFound";case/Transaction nonce \d+ must be larger than nonce of the used access key \d+/.test(t):return"InvalidNonce";default:return e}}function K8(t){return Object.prototype.toString.call(t)==="[object Object]"}function Yre(t){return Object.prototype.toString.call(t)==="[object String]"}function NN({contractId:t,outcome:e}){let r=[e.transaction_outcome,...e.receipts_outcome].reduce((n,o)=>{let i=typeof o.outcome.status=="object"&&typeof o.outcome.status.Failure=="object";return o.outcome.logs.length||i?n.concat({receiptIds:o.outcome.receipt_ids,logs:o.outcome.logs,failure:typeof o.outcome.status=="object"&&o.outcome.status.Failure!==void 0?Ed(o.outcome.status.Failure):null}):n},[]);for(let n of r)oi.log(`Receipt${n.receiptIds.length>1?"s":""}: ${n.receiptIds.join(", ")}`),G8({contractId:t,logs:n.logs,prefix:" "}),n.failure&&oi.warn(` Failure [${t}]: ${n.failure}`)}function G8({contractId:t,logs:e,prefix:r=""}){for(let n of e)oi.log(`${r}Log [${t}]: ${n}`)}function MN(t){if(typeof t.status=="object"&&typeof t.status.SuccessValue=="string"){let e=Buffer.from(t.status.SuccessValue,"base64").toString();try{return JSON.parse(e)}catch{return e}}return null}function $N(t,e){return t<e?-1:t>e?1:0}function Ad(t,e,r,n){return n&&n<49?Qre(t,e):(r||((0,kN.default)("findSeatPrice(validators, maxNumberOfSeats)")("`use `findSeatPrice(validators, maxNumberOfSeats, minimumStakeRatio)` instead"),r=[1,6250]),ene(t,e,r))}function Qre(t,e){let r=t.map(s=>BigInt(s.stake)).sort($N),n=BigInt(e),o=r.reduce((s,c)=>s+c);if(o<n)throw new Error("Stakes are below seats");let i=1n,a=o+1n;for(;i!==a-1n;){let s=(i+a)/2n,c=!1,u=0n;for(let f=0;f<r.length;++f)if(u=u+r[f]/s,u>=n){i=s,c=!0;break}c||(a=s)}return i}function ene(t,e,r){if(r.length!=2)throw Error("minimumStakeRatio should have 2 elements");let n=t.map(i=>BigInt(i.stake)).sort($N),o=n.reduce((i,a)=>i+a);return t.length<e?o*BigInt(r[0])/BigInt(r[1]):n[0]+1n}var PN,kN,q8,Dre,ON,ls,BXe,RN,zre,Gre,Wre,wd,Vre,Zre,Jre,Xre,oi,Dr=N(()=>{aa();PN=Jt(z8(),1);PR();kN=Jt(j1(),1),q8=30000000000000n,Dre={GasLimitExceeded:"Exceeded the maximum amount of gas allowed to burn per contract",MethodEmptyName:"Method name is empty",WasmerCompileError:"Wasmer compilation error: {{msg}}",GuestPanic:"Smart contract panicked: {{panic_msg}}",Memory:"Error creating Wasm memory",GasExceeded:"Exceeded the prepaid gas",MethodUTF8Error:"Method name is not valid UTF8 string",BadUTF16:"String encoding is bad UTF-16 sequence",WasmTrap:"WebAssembly trap: {{msg}}",GasInstrumentation:"Gas instrumentation failed or contract has denied instructions.",InvalidPromiseIndex:"{{promise_idx}} does not correspond to existing promises",InvalidPromiseResultIndex:"Accessed invalid promise result index: {{result_idx}}",Deserialization:"Error happened while deserializing the module",MethodNotFound:"Contract method is not found",InvalidRegisterId:"Accessed invalid register id: {{register_id}}",InvalidReceiptIndex:"VM Logic returned an invalid receipt index: {{receipt_index}}",EmptyMethodName:"Method name is empty in contract call",CannotReturnJointPromise:"Returning joint promise is currently prohibited",StackHeightInstrumentation:"Stack instrumentation failed",CodeDoesNotExist:"Cannot find contract code for account {{account_id}}",MethodInvalidSignature:"Invalid method signature",IntegerOverflow:"Integer overflow happened during contract execution",MemoryAccessViolation:"MemoryAccessViolation",InvalidIteratorIndex:"Iterator index {{iterator_index}} does not exist",IteratorWasInvalidated:"Iterator {{iterator_index}} was invalidated after its creation by performing a mutable operation on trie",InvalidAccountId:"VM Logic returned an invalid account id",Serialization:"Error happened while serializing the module",CannotAppendActionToJointPromise:"Actions can only be appended to non-joint promise.",InternalMemoryDeclared:"Internal memory declaration has been found in the module",Instantiate:"Error happened during instantiation",ProhibitedInView:"{{method_name}} is not allowed in view calls",InvalidMethodName:"VM Logic returned an invalid method name",BadUTF8:"String encoding is bad UTF-8 sequence",BalanceExceeded:"Exceeded the account balance",LinkError:"Wasm contract link error: {{msg}}",InvalidPublicKey:"VM Logic provided an invalid public key",ActorNoPermission:"Actor {{actor_id}} doesn't have permission to account {{account_id}} to complete the action",LackBalanceForState:"The account {{account_id}} wouldn't have enough balance to cover storage, required to have {{amount}} yoctoNEAR more",ReceiverMismatch:"Wrong AccessKey used for transaction: transaction is sent to receiver_id={{tx_receiver}}, but is signed with function call access key that restricted to only use with receiver_id={{ak_receiver}}. Either change receiver_id in your transaction or switch to use a FullAccessKey.",CostOverflow:"Transaction gas or balance cost is too high",InvalidSignature:"Transaction is not signed with the given public key",AccessKeyNotFound:`Signer "{{account_id}}" doesn't have access key with the given public_key {{public_key}}`,NotEnoughBalance:"Sender {{signer_id}} does not have enough balance {{#formatNear}}{{balance}}{{/formatNear}} for operation costing {{#formatNear}}{{cost}}{{/formatNear}}",NotEnoughAllowance:"Access Key {account_id}:{public_key} does not have enough balance {{#formatNear}}{{allowance}}{{/formatNear}} for transaction costing {{#formatNear}}{{cost}}{{/formatNear}}",Expired:"Transaction has expired",DeleteAccountStaking:"Account {{account_id}} is staking and can not be deleted",SignerDoesNotExist:"Signer {{signer_id}} does not exist",TriesToStake:"Account {{account_id}} tried to stake {{#formatNear}}{{stake}}{{/formatNear}}, but has staked {{#formatNear}}{{locked}}{{/formatNear}} and only has {{#formatNear}}{{balance}}{{/formatNear}}",AddKeyAlreadyExists:"The public key {{public_key}} is already used for an existing access key",InvalidSigner:"Invalid signer account ID {{signer_id}} according to requirements",CreateAccountNotAllowed:"The new account_id {{account_id}} can't be created by {{predecessor_id}}",RequiresFullAccess:"The transaction contains more then one action, but it was signed with an access key which allows transaction to apply only one specific action. To apply more then one actions TX must be signed with a full access key",TriesToUnstake:"Account {{account_id}} is not yet staked, but tried to unstake",InvalidNonce:"Transaction nonce {{tx_nonce}} must be larger than nonce of the used access key {{ak_nonce}}",AccountAlreadyExists:"Can't create a new account {{account_id}}, because it already exists",InvalidChain:"Transaction parent block hash doesn't belong to the current chain",AccountDoesNotExist:"Can't complete the action because account {{account_id}} doesn't exist",AccessKeyDoesNotExist:"Can't complete the action because access key {{public_key}} doesn't exist",MethodNameMismatch:"Transaction method name {{method_name}} isn't allowed by the access key",DeleteAccountHasRent:"Account {{account_id}} can't be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover the rent",DeleteAccountHasEnoughBalance:"Account {{account_id}} can't be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover it's storage",InvalidReceiver:"Invalid receiver account ID {{receiver_id}} according to requirements",DeleteKeyDoesNotExist:"Account {{account_id}} tries to remove an access key that doesn't exist",Timeout:"Timeout exceeded",Closed:"Connection closed",ShardCongested:"Shard {{shard_id}} rejected the transaction due to congestion level {{congestion_level}}, try again later",ShardStuck:"Shard {{shard_id}} rejected the transaction because it missed {{missed_chunks}} chunks and needs to recover before accepting new transactions, try again later"},ON=Dre,ls=24,BXe=10n**BigInt(ls),RN=[],zre=10n;for(let t=0,e=5n;t<ls;t++,e=e*zre)RN[t]=e;Gre={schema:{AccessKeyNotFound:{name:"AccessKeyNotFound",subtypes:[],props:{account_id:"",public_key:""}},AccountAlreadyExists:{name:"AccountAlreadyExists",subtypes:[],props:{account_id:""}},AccountDoesNotExist:{name:"AccountDoesNotExist",subtypes:[],props:{account_id:""}},ActionError:{name:"ActionError",subtypes:["AccountAlreadyExists","AccountDoesNotExist","CreateAccountOnlyByRegistrar","CreateAccountNotAllowed","ActorNoPermission","DeleteKeyDoesNotExist","AddKeyAlreadyExists","DeleteAccountStaking","LackBalanceForState","TriesToUnstake","TriesToStake","InsufficientStake","FunctionCallError","NewReceiptValidationError","OnlyImplicitAccountCreationAllowed","DeleteAccountWithLargeState","DelegateActionInvalidSignature","DelegateActionSenderDoesNotMatchTxReceiver","DelegateActionExpired","DelegateActionAccessKeyError","DelegateActionInvalidNonce","DelegateActionNonceTooLarge"],props:{index:""}},ActionsValidationError:{name:"ActionsValidationError",subtypes:["DeleteActionMustBeFinal","TotalPrepaidGasExceeded","TotalNumberOfActionsExceeded","AddKeyMethodNamesNumberOfBytesExceeded","AddKeyMethodNameLengthExceeded","IntegerOverflow","InvalidAccountId","ContractSizeExceeded","FunctionCallMethodNameLengthExceeded","FunctionCallArgumentsLengthExceeded","UnsuitableStakingKey","FunctionCallZeroAttachedGas","DelegateActionMustBeOnlyOne","UnsupportedProtocolFeature"],props:{}},ActorNoPermission:{name:"ActorNoPermission",subtypes:[],props:{account_id:"",actor_id:""}},AddKeyAlreadyExists:{name:"AddKeyAlreadyExists",subtypes:[],props:{account_id:"",public_key:""}},AddKeyMethodNameLengthExceeded:{name:"AddKeyMethodNameLengthExceeded",subtypes:[],props:{length:"",limit:""}},AddKeyMethodNamesNumberOfBytesExceeded:{name:"AddKeyMethodNamesNumberOfBytesExceeded",subtypes:[],props:{limit:"",total_number_of_bytes:""}},AltBn128InvalidInput:{name:"AltBn128InvalidInput",subtypes:[],props:{msg:""}},BadUTF16:{name:"BadUTF16",subtypes:[],props:{}},BadUTF8:{name:"BadUTF8",subtypes:[],props:{}},BalanceExceeded:{name:"BalanceExceeded",subtypes:[],props:{}},BalanceMismatchError:{name:"BalanceMismatchError",subtypes:[],props:{final_accounts_balance:"",final_postponed_receipts_balance:"",forwarded_buffered_receipts_balance:"",incoming_receipts_balance:"",incoming_validator_rewards:"",initial_accounts_balance:"",initial_postponed_receipts_balance:"",new_buffered_receipts_balance:"",new_delayed_receipts_balance:"",other_burnt_amount:"",outgoing_receipts_balance:"",processed_delayed_receipts_balance:"",slashed_burnt_amount:"",tx_burnt_amount:""}},CallIndirectOOB:{name:"CallIndirectOOB",subtypes:[],props:{}},CannotAppendActionToJointPromise:{name:"CannotAppendActionToJointPromise",subtypes:[],props:{}},CannotReturnJointPromise:{name:"CannotReturnJointPromise",subtypes:[],props:{}},CodeDoesNotExist:{name:"CodeDoesNotExist",subtypes:[],props:{account_id:""}},CompilationError:{name:"CompilationError",subtypes:["CodeDoesNotExist","PrepareError","WasmerCompileError"],props:{}},ContractSizeExceeded:{name:"ContractSizeExceeded",subtypes:[],props:{limit:"",size:""}},CostOverflow:{name:"CostOverflow",subtypes:[],props:{}},CreateAccountNotAllowed:{name:"CreateAccountNotAllowed",subtypes:[],props:{account_id:"",predecessor_id:""}},CreateAccountOnlyByRegistrar:{name:"CreateAccountOnlyByRegistrar",subtypes:[],props:{account_id:"",predecessor_id:"",registrar_account_id:""}},DelegateActionExpired:{name:"DelegateActionExpired",subtypes:[],props:{}},DelegateActionInvalidNonce:{name:"DelegateActionInvalidNonce",subtypes:[],props:{ak_nonce:"",delegate_nonce:""}},DelegateActionInvalidSignature:{name:"DelegateActionInvalidSignature",subtypes:[],props:{}},DelegateActionMustBeOnlyOne:{name:"DelegateActionMustBeOnlyOne",subtypes:[],props:{}},DelegateActionNonceTooLarge:{name:"DelegateActionNonceTooLarge",subtypes:[],props:{delegate_nonce:"",upper_bound:""}},DelegateActionSenderDoesNotMatchTxReceiver:{name:"DelegateActionSenderDoesNotMatchTxReceiver",subtypes:[],props:{receiver_id:"",sender_id:""}},DeleteAccountStaking:{name:"DeleteAccountStaking",subtypes:[],props:{account_id:""}},DeleteAccountWithLargeState:{name:"DeleteAccountWithLargeState",subtypes:[],props:{account_id:""}},DeleteActionMustBeFinal:{name:"DeleteActionMustBeFinal",subtypes:[],props:{}},DeleteKeyDoesNotExist:{name:"DeleteKeyDoesNotExist",subtypes:[],props:{account_id:"",public_key:""}},DepositWithFunctionCall:{name:"DepositWithFunctionCall",subtypes:[],props:{}},Deprecated:{name:"Deprecated",subtypes:[],props:{method_name:""}},Deserialization:{name:"Deserialization",subtypes:[],props:{}},ECRecoverError:{name:"ECRecoverError",subtypes:[],props:{msg:""}},Ed25519VerifyInvalidInput:{name:"Ed25519VerifyInvalidInput",subtypes:[],props:{msg:""}},EmptyMethodName:{name:"EmptyMethodName",subtypes:[],props:{}},Expired:{name:"Expired",subtypes:[],props:{}},FunctionCallArgumentsLengthExceeded:{name:"FunctionCallArgumentsLengthExceeded",subtypes:[],props:{length:"",limit:""}},FunctionCallMethodNameLengthExceeded:{name:"FunctionCallMethodNameLengthExceeded",subtypes:[],props:{length:"",limit:""}},FunctionCallZeroAttachedGas:{name:"FunctionCallZeroAttachedGas",subtypes:[],props:{}},GasExceeded:{name:"GasExceeded",subtypes:[],props:{}},GasInstrumentation:{name:"GasInstrumentation",subtypes:[],props:{}},GasLimitExceeded:{name:"GasLimitExceeded",subtypes:[],props:{}},GenericTrap:{name:"GenericTrap",subtypes:[],props:{}},GuestPanic:{name:"GuestPanic",subtypes:[],props:{panic_msg:""}},HostError:{name:"HostError",subtypes:["BadUTF16","BadUTF8","GasExceeded","GasLimitExceeded","BalanceExceeded","EmptyMethodName","GuestPanic","IntegerOverflow","InvalidPromiseIndex","CannotAppendActionToJointPromise","CannotReturnJointPromise","InvalidPromiseResultIndex","InvalidRegisterId","IteratorWasInvalidated","MemoryAccessViolation","InvalidReceiptIndex","InvalidIteratorIndex","InvalidAccountId","InvalidMethodName","InvalidPublicKey","ProhibitedInView","NumberOfLogsExceeded","KeyLengthExceeded","ValueLengthExceeded","TotalLogLengthExceeded","NumberPromisesExceeded","NumberInputDataDependenciesExceeded","ReturnedValueLengthExceeded","ContractSizeExceeded","Deprecated","ECRecoverError","AltBn128InvalidInput","Ed25519VerifyInvalidInput"],props:{}},IllegalArithmetic:{name:"IllegalArithmetic",subtypes:[],props:{}},IncorrectCallIndirectSignature:{name:"IncorrectCallIndirectSignature",subtypes:[],props:{}},IndirectCallToNull:{name:"IndirectCallToNull",subtypes:[],props:{}},Instantiate:{name:"Instantiate",subtypes:[],props:{}},InsufficientStake:{name:"InsufficientStake",subtypes:[],props:{account_id:"",minimum_stake:"",stake:""}},IntegerOverflow:{name:"IntegerOverflow",subtypes:[],props:{}},InternalMemoryDeclared:{name:"InternalMemoryDeclared",subtypes:[],props:{}},InvalidAccessKeyError:{name:"InvalidAccessKeyError",subtypes:["AccessKeyNotFound","ReceiverMismatch","MethodNameMismatch","RequiresFullAccess","NotEnoughAllowance","DepositWithFunctionCall"],props:{}},InvalidAccountId:{name:"InvalidAccountId",subtypes:[],props:{}},InvalidChain:{name:"InvalidChain",subtypes:[],props:{}},InvalidDataReceiverId:{name:"InvalidDataReceiverId",subtypes:[],props:{account_id:""}},InvalidIteratorIndex:{name:"InvalidIteratorIndex",subtypes:[],props:{iterator_index:""}},InvalidMethodName:{name:"InvalidMethodName",subtypes:[],props:{}},InvalidNonce:{name:"InvalidNonce",subtypes:[],props:{ak_nonce:"",tx_nonce:""}},InvalidPredecessorId:{name:"InvalidPredecessorId",subtypes:[],props:{account_id:""}},InvalidPromiseIndex:{name:"InvalidPromiseIndex",subtypes:[],props:{promise_idx:""}},InvalidPromiseResultIndex:{name:"InvalidPromiseResultIndex",subtypes:[],props:{result_idx:""}},InvalidPublicKey:{name:"InvalidPublicKey",subtypes:[],props:{}},InvalidReceiptIndex:{name:"InvalidReceiptIndex",subtypes:[],props:{receipt_index:""}},InvalidReceiverId:{name:"InvalidReceiverId",subtypes:[],props:{account_id:""}},InvalidRegisterId:{name:"InvalidRegisterId",subtypes:[],props:{register_id:""}},InvalidSignature:{name:"InvalidSignature",subtypes:[],props:{}},InvalidSignerId:{name:"InvalidSignerId",subtypes:[],props:{account_id:""}},InvalidTxError:{name:"InvalidTxError",subtypes:["InvalidAccessKeyError","InvalidSignerId","SignerDoesNotExist","InvalidNonce","NonceTooLarge","InvalidReceiverId","InvalidSignature","NotEnoughBalance","LackBalanceForState","CostOverflow","InvalidChain","Expired","ActionsValidation","TransactionSizeExceeded","StorageError","ShardCongested","ShardStuck"],props:{}},IteratorWasInvalidated:{name:"IteratorWasInvalidated",subtypes:[],props:{iterator_index:""}},KeyLengthExceeded:{name:"KeyLengthExceeded",subtypes:[],props:{length:"",limit:""}},LackBalanceForState:{name:"LackBalanceForState",subtypes:[],props:{account_id:"",amount:""}},Memory:{name:"Memory",subtypes:[],props:{}},MemoryAccessViolation:{name:"MemoryAccessViolation",subtypes:[],props:{}},MemoryOutOfBounds:{name:"MemoryOutOfBounds",subtypes:[],props:{}},MethodEmptyName:{name:"MethodEmptyName",subtypes:[],props:{}},MethodInvalidSignature:{name:"MethodInvalidSignature",subtypes:[],props:{}},MethodNameMismatch:{name:"MethodNameMismatch",subtypes:[],props:{method_name:""}},MethodNotFound:{name:"MethodNotFound",subtypes:[],props:{}},MethodResolveError:{name:"MethodResolveError",subtypes:["MethodEmptyName","MethodNotFound","MethodInvalidSignature"],props:{}},MisalignedAtomicAccess:{name:"MisalignedAtomicAccess",subtypes:[],props:{}},NonceTooLarge:{name:"NonceTooLarge",subtypes:[],props:{tx_nonce:"",upper_bound:""}},NotEnoughAllowance:{name:"NotEnoughAllowance",subtypes:[],props:{account_id:"",allowance:"",cost:"",public_key:""}},NotEnoughBalance:{name:"NotEnoughBalance",subtypes:[],props:{balance:"",cost:"",signer_id:""}},NumberInputDataDependenciesExceeded:{name:"NumberInputDataDependenciesExceeded",subtypes:[],props:{limit:"",number_of_input_data_dependencies:""}},NumberOfLogsExceeded:{name:"NumberOfLogsExceeded",subtypes:[],props:{limit:""}},NumberPromisesExceeded:{name:"NumberPromisesExceeded",subtypes:[],props:{limit:"",number_of_promises:""}},OnlyImplicitAccountCreationAllowed:{name:"OnlyImplicitAccountCreationAllowed",subtypes:[],props:{account_id:""}},PrepareError:{name:"PrepareError",subtypes:["Serialization","Deserialization","InternalMemoryDeclared","GasInstrumentation","StackHeightInstrumentation","Instantiate","Memory","TooManyFunctions","TooManyLocals"],props:{}},ProhibitedInView:{name:"ProhibitedInView",subtypes:[],props:{method_name:""}},ReceiptSizeExceeded:{name:"ReceiptSizeExceeded",subtypes:[],props:{limit:"",size:""}},ReceiptValidationError:{name:"ReceiptValidationError",subtypes:["InvalidPredecessorId","InvalidReceiverId","InvalidSignerId","InvalidDataReceiverId","ReturnedValueLengthExceeded","NumberInputDataDependenciesExceeded","ActionsValidation","ReceiptSizeExceeded"],props:{}},ReceiverMismatch:{name:"ReceiverMismatch",subtypes:[],props:{ak_receiver:"",tx_receiver:""}},RequiresFullAccess:{name:"RequiresFullAccess",subtypes:[],props:{}},ReturnedValueLengthExceeded:{name:"ReturnedValueLengthExceeded",subtypes:[],props:{length:"",limit:""}},Serialization:{name:"Serialization",subtypes:[],props:{}},ShardCongested:{name:"ShardCongested",subtypes:[],props:{congestion_level:"",shard_id:""}},ShardStuck:{name:"ShardStuck",subtypes:[],props:{missed_chunks:"",shard_id:""}},SignerDoesNotExist:{name:"SignerDoesNotExist",subtypes:[],props:{signer_id:""}},StackHeightInstrumentation:{name:"StackHeightInstrumentation",subtypes:[],props:{}},StackOverflow:{name:"StackOverflow",subtypes:[],props:{}},TooManyFunctions:{name:"TooManyFunctions",subtypes:[],props:{}},TooManyLocals:{name:"TooManyLocals",subtypes:[],props:{}},TotalLogLengthExceeded:{name:"TotalLogLengthExceeded",subtypes:[],props:{length:"",limit:""}},TotalNumberOfActionsExceeded:{name:"TotalNumberOfActionsExceeded",subtypes:[],props:{limit:"",total_number_of_actions:""}},TotalPrepaidGasExceeded:{name:"TotalPrepaidGasExceeded",subtypes:[],props:{limit:"",total_prepaid_gas:""}},TransactionSizeExceeded:{name:"TransactionSizeExceeded",subtypes:[],props:{limit:"",size:""}},TriesToStake:{name:"TriesToStake",subtypes:[],props:{account_id:"",balance:"",locked:"",stake:""}},TriesToUnstake:{name:"TriesToUnstake",subtypes:[],props:{account_id:""}},TxExecutionError:{name:"TxExecutionError",subtypes:["ActionError","InvalidTxError"],props:{}},Unreachable:{name:"Unreachable",subtypes:[],props:{}},UnsuitableStakingKey:{name:"UnsuitableStakingKey",subtypes:[],props:{public_key:""}},UnsupportedProtocolFeature:{name:"UnsupportedProtocolFeature",subtypes:[],props:{protocol_feature:"",version:""}},ValueLengthExceeded:{name:"ValueLengthExceeded",subtypes:[],props:{length:"",limit:""}},WasmTrap:{name:"WasmTrap",subtypes:["Unreachable","IncorrectCallIndirectSignature","MemoryOutOfBounds","CallIndirectOOB","IllegalArithmetic","MisalignedAtomicAccess","IndirectCallToNull","StackOverflow","GenericTrap"],props:{}},WasmerCompileError:{name:"WasmerCompileError",subtypes:[],props:{msg:""}},Closed:{name:"Closed",subtypes:[],props:{}},ServerError:{name:"ServerError",subtypes:["TxExecutionError","Timeout","Closed"],props:{}},Timeout:{name:"Timeout",subtypes:[],props:{}}}},Wre={formatNear:()=>(t,e)=>Kre(e(t))},wd=class extends zt{},Vre=class extends wd{transaction_outcome};Zre=class{constructor(t){this.logLevels=t}isLevelEnabled=t=>this.logLevels.includes(t);print(t,e,...r){switch(t){case"error":case"fatal":return console.error(e,...r);case"warn":return console.warn(e,...r);case"log":return console.log(e,...r);case"debug":case"verbose":return console.debug(e,...r)}}verbose(t,...e){this.isLevelEnabled("verbose")&&this.print("verbose",t,...e)}debug(t,...e){this.isLevelEnabled("debug")&&this.print("debug",t,...e)}log(t,...e){this.isLevelEnabled("log")&&this.print("log",t,...e)}warn(t,...e){this.isLevelEnabled("warn")&&this.print("warn",t,...e)}error(t,...e){this.isLevelEnabled("error")&&this.print("error",t,...e)}fatal(t,...e){this.isLevelEnabled("fatal")&&this.print("fatal",t,...e)}},Jre=["verbose","debug","log","warn","error","fatal"],Xre=new Zre(Jre),oi=class{static instanceRef=Xre;static overrideLogger=t=>{this.instanceRef=t};static error(t,...e){this.instanceRef?.error(t,...e)}static log(t,...e){this.instanceRef?.log(t,...e)}static warn(t,...e){this.instanceRef?.warn(t,...e)}static debug(t,...e){this.instanceRef?.debug?.(t,...e)}static verbose(t,...e){this.instanceRef?.verbose?.(t,...e)}static fatal(t,...e){this.instanceRef?.fatal?.(t,...e)}}});var FN=N(()=>{});var LN=N(()=>{});var up,jN=N(()=>{up=class{constructor(e){if(Object.keys(e).length!==1)throw new Error("Enum can only take single value");Object.keys(e).map(r=>{this[r]=e[r]})}}});var jn,UN=N(()=>{jn=class extends Error{type;context;constructor(e,r,n){super(e),this.type=r||"UntypedError",this.context=n}}});var DN=N(()=>{});var dp=N(()=>{FN();LN();jN();UN();DN()});var _d,Sd,qc,Hc,U1,D1,z1,K1,q1,H1,G1,W1,V1,Y1,Z1,zr,W8=N(()=>{dp();_d=class{allowance;receiverId;methodNames;constructor({allowance:e,receiverId:r,methodNames:n}){this.allowance=e,this.receiverId=r,this.methodNames=n}},Sd=class{},qc=class extends up{enum;functionCall;fullAccess;constructor(e){super(e);for(let[r,n]of Object.entries(e||{}))this[r]=n,this.enum=r}},Hc=class{nonce;permission;constructor({nonce:e,permission:r}){this.nonce=e,this.permission=r}},U1=class{},D1=class{code;constructor({code:e}){this.code=e}},z1=class{methodName;args;gas;deposit;constructor({methodName:e,args:r,gas:n,deposit:o}){this.methodName=e,this.args=r,this.gas=n,this.deposit=o}},K1=class{code;deployMode;constructor({code:e,deployMode:r}){this.code=e,this.deployMode=r}},q1=class{contractIdentifier;constructor({contractIdentifier:e}){this.contractIdentifier=e}},H1=class{deposit;constructor({deposit:e}){this.deposit=e}},G1=class{stake;publicKey;constructor({stake:e,publicKey:r}){this.stake=e,this.publicKey=r}},W1=class{publicKey;accessKey;constructor({publicKey:e,accessKey:r}){this.publicKey=e,this.accessKey=r}},V1=class{publicKey;constructor({publicKey:e}){this.publicKey=e}},Y1=class{beneficiaryId;constructor({beneficiaryId:e}){this.beneficiaryId=e}},Z1=class{delegateAction;signature;constructor({delegateAction:e,signature:r}){this.delegateAction=e,this.signature=r}},zr=class extends up{enum;createAccount;deployContract;functionCall;transfer;stake;addKey;deleteKey;deleteAccount;signedDelegate;deployGlobalContract;useGlobalContract;constructor(e){super(e);for(let[r,n]of Object.entries(e||{}))this[r]=n,this.enum=r}}});function tne(){return new Hc({nonce:0n,permission:new qc({fullAccess:new Sd})})}function rne(t,e,r){return new Hc({nonce:0n,permission:new qc({functionCall:new _d({receiverId:t,allowance:r,methodNames:e})})})}function nne(){return new zr({createAccount:new U1})}function one(t){return new zr({deployContract:new D1({code:t})})}function ine(t){return t.byteLength!==void 0&&t.byteLength===t.length?t:Buffer.from(JSON.stringify(t))}function ane(t,e,r=0n,n=0n,o=ine){return new zr({functionCall:new z1({methodName:t,args:o(e),gas:r,deposit:n})})}function sne(t=0n){return new zr({transfer:new H1({deposit:t})})}function cne(t=0n,e){return new zr({stake:new G1({stake:t,publicKey:e})})}function fne(t,e){return new zr({addKey:new W1({publicKey:t,accessKey:e})})}function une(t){return new zr({deleteKey:new V1({publicKey:t})})}function dne(t){return new zr({deleteAccount:new Y1({beneficiaryId:t})})}function lne({delegateAction:t,signature:e}){return new zr({signedDelegate:new Z1({delegateAction:t,signature:e})})}function pne(t,e){return new zr({deployGlobalContract:new K1({code:t,deployMode:e})})}function hne(t){return new zr({useGlobalContract:new q1({contractIdentifier:t})})}var yn,V8=N(()=>{W8();yn={addKey:fne,createAccount:nne,deleteAccount:dne,deleteKey:une,deployContract:one,fullAccessKey:tne,functionCall:ane,functionCallAccessKey:rne,signedDelegate:lne,stake:cne,transfer:sne,deployGlobalContract:pne,useGlobalContract:hne}});var Id,J1=N(()=>{Id=["u8","u16","u32","u64","u128","i8","i16","i32","i64","i128","f32","f64"]});var zN,KN,Y8=N(()=>{zN=(function(){function t(){this.offset=0,this.buffer_size=256,this.buffer=new ArrayBuffer(this.buffer_size),this.view=new DataView(this.buffer)}return t.prototype.resize_if_necessary=function(e){if(this.buffer_size-this.offset<e){this.buffer_size=Math.max(this.buffer_size*2,this.buffer_size+e);var r=new ArrayBuffer(this.buffer_size);new Uint8Array(r).set(new Uint8Array(this.buffer)),this.buffer=r,this.view=new DataView(r)}},t.prototype.get_used_buffer=function(){return new Uint8Array(this.buffer).slice(0,this.offset)},t.prototype.store_value=function(e,r){var n=r.substring(1),o=parseInt(n)/8;this.resize_if_necessary(o);var i=r[0]==="f"?"setFloat".concat(n):r[0]==="i"?"setInt".concat(n):"setUint".concat(n);this.view[i](this.offset,e,!0),this.offset+=o},t.prototype.store_bytes=function(e){this.resize_if_necessary(e.length),new Uint8Array(this.buffer).set(new Uint8Array(e),this.offset),this.offset+=e.length},t})(),KN=(function(){function t(e){this.offset=0,this.buffer_size=e.length,this.buffer=new ArrayBuffer(e.length),new Uint8Array(this.buffer).set(e),this.view=new DataView(this.buffer)}return t.prototype.assert_enough_buffer=function(e){if(this.offset+e>this.buffer.byteLength)throw new Error("Error in schema, the buffer is smaller than expected")},t.prototype.consume_value=function(e){var r=e.substring(1),n=parseInt(r)/8;this.assert_enough_buffer(n);var o=e[0]==="f"?"getFloat".concat(r):e[0]==="i"?"getInt".concat(r):"getUint".concat(r),i=this.view[o](this.offset,!0);return this.offset+=n,i},t.prototype.consume_bytes=function(e){this.assert_enough_buffer(e);var r=this.buffer.slice(this.offset,this.offset+e);return this.offset+=e,r},t})()});function GN(t){return Array.isArray(t)||!!t&&typeof t=="object"&&"length"in t&&typeof t.length=="number"&&(t.length===0||t.length>0&&t.length-1 in t)}function Gc(t,e,r){if(typeof t!==e)throw new Error("Expected ".concat(e," not ").concat(typeof t,"(").concat(t,") at ").concat(r.join(".")))}function WN(t,e){var r=["number","string","bigint","boolean"].includes(typeof t),n=typeof t=="object"&&t!==null&&"toString"in t;if(!r&&!n)throw new Error("Expected bigint, number, boolean or string not ".concat(typeof t,"(").concat(t,") at ").concat(e.join(".")))}function Z8(t,e,r){if(t!==e)throw new Error("Array length ".concat(t," does not match schema length ").concat(e," at ").concat(r.join(".")))}function VN(t,e){if(typeof t!="object"||t===null)throw new Error("Expected object not ".concat(typeof t,"(").concat(t,") at ").concat(e.join(".")))}function ii(t){if(!(typeof t=="string"&&qN.includes(t))){if(t&&typeof t=="object"){var e=Object.keys(t);if(e.length===1&&HN.includes(e[0])){var r=e[0];if(r==="option")return ii(t[r]);if(r==="enum")return yne(t[r]);if(r==="array")return bne(t[r]);if(r==="set")return ii(t[r]);if(r==="map")return gne(t[r]);if(r==="struct")return vne(t[r])}}throw new Td(t,HN.join(", ")+" or "+qN.join(", "))}}function yne(t){if(!Array.isArray(t))throw new Td(t,"Array");for(var e=0,r=t;e<r.length;e++){var n=r[e];if(typeof n!="object"||!("struct"in n))throw new Error('Missing "struct" key in enum schema');if(typeof n.struct!="object"||Object.keys(n.struct).length!==1)throw new Error('The "struct" in each enum must have a single key');ii({struct:n.struct})}}function bne(t){if(typeof t!="object")throw new Td(t,"{ type, len? }");if(t.len&&typeof t.len!="number")throw new Error("Invalid schema: ".concat(t));if("type"in t)return ii(t.type);throw new Td(t,"{ type, len? }")}function gne(t){if(typeof t=="object"&&"key"in t&&"value"in t)ii(t.key),ii(t.value);else throw new Td(t,"{ key, value }")}function vne(t){if(typeof t!="object")throw new Td(t,"object");for(var e in t)ii(t[e])}var mne,qN,HN,Td,J8=N(()=>{J1();mne=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();qN=Id.concat(["bool","string"]),HN=["option","enum","array","set","map","struct"],Td=(function(t){mne(e,t);function e(r,n){var o="Invalid schema: ".concat(JSON.stringify(r)," expected ").concat(n);return t.call(this,o)||this}return e})(Error)});var ZN,JN=N(()=>{J1();Y8();J8();ZN=(function(){function t(e){this.encoded=new zN,this.fieldPath=["value"],this.checkTypes=e}return t.prototype.encode=function(e,r){return this.encode_value(e,r),this.encoded.get_used_buffer()},t.prototype.encode_value=function(e,r){if(typeof r=="string"){if(Id.includes(r))return this.encode_integer(e,r);if(r==="string")return this.encode_string(e);if(r==="bool")return this.encode_boolean(e)}if(typeof r=="object"){if("option"in r)return this.encode_option(e,r);if("enum"in r)return this.encode_enum(e,r);if("array"in r)return this.encode_array(e,r);if("set"in r)return this.encode_set(e,r);if("map"in r)return this.encode_map(e,r);if("struct"in r)return this.encode_struct(e,r)}},t.prototype.encode_integer=function(e,r){var n=parseInt(r.substring(1));n<=32||r=="f64"?(this.checkTypes&&Gc(e,"number",this.fieldPath),this.encoded.store_value(e,r)):(this.checkTypes&&WN(e,this.fieldPath),this.encode_bigint(BigInt(e),n))},t.prototype.encode_bigint=function(e,r){for(var n=r/8,o=new Uint8Array(n),i=0;i<n;i++)o[i]=Number(e&BigInt(255)),e=e>>BigInt(8);this.encoded.store_bytes(new Uint8Array(o))},t.prototype.encode_string=function(e){this.checkTypes&&Gc(e,"string",this.fieldPath);var r=e;this.encoded.store_value(r.length,"u32");for(var n=0;n<r.length;n++)this.encoded.store_value(r.charCodeAt(n),"u8")},t.prototype.encode_boolean=function(e){this.checkTypes&&Gc(e,"boolean",this.fieldPath),this.encoded.store_value(e?1:0,"u8")},t.prototype.encode_option=function(e,r){e==null?this.encoded.store_value(0,"u8"):(this.encoded.store_value(1,"u8"),this.encode_value(e,r.option))},t.prototype.encode_enum=function(e,r){this.checkTypes&&VN(e,this.fieldPath);for(var n=Object.keys(e)[0],o=0;o<r.enum.length;o++){var i=r.enum[o];if(n===Object.keys(i.struct)[0])return this.encoded.store_value(o,"u8"),this.encode_struct(e,i)}throw new Error("Enum key (".concat(n,") not found in enum schema: ").concat(JSON.stringify(r)," at ").concat(this.fieldPath.join(".")))},t.prototype.encode_array=function(e,r){if(GN(e))return this.encode_arraylike(e,r);if(e instanceof ArrayBuffer)return this.encode_buffer(e,r);throw new Error("Expected Array-like not ".concat(typeof e,"(").concat(e,") at ").concat(this.fieldPath.join(".")))},t.prototype.encode_arraylike=function(e,r){r.array.len?Z8(e.length,r.array.len,this.fieldPath):this.encoded.store_value(e.length,"u32");for(var n=0;n<e.length;n++)this.encode_value(e[n],r.array.type)},t.prototype.encode_buffer=function(e,r){r.array.len?Z8(e.byteLength,r.array.len,this.fieldPath):this.encoded.store_value(e.byteLength,"u32"),this.encoded.store_bytes(new Uint8Array(e))},t.prototype.encode_set=function(e,r){this.checkTypes&&Gc(e,"object",this.fieldPath);var n=e instanceof Set,o=n?Array.from(e.values()):Object.values(e);this.encoded.store_value(o.length,"u32");for(var i=0,a=o;i<a.length;i++){var s=a[i];this.encode_value(s,r.set)}},t.prototype.encode_map=function(e,r){this.checkTypes&&Gc(e,"object",this.fieldPath);var n=e instanceof Map,o=n?Array.from(e.keys()):Object.keys(e);this.encoded.store_value(o.length,"u32");for(var i=0,a=o;i<a.length;i++){var s=a[i];this.encode_value(s,r.map.key),this.encode_value(n?e.get(s):e[s],r.map.value)}},t.prototype.encode_struct=function(e,r){this.checkTypes&&Gc(e,"object",this.fieldPath);for(var n=0,o=Object.keys(r.struct);n<o.length;n++){var i=o[n];this.fieldPath.push(i),this.encode_value(e[i],r.struct[i]),this.fieldPath.pop()}},t})()});var XN,QN=N(()=>{J1();Y8();XN=(function(){function t(e){this.buffer=new KN(e)}return t.prototype.decode=function(e){return this.decode_value(e)},t.prototype.decode_value=function(e){if(typeof e=="string"){if(Id.includes(e))return this.decode_integer(e);if(e==="string")return this.decode_string();if(e==="bool")return this.decode_boolean()}if(typeof e=="object"){if("option"in e)return this.decode_option(e);if("enum"in e)return this.decode_enum(e);if("array"in e)return this.decode_array(e);if("set"in e)return this.decode_set(e);if("map"in e)return this.decode_map(e);if("struct"in e)return this.decode_struct(e)}throw new Error("Unsupported type: ".concat(e))},t.prototype.decode_integer=function(e){var r=parseInt(e.substring(1));return r<=32||e=="f64"?this.buffer.consume_value(e):this.decode_bigint(r,e.startsWith("i"))},t.prototype.decode_bigint=function(e,r){r===void 0&&(r=!1);var n=e/8,o=new Uint8Array(this.buffer.consume_bytes(n)),i=o.reduceRight(function(a,s){return a+s.toString(16).padStart(2,"0")},"");return r&&o[n-1]?BigInt.asIntN(e,BigInt("0x".concat(i))):BigInt("0x".concat(i))},t.prototype.decode_string=function(){var e=this.decode_integer("u32"),r=new Uint8Array(this.buffer.consume_bytes(e));return String.fromCharCode.apply(null,r)},t.prototype.decode_boolean=function(){return this.buffer.consume_value("u8")>0},t.prototype.decode_option=function(e){var r=this.buffer.consume_value("u8");if(r===1)return this.decode_value(e.option);if(r!==0)throw new Error("Invalid option ".concat(r));return null},t.prototype.decode_enum=function(e){var r,n=this.buffer.consume_value("u8");if(n>e.enum.length)throw new Error("Enum option ".concat(n," is not available"));var o=e.enum[n].struct,i=Object.keys(o)[0];return r={},r[i]=this.decode_value(o[i]),r},t.prototype.decode_array=function(e){for(var r=[],n=e.array.len?e.array.len:this.decode_integer("u32"),o=0;o<n;++o)r.push(this.decode_value(e.array.type));return r},t.prototype.decode_set=function(e){for(var r=this.decode_integer("u32"),n=new Set,o=0;o<r;++o)n.add(this.decode_value(e.set));return n},t.prototype.decode_map=function(e){for(var r=this.decode_integer("u32"),n=new Map,o=0;o<r;++o){var i=this.decode_value(e.map.key),a=this.decode_value(e.map.value);n.set(i,a)}return n},t.prototype.decode_struct=function(e){var r={};for(var n in e.struct)r[n]=this.decode_value(e.struct[n]);return r},t})()});function sa(t,e,r){r===void 0&&(r=!0),r&&ii(t);var n=new ZN(r);return n.encode(e,t)}function lp(t,e,r){r===void 0&&(r=!0),r&&ii(t);var n=new XN(e);return n.decode(t)}var X1=N(()=>{JN();QN();J8()});function Q8(t){let e="signature"in t?X8.SignedTransaction:X8.Transaction;return sa(e,t)}function xne(t){return new pp(lp(X8.SignedTransaction,t))}var pp,X8,eM=N(()=>{X1();pp=class{transaction;signature;constructor({transaction:e,signature:r}){this.transaction=e,this.signature=r}encode(){return Q8(this)}static decode(e){return xne(e)}},X8=new class{Ed25519Signature={struct:{data:{array:{type:"u8",len:64}}}};Secp256k1Signature={struct:{data:{array:{type:"u8",len:65}}}};Signature={enum:[{struct:{ed25519Signature:this.Ed25519Signature}},{struct:{secp256k1Signature:this.Secp256k1Signature}}]};Ed25519Data={struct:{data:{array:{type:"u8",len:32}}}};Secp256k1Data={struct:{data:{array:{type:"u8",len:64}}}};PublicKey={enum:[{struct:{ed25519Key:this.Ed25519Data}},{struct:{secp256k1Key:this.Secp256k1Data}}]};FunctionCallPermission={struct:{allowance:{option:"u128"},receiverId:"string",methodNames:{array:{type:"string"}}}};FullAccessPermission={struct:{}};AccessKeyPermission={enum:[{struct:{functionCall:this.FunctionCallPermission}},{struct:{fullAccess:this.FullAccessPermission}}]};AccessKey={struct:{nonce:"u64",permission:this.AccessKeyPermission}};CreateAccount={struct:{}};DeployContract={struct:{code:{array:{type:"u8"}}}};FunctionCall={struct:{methodName:"string",args:{array:{type:"u8"}},gas:"u64",deposit:"u128"}};Transfer={struct:{deposit:"u128"}};Stake={struct:{stake:"u128",publicKey:this.PublicKey}};AddKey={struct:{publicKey:this.PublicKey,accessKey:this.AccessKey}};DeleteKey={struct:{publicKey:this.PublicKey}};DeleteAccount={struct:{beneficiaryId:"string"}};GlobalContractDeployMode={enum:[{struct:{CodeHash:{struct:{}}}},{struct:{AccountId:{struct:{}}}}]};GlobalContractIdentifier={enum:[{struct:{CodeHash:{array:{type:"u8",len:32}}}},{struct:{AccountId:"string"}}]};DeployGlobalContract={struct:{code:{array:{type:"u8"}},deployMode:this.GlobalContractDeployMode}};UseGlobalContract={struct:{contractIdentifier:this.GlobalContractIdentifier}};DelegateActionPrefix={struct:{prefix:"u32"}};ClassicActions={enum:[{struct:{createAccount:this.CreateAccount}},{struct:{deployContract:this.DeployContract}},{struct:{functionCall:this.FunctionCall}},{struct:{transfer:this.Transfer}},{struct:{stake:this.Stake}},{struct:{addKey:this.AddKey}},{struct:{deleteKey:this.DeleteKey}},{struct:{deleteAccount:this.DeleteAccount}},{struct:{signedDelegate:"string"}},{struct:{deployGlobalContract:this.DeployGlobalContract}},{struct:{useGlobalContract:this.UseGlobalContract}}]};DelegateAction={struct:{senderId:"string",receiverId:"string",actions:{array:{type:this.ClassicActions}},nonce:"u64",maxBlockHeight:"u64",publicKey:this.PublicKey}};SignedDelegate={struct:{delegateAction:this.DelegateAction,signature:this.Signature}};Action={enum:[{struct:{createAccount:this.CreateAccount}},{struct:{deployContract:this.DeployContract}},{struct:{functionCall:this.FunctionCall}},{struct:{transfer:this.Transfer}},{struct:{stake:this.Stake}},{struct:{addKey:this.AddKey}},{struct:{deleteKey:this.DeleteKey}},{struct:{deleteAccount:this.DeleteAccount}},{struct:{signedDelegate:this.SignedDelegate}},{struct:{deployGlobalContract:this.DeployGlobalContract}},{struct:{useGlobalContract:this.UseGlobalContract}}]};Transaction={struct:{signerId:"string",publicKey:this.PublicKey,nonce:"u64",receiverId:"string",blockHash:{array:{type:"u8",len:32}},actions:{array:{type:this.Action}}}};SignedTransaction={struct:{transaction:this.Transaction,signature:this.Signature}}}});var tM=N(()=>{});var dQe,lQe,pQe,hQe,mQe,yQe,bQe,gQe,vQe,xQe,rM=N(()=>{V8();({addKey:dQe,createAccount:lQe,deleteAccount:pQe,deleteKey:hQe,deployContract:mQe,functionCall:yQe,stake:bQe,transfer:gQe,deployGlobalContract:vQe,useGlobalContract:xQe}=yn)});var bn,Q1,nM=N(()=>{bn=(t=>(t[t.ED25519=0]="ED25519",t[t.SECP256K1=1]="SECP256K1",t))(bn||{}),Q1={SECRET_KEY:32,ED25519_PUBLIC_KEY:32,SECP256k1_PUBLIC_KEY:64}});function wne(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function e3(t,...e){if(!wne(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function t3(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function oM(t,e){e3(t);let r=e.outputLen;if(t.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}var r3=N(()=>{});var Wc,iM=N(()=>{Wc=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0});function tg(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function fo(t,e){return t<<32-e|t>>>e}function aM(t){if(typeof t!="string")throw new Error("utf8ToBytes expected string, got "+typeof t);return new Uint8Array(new TextEncoder().encode(t))}function n3(t){return typeof t=="string"&&(t=aM(t)),e3(t),t}function rg(t){let e=n=>t().update(n3(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function sM(t=32){if(Wc&&typeof Wc.getRandomValues=="function")return Wc.getRandomValues(new Uint8Array(t));if(Wc&&typeof Wc.randomBytes=="function")return Wc.randomBytes(t);throw new Error("crypto.getRandomValues must be defined")}var eg,hp=N(()=>{iM();r3();eg=class{clone(){return this._cloneInto()}}});function Ene(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);let o=BigInt(32),i=BigInt(4294967295),a=Number(r>>o&i),s=Number(r&i),c=n?4:0,u=n?0:4;t.setUint32(e+c,a,n),t.setUint32(e+u,s,n)}function cM(t,e,r){return t&e^~t&r}function fM(t,e,r){return t&e^t&r^e&r}var Bd,o3=N(()=>{r3();hp();Bd=class extends eg{constructor(e,r,n,o){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=tg(this.buffer)}update(e){t3(this);let{view:r,buffer:n,blockLen:o}=this;e=n3(e);let i=e.length;for(let a=0;a<i;){let s=Math.min(o-this.pos,i-a);if(s===o){let c=tg(e);for(;o<=i-a;a+=o)this.process(c,a);continue}n.set(e.subarray(a,a+s),this.pos),this.pos+=s,a+=s,this.pos===o&&(this.process(r,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){t3(this),oM(e,this),this.finished=!0;let{buffer:r,view:n,blockLen:o,isLE:i}=this,{pos:a}=this;r[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>o-a&&(this.process(n,0),a=0);for(let l=a;l<o;l++)r[l]=0;Ene(n,o-8,BigInt(this.length*8),i),this.process(n,0);let s=tg(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let u=c/4,f=this.get();if(u>f.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;l<u;l++)s.setUint32(4*l,f[l],i)}digest(){let{buffer:e,outputLen:r}=this;this.digestInto(e);let n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:r,buffer:n,length:o,finished:i,destroyed:a,pos:s}=this;return e.length=o,e.pos=s,e.finished=i,e.destroyed=a,o%r&&e.buffer.set(n),e}}});function uM(t,e=!1){return e?{h:Number(t&ng),l:Number(t>>i3&ng)}:{h:Number(t>>i3&ng)|0,l:Number(t&ng)|0}}function Ane(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let o=0;o<t.length;o++){let{h:i,l:a}=uM(t[o],e);[r[o],n[o]]=[i,a]}return[r,n]}function Fne(t,e,r,n){let o=(e>>>0)+(n>>>0);return{h:t+r+(o/2**32|0)|0,l:o|0}}var ng,i3,_ne,Sne,Ine,Tne,Bne,One,Pne,Rne,Cne,Nne,Mne,kne,$ne,Lne,jne,Une,Dne,zne,Kne,qne,fe,dM=N(()=>{ng=BigInt(4294967295),i3=BigInt(32);_ne=(t,e)=>BigInt(t>>>0)<<i3|BigInt(e>>>0),Sne=(t,e,r)=>t>>>r,Ine=(t,e,r)=>t<<32-r|e>>>r,Tne=(t,e,r)=>t>>>r|e<<32-r,Bne=(t,e,r)=>t<<32-r|e>>>r,One=(t,e,r)=>t<<64-r|e>>>r-32,Pne=(t,e,r)=>t>>>r-32|e<<64-r,Rne=(t,e)=>e,Cne=(t,e)=>t,Nne=(t,e,r)=>t<<r|e>>>32-r,Mne=(t,e,r)=>e<<r|t>>>32-r,kne=(t,e,r)=>e<<r-32|t>>>64-r,$ne=(t,e,r)=>t<<r-32|e>>>64-r;Lne=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),jne=(t,e,r,n)=>e+r+n+(t/2**32|0)|0,Une=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),Dne=(t,e,r,n,o)=>e+r+n+o+(t/2**32|0)|0,zne=(t,e,r,n,o)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(o>>>0),Kne=(t,e,r,n,o,i)=>e+r+n+o+i+(t/2**32|0)|0,qne={fromBig:uM,split:Ane,toBig:_ne,shrSH:Sne,shrSL:Ine,rotrSH:Tne,rotrSL:Bne,rotrBH:One,rotrBL:Pne,rotr32H:Rne,rotr32L:Cne,rotlSH:Nne,rotlSL:Mne,rotlBH:kne,rotlBL:$ne,add:Fne,add3L:Lne,add3H:jne,add4L:Une,add4H:Dne,add5H:Kne,add5L:zne},fe=qne});var Hne,Gne,hs,ms,a3,lM,pM=N(()=>{o3();dM();hp();[Hne,Gne]=fe.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))),hs=new Uint32Array(80),ms=new Uint32Array(80),a3=class extends Bd{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){let{Ah:e,Al:r,Bh:n,Bl:o,Ch:i,Cl:a,Dh:s,Dl:c,Eh:u,El:f,Fh:l,Fl:h,Gh:m,Gl:x,Hh:S,Hl:O}=this;return[e,r,n,o,i,a,s,c,u,f,l,h,m,x,S,O]}set(e,r,n,o,i,a,s,c,u,f,l,h,m,x,S,O){this.Ah=e|0,this.Al=r|0,this.Bh=n|0,this.Bl=o|0,this.Ch=i|0,this.Cl=a|0,this.Dh=s|0,this.Dl=c|0,this.Eh=u|0,this.El=f|0,this.Fh=l|0,this.Fl=h|0,this.Gh=m|0,this.Gl=x|0,this.Hh=S|0,this.Hl=O|0}process(e,r){for(let B=0;B<16;B++,r+=4)hs[B]=e.getUint32(r),ms[B]=e.getUint32(r+=4);for(let B=16;B<80;B++){let R=hs[B-15]|0,L=ms[B-15]|0,T=fe.rotrSH(R,L,1)^fe.rotrSH(R,L,8)^fe.shrSH(R,L,7),M=fe.rotrSL(R,L,1)^fe.rotrSL(R,L,8)^fe.shrSL(R,L,7),$=hs[B-2]|0,k=ms[B-2]|0,v=fe.rotrSH($,k,19)^fe.rotrBH($,k,61)^fe.shrSH($,k,6),d=fe.rotrSL($,k,19)^fe.rotrBL($,k,61)^fe.shrSL($,k,6),y=fe.add4L(M,d,ms[B-7],ms[B-16]),b=fe.add4H(y,T,v,hs[B-7],hs[B-16]);hs[B]=b|0,ms[B]=y|0}let{Ah:n,Al:o,Bh:i,Bl:a,Ch:s,Cl:c,Dh:u,Dl:f,Eh:l,El:h,Fh:m,Fl:x,Gh:S,Gl:O,Hh:P,Hl:F}=this;for(let B=0;B<80;B++){let R=fe.rotrSH(l,h,14)^fe.rotrSH(l,h,18)^fe.rotrBH(l,h,41),L=fe.rotrSL(l,h,14)^fe.rotrSL(l,h,18)^fe.rotrBL(l,h,41),T=l&m^~l&S,M=h&x^~h&O,$=fe.add5L(F,L,M,Gne[B],ms[B]),k=fe.add5H($,P,R,T,Hne[B],hs[B]),v=$|0,d=fe.rotrSH(n,o,28)^fe.rotrBH(n,o,34)^fe.rotrBH(n,o,39),y=fe.rotrSL(n,o,28)^fe.rotrBL(n,o,34)^fe.rotrBL(n,o,39),b=n&i^n&s^i&s,g=o&a^o&c^a&c;P=S|0,F=O|0,S=m|0,O=x|0,m=l|0,x=h|0,{h:l,l:h}=fe.add(u|0,f|0,k|0,v|0),u=s|0,f=c|0,s=i|0,c=a|0,i=n|0,a=o|0;let A=fe.add3L(v,y,g);n=fe.add3H(A,k,d,b),o=A|0}({h:n,l:o}=fe.add(this.Ah|0,this.Al|0,n|0,o|0)),{h:i,l:a}=fe.add(this.Bh|0,this.Bl|0,i|0,a|0),{h:s,l:c}=fe.add(this.Ch|0,this.Cl|0,s|0,c|0),{h:u,l:f}=fe.add(this.Dh|0,this.Dl|0,u|0,f|0),{h:l,l:h}=fe.add(this.Eh|0,this.El|0,l|0,h|0),{h:m,l:x}=fe.add(this.Fh|0,this.Fl|0,m|0,x|0),{h:S,l:O}=fe.add(this.Gh|0,this.Gl|0,S|0,O|0),{h:P,l:F}=fe.add(this.Hh|0,this.Hl|0,P|0,F|0),this.set(n,o,i,a,s,c,u,f,l,h,m,x,S,O,P,F)}roundClean(){hs.fill(0),ms.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)}},lM=rg(()=>new a3)});function f3(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function u3(t){if(!f3(t))throw new Error("Uint8Array expected")}function og(t,e){if(typeof e!="boolean")throw new Error(t+" boolean expected, got "+e)}function ig(t){u3(t);let e="";for(let r=0;r<t.length;r++)e+=Vne[t[r]];return e}function yM(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return t===""?c3:BigInt("0x"+t)}function hM(t){if(t>=ca._0&&t<=ca._9)return t-ca._0;if(t>=ca.A&&t<=ca.F)return t-(ca.A-10);if(t>=ca.a&&t<=ca.f)return t-(ca.a-10)}function bM(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);let e=t.length,r=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);let n=new Uint8Array(r);for(let o=0,i=0;o<r;o++,i+=2){let a=hM(t.charCodeAt(i)),s=hM(t.charCodeAt(i+1));if(a===void 0||s===void 0){let c=t[i]+t[i+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+i)}n[o]=a*16+s}return n}function gM(t){return yM(ig(t))}function Od(t){return u3(t),yM(ig(Uint8Array.from(t).reverse()))}function d3(t,e){return bM(t.toString(16).padStart(e*2,"0"))}function mp(t,e){return d3(t,e).reverse()}function uo(t,e,r){let n;if(typeof e=="string")try{n=bM(e)}catch(i){throw new Error(t+" must be hex string or Uint8Array, cause: "+i)}else if(f3(e))n=Uint8Array.from(e);else throw new Error(t+" must be hex string or Uint8Array");let o=n.length;if(typeof r=="number"&&o!==r)throw new Error(t+" of length "+r+" expected, got "+o);return n}function l3(...t){let e=0;for(let n=0;n<t.length;n++){let o=t[n];u3(o),e+=o.length}let r=new Uint8Array(e);for(let n=0,o=0;n<t.length;n++){let i=t[n];r.set(i,o),o+=i.length}return r}function Yne(t,e,r){return s3(t)&&s3(e)&&s3(r)&&e<=t&&t<r}function Pd(t,e,r,n){if(!Yne(e,r,n))throw new Error("expected valid "+t+": "+r+" <= n < "+n+", got "+e)}function vM(t){let e;for(e=0;t>c3;t>>=mM,e+=1);return e}function Rd(t,e,r={}){let n=(o,i,a)=>{let s=Zne[i];if(typeof s!="function")throw new Error("invalid validator function");let c=t[o];if(!(a&&c===void 0)&&!s(c,t))throw new Error("param "+String(o)+" is invalid. Expected "+i+", got "+c)};for(let[o,i]of Object.entries(e))n(o,i,!1);for(let[o,i]of Object.entries(r))n(o,i,!0);return t}function p3(t){let e=new WeakMap;return(r,...n)=>{let o=e.get(r);if(o!==void 0)return o;let i=t(r,...n);return e.set(r,i),i}}var c3,mM,Wne,Vne,ca,s3,xM,Zne,yp=N(()=>{c3=BigInt(0),mM=BigInt(1),Wne=BigInt(2);Vne=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));ca={_0:48,_9:57,A:65,F:70,a:97,f:102};s3=t=>typeof t=="bigint"&&c3<=t;xM=t=>(Wne<<BigInt(t-1))-mM,Zne={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||f3(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)}});function ot(t,e){let r=t%e;return r>=$t?r:e+r}function toe(t,e,r){if(e<$t)throw new Error("invalid exponent, negatives unsupported");if(r<=$t)throw new Error("invalid modulus");if(r===et)return $t;let n=et;for(;e>$t;)e&et&&(n=n*t%r),t=t*t%r,e>>=et;return n}function lo(t,e,r){let n=t;for(;e-- >$t;)n*=n,n%=r;return n}function AM(t,e){if(t===$t)throw new Error("invert: expected non-zero number");if(e<=$t)throw new Error("invert: expected positive modulus, got "+e);let r=ot(t,e),n=e,o=$t,i=et,a=et,s=$t;for(;r!==$t;){let u=n/r,f=n%r,l=o-a*u,h=i-s*u;n=r,r=f,o=a,i=s,a=l,s=h}if(n!==et)throw new Error("invert: does not exist");return ot(o,e)}function roe(t){let e=(t-et)/Vc,r,n,o;for(r=t-et,n=0;r%Vc===$t;r/=Vc,n++);for(o=Vc;o<t&&toe(o,e,t)!==t-et;o++)if(o>1e3)throw new Error("Cannot find square root: likely non-prime P");if(n===1){let a=(t+et)/h3;return function(c,u){let f=c.pow(u,a);if(!c.eql(c.sqr(f),u))throw new Error("Cannot find square root");return f}}let i=(r+et)/Vc;return function(s,c){if(s.pow(c,e)===s.neg(s.ONE))throw new Error("Cannot find square root");let u=n,f=s.pow(s.mul(s.ONE,o),r),l=s.pow(c,i),h=s.pow(c,r);for(;!s.eql(h,s.ONE);){if(s.eql(h,s.ZERO))return s.ZERO;let m=1;for(let S=s.sqr(h);m<u&&!s.eql(S,s.ONE);m++)S=s.sqr(S);let x=s.pow(f,et<<BigInt(u-m-1));f=s.sqr(x),l=s.mul(l,x),h=s.mul(h,f),u=m}return l}}function noe(t){if(t%h3===Xne){let e=(t+et)/h3;return function(n,o){let i=n.pow(o,e);if(!n.eql(n.sqr(i),o))throw new Error("Cannot find square root");return i}}if(t%EM===wM){let e=(t-wM)/EM;return function(n,o){let i=n.mul(o,Vc),a=n.pow(i,e),s=n.mul(o,a),c=n.mul(n.mul(s,Vc),a),u=n.mul(s,n.sub(c,n.ONE));if(!n.eql(n.sqr(u),o))throw new Error("Cannot find square root");return u}}return t%eoe,roe(t)}function SM(t){let e={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=ooe.reduce((n,o)=>(n[o]="function",n),e);return Rd(t,r)}function ioe(t,e,r){if(r<$t)throw new Error("invalid exponent, negatives unsupported");if(r===$t)return t.ONE;if(r===et)return e;let n=t.ONE,o=e;for(;r>$t;)r&et&&(n=t.mul(n,o)),o=t.sqr(o),r>>=et;return n}function aoe(t,e){let r=new Array(e.length),n=e.reduce((i,a,s)=>t.is0(a)?i:(r[s]=i,t.mul(i,a)),t.ONE),o=t.inv(n);return e.reduceRight((i,a,s)=>t.is0(a)?i:(r[s]=t.mul(i,r[s]),t.mul(i,a)),o),r}function m3(t,e){let r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function ag(t,e,r=!1,n={}){if(t<=$t)throw new Error("invalid field: expected ORDER > 0, got "+t);let{nBitLength:o,nByteLength:i}=m3(t,e);if(i>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let a,s=Object.freeze({ORDER:t,isLE:r,BITS:o,BYTES:i,MASK:xM(o),ZERO:$t,ONE:et,create:c=>ot(c,t),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return $t<=c&&c<t},is0:c=>c===$t,isOdd:c=>(c&et)===et,neg:c=>ot(-c,t),eql:(c,u)=>c===u,sqr:c=>ot(c*c,t),add:(c,u)=>ot(c+u,t),sub:(c,u)=>ot(c-u,t),mul:(c,u)=>ot(c*u,t),pow:(c,u)=>ioe(s,c,u),div:(c,u)=>ot(c*AM(u,t),t),sqrN:c=>c*c,addN:(c,u)=>c+u,subN:(c,u)=>c-u,mulN:(c,u)=>c*u,inv:c=>AM(c,t),sqrt:n.sqrt||(c=>(a||(a=noe(t)),a(s,c))),invertBatch:c=>aoe(s,c),cmov:(c,u,f)=>f?u:c,toBytes:c=>r?mp(c,i):d3(c,i),fromBytes:c=>{if(c.length!==i)throw new Error("Field.fromBytes: expected "+i+" bytes, got "+c.length);return r?Od(c):gM(c)}});return Object.freeze(s)}var $t,et,Vc,Xne,h3,wM,EM,Qne,eoe,_M,ooe,sg=N(()=>{yp();$t=BigInt(0),et=BigInt(1),Vc=BigInt(2),Xne=BigInt(3),h3=BigInt(4),wM=BigInt(5),EM=BigInt(8),Qne=BigInt(9),eoe=BigInt(16);_M=(t,e)=>(ot(t,e)&et)===et,ooe=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"]});function y3(t,e){let r=e.negate();return t?r:e}function TM(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw new Error("invalid window size, expected [1.."+e+"], got W="+t)}function b3(t,e){TM(t,e);let r=Math.ceil(e/t)+1,n=2**(t-1);return{windows:r,windowSize:n}}function soe(t,e){if(!Array.isArray(t))throw new Error("array expected");t.forEach((r,n)=>{if(!(r instanceof e))throw new Error("invalid point at index "+n)})}function coe(t,e){if(!Array.isArray(t))throw new Error("array of scalars expected");t.forEach((r,n)=>{if(!e.isValid(r))throw new Error("invalid scalar at index "+n)})}function v3(t){return BM.get(t)||1}function OM(t,e){return{constTimeNegate:y3,hasPrecomputes(r){return v3(r)!==1},unsafeLadder(r,n,o=t.ZERO){let i=r;for(;n>IM;)n&cg&&(o=o.add(i)),i=i.double(),n>>=cg;return o},precomputeWindow(r,n){let{windows:o,windowSize:i}=b3(n,e),a=[],s=r,c=s;for(let u=0;u<o;u++){c=s,a.push(c);for(let f=1;f<i;f++)c=c.add(s),a.push(c);s=c.double()}return a},wNAF(r,n,o){let{windows:i,windowSize:a}=b3(r,e),s=t.ZERO,c=t.BASE,u=BigInt(2**r-1),f=2**r,l=BigInt(r);for(let h=0;h<i;h++){let m=h*a,x=Number(o&u);o>>=l,x>a&&(x-=f,o+=cg);let S=m,O=m+Math.abs(x)-1,P=h%2!==0,F=x<0;x===0?c=c.add(y3(P,n[S])):s=s.add(y3(F,n[O]))}return{p:s,f:c}},wNAFUnsafe(r,n,o,i=t.ZERO){let{windows:a,windowSize:s}=b3(r,e),c=BigInt(2**r-1),u=2**r,f=BigInt(r);for(let l=0;l<a;l++){let h=l*s;if(o===IM)break;let m=Number(o&c);if(o>>=f,m>s&&(m-=u,o+=cg),m===0)continue;let x=n[h+Math.abs(m)-1];m<0&&(x=x.negate()),i=i.add(x)}return i},getPrecomputes(r,n,o){let i=g3.get(n);return i||(i=this.precomputeWindow(n,r),r!==1&&g3.set(n,o(i))),i},wNAFCached(r,n,o){let i=v3(r);return this.wNAF(i,this.getPrecomputes(i,r,o),n)},wNAFCachedUnsafe(r,n,o,i){let a=v3(r);return a===1?this.unsafeLadder(r,n,i):this.wNAFUnsafe(a,this.getPrecomputes(a,r,o),n,i)},setWindowSize(r,n){TM(n,e),BM.set(r,n),g3.delete(r)}}}function PM(t,e,r,n){if(soe(r,t),coe(n,e),r.length!==n.length)throw new Error("arrays of points and scalars must have equal length");let o=t.ZERO,i=vM(BigInt(r.length)),a=i>12?i-3:i>4?i-2:i?2:1,s=(1<<a)-1,c=new Array(s+1).fill(o),u=Math.floor((e.BITS-1)/a)*a,f=o;for(let l=u;l>=0;l-=a){c.fill(o);for(let m=0;m<n.length;m++){let x=n[m],S=Number(x>>BigInt(l)&BigInt(s));c[S]=c[S].add(r[m])}let h=o;for(let m=c.length-1,x=o;m>0;m--)x=x.add(c[m]),h=h.add(x);if(f=f.add(h),l!==0)for(let m=0;m<a;m++)f=f.double()}return f}function RM(t){return SM(t.Fp),Rd(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...m3(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}var IM,cg,g3,BM,CM=N(()=>{sg();yp();IM=BigInt(0),cg=BigInt(1);g3=new WeakMap,BM=new WeakMap});function doe(t){let e=RM(t);return Rd(t,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...e})}function NM(t){let e=doe(t),{Fp:r,n,prehash:o,hash:i,randomBytes:a,nByteLength:s,h:c}=e,u=fg<<BigInt(s*8)-Kr,f=r.create,l=ag(e.n,e.nBitLength),h=e.uvRatio||((E,w)=>{try{return{isValid:!0,value:r.sqrt(E*r.inv(w))}}catch{return{isValid:!1,value:po}}}),m=e.adjustScalarBytes||(E=>E),x=e.domain||((E,w,_)=>{if(og("phflag",_),w.length||_)throw new Error("Contexts/pre-hash are not supported");return E});function S(E,w){Pd("coordinate "+E,w,po,u)}function O(E){if(!(E instanceof B))throw new Error("ExtendedPoint expected")}let P=p3((E,w)=>{let{ex:_,ey:p,ez:I}=E,C=E.is0();w==null&&(w=C?foe:r.inv(I));let j=f(_*w),U=f(p*w),D=f(I*w);if(C)return{x:po,y:Kr};if(D!==Kr)throw new Error("invZ was invalid");return{x:j,y:U}}),F=p3(E=>{let{a:w,d:_}=e;if(E.is0())throw new Error("bad point: ZERO");let{ex:p,ey:I,ez:C,et:j}=E,U=f(p*p),D=f(I*I),z=f(C*C),q=f(z*z),V=f(U*w),W=f(z*f(V+D)),Y=f(q+f(_*f(U*D)));if(W!==Y)throw new Error("bad point: equation left != right (1)");let J=f(p*I),X=f(C*j);if(J!==X)throw new Error("bad point: equation left != right (2)");return!0});class B{constructor(w,_,p,I){this.ex=w,this.ey=_,this.ez=p,this.et=I,S("x",w),S("y",_),S("z",p),S("t",I),Object.freeze(this)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(w){if(w instanceof B)throw new Error("extended point not allowed");let{x:_,y:p}=w||{};return S("x",_),S("y",p),new B(_,p,Kr,f(_*p))}static normalizeZ(w){let _=r.invertBatch(w.map(p=>p.ez));return w.map((p,I)=>p.toAffine(_[I])).map(B.fromAffine)}static msm(w,_){return PM(B,l,w,_)}_setWindowSize(w){T.setWindowSize(this,w)}assertValidity(){F(this)}equals(w){O(w);let{ex:_,ey:p,ez:I}=this,{ex:C,ey:j,ez:U}=w,D=f(_*U),z=f(C*I),q=f(p*U),V=f(j*I);return D===z&&q===V}is0(){return this.equals(B.ZERO)}negate(){return new B(f(-this.ex),this.ey,this.ez,f(-this.et))}double(){let{a:w}=e,{ex:_,ey:p,ez:I}=this,C=f(_*_),j=f(p*p),U=f(fg*f(I*I)),D=f(w*C),z=_+p,q=f(f(z*z)-C-j),V=D+j,W=V-U,Y=D-j,J=f(q*W),X=f(V*Y),ee=f(q*Y),se=f(W*V);return new B(J,X,se,ee)}add(w){O(w);let{a:_,d:p}=e,{ex:I,ey:C,ez:j,et:U}=this,{ex:D,ey:z,ez:q,et:V}=w;if(_===BigInt(-1)){let Te=f((C-I)*(z+D)),Be=f((C+I)*(z-D)),On=f(Be-Te);if(On===po)return this.double();let Fe=f(j*fg*V),Le=f(U*fg*q),Oa=Le+Fe,je=Be+Te,Ue=Le-Fe,Lf=f(Oa*On),Ke=f(je*Ue),qe=f(Oa*Ue),jf=f(On*je);return new B(Lf,Ke,jf,qe)}let W=f(I*D),Y=f(C*z),J=f(U*p*V),X=f(j*q),ee=f((I+C)*(D+z)-W-Y),se=X-J,ne=X+J,re=f(Y-_*W),be=f(ee*se),Ie=f(ne*re),Ne=f(ee*re),Bn=f(se*ne);return new B(be,Ie,Bn,Ne)}subtract(w){return this.add(w.negate())}wNAF(w){return T.wNAFCached(this,w,B.normalizeZ)}multiply(w){let _=w;Pd("scalar",_,Kr,n);let{p,f:I}=this.wNAF(_);return B.normalizeZ([p,I])[0]}multiplyUnsafe(w,_=B.ZERO){let p=w;return Pd("scalar",p,po,n),p===po?L:this.is0()||p===Kr?this:T.wNAFCachedUnsafe(this,p,B.normalizeZ,_)}isSmallOrder(){return this.multiplyUnsafe(c).is0()}isTorsionFree(){return T.unsafeLadder(this,n).is0()}toAffine(w){return P(this,w)}clearCofactor(){let{h:w}=e;return w===Kr?this:this.multiplyUnsafe(w)}static fromHex(w,_=!1){let{d:p,a:I}=e,C=r.BYTES;w=uo("pointHex",w,C),og("zip215",_);let j=w.slice(),U=w[C-1];j[C-1]=U&-129;let D=Od(j),z=_?u:r.ORDER;Pd("pointHex.y",D,po,z);let q=f(D*D),V=f(q-Kr),W=f(p*q-I),{isValid:Y,value:J}=h(V,W);if(!Y)throw new Error("Point.fromHex: invalid y coordinate");let X=(J&Kr)===Kr,ee=(U&128)!==0;if(!_&&J===po&&ee)throw new Error("Point.fromHex: x=0 and x_0=1");return ee!==X&&(J=f(-J)),B.fromAffine({x:J,y:D})}static fromPrivateKey(w){return k(w).point}toRawBytes(){let{x:w,y:_}=this.toAffine(),p=mp(_,r.BYTES);return p[p.length-1]|=w&Kr?128:0,p}toHex(){return ig(this.toRawBytes())}}B.BASE=new B(e.Gx,e.Gy,Kr,f(e.Gx*e.Gy)),B.ZERO=new B(po,Kr,Kr,po);let{BASE:R,ZERO:L}=B,T=OM(B,s*8);function M(E){return ot(E,n)}function $(E){return M(Od(E))}function k(E){let w=r.BYTES;E=uo("private key",E,w);let _=uo("hashed private key",i(E),2*w),p=m(_.slice(0,w)),I=_.slice(w,2*w),C=$(p),j=R.multiply(C),U=j.toRawBytes();return{head:p,prefix:I,scalar:C,point:j,pointBytes:U}}function v(E){return k(E).pointBytes}function d(E=new Uint8Array,...w){let _=l3(...w);return $(i(x(_,uo("context",E),!!o)))}function y(E,w,_={}){E=uo("message",E),o&&(E=o(E));let{prefix:p,scalar:I,pointBytes:C}=k(w),j=d(_.context,p,E),U=R.multiply(j).toRawBytes(),D=d(_.context,U,C,E),z=M(j+D*I);Pd("signature.s",z,po,n);let q=l3(U,mp(z,r.BYTES));return uo("result",q,r.BYTES*2)}let b=uoe;function g(E,w,_,p=b){let{context:I,zip215:C}=p,j=r.BYTES;E=uo("signature",E,2*j),w=uo("message",w),_=uo("publicKey",_,j),C!==void 0&&og("zip215",C),o&&(w=o(w));let U=Od(E.slice(j,2*j)),D,z,q;try{D=B.fromHex(_,C),z=B.fromHex(E.slice(0,j),C),q=R.multiplyUnsafe(U)}catch{return!1}if(!C&&D.isSmallOrder())return!1;let V=d(I,z.toRawBytes(),D.toRawBytes(),w);return z.add(D.multiplyUnsafe(V)).subtract(q).clearCofactor().equals(B.ZERO)}return R._setWindowSize(8),{CURVE:e,getPublicKey:v,sign:y,verify:g,ExtendedPoint:B,utils:{getExtendedPublicKey:k,randomPrivateKey:()=>a(r.BYTES),precompute(E=8,w=B.BASE){return w._setWindowSize(E),w.multiply(BigInt(3)),w}}}}var po,Kr,fg,foe,uoe,MM=N(()=>{CM();sg();yp();yp();po=BigInt(0),Kr=BigInt(1),fg=BigInt(2),foe=BigInt(8),uoe={zip215:!0}});function moe(t){let e=BigInt(10),r=BigInt(20),n=BigInt(40),o=BigInt(80),i=x3,s=t*t%i*t%i,c=lo(s,$M,i)*s%i,u=lo(c,loe,i)*t%i,f=lo(u,poe,i)*u%i,l=lo(f,e,i)*f%i,h=lo(l,r,i)*l%i,m=lo(h,n,i)*h%i,x=lo(m,o,i)*m%i,S=lo(x,o,i)*m%i,O=lo(S,e,i)*f%i;return{pow_p_5_8:lo(O,$M,i)*t%i,b2:s}}function yoe(t){return t[0]&=248,t[31]&=127,t[31]|=64,t}function boe(t,e){let r=x3,n=ot(e*e*e,r),o=ot(n*n*e,r),i=moe(t*o).pow_p_5_8,a=ot(t*n*i,r),s=ot(e*a*a,r),c=a,u=ot(a*kM,r),f=s===t,l=s===ot(-t,r),h=s===ot(-t*kM,r);return f&&(a=c),(l||h)&&(a=u),_M(a,r)&&(a=ot(-a,r)),{isValid:f||l,value:a}}var x3,kM,JQe,loe,$M,XQe,poe,hoe,goe,voe,qr,Cd=N(()=>{pM();hp();MM();sg();x3=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),kM=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752"),JQe=BigInt(0),loe=BigInt(1),$M=BigInt(2),XQe=BigInt(3),poe=BigInt(5),hoe=BigInt(8);goe=ag(x3,void 0,!0),voe={a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:goe,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:hoe,Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:lM,randomBytes:sM,adjustScalarBytes:yoe,uvRatio:boe},qr=NM(voe)});var LM=G((eet,FM)=>{var ye={IMPOSSIBLE_CASE:"Impossible case. Please create issue.",TWEAK_ADD:"The tweak was out of range or the resulted private key is invalid",TWEAK_MUL:"The tweak was out of range or equal to zero",CONTEXT_RANDOMIZE_UNKNOW:"Unknow error on context randomization",SECKEY_INVALID:"Private Key is invalid",PUBKEY_PARSE:"Public Key could not be parsed",PUBKEY_SERIALIZE:"Public Key serialization error",PUBKEY_COMBINE:"The sum of the public keys is not valid",SIG_PARSE:"Signature could not be parsed",SIGN:"The nonce generation function failed, or the private key was invalid",RECOVER:"Public key could not be recover",ECDH:"Scalar was invalid (zero or overflow)"};function Un(t,e){if(!t)throw new Error(e)}function pe(t,e,r){if(Un(e instanceof Uint8Array,`Expected ${t} to be an Uint8Array`),r!==void 0)if(Array.isArray(r)){let n=r.join(", "),o=`Expected ${t} to be an Uint8Array with length [${n}]`;Un(r.includes(e.length),o)}else{let n=`Expected ${t} to be an Uint8Array with length ${r}`;Un(e.length===r,n)}}function Yc(t){Un(Nd(t)==="Boolean","Expected compressed to be a Boolean")}function ho(t=r=>new Uint8Array(r),e){return typeof t=="function"&&(t=t(e)),pe("output",t,e),t}function Nd(t){return Object.prototype.toString.call(t).slice(8,-1)}FM.exports=t=>({contextRandomize(e){if(Un(e===null||e instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),e!==null&&pe("seed",e,32),t.contextRandomize(e)===1)throw new Error(ye.CONTEXT_RANDOMIZE_UNKNOW)},privateKeyVerify(e){return pe("private key",e,32),t.privateKeyVerify(e)===0},privateKeyNegate(e){switch(pe("private key",e,32),t.privateKeyNegate(e)){case 0:return e;case 1:throw new Error(ye.IMPOSSIBLE_CASE)}},privateKeyTweakAdd(e,r){switch(pe("private key",e,32),pe("tweak",r,32),t.privateKeyTweakAdd(e,r)){case 0:return e;case 1:throw new Error(ye.TWEAK_ADD)}},privateKeyTweakMul(e,r){switch(pe("private key",e,32),pe("tweak",r,32),t.privateKeyTweakMul(e,r)){case 0:return e;case 1:throw new Error(ye.TWEAK_MUL)}},publicKeyVerify(e){return pe("public key",e,[33,65]),t.publicKeyVerify(e)===0},publicKeyCreate(e,r=!0,n){switch(pe("private key",e,32),Yc(r),n=ho(n,r?33:65),t.publicKeyCreate(n,e)){case 0:return n;case 1:throw new Error(ye.SECKEY_INVALID);case 2:throw new Error(ye.PUBKEY_SERIALIZE)}},publicKeyConvert(e,r=!0,n){switch(pe("public key",e,[33,65]),Yc(r),n=ho(n,r?33:65),t.publicKeyConvert(n,e)){case 0:return n;case 1:throw new Error(ye.PUBKEY_PARSE);case 2:throw new Error(ye.PUBKEY_SERIALIZE)}},publicKeyNegate(e,r=!0,n){switch(pe("public key",e,[33,65]),Yc(r),n=ho(n,r?33:65),t.publicKeyNegate(n,e)){case 0:return n;case 1:throw new Error(ye.PUBKEY_PARSE);case 2:throw new Error(ye.IMPOSSIBLE_CASE);case 3:throw new Error(ye.PUBKEY_SERIALIZE)}},publicKeyCombine(e,r=!0,n){Un(Array.isArray(e),"Expected public keys to be an Array"),Un(e.length>0,"Expected public keys array will have more than zero items");for(let o of e)pe("public key",o,[33,65]);switch(Yc(r),n=ho(n,r?33:65),t.publicKeyCombine(n,e)){case 0:return n;case 1:throw new Error(ye.PUBKEY_PARSE);case 2:throw new Error(ye.PUBKEY_COMBINE);case 3:throw new Error(ye.PUBKEY_SERIALIZE)}},publicKeyTweakAdd(e,r,n=!0,o){switch(pe("public key",e,[33,65]),pe("tweak",r,32),Yc(n),o=ho(o,n?33:65),t.publicKeyTweakAdd(o,e,r)){case 0:return o;case 1:throw new Error(ye.PUBKEY_PARSE);case 2:throw new Error(ye.TWEAK_ADD)}},publicKeyTweakMul(e,r,n=!0,o){switch(pe("public key",e,[33,65]),pe("tweak",r,32),Yc(n),o=ho(o,n?33:65),t.publicKeyTweakMul(o,e,r)){case 0:return o;case 1:throw new Error(ye.PUBKEY_PARSE);case 2:throw new Error(ye.TWEAK_MUL)}},signatureNormalize(e){switch(pe("signature",e,64),t.signatureNormalize(e)){case 0:return e;case 1:throw new Error(ye.SIG_PARSE)}},signatureExport(e,r){pe("signature",e,64),r=ho(r,72);let n={output:r,outputlen:72};switch(t.signatureExport(n,e)){case 0:return r.slice(0,n.outputlen);case 1:throw new Error(ye.SIG_PARSE);case 2:throw new Error(ye.IMPOSSIBLE_CASE)}},signatureImport(e,r){switch(pe("signature",e),r=ho(r,64),t.signatureImport(r,e)){case 0:return r;case 1:throw new Error(ye.SIG_PARSE);case 2:throw new Error(ye.IMPOSSIBLE_CASE)}},ecdsaSign(e,r,n={},o){pe("message",e,32),pe("private key",r,32),Un(Nd(n)==="Object","Expected options to be an Object"),n.data!==void 0&&pe("options.data",n.data),n.noncefn!==void 0&&Un(Nd(n.noncefn)==="Function","Expected options.noncefn to be a Function"),o=ho(o,64);let i={signature:o,recid:null};switch(t.ecdsaSign(i,e,r,n.data,n.noncefn)){case 0:return i;case 1:throw new Error(ye.SIGN);case 2:throw new Error(ye.IMPOSSIBLE_CASE)}},ecdsaVerify(e,r,n){switch(pe("signature",e,64),pe("message",r,32),pe("public key",n,[33,65]),t.ecdsaVerify(e,r,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(ye.SIG_PARSE);case 2:throw new Error(ye.PUBKEY_PARSE)}},ecdsaRecover(e,r,n,o=!0,i){switch(pe("signature",e,64),Un(Nd(r)==="Number"&&r>=0&&r<=3,"Expected recovery id to be a Number within interval [0, 3]"),pe("message",n,32),Yc(o),i=ho(i,o?33:65),t.ecdsaRecover(i,e,r,n)){case 0:return i;case 1:throw new Error(ye.SIG_PARSE);case 2:throw new Error(ye.RECOVER);case 3:throw new Error(ye.IMPOSSIBLE_CASE)}},ecdh(e,r,n={},o){switch(pe("public key",e,[33,65]),pe("private key",r,32),Un(Nd(n)==="Object","Expected options to be an Object"),n.data!==void 0&&pe("options.data",n.data),n.hashfn!==void 0?(Un(Nd(n.hashfn)==="Function","Expected options.hashfn to be a Function"),n.xbuf!==void 0&&pe("options.xbuf",n.xbuf,32),n.ybuf!==void 0&&pe("options.ybuf",n.ybuf,32),pe("output",o)):o=ho(o,32),t.ecdh(o,e,r,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return o;case 1:throw new Error(ye.PUBKEY_PARSE);case 2:throw new Error(ye.ECDH)}}})});var jM=G((tet,xoe)=>{xoe.exports={name:"elliptic",version:"6.6.1",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}});var UM=G(()=>{});var ai=G((DM,w3)=>{(function(t,e){"use strict";function r(v,d){if(!v)throw new Error(d||"Assertion failed")}function n(v,d){v.super_=d;var y=function(){};y.prototype=d.prototype,v.prototype=new y,v.prototype.constructor=v}function o(v,d,y){if(o.isBN(v))return v;this.negative=0,this.words=null,this.length=0,this.red=null,v!==null&&((d==="le"||d==="be")&&(y=d,d=10),this._init(v||0,d||10,y||"be"))}typeof t=="object"?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;var i;try{typeof window<"u"&&typeof window.Buffer<"u"?i=window.Buffer:i=UM().Buffer}catch{}o.isBN=function(d){return d instanceof o?!0:d!==null&&typeof d=="object"&&d.constructor.wordSize===o.wordSize&&Array.isArray(d.words)},o.max=function(d,y){return d.cmp(y)>0?d:y},o.min=function(d,y){return d.cmp(y)<0?d:y},o.prototype._init=function(d,y,b){if(typeof d=="number")return this._initNumber(d,y,b);if(typeof d=="object")return this._initArray(d,y,b);y==="hex"&&(y=16),r(y===(y|0)&&y>=2&&y<=36),d=d.toString().replace(/\s+/g,"");var g=0;d[0]==="-"&&(g++,this.negative=1),g<d.length&&(y===16?this._parseHex(d,g,b):(this._parseBase(d,y,g),b==="le"&&this._initArray(this.toArray(),y,b)))},o.prototype._initNumber=function(d,y,b){d<0&&(this.negative=1,d=-d),d<67108864?(this.words=[d&67108863],this.length=1):d<4503599627370496?(this.words=[d&67108863,d/67108864&67108863],this.length=2):(r(d<9007199254740992),this.words=[d&67108863,d/67108864&67108863,1],this.length=3),b==="le"&&this._initArray(this.toArray(),y,b)},o.prototype._initArray=function(d,y,b){if(r(typeof d.length=="number"),d.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(d.length/3),this.words=new Array(this.length);for(var g=0;g<this.length;g++)this.words[g]=0;var A,E,w=0;if(b==="be")for(g=d.length-1,A=0;g>=0;g-=3)E=d[g]|d[g-1]<<8|d[g-2]<<16,this.words[A]|=E<<w&67108863,this.words[A+1]=E>>>26-w&67108863,w+=24,w>=26&&(w-=26,A++);else if(b==="le")for(g=0,A=0;g<d.length;g+=3)E=d[g]|d[g+1]<<8|d[g+2]<<16,this.words[A]|=E<<w&67108863,this.words[A+1]=E>>>26-w&67108863,w+=24,w>=26&&(w-=26,A++);return this.strip()};function a(v,d){var y=v.charCodeAt(d);return y>=65&&y<=70?y-55:y>=97&&y<=102?y-87:y-48&15}function s(v,d,y){var b=a(v,y);return y-1>=d&&(b|=a(v,y-1)<<4),b}o.prototype._parseHex=function(d,y,b){this.length=Math.ceil((d.length-y)/6),this.words=new Array(this.length);for(var g=0;g<this.length;g++)this.words[g]=0;var A=0,E=0,w;if(b==="be")for(g=d.length-1;g>=y;g-=2)w=s(d,y,g)<<A,this.words[E]|=w&67108863,A>=18?(A-=18,E+=1,this.words[E]|=w>>>26):A+=8;else{var _=d.length-y;for(g=_%2===0?y+1:y;g<d.length;g+=2)w=s(d,y,g)<<A,this.words[E]|=w&67108863,A>=18?(A-=18,E+=1,this.words[E]|=w>>>26):A+=8}this.strip()};function c(v,d,y,b){for(var g=0,A=Math.min(v.length,y),E=d;E<A;E++){var w=v.charCodeAt(E)-48;g*=b,w>=49?g+=w-49+10:w>=17?g+=w-17+10:g+=w}return g}o.prototype._parseBase=function(d,y,b){this.words=[0],this.length=1;for(var g=0,A=1;A<=67108863;A*=y)g++;g--,A=A/y|0;for(var E=d.length-b,w=E%g,_=Math.min(E,E-w)+b,p=0,I=b;I<_;I+=g)p=c(d,I,I+g,y),this.imuln(A),this.words[0]+p<67108864?this.words[0]+=p:this._iaddn(p);if(w!==0){var C=1;for(p=c(d,I,d.length,y),I=0;I<w;I++)C*=y;this.imuln(C),this.words[0]+p<67108864?this.words[0]+=p:this._iaddn(p)}this.strip()},o.prototype.copy=function(d){d.words=new Array(this.length);for(var y=0;y<this.length;y++)d.words[y]=this.words[y];d.length=this.length,d.negative=this.negative,d.red=this.red},o.prototype.clone=function(){var d=new o(null);return this.copy(d),d},o.prototype._expand=function(d){for(;this.length<d;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(d,y){d=d||10,y=y|0||1;var b;if(d===16||d==="hex"){b="";for(var g=0,A=0,E=0;E<this.length;E++){var w=this.words[E],_=((w<<g|A)&16777215).toString(16);A=w>>>24-g&16777215,g+=2,g>=26&&(g-=26,E--),A!==0||E!==this.length-1?b=u[6-_.length]+_+b:b=_+b}for(A!==0&&(b=A.toString(16)+b);b.length%y!==0;)b="0"+b;return this.negative!==0&&(b="-"+b),b}if(d===(d|0)&&d>=2&&d<=36){var p=f[d],I=l[d];b="";var C=this.clone();for(C.negative=0;!C.isZero();){var j=C.modn(I).toString(d);C=C.idivn(I),C.isZero()?b=j+b:b=u[p-j.length]+j+b}for(this.isZero()&&(b="0"+b);b.length%y!==0;)b="0"+b;return this.negative!==0&&(b="-"+b),b}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var d=this.words[0];return this.length===2?d+=this.words[1]*67108864:this.length===3&&this.words[2]===1?d+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-d:d},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(d,y){return r(typeof i<"u"),this.toArrayLike(i,d,y)},o.prototype.toArray=function(d,y){return this.toArrayLike(Array,d,y)},o.prototype.toArrayLike=function(d,y,b){var g=this.byteLength(),A=b||Math.max(1,g);r(g<=A,"byte array longer than desired length"),r(A>0,"Requested array length <= 0"),this.strip();var E=y==="le",w=new d(A),_,p,I=this.clone();if(E){for(p=0;!I.isZero();p++)_=I.andln(255),I.iushrn(8),w[p]=_;for(;p<A;p++)w[p]=0}else{for(p=0;p<A-g;p++)w[p]=0;for(p=0;!I.isZero();p++)_=I.andln(255),I.iushrn(8),w[A-p-1]=_}return w},Math.clz32?o.prototype._countBits=function(d){return 32-Math.clz32(d)}:o.prototype._countBits=function(d){var y=d,b=0;return y>=4096&&(b+=13,y>>>=13),y>=64&&(b+=7,y>>>=7),y>=8&&(b+=4,y>>>=4),y>=2&&(b+=2,y>>>=2),b+y},o.prototype._zeroBits=function(d){if(d===0)return 26;var y=d,b=0;return(y&8191)===0&&(b+=13,y>>>=13),(y&127)===0&&(b+=7,y>>>=7),(y&15)===0&&(b+=4,y>>>=4),(y&3)===0&&(b+=2,y>>>=2),(y&1)===0&&b++,b},o.prototype.bitLength=function(){var d=this.words[this.length-1],y=this._countBits(d);return(this.length-1)*26+y};function h(v){for(var d=new Array(v.bitLength()),y=0;y<d.length;y++){var b=y/26|0,g=y%26;d[y]=(v.words[b]&1<<g)>>>g}return d}o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var d=0,y=0;y<this.length;y++){var b=this._zeroBits(this.words[y]);if(d+=b,b!==26)break}return d},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(d){return this.negative!==0?this.abs().inotn(d).iaddn(1):this.clone()},o.prototype.fromTwos=function(d){return this.testn(d-1)?this.notn(d).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return this.negative!==0},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(d){for(;this.length<d.length;)this.words[this.length++]=0;for(var y=0;y<d.length;y++)this.words[y]=this.words[y]|d.words[y];return this.strip()},o.prototype.ior=function(d){return r((this.negative|d.negative)===0),this.iuor(d)},o.prototype.or=function(d){return this.length>d.length?this.clone().ior(d):d.clone().ior(this)},o.prototype.uor=function(d){return this.length>d.length?this.clone().iuor(d):d.clone().iuor(this)},o.prototype.iuand=function(d){var y;this.length>d.length?y=d:y=this;for(var b=0;b<y.length;b++)this.words[b]=this.words[b]&d.words[b];return this.length=y.length,this.strip()},o.prototype.iand=function(d){return r((this.negative|d.negative)===0),this.iuand(d)},o.prototype.and=function(d){return this.length>d.length?this.clone().iand(d):d.clone().iand(this)},o.prototype.uand=function(d){return this.length>d.length?this.clone().iuand(d):d.clone().iuand(this)},o.prototype.iuxor=function(d){var y,b;this.length>d.length?(y=this,b=d):(y=d,b=this);for(var g=0;g<b.length;g++)this.words[g]=y.words[g]^b.words[g];if(this!==y)for(;g<y.length;g++)this.words[g]=y.words[g];return this.length=y.length,this.strip()},o.prototype.ixor=function(d){return r((this.negative|d.negative)===0),this.iuxor(d)},o.prototype.xor=function(d){return this.length>d.length?this.clone().ixor(d):d.clone().ixor(this)},o.prototype.uxor=function(d){return this.length>d.length?this.clone().iuxor(d):d.clone().iuxor(this)},o.prototype.inotn=function(d){r(typeof d=="number"&&d>=0);var y=Math.ceil(d/26)|0,b=d%26;this._expand(y),b>0&&y--;for(var g=0;g<y;g++)this.words[g]=~this.words[g]&67108863;for(b>0&&(this.words[g]=~this.words[g]&67108863>>26-b,g++);g<this.length;g++)this.words[g]=0;return this.strip()},o.prototype.notn=function(d){return this.clone().inotn(d)},o.prototype.setn=function(d,y){r(typeof d=="number"&&d>=0);var b=d/26|0,g=d%26;return this._expand(b+1),y?this.words[b]=this.words[b]|1<<g:this.words[b]=this.words[b]&~(1<<g),this.strip()},o.prototype.iadd=function(d){var y;if(this.negative!==0&&d.negative===0)return this.negative=0,y=this.isub(d),this.negative^=1,this._normSign();if(this.negative===0&&d.negative!==0)return d.negative=0,y=this.isub(d),d.negative=1,y._normSign();var b,g;this.length>d.length?(b=this,g=d):(b=d,g=this);for(var A=0,E=0;E<g.length;E++)y=(b.words[E]|0)+(g.words[E]|0)+A,this.words[E]=y&67108863,A=y>>>26;for(;A!==0&&E<b.length;E++)y=(b.words[E]|0)+A,this.words[E]=y&67108863,A=y>>>26;if(this.length=b.length,A!==0)this.words[this.length]=A,this.length++;else if(b!==this)for(;E<b.length;E++)this.words[E]=b.words[E];return this},o.prototype.add=function(d){var y;return d.negative!==0&&this.negative===0?(d.negative=0,y=this.sub(d),d.negative^=1,y):d.negative===0&&this.negative!==0?(this.negative=0,y=d.sub(this),this.negative=1,y):this.length>d.length?this.clone().iadd(d):d.clone().iadd(this)},o.prototype.isub=function(d){if(d.negative!==0){d.negative=0;var y=this.iadd(d);return d.negative=1,y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(d),this.negative=1,this._normSign();var b=this.cmp(d);if(b===0)return this.negative=0,this.length=1,this.words[0]=0,this;var g,A;b>0?(g=this,A=d):(g=d,A=this);for(var E=0,w=0;w<A.length;w++)y=(g.words[w]|0)-(A.words[w]|0)+E,E=y>>26,this.words[w]=y&67108863;for(;E!==0&&w<g.length;w++)y=(g.words[w]|0)+E,E=y>>26,this.words[w]=y&67108863;if(E===0&&w<g.length&&g!==this)for(;w<g.length;w++)this.words[w]=g.words[w];return this.length=Math.max(this.length,w),g!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(d){return this.clone().isub(d)};function m(v,d,y){y.negative=d.negative^v.negative;var b=v.length+d.length|0;y.length=b,b=b-1|0;var g=v.words[0]|0,A=d.words[0]|0,E=g*A,w=E&67108863,_=E/67108864|0;y.words[0]=w;for(var p=1;p<b;p++){for(var I=_>>>26,C=_&67108863,j=Math.min(p,d.length-1),U=Math.max(0,p-v.length+1);U<=j;U++){var D=p-U|0;g=v.words[D]|0,A=d.words[U]|0,E=g*A+C,I+=E/67108864|0,C=E&67108863}y.words[p]=C|0,_=I|0}return _!==0?y.words[p]=_|0:y.length--,y.strip()}var x=function(d,y,b){var g=d.words,A=y.words,E=b.words,w=0,_,p,I,C=g[0]|0,j=C&8191,U=C>>>13,D=g[1]|0,z=D&8191,q=D>>>13,V=g[2]|0,W=V&8191,Y=V>>>13,J=g[3]|0,X=J&8191,ee=J>>>13,se=g[4]|0,ne=se&8191,re=se>>>13,be=g[5]|0,Ie=be&8191,Ne=be>>>13,Bn=g[6]|0,Te=Bn&8191,Be=Bn>>>13,On=g[7]|0,Fe=On&8191,Le=On>>>13,Oa=g[8]|0,je=Oa&8191,Ue=Oa>>>13,Lf=g[9]|0,Ke=Lf&8191,qe=Lf>>>13,jf=A[0]|0,ft=jf&8191,ut=jf>>>13,ST=A[1]|0,dt=ST&8191,lt=ST>>>13,IT=A[2]|0,pt=IT&8191,ht=IT>>>13,TT=A[3]|0,mt=TT&8191,yt=TT>>>13,BT=A[4]|0,bt=BT&8191,gt=BT>>>13,OT=A[5]|0,vt=OT&8191,xt=OT>>>13,PT=A[6]|0,wt=PT&8191,Et=PT>>>13,RT=A[7]|0,At=RT&8191,_t=RT>>>13,CT=A[8]|0,St=CT&8191,It=CT>>>13,NT=A[9]|0,Tt=NT&8191,Bt=NT>>>13;b.negative=d.negative^y.negative,b.length=19,_=Math.imul(j,ft),p=Math.imul(j,ut),p=p+Math.imul(U,ft)|0,I=Math.imul(U,ut);var pw=(w+_|0)+((p&8191)<<13)|0;w=(I+(p>>>13)|0)+(pw>>>26)|0,pw&=67108863,_=Math.imul(z,ft),p=Math.imul(z,ut),p=p+Math.imul(q,ft)|0,I=Math.imul(q,ut),_=_+Math.imul(j,dt)|0,p=p+Math.imul(j,lt)|0,p=p+Math.imul(U,dt)|0,I=I+Math.imul(U,lt)|0;var hw=(w+_|0)+((p&8191)<<13)|0;w=(I+(p>>>13)|0)+(hw>>>26)|0,hw&=67108863,_=Math.imul(W,ft),p=Math.imul(W,ut),p=p+Math.imul(Y,ft)|0,I=Math.imul(Y,ut),_=_+Math.imul(z,dt)|0,p=p+Math.imul(z,lt)|0,p=p+Math.imul(q,dt)|0,I=I+Math.imul(q,lt)|0,_=_+Math.imul(j,pt)|0,p=p+Math.imul(j,ht)|0,p=p+Math.imul(U,pt)|0,I=I+Math.imul(U,ht)|0;var mw=(w+_|0)+((p&8191)<<13)|0;w=(I+(p>>>13)|0)+(mw>>>26)|0,mw&=67108863,_=Math.imul(X,ft),p=Math.imul(X,ut),p=p+Math.imul(ee,ft)|0,I=Math.imul(ee,ut),_=_+Math.imul(W,dt)|0,p=p+Math.imul(W,lt)|0,p=p+Math.imul(Y,dt)|0,I=I+Math.imul(Y,lt)|0,_=_+Math.imul(z,pt)|0,p=p+Math.imul(z,ht)|0,p=p+Math.imul(q,pt)|0,I=I+Math.imul(q,ht)|0,_=_+Math.imul(j,mt)|0,p=p+Math.imul(j,yt)|0,p=p+Math.imul(U,mt)|0,I=I+Math.imul(U,yt)|0;var yw=(w+_|0)+((p&8191)<<13)|0;w=(I+(p>>>13)|0)+(yw>>>26)|0,yw&=67108863,_=Math.imul(ne,ft),p=Math.imul(ne,ut),p=p+Math.imul(re,ft)|0,I=Math.imul(re,ut),_=_+Math.imul(X,dt)|0,p=p+Math.imul(X,lt)|0,p=p+Math.imul(ee,dt)|0,I=I+Math.imul(ee,lt)|0,_=_+Math.imul(W,pt)|0,p=p+Math.imul(W,ht)|0,p=p+Math.imul(Y,pt)|0,I=I+Math.imul(Y,ht)|0,_=_+Math.imul(z,mt)|0,p=p+Math.imul(z,yt)|0,p=p+Math.imul(q,mt)|0,I=I+Math.imul(q,yt)|0,_=_+Math.imul(j,bt)|0,p=p+Math.imul(j,gt)|0,p=p+Math.imul(U,bt)|0,I=I+Math.imul(U,gt)|0;var bw=(w+_|0)+((p&8191)<<13)|0;w=(I+(p>>>13)|0)+(bw>>>26)|0,bw&=67108863,_=Math.imul(Ie,ft),p=Math.imul(Ie,ut),p=p+Math.imul(Ne,ft)|0,I=Math.imul(Ne,ut),_=_+Math.imul(ne,dt)|0,p=p+Math.imul(ne,lt)|0,p=p+Math.imul(re,dt)|0,I=I+Math.imul(re,lt)|0,_=_+Math.imul(X,pt)|0,p=p+Math.imul(X,ht)|0,p=p+Math.imul(ee,pt)|0,I=I+Math.imul(ee,ht)|0,_=_+Math.imul(W,mt)|0,p=p+Math.imul(W,yt)|0,p=p+Math.imul(Y,mt)|0,I=I+Math.imul(Y,yt)|0,_=_+Math.imul(z,bt)|0,p=p+Math.imul(z,gt)|0,p=p+Math.imul(q,bt)|0,I=I+Math.imul(q,gt)|0,_=_+Math.imul(j,vt)|0,p=p+Math.imul(j,xt)|0,p=p+Math.imul(U,vt)|0,I=I+Math.imul(U,xt)|0;var gw=(w+_|0)+((p&8191)<<13)|0;w=(I+(p>>>13)|0)+(gw>>>26)|0,gw&=67108863,_=Math.imul(Te,ft),p=Math.imul(Te,ut),p=p+Math.imul(Be,ft)|0,I=Math.imul(Be,ut),_=_+Math.imul(Ie,dt)|0,p=p+Math.imul(Ie,lt)|0,p=p+Math.imul(Ne,dt)|0,I=I+Math.imul(Ne,lt)|0,_=_+Math.imul(ne,pt)|0,p=p+Math.imul(ne,ht)|0,p=p+Math.imul(re,pt)|0,I=I+Math.imul(re,ht)|0,_=_+Math.imul(X,mt)|0,p=p+Math.imul(X,yt)|0,p=p+Math.imul(ee,mt)|0,I=I+Math.imul(ee,yt)|0,_=_+Math.imul(W,bt)|0,p=p+Math.imul(W,gt)|0,p=p+Math.imul(Y,bt)|0,I=I+Math.imul(Y,gt)|0,_=_+Math.imul(z,vt)|0,p=p+Math.imul(z,xt)|0,p=p+Math.imul(q,vt)|0,I=I+Math.imul(q,xt)|0,_=_+Math.imul(j,wt)|0,p=p+Math.imul(j,Et)|0,p=p+Math.imul(U,wt)|0,I=I+Math.imul(U,Et)|0;var vw=(w+_|0)+((p&8191)<<13)|0;w=(I+(p>>>13)|0)+(vw>>>26)|0,vw&=67108863,_=Math.imul(Fe,ft),p=Math.imul(Fe,ut),p=p+Math.imul(Le,ft)|0,I=Math.imul(Le,ut),_=_+Math.imul(Te,dt)|0,p=p+Math.imul(Te,lt)|0,p=p+Math.imul(Be,dt)|0,I=I+Math.imul(Be,lt)|0,_=_+Math.imul(Ie,pt)|0,p=p+Math.imul(Ie,ht)|0,p=p+Math.imul(Ne,pt)|0,I=I+Math.imul(Ne,ht)|0,_=_+Math.imul(ne,mt)|0,p=p+Math.imul(ne,yt)|0,p=p+Math.imul(re,mt)|0,I=I+Math.imul(re,yt)|0,_=_+Math.imul(X,bt)|0,p=p+Math.imul(X,gt)|0,p=p+Math.imul(ee,bt)|0,I=I+Math.imul(ee,gt)|0,_=_+Math.imul(W,vt)|0,p=p+Math.imul(W,xt)|0,p=p+Math.imul(Y,vt)|0,I=I+Math.imul(Y,xt)|0,_=_+Math.imul(z,wt)|0,p=p+Math.imul(z,Et)|0,p=p+Math.imul(q,wt)|0,I=I+Math.imul(q,Et)|0,_=_+Math.imul(j,At)|0,p=p+Math.imul(j,_t)|0,p=p+Math.imul(U,At)|0,I=I+Math.imul(U,_t)|0;var xw=(w+_|0)+((p&8191)<<13)|0;w=(I+(p>>>13)|0)+(xw>>>26)|0,xw&=67108863,_=Math.imul(je,ft),p=Math.imul(je,ut),p=p+Math.imul(Ue,ft)|0,I=Math.imul(Ue,ut),_=_+Math.imul(Fe,dt)|0,p=p+Math.imul(Fe,lt)|0,p=p+Math.imul(Le,dt)|0,I=I+Math.imul(Le,lt)|0,_=_+Math.imul(Te,pt)|0,p=p+Math.imul(Te,ht)|0,p=p+Math.imul(Be,pt)|0,I=I+Math.imul(Be,ht)|0,_=_+Math.imul(Ie,mt)|0,p=p+Math.imul(Ie,yt)|0,p=p+Math.imul(Ne,mt)|0,I=I+Math.imul(Ne,yt)|0,_=_+Math.imul(ne,bt)|0,p=p+Math.imul(ne,gt)|0,p=p+Math.imul(re,bt)|0,I=I+Math.imul(re,gt)|0,_=_+Math.imul(X,vt)|0,p=p+Math.imul(X,xt)|0,p=p+Math.imul(ee,vt)|0,I=I+Math.imul(ee,xt)|0,_=_+Math.imul(W,wt)|0,p=p+Math.imul(W,Et)|0,p=p+Math.imul(Y,wt)|0,I=I+Math.imul(Y,Et)|0,_=_+Math.imul(z,At)|0,p=p+Math.imul(z,_t)|0,p=p+Math.imul(q,At)|0,I=I+Math.imul(q,_t)|0,_=_+Math.imul(j,St)|0,p=p+Math.imul(j,It)|0,p=p+Math.imul(U,St)|0,I=I+Math.imul(U,It)|0;var ww=(w+_|0)+((p&8191)<<13)|0;w=(I+(p>>>13)|0)+(ww>>>26)|0,ww&=67108863,_=Math.imul(Ke,ft),p=Math.imul(Ke,ut),p=p+Math.imul(qe,ft)|0,I=Math.imul(qe,ut),_=_+Math.imul(je,dt)|0,p=p+Math.imul(je,lt)|0,p=p+Math.imul(Ue,dt)|0,I=I+Math.imul(Ue,lt)|0,_=_+Math.imul(Fe,pt)|0,p=p+Math.imul(Fe,ht)|0,p=p+Math.imul(Le,pt)|0,I=I+Math.imul(Le,ht)|0,_=_+Math.imul(Te,mt)|0,p=p+Math.imul(Te,yt)|0,p=p+Math.imul(Be,mt)|0,I=I+Math.imul(Be,yt)|0,_=_+Math.imul(Ie,bt)|0,p=p+Math.imul(Ie,gt)|0,p=p+Math.imul(Ne,bt)|0,I=I+Math.imul(Ne,gt)|0,_=_+Math.imul(ne,vt)|0,p=p+Math.imul(ne,xt)|0,p=p+Math.imul(re,vt)|0,I=I+Math.imul(re,xt)|0,_=_+Math.imul(X,wt)|0,p=p+Math.imul(X,Et)|0,p=p+Math.imul(ee,wt)|0,I=I+Math.imul(ee,Et)|0,_=_+Math.imul(W,At)|0,p=p+Math.imul(W,_t)|0,p=p+Math.imul(Y,At)|0,I=I+Math.imul(Y,_t)|0,_=_+Math.imul(z,St)|0,p=p+Math.imul(z,It)|0,p=p+Math.imul(q,St)|0,I=I+Math.imul(q,It)|0,_=_+Math.imul(j,Tt)|0,p=p+Math.imul(j,Bt)|0,p=p+Math.imul(U,Tt)|0,I=I+Math.imul(U,Bt)|0;var Ew=(w+_|0)+((p&8191)<<13)|0;w=(I+(p>>>13)|0)+(Ew>>>26)|0,Ew&=67108863,_=Math.imul(Ke,dt),p=Math.imul(Ke,lt),p=p+Math.imul(qe,dt)|0,I=Math.imul(qe,lt),_=_+Math.imul(je,pt)|0,p=p+Math.imul(je,ht)|0,p=p+Math.imul(Ue,pt)|0,I=I+Math.imul(Ue,ht)|0,_=_+Math.imul(Fe,mt)|0,p=p+Math.imul(Fe,yt)|0,p=p+Math.imul(Le,mt)|0,I=I+Math.imul(Le,yt)|0,_=_+Math.imul(Te,bt)|0,p=p+Math.imul(Te,gt)|0,p=p+Math.imul(Be,bt)|0,I=I+Math.imul(Be,gt)|0,_=_+Math.imul(Ie,vt)|0,p=p+Math.imul(Ie,xt)|0,p=p+Math.imul(Ne,vt)|0,I=I+Math.imul(Ne,xt)|0,_=_+Math.imul(ne,wt)|0,p=p+Math.imul(ne,Et)|0,p=p+Math.imul(re,wt)|0,I=I+Math.imul(re,Et)|0,_=_+Math.imul(X,At)|0,p=p+Math.imul(X,_t)|0,p=p+Math.imul(ee,At)|0,I=I+Math.imul(ee,_t)|0,_=_+Math.imul(W,St)|0,p=p+Math.imul(W,It)|0,p=p+Math.imul(Y,St)|0,I=I+Math.imul(Y,It)|0,_=_+Math.imul(z,Tt)|0,p=p+Math.imul(z,Bt)|0,p=p+Math.imul(q,Tt)|0,I=I+Math.imul(q,Bt)|0;var Aw=(w+_|0)+((p&8191)<<13)|0;w=(I+(p>>>13)|0)+(Aw>>>26)|0,Aw&=67108863,_=Math.imul(Ke,pt),p=Math.imul(Ke,ht),p=p+Math.imul(qe,pt)|0,I=Math.imul(qe,ht),_=_+Math.imul(je,mt)|0,p=p+Math.imul(je,yt)|0,p=p+Math.imul(Ue,mt)|0,I=I+Math.imul(Ue,yt)|0,_=_+Math.imul(Fe,bt)|0,p=p+Math.imul(Fe,gt)|0,p=p+Math.imul(Le,bt)|0,I=I+Math.imul(Le,gt)|0,_=_+Math.imul(Te,vt)|0,p=p+Math.imul(Te,xt)|0,p=p+Math.imul(Be,vt)|0,I=I+Math.imul(Be,xt)|0,_=_+Math.imul(Ie,wt)|0,p=p+Math.imul(Ie,Et)|0,p=p+Math.imul(Ne,wt)|0,I=I+Math.imul(Ne,Et)|0,_=_+Math.imul(ne,At)|0,p=p+Math.imul(ne,_t)|0,p=p+Math.imul(re,At)|0,I=I+Math.imul(re,_t)|0,_=_+Math.imul(X,St)|0,p=p+Math.imul(X,It)|0,p=p+Math.imul(ee,St)|0,I=I+Math.imul(ee,It)|0,_=_+Math.imul(W,Tt)|0,p=p+Math.imul(W,Bt)|0,p=p+Math.imul(Y,Tt)|0,I=I+Math.imul(Y,Bt)|0;var _w=(w+_|0)+((p&8191)<<13)|0;w=(I+(p>>>13)|0)+(_w>>>26)|0,_w&=67108863,_=Math.imul(Ke,mt),p=Math.imul(Ke,yt),p=p+Math.imul(qe,mt)|0,I=Math.imul(qe,yt),_=_+Math.imul(je,bt)|0,p=p+Math.imul(je,gt)|0,p=p+Math.imul(Ue,bt)|0,I=I+Math.imul(Ue,gt)|0,_=_+Math.imul(Fe,vt)|0,p=p+Math.imul(Fe,xt)|0,p=p+Math.imul(Le,vt)|0,I=I+Math.imul(Le,xt)|0,_=_+Math.imul(Te,wt)|0,p=p+Math.imul(Te,Et)|0,p=p+Math.imul(Be,wt)|0,I=I+Math.imul(Be,Et)|0,_=_+Math.imul(Ie,At)|0,p=p+Math.imul(Ie,_t)|0,p=p+Math.imul(Ne,At)|0,I=I+Math.imul(Ne,_t)|0,_=_+Math.imul(ne,St)|0,p=p+Math.imul(ne,It)|0,p=p+Math.imul(re,St)|0,I=I+Math.imul(re,It)|0,_=_+Math.imul(X,Tt)|0,p=p+Math.imul(X,Bt)|0,p=p+Math.imul(ee,Tt)|0,I=I+Math.imul(ee,Bt)|0;var Sw=(w+_|0)+((p&8191)<<13)|0;w=(I+(p>>>13)|0)+(Sw>>>26)|0,Sw&=67108863,_=Math.imul(Ke,bt),p=Math.imul(Ke,gt),p=p+Math.imul(qe,bt)|0,I=Math.imul(qe,gt),_=_+Math.imul(je,vt)|0,p=p+Math.imul(je,xt)|0,p=p+Math.imul(Ue,vt)|0,I=I+Math.imul(Ue,xt)|0,_=_+Math.imul(Fe,wt)|0,p=p+Math.imul(Fe,Et)|0,p=p+Math.imul(Le,wt)|0,I=I+Math.imul(Le,Et)|0,_=_+Math.imul(Te,At)|0,p=p+Math.imul(Te,_t)|0,p=p+Math.imul(Be,At)|0,I=I+Math.imul(Be,_t)|0,_=_+Math.imul(Ie,St)|0,p=p+Math.imul(Ie,It)|0,p=p+Math.imul(Ne,St)|0,I=I+Math.imul(Ne,It)|0,_=_+Math.imul(ne,Tt)|0,p=p+Math.imul(ne,Bt)|0,p=p+Math.imul(re,Tt)|0,I=I+Math.imul(re,Bt)|0;var Iw=(w+_|0)+((p&8191)<<13)|0;w=(I+(p>>>13)|0)+(Iw>>>26)|0,Iw&=67108863,_=Math.imul(Ke,vt),p=Math.imul(Ke,xt),p=p+Math.imul(qe,vt)|0,I=Math.imul(qe,xt),_=_+Math.imul(je,wt)|0,p=p+Math.imul(je,Et)|0,p=p+Math.imul(Ue,wt)|0,I=I+Math.imul(Ue,Et)|0,_=_+Math.imul(Fe,At)|0,p=p+Math.imul(Fe,_t)|0,p=p+Math.imul(Le,At)|0,I=I+Math.imul(Le,_t)|0,_=_+Math.imul(Te,St)|0,p=p+Math.imul(Te,It)|0,p=p+Math.imul(Be,St)|0,I=I+Math.imul(Be,It)|0,_=_+Math.imul(Ie,Tt)|0,p=p+Math.imul(Ie,Bt)|0,p=p+Math.imul(Ne,Tt)|0,I=I+Math.imul(Ne,Bt)|0;var Tw=(w+_|0)+((p&8191)<<13)|0;w=(I+(p>>>13)|0)+(Tw>>>26)|0,Tw&=67108863,_=Math.imul(Ke,wt),p=Math.imul(Ke,Et),p=p+Math.imul(qe,wt)|0,I=Math.imul(qe,Et),_=_+Math.imul(je,At)|0,p=p+Math.imul(je,_t)|0,p=p+Math.imul(Ue,At)|0,I=I+Math.imul(Ue,_t)|0,_=_+Math.imul(Fe,St)|0,p=p+Math.imul(Fe,It)|0,p=p+Math.imul(Le,St)|0,I=I+Math.imul(Le,It)|0,_=_+Math.imul(Te,Tt)|0,p=p+Math.imul(Te,Bt)|0,p=p+Math.imul(Be,Tt)|0,I=I+Math.imul(Be,Bt)|0;var Bw=(w+_|0)+((p&8191)<<13)|0;w=(I+(p>>>13)|0)+(Bw>>>26)|0,Bw&=67108863,_=Math.imul(Ke,At),p=Math.imul(Ke,_t),p=p+Math.imul(qe,At)|0,I=Math.imul(qe,_t),_=_+Math.imul(je,St)|0,p=p+Math.imul(je,It)|0,p=p+Math.imul(Ue,St)|0,I=I+Math.imul(Ue,It)|0,_=_+Math.imul(Fe,Tt)|0,p=p+Math.imul(Fe,Bt)|0,p=p+Math.imul(Le,Tt)|0,I=I+Math.imul(Le,Bt)|0;var Ow=(w+_|0)+((p&8191)<<13)|0;w=(I+(p>>>13)|0)+(Ow>>>26)|0,Ow&=67108863,_=Math.imul(Ke,St),p=Math.imul(Ke,It),p=p+Math.imul(qe,St)|0,I=Math.imul(qe,It),_=_+Math.imul(je,Tt)|0,p=p+Math.imul(je,Bt)|0,p=p+Math.imul(Ue,Tt)|0,I=I+Math.imul(Ue,Bt)|0;var Pw=(w+_|0)+((p&8191)<<13)|0;w=(I+(p>>>13)|0)+(Pw>>>26)|0,Pw&=67108863,_=Math.imul(Ke,Tt),p=Math.imul(Ke,Bt),p=p+Math.imul(qe,Tt)|0,I=Math.imul(qe,Bt);var Rw=(w+_|0)+((p&8191)<<13)|0;return w=(I+(p>>>13)|0)+(Rw>>>26)|0,Rw&=67108863,E[0]=pw,E[1]=hw,E[2]=mw,E[3]=yw,E[4]=bw,E[5]=gw,E[6]=vw,E[7]=xw,E[8]=ww,E[9]=Ew,E[10]=Aw,E[11]=_w,E[12]=Sw,E[13]=Iw,E[14]=Tw,E[15]=Bw,E[16]=Ow,E[17]=Pw,E[18]=Rw,w!==0&&(E[19]=w,b.length++),b};Math.imul||(x=m);function S(v,d,y){y.negative=d.negative^v.negative,y.length=v.length+d.length;for(var b=0,g=0,A=0;A<y.length-1;A++){var E=g;g=0;for(var w=b&67108863,_=Math.min(A,d.length-1),p=Math.max(0,A-v.length+1);p<=_;p++){var I=A-p,C=v.words[I]|0,j=d.words[p]|0,U=C*j,D=U&67108863;E=E+(U/67108864|0)|0,D=D+w|0,w=D&67108863,E=E+(D>>>26)|0,g+=E>>>26,E&=67108863}y.words[A]=w,b=E,E=g}return b!==0?y.words[A]=b:y.length--,y.strip()}function O(v,d,y){var b=new P;return b.mulp(v,d,y)}o.prototype.mulTo=function(d,y){var b,g=this.length+d.length;return this.length===10&&d.length===10?b=x(this,d,y):g<63?b=m(this,d,y):g<1024?b=S(this,d,y):b=O(this,d,y),b};function P(v,d){this.x=v,this.y=d}P.prototype.makeRBT=function(d){for(var y=new Array(d),b=o.prototype._countBits(d)-1,g=0;g<d;g++)y[g]=this.revBin(g,b,d);return y},P.prototype.revBin=function(d,y,b){if(d===0||d===b-1)return d;for(var g=0,A=0;A<y;A++)g|=(d&1)<<y-A-1,d>>=1;return g},P.prototype.permute=function(d,y,b,g,A,E){for(var w=0;w<E;w++)g[w]=y[d[w]],A[w]=b[d[w]]},P.prototype.transform=function(d,y,b,g,A,E){this.permute(E,d,y,b,g,A);for(var w=1;w<A;w<<=1)for(var _=w<<1,p=Math.cos(2*Math.PI/_),I=Math.sin(2*Math.PI/_),C=0;C<A;C+=_)for(var j=p,U=I,D=0;D<w;D++){var z=b[C+D],q=g[C+D],V=b[C+D+w],W=g[C+D+w],Y=j*V-U*W;W=j*W+U*V,V=Y,b[C+D]=z+V,g[C+D]=q+W,b[C+D+w]=z-V,g[C+D+w]=q-W,D!==_&&(Y=p*j-I*U,U=p*U+I*j,j=Y)}},P.prototype.guessLen13b=function(d,y){var b=Math.max(y,d)|1,g=b&1,A=0;for(b=b/2|0;b;b=b>>>1)A++;return 1<<A+1+g},P.prototype.conjugate=function(d,y,b){if(!(b<=1))for(var g=0;g<b/2;g++){var A=d[g];d[g]=d[b-g-1],d[b-g-1]=A,A=y[g],y[g]=-y[b-g-1],y[b-g-1]=-A}},P.prototype.normalize13b=function(d,y){for(var b=0,g=0;g<y/2;g++){var A=Math.round(d[2*g+1]/y)*8192+Math.round(d[2*g]/y)+b;d[g]=A&67108863,A<67108864?b=0:b=A/67108864|0}return d},P.prototype.convert13b=function(d,y,b,g){for(var A=0,E=0;E<y;E++)A=A+(d[E]|0),b[2*E]=A&8191,A=A>>>13,b[2*E+1]=A&8191,A=A>>>13;for(E=2*y;E<g;++E)b[E]=0;r(A===0),r((A&-8192)===0)},P.prototype.stub=function(d){for(var y=new Array(d),b=0;b<d;b++)y[b]=0;return y},P.prototype.mulp=function(d,y,b){var g=2*this.guessLen13b(d.length,y.length),A=this.makeRBT(g),E=this.stub(g),w=new Array(g),_=new Array(g),p=new Array(g),I=new Array(g),C=new Array(g),j=new Array(g),U=b.words;U.length=g,this.convert13b(d.words,d.length,w,g),this.convert13b(y.words,y.length,I,g),this.transform(w,E,_,p,g,A),this.transform(I,E,C,j,g,A);for(var D=0;D<g;D++){var z=_[D]*C[D]-p[D]*j[D];p[D]=_[D]*j[D]+p[D]*C[D],_[D]=z}return this.conjugate(_,p,g),this.transform(_,p,U,E,g,A),this.conjugate(U,E,g),this.normalize13b(U,g),b.negative=d.negative^y.negative,b.length=d.length+y.length,b.strip()},o.prototype.mul=function(d){var y=new o(null);return y.words=new Array(this.length+d.length),this.mulTo(d,y)},o.prototype.mulf=function(d){var y=new o(null);return y.words=new Array(this.length+d.length),O(this,d,y)},o.prototype.imul=function(d){return this.clone().mulTo(d,this)},o.prototype.imuln=function(d){r(typeof d=="number"),r(d<67108864);for(var y=0,b=0;b<this.length;b++){var g=(this.words[b]|0)*d,A=(g&67108863)+(y&67108863);y>>=26,y+=g/67108864|0,y+=A>>>26,this.words[b]=A&67108863}return y!==0&&(this.words[b]=y,this.length++),d===0&&(this.length=1,this._normSign()),this},o.prototype.muln=function(d){return this.clone().imuln(d)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(d){var y=h(d);if(y.length===0)return new o(1);for(var b=this,g=0;g<y.length&&y[g]===0;g++,b=b.sqr());if(++g<y.length)for(var A=b.sqr();g<y.length;g++,A=A.sqr())y[g]!==0&&(b=b.mul(A));return b},o.prototype.iushln=function(d){r(typeof d=="number"&&d>=0);var y=d%26,b=(d-y)/26,g=67108863>>>26-y<<26-y,A;if(y!==0){var E=0;for(A=0;A<this.length;A++){var w=this.words[A]&g,_=(this.words[A]|0)-w<<y;this.words[A]=_|E,E=w>>>26-y}E&&(this.words[A]=E,this.length++)}if(b!==0){for(A=this.length-1;A>=0;A--)this.words[A+b]=this.words[A];for(A=0;A<b;A++)this.words[A]=0;this.length+=b}return this.strip()},o.prototype.ishln=function(d){return r(this.negative===0),this.iushln(d)},o.prototype.iushrn=function(d,y,b){r(typeof d=="number"&&d>=0);var g;y?g=(y-y%26)/26:g=0;var A=d%26,E=Math.min((d-A)/26,this.length),w=67108863^67108863>>>A<<A,_=b;if(g-=E,g=Math.max(0,g),_){for(var p=0;p<E;p++)_.words[p]=this.words[p];_.length=E}if(E!==0)if(this.length>E)for(this.length-=E,p=0;p<this.length;p++)this.words[p]=this.words[p+E];else this.words[0]=0,this.length=1;var I=0;for(p=this.length-1;p>=0&&(I!==0||p>=g);p--){var C=this.words[p]|0;this.words[p]=I<<26-A|C>>>A,I=C&w}return _&&I!==0&&(_.words[_.length++]=I),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(d,y,b){return r(this.negative===0),this.iushrn(d,y,b)},o.prototype.shln=function(d){return this.clone().ishln(d)},o.prototype.ushln=function(d){return this.clone().iushln(d)},o.prototype.shrn=function(d){return this.clone().ishrn(d)},o.prototype.ushrn=function(d){return this.clone().iushrn(d)},o.prototype.testn=function(d){r(typeof d=="number"&&d>=0);var y=d%26,b=(d-y)/26,g=1<<y;if(this.length<=b)return!1;var A=this.words[b];return!!(A&g)},o.prototype.imaskn=function(d){r(typeof d=="number"&&d>=0);var y=d%26,b=(d-y)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=b)return this;if(y!==0&&b++,this.length=Math.min(b,this.length),y!==0){var g=67108863^67108863>>>y<<y;this.words[this.length-1]&=g}return this.length===0&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.maskn=function(d){return this.clone().imaskn(d)},o.prototype.iaddn=function(d){return r(typeof d=="number"),r(d<67108864),d<0?this.isubn(-d):this.negative!==0?this.length===1&&(this.words[0]|0)<d?(this.words[0]=d-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(d),this.negative=1,this):this._iaddn(d)},o.prototype._iaddn=function(d){this.words[0]+=d;for(var y=0;y<this.length&&this.words[y]>=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},o.prototype.isubn=function(d){if(r(typeof d=="number"),r(d<67108864),d<0)return this.iaddn(-d);if(this.negative!==0)return this.negative=0,this.iaddn(d),this.negative=1,this;if(this.words[0]-=d,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y<this.length&&this.words[y]<0;y++)this.words[y]+=67108864,this.words[y+1]-=1;return this.strip()},o.prototype.addn=function(d){return this.clone().iaddn(d)},o.prototype.subn=function(d){return this.clone().isubn(d)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(d,y,b){var g=d.length+b,A;this._expand(g);var E,w=0;for(A=0;A<d.length;A++){E=(this.words[A+b]|0)+w;var _=(d.words[A]|0)*y;E-=_&67108863,w=(E>>26)-(_/67108864|0),this.words[A+b]=E&67108863}for(;A<this.length-b;A++)E=(this.words[A+b]|0)+w,w=E>>26,this.words[A+b]=E&67108863;if(w===0)return this.strip();for(r(w===-1),w=0,A=0;A<this.length;A++)E=-(this.words[A]|0)+w,w=E>>26,this.words[A]=E&67108863;return this.negative=1,this.strip()},o.prototype._wordDiv=function(d,y){var b=this.length-d.length,g=this.clone(),A=d,E=A.words[A.length-1]|0,w=this._countBits(E);b=26-w,b!==0&&(A=A.ushln(b),g.iushln(b),E=A.words[A.length-1]|0);var _=g.length-A.length,p;if(y!=="mod"){p=new o(null),p.length=_+1,p.words=new Array(p.length);for(var I=0;I<p.length;I++)p.words[I]=0}var C=g.clone()._ishlnsubmul(A,1,_);C.negative===0&&(g=C,p&&(p.words[_]=1));for(var j=_-1;j>=0;j--){var U=(g.words[A.length+j]|0)*67108864+(g.words[A.length+j-1]|0);for(U=Math.min(U/E|0,67108863),g._ishlnsubmul(A,U,j);g.negative!==0;)U--,g.negative=0,g._ishlnsubmul(A,1,j),g.isZero()||(g.negative^=1);p&&(p.words[j]=U)}return p&&p.strip(),g.strip(),y!=="div"&&b!==0&&g.iushrn(b),{div:p||null,mod:g}},o.prototype.divmod=function(d,y,b){if(r(!d.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var g,A,E;return this.negative!==0&&d.negative===0?(E=this.neg().divmod(d,y),y!=="mod"&&(g=E.div.neg()),y!=="div"&&(A=E.mod.neg(),b&&A.negative!==0&&A.iadd(d)),{div:g,mod:A}):this.negative===0&&d.negative!==0?(E=this.divmod(d.neg(),y),y!=="mod"&&(g=E.div.neg()),{div:g,mod:E.mod}):(this.negative&d.negative)!==0?(E=this.neg().divmod(d.neg(),y),y!=="div"&&(A=E.mod.neg(),b&&A.negative!==0&&A.isub(d)),{div:E.div,mod:A}):d.length>this.length||this.cmp(d)<0?{div:new o(0),mod:this}:d.length===1?y==="div"?{div:this.divn(d.words[0]),mod:null}:y==="mod"?{div:null,mod:new o(this.modn(d.words[0]))}:{div:this.divn(d.words[0]),mod:new o(this.modn(d.words[0]))}:this._wordDiv(d,y)},o.prototype.div=function(d){return this.divmod(d,"div",!1).div},o.prototype.mod=function(d){return this.divmod(d,"mod",!1).mod},o.prototype.umod=function(d){return this.divmod(d,"mod",!0).mod},o.prototype.divRound=function(d){var y=this.divmod(d);if(y.mod.isZero())return y.div;var b=y.mod.abs(),g=d.abs().iushrn(1),A=d.words[0]&1,E=b.cmp(g);if(E<0||A===1&&E===0)return y.div;var w=new o(1);return w.negative=this.negative^d.negative,y.div.iadd(w)},o.prototype.modn=function(d){r(d<=67108863);for(var y=(1<<26)%d,b=0,g=this.length-1;g>=0;g--)b=(y*b+(this.words[g]|0))%d;return b},o.prototype.idivn=function(d){r(d<=67108863);for(var y=0,b=this.length-1;b>=0;b--){var g=(this.words[b]|0)+y*67108864;this.words[b]=g/d|0,y=g%d}return this.strip()},o.prototype.divn=function(d){return this.clone().idivn(d)},o.prototype.egcd=function(d){r(d.negative===0),r(!d.isZero());var y=this,b=d.clone();y.negative!==0?y=y.umod(d):y=y.clone();for(var g=new o(1),A=new o(0),E=new o(0),w=new o(1),_=0;y.isEven()&&b.isEven();)y.iushrn(1),b.iushrn(1),++_;for(var p=b.clone(),I=y.clone();!y.isZero();){for(var C=0,j=1;(y.words[0]&j)===0&&C<26;++C,j<<=1);if(C>0)for(y.iushrn(C);C-- >0;)(g.isOdd()||A.isOdd())&&(g.iadd(p),A.isub(I)),g.iushrn(1),A.iushrn(1);for(var U=0,D=1;(b.words[0]&D)===0&&U<26;++U,D<<=1);if(U>0)for(b.iushrn(U);U-- >0;)(E.isOdd()||w.isOdd())&&(E.iadd(p),w.isub(I)),E.iushrn(1),w.iushrn(1);y.cmp(b)>=0?(y.isub(b),g.isub(E),A.isub(w)):(b.isub(y),E.isub(g),w.isub(A))}return{a:E,b:w,gcd:b.iushln(_)}},o.prototype._invmp=function(d){r(d.negative===0),r(!d.isZero());var y=this,b=d.clone();y.negative!==0?y=y.umod(d):y=y.clone();for(var g=new o(1),A=new o(0),E=b.clone();y.cmpn(1)>0&&b.cmpn(1)>0;){for(var w=0,_=1;(y.words[0]&_)===0&&w<26;++w,_<<=1);if(w>0)for(y.iushrn(w);w-- >0;)g.isOdd()&&g.iadd(E),g.iushrn(1);for(var p=0,I=1;(b.words[0]&I)===0&&p<26;++p,I<<=1);if(p>0)for(b.iushrn(p);p-- >0;)A.isOdd()&&A.iadd(E),A.iushrn(1);y.cmp(b)>=0?(y.isub(b),g.isub(A)):(b.isub(y),A.isub(g))}var C;return y.cmpn(1)===0?C=g:C=A,C.cmpn(0)<0&&C.iadd(d),C},o.prototype.gcd=function(d){if(this.isZero())return d.abs();if(d.isZero())return this.abs();var y=this.clone(),b=d.clone();y.negative=0,b.negative=0;for(var g=0;y.isEven()&&b.isEven();g++)y.iushrn(1),b.iushrn(1);do{for(;y.isEven();)y.iushrn(1);for(;b.isEven();)b.iushrn(1);var A=y.cmp(b);if(A<0){var E=y;y=b,b=E}else if(A===0||b.cmpn(1)===0)break;y.isub(b)}while(!0);return b.iushln(g)},o.prototype.invm=function(d){return this.egcd(d).a.umod(d)},o.prototype.isEven=function(){return(this.words[0]&1)===0},o.prototype.isOdd=function(){return(this.words[0]&1)===1},o.prototype.andln=function(d){return this.words[0]&d},o.prototype.bincn=function(d){r(typeof d=="number");var y=d%26,b=(d-y)/26,g=1<<y;if(this.length<=b)return this._expand(b+1),this.words[b]|=g,this;for(var A=g,E=b;A!==0&&E<this.length;E++){var w=this.words[E]|0;w+=A,A=w>>>26,w&=67108863,this.words[E]=w}return A!==0&&(this.words[E]=A,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(d){var y=d<0;if(this.negative!==0&&!y)return-1;if(this.negative===0&&y)return 1;this.strip();var b;if(this.length>1)b=1;else{y&&(d=-d),r(d<=67108863,"Number is too big");var g=this.words[0]|0;b=g===d?0:g<d?-1:1}return this.negative!==0?-b|0:b},o.prototype.cmp=function(d){if(this.negative!==0&&d.negative===0)return-1;if(this.negative===0&&d.negative!==0)return 1;var y=this.ucmp(d);return this.negative!==0?-y|0:y},o.prototype.ucmp=function(d){if(this.length>d.length)return 1;if(this.length<d.length)return-1;for(var y=0,b=this.length-1;b>=0;b--){var g=this.words[b]|0,A=d.words[b]|0;if(g!==A){g<A?y=-1:g>A&&(y=1);break}}return y},o.prototype.gtn=function(d){return this.cmpn(d)===1},o.prototype.gt=function(d){return this.cmp(d)===1},o.prototype.gten=function(d){return this.cmpn(d)>=0},o.prototype.gte=function(d){return this.cmp(d)>=0},o.prototype.ltn=function(d){return this.cmpn(d)===-1},o.prototype.lt=function(d){return this.cmp(d)===-1},o.prototype.lten=function(d){return this.cmpn(d)<=0},o.prototype.lte=function(d){return this.cmp(d)<=0},o.prototype.eqn=function(d){return this.cmpn(d)===0},o.prototype.eq=function(d){return this.cmp(d)===0},o.red=function(d){return new $(d)},o.prototype.toRed=function(d){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),d.convertTo(this)._forceRed(d)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(d){return this.red=d,this},o.prototype.forceRed=function(d){return r(!this.red,"Already a number in reduction context"),this._forceRed(d)},o.prototype.redAdd=function(d){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,d)},o.prototype.redIAdd=function(d){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,d)},o.prototype.redSub=function(d){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,d)},o.prototype.redISub=function(d){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,d)},o.prototype.redShl=function(d){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,d)},o.prototype.redMul=function(d){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,d),this.red.mul(this,d)},o.prototype.redIMul=function(d){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,d),this.red.imul(this,d)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(d){return r(this.red&&!d.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,d)};var F={k256:null,p224:null,p192:null,p25519:null};function B(v,d){this.name=v,this.p=new o(d,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}B.prototype._tmp=function(){var d=new o(null);return d.words=new Array(Math.ceil(this.n/13)),d},B.prototype.ireduce=function(d){var y=d,b;do this.split(y,this.tmp),y=this.imulK(y),y=y.iadd(this.tmp),b=y.bitLength();while(b>this.n);var g=b<this.n?-1:y.ucmp(this.p);return g===0?(y.words[0]=0,y.length=1):g>0?y.isub(this.p):y.strip!==void 0?y.strip():y._strip(),y},B.prototype.split=function(d,y){d.iushrn(this.n,0,y)},B.prototype.imulK=function(d){return d.imul(this.k)};function R(){B.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}n(R,B),R.prototype.split=function(d,y){for(var b=4194303,g=Math.min(d.length,9),A=0;A<g;A++)y.words[A]=d.words[A];if(y.length=g,d.length<=9){d.words[0]=0,d.length=1;return}var E=d.words[9];for(y.words[y.length++]=E&b,A=10;A<d.length;A++){var w=d.words[A]|0;d.words[A-10]=(w&b)<<4|E>>>22,E=w}E>>>=22,d.words[A-10]=E,E===0&&d.length>10?d.length-=10:d.length-=9},R.prototype.imulK=function(d){d.words[d.length]=0,d.words[d.length+1]=0,d.length+=2;for(var y=0,b=0;b<d.length;b++){var g=d.words[b]|0;y+=g*977,d.words[b]=y&67108863,y=g*64+(y/67108864|0)}return d.words[d.length-1]===0&&(d.length--,d.words[d.length-1]===0&&d.length--),d};function L(){B.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}n(L,B);function T(){B.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}n(T,B);function M(){B.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}n(M,B),M.prototype.imulK=function(d){for(var y=0,b=0;b<d.length;b++){var g=(d.words[b]|0)*19+y,A=g&67108863;g>>>=26,d.words[b]=A,y=g}return y!==0&&(d.words[d.length++]=y),d},o._prime=function(d){if(F[d])return F[d];var y;if(d==="k256")y=new R;else if(d==="p224")y=new L;else if(d==="p192")y=new T;else if(d==="p25519")y=new M;else throw new Error("Unknown prime "+d);return F[d]=y,y};function $(v){if(typeof v=="string"){var d=o._prime(v);this.m=d.p,this.prime=d}else r(v.gtn(1),"modulus must be greater than 1"),this.m=v,this.prime=null}$.prototype._verify1=function(d){r(d.negative===0,"red works only with positives"),r(d.red,"red works only with red numbers")},$.prototype._verify2=function(d,y){r((d.negative|y.negative)===0,"red works only with positives"),r(d.red&&d.red===y.red,"red works only with red numbers")},$.prototype.imod=function(d){return this.prime?this.prime.ireduce(d)._forceRed(this):d.umod(this.m)._forceRed(this)},$.prototype.neg=function(d){return d.isZero()?d.clone():this.m.sub(d)._forceRed(this)},$.prototype.add=function(d,y){this._verify2(d,y);var b=d.add(y);return b.cmp(this.m)>=0&&b.isub(this.m),b._forceRed(this)},$.prototype.iadd=function(d,y){this._verify2(d,y);var b=d.iadd(y);return b.cmp(this.m)>=0&&b.isub(this.m),b},$.prototype.sub=function(d,y){this._verify2(d,y);var b=d.sub(y);return b.cmpn(0)<0&&b.iadd(this.m),b._forceRed(this)},$.prototype.isub=function(d,y){this._verify2(d,y);var b=d.isub(y);return b.cmpn(0)<0&&b.iadd(this.m),b},$.prototype.shl=function(d,y){return this._verify1(d),this.imod(d.ushln(y))},$.prototype.imul=function(d,y){return this._verify2(d,y),this.imod(d.imul(y))},$.prototype.mul=function(d,y){return this._verify2(d,y),this.imod(d.mul(y))},$.prototype.isqr=function(d){return this.imul(d,d.clone())},$.prototype.sqr=function(d){return this.mul(d,d)},$.prototype.sqrt=function(d){if(d.isZero())return d.clone();var y=this.m.andln(3);if(r(y%2===1),y===3){var b=this.m.add(new o(1)).iushrn(2);return this.pow(d,b)}for(var g=this.m.subn(1),A=0;!g.isZero()&&g.andln(1)===0;)A++,g.iushrn(1);r(!g.isZero());var E=new o(1).toRed(this),w=E.redNeg(),_=this.m.subn(1).iushrn(1),p=this.m.bitLength();for(p=new o(2*p*p).toRed(this);this.pow(p,_).cmp(w)!==0;)p.redIAdd(w);for(var I=this.pow(p,g),C=this.pow(d,g.addn(1).iushrn(1)),j=this.pow(d,g),U=A;j.cmp(E)!==0;){for(var D=j,z=0;D.cmp(E)!==0;z++)D=D.redSqr();r(z<U);var q=this.pow(I,new o(1).iushln(U-z-1));C=C.redMul(q),I=q.redSqr(),j=j.redMul(I),U=z}return C},$.prototype.invm=function(d){var y=d._invmp(this.m);return y.negative!==0?(y.negative=0,this.imod(y).redNeg()):this.imod(y)},$.prototype.pow=function(d,y){if(y.isZero())return new o(1).toRed(this);if(y.cmpn(1)===0)return d.clone();var b=4,g=new Array(1<<b);g[0]=new o(1).toRed(this),g[1]=d;for(var A=2;A<g.length;A++)g[A]=this.mul(g[A-1],d);var E=g[0],w=0,_=0,p=y.bitLength()%26;for(p===0&&(p=26),A=y.length-1;A>=0;A--){for(var I=y.words[A],C=p-1;C>=0;C--){var j=I>>C&1;if(E!==g[0]&&(E=this.sqr(E)),j===0&&w===0){_=0;continue}w<<=1,w|=j,_++,!(_!==b&&(A!==0||C!==0))&&(E=this.mul(E,g[w]),_=0,w=0)}p=26}return E},$.prototype.convertTo=function(d){var y=d.umod(this.m);return y===d?y.clone():y},$.prototype.convertFrom=function(d){var y=d.clone();return y.red=null,y},o.mont=function(d){return new k(d)};function k(v){$.call(this,v),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}n(k,$),k.prototype.convertTo=function(d){return this.imod(d.ushln(this.shift))},k.prototype.convertFrom=function(d){var y=this.imod(d.mul(this.rinv));return y.red=null,y},k.prototype.imul=function(d,y){if(d.isZero()||y.isZero())return d.words[0]=0,d.length=1,d;var b=d.imul(y),g=b.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=b.isub(g).iushrn(this.shift),E=A;return A.cmp(this.m)>=0?E=A.isub(this.m):A.cmpn(0)<0&&(E=A.iadd(this.m)),E._forceRed(this)},k.prototype.mul=function(d,y){if(d.isZero()||y.isZero())return new o(0)._forceRed(this);var b=d.mul(y),g=b.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=b.isub(g).iushrn(this.shift),E=A;return A.cmp(this.m)>=0?E=A.isub(this.m):A.cmpn(0)<0&&(E=A.iadd(this.m)),E._forceRed(this)},k.prototype.invm=function(d){var y=this.imod(d._invmp(this.m).mul(this.r2));return y._forceRed(this)}})(typeof w3>"u"||w3,DM)});var ys=G((oet,KM)=>{KM.exports=zM;function zM(t,e){if(!t)throw new Error(e||"Assertion failed")}zM.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)}});var E3=G(GM=>{"use strict";var ug=GM;function woe(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t!="string"){for(var n=0;n<t.length;n++)r[n]=t[n]|0;return r}if(e==="hex"){t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t);for(var n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}else for(var n=0;n<t.length;n++){var o=t.charCodeAt(n),i=o>>8,a=o&255;i?r.push(i,a):r.push(a)}return r}ug.toArray=woe;function qM(t){return t.length===1?"0"+t:t}ug.zero2=qM;function HM(t){for(var e="",r=0;r<t.length;r++)e+=qM(t[r].toString(16));return e}ug.toHex=HM;ug.encode=function(e,r){return r==="hex"?HM(e):e}});var gn=G(WM=>{"use strict";var mo=WM,Eoe=ai(),Aoe=ys(),dg=E3();mo.assert=Aoe;mo.toArray=dg.toArray;mo.zero2=dg.zero2;mo.toHex=dg.toHex;mo.encode=dg.encode;function _oe(t,e,r){var n=new Array(Math.max(t.bitLength(),r)+1),o;for(o=0;o<n.length;o+=1)n[o]=0;var i=1<<e+1,a=t.clone();for(o=0;o<n.length;o++){var s,c=a.andln(i-1);a.isOdd()?(c>(i>>1)-1?s=(i>>1)-c:s=c,a.isubn(s)):s=0,n[o]=s,a.iushrn(1)}return n}mo.getNAF=_oe;function Soe(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n=0,o=0,i;t.cmpn(-n)>0||e.cmpn(-o)>0;){var a=t.andln(3)+n&3,s=e.andln(3)+o&3;a===3&&(a=-1),s===3&&(s=-1);var c;(a&1)===0?c=0:(i=t.andln(7)+n&7,(i===3||i===5)&&s===2?c=-a:c=a),r[0].push(c);var u;(s&1)===0?u=0:(i=e.andln(7)+o&7,(i===3||i===5)&&a===2?u=-s:u=s),r[1].push(u),2*n===c+1&&(n=1-n),2*o===u+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return r}mo.getJSF=Soe;function Ioe(t,e,r){var n="_"+e;t.prototype[e]=function(){return this[n]!==void 0?this[n]:this[n]=r.call(this)}}mo.cachedProperty=Ioe;function Toe(t){return typeof t=="string"?mo.toArray(t,"hex"):t}mo.parseBytes=Toe;function Boe(t){return new Eoe(t,"hex","le")}mo.intFromLE=Boe});var VM=G(()=>{});var I3=G((fet,S3)=>{var A3;S3.exports=function(e){return A3||(A3=new bs(null)),A3.generate(e)};function bs(t){this.rand=t}S3.exports.Rand=bs;bs.prototype.generate=function(e){return this._rand(e)};bs.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var r=new Uint8Array(e),n=0;n<r.length;n++)r[n]=this.rand.getByte();return r};if(typeof self=="object")self.crypto&&self.crypto.getRandomValues?bs.prototype._rand=function(e){var r=new Uint8Array(e);return self.crypto.getRandomValues(r),r}:self.msCrypto&&self.msCrypto.getRandomValues?bs.prototype._rand=function(e){var r=new Uint8Array(e);return self.msCrypto.getRandomValues(r),r}:typeof window=="object"&&(bs.prototype._rand=function(){throw new Error("Not implemented yet")});else try{if(_3=VM(),typeof _3.randomBytes!="function")throw new Error("Not supported");bs.prototype._rand=function(e){return _3.randomBytes(e)}}catch{}var _3});var gp=G((uet,YM)=>{"use strict";var Zc=ai(),bp=gn(),lg=bp.getNAF,Ooe=bp.getJSF,pg=bp.assert;function gs(t,e){this.type=t,this.p=new Zc(e.p,16),this.red=e.prime?Zc.red(e.prime):Zc.mont(this.p),this.zero=new Zc(0).toRed(this.red),this.one=new Zc(1).toRed(this.red),this.two=new Zc(2).toRed(this.red),this.n=e.n&&new Zc(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}YM.exports=gs;gs.prototype.point=function(){throw new Error("Not implemented")};gs.prototype.validate=function(){throw new Error("Not implemented")};gs.prototype._fixedNafMul=function(e,r){pg(e.precomputed);var n=e._getDoubles(),o=lg(r,1,this._bitLength),i=(1<<n.step+1)-(n.step%2===0?2:1);i/=3;var a=[],s,c;for(s=0;s<o.length;s+=n.step){c=0;for(var u=s+n.step-1;u>=s;u--)c=(c<<1)+o[u];a.push(c)}for(var f=this.jpoint(null,null,null),l=this.jpoint(null,null,null),h=i;h>0;h--){for(s=0;s<a.length;s++)c=a[s],c===h?l=l.mixedAdd(n.points[s]):c===-h&&(l=l.mixedAdd(n.points[s].neg()));f=f.add(l)}return f.toP()};gs.prototype._wnafMul=function(e,r){var n=4,o=e._getNAFPoints(n);n=o.wnd;for(var i=o.points,a=lg(r,n,this._bitLength),s=this.jpoint(null,null,null),c=a.length-1;c>=0;c--){for(var u=0;c>=0&&a[c]===0;c--)u++;if(c>=0&&u++,s=s.dblp(u),c<0)break;var f=a[c];pg(f!==0),e.type==="affine"?f>0?s=s.mixedAdd(i[f-1>>1]):s=s.mixedAdd(i[-f-1>>1].neg()):f>0?s=s.add(i[f-1>>1]):s=s.add(i[-f-1>>1].neg())}return e.type==="affine"?s.toP():s};gs.prototype._wnafMulAdd=function(e,r,n,o,i){var a=this._wnafT1,s=this._wnafT2,c=this._wnafT3,u=0,f,l,h;for(f=0;f<o;f++){h=r[f];var m=h._getNAFPoints(e);a[f]=m.wnd,s[f]=m.points}for(f=o-1;f>=1;f-=2){var x=f-1,S=f;if(a[x]!==1||a[S]!==1){c[x]=lg(n[x],a[x],this._bitLength),c[S]=lg(n[S],a[S],this._bitLength),u=Math.max(c[x].length,u),u=Math.max(c[S].length,u);continue}var O=[r[x],null,null,r[S]];r[x].y.cmp(r[S].y)===0?(O[1]=r[x].add(r[S]),O[2]=r[x].toJ().mixedAdd(r[S].neg())):r[x].y.cmp(r[S].y.redNeg())===0?(O[1]=r[x].toJ().mixedAdd(r[S]),O[2]=r[x].add(r[S].neg())):(O[1]=r[x].toJ().mixedAdd(r[S]),O[2]=r[x].toJ().mixedAdd(r[S].neg()));var P=[-3,-1,-5,-7,0,7,5,1,3],F=Ooe(n[x],n[S]);for(u=Math.max(F[0].length,u),c[x]=new Array(u),c[S]=new Array(u),l=0;l<u;l++){var B=F[0][l]|0,R=F[1][l]|0;c[x][l]=P[(B+1)*3+(R+1)],c[S][l]=0,s[x]=O}}var L=this.jpoint(null,null,null),T=this._wnafT4;for(f=u;f>=0;f--){for(var M=0;f>=0;){var $=!0;for(l=0;l<o;l++)T[l]=c[l][f]|0,T[l]!==0&&($=!1);if(!$)break;M++,f--}if(f>=0&&M++,L=L.dblp(M),f<0)break;for(l=0;l<o;l++){var k=T[l];k!==0&&(k>0?h=s[l][k-1>>1]:k<0&&(h=s[l][-k-1>>1].neg()),h.type==="affine"?L=L.mixedAdd(h):L=L.add(h))}}for(f=0;f<o;f++)s[f]=null;return i?L:L.toP()};function Dn(t,e){this.curve=t,this.type=e,this.precomputed=null}gs.BasePoint=Dn;Dn.prototype.eq=function(){throw new Error("Not implemented")};Dn.prototype.validate=function(){return this.curve.validate(this)};gs.prototype.decodePoint=function(e,r){e=bp.toArray(e,r);var n=this.p.byteLength();if((e[0]===4||e[0]===6||e[0]===7)&&e.length-1===2*n){e[0]===6?pg(e[e.length-1]%2===0):e[0]===7&&pg(e[e.length-1]%2===1);var o=this.point(e.slice(1,1+n),e.slice(1+n,1+2*n));return o}else if((e[0]===2||e[0]===3)&&e.length-1===n)return this.pointFromX(e.slice(1,1+n),e[0]===3);throw new Error("Unknown point format")};Dn.prototype.encodeCompressed=function(e){return this.encode(e,!0)};Dn.prototype._encode=function(e){var r=this.curve.p.byteLength(),n=this.getX().toArray("be",r);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",r))};Dn.prototype.encode=function(e,r){return bp.encode(this._encode(r),e)};Dn.prototype.precompute=function(e){if(this.precomputed)return this;var r={doubles:null,naf:null,beta:null};return r.naf=this._getNAFPoints(8),r.doubles=this._getDoubles(4,e),r.beta=this._getBeta(),this.precomputed=r,this};Dn.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var r=this.precomputed.doubles;return r?r.points.length>=Math.ceil((e.bitLength()+1)/r.step):!1};Dn.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],o=this,i=0;i<r;i+=e){for(var a=0;a<e;a++)o=o.dbl();n.push(o)}return{step:e,points:n}};Dn.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var r=[this],n=(1<<e)-1,o=n===1?null:this.dbl(),i=1;i<n;i++)r[i]=r[i-1].add(o);return{wnd:e,points:r}};Dn.prototype._getBeta=function(){return null};Dn.prototype.dblp=function(e){for(var r=this,n=0;n<e;n++)r=r.dbl();return r}});var vp=G((det,T3)=>{typeof Object.create=="function"?T3.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:T3.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}}});var JM=G((pet,ZM)=>{"use strict";var Poe=gn(),tt=ai(),B3=vp(),Md=gp(),Roe=Poe.assert;function zn(t){Md.call(this,"short",t),this.a=new tt(t.a,16).toRed(this.red),this.b=new tt(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}B3(zn,Md);ZM.exports=zn;zn.prototype._getEndomorphism=function(e){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var r,n;if(e.beta)r=new tt(e.beta,16).toRed(this.red);else{var o=this._getEndoRoots(this.p);r=o[0].cmp(o[1])<0?o[0]:o[1],r=r.toRed(this.red)}if(e.lambda)n=new tt(e.lambda,16);else{var i=this._getEndoRoots(this.n);this.g.mul(i[0]).x.cmp(this.g.x.redMul(r))===0?n=i[0]:(n=i[1],Roe(this.g.mul(n).x.cmp(this.g.x.redMul(r))===0))}var a;return e.basis?a=e.basis.map(function(s){return{a:new tt(s.a,16),b:new tt(s.b,16)}}):a=this._getEndoBasis(n),{beta:r,lambda:n,basis:a}}};zn.prototype._getEndoRoots=function(e){var r=e===this.p?this.red:tt.mont(e),n=new tt(2).toRed(r).redInvm(),o=n.redNeg(),i=new tt(3).toRed(r).redNeg().redSqrt().redMul(n),a=o.redAdd(i).fromRed(),s=o.redSub(i).fromRed();return[a,s]};zn.prototype._getEndoBasis=function(e){for(var r=this.n.ushrn(Math.floor(this.n.bitLength()/2)),n=e,o=this.n.clone(),i=new tt(1),a=new tt(0),s=new tt(0),c=new tt(1),u,f,l,h,m,x,S,O=0,P,F;n.cmpn(0)!==0;){var B=o.div(n);P=o.sub(B.mul(n)),F=s.sub(B.mul(i));var R=c.sub(B.mul(a));if(!l&&P.cmp(r)<0)u=S.neg(),f=i,l=P.neg(),h=F;else if(l&&++O===2)break;S=P,o=n,n=P,s=i,i=F,c=a,a=R}m=P.neg(),x=F;var L=l.sqr().add(h.sqr()),T=m.sqr().add(x.sqr());return T.cmp(L)>=0&&(m=u,x=f),l.negative&&(l=l.neg(),h=h.neg()),m.negative&&(m=m.neg(),x=x.neg()),[{a:l,b:h},{a:m,b:x}]};zn.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],o=r[1],i=o.b.mul(e).divRound(this.n),a=n.b.neg().mul(e).divRound(this.n),s=i.mul(n.a),c=a.mul(o.a),u=i.mul(n.b),f=a.mul(o.b),l=e.sub(s).sub(c),h=u.add(f).neg();return{k1:l,k2:h}};zn.prototype.pointFromX=function(e,r){e=new tt(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),o=n.redSqrt();if(o.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var i=o.fromRed().isOdd();return(r&&!i||!r&&i)&&(o=o.redNeg()),this.point(e,o)};zn.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,n=e.y,o=this.a.redMul(r),i=r.redSqr().redMul(r).redIAdd(o).redIAdd(this.b);return n.redSqr().redISub(i).cmpn(0)===0};zn.prototype._endoWnafMulAdd=function(e,r,n){for(var o=this._endoWnafT1,i=this._endoWnafT2,a=0;a<e.length;a++){var s=this._endoSplit(r[a]),c=e[a],u=c._getBeta();s.k1.negative&&(s.k1.ineg(),c=c.neg(!0)),s.k2.negative&&(s.k2.ineg(),u=u.neg(!0)),o[a*2]=c,o[a*2+1]=u,i[a*2]=s.k1,i[a*2+1]=s.k2}for(var f=this._wnafMulAdd(1,o,i,a*2,n),l=0;l<a*2;l++)o[l]=null,i[l]=null;return f};function Kt(t,e,r,n){Md.BasePoint.call(this,t,"affine"),e===null&&r===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new tt(e,16),this.y=new tt(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}B3(Kt,Md.BasePoint);zn.prototype.point=function(e,r,n){return new Kt(this,e,r,n)};zn.prototype.pointFromJSON=function(e,r){return Kt.fromJSON(this,e,r)};Kt.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var r=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var n=this.curve,o=function(i){return n.point(i.x.redMul(n.endo.beta),i.y)};e.beta=r,r.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(o)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(o)}}}return r}};Kt.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]};Kt.fromJSON=function(e,r,n){typeof r=="string"&&(r=JSON.parse(r));var o=e.point(r[0],r[1],n);if(!r[2])return o;function i(s){return e.point(s[0],s[1],n)}var a=r[2];return o.precomputed={beta:null,doubles:a.doubles&&{step:a.doubles.step,points:[o].concat(a.doubles.points.map(i))},naf:a.naf&&{wnd:a.naf.wnd,points:[o].concat(a.naf.points.map(i))}},o};Kt.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"};Kt.prototype.isInfinity=function(){return this.inf};Kt.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(e.x),o=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,o)};Kt.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),o=e.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(o),a=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,s)};Kt.prototype.getX=function(){return this.x.fromRed()};Kt.prototype.getY=function(){return this.y.fromRed()};Kt.prototype.mul=function(e){return e=new tt(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};Kt.prototype.mulAdd=function(e,r,n){var o=[this,r],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(o,i):this.curve._wnafMulAdd(1,o,i,2)};Kt.prototype.jmulAdd=function(e,r,n){var o=[this,r],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(o,i,!0):this.curve._wnafMulAdd(1,o,i,2,!0)};Kt.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Kt.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,o=function(i){return i.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(o)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(o)}}}return r};Kt.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function er(t,e,r,n){Md.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new tt(0)):(this.x=new tt(e,16),this.y=new tt(r,16),this.z=new tt(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}B3(er,Md.BasePoint);zn.prototype.jpoint=function(e,r,n){return new er(this,e,r,n)};er.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),n=this.x.redMul(r),o=this.y.redMul(r).redMul(e);return this.curve.point(n,o)};er.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};er.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),o=this.x.redMul(r),i=e.x.redMul(n),a=this.y.redMul(r.redMul(e.z)),s=e.y.redMul(n.redMul(this.z)),c=o.redSub(i),u=a.redSub(s);if(c.cmpn(0)===0)return u.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var f=c.redSqr(),l=f.redMul(c),h=o.redMul(f),m=u.redSqr().redIAdd(l).redISub(h).redISub(h),x=u.redMul(h.redISub(m)).redISub(a.redMul(l)),S=this.z.redMul(e.z).redMul(c);return this.curve.jpoint(m,x,S)};er.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,o=e.x.redMul(r),i=this.y,a=e.y.redMul(r).redMul(this.z),s=n.redSub(o),c=i.redSub(a);if(s.cmpn(0)===0)return c.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),f=u.redMul(s),l=n.redMul(u),h=c.redSqr().redIAdd(f).redISub(l).redISub(l),m=c.redMul(l.redISub(h)).redISub(i.redMul(f)),x=this.z.redMul(s);return this.curve.jpoint(h,m,x)};er.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var n=this;for(r=0;r<e;r++)n=n.dbl();return n}var o=this.curve.a,i=this.curve.tinv,a=this.x,s=this.y,c=this.z,u=c.redSqr().redSqr(),f=s.redAdd(s);for(r=0;r<e;r++){var l=a.redSqr(),h=f.redSqr(),m=h.redSqr(),x=l.redAdd(l).redIAdd(l).redIAdd(o.redMul(u)),S=a.redMul(h),O=x.redSqr().redISub(S.redAdd(S)),P=S.redISub(O),F=x.redMul(P);F=F.redIAdd(F).redISub(m);var B=f.redMul(c);r+1<e&&(u=u.redMul(m)),a=O,c=B,f=F}return this.curve.jpoint(a,f.redMul(i),c)};er.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()};er.prototype._zeroDbl=function(){var e,r,n;if(this.zOne){var o=this.x.redSqr(),i=this.y.redSqr(),a=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(o).redISub(a);s=s.redIAdd(s);var c=o.redAdd(o).redIAdd(o),u=c.redSqr().redISub(s).redISub(s),f=a.redIAdd(a);f=f.redIAdd(f),f=f.redIAdd(f),e=u,r=c.redMul(s.redISub(u)).redISub(f),n=this.y.redAdd(this.y)}else{var l=this.x.redSqr(),h=this.y.redSqr(),m=h.redSqr(),x=this.x.redAdd(h).redSqr().redISub(l).redISub(m);x=x.redIAdd(x);var S=l.redAdd(l).redIAdd(l),O=S.redSqr(),P=m.redIAdd(m);P=P.redIAdd(P),P=P.redIAdd(P),e=O.redISub(x).redISub(x),r=S.redMul(x.redISub(e)).redISub(P),n=this.y.redMul(this.z),n=n.redIAdd(n)}return this.curve.jpoint(e,r,n)};er.prototype._threeDbl=function(){var e,r,n;if(this.zOne){var o=this.x.redSqr(),i=this.y.redSqr(),a=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(o).redISub(a);s=s.redIAdd(s);var c=o.redAdd(o).redIAdd(o).redIAdd(this.curve.a),u=c.redSqr().redISub(s).redISub(s);e=u;var f=a.redIAdd(a);f=f.redIAdd(f),f=f.redIAdd(f),r=c.redMul(s.redISub(u)).redISub(f),n=this.y.redAdd(this.y)}else{var l=this.z.redSqr(),h=this.y.redSqr(),m=this.x.redMul(h),x=this.x.redSub(l).redMul(this.x.redAdd(l));x=x.redAdd(x).redIAdd(x);var S=m.redIAdd(m);S=S.redIAdd(S);var O=S.redAdd(S);e=x.redSqr().redISub(O),n=this.y.redAdd(this.z).redSqr().redISub(h).redISub(l);var P=h.redSqr();P=P.redIAdd(P),P=P.redIAdd(P),P=P.redIAdd(P),r=x.redMul(S.redISub(e)).redISub(P)}return this.curve.jpoint(e,r,n)};er.prototype._dbl=function(){var e=this.curve.a,r=this.x,n=this.y,o=this.z,i=o.redSqr().redSqr(),a=r.redSqr(),s=n.redSqr(),c=a.redAdd(a).redIAdd(a).redIAdd(e.redMul(i)),u=r.redAdd(r);u=u.redIAdd(u);var f=u.redMul(s),l=c.redSqr().redISub(f.redAdd(f)),h=f.redISub(l),m=s.redSqr();m=m.redIAdd(m),m=m.redIAdd(m),m=m.redIAdd(m);var x=c.redMul(h).redISub(m),S=n.redAdd(n).redMul(o);return this.curve.jpoint(l,x,S)};er.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),r=this.y.redSqr(),n=this.z.redSqr(),o=r.redSqr(),i=e.redAdd(e).redIAdd(e),a=i.redSqr(),s=this.x.redAdd(r).redSqr().redISub(e).redISub(o);s=s.redIAdd(s),s=s.redAdd(s).redIAdd(s),s=s.redISub(a);var c=s.redSqr(),u=o.redIAdd(o);u=u.redIAdd(u),u=u.redIAdd(u),u=u.redIAdd(u);var f=i.redIAdd(s).redSqr().redISub(a).redISub(c).redISub(u),l=r.redMul(f);l=l.redIAdd(l),l=l.redIAdd(l);var h=this.x.redMul(c).redISub(l);h=h.redIAdd(h),h=h.redIAdd(h);var m=this.y.redMul(f.redMul(u.redISub(f)).redISub(s.redMul(c)));m=m.redIAdd(m),m=m.redIAdd(m),m=m.redIAdd(m);var x=this.z.redAdd(s).redSqr().redISub(n).redISub(c);return this.curve.jpoint(h,m,x)};er.prototype.mul=function(e,r){return e=new tt(e,r),this.curve._wnafMul(this,e)};er.prototype.eq=function(e){if(e.type==="affine")return this.eq(e.toJ());if(this===e)return!0;var r=this.z.redSqr(),n=e.z.redSqr();if(this.x.redMul(n).redISub(e.x.redMul(r)).cmpn(0)!==0)return!1;var o=r.redMul(this.z),i=n.redMul(e.z);return this.y.redMul(i).redISub(e.y.redMul(o)).cmpn(0)===0};er.prototype.eqXToP=function(e){var r=this.z.redSqr(),n=e.toRed(this.curve.red).redMul(r);if(this.x.cmp(n)===0)return!0;for(var o=e.clone(),i=this.curve.redN.redMul(r);;){if(o.iadd(this.curve.n),o.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(i),this.x.cmp(n)===0)return!0}};er.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"};er.prototype.isInfinity=function(){return this.z.cmpn(0)===0}});var ek=G((het,QM)=>{"use strict";var kd=ai(),XM=vp(),hg=gp(),Coe=gn();function $d(t){hg.call(this,"mont",t),this.a=new kd(t.a,16).toRed(this.red),this.b=new kd(t.b,16).toRed(this.red),this.i4=new kd(4).toRed(this.red).redInvm(),this.two=new kd(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}XM($d,hg);QM.exports=$d;$d.prototype.validate=function(e){var r=e.normalize().x,n=r.redSqr(),o=n.redMul(r).redAdd(n.redMul(this.a)).redAdd(r),i=o.redSqrt();return i.redSqr().cmp(o)===0};function qt(t,e,r){hg.BasePoint.call(this,t,"projective"),e===null&&r===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new kd(e,16),this.z=new kd(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}XM(qt,hg.BasePoint);$d.prototype.decodePoint=function(e,r){return this.point(Coe.toArray(e,r),1)};$d.prototype.point=function(e,r){return new qt(this,e,r)};$d.prototype.pointFromJSON=function(e){return qt.fromJSON(this,e)};qt.prototype.precompute=function(){};qt.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())};qt.fromJSON=function(e,r){return new qt(e,r[0],r[1]||e.one)};qt.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};qt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};qt.prototype.dbl=function(){var e=this.x.redAdd(this.z),r=e.redSqr(),n=this.x.redSub(this.z),o=n.redSqr(),i=r.redSub(o),a=r.redMul(o),s=i.redMul(o.redAdd(this.curve.a24.redMul(i)));return this.curve.point(a,s)};qt.prototype.add=function(){throw new Error("Not supported on Montgomery curve")};qt.prototype.diffAdd=function(e,r){var n=this.x.redAdd(this.z),o=this.x.redSub(this.z),i=e.x.redAdd(e.z),a=e.x.redSub(e.z),s=a.redMul(n),c=i.redMul(o),u=r.z.redMul(s.redAdd(c).redSqr()),f=r.x.redMul(s.redISub(c).redSqr());return this.curve.point(u,f)};qt.prototype.mul=function(e){for(var r=e.clone(),n=this,o=this.curve.point(null,null),i=this,a=[];r.cmpn(0)!==0;r.iushrn(1))a.push(r.andln(1));for(var s=a.length-1;s>=0;s--)a[s]===0?(n=n.diffAdd(o,i),o=o.dbl()):(o=n.diffAdd(o,i),n=n.dbl());return o};qt.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")};qt.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")};qt.prototype.eq=function(e){return this.getX().cmp(e.getX())===0};qt.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this};qt.prototype.getX=function(){return this.normalize(),this.x.fromRed()}});var nk=G((met,rk)=>{"use strict";var Noe=gn(),fa=ai(),tk=vp(),mg=gp(),Moe=Noe.assert;function si(t){this.twisted=(t.a|0)!==1,this.mOneA=this.twisted&&(t.a|0)===-1,this.extended=this.mOneA,mg.call(this,"edwards",t),this.a=new fa(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new fa(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new fa(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),Moe(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(t.c|0)===1}tk(si,mg);rk.exports=si;si.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)};si.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)};si.prototype.jpoint=function(e,r,n,o){return this.point(e,r,n,o)};si.prototype.pointFromX=function(e,r){e=new fa(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr(),o=this.c2.redSub(this.a.redMul(n)),i=this.one.redSub(this.c2.redMul(this.d).redMul(n)),a=o.redMul(i.redInvm()),s=a.redSqrt();if(s.redSqr().redSub(a).cmp(this.zero)!==0)throw new Error("invalid point");var c=s.fromRed().isOdd();return(r&&!c||!r&&c)&&(s=s.redNeg()),this.point(e,s)};si.prototype.pointFromY=function(e,r){e=new fa(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr(),o=n.redSub(this.c2),i=n.redMul(this.d).redMul(this.c2).redSub(this.a),a=o.redMul(i.redInvm());if(a.cmp(this.zero)===0){if(r)throw new Error("invalid point");return this.point(this.zero,e)}var s=a.redSqrt();if(s.redSqr().redSub(a).cmp(this.zero)!==0)throw new Error("invalid point");return s.fromRed().isOdd()!==r&&(s=s.redNeg()),this.point(s,e)};si.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var r=e.x.redSqr(),n=e.y.redSqr(),o=r.redMul(this.a).redAdd(n),i=this.c2.redMul(this.one.redAdd(this.d.redMul(r).redMul(n)));return o.cmp(i)===0};function ze(t,e,r,n,o){mg.BasePoint.call(this,t,"projective"),e===null&&r===null&&n===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new fa(e,16),this.y=new fa(r,16),this.z=n?new fa(n,16):this.curve.one,this.t=o&&new fa(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}tk(ze,mg.BasePoint);si.prototype.pointFromJSON=function(e){return ze.fromJSON(this,e)};si.prototype.point=function(e,r,n,o){return new ze(this,e,r,n,o)};ze.fromJSON=function(e,r){return new ze(e,r[0],r[1],r[2])};ze.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};ze.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};ze.prototype._extDbl=function(){var e=this.x.redSqr(),r=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var o=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(r),a=o.redAdd(r),s=a.redSub(n),c=o.redSub(r),u=i.redMul(s),f=a.redMul(c),l=i.redMul(c),h=s.redMul(a);return this.curve.point(u,f,h,l)};ze.prototype._projDbl=function(){var e=this.x.redAdd(this.y).redSqr(),r=this.x.redSqr(),n=this.y.redSqr(),o,i,a,s,c,u;if(this.curve.twisted){s=this.curve._mulA(r);var f=s.redAdd(n);this.zOne?(o=e.redSub(r).redSub(n).redMul(f.redSub(this.curve.two)),i=f.redMul(s.redSub(n)),a=f.redSqr().redSub(f).redSub(f)):(c=this.z.redSqr(),u=f.redSub(c).redISub(c),o=e.redSub(r).redISub(n).redMul(u),i=f.redMul(s.redSub(n)),a=f.redMul(u))}else s=r.redAdd(n),c=this.curve._mulC(this.z).redSqr(),u=s.redSub(c).redSub(c),o=this.curve._mulC(e.redISub(s)).redMul(u),i=this.curve._mulC(s).redMul(r.redISub(n)),a=s.redMul(u);return this.curve.point(o,i,a)};ze.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()};ze.prototype._extAdd=function(e){var r=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),o=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),a=n.redSub(r),s=i.redSub(o),c=i.redAdd(o),u=n.redAdd(r),f=a.redMul(s),l=c.redMul(u),h=a.redMul(u),m=s.redMul(c);return this.curve.point(f,l,m,h)};ze.prototype._projAdd=function(e){var r=this.z.redMul(e.z),n=r.redSqr(),o=this.x.redMul(e.x),i=this.y.redMul(e.y),a=this.curve.d.redMul(o).redMul(i),s=n.redSub(a),c=n.redAdd(a),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(i),f=r.redMul(s).redMul(u),l,h;return this.curve.twisted?(l=r.redMul(c).redMul(i.redSub(this.curve._mulA(o))),h=s.redMul(c)):(l=r.redMul(c).redMul(i.redSub(o)),h=this.curve._mulC(s).redMul(c)),this.curve.point(f,l,h)};ze.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)};ze.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)};ze.prototype.mulAdd=function(e,r,n){return this.curve._wnafMulAdd(1,[this,r],[e,n],2,!1)};ze.prototype.jmulAdd=function(e,r,n){return this.curve._wnafMulAdd(1,[this,r],[e,n],2,!0)};ze.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this};ze.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};ze.prototype.getX=function(){return this.normalize(),this.x.fromRed()};ze.prototype.getY=function(){return this.normalize(),this.y.fromRed()};ze.prototype.eq=function(e){return this===e||this.getX().cmp(e.getX())===0&&this.getY().cmp(e.getY())===0};ze.prototype.eqXToP=function(e){var r=e.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(r)===0)return!0;for(var n=e.clone(),o=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(o),this.x.cmp(r)===0)return!0}};ze.prototype.toP=ze.prototype.normalize;ze.prototype.mixedAdd=ze.prototype.add});var O3=G(ok=>{"use strict";var yg=ok;yg.base=gp();yg.short=JM();yg.mont=ek();yg.edwards=nk()});var yo=G(Me=>{"use strict";var koe=ys(),$oe=vp();Me.inherits=$oe;function Foe(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function Loe(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),o=0;o<t.length;o+=2)r.push(parseInt(t[o]+t[o+1],16))}else for(var n=0,o=0;o<t.length;o++){var i=t.charCodeAt(o);i<128?r[n++]=i:i<2048?(r[n++]=i>>6|192,r[n++]=i&63|128):Foe(t,o)?(i=65536+((i&1023)<<10)+(t.charCodeAt(++o)&1023),r[n++]=i>>18|240,r[n++]=i>>12&63|128,r[n++]=i>>6&63|128,r[n++]=i&63|128):(r[n++]=i>>12|224,r[n++]=i>>6&63|128,r[n++]=i&63|128)}else for(o=0;o<t.length;o++)r[o]=t[o]|0;return r}Me.toArray=Loe;function joe(t){for(var e="",r=0;r<t.length;r++)e+=ak(t[r].toString(16));return e}Me.toHex=joe;function ik(t){var e=t>>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}Me.htonl=ik;function Uoe(t,e){for(var r="",n=0;n<t.length;n++){var o=t[n];e==="little"&&(o=ik(o)),r+=sk(o.toString(16))}return r}Me.toHex32=Uoe;function ak(t){return t.length===1?"0"+t:t}Me.zero2=ak;function sk(t){return t.length===7?"0"+t:t.length===6?"00"+t:t.length===5?"000"+t:t.length===4?"0000"+t:t.length===3?"00000"+t:t.length===2?"000000"+t:t.length===1?"0000000"+t:t}Me.zero8=sk;function Doe(t,e,r,n){var o=r-e;koe(o%4===0);for(var i=new Array(o/4),a=0,s=e;a<i.length;a++,s+=4){var c;n==="big"?c=t[s]<<24|t[s+1]<<16|t[s+2]<<8|t[s+3]:c=t[s+3]<<24|t[s+2]<<16|t[s+1]<<8|t[s],i[a]=c>>>0}return i}Me.join32=Doe;function zoe(t,e){for(var r=new Array(t.length*4),n=0,o=0;n<t.length;n++,o+=4){var i=t[n];e==="big"?(r[o]=i>>>24,r[o+1]=i>>>16&255,r[o+2]=i>>>8&255,r[o+3]=i&255):(r[o+3]=i>>>24,r[o+2]=i>>>16&255,r[o+1]=i>>>8&255,r[o]=i&255)}return r}Me.split32=zoe;function Koe(t,e){return t>>>e|t<<32-e}Me.rotr32=Koe;function qoe(t,e){return t<<e|t>>>32-e}Me.rotl32=qoe;function Hoe(t,e){return t+e>>>0}Me.sum32=Hoe;function Goe(t,e,r){return t+e+r>>>0}Me.sum32_3=Goe;function Woe(t,e,r,n){return t+e+r+n>>>0}Me.sum32_4=Woe;function Voe(t,e,r,n,o){return t+e+r+n+o>>>0}Me.sum32_5=Voe;function Yoe(t,e,r,n){var o=t[e],i=t[e+1],a=n+i>>>0,s=(a<n?1:0)+r+o;t[e]=s>>>0,t[e+1]=a}Me.sum64=Yoe;function Zoe(t,e,r,n){var o=e+n>>>0,i=(o<e?1:0)+t+r;return i>>>0}Me.sum64_hi=Zoe;function Joe(t,e,r,n){var o=e+n;return o>>>0}Me.sum64_lo=Joe;function Xoe(t,e,r,n,o,i,a,s){var c=0,u=e;u=u+n>>>0,c+=u<e?1:0,u=u+i>>>0,c+=u<i?1:0,u=u+s>>>0,c+=u<s?1:0;var f=t+r+o+a+c;return f>>>0}Me.sum64_4_hi=Xoe;function Qoe(t,e,r,n,o,i,a,s){var c=e+n+i+s;return c>>>0}Me.sum64_4_lo=Qoe;function eie(t,e,r,n,o,i,a,s,c,u){var f=0,l=e;l=l+n>>>0,f+=l<e?1:0,l=l+i>>>0,f+=l<i?1:0,l=l+s>>>0,f+=l<s?1:0,l=l+u>>>0,f+=l<u?1:0;var h=t+r+o+a+c+f;return h>>>0}Me.sum64_5_hi=eie;function tie(t,e,r,n,o,i,a,s,c,u){var f=e+n+i+s+u;return f>>>0}Me.sum64_5_lo=tie;function rie(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}Me.rotr64_hi=rie;function nie(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Me.rotr64_lo=nie;function oie(t,e,r){return t>>>r}Me.shr64_hi=oie;function iie(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Me.shr64_lo=iie});var Fd=G(fk=>{"use strict";var ck=yo(),aie=ys();function bg(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}fk.BlockHash=bg;bg.prototype.update=function(e,r){if(e=ck.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=ck.join32(e,0,e.length-n,this.endian);for(var o=0;o<e.length;o+=this._delta32)this._update(e,o,o+this._delta32)}return this};bg.prototype.digest=function(e){return this.update(this._pad()),aie(this.pending===null),this._digest(e)};bg.prototype._pad=function(){var e=this.pendingTotal,r=this._delta8,n=r-(e+this.padLength)%r,o=new Array(n+this.padLength);o[0]=128;for(var i=1;i<n;i++)o[i]=0;if(e<<=3,this.endian==="big"){for(var a=8;a<this.padLength;a++)o[i++]=0;o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=e>>>24&255,o[i++]=e>>>16&255,o[i++]=e>>>8&255,o[i++]=e&255}else for(o[i++]=e&255,o[i++]=e>>>8&255,o[i++]=e>>>16&255,o[i++]=e>>>24&255,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,a=8;a<this.padLength;a++)o[i++]=0;return o}});var P3=G(ua=>{"use strict";var sie=yo(),ci=sie.rotr32;function cie(t,e,r,n){if(t===0)return uk(e,r,n);if(t===1||t===3)return lk(e,r,n);if(t===2)return dk(e,r,n)}ua.ft_1=cie;function uk(t,e,r){return t&e^~t&r}ua.ch32=uk;function dk(t,e,r){return t&e^t&r^e&r}ua.maj32=dk;function lk(t,e,r){return t^e^r}ua.p32=lk;function fie(t){return ci(t,2)^ci(t,13)^ci(t,22)}ua.s0_256=fie;function uie(t){return ci(t,6)^ci(t,11)^ci(t,25)}ua.s1_256=uie;function die(t){return ci(t,7)^ci(t,18)^t>>>3}ua.g0_256=die;function lie(t){return ci(t,17)^ci(t,19)^t>>>10}ua.g1_256=lie});var mk=G((xet,hk)=>{"use strict";var Ld=yo(),pie=Fd(),hie=P3(),R3=Ld.rotl32,xp=Ld.sum32,mie=Ld.sum32_5,yie=hie.ft_1,pk=pie.BlockHash,bie=[1518500249,1859775393,2400959708,3395469782];function fi(){if(!(this instanceof fi))return new fi;pk.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Ld.inherits(fi,pk);hk.exports=fi;fi.blockSize=512;fi.outSize=160;fi.hmacStrength=80;fi.padLength=64;fi.prototype._update=function(e,r){for(var n=this.W,o=0;o<16;o++)n[o]=e[r+o];for(;o<n.length;o++)n[o]=R3(n[o-3]^n[o-8]^n[o-14]^n[o-16],1);var i=this.h[0],a=this.h[1],s=this.h[2],c=this.h[3],u=this.h[4];for(o=0;o<n.length;o++){var f=~~(o/20),l=mie(R3(i,5),yie(f,a,s,c),u,n[o],bie[f]);u=c,c=s,s=R3(a,30),a=i,i=l}this.h[0]=xp(this.h[0],i),this.h[1]=xp(this.h[1],a),this.h[2]=xp(this.h[2],s),this.h[3]=xp(this.h[3],c),this.h[4]=xp(this.h[4],u)};fi.prototype._digest=function(e){return e==="hex"?Ld.toHex32(this.h,"big"):Ld.split32(this.h,"big")}});var C3=G((wet,bk)=>{"use strict";var jd=yo(),gie=Fd(),Ud=P3(),vie=ys(),bo=jd.sum32,xie=jd.sum32_4,wie=jd.sum32_5,Eie=Ud.ch32,Aie=Ud.maj32,_ie=Ud.s0_256,Sie=Ud.s1_256,Iie=Ud.g0_256,Tie=Ud.g1_256,yk=gie.BlockHash,Bie=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function ui(){if(!(this instanceof ui))return new ui;yk.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Bie,this.W=new Array(64)}jd.inherits(ui,yk);bk.exports=ui;ui.blockSize=512;ui.outSize=256;ui.hmacStrength=192;ui.padLength=64;ui.prototype._update=function(e,r){for(var n=this.W,o=0;o<16;o++)n[o]=e[r+o];for(;o<n.length;o++)n[o]=xie(Tie(n[o-2]),n[o-7],Iie(n[o-15]),n[o-16]);var i=this.h[0],a=this.h[1],s=this.h[2],c=this.h[3],u=this.h[4],f=this.h[5],l=this.h[6],h=this.h[7];for(vie(this.k.length===n.length),o=0;o<n.length;o++){var m=wie(h,Sie(u),Eie(u,f,l),this.k[o],n[o]),x=bo(_ie(i),Aie(i,a,s));h=l,l=f,f=u,u=bo(c,m),c=s,s=a,a=i,i=bo(m,x)}this.h[0]=bo(this.h[0],i),this.h[1]=bo(this.h[1],a),this.h[2]=bo(this.h[2],s),this.h[3]=bo(this.h[3],c),this.h[4]=bo(this.h[4],u),this.h[5]=bo(this.h[5],f),this.h[6]=bo(this.h[6],l),this.h[7]=bo(this.h[7],h)};ui.prototype._digest=function(e){return e==="hex"?jd.toHex32(this.h,"big"):jd.split32(this.h,"big")}});var xk=G((Eet,vk)=>{"use strict";var N3=yo(),gk=C3();function da(){if(!(this instanceof da))return new da;gk.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}N3.inherits(da,gk);vk.exports=da;da.blockSize=512;da.outSize=224;da.hmacStrength=192;da.padLength=64;da.prototype._digest=function(e){return e==="hex"?N3.toHex32(this.h.slice(0,7),"big"):N3.split32(this.h.slice(0,7),"big")}});var $3=G((Aet,_k)=>{"use strict";var Hr=yo(),Oie=Fd(),Pie=ys(),di=Hr.rotr64_hi,li=Hr.rotr64_lo,wk=Hr.shr64_hi,Ek=Hr.shr64_lo,vs=Hr.sum64,M3=Hr.sum64_hi,k3=Hr.sum64_lo,Rie=Hr.sum64_4_hi,Cie=Hr.sum64_4_lo,Nie=Hr.sum64_5_hi,Mie=Hr.sum64_5_lo,Ak=Oie.BlockHash,kie=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function go(){if(!(this instanceof go))return new go;Ak.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=kie,this.W=new Array(160)}Hr.inherits(go,Ak);_k.exports=go;go.blockSize=1024;go.outSize=512;go.hmacStrength=192;go.padLength=128;go.prototype._prepareBlock=function(e,r){for(var n=this.W,o=0;o<32;o++)n[o]=e[r+o];for(;o<n.length;o+=2){var i=Gie(n[o-4],n[o-3]),a=Wie(n[o-4],n[o-3]),s=n[o-14],c=n[o-13],u=qie(n[o-30],n[o-29]),f=Hie(n[o-30],n[o-29]),l=n[o-32],h=n[o-31];n[o]=Rie(i,a,s,c,u,f,l,h),n[o+1]=Cie(i,a,s,c,u,f,l,h)}};go.prototype._update=function(e,r){this._prepareBlock(e,r);var n=this.W,o=this.h[0],i=this.h[1],a=this.h[2],s=this.h[3],c=this.h[4],u=this.h[5],f=this.h[6],l=this.h[7],h=this.h[8],m=this.h[9],x=this.h[10],S=this.h[11],O=this.h[12],P=this.h[13],F=this.h[14],B=this.h[15];Pie(this.k.length===n.length);for(var R=0;R<n.length;R+=2){var L=F,T=B,M=zie(h,m),$=Kie(h,m),k=$ie(h,m,x,S,O,P),v=Fie(h,m,x,S,O,P),d=this.k[R],y=this.k[R+1],b=n[R],g=n[R+1],A=Nie(L,T,M,$,k,v,d,y,b,g),E=Mie(L,T,M,$,k,v,d,y,b,g);L=Uie(o,i),T=Die(o,i),M=Lie(o,i,a,s,c,u),$=jie(o,i,a,s,c,u);var w=M3(L,T,M,$),_=k3(L,T,M,$);F=O,B=P,O=x,P=S,x=h,S=m,h=M3(f,l,A,E),m=k3(l,l,A,E),f=c,l=u,c=a,u=s,a=o,s=i,o=M3(A,E,w,_),i=k3(A,E,w,_)}vs(this.h,0,o,i),vs(this.h,2,a,s),vs(this.h,4,c,u),vs(this.h,6,f,l),vs(this.h,8,h,m),vs(this.h,10,x,S),vs(this.h,12,O,P),vs(this.h,14,F,B)};go.prototype._digest=function(e){return e==="hex"?Hr.toHex32(this.h,"big"):Hr.split32(this.h,"big")};function $ie(t,e,r,n,o){var i=t&r^~t&o;return i<0&&(i+=4294967296),i}function Fie(t,e,r,n,o,i){var a=e&n^~e&i;return a<0&&(a+=4294967296),a}function Lie(t,e,r,n,o){var i=t&r^t&o^r&o;return i<0&&(i+=4294967296),i}function jie(t,e,r,n,o,i){var a=e&n^e&i^n&i;return a<0&&(a+=4294967296),a}function Uie(t,e){var r=di(t,e,28),n=di(e,t,2),o=di(e,t,7),i=r^n^o;return i<0&&(i+=4294967296),i}function Die(t,e){var r=li(t,e,28),n=li(e,t,2),o=li(e,t,7),i=r^n^o;return i<0&&(i+=4294967296),i}function zie(t,e){var r=di(t,e,14),n=di(t,e,18),o=di(e,t,9),i=r^n^o;return i<0&&(i+=4294967296),i}function Kie(t,e){var r=li(t,e,14),n=li(t,e,18),o=li(e,t,9),i=r^n^o;return i<0&&(i+=4294967296),i}function qie(t,e){var r=di(t,e,1),n=di(t,e,8),o=wk(t,e,7),i=r^n^o;return i<0&&(i+=4294967296),i}function Hie(t,e){var r=li(t,e,1),n=li(t,e,8),o=Ek(t,e,7),i=r^n^o;return i<0&&(i+=4294967296),i}function Gie(t,e){var r=di(t,e,19),n=di(e,t,29),o=wk(t,e,6),i=r^n^o;return i<0&&(i+=4294967296),i}function Wie(t,e){var r=li(t,e,19),n=li(e,t,29),o=Ek(t,e,6),i=r^n^o;return i<0&&(i+=4294967296),i}});var Tk=G((_et,Ik)=>{"use strict";var F3=yo(),Sk=$3();function la(){if(!(this instanceof la))return new la;Sk.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}F3.inherits(la,Sk);Ik.exports=la;la.blockSize=1024;la.outSize=384;la.hmacStrength=192;la.padLength=128;la.prototype._digest=function(e){return e==="hex"?F3.toHex32(this.h.slice(0,12),"big"):F3.split32(this.h.slice(0,12),"big")}});var Bk=G(Dd=>{"use strict";Dd.sha1=mk();Dd.sha224=xk();Dd.sha256=C3();Dd.sha384=Tk();Dd.sha512=$3()});var Mk=G(Nk=>{"use strict";var Jc=yo(),Vie=Fd(),gg=Jc.rotl32,Ok=Jc.sum32,wp=Jc.sum32_3,Pk=Jc.sum32_4,Ck=Vie.BlockHash;function pi(){if(!(this instanceof pi))return new pi;Ck.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}Jc.inherits(pi,Ck);Nk.ripemd160=pi;pi.blockSize=512;pi.outSize=160;pi.hmacStrength=192;pi.padLength=64;pi.prototype._update=function(e,r){for(var n=this.h[0],o=this.h[1],i=this.h[2],a=this.h[3],s=this.h[4],c=n,u=o,f=i,l=a,h=s,m=0;m<80;m++){var x=Ok(gg(Pk(n,Rk(m,o,i,a),e[Jie[m]+r],Yie(m)),Qie[m]),s);n=s,s=a,a=gg(i,10),i=o,o=x,x=Ok(gg(Pk(c,Rk(79-m,u,f,l),e[Xie[m]+r],Zie(m)),eae[m]),h),c=h,h=l,l=gg(f,10),f=u,u=x}x=wp(this.h[1],i,l),this.h[1]=wp(this.h[2],a,h),this.h[2]=wp(this.h[3],s,c),this.h[3]=wp(this.h[4],n,u),this.h[4]=wp(this.h[0],o,f),this.h[0]=x};pi.prototype._digest=function(e){return e==="hex"?Jc.toHex32(this.h,"little"):Jc.split32(this.h,"little")};function Rk(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}function Yie(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function Zie(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}var Jie=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],Xie=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],Qie=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],eae=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]});var $k=G((Bet,kk)=>{"use strict";var tae=yo(),rae=ys();function zd(t,e,r){if(!(this instanceof zd))return new zd(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(tae.toArray(e,r))}kk.exports=zd;zd.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),rae(e.length<=this.blockSize);for(var r=e.length;r<this.blockSize;r++)e.push(0);for(r=0;r<e.length;r++)e[r]^=54;for(this.inner=new this.Hash().update(e),r=0;r<e.length;r++)e[r]^=106;this.outer=new this.Hash().update(e)};zd.prototype.update=function(e,r){return this.inner.update(e,r),this};zd.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}});var vg=G(Fk=>{var tr=Fk;tr.utils=yo();tr.common=Fd();tr.sha=Bk();tr.ripemd=Mk();tr.hmac=$k();tr.sha1=tr.sha.sha1;tr.sha256=tr.sha.sha256;tr.sha224=tr.sha.sha224;tr.sha384=tr.sha.sha384;tr.sha512=tr.sha.sha512;tr.ripemd160=tr.ripemd.ripemd160});var jk=G((Pet,Lk)=>{Lk.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}});var xg=G(zk=>{"use strict";var j3=zk,xs=vg(),L3=O3(),nae=gn(),Uk=nae.assert;function Dk(t){t.type==="short"?this.curve=new L3.short(t):t.type==="edwards"?this.curve=new L3.edwards(t):this.curve=new L3.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,Uk(this.g.validate(),"Invalid curve"),Uk(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}j3.PresetCurve=Dk;function ws(t,e){Object.defineProperty(j3,t,{configurable:!0,enumerable:!0,get:function(){var r=new Dk(e);return Object.defineProperty(j3,t,{configurable:!0,enumerable:!0,value:r}),r}})}ws("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:xs.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]});ws("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:xs.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]});ws("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:xs.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]});ws("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:xs.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]});ws("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:xs.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]});ws("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:xs.sha256,gRed:!1,g:["9"]});ws("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:xs.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var U3;try{U3=jk()}catch{U3=void 0}ws("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:xs.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",U3]})});var Hk=G((Cet,qk)=>{"use strict";var oae=vg(),Xc=E3(),Kk=ys();function Es(t){if(!(this instanceof Es))return new Es(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Xc.toArray(t.entropy,t.entropyEnc||"hex"),r=Xc.toArray(t.nonce,t.nonceEnc||"hex"),n=Xc.toArray(t.pers,t.persEnc||"hex");Kk(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}qk.exports=Es;Es.prototype._init=function(e,r,n){var o=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(o),this._reseed=1,this.reseedInterval=281474976710656};Es.prototype._hmac=function(){return new oae.hmac(this.hash,this.K)};Es.prototype._update=function(e){var r=this._hmac().update(this.V).update([0]);e&&(r=r.update(e)),this.K=r.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())};Es.prototype.reseed=function(e,r,n,o){typeof r!="string"&&(o=n,n=r,r=null),e=Xc.toArray(e,r),n=Xc.toArray(n,o),Kk(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};Es.prototype.generate=function(e,r,n,o){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(o=n,n=r,r=null),n&&(n=Xc.toArray(n,o||"hex"),this._update(n));for(var i=[];i.length<e;)this.V=this._hmac().update(this.V).digest(),i=i.concat(this.V);var a=i.slice(0,e);return this._update(n),this._reseed++,Xc.encode(a,r)}});var Wk=G((Net,Gk)=>{"use strict";var iae=ai(),aae=gn(),D3=aae.assert;function yr(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}Gk.exports=yr;yr.fromPublic=function(e,r,n){return r instanceof yr?r:new yr(e,{pub:r,pubEnc:n})};yr.fromPrivate=function(e,r,n){return r instanceof yr?r:new yr(e,{priv:r,privEnc:n})};yr.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}};yr.prototype.getPublic=function(e,r){return typeof e=="string"&&(r=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),r?this.pub.encode(r,e):this.pub};yr.prototype.getPrivate=function(e){return e==="hex"?this.priv.toString(16,2):this.priv};yr.prototype._importPrivate=function(e,r){this.priv=new iae(e,r||16),this.priv=this.priv.umod(this.ec.curve.n)};yr.prototype._importPublic=function(e,r){if(e.x||e.y){this.ec.curve.type==="mont"?D3(e.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&D3(e.x&&e.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(e.x,e.y);return}this.pub=this.ec.curve.decodePoint(e,r)};yr.prototype.derive=function(e){return e.validate()||D3(e.validate(),"public point not validated"),e.mul(this.priv).getX()};yr.prototype.sign=function(e,r,n){return this.ec.sign(e,this,r,n)};yr.prototype.verify=function(e,r,n){return this.ec.verify(e,r,this,void 0,n)};yr.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}});var Zk=G((Met,Yk)=>{"use strict";var wg=ai(),q3=gn(),sae=q3.assert;function Eg(t,e){if(t instanceof Eg)return t;this._importDER(t,e)||(sae(t.r&&t.s,"Signature without r or s"),this.r=new wg(t.r,16),this.s=new wg(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}Yk.exports=Eg;function cae(){this.place=0}function z3(t,e){var r=t[e.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4||t[e.place]===0)return!1;for(var o=0,i=0,a=e.place;i<n;i++,a++)o<<=8,o|=t[a],o>>>=0;return o<=127?!1:(e.place=a,o)}function Vk(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e<r;)e++;return e===0?t:t.slice(e)}Eg.prototype._importDER=function(e,r){e=q3.toArray(e,r);var n=new cae;if(e[n.place++]!==48)return!1;var o=z3(e,n);if(o===!1||o+n.place!==e.length||e[n.place++]!==2)return!1;var i=z3(e,n);if(i===!1||(e[n.place]&128)!==0)return!1;var a=e.slice(n.place,i+n.place);if(n.place+=i,e[n.place++]!==2)return!1;var s=z3(e,n);if(s===!1||e.length!==s+n.place||(e[n.place]&128)!==0)return!1;var c=e.slice(n.place,s+n.place);if(a[0]===0)if(a[1]&128)a=a.slice(1);else return!1;if(c[0]===0)if(c[1]&128)c=c.slice(1);else return!1;return this.r=new wg(a),this.s=new wg(c),this.recoveryParam=null,!0};function K3(t,e){if(e<128){t.push(e);return}var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}Eg.prototype.toDER=function(e){var r=this.r.toArray(),n=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),n[0]&128&&(n=[0].concat(n)),r=Vk(r),n=Vk(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var o=[2];K3(o,r.length),o=o.concat(r),o.push(2),K3(o,n.length);var i=o.concat(n),a=[48];return K3(a,i.length),a=a.concat(i),q3.encode(a,e)}});var Qk=G((ket,Xk)=>{"use strict";var vo=ai(),Jk=Hk(),fae=gn(),H3=xg(),uae=I3(),Qc=fae.assert,G3=Wk(),Ag=Zk();function Kn(t){if(!(this instanceof Kn))return new Kn(t);typeof t=="string"&&(Qc(Object.prototype.hasOwnProperty.call(H3,t),"Unknown curve "+t),t=H3[t]),t instanceof H3.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}Xk.exports=Kn;Kn.prototype.keyPair=function(e){return new G3(this,e)};Kn.prototype.keyFromPrivate=function(e,r){return G3.fromPrivate(this,e,r)};Kn.prototype.keyFromPublic=function(e,r){return G3.fromPublic(this,e,r)};Kn.prototype.genKeyPair=function(e){e||(e={});for(var r=new Jk({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||uae(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),o=this.n.sub(new vo(2));;){var i=new vo(r.generate(n));if(!(i.cmp(o)>0))return i.iaddn(1),this.keyFromPrivate(i)}};Kn.prototype._truncateToN=function(e,r,n){var o;if(vo.isBN(e)||typeof e=="number")e=new vo(e,16),o=e.byteLength();else if(typeof e=="object")o=e.length,e=new vo(e,16);else{var i=e.toString();o=i.length+1>>>1,e=new vo(i,16)}typeof n!="number"&&(n=o*8);var a=n-this.n.bitLength();return a>0&&(e=e.ushrn(a)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e};Kn.prototype.sign=function(e,r,n,o){if(typeof n=="object"&&(o=n,n=null),o||(o={}),typeof e!="string"&&typeof e!="number"&&!vo.isBN(e)){Qc(typeof e=="object"&&e&&typeof e.length=="number","Expected message to be an array-like, a hex string, or a BN instance"),Qc(e.length>>>0===e.length);for(var i=0;i<e.length;i++)Qc((e[i]&255)===e[i])}r=this.keyFromPrivate(r,n),e=this._truncateToN(e,!1,o.msgBitLength),Qc(!e.isNeg(),"Can not sign a negative message");var a=this.n.byteLength(),s=r.getPrivate().toArray("be",a),c=e.toArray("be",a);Qc(new vo(c).eq(e),"Can not sign message");for(var u=new Jk({hash:this.hash,entropy:s,nonce:c,pers:o.pers,persEnc:o.persEnc||"utf8"}),f=this.n.sub(new vo(1)),l=0;;l++){var h=o.k?o.k(l):new vo(u.generate(this.n.byteLength()));if(h=this._truncateToN(h,!0),!(h.cmpn(1)<=0||h.cmp(f)>=0)){var m=this.g.mul(h);if(!m.isInfinity()){var x=m.getX(),S=x.umod(this.n);if(S.cmpn(0)!==0){var O=h.invm(this.n).mul(S.mul(r.getPrivate()).iadd(e));if(O=O.umod(this.n),O.cmpn(0)!==0){var P=(m.getY().isOdd()?1:0)|(x.cmp(S)!==0?2:0);return o.canonical&&O.cmp(this.nh)>0&&(O=this.n.sub(O),P^=1),new Ag({r:S,s:O,recoveryParam:P})}}}}}};Kn.prototype.verify=function(e,r,n,o,i){i||(i={}),e=this._truncateToN(e,!1,i.msgBitLength),n=this.keyFromPublic(n,o),r=new Ag(r,"hex");var a=r.r,s=r.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0||s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var c=s.invm(this.n),u=c.mul(e).umod(this.n),f=c.mul(a).umod(this.n),l;return this.curve._maxwellTrick?(l=this.g.jmulAdd(u,n.getPublic(),f),l.isInfinity()?!1:l.eqXToP(a)):(l=this.g.mulAdd(u,n.getPublic(),f),l.isInfinity()?!1:l.getX().umod(this.n).cmp(a)===0)};Kn.prototype.recoverPubKey=function(t,e,r,n){Qc((3&r)===r,"The recovery param is more than two bits"),e=new Ag(e,n);var o=this.n,i=new vo(t),a=e.r,s=e.s,c=r&1,u=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&u)throw new Error("Unable to find sencond key candinate");u?a=this.curve.pointFromX(a.add(this.curve.n),c):a=this.curve.pointFromX(a,c);var f=e.r.invm(o),l=o.sub(i).mul(f).umod(o),h=s.mul(f).umod(o);return this.g.mulAdd(l,a,h)};Kn.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new Ag(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var o=0;o<4;o++){var i;try{i=this.recoverPubKey(t,e,o)}catch{continue}if(i.eq(r))return o}throw new Error("Unable to find valid recovery factor")}});var n$=G(($et,r$)=>{"use strict";var Ep=gn(),t$=Ep.assert,e$=Ep.parseBytes,Kd=Ep.cachedProperty;function Ht(t,e){this.eddsa=t,this._secret=e$(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=e$(e.pub)}Ht.fromPublic=function(e,r){return r instanceof Ht?r:new Ht(e,{pub:r})};Ht.fromSecret=function(e,r){return r instanceof Ht?r:new Ht(e,{secret:r})};Ht.prototype.secret=function(){return this._secret};Kd(Ht,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())});Kd(Ht,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())});Kd(Ht,"privBytes",function(){var e=this.eddsa,r=this.hash(),n=e.encodingLength-1,o=r.slice(0,e.encodingLength);return o[0]&=248,o[n]&=127,o[n]|=64,o});Kd(Ht,"priv",function(){return this.eddsa.decodeInt(this.privBytes())});Kd(Ht,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()});Kd(Ht,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)});Ht.prototype.sign=function(e){return t$(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)};Ht.prototype.verify=function(e,r){return this.eddsa.verify(e,r,this)};Ht.prototype.getSecret=function(e){return t$(this._secret,"KeyPair is public only"),Ep.encode(this.secret(),e)};Ht.prototype.getPublic=function(e){return Ep.encode(this.pubBytes(),e)};r$.exports=Ht});var a$=G((Fet,i$)=>{"use strict";var dae=ai(),_g=gn(),o$=_g.assert,Sg=_g.cachedProperty,lae=_g.parseBytes;function ef(t,e){this.eddsa=t,typeof e!="object"&&(e=lae(e)),Array.isArray(e)&&(o$(e.length===t.encodingLength*2,"Signature has invalid size"),e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),o$(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof dae&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}Sg(ef,"S",function(){return this.eddsa.decodeInt(this.Sencoded())});Sg(ef,"R",function(){return this.eddsa.decodePoint(this.Rencoded())});Sg(ef,"Rencoded",function(){return this.eddsa.encodePoint(this.R())});Sg(ef,"Sencoded",function(){return this.eddsa.encodeInt(this.S())});ef.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())};ef.prototype.toHex=function(){return _g.encode(this.toBytes(),"hex").toUpperCase()};i$.exports=ef});var d$=G((Let,u$)=>{"use strict";var pae=vg(),hae=xg(),qd=gn(),mae=qd.assert,c$=qd.parseBytes,f$=n$(),s$=a$();function Gr(t){if(mae(t==="ed25519","only tested with ed25519 so far"),!(this instanceof Gr))return new Gr(t);t=hae[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=pae.sha512}u$.exports=Gr;Gr.prototype.sign=function(e,r){e=c$(e);var n=this.keyFromSecret(r),o=this.hashInt(n.messagePrefix(),e),i=this.g.mul(o),a=this.encodePoint(i),s=this.hashInt(a,n.pubBytes(),e).mul(n.priv()),c=o.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:c,Rencoded:a})};Gr.prototype.verify=function(e,r,n){if(e=c$(e),r=this.makeSignature(r),r.S().gte(r.eddsa.curve.n)||r.S().isNeg())return!1;var o=this.keyFromPublic(n),i=this.hashInt(r.Rencoded(),o.pubBytes(),e),a=this.g.mul(r.S()),s=r.R().add(o.pub().mul(i));return s.eq(a)};Gr.prototype.hashInt=function(){for(var e=this.hash(),r=0;r<arguments.length;r++)e.update(arguments[r]);return qd.intFromLE(e.digest()).umod(this.curve.n)};Gr.prototype.keyFromPublic=function(e){return f$.fromPublic(this,e)};Gr.prototype.keyFromSecret=function(e){return f$.fromSecret(this,e)};Gr.prototype.makeSignature=function(e){return e instanceof s$?e:new s$(this,e)};Gr.prototype.encodePoint=function(e){var r=e.getY().toArray("le",this.encodingLength);return r[this.encodingLength-1]|=e.getX().isOdd()?128:0,r};Gr.prototype.decodePoint=function(e){e=qd.parseBytes(e);var r=e.length-1,n=e.slice(0,r).concat(e[r]&-129),o=(e[r]&128)!==0,i=qd.intFromLE(n);return this.curve.pointFromY(i,o)};Gr.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)};Gr.prototype.decodeInt=function(e){return qd.intFromLE(e)};Gr.prototype.isPoint=function(e){return e instanceof this.pointClass}});var p$=G(l$=>{"use strict";var tf=l$;tf.version=jM().version;tf.utils=gn();tf.rand=I3();tf.curve=O3();tf.curves=xg();tf.ec=Qk();tf.eddsa=d$()});var m$=G((Uet,h$)=>{var yae=p$().ec,hi=new yae("secp256k1"),le=hi.curve,ke=le.n.constructor;function bae(t,e){let r=new ke(e);if(r.cmp(le.p)>=0)return null;r=r.toRed(le.red);let n=r.redSqr().redIMul(r).redIAdd(le.b).redSqrt();t===3!==n.isOdd()&&(n=n.redNeg());let o=r.redSqr().redIMul(r);return n.redSqr().redISub(o.redIAdd(le.b)).isZero()?hi.keyPair({pub:{x:r,y:n}}):null}function gae(t,e,r){let n=new ke(e),o=new ke(r);if(n.cmp(le.p)>=0||o.cmp(le.p)>=0||(n=n.toRed(le.red),o=o.toRed(le.red),(t===6||t===7)&&o.isOdd()!==(t===7)))return null;let i=n.redSqr().redIMul(n);return o.redSqr().redISub(i.redIAdd(le.b)).isZero()?hi.keyPair({pub:{x:n,y:o}}):null}function As(t){let e=t[0];switch(e){case 2:case 3:return t.length!==33?null:bae(e,t.subarray(1,33));case 4:case 6:case 7:return t.length!==65?null:gae(e,t.subarray(1,33),t.subarray(33,65));default:return null}}function rf(t,e){let r=e.encode(null,t.length===33);for(let n=0;n<t.length;++n)t[n]=r[n]}h$.exports={contextRandomize(){return 0},privateKeyVerify(t){let e=new ke(t);return e.cmp(le.n)<0&&!e.isZero()?0:1},privateKeyNegate(t){let e=new ke(t),r=le.n.sub(e).umod(le.n).toArrayLike(Uint8Array,"be",32);return t.set(r),0},privateKeyTweakAdd(t,e){let r=new ke(e);if(r.cmp(le.n)>=0||(r.iadd(new ke(t)),r.cmp(le.n)>=0&&r.isub(le.n),r.isZero()))return 1;let n=r.toArrayLike(Uint8Array,"be",32);return t.set(n),0},privateKeyTweakMul(t,e){let r=new ke(e);if(r.cmp(le.n)>=0||r.isZero())return 1;r.imul(new ke(t)),r.cmp(le.n)>=0&&(r=r.umod(le.n));let n=r.toArrayLike(Uint8Array,"be",32);return t.set(n),0},publicKeyVerify(t){return As(t)===null?1:0},publicKeyCreate(t,e){let r=new ke(e);if(r.cmp(le.n)>=0||r.isZero())return 1;let n=hi.keyFromPrivate(e).getPublic();return rf(t,n),0},publicKeyConvert(t,e){let r=As(e);if(r===null)return 1;let n=r.getPublic();return rf(t,n),0},publicKeyNegate(t,e){let r=As(e);if(r===null)return 1;let n=r.getPublic();return n.y=n.y.redNeg(),rf(t,n),0},publicKeyCombine(t,e){let r=new Array(e.length);for(let o=0;o<e.length;++o)if(r[o]=As(e[o]),r[o]===null)return 1;let n=r[0].getPublic();for(let o=1;o<r.length;++o)n=n.add(r[o].pub);return n.isInfinity()?2:(rf(t,n),0)},publicKeyTweakAdd(t,e,r){let n=As(e);if(n===null)return 1;if(r=new ke(r),r.cmp(le.n)>=0)return 2;let o=n.getPublic().add(le.g.mul(r));return o.isInfinity()?2:(rf(t,o),0)},publicKeyTweakMul(t,e,r){let n=As(e);if(n===null)return 1;if(r=new ke(r),r.cmp(le.n)>=0||r.isZero())return 2;let o=n.getPublic().mul(r);return rf(t,o),0},signatureNormalize(t){let e=new ke(t.subarray(0,32)),r=new ke(t.subarray(32,64));return e.cmp(le.n)>=0||r.cmp(le.n)>=0?1:(r.cmp(hi.nh)===1&&t.set(le.n.sub(r).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport(t,e){let r=e.subarray(0,32),n=e.subarray(32,64);if(new ke(r).cmp(le.n)>=0||new ke(n).cmp(le.n)>=0)return 1;let{output:o}=t,i=o.subarray(4,37);i[0]=0,i.set(r,1);let a=33,s=0;for(;a>1&&i[s]===0&&!(i[s+1]&128);--a,++s);if(i=i.subarray(s),i[0]&128||a>1&&i[0]===0&&!(i[1]&128))return 1;let c=o.subarray(39,72);c[0]=0,c.set(n,1);let u=33,f=0;for(;u>1&&c[f]===0&&!(c[f+1]&128);--u,++f);return c=c.subarray(f),c[0]&128||u>1&&c[0]===0&&!(c[1]&128)?1:(t.outputlen=6+a+u,o[0]=48,o[1]=t.outputlen-2,o[2]=2,o[3]=i.length,o.set(i,4),o[4+a]=2,o[5+a]=c.length,o.set(c,6+a),0)},signatureImport(t,e){if(e.length<8||e.length>72||e[0]!==48||e[1]!==e.length-2||e[2]!==2)return 1;let r=e[3];if(r===0||5+r>=e.length||e[4+r]!==2)return 1;let n=e[5+r];if(n===0||6+r+n!==e.length||e[4]&128||r>1&&e[4]===0&&!(e[5]&128)||e[r+6]&128||n>1&&e[r+6]===0&&!(e[r+7]&128))return 1;let o=e.subarray(4,4+r);if(o.length===33&&o[0]===0&&(o=o.subarray(1)),o.length>32)return 1;let i=e.subarray(6+r);if(i.length===33&&i[0]===0&&(i=i.slice(1)),i.length>32)throw new Error("S length is too long");let a=new ke(o);a.cmp(le.n)>=0&&(a=new ke(0));let s=new ke(e.subarray(6+r));return s.cmp(le.n)>=0&&(s=new ke(0)),t.set(a.toArrayLike(Uint8Array,"be",32),0),t.set(s.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign(t,e,r,n,o){if(o){let s=o;o=c=>{let u=s(e,r,null,n,c);if(!(u instanceof Uint8Array&&u.length===32))throw new Error("This is the way");return new ke(u)}}let i=new ke(r);if(i.cmp(le.n)>=0||i.isZero())return 1;let a;try{a=hi.sign(e,r,{canonical:!0,k:o,pers:n})}catch{return 1}return t.signature.set(a.r.toArrayLike(Uint8Array,"be",32),0),t.signature.set(a.s.toArrayLike(Uint8Array,"be",32),32),t.recid=a.recoveryParam,0},ecdsaVerify(t,e,r){let n={r:t.subarray(0,32),s:t.subarray(32,64)},o=new ke(n.r),i=new ke(n.s);if(o.cmp(le.n)>=0||i.cmp(le.n)>=0)return 1;if(i.cmp(hi.nh)===1||o.isZero()||i.isZero())return 3;let a=As(r);if(a===null)return 2;let s=a.getPublic();return hi.verify(e,n,s)?0:3},ecdsaRecover(t,e,r,n){let o={r:e.slice(0,32),s:e.slice(32,64)},i=new ke(o.r),a=new ke(o.s);if(i.cmp(le.n)>=0||a.cmp(le.n)>=0)return 1;if(i.isZero()||a.isZero())return 2;let s;try{s=hi.recoverPubKey(n,o,r)}catch{return 2}return rf(t,s),0},ecdh(t,e,r,n,o,i,a){let s=As(e);if(s===null)return 1;let c=new ke(r);if(c.cmp(le.n)>=0||c.isZero())return 2;let u=s.getPublic().mul(c);if(o===void 0){let f=u.encode(null,!0),l=hi.hash().update(f).digest();for(let h=0;h<32;++h)t[h]=l[h]}else{i||(i=new Uint8Array(32));let f=u.getX().toArray("be",32);for(let x=0;x<32;++x)i[x]=f[x];a||(a=new Uint8Array(32));let l=u.getY().toArray("be",32);for(let x=0;x<32;++x)a[x]=l[x];let h=o(i,a,n);if(!(h instanceof Uint8Array&&h.length===t.length))return 2;t.set(h)}return 0}}});var _s=G((Det,y$)=>{y$.exports=LM()(m$())});function vae(t){switch(t){case bn.ED25519:return"ed25519";case bn.SECP256K1:return"secp256k1";default:throw new Error(`Unknown key type ${t}`)}}function xae(t){switch(t.toLowerCase()){case"ed25519":return bn.ED25519;case"secp256k1":return bn.SECP256K1;default:throw new Error(`Unknown key type ${t}`)}}function wae(t){switch(t){case bn.ED25519:return"ed25519Key";case bn.SECP256K1:return"secp256k1Key";default:throw Error(`unknown type ${t}`)}}var b$,W3,Ss,g$=N(()=>{Dr();Cd();b$=Jt(_s(),1);nM();W3=class{constructor(e){if(Object.keys(e).length!==1)throw new Error("Enum can only take single value");Object.keys(e).map(r=>{this[r]=e[r]})}},Ss=class t extends W3{enum;ed25519Key;secp256k1Key;constructor(e){let r=wae(e.keyType);super({[r]:e}),this[r]=e,this.enum=r}static from(e){return typeof e=="string"?t.fromString(e):e}static fromString(e){let r=e.split(":"),n,o;if(r.length===1)n=r[0];else if(r.length===2)n=r[1],o=xae(r[0]);else throw new Error("Invalid encoded key format, must be <curve>:<encoded key>");let i=nt(n);o||(o=i.length===Q1.SECP256k1_PUBLIC_KEY?bn.SECP256K1:bn.ED25519);let a=o===bn.ED25519?Q1.ED25519_PUBLIC_KEY:Q1.SECP256k1_PUBLIC_KEY;if(i.length!==a)throw new Error(`Invalid public key size (${i.length}), must be ${a}`);return new t({keyType:o,data:i})}toString(){let e=me(this.data);return`${vae(this.keyType)}:${e}`}verify(e,r){let n=this.keyType,o=this.data;switch(n){case bn.ED25519:return qr.verify(r,e,o);case bn.SECP256K1:return b$.default.ecdsaVerify(r.subarray(0,64),e,new Uint8Array([4,...o]));default:throw new Error(`Unknown key type: ${n}`)}}get keyPair(){return this.ed25519Key||this.secp256k1Key}get keyType(){return this.keyPair.keyType}get data(){return this.keyPair.data}}});var v$=N(()=>{g$()});var x$=N(()=>{});var Ig=N(()=>{V8();W8();tM();rM();eM();x$()});var w$=G(Ap=>{"use strict";var Tg=Ap&&Ap.__assign||function(){return Tg=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},Tg.apply(this,arguments)};Object.defineProperty(Ap,"__esModule",{value:!0});var Eae={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function Aae(t){var e=Tg(Tg({},Eae),t);return e.numOfAttempts<1&&(e.numOfAttempts=1),e}Ap.getSanitizedOptions=Aae});var E$=G(V3=>{"use strict";Object.defineProperty(V3,"__esModule",{value:!0});function _ae(t){var e=Math.random()*t;return Math.round(e)}V3.fullJitter=_ae});var A$=G(Y3=>{"use strict";Object.defineProperty(Y3,"__esModule",{value:!0});function Sae(t){return t}Y3.noJitter=Sae});var _$=G(Z3=>{"use strict";Object.defineProperty(Z3,"__esModule",{value:!0});var Iae=E$(),Tae=A$();function Bae(t){return t.jitter==="full"?Iae.fullJitter:Tae.noJitter}Z3.JitterFactory=Bae});var X3=G(J3=>{"use strict";Object.defineProperty(J3,"__esModule",{value:!0});var Oae=_$(),Pae=(function(){function t(e){this.options=e,this.attempt=0}return t.prototype.apply=function(){var e=this;return new Promise(function(r){return setTimeout(r,e.jitteredDelay)})},t.prototype.setAttemptNumber=function(e){this.attempt=e},Object.defineProperty(t.prototype,"jitteredDelay",{get:function(){var e=Oae.JitterFactory(this.options);return e(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"delay",{get:function(){var e=this.options.startingDelay,r=this.options.timeMultiple,n=this.numOfDelayedAttempts,o=e*Math.pow(r,n);return Math.min(o,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),t})();J3.Delay=Pae});var S$=G(pa=>{"use strict";var Rae=pa&&pa.__extends||(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Cae=pa&&pa.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(f){try{u(n.next(f))}catch(l){a(l)}}function c(f){try{u(n.throw(f))}catch(l){a(l)}}function u(f){f.done?i(f.value):o(f.value).then(s,c)}u((n=n.apply(t,e||[])).next())})},Nae=pa&&pa.__generator||function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(f){return c([u,f])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=u[0]&2?o.return:u[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,u[1])).done)return i;switch(o=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,o=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(f){u=[6,f],o=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}};Object.defineProperty(pa,"__esModule",{value:!0});var Mae=X3(),kae=(function(t){Rae(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.apply=function(){return Cae(this,void 0,void 0,function(){return Nae(this,function(r){return[2,this.isFirstAttempt?!0:t.prototype.apply.call(this)]})})},Object.defineProperty(e.prototype,"isFirstAttempt",{get:function(){return this.attempt===0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),e})(Mae.Delay);pa.SkipFirstDelay=kae});var I$=G(_p=>{"use strict";var $ae=_p&&_p.__extends||(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();Object.defineProperty(_p,"__esModule",{value:!0});var Fae=X3(),Lae=(function(t){$ae(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(Fae.Delay);_p.AlwaysDelay=Lae});var T$=G(Q3=>{"use strict";Object.defineProperty(Q3,"__esModule",{value:!0});var jae=S$(),Uae=I$();function Dae(t,e){var r=zae(t);return r.setAttemptNumber(e),r}Q3.DelayFactory=Dae;function zae(t){return t.delayFirstAttempt?new Uae.AlwaysDelay(t):new jae.SkipFirstDelay(t)}});var r4=G(nf=>{"use strict";var e4=nf&&nf.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(f){try{u(n.next(f))}catch(l){a(l)}}function c(f){try{u(n.throw(f))}catch(l){a(l)}}function u(f){f.done?i(f.value):o(f.value).then(s,c)}u((n=n.apply(t,e||[])).next())})},t4=nf&&nf.__generator||function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(f){return c([u,f])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=u[0]&2?o.return:u[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,u[1])).done)return i;switch(o=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,o=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(f){u=[6,f],o=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}};Object.defineProperty(nf,"__esModule",{value:!0});var Kae=w$(),qae=T$();function Hae(t,e){return e===void 0&&(e={}),e4(this,void 0,void 0,function(){var r,n;return t4(this,function(o){switch(o.label){case 0:return r=Kae.getSanitizedOptions(e),n=new Gae(t,r),[4,n.execute()];case 1:return[2,o.sent()]}})})}nf.backOff=Hae;var Gae=(function(){function t(e,r){this.request=e,this.options=r,this.attemptNumber=0}return t.prototype.execute=function(){return e4(this,void 0,void 0,function(){var e,r;return t4(this,function(n){switch(n.label){case 0:if(this.attemptLimitReached)return[3,7];n.label=1;case 1:return n.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return n.sent(),[4,this.request()];case 3:return[2,n.sent()];case 4:return e=n.sent(),this.attemptNumber++,[4,this.options.retry(e,this.attemptNumber)];case 5:if(r=n.sent(),!r||this.attemptLimitReached)throw e;return[3,6];case 6:return[3,0];case 7:throw new Error("Something went wrong.")}})})},Object.defineProperty(t.prototype,"attemptLimitReached",{get:function(){return this.attemptNumber>=this.options.numOfAttempts},enumerable:!0,configurable:!0}),t.prototype.applyDelay=function(){return e4(this,void 0,void 0,function(){var e;return t4(this,function(r){switch(r.label){case 0:return e=qae.DelayFactory(this.options,this.attemptNumber),[4,e.apply()];case 1:return r.sent(),[2]}})})},t})()});function P$(t=O$,e=Wae,r=Vae){return{numOfAttempts:t,timeMultiple:e,startingDelay:r,retry:n=>!!([503,500,408].includes(n.cause)||n.toString().includes("FetchError")||n.toString().includes("Failed to fetch"))}}async function R$(t,e,r,n){let o=await(0,B$.backOff)(async()=>{let i=await fetch(t,{method:"POST",body:JSON.stringify(e),headers:{...r,"Content-Type":"application/json"}}),{ok:a,status:s}=i;if(s===500)throw new of("Internal server error",{cause:s});if(s===408)throw new of("Timeout error",{cause:s});if(s===400)throw new of("Request validation error",{cause:s});if(s===503)throw new of(`${t} unavailable`,{cause:s});if(!a)throw new of(await i.text(),{cause:s});return i},n);if(!o)throw new jn(`Exceeded ${O$} attempts for ${t}.`,"RetriesExceeded");return await o.json()}var B$,Wae,O$,Vae,of,C$=N(()=>{dp();B$=Jt(r4(),1),Wae=1.5,O$=10,Vae=0;of=class extends Error{cause;constructor(e,r){super(e,r),r.cause&&(this.cause=r.cause)}}});var Yae,Zae,Jae,Xae,ha,Hd,N$=N(()=>{Dr();dp();Ig();C$();Yae=12,Zae=500,Jae=1.5,Xae=123,ha="optimistic",Hd=class{connection;options;networkId;constructor(e,r){this.connection=e||{url:""};let n={retries:Yae,wait:Zae,backoff:Jae};this.options=Object.assign({},n,r),this.networkId=void 0}async getNetworkId(){if(this.networkId)return this.networkId;let{chain_id:e}=await this.viewNodeStatus();return this.networkId=e,this.networkId}async getCurrentEpochSeatPrice(){let{minimum_stake_ratio:e,protocol_version:r}=await this.experimental_protocolConfig({finality:ha}),{current_validators:n}=await this.viewValidators();return Ad(n,300,e,r)}async getNextEpochSeatPrice(){let{minimum_stake_ratio:e,protocol_version:r}=await this.experimental_protocolConfig({finality:ha}),{next_validators:n}=await this.viewValidators();return Ad(n,300,e,r)}async viewAccessKey(e,r,n={finality:ha}){let o=await this.query({...n,request_type:"view_access_key",account_id:e,public_key:r.toString()});return{...o,nonce:BigInt(o.nonce)}}async viewAccessKeyList(e,r={finality:ha}){return this.query({...r,request_type:"view_access_key_list",account_id:e})}async viewAccount(e,r={finality:ha}){let n=await this.query({...r,request_type:"view_account",account_id:e});return{...n,amount:BigInt(n.amount),locked:BigInt(n.locked)}}async viewContractCode(e,r={finality:ha}){let n=await this.query({...r,request_type:"view_code",account_id:e});return{...n,code:new Uint8Array(Buffer.from(n.code_base64,"base64"))}}async viewContractState(e,r,n={finality:ha}){let o=Buffer.from(r||"").toString("base64");return this.query({...n,request_type:"view_state",account_id:e,prefix_base64:o})}async callFunction(e,r,n,o={finality:ha}){let{result:i}=await this.callFunctionRaw(e,r,n,o);if(i.length===0)return;let a=Buffer.from(i).toString();try{return JSON.parse(a)}catch{return a}}async callFunctionRaw(e,r,n,o={finality:ha}){let a=(ArrayBuffer.isView(n)?Buffer.from(n):Buffer.from(JSON.stringify(n))).toString("base64");return await this.query({...o,request_type:"call_function",account_id:e,method_name:r,args_base64:a})}async viewBlock(e){let{finality:r}=e,{blockId:n}=e;return this.sendJsonRpc("block",{block_id:n,finality:r})}async viewChunk(e){return this.sendJsonRpc("chunk",[e])}async viewGasPrice(e){return this.sendJsonRpc("gas_price",[e||null])}async viewNodeStatus(){return this.sendJsonRpc("status",[])}async viewValidators(e){return this.sendJsonRpc("validators",[e||null])}async viewValidatorsV2(e){if(e===null)return this.sendJsonRpc("validators",[null]);if(typeof e=="object"&&"blockId"in e)return this.sendJsonRpc("validators",{block_id:e.blockId});if(typeof e=="object"&&"epochId"in e)return this.sendJsonRpc("validators",{epoch_id:e.epochId});throw new Error("Invalid parameters for validatorsV2")}async viewTransactionStatus(e,r,n){let o=typeof e=="string"?e:me(e);return this.sendJsonRpc("tx",{tx_hash:o,sender_account_id:r,wait_until:n})}async viewTransactionStatusWithReceipts(e,r,n){let o=typeof e=="string"?e:me(e);return this.sendJsonRpc("EXPERIMENTAL_tx_status",{tx_hash:o,sender_account_id:r,wait_until:n})}async viewTransactionReceipt(e){return this.sendJsonRpc("EXPERIMENTAL_receipt",{receipt_id:e})}async status(){return this.sendJsonRpc("status",[])}async sendTransactionUntil(e,r){let n=Q8(e);return this.sendJsonRpc("send_tx",{signed_tx_base64:Buffer.from(n).toString("base64"),wait_until:r})}async sendTransaction(e){return this.sendTransactionUntil(e,"EXECUTED_OPTIMISTIC")}async sendTransactionAsync(e){return this.sendTransactionUntil(e,"NONE")}async txStatus(e,r,n="EXECUTED_OPTIMISTIC"){return typeof e=="string"?this.txStatusString(e,r,n):this.txStatusUint8Array(e,r,n)}async txStatusUint8Array(e,r,n){return this.sendJsonRpc("tx",{tx_hash:me(e),sender_account_id:r,wait_until:n})}async txStatusString(e,r,n){return this.sendJsonRpc("tx",{tx_hash:e,sender_account_id:r,wait_until:n})}async txStatusReceipts(e,r,n="EXECUTED_OPTIMISTIC"){return typeof e=="string"?this.sendJsonRpc("EXPERIMENTAL_tx_status",{tx_hash:e,sender_account_id:r,wait_until:n}):this.sendJsonRpc("EXPERIMENTAL_tx_status",{tx_hash:me(e),sender_account_id:r,wait_until:n})}async query(...e){let r;if(e.length===1){let{block_id:n,blockId:o,...i}=e[0];r=await this.sendJsonRpc("query",{...i,block_id:n||o})}else{let[n,o]=e;r=await this.sendJsonRpc("query",[n,o])}if(r&&r.error)throw new jn(`Querying failed: ${r.error}.
|
|
44
|
+
${JSON.stringify(r,null,2)}`,ps(r.error,r.error.name));return r}async block(e){let{finality:r}=e,{blockId:n}=e;return this.sendJsonRpc("block",{block_id:n,finality:r})}async blockChanges(e){let{finality:r}=e,{blockId:n}=e;return this.sendJsonRpc("EXPERIMENTAL_changes_in_block",{block_id:n,finality:r})}async chunk(e){return this.sendJsonRpc("chunk",[e])}async validators(e){return this.sendJsonRpc("validators",[e])}async experimental_protocolConfig(e){let{blockId:r,...n}=e;return await this.sendJsonRpc("EXPERIMENTAL_protocol_config",{...n,block_id:r})}async lightClientProof(e){return await this.sendJsonRpc("EXPERIMENTAL_light_client_proof",e)}async nextLightClientBlock(e){return await this.sendJsonRpc("next_light_client_block",e)}async accessKeyChanges(e,r){let{finality:n}=r,{blockId:o}=r;return this.sendJsonRpc("EXPERIMENTAL_changes",{changes_type:"all_access_key_changes",account_ids:e,block_id:o,finality:n})}async singleAccessKeyChanges(e,r){let{finality:n}=r,{blockId:o}=r;return this.sendJsonRpc("EXPERIMENTAL_changes",{changes_type:"single_access_key_changes",keys:e,block_id:o,finality:n})}async accountChanges(e,r){let{finality:n}=r,{blockId:o}=r;return this.sendJsonRpc("EXPERIMENTAL_changes",{changes_type:"account_changes",account_ids:e,block_id:o,finality:n})}async contractStateChanges(e,r,n=""){let{finality:o}=r,{blockId:i}=r;return this.sendJsonRpc("EXPERIMENTAL_changes",{changes_type:"data_changes",account_ids:e,key_prefix_base64:n,block_id:i,finality:o})}async contractCodeChanges(e,r){let{finality:n}=r,{blockId:o}=r;return this.sendJsonRpc("EXPERIMENTAL_changes",{changes_type:"contract_code_changes",account_ids:e,block_id:o,finality:n})}async gasPrice(e){return await this.sendJsonRpc("gas_price",[e])}async sendJsonRpc(e,r){let n={method:e,params:r,id:Xae++,jsonrpc:"2.0"},o=await R$(this.connection.url,n,this.connection.headers||{},P$(this.options.retries,this.options.backoff,this.options.wait));if(o.error){if(typeof o.error.data=="object")throw typeof o.error.data.error_message=="string"&&typeof o.error.data.error_type=="string"?new jn(o.error.data.error_message,o.error.data.error_type):Ed(o.error.data);{let a=`[${o.error.code}] ${o.error.message}: ${o.error.data}`,s=ps(o.error.data,"");throw s?new jn(Kc(s,r),s):new jn(a,o.error.name)}}else if(typeof o.result?.error=="string"){let a=ps(o.result.error,"");if(a)throw new wd(Kc(a,r),a)}let{result:i}=o;if(typeof i>"u")throw new jn(`Exceeded ${this.options.retries} attempts for request to ${e}.`,"RetriesExceeded");return i}}});var Sp,M$=N(()=>{Dr();dp();Sp=class{providers;currentProviderIndex;constructor(e){if(e.length===0)throw new Error("At least one provider must be specified");this.providers=e,this.currentProviderIndex=0}switchToNextProvider(){this.providers.length!==1&&(this.providers.length-1<=this.currentProviderIndex?this.currentProviderIndex=0:this.currentProviderIndex+=1,oi.debug(`Switched to provider at the index ${this.currentProviderIndex}`))}get currentProvider(){let e=this.providers[this.currentProviderIndex];if(!e)throw new Error(`Provider wasn't found at index ${this.currentProviderIndex}`);return e}async withBackoff(e){for(let r=0;r<this.providers.length;r++)try{let n=await e(this.currentProvider);if(typeof n>"u")continue;return n}catch(n){console.error(n),this.switchToNextProvider()}throw new jn(`Exceeded ${this.providers.length} providers to execute request`,"RetriesExceeded")}async status(){return this.withBackoff(e=>e.status())}async getNetworkId(){return this.withBackoff(e=>e.getNetworkId())}async getCurrentEpochSeatPrice(){return this.withBackoff(e=>e.getCurrentEpochSeatPrice())}async getNextEpochSeatPrice(){return this.withBackoff(e=>e.getNextEpochSeatPrice())}async viewAccessKey(e,r,n){return this.withBackoff(o=>o.viewAccessKey(e,r,n))}async viewAccessKeyList(e,r){return this.withBackoff(n=>n.viewAccessKeyList(e,r))}async viewAccount(e,r){return this.withBackoff(n=>n.viewAccount(e,r))}async viewContractCode(e,r){return this.withBackoff(n=>n.viewContractCode(e,r))}async viewContractState(e,r,n){return this.withBackoff(o=>o.viewContractState(e,r,n))}async callFunction(e,r,n,o){return this.withBackoff(i=>i.callFunction(e,r,n,o))}async callFunctionRaw(e,r,n,o){return this.withBackoff(i=>i.callFunctionRaw(e,r,n,o))}async viewBlock(e){return this.withBackoff(r=>r.viewBlock(e))}async viewChunk(e){return this.withBackoff(r=>r.viewChunk(e))}async viewGasPrice(e){return this.withBackoff(r=>r.viewGasPrice(e))}async viewNodeStatus(){return this.withBackoff(e=>e.viewNodeStatus())}async viewValidators(e){return this.withBackoff(r=>r.viewValidators(e))}async viewValidatorsV2(e){return this.withBackoff(r=>r.viewValidatorsV2(e))}async viewTransactionStatus(e,r,n){return this.withBackoff(o=>o.viewTransactionStatus(e,r,n))}async viewTransactionStatusWithReceipts(e,r,n){return this.withBackoff(o=>o.viewTransactionStatusWithReceipts(e,r,n))}async viewTransactionReceipt(e){return this.withBackoff(r=>r.viewTransactionReceipt(e))}async sendTransactionUntil(e,r){return this.withBackoff(n=>n.sendTransactionUntil(e,r))}async sendTransaction(e){return this.withBackoff(r=>r.sendTransaction(e))}async sendTransactionAsync(e){return this.withBackoff(r=>r.sendTransactionAsync(e))}async txStatus(e,r,n){return this.withBackoff(o=>o.txStatus(e,r,n))}async txStatusReceipts(e,r,n){return this.withBackoff(o=>o.txStatusReceipts(e,r,n))}async query(e,r){return r?this.withBackoff(n=>n.query(e,r)):this.withBackoff(n=>n.query(e))}async block(e){return this.withBackoff(r=>r.block(e))}async blockChanges(e){return this.withBackoff(r=>r.blockChanges(e))}async chunk(e){return this.withBackoff(r=>r.chunk(e))}async validators(e){return this.withBackoff(r=>r.validators(e))}async experimental_protocolConfig(e){return this.withBackoff(r=>r.experimental_protocolConfig(e))}async lightClientProof(e){return this.withBackoff(r=>r.lightClientProof(e))}async nextLightClientBlock(e){return this.withBackoff(r=>r.nextLightClientBlock(e))}async accessKeyChanges(e,r){return this.withBackoff(n=>n.accessKeyChanges(e,r))}async singleAccessKeyChanges(e,r){return this.withBackoff(n=>n.singleAccessKeyChanges(e,r))}async accountChanges(e,r){return this.withBackoff(n=>n.accountChanges(e,r))}async contractStateChanges(e,r,n=""){return this.withBackoff(o=>o.contractStateChanges(e,r,n))}async contractCodeChanges(e,r){return this.withBackoff(n=>n.contractCodeChanges(e,r))}async gasPrice(e){return this.withBackoff(r=>r.gasPrice(e))}}});var k$=N(()=>{N$();M$()});var G$=G((Stt,n4)=>{"use strict";var Gd=typeof Reflect=="object"?Reflect:null,$$=Gd&&typeof Gd.apply=="function"?Gd.apply:function(e,r,n){return Function.prototype.apply.call(e,r,n)},Bg;Gd&&typeof Gd.ownKeys=="function"?Bg=Gd.ownKeys:Object.getOwnPropertySymbols?Bg=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Bg=function(e){return Object.getOwnPropertyNames(e)};function Qae(t){console&&console.warn&&console.warn(t)}var L$=Number.isNaN||function(e){return e!==e};function Pe(){Pe.init.call(this)}n4.exports=Pe;n4.exports.once=nse;Pe.EventEmitter=Pe;Pe.prototype._events=void 0;Pe.prototype._eventsCount=0;Pe.prototype._maxListeners=void 0;var F$=10;function Og(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(Pe,"defaultMaxListeners",{enumerable:!0,get:function(){return F$},set:function(t){if(typeof t!="number"||t<0||L$(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");F$=t}});Pe.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};Pe.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||L$(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function j$(t){return t._maxListeners===void 0?Pe.defaultMaxListeners:t._maxListeners}Pe.prototype.getMaxListeners=function(){return j$(this)};Pe.prototype.emit=function(e){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);var o=e==="error",i=this._events;if(i!==void 0)o=o&&i.error===void 0;else if(!o)return!1;if(o){var a;if(r.length>0&&(a=r[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=i[e];if(c===void 0)return!1;if(typeof c=="function")$$(c,this,r);else for(var u=c.length,f=q$(c,u),n=0;n<u;++n)$$(f[n],this,r);return!0};function U$(t,e,r,n){var o,i,a;if(Og(r),i=t._events,i===void 0?(i=t._events=Object.create(null),t._eventsCount=0):(i.newListener!==void 0&&(t.emit("newListener",e,r.listener?r.listener:r),i=t._events),a=i[e]),a===void 0)a=i[e]=r,++t._eventsCount;else if(typeof a=="function"?a=i[e]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),o=j$(t),o>0&&a.length>o&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=t,s.type=e,s.count=a.length,Qae(s)}return t}Pe.prototype.addListener=function(e,r){return U$(this,e,r,!1)};Pe.prototype.on=Pe.prototype.addListener;Pe.prototype.prependListener=function(e,r){return U$(this,e,r,!0)};function ese(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function D$(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},o=ese.bind(n);return o.listener=r,n.wrapFn=o,o}Pe.prototype.once=function(e,r){return Og(r),this.on(e,D$(this,e,r)),this};Pe.prototype.prependOnceListener=function(e,r){return Og(r),this.prependListener(e,D$(this,e,r)),this};Pe.prototype.removeListener=function(e,r){var n,o,i,a,s;if(Og(r),o=this._events,o===void 0)return this;if(n=o[e],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete o[e],o.removeListener&&this.emit("removeListener",e,n.listener||r));else if(typeof n!="function"){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===r||n[a].listener===r){s=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():tse(n,i),n.length===1&&(o[e]=n[0]),o.removeListener!==void 0&&this.emit("removeListener",e,s||r)}return this};Pe.prototype.off=Pe.prototype.removeListener;Pe.prototype.removeAllListeners=function(e){var r,n,o;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i=Object.keys(n),a;for(o=0;o<i.length;++o)a=i[o],a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=n[e],typeof r=="function")this.removeListener(e,r);else if(r!==void 0)for(o=r.length-1;o>=0;o--)this.removeListener(e,r[o]);return this};function z$(t,e,r){var n=t._events;if(n===void 0)return[];var o=n[e];return o===void 0?[]:typeof o=="function"?r?[o.listener||o]:[o]:r?rse(o):q$(o,o.length)}Pe.prototype.listeners=function(e){return z$(this,e,!0)};Pe.prototype.rawListeners=function(e){return z$(this,e,!1)};Pe.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):K$.call(t,e)};Pe.prototype.listenerCount=K$;function K$(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}Pe.prototype.eventNames=function(){return this._eventsCount>0?Bg(this._events):[]};function q$(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function tse(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function rse(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}function nse(t,e){return new Promise(function(r,n){function o(a){t.removeListener(e,i),n(a)}function i(){typeof t.removeListener=="function"&&t.removeListener("error",o),r([].slice.call(arguments))}H$(t,e,i,{once:!0}),e!=="error"&&ose(t,o,{once:!0})})}function ose(t,e,r){typeof t.on=="function"&&H$(t,"error",e,r)}function H$(t,e,r,n){if(typeof t.on=="function")n.once?t.once(e,r):t.on(e,r);else if(typeof t.addEventListener=="function")t.addEventListener(e,function o(i){n.once&&t.removeEventListener(e,o),r(i)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}});function mi(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");o4(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function Ip(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Wd(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,i=[],a;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i}function Vd(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,i;n<o;n++)(i||!(n in e))&&(i||(i=Array.prototype.slice.call(e,0,n)),i[n]=e[n]);return t.concat(i||Array.prototype.slice.call(e))}var o4,af=N(()=>{o4=function(t,e){return o4=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},o4(t,e)}});function Wr(t){return typeof t=="function"}var Tp=N(()=>{});function Pg(t){var e=function(n){Error.call(n),n.stack=new Error().stack},r=t(e);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var i4=N(()=>{});var Rg,W$=N(()=>{i4();Rg=Pg(function(t){return function(r){t(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
45
|
+
`+r.map(function(n,o){return o+1+") "+n.toString()}).join(`
|
|
46
|
+
`):"",this.name="UnsubscriptionError",this.errors=r}})});function Bp(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var a4=N(()=>{});function Cg(t){return t instanceof Yd||t&&"closed"in t&&Wr(t.remove)&&Wr(t.add)&&Wr(t.unsubscribe)}function V$(t){Wr(t)?t():t.unsubscribe()}var Yd,s4,Ng=N(()=>{af();Tp();W$();a4();Yd=(function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,r,n,o,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=Ip(a),c=s.next();!c.done;c=s.next()){var u=c.value;u.remove(this)}}catch(S){e={error:S}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}else a.remove(this);var f=this.initialTeardown;if(Wr(f))try{f()}catch(S){i=S instanceof Rg?S.errors:[S]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var h=Ip(l),m=h.next();!m.done;m=h.next()){var x=m.value;try{V$(x)}catch(S){i=i??[],S instanceof Rg?i=Vd(Vd([],Wd(i)),Wd(S.errors)):i.push(S)}}}catch(S){n={error:S}}finally{try{m&&!m.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}}if(i)throw new Rg(i)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)V$(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(e)}},t.prototype._hasParent=function(e){var r=this._parentage;return r===e||Array.isArray(r)&&r.includes(e)},t.prototype._addParent=function(e){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(e),r):r?[r,e]:e},t.prototype._removeParent=function(e){var r=this._parentage;r===e?this._parentage=null:Array.isArray(r)&&Bp(r,e)},t.prototype.remove=function(e){var r=this._finalizers;r&&Bp(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=(function(){var e=new t;return e.closed=!0,e})(),t})(),s4=Yd.EMPTY});var xo,Op=N(()=>{xo={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}});var Zd,c4=N(()=>{af();Zd={setTimeout:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=Zd.delegate;return o?.setTimeout?o.setTimeout.apply(o,Vd([t,e],Wd(r))):setTimeout.apply(void 0,Vd([t,e],Wd(r)))},clearTimeout:function(t){var e=Zd.delegate;return(e?.clearTimeout||clearTimeout)(t)},delegate:void 0}});function Y$(t){Zd.setTimeout(function(){var e=xo.onUnhandledError;if(e)e(t);else throw t})}var Z$=N(()=>{Op();c4()});function f4(){}var J$=N(()=>{});function Q$(t){return u4("E",void 0,t)}function eF(t){return u4("N",t,void 0)}function u4(t,e,r){return{kind:t,value:e,error:r}}var X$,tF=N(()=>{X$=(function(){return u4("C",void 0,void 0)})()});function Jd(t){if(xo.useDeprecatedSynchronousErrorHandling){var e=!sf;if(e&&(sf={errorThrown:!1,error:null}),t(),e){var r=sf,n=r.errorThrown,o=r.error;if(sf=null,n)throw o}}else t()}function rF(t){xo.useDeprecatedSynchronousErrorHandling&&sf&&(sf.errorThrown=!0,sf.error=t)}var sf,Mg=N(()=>{Op();sf=null});function d4(t,e){return ise.call(t,e)}function kg(t){xo.useDeprecatedSynchronousErrorHandling?rF(t):Y$(t)}function sse(t){throw t}function l4(t,e){var r=xo.onStoppedNotification;r&&Zd.setTimeout(function(){return r(t,e)})}var Pp,ise,ase,$g,cse,p4=N(()=>{af();Tp();Ng();Op();Z$();J$();tF();c4();Mg();Pp=(function(t){mi(e,t);function e(r){var n=t.call(this)||this;return n.isStopped=!1,r?(n.destination=r,Cg(r)&&r.add(n)):n.destination=cse,n}return e.create=function(r,n,o){return new $g(r,n,o)},e.prototype.next=function(r){this.isStopped?l4(eF(r),this):this._next(r)},e.prototype.error=function(r){this.isStopped?l4(Q$(r),this):(this.isStopped=!0,this._error(r))},e.prototype.complete=function(){this.isStopped?l4(X$,this):(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(r){this.destination.next(r)},e.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e})(Yd),ise=Function.prototype.bind;ase=(function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var r=this.partialObserver;if(r.next)try{r.next(e)}catch(n){kg(n)}},t.prototype.error=function(e){var r=this.partialObserver;if(r.error)try{r.error(e)}catch(n){kg(n)}else kg(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(r){kg(r)}},t})(),$g=(function(t){mi(e,t);function e(r,n,o){var i=t.call(this)||this,a;if(Wr(r)||!r)a={next:r??void 0,error:n??void 0,complete:o??void 0};else{var s;i&&xo.useDeprecatedNextContext?(s=Object.create(r),s.unsubscribe=function(){return i.unsubscribe()},a={next:r.next&&d4(r.next,s),error:r.error&&d4(r.error,s),complete:r.complete&&d4(r.complete,s)}):a=r}return i.destination=new ase(a),i}return e})(Pp);cse={closed:!0,next:f4,error:sse,complete:f4}});var nF,oF=N(()=>{nF=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})()});function iF(t){return t}var aF=N(()=>{});function sF(t){return t.length===0?iF:t.length===1?t[0]:function(r){return t.reduce(function(n,o){return o(n)},r)}}var cF=N(()=>{aF()});function fF(t){var e;return(e=t??xo.Promise)!==null&&e!==void 0?e:Promise}function fse(t){return t&&Wr(t.next)&&Wr(t.error)&&Wr(t.complete)}function use(t){return t&&t instanceof Pp||fse(t)&&Cg(t)}var h4,uF=N(()=>{p4();Ng();oF();cF();Op();Tp();Mg();h4=(function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(e,r,n){var o=this,i=use(e)?e:new $g(e,r,n);return Jd(function(){var a=o,s=a.operator,c=a.source;i.add(s?s.call(i,c):c?o._subscribe(i):o._trySubscribe(i))}),i},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(r){e.error(r)}},t.prototype.forEach=function(e,r){var n=this;return r=fF(r),new r(function(o,i){var a=new $g({next:function(s){try{e(s)}catch(c){i(c),a.unsubscribe()}},error:i,complete:o});n.subscribe(a)})},t.prototype._subscribe=function(e){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(e)},t.prototype[nF]=function(){return this},t.prototype.pipe=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return sF(e)(this)},t.prototype.toPromise=function(e){var r=this;return e=fF(e),new e(function(n,o){var i;r.subscribe(function(a){return i=a},function(a){return o(a)},function(){return n(i)})})},t.create=function(e){return new t(e)},t})()});function dse(t){return Wr(t?.lift)}function dF(t){return function(e){if(dse(e))return e.lift(function(r){try{return t(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}var lF=N(()=>{Tp()});function pF(t,e,r,n,o){return new lse(t,e,r,n,o)}var lse,hF=N(()=>{af();p4();lse=(function(t){mi(e,t);function e(r,n,o,i,a,s){var c=t.call(this,r)||this;return c.onFinalize=a,c.shouldUnsubscribe=s,c._next=n?function(u){try{n(u)}catch(f){r.error(f)}}:t.prototype._next,c._error=i?function(u){try{i(u)}catch(f){r.error(f)}finally{this.unsubscribe()}}:t.prototype._error,c._complete=o?function(){try{o()}catch(u){r.error(u)}finally{this.unsubscribe()}}:t.prototype._complete,c}return e.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;t.prototype.unsubscribe.call(this),!n&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},e})(Pp)});var mF,yF=N(()=>{i4();mF=Pg(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})});var Xd,bF,m4=N(()=>{af();uF();Ng();yF();a4();Mg();Xd=(function(t){mi(e,t);function e(){var r=t.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return e.prototype.lift=function(r){var n=new bF(this,this);return n.operator=r,n},e.prototype._throwIfClosed=function(){if(this.closed)throw new mF},e.prototype.next=function(r){var n=this;Jd(function(){var o,i;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=Ip(n.currentObservers),s=a.next();!s.done;s=a.next()){var c=s.value;c.next(r)}}catch(u){o={error:u}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}}})},e.prototype.error=function(r){var n=this;Jd(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;for(var o=n.observers;o.length;)o.shift().error(r)}})},e.prototype.complete=function(){var r=this;Jd(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var n=r.observers;n.length;)n.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(r){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,r)},e.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},e.prototype._innerSubscribe=function(r){var n=this,o=this,i=o.hasError,a=o.isStopped,s=o.observers;return i||a?s4:(this.currentObservers=null,s.push(r),new Yd(function(){n.currentObservers=null,Bp(s,r)}))},e.prototype._checkFinalizedStatuses=function(r){var n=this,o=n.hasError,i=n.thrownError,a=n.isStopped;o?r.error(i):a&&r.complete()},e.prototype.asObservable=function(){var r=new h4;return r.source=this,r},e.create=function(r,n){return new bF(r,n)},e})(h4),bF=(function(t){mi(e,t);function e(r,n){var o=t.call(this)||this;return o.destination=r,o.source=n,o}return e.prototype.next=function(r){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.next)===null||o===void 0||o.call(n,r)},e.prototype.error=function(r){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.error)===null||o===void 0||o.call(n,r)},e.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},e.prototype._subscribe=function(r){var n,o;return(o=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&o!==void 0?o:s4},e})(Xd)});var y4,gF=N(()=>{af();m4();y4=(function(t){mi(e,t);function e(r){var n=t.call(this)||this;return n._value=r,n}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(r){var n=t.prototype._subscribe.call(this,r);return!n.closed&&r.next(this._value),n},e.prototype.getValue=function(){var r=this,n=r.hasError,o=r.thrownError,i=r._value;if(n)throw o;return this._throwIfClosed(),i},e.prototype.next=function(r){t.prototype.next.call(this,this._value=r)},e})(Xd)});var vF=N(()=>{});function xF(t,e,r,n,o){return function(i,a){var s=r,c=e,u=0;i.subscribe(pF(a,function(f){var l=u++;c=s?t(c,f,l):(s=!0,f),n&&a.next(c)},o&&(function(){s&&a.next(c),a.complete()})))}}var wF=N(()=>{hF()});function b4(t,e){return dF(xF(t,e,arguments.length>=2,!0))}var EF=N(()=>{lF();wF()});var AF=N(()=>{m4();gF();vF();EF()});var pse,Is,Ts,g4,Fg,_F=N(()=>{o3();hp();pse=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]),Is=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Ts=new Uint32Array(64),g4=class extends Bd{constructor(){super(64,32,8,!1),this.A=Is[0]|0,this.B=Is[1]|0,this.C=Is[2]|0,this.D=Is[3]|0,this.E=Is[4]|0,this.F=Is[5]|0,this.G=Is[6]|0,this.H=Is[7]|0}get(){let{A:e,B:r,C:n,D:o,E:i,F:a,G:s,H:c}=this;return[e,r,n,o,i,a,s,c]}set(e,r,n,o,i,a,s,c){this.A=e|0,this.B=r|0,this.C=n|0,this.D=o|0,this.E=i|0,this.F=a|0,this.G=s|0,this.H=c|0}process(e,r){for(let l=0;l<16;l++,r+=4)Ts[l]=e.getUint32(r,!1);for(let l=16;l<64;l++){let h=Ts[l-15],m=Ts[l-2],x=fo(h,7)^fo(h,18)^h>>>3,S=fo(m,17)^fo(m,19)^m>>>10;Ts[l]=S+Ts[l-7]+x+Ts[l-16]|0}let{A:n,B:o,C:i,D:a,E:s,F:c,G:u,H:f}=this;for(let l=0;l<64;l++){let h=fo(s,6)^fo(s,11)^fo(s,25),m=f+h+cM(s,c,u)+pse[l]+Ts[l]|0,S=(fo(n,2)^fo(n,13)^fo(n,22))+fM(n,o,i)|0;f=u,u=c,c=s,s=a+m|0,a=i,i=o,o=n,n=m+S|0}n=n+this.A|0,o=o+this.B|0,i=i+this.C|0,a=a+this.D|0,s=s+this.E|0,c=c+this.F|0,u=u+this.G|0,f=f+this.H|0,this.set(n,o,i,a,s,c,u,f)}roundClean(){Ts.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}},Fg=rg(()=>new g4)});var Rp,SF=N(()=>{Rp=class{}});var rr,yi,Lg=N(()=>{rr=(t=>(t[t.ED25519=0]="ED25519",t[t.SECP256K1=1]="SECP256K1",t))(rr||{}),yi={SECRET_KEY:32,ED25519_PUBLIC_KEY:32,SECP256k1_PUBLIC_KEY:64}});var Bs,jg=N(()=>{Bs=class{}});function hse(t){switch(t){case rr.ED25519:return"ed25519";case rr.SECP256K1:return"secp256k1";default:throw new Error(`Unknown key type ${t}`)}}function mse(t){switch(t.toLowerCase()){case"ed25519":return rr.ED25519;case"secp256k1":return rr.SECP256K1;default:throw new Error(`Unknown key type ${t}`)}}function yse(t){switch(t){case rr.ED25519:return"ed25519Key";case rr.SECP256K1:return"secp256k1Key";default:throw Error(`unknown type ${t}`)}}var IF,v4,Qd,x4=N(()=>{Dr();Cd();IF=Jt(_s(),1);Lg();v4=class{constructor(e){if(Object.keys(e).length!==1)throw new Error("Enum can only take single value");Object.keys(e).map(r=>{this[r]=e[r]})}},Qd=class t extends v4{enum;ed25519Key;secp256k1Key;constructor(e){let r=yse(e.keyType);super({[r]:e}),this[r]=e,this.enum=r}static from(e){return typeof e=="string"?t.fromString(e):e}static fromString(e){let r=e.split(":"),n,o;if(r.length===1)n=r[0];else if(r.length===2)n=r[1],o=mse(r[0]);else throw new Error("Invalid encoded key format, must be <curve>:<encoded key>");let i=nt(n);o||(o=i.length===yi.SECP256k1_PUBLIC_KEY?rr.SECP256K1:rr.ED25519);let a=o===rr.ED25519?yi.ED25519_PUBLIC_KEY:yi.SECP256k1_PUBLIC_KEY;if(i.length!==a)throw new Error(`Invalid public key size (${i.length}), must be ${a}`);return new t({keyType:o,data:i})}toString(){let e=me(this.data);return`${hse(this.keyType)}:${e}`}verify(e,r){let n=this.keyType,o=this.data;switch(n){case rr.ED25519:return qr.verify(r,e,o);case rr.SECP256K1:return IF.default.ecdsaVerify(r.subarray(0,64),e,new Uint8Array([4,...o]));default:throw new Error(`Unknown key type: ${n}`)}}get keyPair(){return this.ed25519Key||this.secp256k1Key}get keyType(){return this.keyPair.keyType}get data(){return this.keyPair.data}}});var Cp,TF=N(()=>{Dr();Cd();qo();Lg();jg();x4();Cp=class t extends Bs{publicKey;secretKey;extendedSecretKey;constructor(e){super();let r=nt(e),n=new Uint8Array(r.slice(0,yi.SECRET_KEY)),o=qr.getPublicKey(new Uint8Array(n));this.publicKey=new Qd({keyType:rr.ED25519,data:o}),this.secretKey=me(n),this.extendedSecretKey=e}static fromRandom(){let e=La(yi.SECRET_KEY),r=qr.getPublicKey(new Uint8Array(e)),n=new Uint8Array([...e,...r]);return new t(me(n))}sign(e){return{signature:qr.sign(e,nt(this.secretKey)),publicKey:this.publicKey}}verify(e,r){return this.publicKey.verify(e,r)}toString(){return`ed25519:${this.extendedSecretKey}`}getPublicKey(){return this.publicKey}}});var Ug,Np,BF=N(()=>{Dr();qo();Ug=Jt(_s(),1);Lg();jg();x4();Np=class t extends Bs{publicKey;secretKey;extendedSecretKey;constructor(e){super();let r=nt(e),n=new Uint8Array(r.slice(0,yi.SECRET_KEY)),o=Ug.default.publicKeyCreate(new Uint8Array(n),!1),i=o.subarray(1,o.length);this.publicKey=new Qd({keyType:rr.SECP256K1,data:i}),this.secretKey=me(n),this.extendedSecretKey=e}static fromRandom(){let e=La(yi.SECRET_KEY),r=Ug.default.publicKeyCreate(new Uint8Array(e),!1),n=r.subarray(1,r.length),o=new Uint8Array([...e,...n]);return new t(me(o))}sign(e){let{signature:r,recid:n}=Ug.default.ecdsaSign(e,nt(this.secretKey));return{signature:new Uint8Array([...r,n]),publicKey:this.publicKey}}verify(e,r){return this.publicKey.verify(e,r)}toString(){return`secp256k1:${this.extendedSecretKey}`}getPublicKey(){return this.publicKey}}});var Mp,OF=N(()=>{jg();TF();BF();Mp=class extends Bs{static fromRandom(e){switch(e.toUpperCase()){case"ED25519":return Cp.fromRandom();case"SECP256K1":return Np.fromRandom();default:throw new Error(`Unknown curve ${e}`)}}static fromString(e){let r=e.split(":");if(r.length===2)switch(r[0].toUpperCase()){case"ED25519":return new Cp(r[1]);case"SECP256K1":return new Np(r[1]);default:throw new Error(`Unknown curve: ${r[0]}`)}else throw new Error("Invalid encoded key format, must be <curve>:<encoded key>")}}});var PF=N(()=>{OF()});var kp,RF=N(()=>{kp=class{}});var CF=N(()=>{RF()});var NF=N(()=>{SF()});var MF=G((Ent,Dg)=>{(function(){"use strict";var t="input is invalid type",e=typeof window=="object",r=e?window:{};r.JS_SHA256_NO_WINDOW&&(e=!1);var n=!e&&typeof self=="object",o=!r.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;o?r=globalThis:n&&(r=self);var i=!r.JS_SHA256_NO_COMMON_JS&&typeof Dg=="object"&&Dg.exports,a=typeof define=="function"&&define.amd,s=!r.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",c="0123456789abcdef".split(""),u=[-2147483648,8388608,32768,128],f=[24,16,8,0],l=[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],h=["hex","array","digest","arrayBuffer"],m=[];(r.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(T){return Object.prototype.toString.call(T)==="[object Array]"}),s&&(r.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(T){return typeof T=="object"&&T.buffer&&T.buffer.constructor===ArrayBuffer});var x=function(T,M){return function($){return new B(M,!0).update($)[T]()}},S=function(T){var M=x("hex",T);o&&(M=O(M,T)),M.create=function(){return new B(T)},M.update=function(v){return M.create().update(v)};for(var $=0;$<h.length;++$){var k=h[$];M[k]=x(k,T)}return M},O=function(T){return T},P=function(T,M){return function($,k){return new R($,M,!0).update(k)[T]()}},F=function(T){var M=P("hex",T);M.create=function(v){return new R(v,T)},M.update=function(v,d){return M.create(v).update(d)};for(var $=0;$<h.length;++$){var k=h[$];M[k]=P(k,T)}return M};function B(T,M){M?(m[0]=m[16]=m[1]=m[2]=m[3]=m[4]=m[5]=m[6]=m[7]=m[8]=m[9]=m[10]=m[11]=m[12]=m[13]=m[14]=m[15]=0,this.blocks=m):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],T?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=T}B.prototype.update=function(T){if(!this.finalized){var M,$=typeof T;if($!=="string"){if($==="object"){if(T===null)throw new Error(t);if(s&&T.constructor===ArrayBuffer)T=new Uint8Array(T);else if(!Array.isArray(T)&&(!s||!ArrayBuffer.isView(T)))throw new Error(t)}else throw new Error(t);M=!0}for(var k,v=0,d,y=T.length,b=this.blocks;v<y;){if(this.hashed&&(this.hashed=!1,b[0]=this.block,b[16]=b[1]=b[2]=b[3]=b[4]=b[5]=b[6]=b[7]=b[8]=b[9]=b[10]=b[11]=b[12]=b[13]=b[14]=b[15]=0),M)for(d=this.start;v<y&&d<64;++v)b[d>>2]|=T[v]<<f[d++&3];else for(d=this.start;v<y&&d<64;++v)k=T.charCodeAt(v),k<128?b[d>>2]|=k<<f[d++&3]:k<2048?(b[d>>2]|=(192|k>>6)<<f[d++&3],b[d>>2]|=(128|k&63)<<f[d++&3]):k<55296||k>=57344?(b[d>>2]|=(224|k>>12)<<f[d++&3],b[d>>2]|=(128|k>>6&63)<<f[d++&3],b[d>>2]|=(128|k&63)<<f[d++&3]):(k=65536+((k&1023)<<10|T.charCodeAt(++v)&1023),b[d>>2]|=(240|k>>18)<<f[d++&3],b[d>>2]|=(128|k>>12&63)<<f[d++&3],b[d>>2]|=(128|k>>6&63)<<f[d++&3],b[d>>2]|=(128|k&63)<<f[d++&3]);this.lastByteIndex=d,this.bytes+=d-this.start,d>=64?(this.block=b[16],this.start=d-64,this.hash(),this.hashed=!0):this.start=d}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},B.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var T=this.blocks,M=this.lastByteIndex;T[16]=this.block,T[M>>2]|=u[M&3],this.block=T[16],M>=56&&(this.hashed||this.hash(),T[0]=this.block,T[16]=T[1]=T[2]=T[3]=T[4]=T[5]=T[6]=T[7]=T[8]=T[9]=T[10]=T[11]=T[12]=T[13]=T[14]=T[15]=0),T[14]=this.hBytes<<3|this.bytes>>>29,T[15]=this.bytes<<3,this.hash()}},B.prototype.hash=function(){var T=this.h0,M=this.h1,$=this.h2,k=this.h3,v=this.h4,d=this.h5,y=this.h6,b=this.h7,g=this.blocks,A,E,w,_,p,I,C,j,U,D,z;for(A=16;A<64;++A)p=g[A-15],E=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3,p=g[A-2],w=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,g[A]=g[A-16]+E+g[A-7]+w<<0;for(z=M&$,A=0;A<64;A+=4)this.first?(this.is224?(j=300032,p=g[0]-1413257819,b=p-150054599<<0,k=p+24177077<<0):(j=704751109,p=g[0]-210244248,b=p-1521486534<<0,k=p+143694565<<0),this.first=!1):(E=(T>>>2|T<<30)^(T>>>13|T<<19)^(T>>>22|T<<10),w=(v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7),j=T&M,_=j^T&$^z,C=v&d^~v&y,p=b+w+C+l[A]+g[A],I=E+_,b=k+p<<0,k=p+I<<0),E=(k>>>2|k<<30)^(k>>>13|k<<19)^(k>>>22|k<<10),w=(b>>>6|b<<26)^(b>>>11|b<<21)^(b>>>25|b<<7),U=k&T,_=U^k&M^j,C=b&v^~b&d,p=y+w+C+l[A+1]+g[A+1],I=E+_,y=$+p<<0,$=p+I<<0,E=($>>>2|$<<30)^($>>>13|$<<19)^($>>>22|$<<10),w=(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7),D=$&k,_=D^$&T^U,C=y&b^~y&v,p=d+w+C+l[A+2]+g[A+2],I=E+_,d=M+p<<0,M=p+I<<0,E=(M>>>2|M<<30)^(M>>>13|M<<19)^(M>>>22|M<<10),w=(d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7),z=M&$,_=z^M&k^D,C=d&y^~d&b,p=v+w+C+l[A+3]+g[A+3],I=E+_,v=T+p<<0,T=p+I<<0;this.h0=this.h0+T<<0,this.h1=this.h1+M<<0,this.h2=this.h2+$<<0,this.h3=this.h3+k<<0,this.h4=this.h4+v<<0,this.h5=this.h5+d<<0,this.h6=this.h6+y<<0,this.h7=this.h7+b<<0},B.prototype.hex=function(){this.finalize();var T=this.h0,M=this.h1,$=this.h2,k=this.h3,v=this.h4,d=this.h5,y=this.h6,b=this.h7,g=c[T>>28&15]+c[T>>24&15]+c[T>>20&15]+c[T>>16&15]+c[T>>12&15]+c[T>>8&15]+c[T>>4&15]+c[T&15]+c[M>>28&15]+c[M>>24&15]+c[M>>20&15]+c[M>>16&15]+c[M>>12&15]+c[M>>8&15]+c[M>>4&15]+c[M&15]+c[$>>28&15]+c[$>>24&15]+c[$>>20&15]+c[$>>16&15]+c[$>>12&15]+c[$>>8&15]+c[$>>4&15]+c[$&15]+c[k>>28&15]+c[k>>24&15]+c[k>>20&15]+c[k>>16&15]+c[k>>12&15]+c[k>>8&15]+c[k>>4&15]+c[k&15]+c[v>>28&15]+c[v>>24&15]+c[v>>20&15]+c[v>>16&15]+c[v>>12&15]+c[v>>8&15]+c[v>>4&15]+c[v&15]+c[d>>28&15]+c[d>>24&15]+c[d>>20&15]+c[d>>16&15]+c[d>>12&15]+c[d>>8&15]+c[d>>4&15]+c[d&15]+c[y>>28&15]+c[y>>24&15]+c[y>>20&15]+c[y>>16&15]+c[y>>12&15]+c[y>>8&15]+c[y>>4&15]+c[y&15];return this.is224||(g+=c[b>>28&15]+c[b>>24&15]+c[b>>20&15]+c[b>>16&15]+c[b>>12&15]+c[b>>8&15]+c[b>>4&15]+c[b&15]),g},B.prototype.toString=B.prototype.hex,B.prototype.digest=function(){this.finalize();var T=this.h0,M=this.h1,$=this.h2,k=this.h3,v=this.h4,d=this.h5,y=this.h6,b=this.h7,g=[T>>24&255,T>>16&255,T>>8&255,T&255,M>>24&255,M>>16&255,M>>8&255,M&255,$>>24&255,$>>16&255,$>>8&255,$&255,k>>24&255,k>>16&255,k>>8&255,k&255,v>>24&255,v>>16&255,v>>8&255,v&255,d>>24&255,d>>16&255,d>>8&255,d&255,y>>24&255,y>>16&255,y>>8&255,y&255];return this.is224||g.push(b>>24&255,b>>16&255,b>>8&255,b&255),g},B.prototype.array=B.prototype.digest,B.prototype.arrayBuffer=function(){this.finalize();var T=new ArrayBuffer(this.is224?28:32),M=new DataView(T);return M.setUint32(0,this.h0),M.setUint32(4,this.h1),M.setUint32(8,this.h2),M.setUint32(12,this.h3),M.setUint32(16,this.h4),M.setUint32(20,this.h5),M.setUint32(24,this.h6),this.is224||M.setUint32(28,this.h7),T};function R(T,M,$){var k,v=typeof T;if(v==="string"){var d=[],y=T.length,b=0,g;for(k=0;k<y;++k)g=T.charCodeAt(k),g<128?d[b++]=g:g<2048?(d[b++]=192|g>>6,d[b++]=128|g&63):g<55296||g>=57344?(d[b++]=224|g>>12,d[b++]=128|g>>6&63,d[b++]=128|g&63):(g=65536+((g&1023)<<10|T.charCodeAt(++k)&1023),d[b++]=240|g>>18,d[b++]=128|g>>12&63,d[b++]=128|g>>6&63,d[b++]=128|g&63);T=d}else if(v==="object"){if(T===null)throw new Error(t);if(s&&T.constructor===ArrayBuffer)T=new Uint8Array(T);else if(!Array.isArray(T)&&(!s||!ArrayBuffer.isView(T)))throw new Error(t)}else throw new Error(t);T.length>64&&(T=new B(M,!0).update(T).array());var A=[],E=[];for(k=0;k<64;++k){var w=T[k]||0;A[k]=92^w,E[k]=54^w}B.call(this,M,$),this.update(E),this.oKeyPad=A,this.inner=!0,this.sharedMemory=$}R.prototype=new B,R.prototype.finalize=function(){if(B.prototype.finalize.call(this),this.inner){this.inner=!1;var T=this.array();B.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(T),B.prototype.finalize.call(this)}};var L=S();L.sha256=L,L.sha224=S(!0),L.sha256.hmac=F(),L.sha224.hmac=F(!0),i?Dg.exports=L:(r.sha256=L.sha256,r.sha224=L.sha224,a&&define(function(){return L}))})()});var $z={};r0($z,{EventEmitter:()=>th,SignedTransaction:()=>pp,Signer:()=>Rp,actionCreators:()=>yn,allowOnlyLanguage:()=>xve,getActiveAccount:()=>pme,internalActionToNaj:()=>mye,isCurrentBrowserSupported:()=>rye,najActionToInternal:()=>vf,serializeNep413:()=>Bge,setupWalletSelector:()=>dme,translate:()=>Eve,verifyFullKeyBelongsToUser:()=>Rge,verifySignature:()=>Oge,waitFor:()=>lme});function Re(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(f){try{u(n.next(f))}catch(l){a(l)}}function c(f){try{u(n.throw(f))}catch(l){a(l)}}function u(f){f.done?i(f.value):o(f.value).then(s,c)}u((n=n.apply(t,e||[])).next())})}var vU,xU,yE,kF,pf,zg,$p,_e,Sv,Ce,bse,Ir,gse,Iv,vse,Kg,nr,nA,wU,EU,xse,Tv,AU,_U,bE,wse,it,SU,Ese,Ase,ml,_se,Sse,Ise,w4,Tse,Bv,Ov,Bse,Ose,nh,Pse,Rse,oh,E4,at,Cse,br,A4,Nse,Mse,mf,kse,yl,$se,$F,FF,$s,IU,_4,LF,jF,UF,DF,Ao,pv,ih,zF,Fse,Lse,jse,TU,Use,BU,Dse,zse,Kse,qse,Hse,oA,Gse,bl,Wse,Vse,Yse,So,Zse,Jse,iA,S4,I4,T4,Xse,Qse,Pv,KF,ece,aA,tce,rce,qF,HF,GF,sA,nce,oce,va,ice,ace,sce,wn,cce,fce,uce,dce,cA,lce,pce,WF,hce,mce,yce,ol,B4,bce,Gt,gce,VF,YF,vce,xce,wce,Ece,Ace,OU,_ce,Sce,fA,Ice,ZF,gE,Tce,Rv,Bce,Oce,Pce,PU,Rce,Cce,Nce,Mce,kce,$ce,Fce,Lce,JF,xi,jce,Uce,RU,Dce,zce,Kce,qn,qce,Hce,Gce,qg,XF,Wce,O4,Vce,P4,R4,C4,Yce,Zce,Jce,yf,uA,vE,Xce,CU,Qce,dA,efe,tfe,ah,rfe,nfe,xE,ofe,lA,ife,afe,QF,sfe,cfe,ffe,eL,pA,hA,ufe,NU,dfe,lfe,N4,M4,pfe,hfe,tL,wE,mfe,hv,Qp,mv,yfe,bfe,wo,cf,bf,mA,gfe,vfe,Hg,EE,xfe,wfe,MU,Efe,Afe,rL,cv,_fe,Sfe,Ife,Tfe,Bfe,Ofe,Pfe,Rfe,Cfe,Nfe,Fs,yA,Mfe,kfe,$fe,Ffe,sh,Lfe,jfe,Ufe,bA,Dfe,zfe,ch,Kfe,xa,qfe,Hfe,Gfe,nL,kU,Wfe,k4,Vfe,Yfe,Zfe,oL,$U,gA,Jfe,Xfe,Qfe,vA,eue,tue,rue,nue,oue,iue,aue,iL,sue,cue,fue,FU,uue,due,lue,fh,pue,hue,mue,yue,LU,Gg,bue,gue,vue,xue,wue,Eue,or,Fp,Aue,_ue,Wg,jU,Sue,Cv,Iue,Tue,Bue,Oue,Pue,Rue,Cue,Nue,Mue,kue,$ue,Fue,Lue,gl,jue,Uue,Due,aL,uh,sL,zue,Nv,Kue,que,Hue,Gue,cL,xA,Wue,Vue,wA,Yue,Zue,UU,Jue,Xue,Que,fv,ede,tde,rde,nde,ode,gf,ide,ade,DU,sde,cde,fde,zU,KU,EA,ude,dde,Lp,qU,HU,lde,pde,hde,GU,fL,mde,yde,bde,gde,vde,xde,WU,uL,dL,VU,wde,Ede,AA,lL,Ade,_de,Sde,dh,Ide,YU,Tde,Mv,Bde,Ode,Pde,ZU,xn,Rde,Cde,pL,Nde,JU,hL,Mde,mL,kde,$de,Fde,AE,_E,Lde,$4,jde,yL,Ude,F4,Yp,bL,eh,ff,L4,j4,_A,U4,gL,vL,XU,xL,Dde,zde,Kde,QU,eD,qde,Hde,Gde,Wde,ll,Vde,wL,D4,Yde,Zde,Jde,Xde,z4,EL,AL,_L,Vg,SE,el,K4,q4,Yg,SL,jp,Up,Qde,ele,SA,tle,kv,rle,Zp,nle,ole,ile,ale,IL,H4,sle,IE,tD,cle,lh,vl,TL,fle,ule,dle,yv,Ms,pl,BL,OL,lle,ple,hle,uv,mle,yle,ble,rD,IA,gle,vle,xle,nD,bv,TA,oD,$v,iD,wle,Ele,G4,Ale,nl,lf,Zg,aD,TE,BA,BE,_le,Sle,sD,Ile,PL,cD,Tle,OA,fD,Jg,RL,Ble,CL,uD,dD,lD,pD,Ole,NL,Ple,il,sl,OE,ph,Rle,Cle,Nle,Mle,hD,kle,ML,$le,Fle,Lle,jle,PA,Ule,Dle,zle,Kle,qle,Hle,mD,Gle,kL,Wle,Vle,Yle,Zle,Jle,Xle,Qle,e0e,$L,t0e,r0e,FL,n0e,dv,LL,yD,o0e,bD,gD,jL,W4,vD,i0e,a0e,s0e,xD,c0e,f0e,u0e,d0e,l0e,p0e,h0e,m0e,y0e,PE,b0e,g0e,v0e,UL,V4,x0e,w0e,E0e,A0e,_0e,S0e,I0e,T0e,B0e,O0e,P0e,R0e,C0e,N0e,M0e,k0e,$0e,F0e,RE,wD,L0e,j0e,ED,U0e,D0e,z0e,K0e,q0e,H0e,G0e,W0e,DL,V0e,Y0e,Z0e,J0e,zL,KL,CE,NE,AD,Y4,_D,qL,X0e,Xg,lv,Fv,Q0e,epe,tpe,ME,kE,SD,rpe,npe,ope,ipe,ape,spe,cpe,HL,$E,fpe,Lv,upe,dpe,lpe,GL,ppe,hpe,FE,ID,hf,Z4,J4,mpe,TD,ype,bpe,gpe,vpe,xpe,wpe,Epe,Ape,_pe,BD,Spe,Ipe,WL,VL,Tpe,Bpe,X4,Ope,Ppe,OD,Rpe,Cpe,YL,Qg,Dp,ZL,zp,JL,Npe,Mpe,kpe,$pe,RA,XL,PD,Fpe,Lpe,ev,jpe,RD,Upe,Dpe,zpe,QL,Kpe,qpe,Q4,ej,Hpe,tj,CD,Gpe,Wp,rj,Wpe,Vpe,eE,tE,ND,tv,hl,bi,Ype,Zpe,Jpe,Xpe,Qpe,nj,ehe,the,rhe,rE,nhe,ohe,ihe,ahe,tl,oj,she,che,fhe,ij,uhe,dhe,lhe,phe,hhe,mhe,yhe,bhe,ghe,vhe,hh,xhe,whe,Ehe,Ahe,_he,She,Ihe,aj,The,Bhe,MD,Ohe,Phe,Rhe,LE,sj,Che,Nhe,nE,Mhe,khe,$he,cj,fj,Fhe,Lhe,jhe,Uhe,th,Vp,Jp,jE,ya,uj,oE,dj,iE,UE,kD,Dhe,zhe,lj,Khe,qhe,pj,Hhe,DE,$D,Ghe,FD,Whe,hj,LD,Vhe,jD,Yhe,mj,UD,Zhe,DD,Jhe,Xhe,yj,Qhe,bj,CA,eme,tme,gj,rme,vj,xj,Cs,wj,nme,ome,ime,ame,zD,sme,cme,fme,ume,aE,Ej,dme,KD,qD,lme,pme,hme,mme,yme,bme,Aj,_j,Sj,gme,vme,xme,wme,Ij,Eme,Ame,_me,Sme,HD,NA,Ime,MA,kA,Tme,Bme,Ome,Pme,Rme,Cme,Nme,Mme,kme,$me,Fme,al,jv,Lme,jme,Ume,Dme,zme,Kme,qme,Hme,Gme,gv,zE,Wme,Vme,Yme,sE,KE,GD,qE,Zme,Jme,Xme,Tj,Qme,eye,tye,rye,nye,oye,iye,aye,Bj,sye,cye,fye,uye,Oj,dye,lye,$A,WD,VD,pye,hye,vf,mye,YD,yye,bye,gye,vye,xye,ZD,wye,Eye,Pj,Aye,_ye,Sye,Iye,Tye,Bye,Oye,Pye,Rye,Cye,Nye,Mye,kye,ma,$ye,Fye,Lye,jye,Uye,Dye,zye,Rj,Kye,JD,qye,Hye,Cj,XD,Uv,FA,cE,Gye,QD,Wye,Vye,Nj,fE,rv,Yye,Zye,vv,Jye,ez,Xye,Mj,Qye,ebe,tbe,rbe,tz,LA,nbe,kj,cl,Dv,fl,obe,rz,$j,Xp,Fj,Eo,vn,rl,gi,uf,Lj,ibe,xv,abe,sbe,nz,jj,Uj,Dj,zj,Kj,cbe,fbe,nv,Os,Ps,uE,Kp,dE,jA,ube,dbe,lbe,pbe,UA,qj,hbe,mbe,DA,ybe,oz,Hj,Gj,bbe,zA,HE,iz,Wj,gbe,vbe,xbe,GE,wbe,KA,Sr,az,zv,ks,qA,Ebe,Abe,WE,_be,Sbe,Kv,xl,Ibe,Tbe,sz,cz,Bbe,wv,VE,Vj,Yj,vi,_o,Obe,HA,Zj,YE,Ev,ba,fz,Vr,Ns,ul,ga,GA,Pbe,uz,dz,Rbe,Cbe,Nbe,Mbe,Ls,lz,lE,kbe,$be,Fbe,df,pz,Lbe,jbe,Ube,Dbe,zbe,Kbe,qbe,Hbe,hz,Gbe,Wbe,Vbe,Ybe,Zbe,Jbe,mz,Xbe,Qbe,e1e,t1e,r1e,n1e,o1e,i1e,a1e,s1e,c1e,yz,f1e,u1e,Jj,d1e,l1e,p1e,h1e,Xj,m1e,y1e,b1e,g1e,v1e,x1e,w1e,E1e,A1e,Qj,Rs,_1e,S1e,I1e,eU,bz,tU,T1e,B1e,mh,gz,rU,O1e,qp,P1e,R1e,nU,pE,C1e,vz,Hp,N1e,ZE,M1e,k1e,$1e,ov,F1e,oU,L1e,j1e,U1e,xz,wz,iU,WA,D1e,JE,z1e,K1e,Ez,q1e,hE,Az,H1e,G1e,iv,aU,sU,Gp,XE,av,mE,sv,cU,_z,fU,uU,W1e,Sz,V1e,Y1e,Z1e,J1e,X1e,Q1e,ege,tge,rge,nge,oge,ige,age,Iz,Tz,VA,sge,cge,fge,Bz,uge,QE,dU,Oz,dge,lge,eA,pge,hge,mge,tA,yge,bge,Pz,lU,gge,pU,hU,vge,xge,rh,dl,wge,mU,Ege,Age,_ge,Rz,rA,yU,Av,bU,Sge,Cz,Ige,Tge,_v,Nz,Bge,Oge,Pge,Rge,Cge,Nge,Mge,gU,kge,$ge,Fge,Lge,jge,Uge,Dge,zge,Kge,qge,Hge,Gge,Wge,Vge,Yge,Zge,Jge,Xge,Qge,eve,tve,rve,nve,ove,ive,ave,sve,cve,fve,uve,dve,lve,pve,hve,mve,yve,bve,gve,vve,Mz,xve,wve,kz,Eve,qv=N(()=>{k$();vU=Jt(G$(),1);AF();Ig();Ig();NF();v$();m7();xU=Jt(MF(),1);yE=class{constructor(e){this.provider=new Sp(this.urlsToProviders(e))}query(e,r){return typeof e=="string"&&r!==void 0?this.provider.query(e,r):this.provider.query(e)}viewAccessKey({accountId:e,publicKey:r}){return this.query({request_type:"view_access_key",finality:"final",account_id:e,public_key:r})}block(e){return this.provider.block(e)}sendTransaction(e){return this.provider.sendTransaction(e)}urlsToProviders(e){return e&&e.length>0?e.map(r=>new Hd({url:r})):[]}},kF=":",pf=class{constructor(e,r){this.storage=e,this.namespace=Array.isArray(r)?r.join(kF):r}resolveKey(e){return[this.namespace,e].join(kF)}getItem(e){return this.storage.getItem(this.resolveKey(e)).then(r=>typeof r=="string"?JSON.parse(r):null)}setItem(e,r){return this.storage.setItem(this.resolveKey(e),JSON.stringify(r))}removeItem(e){return this.storage.removeItem(this.resolveKey(e))}},zg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},$p=function(t){return t&&t.Math===Math&&t},_e=$p(typeof globalThis=="object"&&globalThis)||$p(typeof window=="object"&&window)||$p(typeof self=="object"&&self)||$p(typeof zg=="object"&&zg)||$p(typeof zg=="object"&&zg)||(function(){return this})()||globalThis,Sv={},Ce=function(t){try{return!!t()}catch{return!0}},bse=Ce,Ir=!bse(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),gse=Ce,Iv=!gse(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),vse=Iv,Kg=Function.prototype.call,nr=vse?Kg.bind(Kg):function(){return Kg.apply(Kg,arguments)},nA={},wU={}.propertyIsEnumerable,EU=Object.getOwnPropertyDescriptor,xse=EU&&!wU.call({1:2},1);nA.f=xse?function(e){var r=EU(this,e);return!!r&&r.enumerable}:wU;Tv=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}},AU=Iv,_U=Function.prototype,bE=_U.call,wse=AU&&_U.bind.bind(bE,bE),it=AU?wse:function(t){return function(){return bE.apply(t,arguments)}},SU=it,Ese=SU({}.toString),Ase=SU("".slice),ml=function(t){return Ase(Ese(t),8,-1)},_se=it,Sse=Ce,Ise=ml,w4=Object,Tse=_se("".split),Bv=Sse(function(){return!w4("z").propertyIsEnumerable(0)})?function(t){return Ise(t)==="String"?Tse(t,""):w4(t)}:w4,Ov=function(t){return t==null},Bse=Ov,Ose=TypeError,nh=function(t){if(Bse(t))throw new Ose("Can't call method on "+t);return t},Pse=Bv,Rse=nh,oh=function(t){return Pse(Rse(t))},E4=typeof document=="object"&&document.all,at=typeof E4>"u"&&E4!==void 0?function(t){return typeof t=="function"||t===E4}:function(t){return typeof t=="function"},Cse=at,br=function(t){return typeof t=="object"?t!==null:Cse(t)},A4=_e,Nse=at,Mse=function(t){return Nse(t)?t:void 0},mf=function(t,e){return arguments.length<2?Mse(A4[t]):A4[t]&&A4[t][e]},kse=it,yl=kse({}.isPrototypeOf),$se=_e,$F=$se.navigator,FF=$F&&$F.userAgent,$s=FF?String(FF):"",IU=_e,_4=$s,LF=IU.process,jF=IU.Deno,UF=LF&&LF.versions||jF&&jF.version,DF=UF&&UF.v8;DF&&(Ao=DF.split("."),pv=Ao[0]>0&&Ao[0]<4?1:+(Ao[0]+Ao[1]));!pv&&_4&&(Ao=_4.match(/Edge\/(\d+)/),(!Ao||Ao[1]>=74)&&(Ao=_4.match(/Chrome\/(\d+)/),Ao&&(pv=+Ao[1])));ih=pv,zF=ih,Fse=Ce,Lse=_e,jse=Lse.String,TU=!!Object.getOwnPropertySymbols&&!Fse(function(){var t=Symbol("symbol detection");return!jse(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&zF&&zF<41}),Use=TU,BU=Use&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Dse=mf,zse=at,Kse=yl,qse=BU,Hse=Object,oA=qse?function(t){return typeof t=="symbol"}:function(t){var e=Dse("Symbol");return zse(e)&&Kse(e.prototype,Hse(t))},Gse=String,bl=function(t){try{return Gse(t)}catch{return"Object"}},Wse=at,Vse=bl,Yse=TypeError,So=function(t){if(Wse(t))return t;throw new Yse(Vse(t)+" is not a function")},Zse=So,Jse=Ov,iA=function(t,e){var r=t[e];return Jse(r)?void 0:Zse(r)},S4=nr,I4=at,T4=br,Xse=TypeError,Qse=function(t,e){var r,n;if(e==="string"&&I4(r=t.toString)&&!T4(n=S4(r,t))||I4(r=t.valueOf)&&!T4(n=S4(r,t))||e!=="string"&&I4(r=t.toString)&&!T4(n=S4(r,t)))return n;throw new Xse("Can't convert object to primitive value")},Pv={exports:{}},KF=_e,ece=Object.defineProperty,aA=function(t,e){try{ece(KF,t,{value:e,configurable:!0,writable:!0})}catch{KF[t]=e}return e},tce=_e,rce=aA,qF="__core-js_shared__",HF=Pv.exports=tce[qF]||rce(qF,{});(HF.versions||(HF.versions=[])).push({version:"3.41.0",mode:"global",copyright:"\xA9 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.41.0/LICENSE",source:"https://github.com/zloirock/core-js"});GF=Pv.exports,sA=function(t,e){return GF[t]||(GF[t]=e||{})},nce=nh,oce=Object,va=function(t){return oce(nce(t))},ice=it,ace=va,sce=ice({}.hasOwnProperty),wn=Object.hasOwn||function(e,r){return sce(ace(e),r)},cce=it,fce=0,uce=Math.random(),dce=cce(1 .toString),cA=function(t){return"Symbol("+(t===void 0?"":t)+")_"+dce(++fce+uce,36)},lce=_e,pce=sA,WF=wn,hce=cA,mce=TU,yce=BU,ol=lce.Symbol,B4=pce("wks"),bce=yce?ol.for||ol:ol&&ol.withoutSetter||hce,Gt=function(t){return WF(B4,t)||(B4[t]=mce&&WF(ol,t)?ol[t]:bce("Symbol."+t)),B4[t]},gce=nr,VF=br,YF=oA,vce=iA,xce=Qse,wce=Gt,Ece=TypeError,Ace=wce("toPrimitive"),OU=function(t,e){if(!VF(t)||YF(t))return t;var r=vce(t,Ace),n;if(r){if(e===void 0&&(e="default"),n=gce(r,t,e),!VF(n)||YF(n))return n;throw new Ece("Can't convert object to primitive value")}return e===void 0&&(e="number"),xce(t,e)},_ce=OU,Sce=oA,fA=function(t){var e=_ce(t,"string");return Sce(e)?e:e+""},Ice=_e,ZF=br,gE=Ice.document,Tce=ZF(gE)&&ZF(gE.createElement),Rv=function(t){return Tce?gE.createElement(t):{}},Bce=Ir,Oce=Ce,Pce=Rv,PU=!Bce&&!Oce(function(){return Object.defineProperty(Pce("div"),"a",{get:function(){return 7}}).a!==7}),Rce=Ir,Cce=nr,Nce=nA,Mce=Tv,kce=oh,$ce=fA,Fce=wn,Lce=PU,JF=Object.getOwnPropertyDescriptor;Sv.f=Rce?JF:function(e,r){if(e=kce(e),r=$ce(r),Lce)try{return JF(e,r)}catch{}if(Fce(e,r))return Mce(!Cce(Nce.f,e,r),e[r])};xi={},jce=Ir,Uce=Ce,RU=jce&&Uce(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Dce=br,zce=String,Kce=TypeError,qn=function(t){if(Dce(t))return t;throw new Kce(zce(t)+" is not an object")},qce=Ir,Hce=PU,Gce=RU,qg=qn,XF=fA,Wce=TypeError,O4=Object.defineProperty,Vce=Object.getOwnPropertyDescriptor,P4="enumerable",R4="configurable",C4="writable";xi.f=qce?Gce?function(e,r,n){if(qg(e),r=XF(r),qg(n),typeof e=="function"&&r==="prototype"&&"value"in n&&C4 in n&&!n[C4]){var o=Vce(e,r);o&&o[C4]&&(e[r]=n.value,n={configurable:R4 in n?n[R4]:o[R4],enumerable:P4 in n?n[P4]:o[P4],writable:!1})}return O4(e,r,n)}:O4:function(e,r,n){if(qg(e),r=XF(r),qg(n),Hce)try{return O4(e,r,n)}catch{}if("get"in n||"set"in n)throw new Wce("Accessors not supported");return"value"in n&&(e[r]=n.value),e};Yce=Ir,Zce=xi,Jce=Tv,yf=Yce?function(t,e,r){return Zce.f(t,e,Jce(1,r))}:function(t,e,r){return t[e]=r,t},uA={exports:{}},vE=Ir,Xce=wn,CU=Function.prototype,Qce=vE&&Object.getOwnPropertyDescriptor,dA=Xce(CU,"name"),efe=dA&&(function(){}).name==="something",tfe=dA&&(!vE||vE&&Qce(CU,"name").configurable),ah={EXISTS:dA,PROPER:efe,CONFIGURABLE:tfe},rfe=it,nfe=at,xE=Pv.exports,ofe=rfe(Function.toString);nfe(xE.inspectSource)||(xE.inspectSource=function(t){return ofe(t)});lA=xE.inspectSource,ife=_e,afe=at,QF=ife.WeakMap,sfe=afe(QF)&&/native code/.test(String(QF)),cfe=sA,ffe=cA,eL=cfe("keys"),pA=function(t){return eL[t]||(eL[t]=ffe(t))},hA={},ufe=sfe,NU=_e,dfe=br,lfe=yf,N4=wn,M4=Pv.exports,pfe=pA,hfe=hA,tL="Object already initialized",wE=NU.TypeError,mfe=NU.WeakMap,yfe=function(t){return mv(t)?Qp(t):hv(t,{})},bfe=function(t){return function(e){var r;if(!dfe(e)||(r=Qp(e)).type!==t)throw new wE("Incompatible receiver, "+t+" required");return r}};ufe||M4.state?(wo=M4.state||(M4.state=new mfe),wo.get=wo.get,wo.has=wo.has,wo.set=wo.set,hv=function(t,e){if(wo.has(t))throw new wE(tL);return e.facade=t,wo.set(t,e),e},Qp=function(t){return wo.get(t)||{}},mv=function(t){return wo.has(t)}):(cf=pfe("state"),hfe[cf]=!0,hv=function(t,e){if(N4(t,cf))throw new wE(tL);return e.facade=t,lfe(t,cf,e),e},Qp=function(t){return N4(t,cf)?t[cf]:{}},mv=function(t){return N4(t,cf)});bf={set:hv,get:Qp,has:mv,enforce:yfe,getterFor:bfe},mA=it,gfe=Ce,vfe=at,Hg=wn,EE=Ir,xfe=ah.CONFIGURABLE,wfe=lA,MU=bf,Efe=MU.enforce,Afe=MU.get,rL=String,cv=Object.defineProperty,_fe=mA("".slice),Sfe=mA("".replace),Ife=mA([].join),Tfe=EE&&!gfe(function(){return cv(function(){},"length",{value:8}).length!==8}),Bfe=String(String).split("String"),Ofe=uA.exports=function(t,e,r){_fe(rL(e),0,7)==="Symbol("&&(e="["+Sfe(rL(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!Hg(t,"name")||xfe&&t.name!==e)&&(EE?cv(t,"name",{value:e,configurable:!0}):t.name=e),Tfe&&r&&Hg(r,"arity")&&t.length!==r.arity&&cv(t,"length",{value:r.arity});try{r&&Hg(r,"constructor")&&r.constructor?EE&&cv(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch{}var n=Efe(t);return Hg(n,"source")||(n.source=Ife(Bfe,typeof e=="string"?e:"")),t};Function.prototype.toString=Ofe(function(){return vfe(this)&&Afe(this).source||wfe(this)},"toString");Pfe=at,Rfe=xi,Cfe=uA.exports,Nfe=aA,Fs=function(t,e,r,n){n||(n={});var o=n.enumerable,i=n.name!==void 0?n.name:e;if(Pfe(r)&&Cfe(r,i,n),n.global)o?t[e]=r:Nfe(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch{}o?t[e]=r:Rfe.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},yA={},Mfe=Math.ceil,kfe=Math.floor,$fe=Math.trunc||function(e){var r=+e;return(r>0?kfe:Mfe)(r)},Ffe=$fe,sh=function(t){var e=+t;return e!==e||e===0?0:Ffe(e)},Lfe=sh,jfe=Math.max,Ufe=Math.min,bA=function(t,e){var r=Lfe(t);return r<0?jfe(r+e,0):Ufe(r,e)},Dfe=sh,zfe=Math.min,ch=function(t){var e=Dfe(t);return e>0?zfe(e,9007199254740991):0},Kfe=ch,xa=function(t){return Kfe(t.length)},qfe=oh,Hfe=bA,Gfe=xa,nL=function(t){return function(e,r,n){var o=qfe(e),i=Gfe(o);if(i===0)return!t&&-1;var a=Hfe(n,i),s;if(t&&r!==r){for(;i>a;)if(s=o[a++],s!==s)return!0}else for(;i>a;a++)if((t||a in o)&&o[a]===r)return t||a||0;return!t&&-1}},kU={includes:nL(!0),indexOf:nL(!1)},Wfe=it,k4=wn,Vfe=oh,Yfe=kU.indexOf,Zfe=hA,oL=Wfe([].push),$U=function(t,e){var r=Vfe(t),n=0,o=[],i;for(i in r)!k4(Zfe,i)&&k4(r,i)&&oL(o,i);for(;e.length>n;)k4(r,i=e[n++])&&(~Yfe(o,i)||oL(o,i));return o},gA=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Jfe=$U,Xfe=gA,Qfe=Xfe.concat("length","prototype");yA.f=Object.getOwnPropertyNames||function(e){return Jfe(e,Qfe)};vA={};vA.f=Object.getOwnPropertySymbols;eue=mf,tue=it,rue=yA,nue=vA,oue=qn,iue=tue([].concat),aue=eue("Reflect","ownKeys")||function(e){var r=rue.f(oue(e)),n=nue.f;return n?iue(r,n(e)):r},iL=wn,sue=aue,cue=Sv,fue=xi,FU=function(t,e,r){for(var n=sue(e),o=fue.f,i=cue.f,a=0;a<n.length;a++){var s=n[a];!iL(t,s)&&!(r&&iL(r,s))&&o(t,s,i(e,s))}},uue=Ce,due=at,lue=/#|\.prototype\./,fh=function(t,e){var r=hue[pue(t)];return r===yue?!0:r===mue?!1:due(e)?uue(e):!!e},pue=fh.normalize=function(t){return String(t).replace(lue,".").toLowerCase()},hue=fh.data={},mue=fh.NATIVE="N",yue=fh.POLYFILL="P",LU=fh,Gg=_e,bue=Sv.f,gue=yf,vue=Fs,xue=aA,wue=FU,Eue=LU,or=function(t,e){var r=t.target,n=t.global,o=t.stat,i,a,s,c,u,f;if(n?a=Gg:o?a=Gg[r]||xue(r,{}):a=Gg[r]&&Gg[r].prototype,a)for(s in e){if(u=e[s],t.dontCallGetSet?(f=bue(a,s),c=f&&f.value):c=a[s],i=Eue(n?s:r+(o?".":"#")+s,t.forced),!i&&c!==void 0){if(typeof u==typeof c)continue;wue(u,c)}(t.sham||c&&c.sham)&&gue(u,"sham",!0),vue(a,s,u,t)}},Fp=_e,Aue=$s,_ue=ml,Wg=function(t){return Aue.slice(0,t.length)===t},jU=(function(){return Wg("Bun/")?"BUN":Wg("Cloudflare-Workers")?"CLOUDFLARE":Wg("Deno/")?"DENO":Wg("Node.js/")?"NODE":Fp.Bun&&typeof Bun.version=="string"?"BUN":Fp.Deno&&typeof Deno.version=="object"?"DENO":_ue(Fp.process)==="process"?"NODE":Fp.window&&Fp.document?"BROWSER":"REST"})(),Sue=jU,Cv=Sue==="NODE",Iue=it,Tue=So,Bue=function(t,e,r){try{return Iue(Tue(Object.getOwnPropertyDescriptor(t,e)[r]))}catch{}},Oue=br,Pue=function(t){return Oue(t)||t===null},Rue=Pue,Cue=String,Nue=TypeError,Mue=function(t){if(Rue(t))return t;throw new Nue("Can't set "+Cue(t)+" as a prototype")},kue=Bue,$ue=br,Fue=nh,Lue=Mue,gl=Object.setPrototypeOf||("__proto__"in{}?(function(){var t=!1,e={},r;try{r=kue(Object.prototype,"__proto__","set"),r(e,[]),t=e instanceof Array}catch{}return function(o,i){return Fue(o),Lue(i),$ue(o)&&(t?r(o,i):o.__proto__=i),o}})():void 0),jue=xi.f,Uue=wn,Due=Gt,aL=Due("toStringTag"),uh=function(t,e,r){t&&!r&&(t=t.prototype),t&&!Uue(t,aL)&&jue(t,aL,{configurable:!0,value:e})},sL=uA.exports,zue=xi,Nv=function(t,e,r){return r.get&&sL(r.get,e,{getter:!0}),r.set&&sL(r.set,e,{setter:!0}),zue.f(t,e,r)},Kue=mf,que=Nv,Hue=Gt,Gue=Ir,cL=Hue("species"),xA=function(t){var e=Kue(t);Gue&&e&&!e[cL]&&que(e,cL,{configurable:!0,get:function(){return this}})},Wue=yl,Vue=TypeError,wA=function(t,e){if(Wue(e,t))return t;throw new Vue("Incorrect invocation")},Yue=Gt,Zue=Yue("toStringTag"),UU={};UU[Zue]="z";Jue=String(UU)==="[object z]",Xue=Jue,Que=at,fv=ml,ede=Gt,tde=ede("toStringTag"),rde=Object,nde=fv((function(){return arguments})())==="Arguments",ode=function(t,e){try{return t[e]}catch{}},gf=Xue?fv:function(t){var e,r,n;return t===void 0?"Undefined":t===null?"Null":typeof(r=ode(e=rde(t),tde))=="string"?r:nde?fv(e):(n=fv(e))==="Object"&&Que(e.callee)?"Arguments":n},ide=it,ade=Ce,DU=at,sde=gf,cde=mf,fde=lA,zU=function(){},KU=cde("Reflect","construct"),EA=/^\s*(?:class|function)\b/,ude=ide(EA.exec),dde=!EA.test(zU),Lp=function(e){if(!DU(e))return!1;try{return KU(zU,[],e),!0}catch{return!1}},qU=function(e){if(!DU(e))return!1;switch(sde(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return dde||!!ude(EA,fde(e))}catch{return!0}};qU.sham=!0;HU=!KU||ade(function(){var t;return Lp(Lp.call)||!Lp(Object)||!Lp(function(){t=!0})||t})?qU:Lp,lde=HU,pde=bl,hde=TypeError,GU=function(t){if(lde(t))return t;throw new hde(pde(t)+" is not a constructor")},fL=qn,mde=GU,yde=Ov,bde=Gt,gde=bde("species"),vde=function(t,e){var r=fL(t).constructor,n;return r===void 0||yde(n=fL(r)[gde])?e:mde(n)},xde=Iv,WU=Function.prototype,uL=WU.apply,dL=WU.call,VU=typeof Reflect=="object"&&Reflect.apply||(xde?dL.bind(uL):function(){return dL.apply(uL,arguments)}),wde=ml,Ede=it,AA=function(t){if(wde(t)==="Function")return Ede(t)},lL=AA,Ade=So,_de=Iv,Sde=lL(lL.bind),dh=function(t,e){return Ade(t),e===void 0?t:_de?Sde(t,e):function(){return t.apply(e,arguments)}},Ide=mf,YU=Ide("document","documentElement"),Tde=it,Mv=Tde([].slice),Bde=TypeError,Ode=function(t,e){if(t<e)throw new Bde("Not enough arguments");return t},Pde=$s,ZU=/(?:ipad|iphone|ipod).*applewebkit/i.test(Pde),xn=_e,Rde=VU,Cde=dh,pL=at,Nde=wn,JU=Ce,hL=YU,Mde=Mv,mL=Rv,kde=Ode,$de=ZU,Fde=Cv,AE=xn.setImmediate,_E=xn.clearImmediate,Lde=xn.process,$4=xn.Dispatch,jde=xn.Function,yL=xn.MessageChannel,Ude=xn.String,F4=0,Yp={},bL="onreadystatechange";JU(function(){eh=xn.location});_A=function(t){if(Nde(Yp,t)){var e=Yp[t];delete Yp[t],e()}},U4=function(t){return function(){_A(t)}},gL=function(t){_A(t.data)},vL=function(t){xn.postMessage(Ude(t),eh.protocol+"//"+eh.host)};(!AE||!_E)&&(AE=function(e){kde(arguments.length,1);var r=pL(e)?e:jde(e),n=Mde(arguments,1);return Yp[++F4]=function(){Rde(r,void 0,n)},ff(F4),F4},_E=function(e){delete Yp[e]},Fde?ff=function(t){Lde.nextTick(U4(t))}:$4&&$4.now?ff=function(t){$4.now(U4(t))}:yL&&!$de?(L4=new yL,j4=L4.port2,L4.port1.onmessage=gL,ff=Cde(j4.postMessage,j4)):xn.addEventListener&&pL(xn.postMessage)&&!xn.importScripts&&eh&&eh.protocol!=="file:"&&!JU(vL)?(ff=vL,xn.addEventListener("message",gL,!1)):bL in mL("script")?ff=function(t){hL.appendChild(mL("script"))[bL]=function(){hL.removeChild(this),_A(t)}}:ff=function(t){setTimeout(U4(t),0)});XU={set:AE,clear:_E},xL=_e,Dde=Ir,zde=Object.getOwnPropertyDescriptor,Kde=function(t){if(!Dde)return xL[t];var e=zde(xL,t);return e&&e.value},QU=function(){this.head=null,this.tail=null};QU.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t){var e=this.head=t.next;return e===null&&(this.tail=null),t.item}}};eD=QU,qde=$s,Hde=/ipad|iphone|ipod/i.test(qde)&&typeof Pebble<"u",Gde=$s,Wde=/web0s(?!.*chrome)/i.test(Gde),ll=_e,Vde=Kde,wL=dh,D4=XU.set,Yde=eD,Zde=ZU,Jde=Hde,Xde=Wde,z4=Cv,EL=ll.MutationObserver||ll.WebKitMutationObserver,AL=ll.document,_L=ll.process,Vg=ll.Promise,SE=Vde("queueMicrotask");SE||(jp=new Yde,Up=function(){var t,e;for(z4&&(t=_L.domain)&&t.exit();e=jp.get();)try{e()}catch(r){throw jp.head&&el(),r}t&&t.enter()},!Zde&&!z4&&!Xde&&EL&&AL?(K4=!0,q4=AL.createTextNode(""),new EL(Up).observe(q4,{characterData:!0}),el=function(){q4.data=K4=!K4}):!Jde&&Vg&&Vg.resolve?(Yg=Vg.resolve(void 0),Yg.constructor=Vg,SL=wL(Yg.then,Yg),el=function(){SL(Up)}):z4?el=function(){_L.nextTick(Up)}:(D4=wL(D4,ll),el=function(){D4(Up)}),SE=function(t){jp.head||el(),jp.add(t)});Qde=SE,ele=function(t,e){try{arguments.length===1?console.error(t):console.error(t,e)}catch{}},SA=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}},tle=_e,kv=tle.Promise,rle=_e,Zp=kv,nle=at,ole=LU,ile=lA,ale=Gt,IL=jU,H4=ih;Zp&&Zp.prototype;sle=ale("species"),IE=!1,tD=nle(rle.PromiseRejectionEvent),cle=ole("Promise",function(){var t=ile(Zp),e=t!==String(Zp);if(!e&&H4===66)return!0;if(!H4||H4<51||!/native code/.test(t)){var r=new Zp(function(i){i(1)}),n=function(i){i(function(){},function(){})},o=r.constructor={};if(o[sle]=n,IE=r.then(function(){})instanceof n,!IE)return!0}return!e&&(IL==="BROWSER"||IL==="DENO")&&!tD}),lh={CONSTRUCTOR:cle,REJECTION_EVENT:tD,SUBCLASSING:IE},vl={},TL=So,fle=TypeError,ule=function(t){var e,r;this.promise=new t(function(n,o){if(e!==void 0||r!==void 0)throw new fle("Bad Promise constructor");e=n,r=o}),this.resolve=TL(e),this.reject=TL(r)};vl.f=function(t){return new ule(t)};dle=or,yv=Cv,Ms=_e,pl=nr,BL=Fs,OL=gl,lle=uh,ple=xA,hle=So,uv=at,mle=br,yle=wA,ble=vde,rD=XU.set,IA=Qde,gle=ele,vle=SA,xle=eD,nD=bf,bv=kv,TA=lh,oD=vl,$v="Promise",iD=TA.CONSTRUCTOR,wle=TA.REJECTION_EVENT,Ele=TA.SUBCLASSING,G4=nD.getterFor($v),Ale=nD.set,nl=bv&&bv.prototype,lf=bv,Zg=nl,aD=Ms.TypeError,TE=Ms.document,BA=Ms.process,BE=oD.f,_le=BE,Sle=!!(TE&&TE.createEvent&&Ms.dispatchEvent),sD="unhandledrejection",Ile="rejectionhandled",PL=0,cD=1,Tle=2,OA=1,fD=2,uD=function(t){var e;return mle(t)&&uv(e=t.then)?e:!1},dD=function(t,e){var r=e.value,n=e.state===cD,o=n?t.ok:t.fail,i=t.resolve,a=t.reject,s=t.domain,c,u,f;try{o?(n||(e.rejection===fD&&Ple(e),e.rejection=OA),o===!0?c=r:(s&&s.enter(),c=o(r),s&&(s.exit(),f=!0)),c===t.promise?a(new aD("Promise-chain cycle")):(u=uD(c))?pl(u,c,i,a):i(c)):a(r)}catch(l){s&&!f&&s.exit(),a(l)}},lD=function(t,e){t.notified||(t.notified=!0,IA(function(){for(var r=t.reactions,n;n=r.get();)dD(n,t);t.notified=!1,e&&!t.rejection&&Ole(t)}))},pD=function(t,e,r){var n,o;Sle?(n=TE.createEvent("Event"),n.promise=e,n.reason=r,n.initEvent(t,!1,!0),Ms.dispatchEvent(n)):n={promise:e,reason:r},!wle&&(o=Ms["on"+t])?o(n):t===sD&&gle("Unhandled promise rejection",r)},Ole=function(t){pl(rD,Ms,function(){var e=t.facade,r=t.value,n=NL(t),o;if(n&&(o=vle(function(){yv?BA.emit("unhandledRejection",r,e):pD(sD,e,r)}),t.rejection=yv||NL(t)?fD:OA,o.error))throw o.value})},NL=function(t){return t.rejection!==OA&&!t.parent},Ple=function(t){pl(rD,Ms,function(){var e=t.facade;yv?BA.emit("rejectionHandled",e):pD(Ile,e,t.value)})},il=function(t,e,r){return function(n){t(e,n,r)}},sl=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=Tle,lD(t,!0))},OE=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw new aD("Promise can't be resolved itself");var n=uD(e);n?IA(function(){var o={done:!1};try{pl(n,e,il(OE,o,t),il(sl,o,t))}catch(i){sl(o,i,t)}}):(t.value=e,t.state=cD,lD(t,!1))}catch(o){sl({done:!1},o,t)}}};if(iD&&(lf=function(e){yle(this,Zg),hle(e),pl(Jg,this);var r=G4(this);try{e(il(OE,r),il(sl,r))}catch(n){sl(r,n)}},Zg=lf.prototype,Jg=function(e){Ale(this,{type:$v,done:!1,notified:!1,parent:!1,reactions:new xle,rejection:!1,state:PL,value:null})},Jg.prototype=BL(Zg,"then",function(e,r){var n=G4(this),o=BE(ble(this,lf));return n.parent=!0,o.ok=uv(e)?e:!0,o.fail=uv(r)&&r,o.domain=yv?BA.domain:void 0,n.state===PL?n.reactions.add(o):IA(function(){dD(o,n)}),o.promise}),RL=function(){var t=new Jg,e=G4(t);this.promise=t,this.resolve=il(OE,e),this.reject=il(sl,e)},oD.f=BE=function(t){return t===lf||t===Ble?new RL(t):_le(t)},uv(bv)&&nl!==Object.prototype)){CL=nl.then,Ele||BL(nl,"then",function(e,r){var n=this;return new lf(function(o,i){pl(CL,n,o,i)}).then(e,r)},{unsafe:!0});try{delete nl.constructor}catch{}OL&&OL(nl,Zg)}dle({global:!0,constructor:!0,wrap:!0,forced:iD},{Promise:lf});lle(lf,$v,!1);ple($v);ph={},Rle=Gt,Cle=ph,Nle=Rle("iterator"),Mle=Array.prototype,hD=function(t){return t!==void 0&&(Cle.Array===t||Mle[Nle]===t)},kle=gf,ML=iA,$le=Ov,Fle=ph,Lle=Gt,jle=Lle("iterator"),PA=function(t){if(!$le(t))return ML(t,jle)||ML(t,"@@iterator")||Fle[kle(t)]},Ule=nr,Dle=So,zle=qn,Kle=bl,qle=PA,Hle=TypeError,mD=function(t,e){var r=arguments.length<2?qle(t):e;if(Dle(r))return zle(Ule(r,t));throw new Hle(Kle(t)+" is not iterable")},Gle=nr,kL=qn,Wle=iA,Vle=function(t,e,r){var n,o;kL(t);try{if(n=Wle(t,"return"),!n){if(e==="throw")throw r;return r}n=Gle(n,t)}catch(i){o=!0,n=i}if(e==="throw")throw r;if(o)throw n;return kL(n),r},Yle=dh,Zle=nr,Jle=qn,Xle=bl,Qle=hD,e0e=xa,$L=yl,t0e=mD,r0e=PA,FL=Vle,n0e=TypeError,dv=function(t,e){this.stopped=t,this.result=e},LL=dv.prototype,yD=function(t,e,r){var n=r&&r.that,o=!!(r&&r.AS_ENTRIES),i=!!(r&&r.IS_RECORD),a=!!(r&&r.IS_ITERATOR),s=!!(r&&r.INTERRUPTED),c=Yle(e,n),u,f,l,h,m,x,S,O=function(F){return u&&FL(u,"normal",F),new dv(!0,F)},P=function(F){return o?(Jle(F),s?c(F[0],F[1],O):c(F[0],F[1])):s?c(F,O):c(F)};if(i)u=t.iterator;else if(a)u=t;else{if(f=r0e(t),!f)throw new n0e(Xle(t)+" is not iterable");if(Qle(f)){for(l=0,h=e0e(t);h>l;l++)if(m=P(t[l]),m&&$L(LL,m))return m;return new dv(!1)}u=t0e(t,f)}for(x=i?t.next:u.next;!(S=Zle(x,u)).done;){try{m=P(S.value)}catch(F){FL(u,"throw",F)}if(typeof m=="object"&&m&&$L(LL,m))return m}return new dv(!1)},o0e=Gt,bD=o0e("iterator"),gD=!1;try{jL=0,W4={next:function(){return{done:!!jL++}},return:function(){gD=!0}},W4[bD]=function(){return this},Array.from(W4,function(){throw 2})}catch{}vD=function(t,e){try{if(!e&&!gD)return!1}catch{return!1}var r=!1;try{var n={};n[bD]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch{}return r},i0e=kv,a0e=vD,s0e=lh.CONSTRUCTOR,xD=s0e||!a0e(function(t){i0e.all(t).then(void 0,function(){})}),c0e=or,f0e=nr,u0e=So,d0e=vl,l0e=SA,p0e=yD,h0e=xD;c0e({target:"Promise",stat:!0,forced:h0e},{all:function(e){var r=this,n=d0e.f(r),o=n.resolve,i=n.reject,a=l0e(function(){var s=u0e(r.resolve),c=[],u=0,f=1;p0e(e,function(l){var h=u++,m=!1;f++,f0e(s,r,l).then(function(x){m||(m=!0,c[h]=x,--f||o(c))},i)}),--f||o(c)});return a.error&&i(a.value),n.promise}});m0e=or,y0e=lh.CONSTRUCTOR,PE=kv,b0e=mf,g0e=at,v0e=Fs,UL=PE&&PE.prototype;m0e({target:"Promise",proto:!0,forced:y0e,real:!0},{catch:function(t){return this.then(void 0,t)}});g0e(PE)&&(V4=b0e("Promise").prototype.catch,UL.catch!==V4&&v0e(UL,"catch",V4,{unsafe:!0}));x0e=or,w0e=nr,E0e=So,A0e=vl,_0e=SA,S0e=yD,I0e=xD;x0e({target:"Promise",stat:!0,forced:I0e},{race:function(e){var r=this,n=A0e.f(r),o=n.reject,i=_0e(function(){var a=E0e(r.resolve);S0e(e,function(s){w0e(a,r,s).then(n.resolve,o)})});return i.error&&o(i.value),n.promise}});T0e=or,B0e=vl,O0e=lh.CONSTRUCTOR;T0e({target:"Promise",stat:!0,forced:O0e},{reject:function(e){var r=B0e.f(this),n=r.reject;return n(e),r.promise}});P0e=qn,R0e=br,C0e=vl,N0e=function(t,e){if(P0e(t),R0e(e)&&e.constructor===t)return e;var r=C0e.f(t),n=r.resolve;return n(e),r.promise},M0e=or,k0e=mf,$0e=lh.CONSTRUCTOR,F0e=N0e;k0e("Promise");M0e({target:"Promise",stat:!0,forced:$0e},{resolve:function(e){return F0e(this,e)}});RE=class{getItem(e){return typeof localStorage>"u"?Promise.resolve(null):new Promise(r=>{let n=localStorage.getItem(e);r(n)})}setItem(e,r){return typeof localStorage>"u"?Promise.resolve():new Promise(n=>{localStorage.setItem(e,r),n()})}removeItem(e){return typeof localStorage>"u"?Promise.resolve():new Promise(r=>{localStorage.removeItem(e),r()})}},wD={},L0e=$U,j0e=gA,ED=Object.keys||function(e){return L0e(e,j0e)},U0e=Ir,D0e=RU,z0e=xi,K0e=qn,q0e=oh,H0e=ED;wD.f=U0e&&!D0e?Object.defineProperties:function(e,r){K0e(e);for(var n=q0e(r),o=H0e(r),i=o.length,a=0,s;i>a;)z0e.f(e,s=o[a++],n[s]);return e};G0e=qn,W0e=wD,DL=gA,V0e=hA,Y0e=YU,Z0e=Rv,J0e=pA,zL=">",KL="<",CE="prototype",NE="script",AD=J0e("IE_PROTO"),Y4=function(){},_D=function(t){return KL+NE+zL+t+KL+"/"+NE+zL},qL=function(t){t.write(_D("")),t.close();var e=t.parentWindow.Object;return t=null,e},X0e=function(){var t=Z0e("iframe"),e="java"+NE+":",r;return t.style.display="none",Y0e.appendChild(t),t.src=String(e),r=t.contentWindow.document,r.open(),r.write(_D("document.F=Object")),r.close(),r.F},lv=function(){try{Xg=new ActiveXObject("htmlfile")}catch{}lv=typeof document<"u"?document.domain&&Xg?qL(Xg):X0e():qL(Xg);for(var t=DL.length;t--;)delete lv[CE][DL[t]];return lv()};V0e[AD]=!0;Fv=Object.create||function(e,r){var n;return e!==null?(Y4[CE]=G0e(e),n=new Y4,Y4[CE]=null,n[AD]=e):n=lv(),r===void 0?n:W0e.f(n,r)},Q0e=Gt,epe=Fv,tpe=xi.f,ME=Q0e("unscopables"),kE=Array.prototype;kE[ME]===void 0&&tpe(kE,ME,{configurable:!0,value:epe(null)});SD=function(t){kE[ME][t]=!0},rpe=Ce,npe=!rpe(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),ope=wn,ipe=at,ape=va,spe=pA,cpe=npe,HL=spe("IE_PROTO"),$E=Object,fpe=$E.prototype,Lv=cpe?$E.getPrototypeOf:function(t){var e=ape(t);if(ope(e,HL))return e[HL];var r=e.constructor;return ipe(r)&&e instanceof r?r.prototype:e instanceof $E?fpe:null},upe=Ce,dpe=at,lpe=br,GL=Lv,ppe=Fs,hpe=Gt,FE=hpe("iterator"),ID=!1;[].keys&&(J4=[].keys(),"next"in J4?(Z4=GL(GL(J4)),Z4!==Object.prototype&&(hf=Z4)):ID=!0);mpe=!lpe(hf)||upe(function(){var t={};return hf[FE].call(t)!==t});mpe&&(hf={});dpe(hf[FE])||ppe(hf,FE,function(){return this});TD={IteratorPrototype:hf,BUGGY_SAFARI_ITERATORS:ID},ype=TD.IteratorPrototype,bpe=Fv,gpe=Tv,vpe=uh,xpe=ph,wpe=function(){return this},Epe=function(t,e,r,n){var o=e+" Iterator";return t.prototype=bpe(ype,{next:gpe(+!n,r)}),vpe(t,o,!1),xpe[o]=wpe,t},Ape=or,_pe=nr,BD=ah,Spe=at,Ipe=Epe,WL=Lv,VL=gl,Tpe=uh,Bpe=yf,X4=Fs,Ope=Gt,Ppe=ph,OD=TD,Rpe=BD.PROPER,Cpe=BD.CONFIGURABLE,YL=OD.IteratorPrototype,Qg=OD.BUGGY_SAFARI_ITERATORS,Dp=Ope("iterator"),ZL="keys",zp="values",JL="entries",Npe=function(){return this},Mpe=function(t,e,r,n,o,i,a){Ipe(r,e,n);var s=function(P){if(P===o&&h)return h;if(!Qg&&P&&P in f)return f[P];switch(P){case ZL:return function(){return new r(this,P)};case zp:return function(){return new r(this,P)};case JL:return function(){return new r(this,P)}}return function(){return new r(this)}},c=e+" Iterator",u=!1,f=t.prototype,l=f[Dp]||f["@@iterator"]||o&&f[o],h=!Qg&&l||s(o),m=e==="Array"&&f.entries||l,x,S,O;if(m&&(x=WL(m.call(new t)),x!==Object.prototype&&x.next&&(WL(x)!==YL&&(VL?VL(x,YL):Spe(x[Dp])||X4(x,Dp,Npe)),Tpe(x,c,!0))),Rpe&&o===zp&&l&&l.name!==zp&&(Cpe?Bpe(f,"name",zp):(u=!0,h=function(){return _pe(l,this)})),o)if(S={values:s(zp),keys:i?h:s(ZL),entries:s(JL)},a)for(O in S)(Qg||u||!(O in f))&&X4(f,O,S[O]);else Ape({target:e,proto:!0,forced:Qg||u},S);return f[Dp]!==h&&X4(f,Dp,h,{name:o}),Ppe[e]=h,S},kpe=function(t,e){return{value:t,done:e}},$pe=oh,RA=SD,XL=ph,PD=bf,Fpe=xi.f,Lpe=Mpe,ev=kpe,jpe=Ir,RD="Array Iterator",Upe=PD.set,Dpe=PD.getterFor(RD),zpe=Lpe(Array,"Array",function(t,e){Upe(this,{type:RD,target:$pe(t),index:0,kind:e})},function(){var t=Dpe(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,ev(void 0,!0);switch(t.kind){case"keys":return ev(r,!1);case"values":return ev(e[r],!1)}return ev([r,e[r]],!1)},"values"),QL=XL.Arguments=XL.Array;RA("keys");RA("values");RA("entries");if(jpe&&QL.name!=="values")try{Fpe(QL,"name",{value:"values"})}catch{}Kpe={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},qpe=Rv,Q4=qpe("span").classList,ej=Q4&&Q4.constructor&&Q4.constructor.prototype,Hpe=ej===Object.prototype?void 0:ej,tj=_e,CD=Kpe,Gpe=Hpe,Wp=zpe,rj=yf,Wpe=uh,Vpe=Gt,eE=Vpe("iterator"),tE=Wp.values,ND=function(t,e){if(t){if(t[eE]!==tE)try{rj(t,eE,tE)}catch{t[eE]=tE}if(Wpe(t,e,!0),CD[e]){for(var r in Wp)if(t[r]!==Wp[r])try{rj(t,r,Wp[r])}catch{t[r]=Wp[r]}}}};for(tv in CD)ND(tj[tv]&&tj[tv].prototype,tv);ND(Gpe,"DOMTokenList");hl=class t{constructor(e){this.namespace=e}emit(e,...r){if(t.debug){if(this.namespace&&e!=="error"){console[e](this.namespace,...r);return}console[e](...r)}}log(...e){this.emit("log",...e)}info(...e){this.emit("info",...e)}warn(...e){this.emit("warn",...e)}error(...e){this.emit("error",...e)}};hl.debug=!1;bi=new hl,Ype=or,Zpe=kU.includes,Jpe=Ce,Xpe=SD,Qpe=Jpe(function(){return!Array(1).includes()});Ype({target:"Array",proto:!0,forced:Qpe},{includes:function(e){return Zpe(this,e,arguments.length>1?arguments[1]:void 0)}});Xpe("includes");nj=Ir,ehe=it,the=nr,rhe=Ce,rE=ED,nhe=vA,ohe=nA,ihe=va,ahe=Bv,tl=Object.assign,oj=Object.defineProperty,she=ehe([].concat),che=!tl||rhe(function(){if(nj&&tl({b:1},tl(oj({},"a",{enumerable:!0,get:function(){oj(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var t={},e={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach(function(o){e[o]=o}),tl({},t)[r]!==7||rE(tl({},e)).join("")!==n})?function(e,r){for(var n=ihe(e),o=arguments.length,i=1,a=nhe.f,s=ohe.f;o>i;)for(var c=ahe(arguments[i++]),u=a?she(rE(c),a(c)):rE(c),f=u.length,l=0,h;f>l;)h=u[l++],(!nj||the(s,c,h))&&(n[h]=c[h]);return n}:tl,fhe=or,ij=che;fhe({target:"Object",stat:!0,arity:2,forced:Object.assign!==ij},{assign:ij});uhe=br,dhe=ml,lhe=Gt,phe=lhe("match"),hhe=function(t){var e;return uhe(t)&&((e=t[phe])!==void 0?!!e:dhe(t)==="RegExp")},mhe=hhe,yhe=TypeError,bhe=function(t){if(mhe(t))throw new yhe("The method doesn't accept regular expressions");return t},ghe=gf,vhe=String,hh=function(t){if(ghe(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return vhe(t)},xhe=Gt,whe=xhe("match"),Ehe=function(t){var e=/./;try{"/./"[t](e)}catch{try{return e[whe]=!1,"/./"[t](e)}catch{}}return!1},Ahe=or,_he=it,She=bhe,Ihe=nh,aj=hh,The=Ehe,Bhe=_he("".indexOf);Ahe({target:"String",proto:!0,forced:!The("includes")},{includes:function(e){return!!~Bhe(aj(Ihe(this)),aj(She(e)),arguments.length>1?arguments[1]:void 0)}});MD=`
|
|
47
|
+
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`,Ohe=it,Phe=nh,Rhe=hh,LE=MD,sj=Ohe("".replace),Che=RegExp("^["+LE+"]+"),Nhe=RegExp("(^|[^"+LE+"])["+LE+"]+$"),nE=function(t){return function(e){var r=Rhe(Phe(e));return t&1&&(r=sj(r,Che,"")),t&2&&(r=sj(r,Nhe,"$1")),r}},Mhe={start:nE(1),end:nE(2),trim:nE(3)},khe=ah.PROPER,$he=Ce,cj=MD,fj="\u200B\x85\u180E",Fhe=function(t){return $he(function(){return!!cj[t]()||fj[t]()!==fj||khe&&cj[t].name!==t})},Lhe=or,jhe=Mhe.trim,Uhe=Fhe;Lhe({target:"String",proto:!0,forced:Uhe("trim")},{trim:function(){return jhe(this)}});th=class{constructor(){this.emitter=new vU.EventEmitter}on(e,r){return this.emitter.on(e,r),{remove:()=>this.emitter.off(e,r)}}off(e,r){this.emitter.off(e,r)}emit(e,r){this.emitter.emit(e,r)}},Vp="near-wallet-selector",Jp="recentlySignedInWallets",jE="rememberRecentWallets",ya={ENABLED:"enabled",DISABLED:"disabled"},uj="contract",oE="contract:pending",dj="selectedWalletId",iE="selectedWalletId:pending",UE=class{constructor({factories:e,storage:r,options:n,store:o,emitter:i,provider:a}){this.factories=e,this.storage=r,this.options=n,this.store=o,this.emitter=i,this.provider=a,this.modules=[],this.instances={}}validateWallet(e){return Re(this,void 0,void 0,function*(){let r=[],n=yield this.getWallet(e);return n&&(r=yield n.getAccounts().catch(o=>(bi.log(`Failed to validate ${n.id} during setup`),bi.error(o),[]))),r})}resolveStorageState(){return Re(this,void 0,void 0,function*(){let e=new pf(this.storage,Vp),r=yield e.getItem(iE),n=yield e.getItem(oE),o=yield e.getItem(jE);if(r&&n){let u=yield this.validateWallet(r);if(yield e.removeItem(iE),yield e.removeItem(oE),u.length){let{selectedWalletId:f}=this.store.getState(),l=yield this.getWallet(f);l&&r!==f&&(yield l.signOut().catch(m=>{bi.log("Failed to sign out existing wallet"),bi.error(m)}));let h=[];return o===ya.ENABLED&&(h=yield this.setWalletAsRecentlySignedIn(r)),{accounts:u,contract:n,selectedWalletId:r,recentlySignedInWallets:h,rememberRecentWallets:o||ya.ENABLED}}}let{contract:i,selectedWalletId:a}=this.store.getState(),s=yield this.validateWallet(a),c=yield e.getItem(Jp);return s.length?{accounts:s,contract:i,selectedWalletId:a,recentlySignedInWallets:c||[],rememberRecentWallets:o||ya.ENABLED}:{accounts:[],contract:null,selectedWalletId:null,recentlySignedInWallets:c||[],rememberRecentWallets:o||ya.ENABLED}})}setWalletAsRecentlySignedIn(e){return Re(this,void 0,void 0,function*(){let r=new pf(this.storage,Vp),n=yield r.getItem(Jp);return n||(n=[]),n.includes(e)||(n.unshift(e),n=n.slice(0,5),yield r.setItem(Jp,n)),n})}signOutWallet(e){return Re(this,void 0,void 0,function*(){let r=yield this.getWallet(e);yield r.signOut().catch(n=>{bi.log(`Failed to sign out ${r.id}`),bi.error(n),this.onWalletSignedOut(r.id)})})}onWalletSignedIn(e,{accounts:r,contractId:n,methodNames:o}){return Re(this,void 0,void 0,function*(){n=n||"";let{selectedWalletId:i,rememberRecentWallets:a}=this.store.getState(),s=new pf(this.storage,Vp),c={contractId:n,methodNames:o};if(!r.length){this.getModule(e).type==="browser"&&(yield s.setItem(iE,e),yield s.setItem(oE,c));return}i&&i!==e&&(yield this.signOutWallet(i));let u=[];a===ya.ENABLED&&(u=yield this.setWalletAsRecentlySignedIn(e)),this.store.dispatch({type:"WALLET_CONNECTED",payload:{walletId:e,contract:c,accounts:r,recentlySignedInWallets:u,rememberRecentWallets:a}}),this.emitter.emit("signedIn",{walletId:e,contractId:n,methodNames:o,accounts:r})})}onWalletSignedOut(e){this.store.dispatch({type:"WALLET_DISCONNECTED",payload:{walletId:e}}),this.emitter.emit("signedOut",{walletId:e})}setupWalletEmitter(e){let r=new th;return r.on("signedOut",()=>{this.onWalletSignedOut(e.id)}),r.on("signedIn",n=>{this.onWalletSignedIn(e.id,n)}),r.on("accountsChanged",({accounts:n})=>Re(this,void 0,void 0,function*(){if(this.emitter.emit("accountsChanged",{walletId:e.id,accounts:n}),!n.length)return this.signOutWallet(e.id);this.store.dispatch({type:"ACCOUNTS_CHANGED",payload:{walletId:e.id,accounts:n}})})),r.on("networkChanged",({networkId:n})=>{this.emitter.emit("networkChanged",{walletId:e.id,networkId:n})}),r.on("uriChanged",({uri:n})=>{this.emitter.emit("uriChanged",{walletId:e.id,uri:n})}),r}validateSignMessageParams({message:e,nonce:r,recipient:n}){if(!e||e.trim()==="")throw new Error("Invalid message. It must be a non-empty string.");if(!Buffer.isBuffer(r)||r.length!==32)throw new Error("Invalid nonce. It must be a Buffer with a length of 32 bytes.");if(!n||n.trim()==="")throw new Error("Invalid recipient. It must be a non-empty string.")}decorateWallet(e){let r=e.signIn,n=e.signOut,o=e.signMessage,i=e.createSignedTransaction,a=e.getPublicKey,s=e.signNep413Message,c=e.signTransaction,u=e.signDelegateAction;return e.signIn=f=>Re(this,void 0,void 0,function*(){let l=yield r(Object.assign(Object.assign({},this.options.createAccessKeyFor),f)),{contractId:h,methodNames:m=[]}=f;return yield this.onWalletSignedIn(e.id,{accounts:l,contractId:h||"",methodNames:m}),l}),e.signOut=()=>Re(this,void 0,void 0,function*(){yield n(),this.onWalletSignedOut(e.id)}),e.signMessage=f=>Re(this,void 0,void 0,function*(){if(o===void 0)throw Error(`The signMessage method is not supported by ${e.metadata.name}`);return this.validateSignMessageParams(f),yield o(f)}),e.createSignedTransaction=(f,l)=>Re(this,void 0,void 0,function*(){if(i===void 0)throw Error(`The createSignedTransaction method is not supported by ${e.metadata.name}`);return yield i(f,l)}),e.getPublicKey=f=>Re(this,void 0,void 0,function*(){if(a===void 0)throw Error(`The getPublicKey method is not supported by ${e.metadata.name}`);return typeof f>"u"?yield a():yield a(f)}),e.signNep413Message=(...f)=>Re(this,void 0,void 0,function*(){if(s===void 0)throw Error(`The signNep413Message method is not supported by ${e.metadata.name}`);return yield s(...f)}),e.signTransaction=(...f)=>Re(this,void 0,void 0,function*(){if(c===void 0)throw Error(`The signTransaction method is not supported by ${e.metadata.name}`);return yield c(...f)}),e.signDelegateAction=(...f)=>Re(this,void 0,void 0,function*(){if(u===void 0)throw Error(`The signDelegateAction method is not supported by ${e.metadata.name}`);return yield u(...f)}),e}setupInstance(e){return Re(this,void 0,void 0,function*(){let r=this.instances[e.id];if(r)return r;if(!e.metadata.available){let o=e.type==="injected"?"not installed":"not available";throw Error(`${e.metadata.name} is ${o}`)}let n=Object.assign({id:e.id,type:e.type,metadata:e.metadata},yield e.init({id:e.id,type:e.type,metadata:e.metadata,options:this.options,store:this.store.toReadOnly(),provider:this.provider,emitter:this.setupWalletEmitter(e),logger:new hl(e.id),storage:new pf(this.storage,[Vp,e.id])}));return r=this.decorateWallet(n),this.instances[e.id]=r,r})}getModule(e){return this.modules.find(r=>r.id===e)}getWallet(e){return Re(this,void 0,void 0,function*(){let r=this.getModule(e);if(!r)return null;let{selectedWalletId:n}=this.store.getState();return!r.metadata.available&&n?(this.onWalletSignedOut(n),null):yield r.wallet()})}setupModule(e,r){if(!e)return;let n={id:e.id,type:e.type,metadata:e.metadata,listIndex:r,wallet:()=>this.setupInstance(e)};return n.type==="instant-link"&&this.setupInstantLinkWallet(n),n}setupWalletModules(){return Re(this,void 0,void 0,function*(){let r=(yield Promise.all(this.factories.map((n,o)=>n({options:this.options}).then(i=>this.setupModule(i,o)).catch(i=>{bi.log("Failed to setup module"),bi.error(i)})))).filter(n=>n!==void 0);this.modules=r,this.store.dispatch({type:"ADD_WALLET_MODULES",payload:{modules:r}})})}setupStorage(){return Re(this,void 0,void 0,function*(){let{accounts:e,contract:r,selectedWalletId:n,recentlySignedInWallets:o,rememberRecentWallets:i}=yield this.resolveStorageState();this.store.dispatch({type:"SETUP",payload:{accounts:e,contract:r,selectedWalletId:n,recentlySignedInWallets:o,rememberRecentWallets:i}})})}setupInstantLinkWallet(e){return Re(this,void 0,void 0,function*(){if(e.type!=="instant-link")return;let r=yield e.wallet();if(r.metadata.runOnStartup)try{yield r.signIn({contractId:r.getContractId()})}catch(n){bi.error("Failed to sign in to wallet. "+r.metadata.name+n)}})}},kD=(t,e)=>{switch(t){case"mainnet":return{networkId:t,nodeUrl:e?.[0]||"https://free.rpc.fastnear.com",helperUrl:"https://helper.mainnet.near.org",explorerUrl:"https://nearblocks.io",indexerUrl:"https://api.fastnear.com/v0"};case"testnet":return{networkId:t,nodeUrl:e?.[0]||"https://test.rpc.fastnear.com",helperUrl:"https://helper.testnet.near.org",explorerUrl:"https://testnet.nearblocks.io",indexerUrl:"https://test.api.fastnear.com/v0"};default:throw Error(`Failed to find config for: '${t}'`)}},Dhe=t=>typeof t=="string"?kD(t):t,zhe=t=>({options:{languageCode:t.languageCode||void 0,network:Dhe(t.network),debug:t.debug||!1,optimizeWalletOrder:t.optimizeWalletOrder!==!1,randomizeWalletOrder:t.randomizeWalletOrder||!1,relayerUrl:t.relayerUrl||void 0,createAccessKeyFor:t.createAccessKeyFor?typeof t.createAccessKeyFor=="string"?{contractId:t.createAccessKeyFor,methodNames:[]}:{contractId:t.createAccessKeyFor.contractId,methodNames:t.createAccessKeyFor.methodNames}:void 0},storage:t.storage||new RE}),lj=bl,Khe=TypeError,qhe=function(t,e){if(!delete t[e])throw new Khe("Cannot delete property "+lj(e)+" of "+lj(t))},pj=Mv,Hhe=Math.floor,DE=function(t,e){var r=t.length;if(r<8)for(var n=1,o,i;n<r;){for(i=n,o=t[n];i&&e(t[i-1],o)>0;)t[i]=t[--i];i!==n++&&(t[i]=o)}else for(var a=Hhe(r/2),s=DE(pj(t,0,a),e),c=DE(pj(t,a),e),u=s.length,f=c.length,l=0,h=0;l<u||h<f;)t[l+h]=l<u&&h<f?e(s[l],c[h])<=0?s[l++]:c[h++]:l<u?s[l++]:c[h++];return t},$D=DE,Ghe=Ce,FD=function(t,e){var r=[][t];return!!r&&Ghe(function(){r.call(null,e||function(){return 1},1)})},Whe=$s,hj=Whe.match(/firefox\/(\d+)/i),LD=!!hj&&+hj[1],Vhe=$s,jD=/MSIE|Trident/.test(Vhe),Yhe=$s,mj=Yhe.match(/AppleWebKit\/(\d+)\./),UD=!!mj&&+mj[1],Zhe=or,DD=it,Jhe=So,Xhe=va,yj=xa,Qhe=qhe,bj=hh,CA=Ce,eme=$D,tme=FD,gj=LD,rme=jD,vj=ih,xj=UD,Cs=[],wj=DD(Cs.sort),nme=DD(Cs.push),ome=CA(function(){Cs.sort(void 0)}),ime=CA(function(){Cs.sort(null)}),ame=tme("sort"),zD=!CA(function(){if(vj)return vj<70;if(!(gj&&gj>3)){if(rme)return!0;if(xj)return xj<603;var t="",e,r,n,o;for(e=65;e<76;e++){switch(r=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(o=0;o<47;o++)Cs.push({k:r+o,v:n})}for(Cs.sort(function(i,a){return a.v-i.v}),o=0;o<Cs.length;o++)r=Cs[o].k.charAt(0),t.charAt(t.length-1)!==r&&(t+=r);return t!=="DGBEFHACIJK"}}),sme=ome||!ime||!ame||!zD,cme=function(t){return function(e,r){return r===void 0?-1:e===void 0?1:t!==void 0?+t(e,r)||0:bj(e)>bj(r)?1:-1}};Zhe({target:"Array",proto:!0,forced:sme},{sort:function(e){e!==void 0&&Jhe(e);var r=Xhe(this);if(zD)return e===void 0?wj(r):wj(r,e);var n=[],o=yj(r),i,a;for(a=0;a<o;a++)a in r&&nme(n,r[a]);for(eme(n,cme(e)),i=yj(n),a=0;a<i;)r[a]=n[a++];for(;a<o;)Qhe(r,a++);return r}});fme=(t,e)=>{switch(bi.log("Store Action",e),e.type){case"SETUP":{let{accounts:r,contract:n,selectedWalletId:o,recentlySignedInWallets:i,rememberRecentWallets:a}=e.payload,s=r.map((c,u)=>Object.assign(Object.assign({},c),{active:u===0}));return Object.assign(Object.assign({},t),{accounts:s,contract:n,selectedWalletId:o,recentlySignedInWallets:i,rememberRecentWallets:a})}case"ADD_WALLET_MODULE":{let{module:r}=e.payload,n=[...t.modules,r];return n=n.sort((o,i)=>o.listIndex-i.listIndex),Object.assign(Object.assign({},t),{modules:n})}case"ADD_WALLET_MODULES":{let{modules:r}=e.payload,n=[...t.modules,...r];return n=n.sort((o,i)=>o.listIndex-i.listIndex),Object.assign(Object.assign({},t),{modules:n})}case"WALLET_CONNECTED":{let{walletId:r,contract:n,accounts:o,recentlySignedInWallets:i}=e.payload;if(!o.length)return t;let a=t.accounts.findIndex(c=>c.active),s=o.map((c,u)=>Object.assign(Object.assign({},c),{active:u===(a>-1?a:0)}));return Object.assign(Object.assign({},t),{contract:n,accounts:s,selectedWalletId:r,recentlySignedInWallets:i})}case"WALLET_DISCONNECTED":{let{walletId:r}=e.payload;return r!==t.selectedWalletId?t:Object.assign(Object.assign({},t),{contract:null,accounts:[],selectedWalletId:null})}case"ACCOUNTS_CHANGED":{let{walletId:r,accounts:n}=e.payload;if(r!==t.selectedWalletId)return t;let o=t.accounts.find(s=>s.active),i=!n.some(s=>s.accountId===o?.accountId),a=n.map((s,c)=>Object.assign(Object.assign({},s),{active:i?c===0:s.accountId===o?.accountId}));return Object.assign(Object.assign({},t),{accounts:a})}case"SET_ACTIVE_ACCOUNT":{let{accountId:r}=e.payload,n=t.accounts.map(o=>Object.assign(Object.assign({},o),{active:o.accountId===r}));return Object.assign(Object.assign({},t),{accounts:n})}case"SET_REMEMBER_RECENT_WALLETS":{let{selectedWalletId:r,recentlySignedInWallets:n}=t,{rememberRecentWallets:o}=e.payload,i=o===ya.ENABLED?ya.DISABLED:ya.ENABLED,a=[...n];r&&!n.includes(r)&&a.push(r);let s=i===ya.ENABLED?a:[];return Object.assign(Object.assign({},t),{rememberRecentWallets:i,recentlySignedInWallets:s})}default:return t}},ume=t=>Re(void 0,void 0,void 0,function*(){let e=new pf(t,Vp),r={modules:[],accounts:[],contract:yield e.getItem(uj),selectedWalletId:yield e.getItem(dj),recentlySignedInWallets:(yield e.getItem(Jp))||[],rememberRecentWallets:(yield e.getItem(jE))||""},n=new y4(r),o=new Xd;o.pipe(b4(fme,r)).subscribe(n);let i=(s,c,u,f)=>Re(void 0,void 0,void 0,function*(){if(c[f]!==s[f]){if(c[f]){yield e.setItem(u,c[f]);return}yield e.removeItem(u)}}),a=n.getValue();return n.subscribe(s=>{i(a,s,dj,"selectedWalletId"),i(a,s,uj,"contract"),i(a,s,Jp,"recentlySignedInWallets"),i(a,s,jE,"rememberRecentWallets"),a=s}),{observable:n,getState:()=>n.getValue(),dispatch:s=>o.next(s),toReadOnly:()=>({getState:()=>n.getValue(),observable:n.asObservable()})}}),aE=null,Ej=(t,e,r,n)=>({options:t,store:e.toReadOnly(),wallet:o=>Re(void 0,void 0,void 0,function*(){let{selectedWalletId:i}=e.getState(),a=yield r.getWallet(o||i);if(!a)throw o?new Error("Invalid wallet id"):new Error("No wallet selected");return a}),setActiveAccount:o=>{let{accounts:i}=e.getState();if(!i.some(a=>a.accountId===o))throw new Error("Invalid account id");e.dispatch({type:"SET_ACTIVE_ACCOUNT",payload:{accountId:o}})},setRememberRecentWallets:()=>{let{rememberRecentWallets:o}=e.getState();e.dispatch({type:"SET_REMEMBER_RECENT_WALLETS",payload:{rememberRecentWallets:o}})},isSignedIn(){let{accounts:o}=e.getState();return!!o.length},on:(o,i)=>n.on(o,i),off:(o,i)=>{n.off(o,i)},subscribeOnAccountChange(o){this.store.observable.subscribe(i=>Re(this,void 0,void 0,function*(){var a;let s=(a=i?.accounts.find(c=>c.active))===null||a===void 0?void 0:a.accountId;o(s||"")}))}}),dme=t=>Re(void 0,void 0,void 0,function*(){let{options:e,storage:r}=zhe(t);hl.debug=e.debug;let n=new th,o=yield ume(r),i=kD(e.network.networkId,t.fallbackRpcUrls),a=t.fallbackRpcUrls&&t.fallbackRpcUrls.length>0?t.fallbackRpcUrls:[i.nodeUrl],s=new UE({factories:t.modules,storage:r,options:e,store:o,emitter:n,provider:new yE(a)});return yield s.setupWalletModules(),yield s.setupStorage(),t.allowMultipleSelectors?Ej(e,o,s,n):(aE||(aE=Ej(e,o,s,n)),aE)}),KD=t=>new Promise(e=>setTimeout(e,t)),qD=(t,e,r)=>Re(void 0,void 0,void 0,function*(){let n=t();if(n)return n;if(!r)throw new Error("Exceeded timeout");return KD(e).then(()=>qD(t,e,r-1))}),lme=(t,e={})=>Re(void 0,void 0,void 0,function*(){let{timeout:r=100,interval:n=50}=e;return Promise.race([KD(r).then(()=>{throw new Error("Exceeded timeout")}),qD(t,n,Math.floor(r/n))])}),pme=t=>t.accounts.find(e=>e.active)||null,hme=So,mme=va,yme=Bv,bme=xa,Aj=TypeError,_j="Reduce of empty array with no initial value",Sj=function(t){return function(e,r,n,o){var i=mme(e),a=yme(i),s=bme(i);if(hme(r),s===0&&n<2)throw new Aj(_j);var c=t?s-1:0,u=t?-1:1;if(n<2)for(;;){if(c in a){o=a[c],c+=u;break}if(c+=u,t?c<0:s<=c)throw new Aj(_j)}for(;t?c>=0:s>c;c+=u)c in a&&(o=r(o,a[c],c,i));return o}},gme={left:Sj(!1),right:Sj(!0)},vme=or,xme=gme.left,wme=FD,Ij=ih,Eme=Cv,Ame=!Eme&&Ij>79&&Ij<83,_me=Ame||!wme("reduce");vme({target:"Array",proto:!0,forced:_me},{reduce:function(e){var r=arguments.length;return xme(this,e,r,r>1?arguments[1]:void 0)}});Sme=qn,HD=function(){var t=Sme(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},NA=Ce,Ime=_e,MA=Ime.RegExp,kA=NA(function(){var t=MA("a","y");return t.lastIndex=2,t.exec("abcd")!==null}),Tme=kA||NA(function(){return!MA("a","y").sticky}),Bme=kA||NA(function(){var t=MA("^r","gy");return t.lastIndex=2,t.exec("str")!==null}),Ome={BROKEN_CARET:Bme,MISSED_STICKY:Tme,UNSUPPORTED_Y:kA},Pme=Ce,Rme=_e,Cme=Rme.RegExp,Nme=Pme(function(){var t=Cme(".","s");return!(t.dotAll&&t.test(`
|
|
48
|
+
`)&&t.flags==="s")}),Mme=Ce,kme=_e,$me=kme.RegExp,Fme=Mme(function(){var t=$me("(?<a>b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$<a>c")!=="bc"}),al=nr,jv=it,Lme=hh,jme=HD,Ume=Ome,Dme=sA,zme=Fv,Kme=bf.get,qme=Nme,Hme=Fme,Gme=Dme("native-string-replace",String.prototype.replace),gv=RegExp.prototype.exec,zE=gv,Wme=jv("".charAt),Vme=jv("".indexOf),Yme=jv("".replace),sE=jv("".slice),KE=(function(){var t=/a/,e=/b*/g;return al(gv,t,"a"),al(gv,e,"a"),t.lastIndex!==0||e.lastIndex!==0})(),GD=Ume.BROKEN_CARET,qE=/()??/.exec("")[1]!==void 0,Zme=KE||qE||GD||qme||Hme;Zme&&(zE=function(e){var r=this,n=Kme(r),o=Lme(e),i=n.raw,a,s,c,u,f,l,h;if(i)return i.lastIndex=r.lastIndex,a=al(zE,i,o),r.lastIndex=i.lastIndex,a;var m=n.groups,x=GD&&r.sticky,S=al(jme,r),O=r.source,P=0,F=o;if(x&&(S=Yme(S,"y",""),Vme(S,"g")===-1&&(S+="g"),F=sE(o,r.lastIndex),r.lastIndex>0&&(!r.multiline||r.multiline&&Wme(o,r.lastIndex-1)!==`
|
|
49
|
+
`)&&(O="(?: "+O+")",F=" "+F,P++),s=new RegExp("^(?:"+O+")",S)),qE&&(s=new RegExp("^"+O+"$(?!\\s)",S)),KE&&(c=r.lastIndex),u=al(gv,x?s:r,F),x?u?(u.input=sE(u.input,P),u[0]=sE(u[0],P),u.index=r.lastIndex,r.lastIndex+=u[0].length):r.lastIndex=0:KE&&u&&(r.lastIndex=r.global?u.index+u[0].length:c),qE&&u&&u.length>1&&al(Gme,u[0],s,function(){for(f=1;f<arguments.length-2;f++)arguments[f]===void 0&&(u[f]=void 0)}),u&&m)for(u.groups=l=zme(null),f=0;f<m.length;f++)h=m[f],l[h[0]]=u[h[1]];return u});Jme=zE,Xme=or,Tj=Jme;Xme({target:"RegExp",proto:!0,forced:/./.exec!==Tj},{exec:Tj});Qme=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,eye=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",Qme]],tye=t=>t!==""&&eye.reduce((e,[r,n])=>{if(e)return e;let o=n.exec(t);return!!o&&[r,o]},!1),rye=t=>{if(typeof navigator>"u")return!1;let e=tye(navigator.userAgent);if(!e)return!1;let[r]=e;return r==="searchbot"?!1:!!t.find(n=>n===r)},nye=nr,oye=wn,iye=yl,aye=HD,Bj=RegExp.prototype,sye=function(t){var e=t.flags;return e===void 0&&!("flags"in Bj)&&!oye(t,"flags")&&iye(Bj,t)?nye(aye,t):e},cye=ah.PROPER,fye=Fs,uye=qn,Oj=hh,dye=Ce,lye=sye,$A="toString",WD=RegExp.prototype,VD=WD[$A],pye=dye(function(){return VD.call({source:"a",flags:"b"})!=="/a/b"}),hye=cye&&VD.name!==$A;(pye||hye)&&fye(WD,$A,function(){var e=uye(this),r=Oj(e.source),n=Oj(lye(e));return"/"+r+"/"+n},{unsafe:!0});vf=t=>{if(t.createAccount)return{type:"CreateAccount"};if(t.deployContract)return{type:"DeployContract",params:{code:t.deployContract.code}};if(t.functionCall){let{methodName:e,args:r,gas:n,deposit:o}=t.functionCall,i=r;try{let a=Buffer.from(r).toString(),s=JSON.parse(a);s&&typeof s=="object"&&(i=s)}catch{}return{type:"FunctionCall",params:{methodName:e,args:i,gas:n.toString(),deposit:o.toString()}}}if(t.transfer)return{type:"Transfer",params:{deposit:t.transfer.deposit.toString()}};if(t.addKey){let{publicKey:e,accessKey:r}=t.addKey,n;if("fullAccess"in r.permission&&r.permission.fullAccess)n="FullAccess";else if("functionCall"in r.permission&&r.permission.functionCall){let o=r.permission.functionCall;n={receiverId:o.receiverId,methodNames:o.methodNames||[],allowance:o.allowance?o.allowance.toString():void 0}}else throw new Error("Unsupported access key permission");return{type:"AddKey",params:{publicKey:e.toString(),accessKey:{nonce:Number(r.nonce),permission:n}}}}if(t.deleteKey)return{type:"DeleteKey",params:{publicKey:t.deleteKey.publicKey.toString()}};if(t.deleteAccount)return{type:"DeleteAccount",params:{beneficiaryId:t.deleteAccount.beneficiaryId}};throw new Error("Unsupported NAJ action")},mye=t=>{var e,r,n;if(t.type==="CreateAccount")return yn.createAccount();if(t.type==="DeployContract")return yn.deployContract(t.params.code);if(t.type==="FunctionCall")return yn.functionCall(t.params.methodName,t.params.args,BigInt(t.params.gas),BigInt(t.params.deposit));if(t.type==="Transfer")return yn.transfer(BigInt(t.params.deposit));if(t.type==="Stake")return yn.stake(BigInt(t.params.stake),Ss.from(t.params.publicKey));if(t.type==="AddKey")return yn.addKey(Ss.from(t.params.publicKey),new Hc({nonce:BigInt((e=t.params.accessKey.nonce)!==null&&e!==void 0?e:0),permission:new qc(Object.assign({},t.params.accessKey.permission==="FullAccess"?{fullAccess:new Sd}:{functionCall:new _d({receiverId:t.params.accessKey.permission.receiverId,methodNames:(r=t.params.accessKey.permission.methodNames)!==null&&r!==void 0?r:[],allowance:BigInt((n=t.params.accessKey.permission.allowance)!==null&&n!==void 0?n:0)})}))}));if(t.type==="DeleteKey")return yn.deleteKey(Ss.from(t.params.publicKey));if(t.type==="DeleteAccount")return yn.deleteAccount(t.params.beneficiaryId);throw new Error("Unsupported action type")},YD=typeof ArrayBuffer<"u"&&typeof DataView<"u",yye=Fs,bye=function(t,e,r){for(var n in e)yye(t,n,e[n],r);return t},gye=sh,vye=ch,xye=RangeError,ZD=function(t){if(t===void 0)return 0;var e=gye(t),r=vye(e);if(e!==r)throw new xye("Wrong length or index");return r},wye=Math.sign||function(e){var r=+e;return r===0||r!==r?r:r<0?-1:1},Eye=2220446049250313e-31,Pj=1/Eye,Aye=function(t){return t+Pj-Pj},_ye=wye,Sye=Aye,Iye=Math.abs,Tye=2220446049250313e-31,Bye=function(t,e,r,n){var o=+t,i=Iye(o),a=_ye(o);if(i<n)return a*Sye(i/n/e)*n*e;var s=(1+e/Tye)*i,c=s-(s-i);return c>r||c!==c?a*(1/0):a*c},Oye=Bye,Pye=11920928955078125e-23,Rye=34028234663852886e22,Cye=11754943508222875e-54,Nye=Math.fround||function(e){return Oye(e,Pye,Rye,Cye)},Mye=Array,kye=Math.abs,ma=Math.pow,$ye=Math.floor,Fye=Math.log,Lye=Math.LN2,jye=function(t,e,r){var n=Mye(r),o=r*8-e-1,i=(1<<o)-1,a=i>>1,s=e===23?ma(2,-24)-ma(2,-77):0,c=t<0||t===0&&1/t<0?1:0,u=0,f,l,h;for(t=kye(t),t!==t||t===1/0?(l=t!==t?1:0,f=i):(f=$ye(Fye(t)/Lye),h=ma(2,-f),t*h<1&&(f--,h*=2),f+a>=1?t+=s/h:t+=s*ma(2,1-a),t*h>=2&&(f++,h/=2),f+a>=i?(l=0,f=i):f+a>=1?(l=(t*h-1)*ma(2,e),f+=a):(l=t*ma(2,a-1)*ma(2,e),f=0));e>=8;)n[u++]=l&255,l/=256,e-=8;for(f=f<<e|l,o+=e;o>0;)n[u++]=f&255,f/=256,o-=8;return n[u-1]|=c*128,n},Uye=function(t,e){var r=t.length,n=r*8-e-1,o=(1<<n)-1,i=o>>1,a=n-7,s=r-1,c=t[s--],u=c&127,f;for(c>>=7;a>0;)u=u*256+t[s--],a-=8;for(f=u&(1<<-a)-1,u>>=-a,a+=e;a>0;)f=f*256+t[s--],a-=8;if(u===0)u=1-i;else{if(u===o)return f?NaN:c?-1/0:1/0;f+=ma(2,e),u-=i}return(c?-1:1)*f*ma(2,u-e)},Dye={pack:jye,unpack:Uye},zye=va,Rj=bA,Kye=xa,JD=function(e){for(var r=zye(this),n=Kye(r),o=arguments.length,i=Rj(o>1?arguments[1]:void 0,n),a=o>2?arguments[2]:void 0,s=a===void 0?n:Rj(a,n);s>i;)r[i++]=e;return r},qye=at,Hye=br,Cj=gl,XD=function(t,e,r){var n,o;return Cj&&qye(n=e.constructor)&&n!==r&&Hye(o=n.prototype)&&o!==r.prototype&&Cj(t,o),t},Uv=_e,FA=it,cE=Ir,Gye=YD,QD=ah,Wye=yf,Vye=Nv,Nj=bye,fE=Ce,rv=wA,Yye=sh,Zye=ch,vv=ZD,Jye=Nye,ez=Dye,Xye=Lv,Mj=gl,Qye=JD,ebe=Mv,tbe=XD,rbe=FU,tz=uh,LA=bf,nbe=QD.PROPER,kj=QD.CONFIGURABLE,cl="ArrayBuffer",Dv="DataView",fl="prototype",obe="Wrong length",rz="Wrong index",$j=LA.getterFor(cl),Xp=LA.getterFor(Dv),Fj=LA.set,Eo=Uv[cl],vn=Eo,rl=vn&&vn[fl],gi=Uv[Dv],uf=gi&&gi[fl],Lj=Object.prototype,ibe=Uv.Array,xv=Uv.RangeError,abe=FA(Qye),sbe=FA([].reverse),nz=ez.pack,jj=ez.unpack,Uj=function(t){return[t&255]},Dj=function(t){return[t&255,t>>8&255]},zj=function(t){return[t&255,t>>8&255,t>>16&255,t>>24&255]},Kj=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},cbe=function(t){return nz(Jye(t),23,4)},fbe=function(t){return nz(t,52,8)},nv=function(t,e,r){Vye(t[fl],e,{configurable:!0,get:function(){return r(this)[e]}})},Os=function(t,e,r,n){var o=Xp(t),i=vv(r),a=!!n;if(i+e>o.byteLength)throw new xv(rz);var s=o.bytes,c=i+o.byteOffset,u=ebe(s,c,c+e);return a?u:sbe(u)},Ps=function(t,e,r,n,o,i){var a=Xp(t),s=vv(r),c=n(+o),u=!!i;if(s+e>a.byteLength)throw new xv(rz);for(var f=a.bytes,l=s+a.byteOffset,h=0;h<e;h++)f[l+h]=c[u?h:e-h-1]};Gye?(uE=nbe&&Eo.name!==cl,!fE(function(){Eo(1)})||!fE(function(){new Eo(-1)})||fE(function(){return new Eo,new Eo(1.5),new Eo(NaN),Eo.length!==1||uE&&!kj})?(vn=function(e){return rv(this,rl),tbe(new Eo(vv(e)),this,vn)},vn[fl]=rl,rl.constructor=vn,rbe(vn,Eo)):uE&&kj&&Wye(Eo,"name",cl),Mj&&Xye(uf)!==Lj&&Mj(uf,Lj),Kp=new gi(new vn(2)),dE=FA(uf.setInt8),Kp.setInt8(0,2147483648),Kp.setInt8(1,2147483649),(Kp.getInt8(0)||!Kp.getInt8(1))&&Nj(uf,{setInt8:function(e,r){dE(this,e,r<<24>>24)},setUint8:function(e,r){dE(this,e,r<<24>>24)}},{unsafe:!0})):(vn=function(e){rv(this,rl);var r=vv(e);Fj(this,{type:cl,bytes:abe(ibe(r),0),byteLength:r}),cE||(this.byteLength=r,this.detached=!1)},rl=vn[fl],gi=function(e,r,n){rv(this,uf),rv(e,rl);var o=$j(e),i=o.byteLength,a=Yye(r);if(a<0||a>i)throw new xv("Wrong offset");if(n=n===void 0?i-a:Zye(n),a+n>i)throw new xv(obe);Fj(this,{type:Dv,buffer:e,byteLength:n,byteOffset:a,bytes:o.bytes}),cE||(this.buffer=e,this.byteLength=n,this.byteOffset=a)},uf=gi[fl],cE&&(nv(vn,"byteLength",$j),nv(gi,"buffer",Xp),nv(gi,"byteLength",Xp),nv(gi,"byteOffset",Xp)),Nj(uf,{getInt8:function(e){return Os(this,1,e)[0]<<24>>24},getUint8:function(e){return Os(this,1,e)[0]},getInt16:function(e){var r=Os(this,2,e,arguments.length>1?arguments[1]:!1);return(r[1]<<8|r[0])<<16>>16},getUint16:function(e){var r=Os(this,2,e,arguments.length>1?arguments[1]:!1);return r[1]<<8|r[0]},getInt32:function(e){return Kj(Os(this,4,e,arguments.length>1?arguments[1]:!1))},getUint32:function(e){return Kj(Os(this,4,e,arguments.length>1?arguments[1]:!1))>>>0},getFloat32:function(e){return jj(Os(this,4,e,arguments.length>1?arguments[1]:!1),23)},getFloat64:function(e){return jj(Os(this,8,e,arguments.length>1?arguments[1]:!1),52)},setInt8:function(e,r){Ps(this,1,e,Uj,r)},setUint8:function(e,r){Ps(this,1,e,Uj,r)},setInt16:function(e,r){Ps(this,2,e,Dj,r,arguments.length>2?arguments[2]:!1)},setUint16:function(e,r){Ps(this,2,e,Dj,r,arguments.length>2?arguments[2]:!1)},setInt32:function(e,r){Ps(this,4,e,zj,r,arguments.length>2?arguments[2]:!1)},setUint32:function(e,r){Ps(this,4,e,zj,r,arguments.length>2?arguments[2]:!1)},setFloat32:function(e,r){Ps(this,4,e,cbe,r,arguments.length>2?arguments[2]:!1)},setFloat64:function(e,r){Ps(this,8,e,fbe,r,arguments.length>2?arguments[2]:!1)}}));tz(vn,cl);tz(gi,Dv);jA={ArrayBuffer:vn,DataView:gi},ube=or,dbe=_e,lbe=jA,pbe=xA,UA="ArrayBuffer",qj=lbe[UA],hbe=dbe[UA];ube({global:!0,constructor:!0,forced:hbe!==qj},{ArrayBuffer:qj});pbe(UA);mbe=or,DA=AA,ybe=Ce,oz=jA,Hj=qn,Gj=bA,bbe=ch,zA=oz.ArrayBuffer,HE=oz.DataView,iz=HE.prototype,Wj=DA(zA.prototype.slice),gbe=DA(iz.getUint8),vbe=DA(iz.setUint8),xbe=ybe(function(){return!new zA(2).slice(1,void 0).byteLength});mbe({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:xbe},{slice:function(e,r){if(Wj&&r===void 0)return Wj(Hj(this),e);for(var n=Hj(this).byteLength,o=Gj(e,n),i=Gj(r===void 0?n:r,n),a=new zA(bbe(i-o)),s=new HE(this),c=new HE(a),u=0;o<i;)vbe(c,u++,gbe(s,o++));return a}});GE={exports:{}},wbe=YD,KA=Ir,Sr=_e,az=at,zv=br,ks=wn,qA=gf,Ebe=bl,Abe=yf,WE=Fs,_be=Nv,Sbe=yl,Kv=Lv,xl=gl,Ibe=Gt,Tbe=cA,sz=bf,cz=sz.enforce,Bbe=sz.get,wv=Sr.Int8Array,VE=wv&&wv.prototype,Vj=Sr.Uint8ClampedArray,Yj=Vj&&Vj.prototype,vi=wv&&Kv(wv),_o=VE&&Kv(VE),Obe=Object.prototype,HA=Sr.TypeError,Zj=Ibe("toStringTag"),YE=Tbe("TYPED_ARRAY_TAG"),Ev="TypedArrayConstructor",ba=wbe&&!!xl&&qA(Sr.opera)!=="Opera",fz=!1,ga={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},GA={BigInt64Array:8,BigUint64Array:8},Pbe=function(e){if(!zv(e))return!1;var r=qA(e);return r==="DataView"||ks(ga,r)||ks(GA,r)},uz=function(t){var e=Kv(t);if(zv(e)){var r=Bbe(e);return r&&ks(r,Ev)?r[Ev]:uz(e)}},dz=function(t){if(!zv(t))return!1;var e=qA(t);return ks(ga,e)||ks(GA,e)},Rbe=function(t){if(dz(t))return t;throw new HA("Target is not a typed array")},Cbe=function(t){if(az(t)&&(!xl||Sbe(vi,t)))return t;throw new HA(Ebe(t)+" is not a typed array constructor")},Nbe=function(t,e,r,n){if(KA){if(r)for(var o in ga){var i=Sr[o];if(i&&ks(i.prototype,t))try{delete i.prototype[t]}catch{try{i.prototype[t]=e}catch{}}}(!_o[t]||r)&&WE(_o,t,r?e:ba&&VE[t]||e,n)}},Mbe=function(t,e,r){var n,o;if(KA){if(xl){if(r){for(n in ga)if(o=Sr[n],o&&ks(o,t))try{delete o[t]}catch{}}if(!vi[t]||r)try{return WE(vi,t,r?e:ba&&vi[t]||e)}catch{}else return}for(n in ga)o=Sr[n],o&&(!o[t]||r)&&WE(o,t,e)}};for(Vr in ga)Ns=Sr[Vr],ul=Ns&&Ns.prototype,ul?cz(ul)[Ev]=Ns:ba=!1;for(Vr in GA)Ns=Sr[Vr],ul=Ns&&Ns.prototype,ul&&(cz(ul)[Ev]=Ns);if((!ba||!az(vi)||vi===Function.prototype)&&(vi=function(){throw new HA("Incorrect invocation")},ba))for(Vr in ga)Sr[Vr]&&xl(Sr[Vr],vi);if((!ba||!_o||_o===Obe)&&(_o=vi.prototype,ba))for(Vr in ga)Sr[Vr]&&xl(Sr[Vr].prototype,_o);ba&&Kv(Yj)!==_o&&xl(Yj,_o);if(KA&&!ks(_o,Zj)){fz=!0,_be(_o,Zj,{configurable:!0,get:function(){return zv(this)?this[YE]:void 0}});for(Vr in ga)Sr[Vr]&&Abe(Sr[Vr],YE,Vr)}Ls={NATIVE_ARRAY_BUFFER_VIEWS:ba,TYPED_ARRAY_TAG:fz&&YE,aTypedArray:Rbe,aTypedArrayConstructor:Cbe,exportTypedArrayMethod:Nbe,exportTypedArrayStaticMethod:Mbe,getTypedArrayConstructor:uz,isView:Pbe,isTypedArray:dz,TypedArray:vi,TypedArrayPrototype:_o},lz=_e,lE=Ce,kbe=vD,$be=Ls.NATIVE_ARRAY_BUFFER_VIEWS,Fbe=lz.ArrayBuffer,df=lz.Int8Array,pz=!$be||!lE(function(){df(1)})||!lE(function(){new df(-1)})||!kbe(function(t){new df,new df(null),new df(1.5),new df(t)},!0)||lE(function(){return new df(new Fbe(2),1,void 0).length!==1}),Lbe=br,jbe=Math.floor,Ube=Number.isInteger||function(e){return!Lbe(e)&&isFinite(e)&&jbe(e)===e},Dbe=sh,zbe=RangeError,Kbe=function(t){var e=Dbe(t);if(e<0)throw new zbe("The argument can't be less than 0");return e},qbe=Kbe,Hbe=RangeError,hz=function(t,e){var r=qbe(t);if(r%e)throw new Hbe("Wrong offset");return r},Gbe=Math.round,Wbe=function(t){var e=Gbe(t);return e<0?0:e>255?255:e&255},Vbe=gf,Ybe=function(t){var e=Vbe(t);return e==="BigInt64Array"||e==="BigUint64Array"},Zbe=OU,Jbe=TypeError,mz=function(t){var e=Zbe(t,"number");if(typeof e=="number")throw new Jbe("Can't convert number to bigint");return BigInt(e)},Xbe=dh,Qbe=nr,e1e=GU,t1e=va,r1e=xa,n1e=mD,o1e=PA,i1e=hD,a1e=Ybe,s1e=Ls.aTypedArrayConstructor,c1e=mz,yz=function(e){var r=e1e(this),n=t1e(e),o=arguments.length,i=o>1?arguments[1]:void 0,a=i!==void 0,s=o1e(n),c,u,f,l,h,m,x,S;if(s&&!i1e(s))for(x=n1e(n,s),S=x.next,n=[];!(m=Qbe(S,x)).done;)n.push(m.value);for(a&&o>2&&(i=Xbe(i,arguments[2])),u=r1e(n),f=new(s1e(r))(u),l=a1e(f),c=0;u>c;c++)h=a?i(n[c],c):n[c],f[c]=l?c1e(h):+h;return f},f1e=ml,u1e=Array.isArray||function(e){return f1e(e)==="Array"},Jj=u1e,d1e=HU,l1e=br,p1e=Gt,h1e=p1e("species"),Xj=Array,m1e=function(t){var e;return Jj(t)&&(e=t.constructor,d1e(e)&&(e===Xj||Jj(e.prototype))?e=void 0:l1e(e)&&(e=e[h1e],e===null&&(e=void 0))),e===void 0?Xj:e},y1e=m1e,b1e=function(t,e){return new(y1e(t))(e===0?0:e)},g1e=dh,v1e=it,x1e=Bv,w1e=va,E1e=xa,A1e=b1e,Qj=v1e([].push),Rs=function(t){var e=t===1,r=t===2,n=t===3,o=t===4,i=t===6,a=t===7,s=t===5||i;return function(c,u,f,l){for(var h=w1e(c),m=x1e(h),x=E1e(m),S=g1e(u,f),O=0,P=l||A1e,F=e?P(c,x):r||a?P(c,0):void 0,B,R;x>O;O++)if((s||O in m)&&(B=m[O],R=S(B,O,h),t))if(e)F[O]=R;else if(R)switch(t){case 3:return!0;case 5:return B;case 6:return O;case 2:Qj(F,B)}else switch(t){case 4:return!1;case 7:Qj(F,B)}return i?-1:n||o?o:F}},_1e={forEach:Rs(0),map:Rs(1),filter:Rs(2),some:Rs(3),every:Rs(4),find:Rs(5),findIndex:Rs(6),filterReject:Rs(7)},S1e=xa,I1e=function(t,e,r){for(var n=0,o=arguments.length>2?r:S1e(e),i=new t(o);o>n;)i[n]=e[n++];return i},eU=or,bz=_e,tU=nr,T1e=Ir,B1e=pz,mh=Ls,gz=jA,rU=wA,O1e=Tv,qp=yf,P1e=Ube,R1e=ch,nU=ZD,pE=hz,C1e=Wbe,vz=fA,Hp=wn,N1e=gf,ZE=br,M1e=oA,k1e=Fv,$1e=yl,ov=gl,F1e=yA.f,oU=yz,L1e=_1e.forEach,j1e=xA,U1e=Nv,xz=xi,wz=Sv,iU=I1e,WA=bf,D1e=XD,JE=WA.get,z1e=WA.set,K1e=WA.enforce,Ez=xz.f,q1e=wz.f,hE=bz.RangeError,Az=gz.ArrayBuffer,H1e=Az.prototype,G1e=gz.DataView,iv=mh.NATIVE_ARRAY_BUFFER_VIEWS,aU=mh.TYPED_ARRAY_TAG,sU=mh.TypedArray,Gp=mh.TypedArrayPrototype,XE=mh.isTypedArray,av="BYTES_PER_ELEMENT",mE="Wrong length",sv=function(t,e){U1e(t,e,{configurable:!0,get:function(){return JE(this)[e]}})},cU=function(t){var e;return $1e(H1e,t)||(e=N1e(t))==="ArrayBuffer"||e==="SharedArrayBuffer"},_z=function(t,e){return XE(t)&&!M1e(e)&&e in t&&P1e(+e)&&e>=0},fU=function(e,r){return r=vz(r),_z(e,r)?O1e(2,e[r]):q1e(e,r)},uU=function(e,r,n){return r=vz(r),_z(e,r)&&ZE(n)&&Hp(n,"value")&&!Hp(n,"get")&&!Hp(n,"set")&&!n.configurable&&(!Hp(n,"writable")||n.writable)&&(!Hp(n,"enumerable")||n.enumerable)?(e[r]=n.value,e):Ez(e,r,n)};T1e?(iv||(wz.f=fU,xz.f=uU,sv(Gp,"buffer"),sv(Gp,"byteOffset"),sv(Gp,"byteLength"),sv(Gp,"length")),eU({target:"Object",stat:!0,forced:!iv},{getOwnPropertyDescriptor:fU,defineProperty:uU}),GE.exports=function(t,e,r){var n=t.match(/\d+/)[0]/8,o=t+(r?"Clamped":"")+"Array",i="get"+t,a="set"+t,s=bz[o],c=s,u=c&&c.prototype,f={},l=function(S,O){var P=JE(S);return P.view[i](O*n+P.byteOffset,!0)},h=function(S,O,P){var F=JE(S);F.view[a](O*n+F.byteOffset,r?C1e(P):P,!0)},m=function(S,O){Ez(S,O,{get:function(){return l(this,O)},set:function(P){return h(this,O,P)},enumerable:!0})};iv?B1e&&(c=e(function(S,O,P,F){return rU(S,u),D1e((function(){return ZE(O)?cU(O)?F!==void 0?new s(O,pE(P,n),F):P!==void 0?new s(O,pE(P,n)):new s(O):XE(O)?iU(c,O):tU(oU,c,O):new s(nU(O))})(),S,c)}),ov&&ov(c,sU),L1e(F1e(s),function(S){S in c||qp(c,S,s[S])}),c.prototype=u):(c=e(function(S,O,P,F){rU(S,u);var B=0,R=0,L,T,M;if(!ZE(O))M=nU(O),T=M*n,L=new Az(T);else if(cU(O)){L=O,R=pE(P,n);var $=O.byteLength;if(F===void 0){if($%n)throw new hE(mE);if(T=$-R,T<0)throw new hE(mE)}else if(T=R1e(F)*n,T+R>$)throw new hE(mE);M=T/n}else return XE(O)?iU(c,O):tU(oU,c,O);for(z1e(S,{buffer:L,byteOffset:R,byteLength:T,length:M,view:new G1e(L)});B<M;)m(S,B++)}),ov&&ov(c,sU),u=c.prototype=k1e(Gp)),u.constructor!==c&&qp(u,"constructor",c),K1e(u).TypedArrayConstructor=c,aU&&qp(u,aU,o);var x=c!==s;f[o]=c,eU({global:!0,constructor:!0,forced:x,sham:!iv},f),av in c||qp(c,av,n),av in u||qp(u,av,n),j1e(o)}):GE.exports=function(){};W1e=GE.exports;W1e("Uint8",function(t){return function(r,n,o){return t(this,r,n,o)}});Sz=Ls,V1e=JD,Y1e=mz,Z1e=gf,J1e=nr,X1e=it,Q1e=Ce,ege=Sz.aTypedArray,tge=Sz.exportTypedArrayMethod,rge=X1e("".slice),nge=Q1e(function(){var t=0;return new Int8Array(2).fill({valueOf:function(){return t++}}),t!==1});tge("fill",function(e){var r=arguments.length;ege(this);var n=rge(Z1e(this),0,3)==="Big"?Y1e(e):+e;return J1e(V1e,this,n,r>1?arguments[1]:void 0,r>2?arguments[2]:void 0)},nge);oge=pz,ige=Ls.exportTypedArrayStaticMethod,age=yz;ige("from",age,oge);Iz=_e,Tz=nr,VA=Ls,sge=xa,cge=hz,fge=va,Bz=Ce,uge=Iz.RangeError,QE=Iz.Int8Array,dU=QE&&QE.prototype,Oz=dU&&dU.set,dge=VA.aTypedArray,lge=VA.exportTypedArrayMethod,eA=!Bz(function(){var t=new Uint8ClampedArray(2);return Tz(Oz,t,{length:1,0:3},1),t[1]!==3}),pge=eA&&VA.NATIVE_ARRAY_BUFFER_VIEWS&&Bz(function(){var t=new QE(2);return t.set(1),t.set("2",1),t[0]!==0||t[1]!==2});lge("set",function(e){dge(this);var r=cge(arguments.length>1?arguments[1]:void 0,1),n=fge(e);if(eA)return Tz(Oz,this,n,r);var o=this.length,i=sge(n),a=0;if(i+r>o)throw new uge("Wrong length");for(;a<i;)this[r+a]=n[a++]},!eA||pge);hge=_e,mge=AA,tA=Ce,yge=So,bge=$D,Pz=Ls,lU=LD,gge=jD,pU=ih,hU=UD,vge=Pz.aTypedArray,xge=Pz.exportTypedArrayMethod,rh=hge.Uint16Array,dl=rh&&mge(rh.prototype.sort),wge=!!dl&&!(tA(function(){dl(new rh(2),null)})&&tA(function(){dl(new rh(2),{})})),mU=!!dl&&!tA(function(){if(pU)return pU<74;if(lU)return lU<67;if(gge)return!0;if(hU)return hU<602;var t=new rh(516),e=Array(516),r,n;for(r=0;r<516;r++)n=r%4,t[r]=515-r,e[r]=r-2*n+3;for(dl(t,function(o,i){return(o/4|0)-(i/4|0)}),r=0;r<516;r++)if(t[r]!==e[r])return!0}),Ege=function(t){return function(e,r){return t!==void 0?+t(e,r)||0:r!==r?-1:e!==e?1:e===0&&r===0?1/e>0&&1/r<0?1:-1:e>r}};xge("sort",function(e){return e!==void 0&&yge(e),mU?dl(this,e):bge(vge(this),Ege(e))},!mU||wge);Age=_e,_ge=VU,Rz=Ls,rA=Ce,yU=Mv,Av=Age.Int8Array,bU=Rz.aTypedArray,Sge=Rz.exportTypedArrayMethod,Cz=[].toLocaleString,Ige=!!Av&&rA(function(){Cz.call(new Av(1))}),Tge=rA(function(){return[1,2].toLocaleString()!==new Av([1,2]).toLocaleString()})||!rA(function(){Av.prototype.toLocaleString.call([1,2])});Sge("toLocaleString",function(){return _ge(Cz,Ige?yU(bU(this)):bU(this),yU(arguments))},Tge);_v=class{constructor(e){this.tag=2147484061,this.message=e.message,this.nonce=e.nonce,this.recipient=e.recipient,e.callbackUrl&&(this.callbackUrl=e.callbackUrl)}},Nz={struct:{tag:"u32",message:"string",nonce:{array:{type:"u8",len:32}},recipient:"string",callbackUrl:{option:"string"}}},Bge=t=>{let e=new _v(Object.assign({},t));return Buffer.from(Zw(Nz,e))},Oge=({publicKey:t,signature:e,message:r,nonce:n,recipient:o,callbackUrl:i})=>{let a=new _v({message:r,nonce:n,recipient:o,callbackUrl:i}),s=Zw(Nz,a),c=Uint8Array.from(xU.sha256.array(s)),u=Buffer.from(e,"base64");return Ss.from(t).verify(c,u)},Pge=({accountId:t,network:e,publicKey:r})=>Re(void 0,void 0,void 0,function*(){return yield new Hd({url:e.nodeUrl}).query({request_type:"view_access_key",account_id:t,finality:"final",public_key:r})}),Rge=({publicKey:t,accountId:e,network:r})=>Re(void 0,void 0,void 0,function*(){let{permission:n}=yield Pge({accountId:e,network:r,publicKey:t});return n==="FullAccess"}),Cge={wallet:{connectYourWallet:"Connect Your Wallet",whatIsAWallet:"What is a Wallet?",secureAndManage:"Secure & Manage Your Digital Assets",safelyStore:"Safely store and transfer your crypto and NFTs.",logInToAny:"Log In to Any NEAR App",noNeedToCreate:"No need to create new accounts or credentials. Connect your wallet and you are good to go!",getAWallet:"Get a Wallet",useAWallet:"Use a wallet to secure and manage your NEAR assets, and to log in to any NEAR app without the need for usernames and passwords.",connectionFailed:"Connection Failed",connectionSuccessful:"Connection Successful",connectionNotSuccessful:"The connection was not successful, please try again.",whatIsAWalletDescription:"Wallets let you store digital assets like crypto, and log into apps on NEAR.",selectWalletOr:"Please select a wallet on the left, or",createNewWallet:"Create a new wallet",rememberWallet:"Remember wallets",connected:"Connected",connectingTo:"Connecting to",connectingMessage:{injected:"Confirm the connection in the extension window",browser:"Confirm the connection in the wallet after redirect",hardware:"Confirm the connection in the ledger device",bridge:"Confirm the connection in the wallet"}},ledger:{connectWithLedger:"Connect with Ledger",makeSureYourLedger:"Make sure your Ledger is connected securely, and that the NEAR app is open on your device",continue:"Continue",specifyHDPath:"Specify HD Path",enterYourPreferredHDPath:"Enter your preferred HD path, then scan for any active accounts.",scan:"Scan",retry:"Retry",ledgerIsNotAvailable:"Ledger is not available",accessDeniedToUseLedgerDevice:"Access denied to use Ledger device",noAccountsFound:"No Accounts Found",selectYourAccounts:"Select Your Accounts",connecting1Account:"Connecting 1 Account",cantFindAnyAccount:"Can't find any account associated with this Ledger. Please create a new NEAR account on",orConnectAnAnotherLedger:"or connect an another Ledger.",connecting:"Connecting",ofAccounts:"of Accounts",failedToAutomatically:"Failed to automatically find account id. Provide it manually:",overviewTheListOfAuthorized:"Overview the list of authorized account(s), complete sign in by clicking the button below.",finish:"Finish"},install:{youllNeedToInstall:"You'll need to install",toContinueAfterInstalling:"to continue. After installing",refreshThePage:"refresh the page.",open:"Open"},qr:{copiedToClipboard:"Copied to clipboard",failedToCopy:"Failed to copy to clipboard",scanWithYourMobile:"Scan with Your Mobile Device",scanQRCodeMessage:`Please scan this QR code
|
|
50
|
+
to connect your wallet.`,copyToClipboard:" Copy to clipboard",preferTheOfficial:"Prefer the official dialogue of",openInOfficialDialogue:"open in official dialogue",open:"Open"},walletTypes:{hardware:"Hardware Wallet",browser:"Browser Wallet",injected:"Wallet Extension",bridge:"Bridge Wallet",mobile:"Mobile Wallet","instant-link":"Instant Wallet"},exportAccounts:{chooseAWallet:"Choose a Wallet",transferYourAccounts:"Transfer Your Accounts",selectAWallet:"Select a wallet that fits your needs and supports your connected accounts.",selectYourAccounts:"Select Your Accounts",afterDecide:"After you decide on a wallet, you can select which accounts you want to transfer.",disclaimer:"You won\u2019t be able to transfer accounts that have never been funded or used on NEAR.",warning:"does not support account export at this time. Please select another wallet.",walletTypes:{hardware:"Hardware Wallet",browser:"Browser Wallet",injected:"Wallet Extension",bridge:"Bridge Wallet",mobile:"Mobile Wallet"},selectAccounts:{title:"Select Accounts to Transfer",button:"Continue",deselectAll:"Deselect All",selectAll:"Select All",unavailable:"Transfer Unavailable",error:"Account does not exist",warningLedger:"Ledger support required",noBalance:"Account not funded"},getPassphrase:{title:"Copy Temporary Password",desc:"You\u2019ll need to enter this password when you begin exporting your accounts to a different wallet.",button:"Continue",transferButton:"Transfer Accounts",label:"Click to Copy",checkLabel:"I copied or wrote down the password"},complete:{title:"Complete the Transfer",descOne:"You will now be redirected to the wallet you selected to complete the transfer.",descTwo:"Once import part of process is completed from selected wallet, press button to complete the transfer process.",startOverButton:"Start Over",button:"Complete"}}},Nge={or:"or"},Mge={clickToCopy:{label:"Copied",tooltip:"Click to copy"}},gU={modal:Cge,general:Nge,component:Mge},kge={wallet:{connectYourWallet:"Conecta Tu Billetera",whatIsAWallet:"\xBFQue es una Billetera?",secureAndManage:"Resguarda y Administrar Tus Activos Digitales",safelyStore:"Almacena de forma segura y transfiere tus cryptos y NFT's",logInToAny:"Inicie sesi\xF3n en Cualquier Aplicacion NEAR",noNeedToCreate:"No es necesario crear nuevas cuentas o credenciales, \xA1Conecta tu billetera y listo!",getAWallet:"Obten una Billetera",useAWallet:"Usa tu Billetera para resguardar y administrar tus activos en NEAR, e Iniciar sesi\xF3n en cualquier aplicacion NEAR sin la necesidad de nombres de usuarios y contrase\xF1as",connectionFailed:"Conexi\xF3n Fallida",connectionSuccessful:"Conexi\xF3n Existosa",connectionNotSuccessful:"La conexi\xF3n no fue exitosa, por favor intente nuevamente.",whatIsAWalletDescription:"Las billeteras te permiten almacenar activos digitales como cripto, e iniciar sesi\xF3n en aplicaciones de NEAR.",selectWalletOr:"Por favor selecciona una billetera a la izquierda, o",createNewWallet:"Crear una nueva billetera",rememberWallet:"Recordar las carteras",connected:"Conectado",connectingTo:"Conectando a ",connectingMessage:{injected:"Confirme la conexi\xF3n en la ventana de extensi\xF3n",browser:"Confirme la conexi\xF3n en la billetera despu\xE9s de la redirecci\xF3n",hardware:"Confirme la conexi\xF3n en el dispositivo de libro mayor",bridge:"Confirmar la conexi\xF3n en la billetera"}},ledger:{connectWithLedger:"Conectar con Ledger",makeSureYourLedger:"Aseg\xFArese de que su ledger est\xE1 conectada de forma segura y que la aplicacion NEAR est\xE9 abierta en su dispositivo",continue:"Continuar",specifyHDPath:"Especifique la ruta HD",enterYourPreferredHDPath:"Ingrese su ruta HD prerida,y luego busque cualquier cuenta activa.",scan:"Escanear",retry:"Reintentar",ledgerIsNotAvailable:"El Ledger no est\xE1 disponible",accessDeniedToUseLedgerDevice:"Acceso denegado para usar el dispositivo ledger",noAccountsFound:"No se encontraron cuentas",selectYourAccounts:"Selecciona tus cuentas",connecting1Account:"Conectando a 1 cuenta",cantFindAnyAccount:"No se pudo encontrar ninguna cuenta asociada con este ledger,Por favor crea una nueva cuenta en NEAR",orConnectAnAnotherLedger:"o conecta otro ledger",connecting:"Conectando",ofAccounts:"de Cuentas",failedToAutomatically:"No se pudo encontrar automaticamente el id de la cuenta,Ingresalo manualmente:",overviewTheListOfAuthorized:"Revise la lista de las cuentas autorizadas,Complete el inicio de sesi\xF3n haciedo click a countinuacion.",finish:"Finalizar"},install:{youllNeedToInstall:"Tendr\xE1s que instalar",toContinueAfterInstalling:"Para continuar, Despues de instalar",refreshThePage:"Recarga la pagina",open:"Abrir"},qr:{copiedToClipboard:"Copiado al Portapapeles",failedToCopy:"Fall\xF3 la copia al Portapapeles",scanWithYourMobile:"Busca con tu dispositivo movil",scanQRCodeMessage:`Por favor escanea este c\xF3digo QR
|
|
51
|
+
para conectar tu billetera.`,copyToClipboard:" Copiar al Portapapeles",preferTheOfficial:"\xBFPrefires el di\xE1logo oficial de",openInOfficialDialogue:"abrir en di\xE1logo oficial",open:"Abrir"},walletTypes:{hardware:"Cartera de Hardware",browser:"Cartera de Navegador",injected:"Extensi\xF3n de Cartera",bridge:"Cartera de Puente",mobile:"Cartera M\xF3vil","instant-link":"Cartera Instant\xE1nea"},exportAccounts:{afterDecide:"Despu\xE9s de decidirte por una billetera, puedes seleccionar qu\xE9 cuentas deseas transferir.",chooseAWallet:"Elige una Billetera",complete:{button:"Completar",descOne:"Ahora ser\xE1s redirigido a la billetera que seleccionaste para completar la transferencia.",descTwo:"Una vez que se haya completado la parte de importaci\xF3n del proceso desde la billetera seleccionada, presiona el bot\xF3n para finalizar el proceso de transferencia.",startOverButton:"Empezar de Nuevo",title:"Completar la Transferencia"},disclaimer:"No podr\xE1s transferir cuentas que nunca hayan sido financiadas o utilizadas en NEAR.",getPassphrase:{button:"Continuar",checkLabel:"Copie o anote la contrase\xF1a",desc:"Necesitar\xE1s ingresar esta contrase\xF1a cuando comiences a exportar tus cuentas a otra billetera.",label:"Haga clic para Copiar",title:"Copiar Contrase\xF1a Temporal",transferButton:"Transferir Cuentas"},selectAWallet:"Selecciona una billetera que se ajuste a tus necesidades y que soporte tus cuentas conectadas.",selectAccounts:{button:"Continuar",deselectAll:"Deseleccionar Todo",error:"La cuenta no existe",noBalance:"Cuenta no financiada",selectAll:"Seleccionar Todo",title:"Seleccionar Cuentas para Transferir",unavailable:"Transferencia No Disponible",warningLedger:"Se requiere soporte de Ledger"},selectYourAccounts:"Selecciona Tus Cuentas",transferYourAccounts:"Transfiere Tus Cuentas",walletTypes:{bridge:"Billetera Bridge",browser:"Billetera de Navegador",hardware:"Billetera de Hardware",injected:"Extensi\xF3n de Billetera",mobile:"Billetera M\xF3vil"},warning:"no admite la exportaci\xF3n de cuentas en este momento. Por favor selecciona otra billetera."}},$ge={or:"o"},Fge={clickToCopy:{label:"Copiado",tooltip:"Haga clic para copiar"}},Lge={modal:kge,general:$ge,component:Fge},jge={wallet:{connectYourWallet:"\u8FDE\u63A5\u4F60\u7684\u94B1\u5305",whatIsAWallet:"\u4EC0\u4E48\u662F\u94B1\u5305\uFF1F",secureAndManage:"\u4FDD\u62A4\u548C\u7BA1\u7406\u4F60\u7684\u6570\u5B57\u8D44\u4EA7",safelyStore:"\u5B89\u5168\u5B58\u50A8\u548C\u8F6C\u79FB\u4F60\u7684\u52A0\u5BC6\u8D27\u5E01\u548CNFT",logInToAny:"\u767B\u5F55\u4EFB\u4F55 NEAR \u5E94\u7528",noNeedToCreate:"\u4E0D\u9700\u8981\u521B\u5EFA\u65B0\u8D26\u6237\u6216\u5BC6\u7801\u3002\u8FDE\u63A5\u4F60\u7684\u94B1\u5305\uFF0C\u5373\u53EF\u5F00\u59CB\u4F7F\u7528\uFF01",getAWallet:"\u83B7\u53D6\u65B0\u8D26\u6237",useAWallet:"\u4F7F\u7528\u94B1\u5305\u6765\u4FDD\u62A4\u548C\u7BA1\u7406\u4F60\u7684 NEAR \u8D44\u4EA7\uFF0C\u65E0\u9700\u7528\u6237\u540D\u548C\u5BC6\u7801\u5373\u53EF\u767B\u5F55\u4EFB\u4F55 NEAR \u5E94\u7528",connectionFailed:"\u8FDE\u63A5\u5931\u8D25",connectionSuccessful:"\u8FDE\u63A5\u6210\u529F",connectionNotSuccessful:"\u8FDE\u63A5\u672A\u6210\u529F\uFF0C\u8BF7\u91CD\u8BD5\u3002",whatIsAWalletDescription:"\u94B1\u5305\u8BA9\u60A8\u5B58\u50A8\u52A0\u5BC6\u7B49\u6570\u5B57\u8D44\u4EA7\uFF0C\u5E76\u767B\u5F55 NEAR \u5E94\u7528\u3002",selectWalletOr:"\u8BF7\u5728\u5DE6\u4FA7\u9009\u62E9\u4E00\u4E2A\u94B1\u5305\uFF0C\u6216",createNewWallet:"\u521B\u5EFA\u65B0\u94B1\u5305",rememberWallet:"\u8BB0\u4F4F\u94B1\u5305\u9009\u62E9",connected:"\u5DF2\u8FDE\u63A5",connectingTo:"\u6B63\u5728\u8FDE\u63A5",connectingMessage:{injected:"\u5728\u6269\u5C55\u7A97\u53E3\u4E2D\u786E\u8BA4\u8FDE\u63A5",browser:"\u91CD\u5B9A\u5411\u540E\u5728\u94B1\u5305\u4E2D\u786E\u8BA4\u8FDE\u63A5",hardware:"\u5728 Ledger \u8BBE\u5907\u4E0A\u786E\u8BA4\u8FDE\u63A5",bridge:"\u5728\u94B1\u5305\u4E2D\u786E\u8BA4\u8FDE\u63A5"}},ledger:{connectWithLedger:"\u8FDE\u63A5 Ledger",makeSureYourLedger:"\u786E\u4FDD\u4F60\u7684 Ledger \u5DF2\u7ECF\u5B89\u5168\u8FDE\u63A5\uFF0C\u5E76\u4E14 NEAR \u5E94\u7528\u5DF2\u7ECF\u5728\u4F60\u8BBE\u5907\u4E0A\u6253\u5F00",continue:"\u7EE7\u7EED",specifyHDPath:"\u6307\u5B9A HD \u8DEF\u5F84",enterYourPreferredHDPath:"\u8F93\u5165\u4F60\u504F\u597D\u7684 HD \u8DEF\u5F84\uFF0C\u7136\u540E\u4E3A\u4EFB\u610F\u6D3B\u8DC3\u8D26\u6237\u626B\u7801",scan:"\u626B\u7801",retry:"\u91CD\u8BD5",ledgerIsNotAvailable:"Ledger \u4E0D\u53EF\u7528",accessDeniedToUseLedgerDevice:"\u8BBF\u95EE Ledger \u8BBE\u5907\u88AB\u62D2\u7EDD",noAccountsFound:"\u6CA1\u6709\u627E\u5230\u8D26\u6237",selectYourAccounts:"\u9009\u62E9\u4F60\u7684\u8D26\u6237",connecting1Account:"\u6B63\u5728\u8FDE\u63A51\u4E2A\u8D26\u6237",cantFindAnyAccount:"\u6CA1\u6709\u627E\u5230\u4EFB\u4F55\u4E0E\u8FD9\u4E2A Ledger \u76F8\u5173\u8054\u7684\u8D26\u6237\u3002\u8BF7\u521B\u5EFA\u65B0\u8D26\u6237\u4E8E","orConnectAnAnotherLedger.":"\u6216\u8FDE\u63A5\u53E6\u4E00\u4E2A Ledger",connecting:"\u6B63\u5728\u8FDE\u63A5",ofAccounts:"\u4E2A\u8D26\u6237",failedToAutomatically:"\u65E0\u6CD5\u81EA\u52A8\u627E\u5230\u8D26\u6237ID\uFF0C\u8BF7\u4E3B\u52A8\u63D0\u4F9B\uFF1A",overviewTheListOfAuthorized:"\u8BF7\u67E5\u770B\u5DF2\u6388\u6743\u7684\u8D26\u6237\u5217\u8868\uFF0C\u70B9\u51FB\u4EE5\u4E0B\u6309\u94AE\u5B8C\u6210\u767B\u5F55",finish:"\u5B8C\u6210"},install:{youllNeedToInstall:"\u4F60\u5C06\u9700\u8981\u5B89\u88C5",toContinueAfterInstalling:"\u4EE5\u7EE7\u7EED\u3002\u5B89\u88C5\u5B8C",refreshThePage:"\u8BF7\u5237\u65B0\u9875\u9762",open:"\u6253\u5F00"},qr:{copiedToClipboard:"\u590D\u5236\u5230\u4E86\u526A\u8D34\u677F",failedToCopy:"\u590D\u5236\u5230\u526A\u8D34\u677F\u5931\u8D25",scanWithYourMobile:"\u7528\u4F60\u7684\u79FB\u52A8\u8BBE\u5907\u626B\u7801",scanQRCodeMessage:`\u8BF7\u626B\u63CF\u6B64\u4E8C\u7EF4\u7801
|
|
52
|
+
\u4EE5\u8FDE\u63A5\u4F60\u7684\u94B1\u5305\u3002`,copyToClipboard:" \u590D\u5236\u5230\u526A\u8D34\u677F",preferTheOfficial:"\u5E0C\u671B\u4F7F\u7528\u5B98\u65B9\u5BF9\u8BDD\u6846\u4E8E",openInOfficialDialogue:"\u5728\u5B98\u65B9\u5BF9\u8BDD\u6846\u4E2D\u6253\u5F00",open:"\u6253\u5F00"},walletTypes:{hardware:"\u786C\u4EF6\u94B1\u5305",browser:"\u6D4F\u89C8\u5668\u94B1\u5305",injected:"\u94B1\u5305\u6269\u5C55",bridge:"\u6865\u63A5\u94B1\u5305",mobile:"\u79FB\u52A8\u94B1\u5305","instant-link":"\u5373\u65F6\u94B1\u5305"}},Uge={or:"\u6216"},Dge={modal:jge,general:Uge},zge={wallet:{connectYourWallet:"\u0421\u0432\u044A\u0440\u0436\u0435\u0442\u0435 \u0432\u0430\u0448\u0438\u044F \u041F\u043E\u0440\u0442\u0444\u0435\u0439\u043B",whatIsAWallet:"\u041A\u0430\u043A\u0432\u043E \u0435 \u041F\u043E\u0440\u0442\u0444\u0435\u0439\u043B?",secureAndManage:"\u0417\u0430\u0449\u0438\u0442\u0435\u0442\u0435 \u0438 \u0443\u043F\u0440\u0430\u0432\u043B\u044F\u0432\u0430\u0439\u0442\u0435 \u0434\u0438\u0433\u0438\u0442\u0430\u043B\u043D\u0438\u0442\u0435 \u0441\u0438 \u0430\u043A\u0442\u0438\u0432\u0438",safelyStore:"\u0421\u044A\u0445\u0440\u0430\u043D\u044F\u0432\u0430\u0439\u0442\u0435 \u0438 \u043F\u0440\u0435\u0445\u0432\u044A\u0440\u043B\u044F\u0439\u0442\u0435 \u0431\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u043E \u0432\u0430\u0448\u0438\u0442\u0435 \u043A\u0440\u0438\u043F\u0442\u043E \u0438 NFT.",logInToAny:"\u0418\u0437\u043F\u043E\u043B\u0437\u0432\u0430\u0439\u0442\u0435 \u0432\u0441\u044F\u043A\u043E \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u043D\u0430 NEAR",noNeedToCreate:"\u041D\u044F\u043C\u0430 \u043D\u0443\u0436\u0434\u0430 \u0434\u0430 \u0441\u044A\u0437\u0434\u0430\u0432\u0430\u0442\u0435 \u043D\u043E\u0432\u0438 \u043F\u0440\u043E\u0444\u0438\u043B\u0438. \u0421\u0432\u044A\u0440\u0436\u0435\u0442\u0435 \u043F\u043E\u0440\u0442\u0444\u0435\u0439\u043B\u0430 \u0441\u0438 \u0438 \u0441\u0442\u0435 \u0433\u043E\u0442\u043E\u0432\u0438!",getAWallet:"\u0421\u044A\u0437\u0434\u0430\u0439\u0442\u0435 \u041F\u043E\u0440\u0442\u0444\u0435\u0439\u043B",useAWallet:"\u0418\u0437\u043F\u043E\u043B\u0437\u0432\u0430\u0439\u0442\u0435 \u043F\u043E\u0440\u0442\u0444\u0435\u0439\u043B\u0430, \u0437\u0430 \u0434\u0430 \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u0435 \u0438 \u0443\u043F\u0440\u0430\u0432\u043B\u044F\u0432\u0430\u0442\u0435 \u0430\u043A\u0442\u0438\u0432\u0438\u0442\u0435 \u0441\u0438 \u043D\u0430 NEAR \u043A\u0430\u043A\u0442\u043E \u0438 \u0434\u0430 \u0438\u0437\u043F\u043E\u043B\u0437\u0432\u0430\u0442\u0435 \u0432\u0441\u044F\u043A\u043E \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u043D\u0430 NEAR \u0431\u0435\u0437 \u043D\u0443\u0436\u0434\u0430 \u043E\u0442 \u043F\u043E\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043B\u0441\u043A\u0438 \u0438\u043C\u0435\u043D\u0430 \u0438 \u043F\u0430\u0440\u043E\u043B\u0438.",connectionFailed:"\u0421\u0432\u044A\u0440\u0437\u0432\u0430\u043D\u0435\u0442\u043E \u043D\u0435\u0443\u0441\u043F\u0435\u0448\u043D\u043E",connectionSuccessful:"\u0421\u0432\u044A\u0440\u0437\u0432\u0430\u043D\u0435\u0442\u043E \u0443\u0441\u043F\u0435\u0448\u043D\u043E",connectionNotSuccessful:"\u0421\u0432\u044A\u0440\u0437\u0432\u0430\u043D\u0435\u0442\u043E \u043D\u0435 \u0431\u0435 \u0443\u0441\u043F\u0435\u0448\u043D\u043E, \u043C\u043E\u043B\u044F \u043E\u043F\u0438\u0442\u0430\u0439\u0442\u0435 \u043E\u0442\u043D\u043E\u0432\u043E.",whatIsAWalletDescription:"\u041F\u043E\u0440\u0442\u0444\u0435\u0439\u043B\u0438\u0442\u0435 \u0432\u0438 \u043F\u043E\u0437\u0432\u043E\u043B\u044F\u0432\u0430\u0442 \u0434\u0430 \u0441\u044A\u0445\u0440\u0430\u043D\u044F\u0432\u0430\u0442\u0435 \u0434\u0438\u0433\u0438\u0442\u0430\u043B\u043D\u0438 \u0430\u043A\u0442\u0438\u0432\u0438 \u043A\u0430\u0442\u043E \u043A\u0440\u0438\u043F\u0442\u043E \u0438 \u0434\u0430 \u0441\u0435 \u0432\u043B\u0438\u0437\u0430\u0442\u0435 \u0432 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u043D\u0430 NEAR.",selectWalletOr:"\u041C\u043E\u043B\u044F, \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u043F\u043E\u0440\u0442\u0444\u0435\u0439\u043B \u043E\u0442\u043B\u044F\u0432\u043E, \u0438\u043B\u0438",createNewWallet:"\u0421\u044A\u0437\u0434\u0430\u0439\u0442\u0435 \u043D\u043E\u0432 \u043F\u043E\u0440\u0442\u0444\u0435\u0439\u043B",rememberWallet:"\u0417\u0430\u043F\u0430\u0437\u0438 \u043F\u043E\u0440\u0442\u0444\u0435\u0439\u043B\u0438\u0442\u0435",connected:"\u0421\u0432\u044A\u0440\u0437\u0430\u043D",connectingTo:"\u0421\u0432\u044A\u0440\u0437\u0432\u0430\u043D\u0435 \u043A\u044A\u043C",connectingMessage:{injected:"\u041F\u043E\u0442\u0432\u044A\u0440\u0434\u0435\u0442\u0435 \u0441\u0432\u044A\u0440\u0437\u0432\u0430\u043D\u0435\u0442\u043E \u0432 \u043F\u0440\u043E\u0437\u043E\u0440\u0435\u0446\u0430 \u043D\u0430 \u0440\u0430\u0437\u0448\u0438\u0440\u0435\u043D\u0438\u0435\u0442\u043E",browser:"\u041F\u043E\u0442\u0432\u044A\u0440\u0434\u0435\u0442\u0435 \u0441\u0432\u044A\u0440\u0437\u0432\u0430\u043D\u0435\u0442\u043E \u0432 \u043F\u043E\u0440\u0442\u0444\u0435\u0439\u043B\u0430 \u0441\u043B\u0435\u0434 \u043F\u0440\u0435\u043D\u0430\u0441\u043E\u0447\u0432\u0430\u043D\u0435\u0442\u043E",hardware:"\u041F\u043E\u0442\u0432\u044A\u0440\u0434\u0435\u0442\u0435 \u0441\u0432\u044A\u0440\u0437\u0432\u0430\u043D\u0435\u0442\u043E \u0432 \u0445\u0430\u0440\u0434\u0443\u0435\u0440\u043D\u0438\u044F \u043F\u043E\u0440\u0442\u0444\u0435\u0439\u043B",bridge:"\u041F\u043E\u0442\u0432\u044A\u0440\u0434\u0435\u0442\u0435 \u0432\u0440\u044A\u0437\u043A\u0430\u0442\u0430 \u0432 \u043F\u043E\u0440\u0442\u0444\u0435\u0439\u043B\u0430"}},ledger:{connectWithLedger:"\u0421\u0432\u044A\u0440\u0436\u0435\u0442\u0435 \u0441\u0435 \u0441 Ledger",makeSureYourLedger:"\u0423\u0432\u0435\u0440\u0435\u0442\u0435 \u0441\u0435, \u0447\u0435 \u0432\u0430\u0448\u0438\u044F\u0442 Ledger \u0435 \u0441\u0432\u044A\u0440\u0437\u0430\u043D \u0438 \u0447\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435\u0442\u043E NEAR \u0435 \u043E\u0442\u0432\u043E\u0440\u0435\u043D\u043E \u043Da \u043D\u0435\u0433\u043E.",continue:"\u041F\u0440\u043E\u0434\u044A\u043B\u0436\u0435\u0442\u0435",specifyHDPath:"\u041F\u043E\u0441\u043E\u0447\u0435\u0442\u0435 HD \u043F\u044A\u0442",enterYourPreferredHDPath:"\u0412\u044A\u0432\u0435\u0434\u0435\u0442\u0435 \u043F\u0440\u0435\u0434\u043F\u043E\u0447\u0438\u0442\u0430\u043D\u0438\u044F HD \u043F\u044A\u0442, \u0441\u043B\u0435\u0434 \u043A\u043E\u0435\u0442\u043E \u0441\u043A\u0430\u043D\u0438\u0440\u0430\u0439\u0442\u0435 \u0437\u0430 \u0430\u043A\u0442\u0438\u0432\u043D\u0438 \u0430\u043A\u0430\u0443\u043D\u0442\u0438.",scan:"\u0421\u043A\u0430\u043D\u0438\u0440\u0430\u0439\u0442\u0435",retry:"\u041E\u043F\u0438\u0442\u0430\u0439\u0442\u0435 \u043E\u0442\u043D\u043E\u0432\u043E",ledgerIsNotAvailable:"Ledger \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u043E\u0442\u043E \u043D\u0435 \u0435 \u0434\u043E\u0441\u0442\u044A\u043F\u043D\u043E",accessDeniedToUseLedgerDevice:"\u0414\u043E\u0441\u0442\u044A\u043F\u044A\u0442 \u0437\u0430 \u0438\u0437\u043F\u043E\u043B\u0437\u0432\u0430\u043D\u0435 \u043D\u0430 Ledger \u0435 \u043E\u0442\u043A\u0430\u0437\u0430\u043D",noAccountsFound:"\u041D\u044F\u043C\u0430 \u043D\u0430\u043C\u0435\u0440\u0435\u043D\u0438 \u043F\u0440\u043E\u0444\u0438\u043B\u0438",selectYourAccounts:"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0432\u0430\u0448\u0438\u0442\u0435 \u043F\u0440\u043E\u0444\u0438\u043B\u0438",connecting1Account:"\u0421\u0432\u044A\u0440\u0437\u0432\u0430\u043D\u0435 \u043D\u0430 1 \u043F\u0440\u043E\u0444\u0438\u043B",cantFindAnyAccount:"\u041D\u044F\u043C\u0430 \u043D\u0430\u043C\u0435\u0440\u0435\u043D\u0438 \u043F\u0440\u043E\u0444\u0438\u043B\u0438, \u0441\u044A\u0432\u0440\u0437\u0430\u043D\u0438 \u0441 \u0442\u043E\u0437\u0438 Ledger. \u041C\u043E\u043B\u044F, \u0441\u044A\u0437\u0434\u0430\u0439\u0442\u0435 \u043D\u043E\u0432 NEAR \u043F\u0440\u043E\u0444\u0438\u043B \u043D\u0430",orConnectAnAnotherLedger:"\u0438\u043B\u0438 \u0441\u0432\u044A\u0440\u0436\u0435\u0442\u0435 \u0434\u0440\u0443\u0433 Ledger.",connecting:"\u0421\u0432\u044A\u0440\u0437\u0432\u0430\u043D\u0435",ofAccounts:"\u043E\u0442 \u043F\u0440\u043E\u0444\u0438\u043B\u0438",failedToAutomatically:"\u0410\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u043D\u043E\u0442\u043E \u043D\u0430\u043C\u0438\u0440\u0430\u043D\u0435 \u043D\u0430 \u043F\u0440\u043E\u0444\u0438\u043B\u0430 \u043D\u0435 \u0431\u0435 \u0443\u0441\u043F\u0435\u0448\u043D\u043E. \u0412\u044A\u0432\u0435\u0434\u0435\u0442\u0435 \u0433\u043E \u0440\u044A\u0447\u043D\u043E:",overviewTheListOfAuthorized:"\u041F\u0440\u0435\u0433\u043B\u0435\u0434\u0430\u0439\u0442\u0435 \u0441\u043F\u0438\u0441\u044A\u043A\u0430 \u0441 \u0443\u043F\u044A\u043B\u043D\u043E\u043C\u043E\u0449\u0435\u043D\u0438 \u043F\u0440\u043E\u0444\u0438\u043B\u0438, \u0437\u0430\u0432\u044A\u0440\u0448\u0435\u0442\u0435 \u0432\u043B\u0438\u0437\u0430\u043D\u0435\u0442\u043E, \u043A\u0430\u0442\u043E \u0449\u0440\u0430\u043A\u043D\u0435\u0442\u0435 \u0432\u044A\u0440\u0445\u0443 \u0431\u0443\u0442\u043E\u043D\u0430 \u043F\u043E-\u0434\u043E\u043B\u0443..",finish:"\u0417\u0430\u0432\u044A\u0440\u0448\u0435\u0442\u0435"},install:{youllNeedToInstall:"\u0429\u0435 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0438\u043D\u0441\u0442\u0430\u043B\u0438\u0440\u0430\u0442\u0435",toContinueAfterInstalling:"\u0437\u0430 \u0434\u0430 \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435. \u0421\u043B\u0435\u0434 \u0438\u043D\u0441\u0442\u0430\u043B\u0438\u0440\u0430\u043D\u0435",refreshThePage:"\u043F\u0440\u0435\u0437\u0430\u0440\u0435\u0434\u0435\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430\u0442\u0430.",open:"\u041E\u0442\u0432\u043E\u0440\u0435\u0442\u0435"},qr:{copiedToClipboard:"\u041A\u043E\u043F\u0438\u0440\u0430\u043D\u043E \u0432 \u043A\u043B\u0438\u043F\u0431\u043E\u0440\u0434\u0430",failedToCopy:"\u041D\u0435\u0443\u0441\u043F\u0435\u0448\u043D\u043E \u043A\u043E\u043F\u0438\u0440\u0430\u043D\u0435 \u0432 \u043A\u043B\u0438\u043F\u0431\u043E\u0440\u0434\u0430",scanWithYourMobile:" \u0421\u043A\u0430\u043D\u0438\u0440\u0430\u0439\u0442\u0435 \u0441 \u043C\u043E\u0431\u0438\u043B\u043D\u043E\u0442\u043E \u0441\u0438 \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u043E",scanQRCodeMessage:`\u041C\u043E\u043B\u044F \u0441\u043A\u0430\u043D\u0438\u0440\u0430\u0439\u0442\u0435 \u0442\u043E\u0437\u0438 QR \u043A\u043E\u0434
|
|
53
|
+
\u0437\u0430 \u0434\u0430 \u0441\u0432\u044A\u0440\u0436\u0435\u0442\u0435 \u043F\u043E\u0440\u0442\u0444\u0435\u0439\u043B\u0430 \u0441\u0438.`,copyToClipboard:" \u041A\u043E\u043F\u0438\u0440\u0430\u0439\u0442\u0435 \u0432 \u043A\u043B\u0438\u043F\u0431\u043E\u0440\u0434\u0430",preferTheOfficial:"\u041F\u0440\u0435\u0434\u043F\u043E\u0447\u0438\u0442\u0430\u043D \u0435\u0437\u0438\u043A \u0437\u0430 \u043A\u043E\u0440\u0435\u0441\u043F\u043E\u043D\u0434\u0435\u043D\u0446\u0438\u044F",openInOfficialDialogue:"\u043E\u0442\u0432\u043E\u0440\u0435\u0442\u0435 \u0432 \u043E\u0444\u0438\u0446\u0438\u0430\u043B\u0435\u043D \u0434\u0438\u0430\u043B\u043E\u0433",open:"\u041E\u0442\u0432\u043E\u0440\u0435\u0442\u0435"},walletTypes:{hardware:"\u0425\u0430\u0440\u0434\u0443\u0435\u0440\u0435\u043D \u043F\u043E\u0440\u0442\u0444\u0435\u0439\u043B",browser:"\u041F\u043E\u0440\u0442\u0444\u0435\u0439\u043B \u0432 \u0431\u0440\u0430\u0443\u0437\u044A\u0440\u0430",injected:"\u0420\u0430\u0437\u0448\u0438\u0440\u0435\u043D\u0438\u0435 \u043D\u0430 \u043F\u043E\u0440\u0442\u0444\u0435\u0439\u043B",bridge:"\u041C\u043E\u0441\u0442\u043E\u0432 \u043F\u043E\u0440\u0442\u0444\u0435\u0439\u043B",mobile:"\u041C\u043E\u0431\u0438\u043B\u0435\u043D \u043F\u043E\u0440\u0442\u0444\u0435\u0439\u043B","instant-link":"\u041C\u0438\u0433\u043D\u043E\u0432\u0435\u043D \u043F\u043E\u0440\u0442\u0444\u0435\u0439\u043B"},exportAccounts:{afterDecide:"\u0421\u043B\u0435\u0434 \u043A\u0430\u0442\u043E \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u043F\u043E\u0440\u0442\u0444\u0435\u0439\u043B, \u043C\u043E\u0436\u0435\u0442\u0435 \u0434\u0430 \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u043A\u043E\u0438 \u0430\u043A\u0430\u0443\u043D\u0442\u0438 \u0438\u0441\u043A\u0430\u0442\u0435 \u0434\u0430 \u043F\u0440\u0435\u0445\u0432\u044A\u0440\u043B\u0438\u0442\u0435.",chooseAWallet:"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u041F\u043E\u0440\u0442\u0444\u0435\u0439\u043B",complete:{button:"\u0417\u0430\u0432\u044A\u0440\u0448\u0438",descOne:"\u0421\u0435\u0433\u0430 \u0449\u0435 \u0431\u044A\u0434\u0435\u0442\u0435 \u043F\u0440\u0435\u043D\u0430\u0441\u043E\u0447\u0435\u043D\u0438 \u043A\u044A\u043C \u0438\u0437\u0431\u0440\u0430\u043D\u0438\u044F \u043E\u0442 \u0432\u0430\u0441 \u043F\u043E\u0440\u0442\u0444\u0435\u0439\u043B, \u0437\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0438\u0442\u0435 \u043F\u0440\u0435\u0445\u0432\u044A\u0440\u043B\u044F\u043D\u0435\u0442\u043E.",descTwo:"\u0421\u043B\u0435\u0434 \u043A\u0430\u0442\u043E \u0447\u0430\u0441\u0442\u0442\u0430 \u043E\u0442 \u043F\u0440\u043E\u0446\u0435\u0441\u0430 \u043F\u043E \u0438\u043C\u043F\u043E\u0440\u0442\u0438\u0440\u0430\u043D\u0435 \u043E\u0442 \u0438\u0437\u0431\u0440\u0430\u043D\u0438\u044F \u043F\u043E\u0440\u0442\u0444\u0435\u0439\u043B \u0431\u044A\u0434\u0435 \u0437\u0430\u0432\u044A\u0440\u0448\u0435\u043D\u0430, \u043D\u0430\u0442\u0438\u0441\u043D\u0435\u0442\u0435 \u0431\u0443\u0442\u043E\u043D\u0430, \u0437\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0438\u0442\u0435 \u043F\u0440\u043E\u0446\u0435\u0441\u0430 \u043D\u0430 \u043F\u0440\u0435\u0445\u0432\u044A\u0440\u043B\u044F\u043D\u0435.",startOverButton:"\u0417\u0430\u043F\u043E\u0447\u043D\u0435\u0442\u0435 \u043E\u0442\u043D\u0430\u0447\u0430\u043B\u043E",title:"\u0417\u0430\u0432\u044A\u0440\u0448\u0435\u0442\u0435 \u041F\u0440\u0435\u0445\u0432\u044A\u0440\u043B\u044F\u043D\u0435\u0442\u043E"},disclaimer:"\u041D\u044F\u043C\u0430 \u0434\u0430 \u043C\u043E\u0436\u0435\u0442\u0435 \u0434\u0430 \u043F\u0440\u0435\u0445\u0432\u044A\u0440\u043B\u0438\u0442\u0435 \u0430\u043A\u0430\u0443\u043D\u0442\u0438, \u043A\u043E\u0438\u0442\u043E \u043D\u0438\u043A\u043E\u0433\u0430 \u043D\u0435 \u0441\u0430 \u0431\u0438\u043B\u0438 \u0444\u0438\u043D\u0430\u043D\u0441\u0438\u0440\u0430\u043D\u0438 \u0438\u043B\u0438 \u0438\u0437\u043F\u043E\u043B\u0437\u0432\u0430\u043D\u0438 \u0432 NEAR.",getPassphrase:{button:"\u041F\u0440\u043E\u0434\u044A\u043B\u0436\u0438",checkLabel:"\u041A\u043E\u043F\u0438\u0440\u0430\u0445 \u0438\u043B\u0438 \u043D\u0430\u043F\u0438\u0441\u0430\u0445 \u043F\u0430\u0440\u043E\u043B\u0430\u0442\u0430",desc:"\u0429\u0435 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u044A\u0432\u0435\u0434\u0435\u0442\u0435 \u0442\u0430\u0437\u0438 \u043F\u0430\u0440\u043E\u043B\u0430, \u043A\u043E\u0433\u0430\u0442\u043E \u0437\u0430\u043F\u043E\u0447\u043D\u0435\u0442\u0435 \u0434\u0430 \u0435\u043A\u0441\u043F\u043E\u0440\u0442\u0438\u0440\u0430\u0442\u0435 \u0430\u043A\u0430\u0443\u043D\u0442\u0438\u0442\u0435 \u0441\u0438 \u0432 \u0440\u0430\u0437\u043B\u0438\u0447\u0435\u043D \u043F\u043E\u0440\u0442\u0444\u0435\u0439\u043B.",label:"\u0429\u0440\u0430\u043A\u043D\u0435\u0442\u0435, \u0437\u0430 \u0434\u0430 \u043A\u043E\u043F\u0438\u0440\u0430\u0442\u0435",title:"\u041A\u043E\u043F\u0438\u0440\u0430\u0439\u0442\u0435 \u0412\u0440\u0435\u043C\u0435\u043D\u043D\u0430\u0442\u0430 \u041F\u0430\u0440\u043E\u043B\u0430",transferButton:"\u041F\u0440\u0435\u0445\u0432\u044A\u0440\u043B\u0435\u0442\u0435 \u0410\u043A\u0430\u0443\u043D\u0442\u0438"},selectAWallet:"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u043F\u043E\u0440\u0442\u0444\u0435\u0439\u043B, \u043A\u043E\u0439\u0442\u043E \u043E\u0442\u0433\u043E\u0432\u0430\u0440\u044F \u043D\u0430 \u043D\u0443\u0436\u0434\u0438\u0442\u0435 \u0432\u0438 \u0438 \u043F\u043E\u0434\u0434\u044A\u0440\u0436\u0430 \u0441\u0432\u044A\u0440\u0437\u0430\u043D\u0438\u0442\u0435 \u0432\u0438 \u0430\u043A\u0430\u0443\u043D\u0442\u0438.",selectAccounts:{button:"\u041F\u0440\u043E\u0434\u044A\u043B\u0436\u0438",deselectAll:"\u041E\u0442\u043C\u0435\u0442\u0435\u0442\u0435 \u0432\u0441\u0438\u0447\u043A\u0438",error:"\u0410\u043A\u0430\u0443\u043D\u0442\u044A\u0442 \u043D\u0435 \u0441\u044A\u0449\u0435\u0441\u0442\u0432\u0443\u0432\u0430",noBalance:"\u0410\u043A\u0430\u0443\u043D\u0442\u044A\u0442 \u043D\u0435 \u0435 \u0444\u0438\u043D\u0430\u043D\u0441\u0438\u0440\u0430\u043D",selectAll:"\u041E\u0442\u043C\u0435\u0442\u0435\u0442\u0435 \u0432\u0441\u0438\u0447\u043A\u0438",title:"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0410\u043A\u0430\u0443\u043D\u0442\u0438 \u0437\u0430 \u041F\u0440\u0435\u0445\u0432\u044A\u0440\u043B\u044F\u043D\u0435",unavailable:"\u041F\u0440\u0435\u0445\u0432\u044A\u0440\u043B\u044F\u043D\u0435\u0442\u043E \u0435 \u043D\u0435\u0434\u043E\u0441\u0442\u044A\u043F\u043D\u043E",warningLedger:"\u0418\u0437\u0438\u0441\u043A\u0432\u0430 \u0441\u0435 \u043F\u043E\u0434\u0434\u0440\u044A\u0436\u043A\u0430 \u043D\u0430 Ledger"},selectYourAccounts:"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0412\u0430\u0448\u0438\u0442\u0435 \u0410\u043A\u0430\u0443\u043D\u0442\u0438",transferYourAccounts:"\u041F\u0440\u0435\u0445\u0432\u044A\u0440\u043B\u0435\u0442\u0435 \u0412\u0430\u0448\u0438\u0442\u0435 \u0410\u043A\u0430\u0443\u043D\u0442\u0438",walletTypes:{bridge:"\u041C\u043E\u0441\u0442\u043E\u0432 \u041F\u043E\u0440\u0442\u0444\u0435\u0439\u043B",browser:"\u041F\u043E\u0440\u0442\u0444\u0435\u0439\u043B \u0437\u0430 \u0411\u0440\u0430\u0443\u0437\u044A\u0440",hardware:"\u0425\u0430\u0440\u0434\u0443\u0435\u0440\u0435\u043D \u041F\u043E\u0440\u0442\u0444\u0435\u0439\u043B",injected:"\u0420\u0430\u0437\u0448\u0438\u0440\u0435\u043D\u0438\u0435 \u043D\u0430 \u041F\u043E\u0440\u0442\u0444\u0435\u0439\u043B",mobile:"\u041C\u043E\u0431\u0438\u043B\u0435\u043D \u041F\u043E\u0440\u0442\u0444\u0435\u0439\u043B"},warning:"\u043D\u0435 \u043F\u043E\u0434\u0434\u044A\u0440\u0436\u0430 \u0435\u043A\u0441\u043F\u043E\u0440\u0442\u0438\u0440\u0430\u043D\u0435 \u043D\u0430 \u0430\u043A\u0430\u0443\u043D\u0442\u0438 \u0432 \u043C\u043E\u043C\u0435\u043D\u0442\u0430. \u041C\u043E\u043B\u044F, \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0434\u0440\u0443\u0433 \u043F\u043E\u0440\u0442\u0444\u0435\u0439\u043B."}},Kge={or:"\u0438\u043B\u0438"},qge={clickToCopy:{label:"\u041A\u043E\u043F\u0438\u0440\u0430\u043D\u043E",tooltip:"\u0429\u0440\u0430\u043A\u043D\u0435\u0442\u0435, \u0437\u0430 \u0434\u0430 \u043A\u043E\u043F\u0438\u0440\u0430\u0442\u0435"}},Hge={modal:zge,general:Kge,component:qge},Gge={wallet:{connectYourWallet:"\uC9C0\uAC11 \uC5F0\uACB0\uD558\uAE30",whatIsAWallet:"\uC9C0\uAC11\uC740 \uBB34\uC2A8 \uC5ED\uD560\uC744 \uD558\uB098\uC694?",secureAndManage:"\uB2F9\uC2E0\uC758 \uB514\uC9C0\uD138 \uC790\uC0B0\uC744 \uBCF4\uD638\uD558\uACE0 \uAD00\uB9AC\uD569\uB2C8\uB2E4.",safelyStore:"\uC554\uD638\uD654\uD3D0\uC640 NFT\uB97C \uC548\uC804\uD558\uAC8C \uC800\uC7A5\uD558\uACE0 \uC804\uC1A1\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",logInToAny:"NEAR App\uC5D0 \uB85C\uADF8\uC778\uD569\uB2C8\uB2E4.",noNeedToCreate:"\uC0C8\uB85C\uC6B4 \uACC4\uC815\uC774\uB098 \uBE44\uBC00\uBC88\uD638\uB97C \uB9CC\uB4E4 \uD544\uC694 \uC5C6\uC774 \uC9C0\uAC11\uC744 \uC5F0\uACB0\uD55C \uD6C4 \uBC14\uB85C \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",getAWallet:"\uC9C0\uAC11 \uAC00\uC838\uC624\uAE30",useAWallet:"\uC9C0\uAC11\uC744 \uC0AC\uC6A9\uD558\uC5EC NEAR \uC790\uC0B0\uC744 \uBCF4\uD638\xB7\uAD00\uB9AC\uD558\uACE0, \uC544\uC774\uB514\uC640 \uBE44\uBC00\uBC88\uD638 \uC5C6\uC774 NEAR \uC571\uC5D0 \uB85C\uADF8\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",connectionFailed:"\uC5F0\uACB0 \uC2E4\uD328",connectionSuccessful:"\uC5F0\uACB0 \uC131\uACF5",connectionNotSuccessful:"\uC5F0\uACB0\uC774 \uC131\uACF5\uD558\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uC2DC\uB3C4\uD574 \uC8FC\uC138\uC694.",whatIsAWalletDescription:"\uC9C0\uAC11\uC744 \uC0AC\uC6A9\uD558\uBA74 \uC554\uD638\uD654\uD3D0\uC640 \uAC19\uC740 \uB514\uC9C0\uD138 \uC790\uC0B0\uC744 \uC800\uC7A5\uD558\uACE0 NEAR \uC571\uC5D0 \uB85C\uADF8\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",selectWalletOr:"\uC67C\uCABD\uC5D0\uC11C \uC9C0\uAC11\uC744 \uC120\uD0DD\uD558\uAC70\uB098",createNewWallet:"\uC0C8 \uC9C0\uAC11 \uB9CC\uB4E4\uAE30",rememberWallet:"\uC9C0\uAC11\uB4E4 \uAE30\uC5B5\uD558\uAE30",connected:"Connected",connectingTo:"\uC5F0\uACB0 \uC911: ",connectingMessage:{injected:"\uC775\uC2A4\uD150\uC158 \uCC3D\uC5D0\uC11C \uC5F0\uACB0\uC744 \uD655\uC778\uD558\uC138\uC694",browser:"\uB9AC\uB2E4\uC774\uB809\uD2B8 \uB41C \uC9C0\uAC11\uC5D0\uC11C \uC5F0\uACB0\uC744 \uD655\uC778\uD558\uC138\uC694",hardware:"Ledger \uAE30\uAE30\uC5D0\uC11C \uC5F0\uACB0\uC744 \uD655\uC778\uD558\uC138\uC694",bridge:"\uC9C0\uAC11\uC5D0\uC11C \uC5F0\uACB0 \uD655\uC778"}},ledger:{connectWithLedger:"Ledger \uC5F0\uACB0\uD558\uAE30",makeSureYourLedger:"Ledger\uAC00 \uC548\uC804\uD558\uAC8C \uC5F0\uACB0\uB418\uC5B4 \uC788\uACE0, NEAR \uC571\uC774 \uC5F4\uB824 \uC788\uB294 \uC9C0 \uD655\uC778\uD558\uC138\uC694",continue:"\uACC4\uC18D\uD558\uAE30",specifyHDPath:"HD Path \uC9C0\uC815\uD558\uAE30",enterYourPreferredHDPath:"\uC6D0\uD558\uB294 HD Path\uB97C \uC120\uD0DD\uD558\uACE0, \uD65C\uC131\uD654\uB41C \uACC4\uC815\uC774 \uC788\uB294 \uC9C0 \uAC80\uC0C9\uD558\uC138\uC694",scan:"\uAC80\uC0C9",retry:"\uB2E4\uC2DC \uC2DC\uB3C4",ledgerIsNotAvailable:"Ledger\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4",accessDeniedToUseLedgerDevice:"Ledger \uAE30\uAE30 \uC811\uADFC \uAD8C\uD55C\uC774 \uAC70\uBD80\uB418\uC5C8\uC2B5\uB2C8\uB2E4",noAccountsFound:"\uACC4\uC815\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4",selectYourAccounts:"\uACC4\uC815 \uC120\uD0DD\uD558\uAE30",connecting1Account:"\uD558\uB098\uC758 \uACC4\uC815\uC5D0 \uC5F0\uACB0",cantFindAnyAccount:"Ledger\uC640 \uC5F0\uACB0\uB41C \uACC4\uC815\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC0C8\uB85C\uC6B4 \uACC4\uC815\uC744 \uC0DD\uC131\uD558\uAC70\uB098 ",orConnectAnAnotherLedger:"\uB2E4\uB978 Ledger\uB97C \uC5F0\uACB0\uD558\uC138\uC694",connecting:"\uACC4\uC815 \uC5F0\uACB0\uD558\uAE30: ",ofAccounts:"\uAC1C \uACC4\uC815\uC744 \uCC3E\uC558\uC2B5\uB2C8\uB2E4",failedToAutomatically:"\uACC4\uC815 ID\uB97C \uCC3E\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4. \uC218\uB3D9\uC73C\uB85C \uC785\uB825\uD574\uC8FC\uC138\uC694.",overviewTheListOfAuthorized:"\uC778\uC99D\uB41C \uACC4\uC815 \uBAA9\uB85D\uC744 \uD655\uC778\uD55C \uD6C4 \uC544\uB798 \uBC84\uD2BC\uC744 \uD074\uB9AD\uD558\uC5EC \uB85C\uADF8\uC778\uC744 \uC644\uB8CC\uD558\uC138\uC694",finish:"\uC644\uB8CC"},walletTypes:{hardware:"\uD558\uB4DC\uC6E8\uC5B4 \uC9C0\uAC11",browser:"\uBE0C\uB77C\uC6B0\uC800 \uC9C0\uAC11",injected:"\uC9C0\uAC11 \uD655\uC7A5",bridge:"\uBE0C\uB9AC\uC9C0 \uC9C0\uAC11",mobile:"\uBAA8\uBC14\uC77C \uC9C0\uAC11","instant-link":"\uC778\uC2A4\uD134\uD2B8 \uC9C0\uAC11"},install:{youllNeedToInstall:"\uB2E4\uC74C \uD655\uC7A5 \uD504\uB85C\uADF8\uB7A8\uC744 \uC124\uCE58\uD574\uC8FC\uC138\uC694:",toContinueAfterInstalling:". \uC124\uCE58 \uC644\uB8CC \uD6C4 \uD398\uC774\uC9C0 \uC0C8\uB85C \uACE0\uCE68\uC774 \uD544\uC694\uD569\uB2C8\uB2E4. ",refreshThePage:"\uC0C8\uB85C \uACE0\uCE68",open:"Open"},qr:{copiedToClipboard:"\uD074\uB9BD\uBCF4\uB4DC\uC5D0 \uBCF5\uC0AC \uC644\uB8CC",failedToCopy:"\uD074\uB9BD\uBCF4\uB4DC\uC5D0 \uBCF5\uC0AC \uC2E4\uD328",scanWithYourMobile:"\uBAA8\uBC14\uC77C \uC7A5\uCE58\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC2A4\uCE94\uD574\uC8FC\uC138\uC694",scanQRCodeMessage:`\uC9C0\uAC11\uC744 \uC5F0\uACB0\uD558\uB824\uBA74 \uC774 QR \uCF54\uB4DC\uB97C \uC2A4\uCE94\uD558\uC138\uC694.
|
|
54
|
+
`,copyToClipboard:" \uD074\uB9BD\uBCF4\uB4DC\uC5D0 \uBCF5\uC0AC\uD558\uAE30",preferTheOfficial:"\uB2E4\uC74C \uD504\uB85C\uADF8\uB7A8\uC5D0\uC11C \uC81C\uACF5\uD558\uB294 \uACF5\uC2DD \uD504\uB85C\uC138\uC2A4\uB97C \uC120\uD638\uD558\uC2ED\uB2C8\uAE4C: ",openInOfficialDialogue:"\uACF5\uC2DD \uB300\uD654 \uC0C1\uC790\uC5D0\uC11C \uC5F4\uAE30",open:"Open"}},Wge={or:"\uB610\uB294"},Vge={modal:Gge,general:Wge},Yge={wallet:{connectYourWallet:"K\u1EBFt n\u1ED1i v\xED c\u1EE7a b\u1EA1n",whatIsAWallet:"V\xED l\xE0 g\xEC?",secureAndManage:"B\u1EA3o m\u1EADt & Qu\u1EA3n l\xFD t\xE0i s\u1EA3n s\u1ED1 c\u1EE7a b\u1EA1n",safelyStore:"L\u01B0u tr\u1EEF v\xE0 chuy\u1EC3n ti\u1EC1n \u0111i\u1EC7n t\u1EED v\xE0 NFT c\u1EE7a b\u1EA1n m\u1ED9t c\xE1ch an to\xE0n.",logInToAny:"\u0110\u0103ng nh\u1EADp v\xE0o b\u1EA5t k\u1EF3 \u1EE9ng d\u1EE5ng tr\xEAn NEAR",noNeedToCreate:"Kh\xF4ng c\u1EA7n t\u1EA1o t\xE0i kho\u1EA3n ho\u1EB7c th\xF4ng tin \u0111\u0103ng nh\u1EADp m\u1EDBi. K\u1EBFt n\u1ED1i v\xED c\u1EE7a b\u1EA1n v\xE0 b\u1EAFt \u0111\u1EA7u!",getAWallet:"T\u1EA1o V\xED",useAWallet:"S\u1EED d\u1EE5ng v\xED \u0111\u1EC3 b\u1EA3o m\u1EADt v\xE0 qu\u1EA3n l\xFD t\xE0i s\u1EA3n tr\xEAn NEAR c\u1EE7a b\u1EA1n v\xE0 \u0111\u0103ng nh\u1EADp v\xE0o b\u1EA5t k\u1EF3 \u1EE9ng d\u1EE5ng NEAR n\xE0o, kh\xF4ng c\u1EA7n t\xEAn ng\u01B0\u1EDDi d\xF9ng v\xE0 m\u1EADt kh\u1EA9u.",connectionFailed:"K\u1EBFt n\u1ED1i th\u1EA5t b\u1EA1i",connectionSuccessful:"K\u1EBFt n\u1ED1i th\xE0nh c\xF4ng",connectionNotSuccessful:"K\u1EBFt n\u1ED1i kh\xF4ng th\xE0nh c\xF4ng, vui l\xF2ng th\u1EED l\u1EA1i.",whatIsAWalletDescription:"V\xED cho ph\xE9p b\u1EA1n l\u01B0u tr\u1EEF t\xE0i s\u1EA3n s\u1ED1 nh\u01B0 ti\u1EC1n \u0111i\u1EC7n t\u1EED v\xE0 \u0111\u0103ng nh\u1EADp v\xE0o c\xE1c \u1EE9ng d\u1EE5ng tr\xEAn NEAR.",selectWalletOr:"Vui l\xF2ng ch\u1ECDn m\u1ED9t v\xED \u1EDF b\xEAn tr\xE1i, ho\u1EB7c",createNewWallet:"T\u1EA1o v\xED m\u1EDBi",rememberWallet:"Ghi nh\u1EDB l\u1EF1a ch\u1ECDn v\xED",connected:"\u0110\xE3 k\u1EBFt n\u1ED1i",connectingTo:"\u0110ang k\u1EBFt n\u1ED1i t\u1EDBi",connectingMessage:{injected:"X\xE1c nh\u1EADn k\u1EBFt n\u1ED1i trong c\u1EEDa s\u1ED5 ti\u1EC7n \xEDch m\u1EDF r\u1ED9ng",browser:"X\xE1c nh\u1EADn k\u1EBFt n\u1ED1i trong v\xED sau khi \u0111\u01B0\u1EE3c chuy\u1EC3n h\u01B0\u1EDBng",hardware:"X\xE1c nh\u1EADn k\u1EBFt n\u1ED1i v\u1EDBi v\xED l\u1EA1nh",bridge:"X\xE1c nh\u1EADn k\u1EBFt n\u1ED1i trong v\xED"}},ledger:{connectWithLedger:"K\u1EBFt n\u1ED1i v\xED Ledger",makeSureYourLedger:"\u0110\u1EA3m b\u1EA3o Ledger c\u1EE7a b\u1EA1n \u0111\u01B0\u1EE3c k\u1EBFt n\u1ED1i an to\xE0n v\xE0 \u1EE9ng d\u1EE5ng NEAR \u0111ang m\u1EDF s\u1EB5n tr\xEAn thi\u1EBFt b\u1ECB",continue:"Ti\u1EBFp t\u1EE5c",specifyHDPath:"Ch\u1EC9 \u0111\u1ECBnh HD Path",enterYourPreferredHDPath:"Nh\u1EADp HD Path c\u1EE7a b\u1EA1n, sau \u0111\xF3 qu\xE9t t\xECm c\xE1c t\xE0i kho\u1EA3n ho\u1EA1t \u0111\u1ED9ng",scan:"Qu\xE9t",retry:"Th\u1EED l\u1EA1i",ledgerIsNotAvailable:"Ledger kh\xF4ng kh\u1EA3 d\u1EE5ng",accessDeniedToUseLedgerDevice:"Truy c\u1EADp Ledger b\u1ECB t\u1EEB ch\u1ED1i",noAccountsFound:"Kh\xF4ng t\xECm th\u1EA5y t\xE0i kho\u1EA3n",selectYourAccounts:"Ch\u1ECDn t\xE0i kho\u1EA3n c\u1EE7a b\u1EA1n",connecting1Account:"\u0110ang k\u1EBFt n\u1ED1i 1 t\xE0i kho\u1EA3n",cantFindAnyAccount:"Kh\xF4ng th\u1EC3 t\xECm th\u1EA5y b\u1EA5t k\u1EF3 t\xE0i kho\u1EA3n n\xE0o \u0111\u01B0\u1EE3c li\xEAn k\u1EBFt v\u1EDBi Ledger n\xE0y. Vui l\xF2ng t\u1EA1o m\u1ED9t t\xE0i kho\u1EA3n NEAR m\u1EDBi",orConnectAnAnotherLedger:"ho\u1EB7c k\u1EBFt n\u1ED1i v\u1EDBi v\xED Ledger kh\xE1c.",connecting:"\u0110ang k\u1EBFt n\u1ED1i",ofAccounts:"c\u1EE7a t\xE0i kho\u1EA3n",failedToAutomatically:"Kh\xF4ng th\u1EC3 t\u1EF1 \u0111\u1ED9ng t\xECm id t\xE0i kho\u1EA3n. Nh\u1EADp th\u1EE7 c\xF4ng:",overviewTheListOfAuthorized:"T\u1ED5ng quan danh s\xE1ch c\xE1c t\xE0i kho\u1EA3n \u0111\u01B0\u1EE3c \u1EE7y quy\u1EC1n, ho\xE0n t\u1EA5t \u0111\u0103ng nh\u1EADp b\u1EB1ng c\xE1ch b\u1EA5m v\xE0o n\xFAt b\xEAn d\u01B0\u1EDBi.",finish:"Ho\xE0n th\xE0nh"},install:{youllNeedToInstall:"B\u1EA1n s\u1EBD c\u1EA7n c\xE0i \u0111\u1EB7t",toContinueAfterInstalling:"\u0111\u1EC3 b\u1EAFt \u0111\u1EA7u. Sau khi c\xE0i \u0111\u1EB7t xong",refreshThePage:"T\u1EA3i l\u1EA1i trang.",open:"M\u1EDF"},qr:{copiedToClipboard:"\u0110\xE3 sao ch\xE9p v\xE0o b\u1EA3ng ghi t\u1EA1m",failedToCopy:"Sao ch\xE9p v\xE0o b\u1EA3ng ghi t\u1EA1m th\u1EA5t b\u1EA1i",scanWithYourMobile:"Qu\xE9t v\u1EDBi \u0111i\u1EC7n tho\u1EA1i c\u1EE7a b\u1EA1n",scanQRCodeMessage:`Vui l\xF2ng qu\xE9t m\xE3 QR n\xE0y
|
|
55
|
+
\u0111\u1EC3 k\u1EBFt n\u1ED1i v\xED c\u1EE7a b\u1EA1n.`,copyToClipboard:" Sao ch\xE9p v\xE0o b\u1EA3ng ghi t\u1EA1m",preferTheOfficial:"Dialogue ch\xEDnh th\u1EE9c c\u1EE7a",openInOfficialDialogue:"m\u1EDF trong h\u1ED9p tho\u1EA1i ch\xEDnh th\u1EE9c",open:"M\u1EDF"},walletTypes:{hardware:"V\xED l\u1EA1nh",browser:"V\xED tr\xECnh duy\u1EC7t",injected:"V\xED ti\u1EC7n \xEDch m\u1EDF r\u1ED9ng",bridge:"V\xED C\u1EA7u",mobile:"V\xED Mobile","instant-link":"V\xED t\u1EE9c th\xEC"},exportAccounts:{chooseAWallet:"Ch\u1ECDn v\xED",transferYourAccounts:"Chuy\u1EC3n t\xE0i kho\u1EA3n",selectAWallet:"Ch\u1ECDn v\xED ph\xF9 h\u1EE3p v\u1EDBi nhu c\u1EA7u c\u1EE7a b\u1EA1n, v\xED \u0111\u01B0\u1EE3c ch\u1ECDn c\u1EA7n h\u1ED7 tr\u1EE3 c\xE1c t\xE0i kho\u1EA3n \u0111ang s\u1EED d\u1EE5ng.",selectYourAccounts:"Ch\u1ECDn t\xE0i kho\u1EA3n",afterDecide:"Sau khi ch\u1ECDn \u0111\u01B0\u1EE3c t\xE0i kho\u1EA3n b\u1EA1n c\xF3 chuy\u1EC3n.",disclaimer:"B\u1EA1n kh\xF4ng th\u1EC3 chuy\u1EC3n t\xE0i kho\u1EA3n n\u1EBFu t\xE0i kho\u1EA3n \u0111\xF3 ch\u01B0a \u0111\u01B0\u1EE3c nh\u1EADn ti\u1EC1n ho\u1EB7c ch\u01B0a ph\xE1t sinh giao d\u1ECBch tr\xEAn NEAR.",warning:"kh\xF4ng h\u1ED7 tr\u1EE3 xu\u1EA5t t\xE0i kho\u1EA3n. Vui l\xF2ng ch\u1ECDn v\xED kh\xE1c.",walletTypes:{hardware:"V\xED l\u1EA1nh",browser:"V\xED tr\xECnh duy\u1EC7t",injected:"V\xED ti\u1EC7n \xEDch m\u1EDF r\u1ED9ng",bridge:"V\xED C\u1EA7u",mobile:"V\xED Mobile"},selectAccounts:{title:"Ch\u1ECDn t\xE0i kho\u1EA3n \u0111\u1EC3 chuy\u1EC3n",button:"L\u1EA5y c\u1EE5m m\u1EADt kh\u1EA9u",deselectAll:"B\u1ECF ch\u1ECDn t\u1EA5t c\u1EA3",selectAll:"Ch\u1ECDn t\u1EA5t c\u1EA3",unavailable:"Chuy\u1EC3n kh\xF4ng kh\u1EA3 d\u1EE5ng",error:"T\xE0i kho\u1EA3n kh\xF4ng t\u1ED3n t\u1EA1i",warningLedger:"Y\xEAu c\u1EA7u h\u1ED7 tr\u1EE3 Ledger",noBalance:"T\xE0i kho\u1EA3n tr\u1ED1ng"},getPassphrase:{title:"Sao ch\xE9p m\u1EADt kh\u1EA9u t\u1EA1m th\u1EDDi",desc:"B\u1EA1n s\u1EBD c\u1EA7n nh\u1EADp m\u1EADt kh\u1EA9u khi b\u1EAFt \u0111\u1EA7u xu\u1EA5t c\xE1c kho\u1EA3n t\u1EDBi v\xED kh\xE1c.",button:"Ti\u1EBFp t\u1EE5c",label:"B\u1EA5m \u0111\u1EC3 sao ch\xE9p",checkLabel:"T\xF4i \u0111\xE3 ch\xE9p ho\u1EB7c ghi l\u1EA1i m\u1EADt kh\u1EA9u"},complete:{title:"Ho\xE0n th\xE0nh chuy\u1EC3n",descOne:"B\u1EA1n s\u1EBD \u0111\u01B0\u1EE3c chuy\u1EC3n h\u01B0\u1EDBng t\u1EDBi t\xE0i kho\u1EA3n \u0111\xE3 ch\u1ECDn \u0111\u1EC3 ho\xE0n t\u1EA5t qu\xE1 tr\xECnh.",descTwo:"Sau khi nh\u1EADp, nh\u1EA5n n\xFAt \u0111\u1EC3 ho\xE0n t\u1EA5t quy tr\xECnh chuy\u1EC3n.",button:"Ho\xE0n th\xE0nh"}}},Zge={or:"ho\u1EB7c"},Jge={clickToCopy:{label:"\u0110\xE3 sao ch\xE9p",tooltip:"B\u1EA5m \u0111\u1EC3 sao ch\xE9p"}},Xge={modal:Yge,general:Zge,component:Jge},Qge={wallet:{connectYourWallet:"\u0905\u092A\u0928\u093E \u0935\u0949\u0932\u0947\u091F (Wallet) \u0915\u0928\u0947\u0915\u094D\u091F \u0915\u0930\u0947\u0902\u0964",whatIsAWallet:"\u0935\u0949\u0932\u0947\u091F \u0915\u094D\u092F\u093E \u0939\u0948?",secureAndManage:"\u0938\u0941\u0930\u0915\u094D\u0937\u093F\u0924 \u0914\u0930 \u092A\u094D\u0930\u092C\u0902\u0927\u093F\u0924 \u0915\u0930\u0947\u0902\u0964",safelyStore:"\u0905\u092A\u0928\u0940 \u0915\u094D\u0930\u093F\u092A\u094D\u091F\u094B\u0915\u0930\u0947\u0902\u0938\u0940 \u0914\u0930 \u090F\u0928\u090F\u092B\u091F\u0940 \u0915\u094B \u0938\u0941\u0930\u0915\u094D\u0937\u093F\u0924 \u0930\u0942\u092A \u0938\u0947 \u0938\u094D\u091F\u094B\u0930 \u0914\u0930 \u091F\u094D\u0930\u093E\u0902\u0938\u092B\u0930 \u0915\u0930\u0947\u0902\u0964",logInToAny:"NEAR \u092A\u0930 \u0915\u093F\u0938\u0940 \u092D\u0940 \u0910\u092A \u092E\u0947\u0902 \u0938\u093E\u0907\u0928 \u0907\u0928 \u0915\u0930\u0947\u0902\u0964",noNeedToCreate:"\u0928\u090F \u0916\u093E\u0924\u0947 \u092F\u093E \u0932\u0949\u0917\u093F\u0928 \u092C\u0928\u093E\u0928\u0947 \u0915\u0940 \u0906\u0935\u0936\u094D\u092F\u0915\u0924\u093E \u0928\u0939\u0940\u0902 \u0939\u0948\u0964 \u0905\u092A\u0928\u093E \u0935\u0949\u0932\u0947\u091F(NEAR Wallet)\u0915\u0928\u0947\u0915\u094D\u091F \u0915\u0930\u0947\u0902 \u0914\u0930 \u0906\u0930\u0902\u092D \u0915\u0930\u0947\u0902\u0964",getAWallet:"\u090F\u0915 \u0935\u0949\u0932\u0947\u091F \u092C\u0928\u093E\u090F\u0901\u0964",useAWallet:"\u0905\u092A\u0928\u0940 NEAR \u0938\u0902\u092A\u0924\u094D\u0924\u093F\u092F\u094B\u0902 \u0915\u094B \u0938\u0941\u0930\u0915\u094D\u0937\u093F\u0924 \u0914\u0930 \u092A\u094D\u0930\u092C\u0902\u0927\u093F\u0924 \u0915\u0930\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F \u0935\u0949\u0932\u0947\u091F \u0915\u093E \u0909\u092A\u092F\u094B\u0917 \u0915\u0930\u0947\u0902 \u0914\u0930 \u0915\u093F\u0938\u0940 \u092D\u0940 NEAR \u0910\u092A (app) \u092E\u0947\u0902 \u0932\u0949\u0917 \u0907\u0928 \u0915\u0930\u0947\u0902, \u0915\u093F\u0938\u0940 \u0909\u092A\u092F\u094B\u0917\u0915\u0930\u094D\u0924\u093E (user) \u0928\u093E\u092E \u0914\u0930 \u092A\u093E\u0938\u0935\u0930\u094D\u0921 \u0915\u0940 \u0906\u0935\u0936\u094D\u092F\u0915\u0924\u093E \u0928\u0939\u0940\u0902 \u0939\u0948\u0964",connectionFailed:"\u0915\u0928\u0947\u0915\u094D\u0936\u0928 \u0935\u093F\u092B\u0932|",connectionSuccessful:"\u0915\u0928\u0947\u0915\u094D\u0936\u0928 \u0938\u092B\u0932|",connectionNotSuccessful:"\u0915\u0928\u0947\u0915\u094D\u0936\u0928 \u0938\u092B\u0932 \u0928\u0939\u0940\u0902 \u0939\u0941\u0906, \u0915\u0943\u092A\u092F\u093E \u092A\u0941\u0928\u0903 \u092A\u094D\u0930\u092F\u093E\u0938 \u0915\u0930\u0947\u0902\u0964",whatIsAWalletDescription:"\u0935\u0949\u0932\u0947\u091F \u0906\u092A\u0915\u094B \u0915\u094D\u0930\u093F\u092A\u094D\u091F\u094B \u091C\u0948\u0938\u0940 \u0921\u093F\u091C\u093F\u091F\u0932 \u0938\u0902\u092A\u0924\u094D\u0924\u093F\u092F\u093E\u0902 \u0938\u094D\u091F\u094B\u0930 \u0915\u0930\u0928\u0947 \u0914\u0930 NEAR \u092A\u0930 \u0910\u092A\u094D\u0938 \u092E\u0947\u0902 \u0932\u0949\u0917 \u0907\u0928 \u0915\u0930\u0928\u0947 \u0915\u0940 \u0905\u0928\u0941\u092E\u0924\u093F \u0926\u0947\u0924\u093E \u0939\u0948\u0964",selectWalletOr:"\u0915\u0943\u092A\u092F\u093E \u092C\u093E\u0908\u0902 \u0913\u0930 \u090F\u0915 \u0935\u0949\u0932\u0947\u091F \u091A\u0941\u0928\u0947\u0902, \u092F\u093E",createNewWallet:"\u090F\u0915 \u0928\u092F\u093E \u0935\u0949\u0932\u0947\u091F \u092C\u0928\u093E\u090F\u0902",rememberWallet:"\u0935\u0949\u0932\u0947\u091F\u094B\u0902 \u0915\u094B \u092F\u093E\u0926 \u0930\u0916\u0947\u0902",connected:"\u0935\u0949\u0932\u0947\u091F \u091C\u0941\u095C \u0917\u092F\u093E|",connectingTo:"\u0935\u0949\u0932\u0947\u091F \u091C\u0941\u095C \u0930\u0939\u093E \u0939\u0947|",connectingMessage:{injected:"\u090F\u0915\u094D\u0938\u091F\u0947\u0902\u0936\u0928 \u0935\u093F\u0902\u0921\u094B \u092E\u0947\u0902 \u0915\u0928\u0947\u0915\u094D\u0936\u0928 \u0915\u0940 \u092A\u0941\u0937\u094D\u091F\u093F \u0915\u0930\u0947\u0902|",browser:"\u0930\u0940\u0921\u093E\u092F\u0930\u0947\u0915\u094D\u091F \u0939\u094B\u0928\u0947 \u0915\u0947 \u092C\u093E\u0926 \u0935\u0949\u0932\u0947\u091F \u092E\u0947\u0902 \u0915\u0928\u0947\u0915\u094D\u0936\u0928 \u0915\u0940 \u092A\u0941\u0937\u094D\u091F\u093F \u0915\u0930\u0947\u0902|",hardware:"\u0915\u094B\u0932\u094D\u0921 \u0935\u0949\u0932\u0947\u091F \u0915\u0947 \u0938\u093E\u0925 \u0915\u0928\u0947\u0915\u094D\u0936\u0928 \u0915\u0940 \u092A\u0941\u0937\u094D\u091F\u093F \u0915\u0930\u0947\u0902|",bridge:"\u0935\u0949\u0932\u0947\u091F \u092E\u0947\u0902 \u0915\u0928\u0947\u0915\u094D\u0936\u0928 \u0915\u0940 \u092A\u0941\u0937\u094D\u091F\u093F \u0915\u0930\u0947\u0902"}},ledger:{connectWithLedger:"\u0932\u0947\u091C\u0930(Ledger)\u0935\u0949\u0932\u0947\u091F \u0915\u0928\u0947\u0915\u094D\u091F \u0915\u0930\u0947\u0902|",makeSureYourLedger:"\u0938\u0941\u0928\u093F\u0936\u094D\u091A\u093F\u0924 \u0915\u0930\u0947\u0902 \u0915\u093F \u0906\u092A\u0915\u093E \u0932\u0947\u091C\u0930 \u0938\u0941\u0930\u0915\u094D\u0937\u093F\u0924 \u0930\u0942\u092A \u0938\u0947 \u091C\u0941\u0921\u093C\u093E \u0939\u0941\u0906 \u0939\u0948 \u0914\u0930 NEAR \u0910\u092A \u0906\u092A\u0915\u0947 \u0921\u093F\u0935\u093E\u0907\u0938 (Device)\u092A\u0930 \u092A\u0939\u0932\u0947 \u0938\u0947 \u0939\u0940 \u0916\u0941\u0932\u093E \u0939\u0948|",continue:"\u091C\u093E\u0930\u0940 \u0930\u0916\u0947|",specifyHDPath:"\u0939\u093E\u0930\u094D\u0921 \u0921\u093F\u0938\u094D\u0915(Hard Disk)\u092A\u0925(Path)\u0928\u093F\u0930\u094D\u0927\u093E\u0930\u093F\u0924 \u0915\u0930\u0947|",enterYourPreferredHDPath:"\u0905\u092A\u0928\u093E \u090F\u091A\u0921\u0940 \u092A\u0925 \u0926\u0930\u094D\u091C \u0915\u0930\u0947\u0902, \u092B\u093F\u0930 \u0938\u0915\u094D\u0930\u093F\u092F \u0916\u093E\u0924\u094B\u0902 \u0915\u0947 \u0932\u093F\u090F \u0938\u094D\u0915\u0948\u0928 \u0915\u0930\u0947\u0902|",scan:"\u0938\u094D\u0915\u0948\u0928 \u0915\u0930\u0947|",retry:"\u0926\u094B\u092C\u093E\u0930\u093E \u092A\u094D\u0930\u092F\u093E\u0938 \u0915\u0930\u0947|",ledgerIsNotAvailable:"\u0932\u0947\u091C\u0930 \u0909\u092A\u0932\u092C\u094D\u0927 \u0928\u0939\u0940\u0902 \u0939\u0948|",accessDeniedToUseLedgerDevice:"\u0932\u0947\u091C\u0930 \u0921\u093F\u0935\u093E\u0907\u0938 \u0915\u093E \u0909\u092A\u092F\u094B\u0917 \u0915\u0930\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F \u092A\u094D\u0930\u0935\u0947\u0936 \u0928\u093F\u0937\u0947\u0927|",noAccountsFound:"\u0916\u093E\u0924\u093E \u0928\u0939\u0940\u0902 \u092E\u093F\u0932\u093E|",selectYourAccounts:"\u0905\u092A\u0928\u0947 \u0916\u093E\u0924\u0947 \u091A\u0941\u0928\u0947\u0902|",connecting1Account:"\u090F\u0915 \u0916\u093E\u0924\u093E \u0915\u0928\u0947\u0915\u094D\u091F \u0939\u094B \u0930\u0939\u093E \u0939\u0948|",cantFindAnyAccount:"\u0907\u0938 \u0932\u0947\u091C\u0930 \u0938\u0947 \u091C\u0941\u0921\u093C\u093E \u0915\u094B\u0908 \u0916\u093E\u0924\u093E \u0928\u0939\u0940\u0902 \u092E\u093F\u0932\u093E\u0964 \u0915\u0943\u092A\u092F\u093E \u090F\u0915 \u0928\u092F\u093E NEAR \u0916\u093E\u0924\u093E \u092C\u0928\u093E\u090F\u0901|",orConnectAnAnotherLedger:"\u0905\u0925\u0935\u093E \u0926\u0942\u0938\u0930\u0947 \u0932\u0947\u091C\u0930 \u0935\u0949\u0932\u0947\u091F \u0938\u0947 \u0915\u0928\u0947\u0915\u094D\u091F \u0915\u0930\u0947\u0902\u0964",connecting:"\u091C\u0941\u095C \u0930\u0939\u093E \u0939\u0947|",ofAccounts:"\u0916\u093E\u0924\u093E \u0905\u092C \u091C\u0941\u095C\u093E \u0928\u0939\u0940\u0902 \u0939\u0947|",failedToAutomatically:"\u0916\u093E\u0924\u093E \u0906\u0908\u0921\u0940 \u0938\u094D\u0935\u091A\u093E\u0932\u093F\u0924 \u0930\u0942\u092A \u0938\u0947 \u0916\u094B\u091C\u0928\u0947 \u092E\u0947\u0902 \u0905\u0938\u092E\u0930\u094D\u0925\u0964 \u092E\u0948\u0928\u094D\u092F\u0941\u0905\u0932 (Manuall) \u0930\u0942\u092A \u0938\u0947 \u0915\u094B\u0936\u093F\u0936 \u0915\u0930\u0947\u0902|",overviewTheListOfAuthorized:"\u0905\u0935\u0932\u094B\u0915\u0928 \u0905\u0927\u093F\u0915\u0943\u0924 \u0915\u0940 \u0938\u0942\u091A\u0940, \u0928\u0940\u091A\u0947 \u0926\u093F\u090F \u0917\u090F \u092C\u091F\u0928 \u092A\u0930 \u0915\u094D\u0932\u093F\u0915 \u0915\u0930\u0915\u0947 \u0932\u0949\u0917\u093F\u0928 \u092A\u0942\u0930\u093E \u0915\u0930\u0947\u0902\u0964",finish:"\u0938\u092E\u093E\u092A\u094D\u0924|"},install:{youllNeedToInstall:"\u0906\u092A\u0915\u094B \u0907\u0902\u0938\u094D\u091F\u0949\u0932 \u0915\u0930\u0928\u093E \u0939\u094B\u0917\u093E|",toContinueAfterInstalling:"\u0907\u0902\u0938\u094D\u091F\u0949\u0932 \u0915\u0930\u0928\u0947 \u0915\u0947 \u092C\u093E\u0926 \u091C\u093E\u0930\u0940 \u0930\u0916\u0947|",refreshThePage:"\u092A\u0941\u0928: \u0932\u094B\u0921 \u0915\u0930\u0947\u0902\u0964",open:"\u0916\u094B\u0932\u0947|"},qr:{copiedToClipboard:"\u0915\u094D\u0932\u093F\u092A\u092C\u094B\u0930\u094D\u0921(Clipboard)\u092A\u0930 \u0915\u0949\u092A\u0940 \u0915\u093F\u092F\u093E \u0917\u092F\u093E|",failedToCopy:"\u0915\u094D\u0932\u093F\u092A\u092C\u094B\u0930\u094D\u0921 \u092A\u0930 \u0915\u0949\u092A\u0940 \u0915\u0930\u0928\u093E \u0935\u093F\u092B\u0932 \u0930\u0939\u093E|",scanWithYourMobile:"\u0905\u092A\u0928\u0947 \u092B\u094B\u0928 (Mobile)\u0938\u0947 \u0938\u094D\u0915\u0948\u0928 \u0915\u0930\u0947\u0902|",scanQRCodeMessage:`\u0915\u0943\u092A\u092F\u093E \u0905\u092A\u0928\u0947 \u0935\u0949\u0932\u0947\u091F \u0915\u094B \u0915\u0928\u0947\u0915\u094D\u091F \u0915\u0930\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F \u0907\u0938 QR \u0915\u094B\u0921 \u0915\u094B \u0938\u094D\u0915\u0948\u0928 \u0915\u0930\u0947\u0902\u0964
|
|
56
|
+
`,copyToClipboard:" \u0915\u094D\u0932\u093F\u092A\u092C\u094B\u0930\u094D\u0921 \u092A\u0930 \u0915\u0949\u092A\u0940 \u0915\u0930\u0947\u0902|",preferTheOfficial:"\u0906\u0927\u093F\u0915\u093E\u0930\u093F\u0915 \u0938\u0902\u0935\u093E\u0926 \u0915\u094B \u092A\u094D\u0930\u093E\u0925\u092E\u093F\u0915\u0924\u093E \u0926\u0947\u0902|",openInOfficialDialogue:"\u0906\u0927\u093F\u0915\u093E\u0930\u093F\u0915 \u0938\u0902\u0935\u093E\u0926 \u092E\u0947\u0902 \u0916\u094B\u0932\u0947\u0902",open:"\u0916\u094B\u0932\u0947|"},walletTypes:{hardware:"\u0939\u093E\u0930\u094D\u0921\u0935\u0947\u092F\u0930 \u0935\u0949\u0932\u0947\u091F",browser:"\u092C\u094D\u0930\u093E\u0909\u091C\u093C\u0930 \u0935\u0949\u0932\u0947\u091F",injected:"\u0935\u0949\u0932\u0947\u091F \u090F\u0915\u094D\u0938\u091F\u0947\u0902\u0936\u0928",bridge:"\u092C\u094D\u0930\u093F\u091C \u0935\u0949\u0932\u0947\u091F",mobile:"\u092E\u094B\u092C\u093E\u0907\u0932 \u0935\u0949\u0932\u0947\u091F","instant-link":"\u0907\u0902\u0938\u094D\u091F\u0947\u0902\u091F \u0935\u0949\u0932\u0947\u091F"},exportAccounts:{afterDecide:"\u091C\u092C \u0906\u092A \u090F\u0915 \u0935\u0949\u0932\u0947\u091F \u091A\u0941\u0928 \u0932\u0947\u0902\u0917\u0947, \u0924\u092C \u0906\u092A \u091A\u0941\u0928 \u0938\u0915\u0924\u0947 \u0939\u0948\u0902 \u0915\u093F \u0906\u092A \u0915\u094C\u0928 \u0938\u0947 \u0916\u093E\u0924\u0947 \u0938\u094D\u0925\u093E\u0928\u093E\u0902\u0924\u0930\u093F\u0924 \u0915\u0930\u0928\u093E \u091A\u093E\u0939\u0924\u0947 \u0939\u0948\u0902\u0964",chooseAWallet:"\u090F\u0915 \u0935\u0949\u0932\u0947\u091F \u091A\u0941\u0928\u0947\u0902",complete:{button:"\u092A\u0942\u0930\u094D\u0923 \u0915\u0930\u0947\u0902",descOne:"\u0905\u092C \u0906\u092A\u0915\u094B \u0938\u094D\u0925\u093E\u0928\u093E\u0902\u0924\u0930\u093F\u0924 \u0915\u0930\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F \u0906\u092A\u0928\u0947 \u091C\u094B \u0935\u0949\u0932\u0947\u091F \u091A\u0941\u0928\u093E \u0939\u0948, \u0909\u0938 \u092A\u0930 \u0930\u0940\u0921\u093E\u092F\u0930\u0947\u0915\u094D\u091F \u0915\u093F\u092F\u093E \u091C\u093E\u090F\u0917\u093E\u0964",descTwo:"\u091A\u0941\u0928\u0947 \u0939\u0941\u090F \u0935\u0949\u0932\u0947\u091F \u0938\u0947 \u0906\u092F\u093E\u0924 \u092A\u094D\u0930\u0915\u094D\u0930\u093F\u092F\u093E \u092A\u0942\u0930\u0940 \u0939\u094B\u0928\u0947 \u0915\u0947 \u092C\u093E\u0926, \u0938\u094D\u0925\u093E\u0928\u093E\u0902\u0924\u0930\u0923 \u092A\u094D\u0930\u0915\u094D\u0930\u093F\u092F\u093E \u0915\u094B \u092A\u0942\u0930\u093E \u0915\u0930\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F \u092C\u091F\u0928 \u0926\u092C\u093E\u090F\u0902\u0964",startOverButton:"\u092B\u093F\u0930 \u0938\u0947 \u0936\u0941\u0930\u0942 \u0915\u0930\u0947\u0902",title:"\u0938\u094D\u0925\u093E\u0928\u093E\u0902\u0924\u0930\u0923 \u092A\u0942\u0930\u093E \u0915\u0930\u0947\u0902"},disclaimer:"\u0906\u092A \u0909\u0928 \u0916\u093E\u0924\u094B\u0902 \u0915\u094B \u0938\u094D\u0925\u093E\u0928\u093E\u0902\u0924\u0930\u093F\u0924 \u0928\u0939\u0940\u0902 \u0915\u0930 \u0938\u0915\u0947\u0902\u0917\u0947 \u091C\u094B \u0915\u092D\u0940 \u092D\u0940 NEAR \u092A\u0930 \u092B\u0902\u0921\u0947\u0921 \u092F\u093E \u0909\u092A\u092F\u094B\u0917 \u0915\u093F\u090F \u0917\u090F \u0928\u0939\u0940\u0902 \u0939\u0948\u0902\u0964",getPassphrase:{button:"\u091C\u093E\u0930\u0940 \u0930\u0916\u0947\u0902",checkLabel:"\u092E\u0948\u0902\u0928\u0947 \u092A\u093E\u0938\u0935\u0930\u094D\u0921 \u0915\u094B \u0915\u0949\u092A\u0940 \u092F\u093E \u0928\u094B\u091F \u0915\u093F\u092F\u093E \u0939\u0948",desc:"\u091C\u092C \u0906\u092A \u0905\u092A\u0928\u0947 \u0916\u093E\u0924\u094B\u0902 \u0915\u094B \u090F\u0915 \u0905\u0932\u0917 \u0935\u0949\u0932\u0947\u091F \u092E\u0947\u0902 \u0928\u093F\u0930\u094D\u092F\u093E\u0924 \u0915\u0930\u0928\u093E \u0936\u0941\u0930\u0942 \u0915\u0930\u0947\u0902\u0917\u0947, \u0924\u094B \u0906\u092A\u0915\u094B \u0907\u0938 \u092A\u093E\u0938\u0935\u0930\u094D\u0921 \u0915\u094B \u0926\u0930\u094D\u091C \u0915\u0930\u0928\u0947 \u0915\u0940 \u0906\u0935\u0936\u094D\u092F\u0915\u0924\u093E \u0939\u094B\u0917\u0940\u0964",label:"\u0915\u0949\u092A\u0940 \u0915\u0930\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F \u0915\u094D\u0932\u093F\u0915 \u0915\u0930\u0947\u0902",title:"\u0905\u0938\u094D\u0925\u093E\u092F\u0940 \u092A\u093E\u0938\u0935\u0930\u094D\u0921 \u0915\u0949\u092A\u0940 \u0915\u0930\u0947\u0902",transferButton:"\u0916\u093E\u0924\u094B\u0902 \u0915\u093E \u0938\u094D\u0925\u093E\u0928\u093E\u0902\u0924\u0930\u0923 \u0915\u0930\u0947\u0902"},selectAWallet:"\u090F\u0915 \u0935\u0949\u0932\u0947\u091F \u091A\u0941\u0928\u0947\u0902 \u091C\u094B \u0906\u092A\u0915\u0940 \u0906\u0935\u0936\u094D\u092F\u0915\u0924\u093E\u0913\u0902 \u0915\u094B \u092A\u0942\u0930\u093E \u0915\u0930\u0924\u093E \u0939\u0948 \u0914\u0930 \u0906\u092A\u0915\u0947 \u091C\u0941\u0921\u093C\u0947 \u0916\u093E\u0924\u094B\u0902 \u0915\u093E \u0938\u092E\u0930\u094D\u0925\u0928 \u0915\u0930\u0924\u093E \u0939\u0948\u0964",selectAccounts:{button:"\u091C\u093E\u0930\u0940 \u0930\u0916\u0947\u0902",deselectAll:"\u0938\u092D\u0940 \u0905\u091A\u092F\u0928\u093F\u0924 \u0915\u0930\u0947\u0902",error:"\u0916\u093E\u0924\u093E \u0905\u0938\u094D\u0924\u093F\u0924\u094D\u0935 \u092E\u0947\u0902 \u0928\u0939\u0940\u0902 \u0939\u0948",noBalance:"\u0916\u093E\u0924\u093E \u0928\u093F\u0927\u093F \u0928\u0939\u0940\u0902 \u0939\u0948",selectAll:"\u0938\u092D\u0940 \u091A\u0941\u0928\u0947\u0902",title:"\u0938\u094D\u0925\u093E\u0928\u093E\u0902\u0924\u0930\u0923 \u0915\u0947 \u0932\u093F\u090F \u0916\u093E\u0924\u094B\u0902 \u0915\u093E \u091A\u092F\u0928 \u0915\u0930\u0947\u0902",unavailable:"\u0938\u094D\u0925\u093E\u0928\u093E\u0902\u0924\u0930\u0923 \u0905\u0938\u094D\u0935\u0940\u0915\u0943\u0924",warningLedger:"\u0932\u0947\u091C\u0930 \u0938\u092E\u0930\u094D\u0925\u0928 \u0915\u0940 \u0906\u0935\u0936\u094D\u092F\u0915\u0924\u093E \u0939\u0948"},selectYourAccounts:"\u0905\u092A\u0928\u0947 \u0916\u093E\u0924\u0947 \u091A\u0941\u0928\u0947\u0902",transferYourAccounts:"\u0905\u092A\u0928\u0947 \u0916\u093E\u0924\u094B\u0902 \u0915\u093E \u0938\u094D\u0925\u093E\u0928\u093E\u0902\u0924\u0930\u0923 \u0915\u0930\u0947\u0902",walletTypes:{bridge:"\u092C\u094D\u0930\u093F\u091C \u0935\u0949\u0932\u0947\u091F",browser:"\u092C\u094D\u0930\u093E\u0909\u091C\u093C\u0930 \u0935\u0949\u0932\u0947\u091F",hardware:"\u0939\u093E\u0930\u094D\u0921\u0935\u0947\u092F\u0930 \u0935\u0949\u0932\u0947\u091F",injected:"\u0935\u0949\u0932\u0947\u091F \u090F\u0915\u094D\u0938\u091F\u0947\u0902\u0936\u0928",mobile:"\u092E\u094B\u092C\u093E\u0907\u0932 \u0935\u0949\u0932\u0947\u091F"},warning:"\u0935\u0930\u094D\u0924\u092E\u093E\u0928 \u092E\u0947\u0902 \u0916\u093E\u0924\u0947 \u0928\u093F\u0930\u094D\u092F\u093E\u0924 \u0915\u093E \u0938\u092E\u0930\u094D\u0925\u0928 \u0928\u0939\u0940\u0902 \u0915\u0930\u0924\u093E \u0939\u0948\u0964 \u0915\u0943\u092A\u092F\u093E \u090F\u0915 \u0905\u0928\u094D\u092F \u0935\u0949\u0932\u0947\u091F \u091A\u0941\u0928\u0947\u0902\u0964"}},eve={or:"\u092F\u093E"},tve={clickToCopy:{label:"\u0915\u0949\u092A\u0940 \u0939\u094B \u0917\u092F\u093E",tooltip:"\u0915\u0949\u092A\u0940 \u0915\u0930\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F \u0915\u094D\u0932\u093F\u0915 \u0915\u0930\u0947\u0902"}},rve={modal:Qge,general:eve,component:tve},nve={wallet:{connectYourWallet:"\u0635\u0644 \u0645\u062D\u0641\u0638\u062A\u0643",whatIsAWallet:"\u0645\u0627 \u0647\u064A \u0627\u0644\u0645\u062D\u0641\u0638\u0629\u061F",secureAndManage:"\u062A\u0623\u0645\u064A\u0646 \u0648\u0625\u062F\u0627\u0631\u0629 \u0627\u0644\u0645\u0645\u062A\u0644\u0643\u0627\u062A \u0627\u0644\u0631\u0642\u0645\u064A\u0629 \u0627\u0644\u062E\u0627\u0635\u0629 \u0628\u0643",safelyStore:"\u0642\u0645 \u0628\u062A\u062E\u0632\u064A\u0646 \u0648 \u0627\u0631\u0633\u0627\u0644 \u0639\u0645\u0644\u0627\u062A\u0643 \u0648 \u0623\u0635\u0648\u0644\u0643 \u0627\u0644\u0631\u0642\u0645\u064A\u0629 \u0628\u0623\u0645\u0627\u0646",logInToAny:"\u0633\u062C\u0644 \u0627\u0644\u062F\u062E\u0648\u0644 \u0625\u0644\u0649 \u0623\u064A \u062A\u0637\u0628\u064A\u0642 \u064A\u0633\u062A\u062E\u062F\u0645 \u0646\u064A\u0631",noNeedToCreate:".\u0644\u0627 \u062F\u0627\u0639\u064A \u0644\u0625\u0646\u0634\u0627\u0621 \u062D\u0633\u0627\u0628 \u062C\u062F\u064A\u062F. \u0641\u0642\u0637 \u0642\u0645 \u0628\u062A\u0648\u0635\u064A\u0644 \u0645\u062D\u0641\u0638\u062A\u0643 \u0648\u0627\u0646\u0637\u0644\u0642",getAWallet:"\u0627\u062D\u0635\u0644 \u0639\u0644\u0649 \u0645\u062D\u0641\u0638\u0629",useAWallet:"\u0627\u0633\u062A\u062E\u062F\u0645 \u0645\u062D\u0641\u0638\u0629 \u0644\u062A\u0623\u0645\u064A\u0646 \u0648\u0625\u062F\u0627\u0631\u0629 \u0623\u0635\u0648\u0644 \u0646\u064A\u0631 \u0627\u0644\u062E\u0627\u0635\u0629 \u0628\u0643\u060C \u0648\u0627\u062F\u062E\u0644 \u0644\u0623\u064A \u062A\u0637\u0628\u064A\u0642 \u064A\u0633\u062A\u062E\u062F\u0645 \u0646\u064A\u0631 \u062F\u0648\u0646 \u0627\u0644\u062D\u0627\u062C\u0629 \u0625\u0644\u0649 \u0627\u0633\u0645 \u0627\u0644\u0645\u0633\u062A\u062E\u062F\u0645 \u0648\u0643\u0644\u0645\u0629\u0627\u0644\u0645\u0631\u0648\u0631",connectionFailed:"\u0627\u062A\u0635\u0627\u0644 \u0641\u0627\u0634\u0644",connectionSuccessful:"\u0627\u062A\u0635\u0627\u0644 \u0646\u0627\u062C\u062D",connectionNotSuccessful:"\u0641\u0634\u0644 \u0627\u0644\u0627\u062A\u0635\u0627\u0644\u060C \u064A\u0631\u062C\u0649 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u0645\u0631\u0629 \u0623\u062E\u0631\u0649.",whatIsAWalletDescription:"\u062A\u062A\u064A\u062D \u0644\u0643 \u0627\u0644\u0645\u062D\u0627\u0641\u0638 \u062A\u062E\u0632\u064A\u0646 \u0627\u0644\u0623\u0635\u0648\u0644 \u0627\u0644\u0631\u0642\u0645\u064A\u0629 \u0645\u062B\u0644 \u0627\u0644\u0639\u0645\u0644\u0627\u062A \u0627\u0644\u0645\u0634\u0641\u0631\u0629 \u0648\u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644 \u0625\u0644\u0649 \u0627\u0644\u062A\u0637\u0628\u064A\u0642\u0627\u062A \u0639\u0644\u0649 NEAR.",selectWalletOr:"\u064A\u0631\u062C\u0649 \u0627\u062E\u062A\u064A\u0627\u0631 \u0645\u062D\u0641\u0638\u0629 \u0645\u0646 \u0627\u0644\u064A\u0633\u0627\u0631\u060C \u0623\u0648",createNewWallet:"\u0625\u0646\u0634\u0627\u0621 \u0645\u062D\u0641\u0638\u0629 \u062C\u062F\u064A\u062F\u0629",rememberWallet:"\u062A\u0630\u0643\u0631 \u0627\u0644\u0645\u062D\u0627\u0641\u0638",connected:"\u0645\u062A\u0635\u0644",connectingTo:"\u062C\u0627\u0631\u064A \u0627\u0644\u0627\u062A\u0635\u0627\u0644 \u0628",connectingMessage:{injected:"\u0648\u0627\u0641\u0642 \u0639\u0644\u0649 \u0627\u0644\u0627\u062A\u0635\u0627\u0644 \u0641\u064A \u0646\u0627\u0641\u0630\u0629 \u0627\u0644\u0625\u0636\u0627\u0641\u0629",browser:"\u0648\u0627\u0641\u0642 \u0639\u0644\u0649 \u0627\u0644\u0627\u062A\u0635\u0627\u0644 \u0641\u064A \u0627\u0644\u0645\u062D\u0641\u0638\u0629 \u0628\u0639\u062F \u0625\u0639\u0627\u062F\u0629 \u062A\u0648\u062C\u064A\u0647",hardware:"\u0648\u0627\u0641\u0642 \u0639\u0644\u0649 \u0627\u0644\u0627\u062A\u0635\u0627\u0644 \u0641\u064A \u062C\u0647\u0627\u0632 \u0644\u064A\u062F\u062C\u0631",bridge:"\u0648\u0627\u0641\u0642 \u0639\u0644\u0649 \u0627\u0644\u0627\u062A\u0635\u0627\u0644 \u0641\u064A \u0627\u0644\u0645\u062D\u0641\u0638\u0629"}},ledger:{connectWithLedger:"\u0627\u062A\u0635\u0644 \u0645\u0639 \u0644\u064A\u062F\u062C\u0631",makeSureYourLedger:"\u062A\u0623\u0643\u062F \u0623\u0646 \u0644\u064A\u062F\u062C\u0631 \u0645\u062A\u0635\u0644 \u0628\u0623\u0645\u0627\u0646, \u0648 \u0623\u0646 \u062A\u0637\u0628\u064A\u0642 \u0646\u064A\u0631 \u0645\u0641\u062A\u0648\u062D \u0641\u064A \u062C\u0647\u0627\u0632\u0643",continue:"\u062A\u0627\u0628\u0639",specifyHDPath:"\u062D\u062F\u062F \u0645\u0633\u0627\u0631 \u0627\u0644\u062D\u0633\u0627\u0628",enterYourPreferredHDPath:"\u0623\u062F\u062E\u0644 \u0645\u0633\u0627\u0631 \u0627\u0644\u062D\u0633\u0627\u0628 \u0627\u0644\u0645\u0641\u0636\u0644\u060C \u062B\u0645 \u0627\u0628\u062D\u062B \u0639\u0646 \u0643\u0644 \u0627\u0644\u062D\u0633\u0627\u0628\u0627\u062A \u0627\u0644\u0646\u0634\u0637\u0629",scan:"\u0645\u0633\u062D",retry:"\u0623\u0639\u062F \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629",ledgerIsNotAvailable:"\u0644\u064A\u062F\u062C\u0631 \u063A\u064A\u0631 \u0645\u062A\u0648\u0641\u0631",accessDeniedToUseLedgerDevice:"\u062A\u0645 \u0631\u0641\u0636 \u0627\u0644\u0627\u062A\u0635\u0627\u0644 \u0628\u0644\u064A\u062F\u062C\u0631",noAccountsFound:"\u0644\u0645 \u064A\u062A\u0645 \u0627\u0644\u0639\u062B\u0648\u0631 \u0639\u0644\u0649 \u0623\u064A \u062D\u0633\u0627\u0628\u0627\u062A",selectYourAccounts:"\u062D\u062F\u062F \u062D\u0633\u0627\u0628\u0627\u062A\u0643",connecting1Account:"\u062C\u0627\u0631\u064A \u0627\u0644\u0627\u062A\u0635\u0627\u0644 \u0628\u062D\u0633\u0627\u0628 \u0648\u0627\u062D\u062F",cantFindAnyAccount:"\u0644\u0627 \u064A\u0645\u0643\u0646 \u0627\u0644\u0639\u062B\u0648\u0631 \u0639\u0644\u0649 \u0623\u064A \u062D\u0633\u0627\u0628 \u0645\u0631\u062A\u0628\u0637 \u0628\u0647\u0630\u0627 \u0644\u064A\u062F\u062C\u0631 \u0627\u0644\u0631\u062C\u0627\u0621 \u0625\u0646\u0634\u0627\u0621 \u062D\u0633\u0627\u0628 \u0646\u064A\u0631 \u062C\u062F\u064A\u062F \u0639\u0644\u0649",orConnectAnAnotherLedger:"\u0627\u0648 \u0627\u0631\u0628\u0637 \u062C\u0647\u0627\u0632 \u0644\u064A\u062F\u062C\u0631 \u0622\u062E\u0631",connecting:"\u062C\u0627\u0631\u064A \u0627\u0644\u0627\u062A\u0635\u0627\u0644",ofAccounts:"\u0645\u0646 \u0627\u0644\u062D\u0633\u0627\u0628\u0627\u062A",failedToAutomatically:"\u0641\u0634\u0644 \u0641\u064A \u0627\u0644\u0627\u062A\u0635\u0627\u0644 \u0628\u0627\u0644\u062D\u0633\u0627\u0628 \u062A\u0644\u0642\u0627\u0626\u064A\u0627. \u064A\u0631\u062C\u0649 \u0627\u0644\u0627\u062A\u0635\u0627\u0644 \u0628\u0627\u0644\u062D\u0633\u0627\u0628 \u064A\u062F\u0648\u064A\u0627",overviewTheListOfAuthorized:"\u0644\u0627\u0626\u062D\u0629 \u0627\u0644\u062D\u0633\u0627\u0628\u0627\u062A \u0627\u0644\u0645\u0635\u0631\u062D \u0628\u0647\u0627, \u0623\u0643\u0645\u0644 \u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644 \u0628\u0627\u0644\u0646\u0642\u0631 \u0639\u0644\u0649 \u0627\u0644\u0632\u0631 \u0623\u062F\u0646\u0627\u0647",finish:"\u0625\u0646\u0647\u0627\u0621"},install:{youllNeedToInstall:"\u0633\u062A\u062D\u062A\u0627\u062C \u0644\u062A\u062B\u0628\u064A\u062A",toContinueAfterInstalling:"\u0644\u0644\u0627\u0633\u062A\u0643\u0645\u0627\u0644. \u0628\u0639\u062F \u0627\u0644\u062A\u062B\u0628\u064A\u062A",refreshThePage:"\u0642\u0645 \u0628\u062A\u062D\u062F\u064A\u062B \u0627\u0644\u0635\u0641\u062D\u0629",open:"\u0627\u0641\u062A\u062D"},qr:{copiedToClipboard:"\u062A\u0645 \u0627\u0644\u0646\u0633\u062E",failedToCopy:"\u0641\u0634\u0644 \u0627\u0644\u0646\u0633\u062E",scanWithYourMobile:"\u0627\u0645\u0633\u062D \u0628\u062C\u0647\u0627\u0632\u0643 \u0627\u0644\u0645\u062D\u0645\u0648\u0644",scanQRCodeMessage:`\u064A\u0631\u062C\u0649 \u0645\u0633\u062D \u0631\u0645\u0632 QR \u0647\u0630\u0627
|
|
57
|
+
\u0644\u0631\u0628\u0637 \u0645\u062D\u0641\u0638\u062A\u0643.`,copyToClipboard:"\u0646\u0633\u062E",preferTheOfficial:"\u062A\u0641\u0636\u0644 \u0627\u0644\u062D\u0648\u0627\u0631 \u0627\u0644\u0631\u0633\u0645\u064A \u0644",openInOfficialDialogue:"\u0641\u062A\u062D \u0641\u064A \u0627\u0644\u062D\u0648\u0627\u0631 \u0627\u0644\u0631\u0633\u0645\u064A",open:"\u0641\u062A\u062D"},walletTypes:{hardware:"\u0645\u062D\u0641\u0638\u0629 \u0627\u0644\u0623\u062C\u0647\u0632\u0629",browser:"\u0645\u062D\u0641\u0638\u0629 \u0627\u0644\u0645\u062A\u0635\u0641\u062D",injected:"\u0645\u0644\u062D\u0642 \u0627\u0644\u0645\u062D\u0641\u0638\u0629",bridge:"\u0645\u062D\u0641\u0638\u0629 \u0627\u0644\u062C\u0633\u0631",mobile:"\u0645\u062D\u0641\u0638\u0629 \u0627\u0644\u062C\u0648\u0627\u0644","instant-link":"\u0645\u062D\u0641\u0638\u0629 \u0627\u0644\u0631\u0627\u0628\u0637 \u0627\u0644\u0641\u0648\u0631\u064A"},exportAccounts:{afterDecide:"\u0628\u0639\u062F \u0627\u062A\u062E\u0627\u0630 \u0642\u0631\u0627\u0631 \u0628\u0634\u0623\u0646 \u0645\u062D\u0641\u0638\u0629\u060C \u064A\u0645\u0643\u0646\u0643 \u0627\u062E\u062A\u064A\u0627\u0631 \u0627\u0644\u062D\u0633\u0627\u0628\u0627\u062A \u0627\u0644\u062A\u064A \u062A\u0631\u064A\u062F \u0646\u0642\u0644\u0647\u0627.",chooseAWallet:"\u0627\u062E\u062A\u0631 \u0645\u062D\u0641\u0638\u0629",disclaimer:"\u0644\u0646 \u062A\u062A\u0645\u0643\u0646 \u0645\u0646 \u0646\u0642\u0644 \u0627\u0644\u062D\u0633\u0627\u0628\u0627\u062A \u0627\u0644\u062A\u064A \u0644\u0645 \u064A\u062A\u0645 \u062A\u0645\u0648\u064A\u0644\u0647\u0627 \u0623\u0648 \u0627\u0633\u062A\u062E\u062F\u0627\u0645\u0647\u0627 \u0639\u0644\u0649 NEAR.",selectAWallet:"\u0627\u062E\u062A\u0631 \u0645\u062D\u0641\u0638\u0629 \u062A\u0646\u0627\u0633\u0628 \u0627\u062D\u062A\u064A\u0627\u062C\u0627\u062A\u0643 \u0648\u062A\u062F\u0639\u0645 \u062D\u0633\u0627\u0628\u0627\u062A\u0643 \u0627\u0644\u0645\u062A\u0635\u0644\u0629.",selectYourAccounts:"\u062D\u062F\u062F \u062D\u0633\u0627\u0628\u0627\u062A\u0643",transferYourAccounts:"\u0646\u0642\u0644 \u062D\u0633\u0627\u0628\u0627\u062A\u0643",warning:"\u0644\u0627 \u062A\u062F\u0639\u0645 \u062A\u0635\u062F\u064A\u0631 \u0627\u0644\u062D\u0633\u0627\u0628\u0627\u062A \u0641\u064A \u0627\u0644\u0648\u0642\u062A \u0627\u0644\u062D\u0627\u0644\u064A. \u064A\u0631\u062C\u0649 \u0627\u062E\u062A\u064A\u0627\u0631 \u0645\u062D\u0641\u0638\u0629 \u0623\u062E\u0631\u0649.",complete:{button:"\u0623\u0643\u0645\u0644",descOne:"\u0633\u064A\u062A\u0645 \u062A\u0648\u062C\u064A\u0647\u0643 \u0627\u0644\u0622\u0646 \u0625\u0644\u0649 \u0627\u0644\u0645\u062D\u0641\u0638\u0629 \u0627\u0644\u062A\u064A \u0627\u062E\u062A\u0631\u062A\u0647\u0627 \u0644\u0625\u0643\u0645\u0627\u0644 \u0627\u0644\u0646\u0642\u0644.",descTwo:"\u0628\u0645\u062C\u0631\u062F \u0625\u0643\u0645\u0627\u0644 \u062C\u0632\u0621 \u0627\u0644\u0627\u0633\u062A\u064A\u0631\u0627\u062F \u0645\u0646 \u0627\u0644\u0639\u0645\u0644\u064A\u0629 \u0645\u0646 \u0627\u0644\u0645\u062D\u0641\u0638\u0629 \u0627\u0644\u0645\u062D\u062F\u062F\u0629\u060C \u0627\u0636\u063A\u0637 \u0639\u0644\u0649 \u0627\u0644\u0632\u0631 \u0644\u0625\u0643\u0645\u0627\u0644 \u0639\u0645\u0644\u064A\u0629 \u0627\u0644\u0646\u0642\u0644.",startOverButton:"\u0627\u0628\u062F\u0623 \u0645\u0646 \u062C\u062F\u064A\u062F",title:"\u0623\u0643\u0645\u0644 \u0627\u0644\u0646\u0642\u0644"},getPassphrase:{button:"\u062A\u0627\u0628\u0639",checkLabel:"\u0644\u0642\u062F \u0642\u0645\u062A \u0628\u0646\u0633\u062E \u0623\u0648 \u0643\u062A\u0627\u0628\u0629 \u0643\u0644\u0645\u0629 \u0627\u0644\u0645\u0631\u0648\u0631",desc:"\u0633\u062A\u062D\u062A\u0627\u062C \u0625\u0644\u0649 \u0625\u062F\u062E\u0627\u0644 \u0647\u0630\u0647 \u0627\u0644\u0643\u0644\u0645\u0629 \u0627\u0644\u0633\u0631\u064A\u0629 \u0639\u0646\u062F \u0628\u062F\u0621 \u062A\u0635\u062F\u064A\u0631 \u062D\u0633\u0627\u0628\u0627\u062A\u0643 \u0625\u0644\u0649 \u0645\u062D\u0641\u0638\u0629 \u0645\u062E\u062A\u0644\u0641\u0629.",label:"\u0627\u0646\u0642\u0631 \u0644\u0646\u0633\u062E",title:"\u0627\u0646\u0633\u062E \u0643\u0644\u0645\u0629 \u0627\u0644\u0645\u0631\u0648\u0631 \u0627\u0644\u0645\u0624\u0642\u062A\u0629",transferButton:"\u0646\u0642\u0644 \u0627\u0644\u062D\u0633\u0627\u0628\u0627\u062A"},selectAccounts:{button:"\u062A\u0627\u0628\u0639",deselectAll:"\u0625\u0644\u063A\u0627\u0621 \u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0643\u0644",error:"\u0627\u0644\u062D\u0633\u0627\u0628 \u063A\u064A\u0631 \u0645\u0648\u062C\u0648\u062F",noBalance:"\u0627\u0644\u062D\u0633\u0627\u0628 \u063A\u064A\u0631 \u0645\u0645\u0648\u0644",selectAll:"\u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0643\u0644",title:"\u062D\u062F\u062F \u0627\u0644\u062D\u0633\u0627\u0628\u0627\u062A \u0644\u0646\u0642\u0644\u0647\u0627",unavailable:"\u0627\u0644\u0646\u0642\u0644 \u063A\u064A\u0631 \u0645\u062A\u0627\u062D",warningLedger:"\u062F\u0639\u0645 Ledger \u0645\u0637\u0644\u0648\u0628"},walletTypes:{bridge:"\u0645\u062D\u0641\u0638\u0629 \u0627\u0644\u062C\u0633\u0631",browser:"\u0645\u062D\u0641\u0638\u0629 \u0627\u0644\u0645\u062A\u0635\u0641\u062D",hardware:"\u0645\u062D\u0641\u0638\u0629 \u0627\u0644\u0623\u062C\u0647\u0632\u0629",injected:"\u0645\u0644\u062D\u0642 \u0627\u0644\u0645\u062D\u0641\u0638\u0629",mobile:"\u0645\u062D\u0641\u0638\u0629 \u0627\u0644\u062C\u0648\u0627\u0644"}}},ove={or:"\u0623\u0648"},ive={clickToCopy:{label:"\u062A\u0645 \u0627\u0644\u0646\u0633\u062E",tooltip:"\u0627\u0646\u0642\u0631 \u0644\u0646\u0633\u062E"}},ave={modal:nve,general:ove,component:ive},sve={wallet:{connectYourWallet:"Spojite crypto nov\u010Danik!",whatIsAWallet:"\u0160to je to crypto nov\u010Danik?",secureAndManage:"Osigurajte i upravljajte svojom digitalnom imovinom.",safelyStore:"Sigurno pohranite i prebacite svoj crypto i NFT-eve.",logInToAny:" Prijavite se u bilo koju NEAR aplikaciju",noNeedToCreate:"Nema potrebe za stvaranjem novih naloga ili korisni\u010Dkih podataka. Spojite svoj crypto nov\u010Danik i spremni ste!",getAWallet:"Otvorite crypto nov\u010Danik",useAWallet:"Koristite crypto nov\u010Danik da biste osigurali i upravljali svojom NEAR imovinom, te se prijavite u bilo koju NEAR aplikaciju bez korisni\u010Dkog imena i lozinke.",connectionFailed:"Neuspje\u0161no povezivanje.",connectionSuccessful:"Uspje\u0161no povezivanje.",connectionNotSuccessful:"Povezivanje nije uspjelo, molimo poku\u0161ajte ponovo.",whatIsAWalletDescription:"Nov\u010Danici vam omogu\u0107avaju pohranu digitalne imovine poput kripto valuta i prijavu u aplikacije na NEAR.",selectWalletOr:"Molimo odaberite nov\u010Danik s lijeve strane ili",createNewWallet:"Stvorite novi nov\u010Danik",rememberWallet:"Zapamti nov\u010Danike",connected:"Povezano.",connectingTo:"Povezivanje u tijeku",connectingMessage:{injected:"Potvrdite vezu u eksternom prozoru",browser:"Nakon redirekcije, potvrdite vezu u nov\u010Daniku",hardware:"Potvrdite vezu sa nov\u010Danikom",bridge:"Potvrdite vezu u nov\u010Daniku"}},ledger:{connectWithLedger:"Pove\u017Eite se hardverskim nov\u010Danikom",makeSureYourLedger:"Osigurajte sigurnu vezu s hardverskim nov\u010Danikom, te da je NEAR aplikacija otvorena na va\u0161em ure\u0111aju",continue:"Nastavite",specifyHDPath:"Specificirajte HD putanju",enterYourPreferredHDPath:"Upi\u0161ite preferiranu HD putanju, zatim skenirajte aktivne naloge",scan:"Skenirajte",retry:"Poku\u0161ajte ponovno",ledgerIsNotAvailable:"Hardverski nov\u010Danik nije dostupan.",accessDeniedToUseLedgerDevice:"Odbijen pristup za kori\u0161tenjem hardverskog nov\u010Danika",noAccountsFound:"Nalozi nisu prona\u0111eni",selectYourAccounts:"Odaberite svoje naloge",connecting1Account:"Povezivanje 1 naloga",cantFindAnyAccount:"Nije mogu\u0107e prona\u0107i niti jedan nalog povezan s ovim hardverskim nov\u010Danikom. Molimo vas, kreirajte novi NEAR nalog",orConnectAnAnotherLedger:"Ili pove\u017Eite drugi hardverski nov\u010Danik.",connecting:"Povezivanje",ofAccounts:"naloga",failedToAutomatically:"Neuspje\u0161no automatsko pronala\u017Eenje ID naloga. Unesite ru\u010Dno:",overviewTheListOfAuthorized:"Pregledajte popis odobrenih naloga, zavr\u0161ite prijavu pritiskom na ni\u017Ee prikazani gumb.",finish:"Zavr\u0161ite"},install:{youllNeedToInstall:" Potrebno je instalirati modal",toContinueAfterInstalling:"za nastavak. Nakon instalacije",refreshThePage:"osvje\u017Eite stranicu.",open:"Otvorite QR modal"},qr:{copiedToClipboard:"Kopirano u me\u0111uspremnik",failedToCopy:"Neupsje\u0161no kopiranje u me\u0111uspremnik",scanWithYourMobile:"Skenirajte svojim mobilnim ure\u0111ajem",scanQRCodeMessage:`Molimo skenirajte ovaj QR kod
|
|
58
|
+
za povezivanje va\u0161eg nov\u010Danika.`,copyToClipboard:" Kopirajte u me\u0111uspremnik",preferTheOfficial:"Odaberite slu\u017Ebeni dijalog",openInOfficialDialogue:"otvorite u slu\u017Ebenom dijalogu",open:"Otvorite"},walletTypes:{hardware:"Hardware Wallet",browser:"Browser Wallet",injected:"Wallet Extension",bridge:"Bridge Wallet",mobile:"Mobile Wallet","instant-link":"Instant Wallet"},exportAccounts:{chooseAWallet:"Odaberi Wallet",transferYourAccounts:"Prenesi svoje naloge",selectAWallet:"Odaberite wallet koji odgovara va\u0161im potrebama i podr\u017Eava va\u0161e povezane naloge.",selectYourAccounts:"Odaberi svoje naloge",afterDecide:"Nakon \u0161to odlu\u010Dite koji wallet koristite, mo\u017Eete odabrati koje ra\u010Dune \u017Eelite prebaciti.",disclaimer:"Ne\u0107ete mo\u0107i prebaciti naloge koji nisu nikada bili kori\u0161teni na NEAR-u.",warning:"ne podr\u017Eava izvoz naloga u ovom trenutku. Molimo odaberite drugi wallet.",walletTypes:{hardware:"Hardware Wallet",browser:"Browser Wallet",injected:"Wallet Extension",bridge:"Bridge Wallet",mobile:"Mobile Wallet"},selectAccounts:{title:"Odaberi naloge za prijenos",button:"Generiraj lozinku",deselectAll:"Makni odabir sa svih",selectAll:"Odaberi sve",unavailable:"Prijenos nije dostupan",error:"Nalog ne postoji",warningLedger:"Potrebna ledger podr\u0161ka",noBalance:"Nalog nema sredstava"},getPassphrase:{title:"Kopiraj privremenu lozinku",desc:"Bit \u0107e potrebno unijeti ovu lozinku na po\u010Detku izvoza naloga na drugi wallet.",button:"Nastavi",label:"Klikni za kopiju",checkLabel:"Kopirao sam ili zapisao lozinku"},complete:{title:"Zavr\u0161i prijenos",descOne:"You will now be redirected to the wallet you selected to complete the transfer.",descTwo:"Kada je unos s odabranog walleta zavr\u0161en, pritisnite gumb da biste zavr\u0161ili prijenos.",button:"Zavr\u0161i"}}},cve={or:"ili"},fve={modal:sve,general:cve},uve={wallet:{connectYourWallet:"\u041F\u043E\u0432\u0440\u0437\u0435\u0442\u0435 \u0433\u043E \u0432\u0430\u0448\u0438\u043E\u0442 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A!",whatIsAWallet:"\u0428\u0442\u043E \u0435 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A?",secureAndManage:"\u0417\u0430\u0448\u0442\u0438\u0442\u0435\u0442\u0435 \u0433\u0438 \u0438 \u0443\u043F\u0440\u0430\u0432\u0443\u0432\u0430\u0458\u0442\u0435 \u0441\u043E \u0432\u0430\u0448\u0438\u0442\u0435 \u0434\u0438\u0433\u0438\u0442\u0430\u043B\u043D\u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430.",safelyStore:"\u0411\u0435\u0437\u0431\u0435\u0434\u043D\u043E \u0441\u043A\u043B\u0430\u0434\u0438\u0440\u0430\u0458\u0442\u0435 \u0438 \u0438\u0437\u0432\u0440\u0448\u0443\u0432\u0430\u0458\u0442\u0435 \u0442\u0440\u0430\u043D\u0441\u0430\u043A\u0446\u0438\u0438 \u0441\u043E \u0432\u0430\u0448\u0438\u0442\u0435 \u043A\u0440\u0438\u043F\u0442\u043E \u0438 NFT.",logInToAny:"\u041D\u0430\u0458\u0430\u0432\u0435\u0442\u0435 \u0441\u0435 \u043D\u0430 \u043A\u043E\u0458\u0430 \u0431\u0438\u043B\u043E NEAR \u0430\u043F\u043B\u0438\u043A\u0430\u0446\u0438\u0458\u0430",noNeedToCreate:"\u041D\u0435\u043C\u0430 \u043F\u043E\u0442\u0440\u0435\u0431\u0430 \u0434\u0430 \u043A\u0440\u0435\u0438\u0440\u0430\u0442\u0435 \u043D\u043E\u0432\u0438 \u0441\u043C\u0435\u0442\u043A\u0438 \u0438\u043B\u0438 \u0438\u043D\u0433\u0435\u0440\u0435\u043D\u0446\u0438\u0438. \u041F\u043E\u0432\u0440\u0437\u0435\u0442\u0435 \u0433\u043E \u0432\u0430\u0448\u0438\u043E\u0442 \u043F\u0430\u0440\u0438\u0447\u043D\u0438\u043A \u0438 \u0441\u0442\u0435 \u043F\u043E\u0434\u0433\u043E\u0442\u0432\u0435\u043D\u0438!",getAWallet:"\u041D\u0430\u043F\u0440\u0430\u0432\u0435\u0442\u0435 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A",useAWallet:"\u041A\u043E\u0440\u0438\u0441\u0442\u0435\u0442\u0435 \u043F\u0430\u0440\u0438\u0447\u043D\u0438\u043A \u0437\u0430 \u0434\u0430 \u0433\u0438 \u0437\u0430\u0448\u0442\u0438\u0442\u0438\u0442\u0435 \u0438 \u0443\u043F\u0440\u0430\u0432\u0443\u0432\u0430\u0442\u0435 \u0432\u0430\u0448\u0438\u0442\u0435 NEAR \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0438 \u0434\u0430 \u0441\u0435 \u043D\u0430\u0458\u0430\u0432\u0438\u0442\u0435 \u043D\u0430 \u043A\u043E\u0458\u0430 \u0431\u0438\u043B\u043E NEAR \u0430\u043F\u043B\u0438\u043A\u0430\u0446\u0438\u0458\u0430 \u0431\u0435\u0437 \u043F\u043E\u0442\u0440\u0435\u0431\u0430 \u043E\u0434 \u043A\u043E\u0440\u0438\u0441\u043D\u0438\u0447\u043A\u0438 \u0438\u043C\u0438\u045A\u0430 \u0438 \u043B\u043E\u0437\u0438\u043D\u043A\u0438.",connectionFailed:"\u041F\u043E\u0432\u0440\u0437\u0443\u0432\u0430\u045A\u0435\u0442\u043E \u043D\u0435 \u0431\u0435\u0448\u0435 \u0443\u0441\u043F\u0435\u0448\u043D\u043E.",connectionSuccessful:"\u0423\u0441\u043F\u0435\u0448\u043D\u043E \u043F\u043E\u0432\u0440\u0437\u0443\u0432\u0430\u045A\u0435.",connectionNotSuccessful:"\u041F\u043E\u0432\u0440\u0437\u0443\u0432\u0430\u045A\u0435\u0442\u043E \u043D\u0435 \u0431\u0435\u0448\u0435 \u0443\u0441\u043F\u0435\u0448\u043D\u043E, \u0432\u0435 \u043C\u043E\u043B\u0438\u043C\u0435 \u043E\u0431\u0438\u0434\u0435\u0442\u0435 \u0441\u0435 \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u043E.",whatIsAWalletDescription:"\u041D\u043E\u0432\u0447\u0430\u043D\u0438\u0446\u0438\u0442\u0435 \u0432\u0438 \u043E\u0432\u043E\u0437\u043C\u043E\u0436\u0443\u0432\u0430\u0430\u0442 \u0434\u0430 \u0441\u043A\u043B\u0430\u0434\u0438\u0440\u0430\u0442\u0435 \u0434\u0438\u0433\u0438\u0442\u0430\u043B\u043D\u0430 \u0438\u043C\u043E\u0432\u0438\u043D\u0430 \u043A\u0430\u043A\u043E \u043A\u0440\u0438\u043F\u0442\u043E \u0438 \u0434\u0430 \u0441\u0435 \u043D\u0430\u0458\u0430\u0432\u0438\u0442\u0435 \u0432\u043E \u0430\u043F\u043B\u0438\u043A\u0430\u0446\u0438\u0438 \u043D\u0430 NEAR.",selectWalletOr:"\u0412\u0435 \u043C\u043E\u043B\u0438\u043C\u0435 \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A \u043B\u0435\u0432\u043E, \u0438\u043B\u0438",createNewWallet:"\u041D\u0430\u043F\u0440\u0430\u0432\u0435\u0442\u0435 \u043D\u043E\u0432 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A",rememberWallet:"\u0417\u0430\u043F\u043E\u043C\u043D\u0438 \u043F\u0430\u0440\u0438\u0447\u043D\u0438\u0446\u0438",connected:"\u041F\u043E\u0432\u0440\u0437\u0430\u043D\u043E.",connectingTo:"\u041F\u043E\u0432\u0440\u0437\u0443\u0432\u0430\u045A\u0435 \u0441\u043E",connectingMessage:{injected:"\u041F\u043E\u0442\u0432\u0440\u0434\u0435\u0442\u0435 \u0433\u043E \u043F\u043E\u0432\u0440\u0437\u0443\u0432\u0430\u045A\u0435\u0442\u043E \u0432\u043E \u0435\u043A\u0441\u0442\u0435\u0440\u043D\u0438\u043E\u0442 \u043F\u0440\u043E\u0437\u043E\u0440\u0435\u0446",browser:"\u041F\u043E \u043F\u0440\u0435\u0443\u0441\u043C\u0435\u0440\u0443\u0432\u0430\u045A\u0435\u0442\u043E, \u043F\u043E\u0442\u0432\u0440\u0434\u0435\u0442\u0435 \u0433\u043E \u043F\u043E\u0432\u0440\u0437\u0443\u0432\u0430\u045A\u0435\u0442\u043E \u043E\u0434 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043E\u043A\u0442",hardware:"\u041F\u043E\u0442\u0432\u0440\u0434\u0435\u0442\u0435 \u0433\u043E \u043F\u043E\u0432\u0440\u0437\u0443\u0432\u0430\u045A\u0435\u0442\u043E \u0441\u043E \u043B\u0430\u0434\u0435\u043D \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A",bridge:"\u041F\u043E\u0442\u0432\u0440\u0434\u0435\u0442\u0435 \u0458\u0430 \u0432\u0440\u0441\u043A\u0430\u0442\u0430 \u0432\u043E \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A\u043E\u0442"}},ledger:{connectWithLedger:"\u041F\u043E\u0432\u0440\u0437\u0435\u0442\u0435 \u0441\u0435 \u0441\u043E \u041B\u0435\u045F\u0435\u0440",makeSureYourLedger:"\u041E\u0441\u0438\u0433\u0443\u0440\u0430\u0458\u0442\u0435 \u0441\u0435 \u0434\u0435\u043A\u0430 \u0432\u0430\u0448\u0438\u043E\u0442 \u041B\u0435\u045F\u0435\u0440 \u0435 \u043F\u043E\u0432\u0440\u0437\u0430\u043D \u0431\u0435\u0437\u0431\u0435\u0434\u043D\u043E, \u0438 \u0434\u0435\u043A\u0430 NEAR \u0430\u043F\u043B\u0438\u043A\u0430\u0446\u0438\u0458\u0430\u0442\u0430 \u0435 \u043E\u0442\u0432\u043E\u0440\u0435\u043D\u0430 \u043D\u0430 \u0432\u0430\u0448\u0438\u043E\u0442 \u0443\u0440\u0435\u0434",continue:"\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0435\u0442\u0435",specifyHDPath:"\u041D\u0430\u0432\u0435\u0434\u0435\u0442\u0435 \u0425\u0414 \u043B\u043E\u043A\u0430\u0446\u0438\u0458\u0430",enterYourPreferredHDPath:"\u0412\u043D\u0435\u0441\u0435\u0442\u0435 \u0458\u0430 \u0432\u0430\u0448\u0430\u0442\u0430 \u043F\u0440\u0435\u0444\u0435\u0440\u0438\u0440\u0430\u043D\u0430 \u0425\u0414 \u043B\u043E\u043A\u0430\u0446\u0438\u0458\u0430, \u0430 \u043F\u043E\u0442\u043E\u0430 \u0441\u043A\u0435\u043D\u0438\u0440\u0430\u0458\u0442\u0435 \u0434\u0430 \u0433\u0438 \u043D\u0430\u0458\u0434\u0435\u0442\u0435 \u0430\u043A\u0442\u0438\u0432\u043D\u0438\u0442\u0435 \u0441\u043C\u0435\u0442\u043A\u0438.",scan:"\u0421\u043A\u0435\u043D\u0438\u0440\u0430\u0458\u0442\u0435",retry:"\u041E\u0431\u0438\u0434\u0435\u0442\u0435 \u0441\u0435 \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u043E",ledgerIsNotAvailable:"\u041B\u0435\u045F\u0435\u0440\u043E\u0442 \u043D\u0435 \u0435 \u0434\u043E\u0441\u0442\u0430\u043F\u0435\u043D.",accessDeniedToUseLedgerDevice:"\u041F\u0440\u0438\u0441\u0442\u0430\u043F\u043E\u0442 \u0437\u0430 \u043A\u043E\u0440\u0438\u0441\u0442\u0435\u045A\u0435 \u043D\u0430 \u041B\u0435\u045F\u0435\u0440 \u0443\u0440\u0435\u0434 \u0435 \u043E\u0434\u0431\u0438\u0435\u043D",noAccountsFound:"\u041D\u0435\u043C\u0430 \u043D\u0430\u0458\u0434\u0435\u043D\u0438 \u0441\u043C\u0435\u0442\u043A\u0438",selectYourAccounts:"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0433\u0438 \u0432\u0430\u0448\u0438\u0442\u0435 \u0441\u043C\u0435\u0442\u043A\u0438",connecting1Account:"\u041F\u043E\u0432\u0440\u0437\u0443\u0432\u0430\u045A\u0435 \u043D\u0430 \u0435\u0434\u043D\u0430 \u0441\u043C\u0435\u0442\u043A\u0430",cantFindAnyAccount:"\u041D\u0435 \u0441\u0435 \u043D\u0430\u0458\u0434\u0435\u043D\u0438 \u0441\u043C\u0435\u0442\u043A\u0438 \u043F\u043E\u0432\u0440\u0437\u0430\u043D\u0438 \u0441\u043E \u043E\u0432\u043E\u0458 \u041B\u0435\u045F\u0435\u0440. \u0412\u0435 \u043C\u043E\u043B\u0438\u043C\u0435 \u043A\u0440\u0435\u0438\u0440\u0430\u0458\u0442\u0435 \u043D\u043E\u0432\u0430 NEAR \u0441\u043C\u0435\u0442\u043A\u0430 ",orConnectAnAnotherLedger:"\u0438\u043B\u0438 \u043F\u043E\u0432\u0440\u0437\u0435\u0442\u0435 \u0434\u0440\u0443\u0433 \u041B\u0435\u045F\u0435\u0440.",connecting:"\u041F\u043E\u0432\u0440\u0437\u0443\u0432\u0430\u045A\u0435",ofAccounts:"\u043D\u0430 \u0441\u043C\u0435\u0442\u043A\u0438",failedToAutomatically:"\u041D\u0435\u0443\u0441\u043F\u0435\u0448\u043D\u043E \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0441\u043A\u043E \u0431\u0430\u0440\u0430\u045A\u0435 \u043D\u0430 \u0418\u0414 \u043D\u0430 \u0441\u043C\u0435\u0442\u043A\u0430\u0442\u0430. \u0412\u043D\u0435\u0441\u0435\u0442\u0435 \u0433\u043E \u0440\u0430\u0447\u043D\u043E:",overviewTheListOfAuthorized:"\u041F\u0440\u0435\u0433\u043B\u0435\u0434 \u043D\u0430 \u043B\u0438\u0441\u0442\u0430\u0442\u0430 \u043D\u0430 \u043E\u0432\u043B\u0430\u0441\u0442\u0435\u043D\u0438 \u0441\u043C\u0435\u0442\u043A\u0438, \u0437\u0430\u0432\u0440\u0448\u0435\u0442\u0435 \u0441\u0435 \u043D\u0430\u0458\u0430\u0432\u0430\u0442\u0430 \u0441\u043E \u043A\u043B\u0438\u043A\u043D\u0443\u0432\u0430\u045A\u0435 \u043D\u0430 \u043A\u043E\u043F\u0447\u0435\u0442\u043E \u043F\u043E\u0434\u043E\u043B\u0443.",finish:"\u0417\u0430\u0432\u0440\u0448\u0435\u0442\u0435"},install:{youllNeedToInstall:"\u0422\u0440\u0435\u0431\u0430 \u0434\u0430 \u0438\u043D\u0441\u0442\u0430\u043B\u0438\u0440\u0430\u0442\u0435",toContinueAfterInstalling:"\u0437\u0430 \u0434\u0430 \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u0435. \u041F\u043E \u0438\u043D\u0441\u0442\u0430\u043B\u0438\u0440\u0430\u045A\u0435\u0442\u043E",refreshThePage:"\u041E\u0441\u0432\u0435\u0436\u0435\u0442\u0435 \u0458\u0430 \u0441\u0442\u0440\u0430\u043D\u0430\u0442\u0430.",open:"\u041E\u0442\u0432\u043E\u0440\u0435\u0442\u0435"},qr:{copiedToClipboard:"\u041A\u043E\u043F\u0438\u0440\u0430\u043D\u043E \u043D\u0430 \u043A\u043B\u0438\u043F\u0431\u043E\u0440\u0434\u043E\u0442",failedToCopy:"\u041D\u0435\u0443\u0441\u043F\u0435\u0448\u043D\u043E \u043A\u043E\u043F\u0438\u0440\u0430\u045A\u0435 \u043D\u0430 \u043A\u043B\u0438\u043F\u0431\u043E\u0440\u0434",scanWithYourMobile:"\u0421\u043A\u0435\u043D\u0438\u0440\u0430\u0458\u0442\u0435 \u0441\u043E \u0432\u0430\u0448\u0438\u043E\u0442 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0441\u043A\u0438 \u0443\u0440\u0435\u0434",scanQRCodeMessage:`\u0412\u0435 \u043C\u043E\u043B\u0438\u043C\u0435 \u0441\u043A\u0435\u043D\u0438\u0440\u0430\u0458\u0442\u0435 \u0433\u043E \u043E\u0432\u043E\u0458 QR \u043A\u043E\u0434
|
|
59
|
+
\u0437\u0430 \u0434\u0430 \u0441\u0435 \u043F\u043E\u0432\u0440\u0437\u0430\u0442 \u0432\u0430\u0448\u0438\u043E\u0442 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A.`,copyToClipboard:"\u041A\u043E\u043F\u0438\u0440\u0430\u0458\u0442\u0435 \u043D\u0430 \u043A\u043B\u0438\u043F\u0431\u043E\u0440\u0434",preferTheOfficial:"\u041F\u0440\u0435\u0444\u0435\u0440\u0438\u0440\u0430\u0458\u0442\u0435 \u043E\u0444\u0438\u0446\u0438\u0458\u0430\u043B\u0435\u043D \u0434\u0438\u0430\u043B\u043E\u0433 \u043D\u0430",openInOfficialDialogue:"\u043E\u0442\u0432\u043E\u0440\u0435\u0442\u0435 \u0432\u043E \u043E\u0444\u0438\u0446\u0438\u0458\u0430\u043B\u0435\u043D \u0434\u0438\u0458\u0430\u043B\u043E\u0433",open:"\u041E\u0442\u0432\u043E\u0440\u0435\u0442\u0435"},walletTypes:{hardware:"\u0425\u0430\u0440\u0434\u0432\u0435\u0440\u0441\u043A\u0438 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A",browser:"\u041D\u043E\u0432\u0447\u0430\u043D\u0438\u043A \u043D\u0430 \u0438\u043D\u0442\u0435\u0440\u043D\u0435\u0442 \u043F\u0440\u0435\u043B\u0438\u0441\u0442\u0443\u0432\u0430\u0447",injected:"\u0415\u043A\u0441\u0442\u0435\u043D\u0437\u0438\u0458\u0430 \u0437\u0430 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A",bridge:"Bridge \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A",mobile:"\u041C\u043E\u0431\u0438\u043B\u0435\u043D \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A","instant-link":"\u0418\u043D\u0441\u0442\u0430\u043D\u0442 \u043F\u0430\u0440\u0438\u0447\u043D\u0438\u043A"},exportAccounts:{chooseAWallet:"\u041E\u0434\u0431\u0435\u0440\u0435\u0442\u0435 \u043F\u0430\u0440\u0438\u0447\u043D\u0438\u043A",transferYourAccounts:"\u041F\u0440\u0435\u0444\u0440\u043B\u0435\u0442\u0435 \u0433\u0438 \u0432\u0430\u0448\u0438\u0442\u0435 \u043A\u043E\u0440\u0438\u0441\u043D\u0438\u0447\u043A\u0438 \u0441\u043C\u0435\u0442\u043A\u0438",selectAWallet:"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435\u043D \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A \u043A\u043E\u0458 \u0433\u0438 \u0437\u0430\u0434\u043E\u0432\u043E\u043B\u0443\u0432\u0430 \u0432\u0430\u0448\u0438\u0442\u0435 \u0431\u0430\u0440\u0430\u043D\u045A\u0430 \u0438 \u0433\u0438 \u043F\u043E\u0434\u0434\u0440\u0436\u0443\u0432\u0430 \u0432\u0430\u0448\u0438\u0442\u0435 \u043F\u043E\u0432\u0440\u0437\u0430\u043D\u0438 \u043A\u043E\u0440\u0438\u0441\u043D\u0438\u0447\u043A\u0438 \u0441\u043C\u0435\u0442\u043A\u0438.",selectYourAccounts:"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0433\u0438 \u0432\u0430\u0448\u0438\u0442\u0435 \u043A\u043E\u0440\u0438\u0441\u043D\u0438\u0447\u043A\u0438 \u0441\u043C\u0435\u0442\u043A\u0438",afterDecide:"\u041E\u0434\u043A\u0430\u043A\u043E \u045C\u0435 \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A, \u043C\u043E\u0436\u0435\u0442\u0435 \u0434\u0430 \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u043A\u043E\u0438 \u043A\u043E\u0440\u0438\u0441\u043D\u0438\u0447\u043A\u0438 \u0441\u043C\u0435\u0442\u043A\u0438 \u0441\u0430\u043A\u0430\u0442\u0435 \u0434\u0430 \u0433\u0438 \u043F\u0440\u0435\u0444\u0440\u043B\u0438\u0442\u0435.",disclaimer:"\u041D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0434\u0430 \u043F\u0440\u0444\u0440\u043B\u0430\u0442\u0435 \u043A\u043E\u0440\u0438\u0441\u043D\u0438\u0447\u043A\u0438 \u0441\u043C\u0435\u0442\u043A\u0438 \u043A\u043E\u0438 \u043D\u0438\u043A\u043E\u0433\u0430\u0448 \u043D\u0435 \u0431\u0438\u043B\u0435 \u043D\u0430\u0434\u043E\u043F\u043E\u043B\u043D\u0430\u0442\u0438 \u0438\u043B\u0438 \u043A\u043E\u0440\u0438\u0441\u0442\u0435\u043D\u0438 \u043D\u0430 NEAR.",warning:"\u043D\u0435 \u043F\u043E\u0434\u0434\u0440\u0436\u0443\u0432\u0430 \u0438\u0437\u0432\u0435\u0437\u0443\u0432\u0430\u045A\u0435 \u043D\u0430 \u043A\u043E\u0440\u0438\u0441\u043D\u0438\u0447\u043A\u0438 \u0441\u043C\u0435\u0442\u043A\u0438 \u0432\u043E \u043E\u0432\u043E\u0458 \u043C\u043E\u043C\u0435\u043D\u0442. \u0412\u0435 \u043C\u043E\u043B\u0438\u043C\u0435 \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0434\u0440\u0443\u0433 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A.",walletTypes:{hardware:"\u0425\u0430\u0440\u0434\u0432\u0435\u0440\u0441\u043A\u0438 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A",browser:"\u041D\u043E\u0432\u0447\u0430\u043D\u0438\u043A \u043D\u0430 \u0438\u043D\u0442\u0435\u0440\u043D\u0435\u0442 \u043F\u0440\u0435\u043B\u0438\u0441\u0442\u0443\u0432\u0430\u0447",injected:"\u0415\u043A\u0441\u0442\u0435\u043D\u0437\u0438\u0458\u0430 \u0437\u0430 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A",bridge:"Bridge \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A",mobile:"\u041C\u043E\u0431\u0438\u043B\u0435\u043D \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A"},selectAccounts:{title:"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0433\u0438 \u043A\u043E\u0440\u0438\u0441\u043D\u0438\u0447\u043A\u0438\u0442\u0435 \u0441\u043C\u0435\u0442\u043A\u0438 \u0437\u0430 \u0434\u0430 \u0433\u0438 \u043F\u0440\u0435\u0444\u0440\u043B\u0438\u0442\u0435.",button:"\u0414\u043E\u0431\u0438\u0458\u0442\u0435 \u043B\u043E\u0437\u0438\u043D\u043A\u0430",deselectAll:"\u041E\u0442\u0441\u0435\u043B\u0435\u043A\u0442\u0438\u0440\u0430\u0458\u0442\u0435 \u0441\u0435",selectAll:"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0441\u0435",unavailable:"\u0422\u0440\u0430\u043D\u0441\u0444\u0435\u0440\u043E\u0442 \u0435 \u043D\u0435\u0434\u043E\u0441\u0442\u0430\u043F\u0435\u043D",error:"\u041A\u043E\u0440\u0438\u0441\u043D\u0438\u0447\u043A\u0430\u0442\u0430 \u0441\u043C\u0435\u0442\u043A\u0430 \u043D\u0435 \u043F\u043E\u0441\u0442\u043E\u0438",warningLedger:"\u041F\u043E\u0442\u0440\u0435\u0431\u043D\u0430 \u0435 \u043F\u043E\u0434\u0434\u0440\u0448\u043A\u0430 \u043E\u0434 \u041B\u0435\u045F\u0435\u0440",noBalance:"\u0421\u043C\u0435\u0442\u043A\u0430\u0442\u0430 \u043D\u0435 \u0435 \u0444\u0438\u043D\u0430\u043D\u0441\u0438\u0440\u0430\u043D\u0430"},getPassphrase:{title:"\u041A\u043E\u043F\u0438\u0440\u0430\u0458\u0442\u0435 \u0458\u0430 \u043F\u0440\u0438\u0432\u0440\u0435\u043C\u0435\u043D\u0430\u0442\u0430 \u043B\u043E\u0437\u0438\u043D\u043A\u0430",desc:"\u040C\u0435 \u0442\u0440\u0435\u0431\u0430 \u0434\u0430 \u0458\u0430 \u0432\u043D\u0435\u0441\u0435\u0442\u0435 \u043E\u0432\u0430\u0430 \u043B\u043E\u0437\u0438\u043D\u043A\u0430 \u043A\u043E\u0433\u0430 \u045C\u0435 \u0437\u0430\u043F\u043E\u0447\u043D\u0435\u0442\u0435 \u0434\u0430 \u0433\u0438 \u0438\u0437\u0432\u0435\u0437\u0443\u0432\u0430\u0442\u0435 \u0432\u0430\u0448\u0438\u0442\u0435 \u0441\u043C\u0435\u0442\u043A\u0438 \u043D\u0430 \u0434\u0440\u0443\u0433 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A.",button:"\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0435\u0442\u0435",label:"\u041A\u043B\u0438\u043A\u043D\u0435\u0442\u0435 \u0437\u0430 \u0434\u0430 \u043A\u043E\u043F\u0438\u0440\u0430\u0442\u0435",checkLabel:"\u0408\u0430 \u043A\u043E\u043F\u0438\u0440\u0430\u0432 \u0438\u043B\u0438 \u0437\u0430\u043F\u0438\u0448\u0430\u0432 \u043B\u043E\u0437\u0438\u043D\u043A\u0430\u0442\u0430"},complete:{title:"\u0417\u0430\u0432\u0440\u0448\u0435\u0442\u0435 \u0433\u043E \u043F\u0440\u0435\u043D\u043E\u0441\u043E\u0442",descOne:"\u0421\u0435\u0433\u0430 \u045C\u0435 \u0431\u0438\u0434\u0435\u0442\u0435 \u043F\u0440\u0435\u043D\u0430\u0441\u043E\u0447\u0435\u043D\u0438 \u043D\u0430 \u0438\u0437\u0431\u0440\u0430\u043D\u0438\u043E\u0442 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A \u0437\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430\u045A\u0435 \u043D\u0430 \u043F\u0440\u0435\u043D\u043E\u0441\u043E\u0442.",descTwo:"\u041E\u0442\u043A\u0430\u043A\u043E \u045C\u0435 \u0437\u0430\u0432\u0440\u0448\u0438 \u0443\u0432\u043E\u0437\u043E\u0442 \u043E\u0434 \u0438\u0437\u0431\u0440\u0430\u043D\u0438\u043E\u0442 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A, \u043F\u0440\u0438\u0442\u0438\u0441\u043D\u0435\u0442\u0435 \u0433\u043E \u043A\u043E\u043F\u0447\u0435\u0442\u043E \u0437\u0430 \u0434\u0430 \u0433\u043E \u0437\u0430\u0432\u0440\u0448\u0438\u0442\u0435 \u043F\u0440\u0435\u043D\u043E\u0441\u043E\u0442.",button:"\u0417\u0430\u0432\u0440\u0448\u0435\u0442\u0435"}}},dve={or:"\u0438\u043B\u0438"},lve={modal:uve,general:dve},pve={wallet:{connectYourWallet:"Pove\u017Eite svojo denarnico!",whatIsAWallet:"Kaj je denarnica?",secureAndManage:"Zavarujte in upravljajte svoja digitalna sredstva.",safelyStore:"Varno shranjujte in prena\u0161ajte svoje kriptovalute in NFTje.",logInToAny:"Prijavite se v katero koli aplikacijo na NEAR",noNeedToCreate:"Ni vam treba ustvarjati novih ra\u010Dunov. Pove\u017Eite svojo denarnico in za\u010Dnite!",getAWallet:"Ustvarite denarnico",useAWallet:"Uporabite denarnico, da bi zavarovali in upravljali s svoja NEAR digitalna sredstva, in se prijavite v katero koli aplikacijo ekosistema NEAR",connectionFailed:"Povezava ni bila uspe\u0161na.",connectionSuccessful:"Povezava je bila uspe\u0161na.",connectionNotSuccessful:"Povezava ni uspela, prosimo poskusite znova.",whatIsAWalletDescription:"Denarnice vam omogo\u010Dajo shranjevanje digitalnih sredstev, kot so kriptovalute, in prijavo v aplikacije na NEAR.",selectWalletOr:"Prosimo izberite denarnico na levi strani ali",createNewWallet:"Ustvarite novo denarnico",rememberWallet:"Zapomni si denarnice",connected:"Va\u0161a denarnica je povezana.",connectingTo:"Povezovanje z",connectingMessage:{injected:"Potrdite povezavo v oknu raz\u0161iritve",browser:"Po preusmeritvi potrdite povezavo v denarnici",hardware:"Potrdite povezavo s hladno denarnico",bridge:"Potrdite povezavo v denarnici"}},ledger:{connectWithLedger:"Pove\u017Eite se z Ledger",makeSureYourLedger:"Prepri\u010Dajte se, da je va\u0161 Ledger varno povezan in da je aplikacija NEAR odprta v va\u0161i napravi",continue:"Nadaljuj",specifyHDPath:"Dolo\u010Dite HD pot",enterYourPreferredHDPath:"Vnesite \u017Eeleno HD pot, nato poi\u0161\u010Dite vse aktivne ra\u010Dune.",scan:"Skenirajte",retry:"Poskusite znova",ledgerIsNotAvailable:"Ledger ni na voljo",accessDeniedToUseLedgerDevice:"Dostop za uporabo naprave Ledger zavrnjen",noAccountsFound:"Ni najdenih ra\u010Dunov",selectYourAccounts:"Izberite Va\u0161i ra\u010Duni",connecting1Account:"Povezovanje enega ra\u010Duna",cantFindAnyAccount:"Ni mogo\u010De najti nobenega ra\u010Duna, povezanega s tem Ledgerjem. Ustvarite nov NEAR ra\u010Dun ",orConnectAnAnotherLedger:"ali pove\u017Eite drug Ledger..",connecting:"Povezovanje",ofAccounts:"ra\u010Dunov",failedToAutomatically:"ID-ja ra\u010Duna ni bilo mogo\u010De samodejno najti. Zagotovite ga ro\u010Dno:",overviewTheListOfAuthorized:"Oglejte si seznam poobla\u0161\u010Denih ra\u010Dunov, dokon\u010Dajte prijavo s klikom na spodnji gumb.",finish:"Kon\u010Dajte"},install:{youllNeedToInstall:"Morali ga boste namestiti",toContinueAfterInstalling:"nadaljevati. Po namestitvi",refreshThePage:"Osve\u017Eite stran.",open:"Odprite"},qr:{copiedToClipboard:"Kopirano v podlo\u017Eni mapi",failedToCopy:"Kopiranje v podlo\u017Eni mapi ni uspelo",scanWithYourMobile:"Skenirajte s svojo mobilno napravo",scanQRCodeMessage:`Prosimo skenirajte to kodo QR
|
|
60
|
+
za povezovanje va\u0161e denarnice.`,copyToClipboard:" Kopirajte v podlo\u017Eni mapi",preferTheOfficial:"Preferirajte uradno pogovorno okno",openInOfficialDialogue:"odprite v uradnem pogovornem oknu",open:"Odprite"},walletTypes:{hardware:"Hladna denarnica",browser:"Denarnica brskalnika",injected:"Raz\u0161iritev za denarnico",bridge:"Bridge denarnica",mobile:"Mobilna denarnica","instant-link":"Takoj\u0161nja denarnica"},exportAccounts:{chooseAWallet:"Izberite denarnico",transferYourAccounts:"Prenesite svoje ra\u010Dune",selectAWallet:"Izberite denarnico, ki ustreza va\u0161im potrebam in podpira va\u0161e povezane ra\u010Dune.",selectYourAccounts:"Izberite va\u0161i ra\u010Duni",afterDecide:"Ko se odlo\u010Dite za denarnico, lahko izberete, katere ra\u010Dune \u017Eelite prenesti.",disclaimer:"Ne boste mogli prenesti Ra\u010Dunov, ki nikoli niso bili financirani ali uporabljeni na NEAR.",warning:"trenutno ne podpira izvoza ra\u010Duna. Izberite drugo denarnico",walletTypes:{hardware:"Hladna denarnica",browser:"Denarnica brskalnika",injected:"Raz\u0161iritev za denarnico",bridge:"Bridge denarnica",mobile:"Mobilna denarnica"},selectAccounts:{title:"Izberite ra\u010Duni za prenos.",button:"Pridobite geslo",deselectAll:"Prekli\u010Di izbiro vseh",selectAll:"Izberi vse",unavailable:"Prenos ni na voljo",error:"Ra\u010Dun ne obstaja",warningLedger:"Potrebna je podpora za Ledger",noBalance:"Ra\u010Dun ni financiran"},getPassphrase:{title:"Kopiraj za\u010Dasno geslo",desc:"To geslo boste morali vnesti, ko boste za\u010Deli izva\u017Eati svoje ra\u010Dune v drugo denarnico.",button:"Nadaljujte",label:"Kliknite za kopiranje",checkLabel:"Geslo sem kopiral ali zapisal"},complete:{title:"Dokon\u010Dajte prenos",descOne:"Zdaj boste preusmerjeni v denarnico, ki ste jo izbrali za dokon\u010Danje prenosa.",descTwo:"Ko je uvozni del postopka kon\u010Dan iz izbrane denarnice, pritisnite gumb za dokon\u010Danje postopka prenosa.",button:"Kon\u010Dajte"}}},hve={or:"ali"},mve={modal:pve,general:hve},yve={wallet:{connectYourWallet:"\u041F\u043E\u0432\u0435\u0436\u0438\u0442\u0435 \u0441\u0432\u043E\u0458 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A!",whatIsAWallet:"\u0428\u0442\u0430 \u0458\u0435 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A?",secureAndManage:"\u041E\u0431\u0435\u0437\u0431\u0435\u0434\u0438\u0442\u0435 \u0438 \u0443\u043F\u0440\u0430\u0432\u0459\u0430\u0458\u0442\u0435 \u0441\u0432\u043E\u0458\u043E\u043C \u0434\u0438\u0433\u0438\u0442\u0430\u043B\u043D\u043E\u043C \u0438\u043C\u043E\u0432\u0438\u043D\u043E\u043C.",safelyStore:"\u0411\u0435\u0437\u0431\u0435\u0434\u043D\u043E \u0447\u0443\u0432\u0430\u0458\u0442\u0435 \u0438 \u043F\u0440\u0435\u043D\u043E\u0441\u0438\u0442\u0435 \u0441\u0432\u043E\u0458\u0435 \u043A\u0440\u0438\u043F\u0442\u043E\u0432\u0430\u043B\u0443\u0442\u0435 \u0438 NFT.",logInToAny:"\u041F\u0440\u0438\u0458\u0430\u0432\u0438\u0442\u0435 \u0441\u0435 \u043D\u0430 \u0431\u0438\u043B\u043E \u043A\u043E\u0458\u0443 \u0430\u043F\u043B\u0438\u043A\u0430\u0446\u0438\u0458\u0443 NEAR",noNeedToCreate:"\u041D\u0435\u043C\u0430 \u043F\u043E\u0442\u0440\u0435\u0431\u0435 \u0434\u0430 \u043A\u0440\u0435\u0438\u0440\u0430\u0442\u0435 \u043D\u043E\u0432\u0435 \u043D\u0430\u043B\u043E\u0433\u0435 \u0438\u043B\u0438 \u0430\u043A\u0440\u0435\u0434\u0438\u0442\u0438\u0432\u0435. \u041F\u043E\u0432\u0435\u0436\u0438\u0442\u0435 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A \u0438 \u0441\u043F\u0440\u0435\u043C\u043D\u0438 \u0441\u0442e!",getAWallet:"\u041D\u0430\u0431\u0430\u0432\u0438\u0442\u0435 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A",useAWallet:"\u041A\u043E\u0440\u0438\u0441\u0442\u0438\u0442\u0435 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A \u0434\u0430 \u043E\u0431\u0435\u0437\u0431\u0435\u0434\u0438\u0442\u0435 \u0438 \u0443\u043F\u0440\u0430\u0432\u0459\u0430\u0442\u0435 \u0441\u0432\u043E\u0458\u0438\u043C NEAR \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0438\u043C\u0430 \u0438 \u0434\u0430 \u0441\u0435 \u043F\u0440\u0438\u0458\u0430\u0432\u0438\u0442\u0435 \u0443 \u0431\u0438\u043B\u043E \u043A\u043E\u0458\u0443 \u0430\u043F\u043B\u0438\u043A\u0430\u0446\u0438\u0458\u0443 NEAR \u0431\u0435\u0437 \u043F\u043E\u0442\u0440\u0435\u0431\u0435 \u0437\u0430 \u043A\u043E\u0440\u0438\u0441\u043D\u0438\u0447\u043A\u0438\u043C \u0438\u043C\u0435\u043D\u0438\u043C\u0430 \u0438 \u043B\u043E\u0437\u0438\u043D\u043A\u0430\u043C\u0430.",connectionFailed:"\u0412\u0435\u0437\u0430 \u043D\u0438\u0458\u0435 \u0443\u0441\u043F\u043E\u0441\u0442\u0430\u0432\u0459\u0435\u043D\u0430.",connectionSuccessful:"\u0412\u0435\u0437\u0430 \u0458\u0435 \u0443\u0441\u043F\u0435\u043B\u0430.",connectionNotSuccessful:"\u0412\u0435\u0437\u0430 \u043D\u0438\u0458\u0435 \u0443\u0441\u043F\u0435\u043B\u0430, \u043C\u043E\u043B\u0438\u043C\u043E \u043F\u043E\u043A\u0443\u0448\u0430\u0458\u0442\u0435 \u043F\u043E\u043D\u043E\u0432\u043E.",whatIsAWalletDescription:"\u041D\u043E\u0432\u0447\u0430\u043D\u0438\u0446\u0438 \u0432\u0430\u043C \u043E\u043C\u043E\u0433\u0443\u045B\u0430\u0432\u0430\u0458\u0443 \u0441\u043A\u043B\u0430\u0434\u0438\u0448\u0442\u0435\u045A\u0435 \u0434\u0438\u0433\u0438\u0442\u0430\u043B\u043D\u0435 \u0438\u043C\u043E\u0432\u0438\u043D\u0435 \u043A\u0430\u043E \u0448\u0442\u043E \u0441\u0443 \u043A\u0440\u0438\u043F\u0442\u043E\u0432\u0430\u043B\u0443\u0442\u0435 \u0438 \u043F\u0440\u0438\u0458\u0430\u0432\u0443 \u0443 \u0430\u043F\u043B\u0438\u043A\u0430\u0446\u0438\u0458\u0435 \u043D\u0430 NEAR.",selectWalletOr:"\u041C\u043E\u043B\u0438\u043C\u043E \u0438\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A \u0441\u0430 \u043B\u0435\u0432\u0435 \u0441\u0442\u0440\u0430\u043D\u0435 \u0438\u043B\u0438",createNewWallet:"\u041D\u0430\u043F\u0440\u0430\u0432\u0438\u0442\u0435 \u043D\u043E\u0432\u0438 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A",rememberWallet:"\u0417\u0430\u043F\u0430\u043C\u0442\u0438 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A\u0435",connected:"\u041F\u043E\u0432\u0435\u0437\u0430\u043D.",connectingTo:"\u041F\u043E\u0432\u0435\u0437\u0438\u0432\u0430\u045A\u0435 \u043D\u0430",connectingMessage:{injected:"\u041F\u043E\u0442\u0432\u0440\u0434\u0438\u0442\u0435 \u0432\u0435\u0437\u0443 \u0443 \u0441\u043F\u043E\u0459\u043D\u043E\u043C \u043F\u0440\u043E\u0437\u043E\u0440\u0443",browser:"\u041D\u0430\u043A\u043E\u043D \u043F\u0440\u0435\u0443\u0441\u043C\u0435\u0440\u0430\u0432\u0430\u045A\u0430, \u043F\u043E\u0442\u0432\u0440\u0434\u0438\u0442\u0435 \u0432\u0435\u0437\u0443 \u0443 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A\u0443",hardware:"\u041F\u043E\u0442\u0432\u0440\u0434\u0438\u0442\u0435 \u0432\u0435\u0437\u0443 \u0441\u0430 \u0445\u043B\u0430\u0434\u043D\u0438\u043C \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A\u043E\u043C",bridge:"\u041F\u043E\u0442\u0432\u0440\u0434\u0438\u0442\u0435 \u0432\u0435\u0437\u0443 \u0441\u0430 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A\u043E\u043C"}},ledger:{connectWithLedger:"\u041F\u043E\u0432\u0435\u0436\u0438\u0442\u0435 \u0441\u0435 \u0441\u0430 Ledger",makeSureYourLedger:"\u0423\u0432\u0435\u0440\u0438\u0442\u0435 \u0441\u0435 \u0434\u0430 \u0458\u0435 \u0432\u0430\u0448 Ledger \u0431\u0435\u0437\u0431\u0435\u0434\u043D\u043E \u043F\u043E\u0432\u0435\u0437\u0430\u043D \u0438 \u0434\u0430 \u0458\u0435 \u0430\u043F\u043B\u0438\u043A\u0430\u0446\u0438\u0458\u0430 NEAR \u043E\u0442\u0432\u043E\u0440\u0435\u043D\u0430 \u043D\u0430 \u0432\u0430\u0448\u0435\u043C \u0443\u0440\u0435\u0452\u0430\u0458\u0443",continue:"\u041D\u0430\u0441\u0442\u0430\u0432\u0438",specifyHDPath:"\u041D\u0430\u0432\u0435\u0434\u0438\u0442\u0435 \u0425\u0414 \u043F\u0443\u0442\u0430\u045A\u0443",enterYourPreferredHDPath:"\u0423\u043D\u0435\u0441\u0438\u0442\u0435 \u0436\u0435\u0459\u0435\u043D\u0443 \u0436\u0435\u0459\u0435\u043D\u0443 \u0425\u0414 \u043F\u0443\u0442\u0430\u045A\u0443, \u0430 \u0437\u0430\u0442\u0438\u043C \u0441\u043A\u0435\u043D\u0438\u0440\u0430\u0458\u0442\u0435 \u0441\u0432\u0435 \u0430\u043A\u0442\u0438\u0432\u043D\u0435 \u043D\u0430\u043B\u043E\u0433\u0435.",scan:"\u0421\u043A\u0435\u043D\u0438\u0440\u0430\u0458\u0442\u0435",retry:"\u041F\u043E\u043A\u0443\u0448\u0430\u0458 \u043F\u043E\u043D\u043E\u0432\u043E",ledgerIsNotAvailable:"Ledger \u043D\u0438\u0458\u0435 \u0434\u043E\u0441\u0442\u0443\u043F\u0430\u043D.",accessDeniedToUseLedgerDevice:"\u041F\u0440\u0438\u0441\u0442\u0443\u043F \u0458\u0435 \u043E\u0434\u0431\u0438\u0458\u0435\u043D \u0437\u0430 \u043A\u043E\u0440\u0438\u0448\u045B\u0435\u045A\u0435 Ledger \u0443\u0440\u0435\u0452\u0430\u0458\u0430",noAccountsFound:"\u041D\u0430l\u043E\u0437\u0438 \u043D\u0438\u0441\u0443 \u043F\u0440\u043E\u043D\u0430\u0452\u0435\u043D\u0438",selectYourAccounts:"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u0412\u0430\u0448 \u043D\u0430l\u043E\u0433",connecting1Account:"\u041F\u043E\u0432\u0435\u0437\u0430\u0442\u0438 1 \u043D\u0430l\u043E\u0433",cantFindAnyAccount:"\u041D\u0438\u0458\u0435 \u043C\u043E\u0433\u0443\u045B\u0435 \u043F\u0440\u043E\u043D\u0430\u045B\u0438 \u043D\u0438\u0458\u0435\u0434\u0430\u043D \u043D\u0430l\u043E\u0433 \u043F\u043E\u0432\u0435\u0437\u0430\u043D \u0441\u0430 \u043E\u0432\u0438\u043C Ledger-\u043E\u043C. \u041D\u0430\u043F\u0440\u0430\u0432\u0438\u0442\u0435 \u043D\u043E\u0432\u0438 NEAR \u043D\u0430l\u043E\u0433",orConnectAnAnotherLedger:"\u0438\u043B\u0438 \u043F\u043E\u0432\u0435\u0436\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0438 Ledger.",connecting:"\u041F\u043E\u0432\u0435\u0437\u0438\u0432\u0430\u045A\u0435",ofAccounts:"\u043D\u0430l\u043E\u0433\u0430",failedToAutomatically:"\u0410\u0443\u0442\u043E\u043C\u0430\u0442\u0441\u043A\u043E \u043F\u0440\u043E\u043D\u0430\u043B\u0430\u0436\u0435\u045A\u0435 ID-a \u043D\u0430l\u043E\u0433\u0430 \u043D\u0438\u0458\u0435 \u0443\u0441\u043F\u0435\u043B\u043E. \u041D\u0430\u0432\u0435\u0434\u0438\u0442\u0435 \u0433\u0430 \u0440\u0443\u0447\u043D\u043E:",overviewTheListOfAuthorized:"\u041F\u0440\u0435\u0433\u043B\u0435\u0434\u0430\u0458\u0442\u0435 \u043B\u0438\u0441\u0442\u0443 \u043E\u0432\u043B\u0430\u0448\u045B\u0435\u043D\u0438\u0445 \u0440\u0430\u0447\u0443\u043D\u0430, \u0437\u0430\u0432\u0440\u0448\u0438\u0442\u0435 \u043F\u0440\u0438\u0458\u0430\u0432\u0443 \u043A\u043B\u0438\u043A\u043E\u043C \u043D\u0430 \u0434\u0443\u0433\u043C\u0435 \u0438\u0441\u043F\u043E\u0434.",finish:"\u0417\u0430\u0432\u0440\u0448\u0438"},install:{youllNeedToInstall:"\u041C\u043E\u0440\u0430\u045B\u0435\u0442\u0435 \u0434\u0430 \u0438\u043D\u0441\u0442\u0430\u043B\u0438\u0440\u0430\u0442\u0435",toContinueAfterInstalling:"\u0437\u0430 \u043D\u0430\u0441\u0442\u0430\u0432\u0430\u043A. \u041D\u0430\u043A\u043E\u043D \u0438\u043D\u0441\u0442\u0430\u043B\u0438\u0440\u0430\u045A\u0430",refreshThePage:"\u043F\u043E\u043D\u043E\u0432\u043E \u0443\u0447\u0438\u0442\u0430\u0442\u0438 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443.",open:"\u041E\u0442\u0432\u043E\u0440\u0438"},qr:{copiedToClipboard:"\u041A\u043E\u043F\u0438\u0440\u0430\u043D\u043E \u0443 \u043C\u0435\u0452\u0443\u0441\u043F\u0440\u0435\u043C\u043D\u0438\u043A",failedToCopy:"\u041A\u043E\u043F\u0438\u0440\u0430\u045A\u0435 \u0443 \u043C\u0435\u0452\u0443\u0441\u043F\u0440\u0435\u043C\u043D\u0438\u043A \u043D\u0438\u0458\u0435 \u0443\u0441\u043F\u0435\u043B\u043E",scanWithYourMobile:"\u0421\u043A\u0435\u043D\u0438\u0440\u0430\u0458\u0442\u0435 \u043F\u043E\u043C\u043E\u045B\u0443 \u043C\u043E\u0431\u0438\u043B\u043D\u043E\u0433 \u0443\u0440\u0435\u0452\u0430\u0458\u0430",scanQRCodeMessage:`\u041C\u043E\u043B\u0438\u043C\u043E \u0441\u043A\u0435\u043D\u0438\u0440\u0430\u0458\u0442\u0435 \u043E\u0432\u0430\u0458 QR \u043A\u043E\u0434
|
|
61
|
+
\u0437\u0430 \u043F\u043E\u0432\u0435\u0437\u0438\u0432\u0430\u045A\u0435 \u0432\u0430\u0448\u0435\u0433 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A\u0430.`,copyToClipboard:" \u041A\u043E\u043F\u0438\u0440\u0430\u0458 \u0443 \u043C\u0435\u0452\u0443\u0441\u043F\u0440\u0435\u043C\u043D\u0438\u043A",preferTheOfficial:"\u041F\u0440\u0435\u0444\u0435\u0440\u0438\u0440\u0430\u0442\u0435 \u0437\u0432\u0430\u043D\u0438\u0447\u043D\u0438 \u0434\u0438\u0458\u0430\u043B\u043E\u0433 \u043E\u0434",openInOfficialDialogue:"\u043E\u0442\u0432\u043E\u0440\u0438 \u0443 \u0437\u0432\u0430\u043D\u0438\u0447\u043D\u043E\u043C \u0434\u0438\u0458\u0430\u043B\u043E\u0433\u0443",open:"\u041E\u0442\u0432\u043E\u0440\u0438"},walletTypes:{hardware:"\u0425\u0430\u0440\u0434\u0432\u0435\u0440\u0441\u043A\u0438 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A",browser:"\u041D\u043E\u0432\u0447\u0430\u043D\u0438\u043A \u043F\u0440\u0435\u0442\u0440\u0430\u0436\u0438\u0432\u0430\u0447\u0430,",injected:"\u0414\u043E\u0434\u0430\u0442\u0430\u043A \u0437\u0430 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A,",bridge:"Bridge \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A",mobile:"\u041C\u043E\u0431\u0438\u043B\u043D\u0438 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A","instant-link":"\u0418\u043D\u0441\u0442\u0430\u043D\u0442 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A"},exportAccounts:{chooseAWallet:"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A",transferYourAccounts:"\u041F\u0440\u0435\u043D\u0435\u0441\u0438\u0442\u0435 \u0441\u0432\u043E\u0458\u0435 \u043D\u0430\u043B\u043E\u0433\u0435",selectAWallet:"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A \u043A\u043E\u0458\u0438 \u043E\u0434\u0433\u043E\u0432\u0430\u0440\u0430 \u0432\u0430\u0448\u0438\u043C \u043F\u043E\u0442\u0440\u0435\u0431\u0430\u043C\u0430 \u0438 \u043A\u043E\u0458\u0438 \u043F\u043E\u0434\u0440\u0436\u0430\u0432\u0430 \u0432\u0430\u0448\u0435 \u043F\u043E\u0432\u0435\u0437\u0430\u043D\u0435 \u043D\u0430\u043B\u043E\u0433\u0435.",selectYourAccounts:"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u0430\u0448\u0435 \u043D\u0430\u043B\u043E\u0433\u0435",afterDecide:"\u041D\u0430\u043A\u043E\u043D \u0448\u0442\u043E \u0441\u0435 \u043E\u0434\u043B\u0443\u0447\u0438\u0442\u0435 \u0437\u0430 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A, \u043C\u043E\u0436\u0435\u0442\u0435 \u0438\u0437\u0430\u0431\u0440\u0430\u0442\u0438 \u043A\u043E\u0458\u0435 \u043D\u0430\u043B\u043E\u0433\u0435 \u0436\u0435\u043B\u0438\u0442\u0435 \u0434\u0430 \u043F\u0440\u0435\u043D\u0435\u0441\u0435\u0442\u0435.",disclaimer:"\u041D\u0435\u045B\u0435\u0442\u0435 \u043C\u043E\u045B\u0438 \u0434\u0430 \u043F\u0440\u0435\u043D\u0435\u0441\u0435\u0442\u0435 \u043D\u0430\u043B\u043E\u0433\u0435 \u043A\u043E\u0458\u0438 \u043D\u0438\u043A\u0430\u0434\u0430 \u043D\u0438\u0441\u0443 \u0431\u0438\u043B\u0438 \u0444\u0438\u043D\u0430\u043D\u0441\u0438\u0440\u0430\u043D\u0438 \u0438\u043B\u0438 \u043A\u043E\u0440\u0438\u0448\u045B\u0435\u043D\u0438 \u043D\u0430 NEAR.",warning:"\u0442\u0440\u0435\u043D\u0443\u0442\u043D\u043E \u043D\u0435 \u043F\u043E\u0434\u0440\u0436\u0430\u0432\u0430 \u0438\u0437\u0432\u043E\u0437 \u043D\u0430\u043B\u043E\u0433\u0430. \u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0438 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A.",walletTypes:{hardware:"\u0425\u0430\u0440\u0434\u0432\u0435\u0440\u0441\u043A\u0438 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A",browser:"\u041D\u043E\u0432\u0447\u0430\u043D\u0438\u043A \u043F\u0440\u0435\u0442\u0440\u0430\u0436\u0438\u0432\u0430\u0447\u0430,",injected:"\u0414\u043E\u0434\u0430\u0442\u0430\u043A \u0437\u0430 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A,",bridge:"Bridge \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A",mobile:"\u041C\u043E\u0431\u0438\u043B\u043D\u0438 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A"},selectAccounts:{title:"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u043D\u0430\u043B\u043E\u0433\u0435 \u0437\u0430 \u043F\u0440\u0435\u043D\u043E\u0441.",button:"\u0414\u043E\u0431\u0438\u0458\u0442\u0435 \u043F\u0440\u0438\u0441\u0442\u0443\u043F\u043D\u0443 \u0444\u0440\u0430\u0437\u0443",deselectAll:"\u041F\u043E\u043D\u0438\u0448\u0442\u0438\u0442\u0435 \u0438\u0437\u0431\u043E\u0440",selectAll:"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u0432\u0435",unavailable:"\u0422\u0440\u0430\u043D\u0441\u0444\u0435\u0440 \u043D\u0438\u0458\u0435 \u0434\u043E\u0441\u0442\u0443\u043F\u0430\u043D",error:"\u041D\u0430\u043B\u043E\u0433 \u043D\u0435 \u043F\u043E\u0441\u0442\u043E\u0458\u0438",warningLedger:"\u041F\u043E\u0442\u0440\u0435\u0431\u043D\u0430 \u043F\u043E\u0434\u0440\u0448\u043A\u0430 \u0437\u0430 Ledger",noBalance:"\u041D\u0430\u043B\u043E\u0433 \u043D\u0438\u0458\u0435 \u0444\u0438\u043D\u0430\u043D\u0441\u0438\u0440\u0430\u043D"},getPassphrase:{title:"\u041A\u043E\u043F\u0438\u0440\u0430\u0458 \u043F\u0440\u0438\u0432\u0440\u0435\u043C\u0435\u043D\u0443 \u043B\u043E\u0437\u0438\u043D\u043A\u0443",desc:"\u041C\u043E\u0440\u0430\u045B\u0435\u0442\u0435 \u0434\u0430 \u0443\u043D\u0435\u0441\u0435\u0442\u0435 \u043E\u0432\u0443 \u043B\u043E\u0437\u0438\u043D\u043A\u0443 \u043A\u0430\u0434\u0430 \u043F\u043E\u0447\u043D\u0435\u0442\u0435 \u0434\u0430 \u0438\u0437\u0432\u043E\u0437\u0438\u0442\u0435 \u0441\u0432\u043E\u0458\u0435 \u043D\u0430\u043B\u043E\u0433\u0435 \u0443 \u0434\u0440\u0443\u0433\u0438 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A.",button:"\u041D\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u0435",label:"\u041A\u043B\u0438\u043A\u043D\u0438\u0442\u0435 \u0434\u0430 \u0431\u0438\u0441\u0442\u0435 \u043A\u043E\u043F\u0438\u0440\u0430\u043B\u0438",checkLabel:"\u041A\u043E\u043F\u0438\u0440\u0430\u043E \u0441\u0430\u043C \u0438\u043B\u0438 \u0437\u0430\u043F\u0438\u0441\u0430\u043E \u043B\u043E\u0437\u0438\u043D\u043A\u0443"},complete:{title:"\u0414\u043E\u0432\u0440\u0448\u0438\u0442\u0435 \u0442\u0440\u0430\u043D\u0441\u0444\u0435\u0440",descOne:"\u0421\u0430\u0434\u0430 \u045B\u0435\u0442\u0435 \u0431\u0438\u0442\u0438 \u043F\u0440\u0435\u0443\u0441\u043C\u0435\u0440\u0435\u043D\u0438 \u043D\u0430 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A \u043A\u043E\u0458\u0438 \u0441\u0442\u0435 \u0438\u0437\u0430\u0431\u0440\u0430\u043B\u0438 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0438\u0442\u0435 \u0442\u0440\u0430\u043D\u0441\u0444\u0435\u0440.",descTwo:"\u041A\u0430\u0434\u0430 \u0441\u0435 \u0434\u0435\u043E \u043F\u0440\u043E\u0446\u0435\u0441\u0430 \u0443\u0432\u043E\u0437\u0430 \u0437\u0430\u0432\u0440\u0448\u0438 \u0438\u0437 \u0438\u0437\u0430\u0431\u0440\u0430\u043D\u043E\u0433 \u043D\u043E\u0432\u0447\u0430\u043D\u0438\u043A\u0430, \u043F\u0440\u0438\u0442\u0438\u0441\u043D\u0438\u0442\u0435 \u0434\u0443\u0433\u043C\u0435 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0438\u0442\u0435 \u043F\u0440\u043E\u0446\u0435\u0441 \u043F\u0440\u0435\u043D\u043E\u0441\u0430.",button:"\u0417\u0430\u0432\u0440\u0448\u0438\u0442\u0435"}}},bve={or:"\u0438\u043B\u0438"},gve={modal:yve,general:bve},vve=t=>{switch(t){case"en":return gU;case"es":return Lge;case"zh":return Dge;case"bg":return Hge;case"ko":return Vge;case"vi":return Xge;case"hi":return rve;case"ar":return ave;case"hr":return fve;case"mk":return lve;case"sl":return mve;case"sr":return gve;default:return gU}},xve=t=>{Mz=t},wve=t=>t.indexOf("-")!==-1?t.split("-")[0]:t.split("_")[0],kz=(t,e)=>{if(!t)return"";let r=e.indexOf(".");if(r>-1){let n=e.substring(0,r),o=e.substring(r+1);return kz(t[n],o)}return t[e]},Eve=t=>{let e=window.navigator.languages?window.navigator.languages[0]:null;e=e||window.navigator.language;let r=wve(Mz||e),n=vve(r),o=kz(n,t);return o&&typeof o=="string"?o:t}});var Gv=G(Hv=>{"use strict";Hv.__esModule=!0;Hv.integers=void 0;Hv.integers=["u8","u16","u32","u64","u128","i8","i16","i32","i64","i128","f32","f64"]});var YA=G(wl=>{"use strict";wl.__esModule=!0;wl.DecodeBuffer=wl.EncodeBuffer=void 0;var Ave=(function(){function t(){this.offset=0,this.buffer_size=256,this.buffer=new ArrayBuffer(this.buffer_size),this.view=new DataView(this.buffer)}return t.prototype.resize_if_necessary=function(e){if(this.buffer_size-this.offset<e){this.buffer_size=Math.max(this.buffer_size*2,this.buffer_size+e);var r=new ArrayBuffer(this.buffer_size);new Uint8Array(r).set(new Uint8Array(this.buffer)),this.buffer=r,this.view=new DataView(r)}},t.prototype.get_used_buffer=function(){return new Uint8Array(this.buffer).slice(0,this.offset)},t.prototype.store_value=function(e,r){var n=r.substring(1),o=parseInt(n)/8;this.resize_if_necessary(o);var i=r[0]==="f"?"setFloat".concat(n):r[0]==="i"?"setInt".concat(n):"setUint".concat(n);this.view[i](this.offset,e,!0),this.offset+=o},t.prototype.store_bytes=function(e){this.resize_if_necessary(e.length),new Uint8Array(this.buffer).set(new Uint8Array(e),this.offset),this.offset+=e.length},t})();wl.EncodeBuffer=Ave;var _ve=(function(){function t(e){this.offset=0,this.buffer_size=e.length,this.buffer=new ArrayBuffer(e.length),new Uint8Array(this.buffer).set(e),this.view=new DataView(this.buffer)}return t.prototype.assert_enough_buffer=function(e){if(this.offset+e>this.buffer.byteLength)throw new Error("Error in schema, the buffer is smaller than expected")},t.prototype.consume_value=function(e){var r=e.substring(1),n=parseInt(r)/8;this.assert_enough_buffer(n);var o=e[0]==="f"?"getFloat".concat(r):e[0]==="i"?"getInt".concat(r):"getUint".concat(r),i=this.view[o](this.offset,!0);return this.offset+=n,i},t.prototype.consume_bytes=function(e){this.assert_enough_buffer(e);var r=this.buffer.slice(this.offset,this.offset+e);return this.offset+=e,r},t})();wl.DecodeBuffer=_ve});var ZA=G(Wt=>{"use strict";var Sve=Wt&&Wt.__extends||(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();Wt.__esModule=!0;Wt.validate_schema=Wt.ErrorSchema=Wt.expect_enum=Wt.expect_same_size=Wt.expect_bigint=Wt.expect_type=Wt.isArrayLike=void 0;var Ive=Gv();function Tve(t){return Array.isArray(t)||!!t&&typeof t=="object"&&"length"in t&&typeof t.length=="number"&&(t.length===0||t.length>0&&t.length-1 in t)}Wt.isArrayLike=Tve;function Bve(t,e,r){if(typeof t!==e)throw new Error("Expected ".concat(e," not ").concat(typeof t,"(").concat(t,") at ").concat(r.join(".")))}Wt.expect_type=Bve;function Ove(t,e){var r=["number","string","bigint","boolean"].includes(typeof t),n=typeof t=="object"&&t!==null&&"toString"in t;if(!r&&!n)throw new Error("Expected bigint, number, boolean or string not ".concat(typeof t,"(").concat(t,") at ").concat(e.join(".")))}Wt.expect_bigint=Ove;function Pve(t,e,r){if(t!==e)throw new Error("Array length ".concat(t," does not match schema length ").concat(e," at ").concat(r.join(".")))}Wt.expect_same_size=Pve;function Rve(t,e){if(typeof t!="object"||t===null)throw new Error("Expected object not ".concat(typeof t,"(").concat(t,") at ").concat(e.join(".")))}Wt.expect_enum=Rve;var Fz=Ive.integers.concat(["bool","string"]),Lz=["option","enum","array","set","map","struct"],xf=(function(t){Sve(e,t);function e(r,n){var o="Invalid schema: ".concat(JSON.stringify(r)," expected ").concat(n);return t.call(this,o)||this}return e})(Error);Wt.ErrorSchema=xf;function js(t){if(!(typeof t=="string"&&Fz.includes(t))){if(t&&typeof t=="object"){var e=Object.keys(t);if(e.length===1&&Lz.includes(e[0])){var r=e[0];if(r==="option")return js(t[r]);if(r==="enum")return Cve(t[r]);if(r==="array")return Nve(t[r]);if(r==="set")return js(t[r]);if(r==="map")return Mve(t[r]);if(r==="struct")return kve(t[r])}}throw new xf(t,Lz.join(", ")+" or "+Fz.join(", "))}}Wt.validate_schema=js;function Cve(t){if(!Array.isArray(t))throw new xf(t,"Array");for(var e=0,r=t;e<r.length;e++){var n=r[e];if(typeof n!="object"||!("struct"in n))throw new Error('Missing "struct" key in enum schema');if(typeof n.struct!="object"||Object.keys(n.struct).length!==1)throw new Error('The "struct" in each enum must have a single key');js({struct:n.struct})}}function Nve(t){if(typeof t!="object")throw new xf(t,"{ type, len? }");if(t.len&&typeof t.len!="number")throw new Error("Invalid schema: ".concat(t));if("type"in t)return js(t.type);throw new xf(t,"{ type, len? }")}function Mve(t){if(typeof t=="object"&&"key"in t&&"value"in t)js(t.key),js(t.value);else throw new xf(t,"{ key, value }")}function kve(t){if(typeof t!="object")throw new xf(t,"object");for(var e in t)js(t[e])}});var jz=G(wi=>{"use strict";var $ve=wi&&wi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Fve=wi&&wi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Lve=wi&&wi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&$ve(e,t,r);return Fve(e,t),e};wi.__esModule=!0;wi.BorshSerializer=void 0;var jve=Gv(),Uve=YA(),Io=Lve(ZA()),Dve=(function(){function t(e){this.encoded=new Uve.EncodeBuffer,this.fieldPath=["value"],this.checkTypes=e}return t.prototype.encode=function(e,r){return this.encode_value(e,r),this.encoded.get_used_buffer()},t.prototype.encode_value=function(e,r){if(typeof r=="string"){if(jve.integers.includes(r))return this.encode_integer(e,r);if(r==="string")return this.encode_string(e);if(r==="bool")return this.encode_boolean(e)}if(typeof r=="object"){if("option"in r)return this.encode_option(e,r);if("enum"in r)return this.encode_enum(e,r);if("array"in r)return this.encode_array(e,r);if("set"in r)return this.encode_set(e,r);if("map"in r)return this.encode_map(e,r);if("struct"in r)return this.encode_struct(e,r)}},t.prototype.encode_integer=function(e,r){var n=parseInt(r.substring(1));n<=32||r=="f64"?(this.checkTypes&&Io.expect_type(e,"number",this.fieldPath),this.encoded.store_value(e,r)):(this.checkTypes&&Io.expect_bigint(e,this.fieldPath),this.encode_bigint(BigInt(e),n))},t.prototype.encode_bigint=function(e,r){for(var n=r/8,o=new Uint8Array(n),i=0;i<n;i++)o[i]=Number(e&BigInt(255)),e=e>>BigInt(8);this.encoded.store_bytes(new Uint8Array(o))},t.prototype.encode_string=function(e){this.checkTypes&&Io.expect_type(e,"string",this.fieldPath);for(var r=e,n=[],o=0;o<r.length;o++){var i=r.charCodeAt(o);i<128?n.push(i):i<2048?n.push(192|i>>6,128|i&63):i<55296||i>=57344?n.push(224|i>>12,128|i>>6&63,128|i&63):(o++,i=65536+((i&1023)<<10|r.charCodeAt(o)&1023),n.push(240|i>>18,128|i>>12&63,128|i>>6&63,128|i&63))}this.encoded.store_value(n.length,"u32"),this.encoded.store_bytes(new Uint8Array(n))},t.prototype.encode_boolean=function(e){this.checkTypes&&Io.expect_type(e,"boolean",this.fieldPath),this.encoded.store_value(e?1:0,"u8")},t.prototype.encode_option=function(e,r){e==null?this.encoded.store_value(0,"u8"):(this.encoded.store_value(1,"u8"),this.encode_value(e,r.option))},t.prototype.encode_enum=function(e,r){this.checkTypes&&Io.expect_enum(e,this.fieldPath);for(var n=Object.keys(e)[0],o=0;o<r.enum.length;o++){var i=r.enum[o];if(n===Object.keys(i.struct)[0])return this.encoded.store_value(o,"u8"),this.encode_struct(e,i)}throw new Error("Enum key (".concat(n,") not found in enum schema: ").concat(JSON.stringify(r)," at ").concat(this.fieldPath.join(".")))},t.prototype.encode_array=function(e,r){if(Io.isArrayLike(e))return this.encode_arraylike(e,r);if(e instanceof ArrayBuffer)return this.encode_buffer(e,r);throw new Error("Expected Array-like not ".concat(typeof e,"(").concat(e,") at ").concat(this.fieldPath.join(".")))},t.prototype.encode_arraylike=function(e,r){r.array.len?Io.expect_same_size(e.length,r.array.len,this.fieldPath):this.encoded.store_value(e.length,"u32");for(var n=0;n<e.length;n++)this.encode_value(e[n],r.array.type)},t.prototype.encode_buffer=function(e,r){r.array.len?Io.expect_same_size(e.byteLength,r.array.len,this.fieldPath):this.encoded.store_value(e.byteLength,"u32"),this.encoded.store_bytes(new Uint8Array(e))},t.prototype.encode_set=function(e,r){this.checkTypes&&Io.expect_type(e,"object",this.fieldPath);var n=e instanceof Set,o=n?Array.from(e.values()):Object.values(e);this.encoded.store_value(o.length,"u32");for(var i=0,a=o;i<a.length;i++){var s=a[i];this.encode_value(s,r.set)}},t.prototype.encode_map=function(e,r){this.checkTypes&&Io.expect_type(e,"object",this.fieldPath);var n=e instanceof Map,o=n?Array.from(e.keys()):Object.keys(e);this.encoded.store_value(o.length,"u32");for(var i=0,a=o;i<a.length;i++){var s=a[i];this.encode_value(s,r.map.key),this.encode_value(n?e.get(s):e[s],r.map.value)}},t.prototype.encode_struct=function(e,r){this.checkTypes&&Io.expect_type(e,"object",this.fieldPath);for(var n=0,o=Object.keys(r.struct);n<o.length;n++){var i=o[n];this.fieldPath.push(i),this.encode_value(e[i],r.struct[i]),this.fieldPath.pop()}},t})();wi.BorshSerializer=Dve});var Uz=G(Wv=>{"use strict";Wv.__esModule=!0;Wv.BorshDeserializer=void 0;var zve=Gv(),Kve=YA(),qve=(function(){function t(e){this.buffer=new Kve.DecodeBuffer(e)}return t.prototype.decode=function(e){return this.decode_value(e)},t.prototype.decode_value=function(e){if(typeof e=="string"){if(zve.integers.includes(e))return this.decode_integer(e);if(e==="string")return this.decode_string();if(e==="bool")return this.decode_boolean()}if(typeof e=="object"){if("option"in e)return this.decode_option(e);if("enum"in e)return this.decode_enum(e);if("array"in e)return this.decode_array(e);if("set"in e)return this.decode_set(e);if("map"in e)return this.decode_map(e);if("struct"in e)return this.decode_struct(e)}throw new Error("Unsupported type: ".concat(e))},t.prototype.decode_integer=function(e){var r=parseInt(e.substring(1));return r<=32||e=="f64"?this.buffer.consume_value(e):this.decode_bigint(r,e.startsWith("i"))},t.prototype.decode_bigint=function(e,r){r===void 0&&(r=!1);var n=e/8,o=new Uint8Array(this.buffer.consume_bytes(n)),i=o.reduceRight(function(a,s){return a+s.toString(16).padStart(2,"0")},"");return r&&o[n-1]?BigInt.asIntN(e,BigInt("0x".concat(i))):BigInt("0x".concat(i))},t.prototype.decode_string=function(){for(var e=this.decode_integer("u32"),r=new Uint8Array(this.buffer.consume_bytes(e)),n=[],o=0;o<e;++o){var i=r[o];if(i<128)n.push(i);else if(i<224)n.push((i&31)<<6|r[++o]&63);else if(i<240)n.push((i&15)<<12|(r[++o]&63)<<6|r[++o]&63);else{var a=(i&7)<<18|(r[++o]&63)<<12|(r[++o]&63)<<6|r[++o]&63;n.push(a)}}return String.fromCodePoint.apply(String,n)},t.prototype.decode_boolean=function(){return this.buffer.consume_value("u8")>0},t.prototype.decode_option=function(e){var r=this.buffer.consume_value("u8");if(r===1)return this.decode_value(e.option);if(r!==0)throw new Error("Invalid option ".concat(r));return null},t.prototype.decode_enum=function(e){var r,n=this.buffer.consume_value("u8");if(n>e.enum.length)throw new Error("Enum option ".concat(n," is not available"));var o=e.enum[n].struct,i=Object.keys(o)[0];return r={},r[i]=this.decode_value(o[i]),r},t.prototype.decode_array=function(e){for(var r=[],n=e.array.len?e.array.len:this.decode_integer("u32"),o=0;o<n;++o)r.push(this.decode_value(e.array.type));return r},t.prototype.decode_set=function(e){for(var r=this.decode_integer("u32"),n=new Set,o=0;o<r;++o)n.add(this.decode_value(e.set));return n},t.prototype.decode_map=function(e){for(var r=this.decode_integer("u32"),n=new Map,o=0;o<r;++o){var i=this.decode_value(e.map.key),a=this.decode_value(e.map.value);n.set(i,a)}return n},t.prototype.decode_struct=function(e){var r={};for(var n in e.struct)r[n]=this.decode_value(e.struct[n]);return r},t})();Wv.BorshDeserializer=qve});var zz=G(Hn=>{"use strict";var Hve=Hn&&Hn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Gve=Hn&&Hn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Wve=Hn&&Hn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Hve(e,t,r);return Gve(e,t),e};Hn.__esModule=!0;Hn.deserialize=Hn.serialize=void 0;var Vve=jz(),Yve=Uz(),Dz=Wve(ZA());function Zve(t,e,r){r===void 0&&(r=!0),r&&Dz.validate_schema(t);var n=new Vve.BorshSerializer(r);return n.encode(e,t)}Hn.serialize=Zve;function Jve(t,e,r){r===void 0&&(r=!0),r&&Dz.validate_schema(t);var n=new Yve.BorshDeserializer(e);return n.decode(t)}Hn.deserialize=Jve});var Kz=G(($nt,Vv)=>{(function(){"use strict";var t="input is invalid type",e=typeof window=="object",r=e?window:{};r.JS_SHA256_NO_WINDOW&&(e=!1);var n=!e&&typeof self=="object",o=!r.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node&&process.type!="renderer";o?r=globalThis:n&&(r=self);var i=!r.JS_SHA256_NO_COMMON_JS&&typeof Vv=="object"&&Vv.exports,a=typeof define=="function"&&define.amd,s=!r.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",c="0123456789abcdef".split(""),u=[-2147483648,8388608,32768,128],f=[24,16,8,0],l=[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],h=["hex","array","digest","arrayBuffer"],m=[];(r.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(T){return Object.prototype.toString.call(T)==="[object Array]"}),s&&(r.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(T){return typeof T=="object"&&T.buffer&&T.buffer.constructor===ArrayBuffer});var x=function(T,M){return function($){return new B(M,!0).update($)[T]()}},S=function(T){var M=x("hex",T);o&&(M=O(M,T)),M.create=function(){return new B(T)},M.update=function(v){return M.create().update(v)};for(var $=0;$<h.length;++$){var k=h[$];M[k]=x(k,T)}return M},O=function(T){return T},P=function(T,M){return function($,k){return new R($,M,!0).update(k)[T]()}},F=function(T){var M=P("hex",T);M.create=function(v){return new R(v,T)},M.update=function(v,d){return M.create(v).update(d)};for(var $=0;$<h.length;++$){var k=h[$];M[k]=P(k,T)}return M};function B(T,M){M?(m[0]=m[16]=m[1]=m[2]=m[3]=m[4]=m[5]=m[6]=m[7]=m[8]=m[9]=m[10]=m[11]=m[12]=m[13]=m[14]=m[15]=0,this.blocks=m):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],T?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=T}B.prototype.update=function(T){if(!this.finalized){var M,$=typeof T;if($!=="string"){if($==="object"){if(T===null)throw new Error(t);if(s&&T.constructor===ArrayBuffer)T=new Uint8Array(T);else if(!Array.isArray(T)&&(!s||!ArrayBuffer.isView(T)))throw new Error(t)}else throw new Error(t);M=!0}for(var k,v=0,d,y=T.length,b=this.blocks;v<y;){if(this.hashed&&(this.hashed=!1,b[0]=this.block,this.block=b[16]=b[1]=b[2]=b[3]=b[4]=b[5]=b[6]=b[7]=b[8]=b[9]=b[10]=b[11]=b[12]=b[13]=b[14]=b[15]=0),M)for(d=this.start;v<y&&d<64;++v)b[d>>>2]|=T[v]<<f[d++&3];else for(d=this.start;v<y&&d<64;++v)k=T.charCodeAt(v),k<128?b[d>>>2]|=k<<f[d++&3]:k<2048?(b[d>>>2]|=(192|k>>>6)<<f[d++&3],b[d>>>2]|=(128|k&63)<<f[d++&3]):k<55296||k>=57344?(b[d>>>2]|=(224|k>>>12)<<f[d++&3],b[d>>>2]|=(128|k>>>6&63)<<f[d++&3],b[d>>>2]|=(128|k&63)<<f[d++&3]):(k=65536+((k&1023)<<10|T.charCodeAt(++v)&1023),b[d>>>2]|=(240|k>>>18)<<f[d++&3],b[d>>>2]|=(128|k>>>12&63)<<f[d++&3],b[d>>>2]|=(128|k>>>6&63)<<f[d++&3],b[d>>>2]|=(128|k&63)<<f[d++&3]);this.lastByteIndex=d,this.bytes+=d-this.start,d>=64?(this.block=b[16],this.start=d-64,this.hash(),this.hashed=!0):this.start=d}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},B.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var T=this.blocks,M=this.lastByteIndex;T[16]=this.block,T[M>>>2]|=u[M&3],this.block=T[16],M>=56&&(this.hashed||this.hash(),T[0]=this.block,T[16]=T[1]=T[2]=T[3]=T[4]=T[5]=T[6]=T[7]=T[8]=T[9]=T[10]=T[11]=T[12]=T[13]=T[14]=T[15]=0),T[14]=this.hBytes<<3|this.bytes>>>29,T[15]=this.bytes<<3,this.hash()}},B.prototype.hash=function(){var T=this.h0,M=this.h1,$=this.h2,k=this.h3,v=this.h4,d=this.h5,y=this.h6,b=this.h7,g=this.blocks,A,E,w,_,p,I,C,j,U,D,z;for(A=16;A<64;++A)p=g[A-15],E=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3,p=g[A-2],w=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,g[A]=g[A-16]+E+g[A-7]+w<<0;for(z=M&$,A=0;A<64;A+=4)this.first?(this.is224?(j=300032,p=g[0]-1413257819,b=p-150054599<<0,k=p+24177077<<0):(j=704751109,p=g[0]-210244248,b=p-1521486534<<0,k=p+143694565<<0),this.first=!1):(E=(T>>>2|T<<30)^(T>>>13|T<<19)^(T>>>22|T<<10),w=(v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7),j=T&M,_=j^T&$^z,C=v&d^~v&y,p=b+w+C+l[A]+g[A],I=E+_,b=k+p<<0,k=p+I<<0),E=(k>>>2|k<<30)^(k>>>13|k<<19)^(k>>>22|k<<10),w=(b>>>6|b<<26)^(b>>>11|b<<21)^(b>>>25|b<<7),U=k&T,_=U^k&M^j,C=b&v^~b&d,p=y+w+C+l[A+1]+g[A+1],I=E+_,y=$+p<<0,$=p+I<<0,E=($>>>2|$<<30)^($>>>13|$<<19)^($>>>22|$<<10),w=(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7),D=$&k,_=D^$&T^U,C=y&b^~y&v,p=d+w+C+l[A+2]+g[A+2],I=E+_,d=M+p<<0,M=p+I<<0,E=(M>>>2|M<<30)^(M>>>13|M<<19)^(M>>>22|M<<10),w=(d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7),z=M&$,_=z^M&k^D,C=d&y^~d&b,p=v+w+C+l[A+3]+g[A+3],I=E+_,v=T+p<<0,T=p+I<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+T<<0,this.h1=this.h1+M<<0,this.h2=this.h2+$<<0,this.h3=this.h3+k<<0,this.h4=this.h4+v<<0,this.h5=this.h5+d<<0,this.h6=this.h6+y<<0,this.h7=this.h7+b<<0},B.prototype.hex=function(){this.finalize();var T=this.h0,M=this.h1,$=this.h2,k=this.h3,v=this.h4,d=this.h5,y=this.h6,b=this.h7,g=c[T>>>28&15]+c[T>>>24&15]+c[T>>>20&15]+c[T>>>16&15]+c[T>>>12&15]+c[T>>>8&15]+c[T>>>4&15]+c[T&15]+c[M>>>28&15]+c[M>>>24&15]+c[M>>>20&15]+c[M>>>16&15]+c[M>>>12&15]+c[M>>>8&15]+c[M>>>4&15]+c[M&15]+c[$>>>28&15]+c[$>>>24&15]+c[$>>>20&15]+c[$>>>16&15]+c[$>>>12&15]+c[$>>>8&15]+c[$>>>4&15]+c[$&15]+c[k>>>28&15]+c[k>>>24&15]+c[k>>>20&15]+c[k>>>16&15]+c[k>>>12&15]+c[k>>>8&15]+c[k>>>4&15]+c[k&15]+c[v>>>28&15]+c[v>>>24&15]+c[v>>>20&15]+c[v>>>16&15]+c[v>>>12&15]+c[v>>>8&15]+c[v>>>4&15]+c[v&15]+c[d>>>28&15]+c[d>>>24&15]+c[d>>>20&15]+c[d>>>16&15]+c[d>>>12&15]+c[d>>>8&15]+c[d>>>4&15]+c[d&15]+c[y>>>28&15]+c[y>>>24&15]+c[y>>>20&15]+c[y>>>16&15]+c[y>>>12&15]+c[y>>>8&15]+c[y>>>4&15]+c[y&15];return this.is224||(g+=c[b>>>28&15]+c[b>>>24&15]+c[b>>>20&15]+c[b>>>16&15]+c[b>>>12&15]+c[b>>>8&15]+c[b>>>4&15]+c[b&15]),g},B.prototype.toString=B.prototype.hex,B.prototype.digest=function(){this.finalize();var T=this.h0,M=this.h1,$=this.h2,k=this.h3,v=this.h4,d=this.h5,y=this.h6,b=this.h7,g=[T>>>24&255,T>>>16&255,T>>>8&255,T&255,M>>>24&255,M>>>16&255,M>>>8&255,M&255,$>>>24&255,$>>>16&255,$>>>8&255,$&255,k>>>24&255,k>>>16&255,k>>>8&255,k&255,v>>>24&255,v>>>16&255,v>>>8&255,v&255,d>>>24&255,d>>>16&255,d>>>8&255,d&255,y>>>24&255,y>>>16&255,y>>>8&255,y&255];return this.is224||g.push(b>>>24&255,b>>>16&255,b>>>8&255,b&255),g},B.prototype.array=B.prototype.digest,B.prototype.arrayBuffer=function(){this.finalize();var T=new ArrayBuffer(this.is224?28:32),M=new DataView(T);return M.setUint32(0,this.h0),M.setUint32(4,this.h1),M.setUint32(8,this.h2),M.setUint32(12,this.h3),M.setUint32(16,this.h4),M.setUint32(20,this.h5),M.setUint32(24,this.h6),this.is224||M.setUint32(28,this.h7),T};function R(T,M,$){var k,v=typeof T;if(v==="string"){var d=[],y=T.length,b=0,g;for(k=0;k<y;++k)g=T.charCodeAt(k),g<128?d[b++]=g:g<2048?(d[b++]=192|g>>>6,d[b++]=128|g&63):g<55296||g>=57344?(d[b++]=224|g>>>12,d[b++]=128|g>>>6&63,d[b++]=128|g&63):(g=65536+((g&1023)<<10|T.charCodeAt(++k)&1023),d[b++]=240|g>>>18,d[b++]=128|g>>>12&63,d[b++]=128|g>>>6&63,d[b++]=128|g&63);T=d}else if(v==="object"){if(T===null)throw new Error(t);if(s&&T.constructor===ArrayBuffer)T=new Uint8Array(T);else if(!Array.isArray(T)&&(!s||!ArrayBuffer.isView(T)))throw new Error(t)}else throw new Error(t);T.length>64&&(T=new B(M,!0).update(T).array());var A=[],E=[];for(k=0;k<64;++k){var w=T[k]||0;A[k]=92^w,E[k]=54^w}B.call(this,M,$),this.update(E),this.oKeyPad=A,this.inner=!0,this.sharedMemory=$}R.prototype=new B,R.prototype.finalize=function(){if(B.prototype.finalize.call(this),this.inner){this.inner=!1;var T=this.array();B.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(T),B.prototype.finalize.call(this)}};var L=S();L.sha256=L,L.sha224=S(!0),L.sha256.hmac=F(),L.sha224.hmac=F(!0),i?Vv.exports=L:(r.sha256=L.sha256,r.sha224=L.sha224,a&&define(function(){return L}))})()});var yh=G(El=>{"use strict";Object.defineProperty(El,"__esModule",{value:!0});El.KeySize=El.KeyType=void 0;var qz;(function(t){t[t.ED25519=0]="ED25519",t[t.SECP256K1=1]="SECP256K1"})(qz||(El.KeyType=qz={}));El.KeySize={SECRET_KEY:32,ED25519_PUBLIC_KEY:32,SECP256k1_PUBLIC_KEY:64}});var Zv=G(Yv=>{"use strict";Object.defineProperty(Yv,"__esModule",{value:!0});Yv.KeyPairBase=void 0;var JA=class{};Yv.KeyPairBase=JA});var Hz=G(Jv=>{"use strict";Object.defineProperty(Jv,"__esModule",{value:!0});Jv.DEFAULT_FUNCTION_CALL_GAS=void 0;Jv.DEFAULT_FUNCTION_CALL_GAS=30000000000000n});var Gz=G((Unt,Xve)=>{Xve.exports={GasLimitExceeded:"Exceeded the maximum amount of gas allowed to burn per contract",MethodEmptyName:"Method name is empty",WasmerCompileError:"Wasmer compilation error: {{msg}}",GuestPanic:"Smart contract panicked: {{panic_msg}}",Memory:"Error creating Wasm memory",GasExceeded:"Exceeded the prepaid gas",MethodUTF8Error:"Method name is not valid UTF8 string",BadUTF16:"String encoding is bad UTF-16 sequence",WasmTrap:"WebAssembly trap: {{msg}}",GasInstrumentation:"Gas instrumentation failed or contract has denied instructions.",InvalidPromiseIndex:"{{promise_idx}} does not correspond to existing promises",InvalidPromiseResultIndex:"Accessed invalid promise result index: {{result_idx}}",Deserialization:"Error happened while deserializing the module",MethodNotFound:"Contract method is not found",InvalidRegisterId:"Accessed invalid register id: {{register_id}}",InvalidReceiptIndex:"VM Logic returned an invalid receipt index: {{receipt_index}}",EmptyMethodName:"Method name is empty in contract call",CannotReturnJointPromise:"Returning joint promise is currently prohibited",StackHeightInstrumentation:"Stack instrumentation failed",CodeDoesNotExist:"Cannot find contract code for account {{account_id}}",MethodInvalidSignature:"Invalid method signature",IntegerOverflow:"Integer overflow happened during contract execution",MemoryAccessViolation:"MemoryAccessViolation",InvalidIteratorIndex:"Iterator index {{iterator_index}} does not exist",IteratorWasInvalidated:"Iterator {{iterator_index}} was invalidated after its creation by performing a mutable operation on trie",InvalidAccountId:"VM Logic returned an invalid account id",Serialization:"Error happened while serializing the module",CannotAppendActionToJointPromise:"Actions can only be appended to non-joint promise.",InternalMemoryDeclared:"Internal memory declaration has been found in the module",Instantiate:"Error happened during instantiation",ProhibitedInView:"{{method_name}} is not allowed in view calls",InvalidMethodName:"VM Logic returned an invalid method name",BadUTF8:"String encoding is bad UTF-8 sequence",BalanceExceeded:"Exceeded the account balance",LinkError:"Wasm contract link error: {{msg}}",InvalidPublicKey:"VM Logic provided an invalid public key",ActorNoPermission:"Actor {{actor_id}} doesn't have permission to account {{account_id}} to complete the action",LackBalanceForState:"The account {{account_id}} wouldn't have enough balance to cover storage, required to have {{amount}} yoctoNEAR more",ReceiverMismatch:"Wrong AccessKey used for transaction: transaction is sent to receiver_id={{tx_receiver}}, but is signed with function call access key that restricted to only use with receiver_id={{ak_receiver}}. Either change receiver_id in your transaction or switch to use a FullAccessKey.",CostOverflow:"Transaction gas or balance cost is too high",InvalidSignature:"Transaction is not signed with the given public key",AccessKeyNotFound:`Signer "{{account_id}}" doesn't have access key with the given public_key {{public_key}}`,NotEnoughBalance:"Sender {{signer_id}} does not have enough balance {{#formatNear}}{{balance}}{{/formatNear}} for operation costing {{#formatNear}}{{cost}}{{/formatNear}}",NotEnoughAllowance:"Access Key {account_id}:{public_key} does not have enough balance {{#formatNear}}{{allowance}}{{/formatNear}} for transaction costing {{#formatNear}}{{cost}}{{/formatNear}}",Expired:"Transaction has expired",DeleteAccountStaking:"Account {{account_id}} is staking and can not be deleted",SignerDoesNotExist:"Signer {{signer_id}} does not exist",TriesToStake:"Account {{account_id}} tried to stake {{#formatNear}}{{stake}}{{/formatNear}}, but has staked {{#formatNear}}{{locked}}{{/formatNear}} and only has {{#formatNear}}{{balance}}{{/formatNear}}",AddKeyAlreadyExists:"The public key {{public_key}} is already used for an existing access key",InvalidSigner:"Invalid signer account ID {{signer_id}} according to requirements",CreateAccountNotAllowed:"The new account_id {{account_id}} can't be created by {{predecessor_id}}",RequiresFullAccess:"The transaction contains more then one action, but it was signed with an access key which allows transaction to apply only one specific action. To apply more then one actions TX must be signed with a full access key",TriesToUnstake:"Account {{account_id}} is not yet staked, but tried to unstake",InvalidNonce:"Transaction nonce {{tx_nonce}} must be larger than nonce of the used access key {{ak_nonce}}",AccountAlreadyExists:"Can't create a new account {{account_id}}, because it already exists",InvalidChain:"Transaction parent block hash doesn't belong to the current chain",AccountDoesNotExist:"Can't complete the action because account {{account_id}} doesn't exist",AccessKeyDoesNotExist:"Can't complete the action because access key {{public_key}} doesn't exist",MethodNameMismatch:"Transaction method name {{method_name}} isn't allowed by the access key",DeleteAccountHasRent:"Account {{account_id}} can't be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover the rent",DeleteAccountHasEnoughBalance:"Account {{account_id}} can't be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover it's storage",InvalidReceiver:"Invalid receiver account ID {{receiver_id}} according to requirements",DeleteKeyDoesNotExist:"Account {{account_id}} tries to remove an access key that doesn't exist",Timeout:"Timeout exceeded",Closed:"Connection closed",ShardCongested:"Shard {{shard_id}} rejected the transaction due to congestion level {{congestion_level}}, try again later",ShardStuck:"Shard {{shard_id}} rejected the transaction because it missed {{missed_chunks}} chunks and needs to recover before accepting new transactions, try again later"}});var XA=G(Al=>{"use strict";var Qve=Al&&Al.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Al,"__esModule",{value:!0});Al.ErrorMessages=void 0;var e2e=Qve(Gz());Al.ErrorMessages=e2e.default});var Wz=G(Xv=>{"use strict";Object.defineProperty(Xv,"__esModule",{value:!0});Xv.Assignable=void 0;var QA=class{constructor(e){Object.keys(e).map(r=>{this[r]=e[r]})}};Xv.Assignable=QA});var Vz=G(Qv=>{"use strict";Object.defineProperty(Qv,"__esModule",{value:!0});Qv.Enum=void 0;var e_=class{constructor(e){if(Object.keys(e).length!==1)throw new Error("Enum can only take single value");Object.keys(e).map(r=>{this[r]=e[r]})}};Qv.Enum=e_});var Yz=G(Ei=>{"use strict";Object.defineProperty(Ei,"__esModule",{value:!0});Ei.ErrorContext=Ei.TypedError=Ei.ArgumentTypeError=Ei.PositionalArgsError=void 0;var t_=class extends Error{constructor(){super("Contract method calls expect named arguments wrapped in object, e.g. { argName1: argValue1, argName2: argValue2 }")}};Ei.PositionalArgsError=t_;var r_=class extends Error{constructor(e,r,n){super(`Expected ${r} for '${e}' argument, but got '${JSON.stringify(n)}'`)}};Ei.ArgumentTypeError=r_;var n_=class extends Error{type;context;constructor(e,r,n){super(e),this.type=r||"UntypedError",this.context=n}};Ei.TypedError=n_;var o_=class{transactionHash;constructor(e){this.transactionHash=e}};Ei.ErrorContext=o_});var Jz=G(e2=>{"use strict";Object.defineProperty(e2,"__esModule",{value:!0});e2.IdType=void 0;var Zz;(function(t){t.Transaction="transaction",t.Receipt="receipt"})(Zz||(e2.IdType=Zz={}))});var eK=G(_l=>{"use strict";Object.defineProperty(_l,"__esModule",{value:!0});_l.FinalExecutionStatusBasic=_l.ExecutionStatusBasic=void 0;var Xz;(function(t){t.Unknown="Unknown",t.Pending="Pending",t.Failure="Failure"})(Xz||(_l.ExecutionStatusBasic=Xz={}));var Qz;(function(t){t.NotStarted="NotStarted",t.Started="Started",t.Failure="Failure"})(Qz||(_l.FinalExecutionStatusBasic=Qz={}))});var rK=G(Us=>{"use strict";Object.defineProperty(Us,"__esModule",{value:!0});Us.FinalExecutionStatusBasic=Us.ExecutionStatusBasic=Us.IdType=void 0;var t2e=Jz();Object.defineProperty(Us,"IdType",{enumerable:!0,get:function(){return t2e.IdType}});var tK=eK();Object.defineProperty(Us,"ExecutionStatusBasic",{enumerable:!0,get:function(){return tK.ExecutionStatusBasic}});Object.defineProperty(Us,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return tK.FinalExecutionStatusBasic}})});var nK=G(Ai=>{"use strict";var r2e=Ai&&Ai.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),t2=Ai&&Ai.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&r2e(e,t,r)};Object.defineProperty(Ai,"__esModule",{value:!0});t2(Wz(),Ai);t2(Vz(),Ai);t2(Yz(),Ai);t2(rK(),Ai)});var bK=G(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.bytes=te.stringToBytes=te.str=te.bytesToString=te.hex=te.utf8=te.bech32m=te.bech32=te.base58check=te.createBase58check=te.base58xmr=te.base58xrp=te.base58flickr=te.base58=te.base64urlnopad=te.base64url=te.base64nopad=te.base64=te.base32crockford=te.base32hexnopad=te.base32hex=te.base32nopad=te.base32=te.base16=te.utils=void 0;function wf(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function s_(t,...e){if(!wf(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function cK(t,e){return Array.isArray(e)?e.length===0?!0:t?e.every(r=>typeof r=="string"):e.every(r=>Number.isSafeInteger(r)):!1}function c_(t){if(typeof t!="function")throw new Error("function expected");return!0}function Ds(t,e){if(typeof e!="string")throw new Error(`${t}: string expected`);return!0}function Sl(t){if(!Number.isSafeInteger(t))throw new Error(`invalid integer: ${t}`)}function n2(t){if(!Array.isArray(t))throw new Error("array expected")}function o2(t,e){if(!cK(!0,e))throw new Error(`${t}: array of strings expected`)}function f_(t,e){if(!cK(!1,e))throw new Error(`${t}: array of numbers expected`)}function Tr(...t){let e=i=>i,r=(i,a)=>s=>i(a(s)),n=t.map(i=>i.encode).reduceRight(r,e),o=t.map(i=>i.decode).reduce(r,e);return{encode:n,decode:o}}function Yr(t){let e=typeof t=="string"?t.split(""):t,r=e.length;o2("alphabet",e);let n=new Map(e.map((o,i)=>[o,i]));return{encode:o=>(n2(o),o.map(i=>{if(!Number.isSafeInteger(i)||i<0||i>=r)throw new Error(`alphabet.encode: digit index outside alphabet "${i}". Allowed: ${t}`);return e[i]})),decode:o=>(n2(o),o.map(i=>{Ds("alphabet.decode",i);let a=n.get(i);if(a===void 0)throw new Error(`Unknown letter: "${i}". Allowed: ${t}`);return a}))}}function Zr(t=""){return Ds("join",t),{encode:e=>(o2("join.decode",e),e.join(t)),decode:e=>(Ds("join.decode",e),e.split(t))}}function gh(t,e="="){return Sl(t),Ds("padding",e),{encode(r){for(o2("padding.encode",r);r.length*t%8;)r.push(e);return r},decode(r){o2("padding.decode",r);let n=r.length;if(n*t%8)throw new Error("padding: invalid, string should have whole number of bytes");for(;n>0&&r[n-1]===e;n--)if((n-1)*t%8===0)throw new Error("padding: invalid, string has too much padding");return r.slice(0,n)}}}function fK(t){return c_(t),{encode:e=>e,decode:e=>t(e)}}function i_(t,e,r){if(e<2)throw new Error(`convertRadix: invalid from=${e}, base cannot be less than 2`);if(r<2)throw new Error(`convertRadix: invalid to=${r}, base cannot be less than 2`);if(n2(t),!t.length)return[];let n=0,o=[],i=Array.from(t,s=>{if(Sl(s),s<0||s>=e)throw new Error(`invalid integer: ${s}`);return s}),a=i.length;for(;;){let s=0,c=!0;for(let u=n;u<a;u++){let f=i[u],l=e*s,h=l+f;if(!Number.isSafeInteger(h)||l/e!==s||h-f!==l)throw new Error("convertRadix: carry overflow");let m=h/r;s=h%r;let x=Math.floor(m);if(i[u]=x,!Number.isSafeInteger(x)||x*r+s!==h)throw new Error("convertRadix: carry overflow");if(c)x?c=!1:n=u;else continue}if(o.push(s),c)break}for(let s=0;s<t.length-1&&t[s]===0;s++)o.push(0);return o.reverse()}var uK=(t,e)=>e===0?t:uK(e,t%e),i2=(t,e)=>t+(e-uK(t,e)),r2=(()=>{let t=[];for(let e=0;e<40;e++)t.push(2**e);return t})();function a2(t,e,r,n){if(n2(t),e<=0||e>32)throw new Error(`convertRadix2: wrong from=${e}`);if(r<=0||r>32)throw new Error(`convertRadix2: wrong to=${r}`);if(i2(e,r)>32)throw new Error(`convertRadix2: carry overflow from=${e} to=${r} carryBits=${i2(e,r)}`);let o=0,i=0,a=r2[e],s=r2[r]-1,c=[];for(let u of t){if(Sl(u),u>=a)throw new Error(`convertRadix2: invalid data word=${u} from=${e}`);if(o=o<<e|u,i+e>32)throw new Error(`convertRadix2: carry overflow pos=${i} from=${e}`);for(i+=e;i>=r;i-=r)c.push((o>>i-r&s)>>>0);let f=r2[i];if(f===void 0)throw new Error("invalid carry");o&=f-1}if(o=o<<r-i&s,!n&&i>=e)throw new Error("Excess padding");if(!n&&o>0)throw new Error(`Non-zero padding: ${o}`);return n&&i>0&&c.push(o>>>0),c}function dK(t){Sl(t);let e=2**8;return{encode:r=>{if(!wf(r))throw new Error("radix.encode input should be Uint8Array");return i_(Array.from(r),e,t)},decode:r=>(f_("radix.decode",r),Uint8Array.from(i_(r,t,e)))}}function En(t,e=!1){if(Sl(t),t<=0||t>32)throw new Error("radix2: bits should be in (0..32]");if(i2(8,t)>32||i2(t,8)>32)throw new Error("radix2: carry overflow");return{encode:r=>{if(!wf(r))throw new Error("radix2.encode input should be Uint8Array");return a2(Array.from(r),8,t,!e)},decode:r=>(f_("radix2.decode",r),Uint8Array.from(a2(r,t,8,e)))}}function oK(t){return c_(t),function(...e){try{return t.apply(null,e)}catch{}}}function lK(t,e){return Sl(t),c_(e),{encode(r){if(!wf(r))throw new Error("checksum.encode: input should be Uint8Array");let n=e(r).slice(0,t),o=new Uint8Array(r.length+t);return o.set(r),o.set(n,r.length),o},decode(r){if(!wf(r))throw new Error("checksum.decode: input should be Uint8Array");let n=r.slice(0,-t),o=r.slice(-t),i=e(n).slice(0,t);for(let a=0;a<t;a++)if(i[a]!==o[a])throw new Error("Invalid checksum");return n}}}te.utils={alphabet:Yr,chain:Tr,checksum:lK,convertRadix:i_,convertRadix2:a2,radix:dK,radix2:En,join:Zr,padding:gh};te.base16=Tr(En(4),Yr("0123456789ABCDEF"),Zr(""));te.base32=Tr(En(5),Yr("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),gh(5),Zr(""));te.base32nopad=Tr(En(5),Yr("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),Zr(""));te.base32hex=Tr(En(5),Yr("0123456789ABCDEFGHIJKLMNOPQRSTUV"),gh(5),Zr(""));te.base32hexnopad=Tr(En(5),Yr("0123456789ABCDEFGHIJKLMNOPQRSTUV"),Zr(""));te.base32crockford=Tr(En(5),Yr("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),Zr(""),fK(t=>t.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1")));var pK=typeof Uint8Array.from([]).toBase64=="function"&&typeof Uint8Array.fromBase64=="function",hK=(t,e)=>{Ds("base64",t);let r=e?/^[A-Za-z0-9=_-]+$/:/^[A-Za-z0-9=+/]+$/,n=e?"base64url":"base64";if(t.length>0&&!r.test(t))throw new Error("invalid base64");return Uint8Array.fromBase64(t,{alphabet:n,lastChunkHandling:"strict"})};te.base64=pK?{encode(t){return s_(t),t.toBase64()},decode(t){return hK(t,!1)}}:Tr(En(6),Yr("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),gh(6),Zr(""));te.base64nopad=Tr(En(6),Yr("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),Zr(""));te.base64url=pK?{encode(t){return s_(t),t.toBase64({alphabet:"base64url"})},decode(t){return hK(t,!0)}}:Tr(En(6),Yr("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),gh(6),Zr(""));te.base64urlnopad=Tr(En(6),Yr("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),Zr(""));var u_=t=>Tr(dK(58),Yr(t),Zr(""));te.base58=u_("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");te.base58flickr=u_("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ");te.base58xrp=u_("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");var iK=[0,2,3,5,6,7,9,10,11];te.base58xmr={encode(t){let e="";for(let r=0;r<t.length;r+=8){let n=t.subarray(r,r+8);e+=te.base58.encode(n).padStart(iK[n.length],"1")}return e},decode(t){let e=[];for(let r=0;r<t.length;r+=11){let n=t.slice(r,r+11),o=iK.indexOf(n.length),i=te.base58.decode(n);for(let a=0;a<i.length-o;a++)if(i[a]!==0)throw new Error("base58xmr: wrong padding");e=e.concat(Array.from(i.slice(i.length-o)))}return Uint8Array.from(e)}};var n2e=t=>Tr(lK(4,e=>t(t(e))),te.base58);te.createBase58check=n2e;te.base58check=te.createBase58check;var a_=Tr(Yr("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),Zr("")),aK=[996825010,642813549,513874426,1027748829,705979059];function bh(t){let e=t>>25,r=(t&33554431)<<5;for(let n=0;n<aK.length;n++)(e>>n&1)===1&&(r^=aK[n]);return r}function sK(t,e,r=1){let n=t.length,o=1;for(let i=0;i<n;i++){let a=t.charCodeAt(i);if(a<33||a>126)throw new Error(`Invalid prefix (${t})`);o=bh(o)^a>>5}o=bh(o);for(let i=0;i<n;i++)o=bh(o)^t.charCodeAt(i)&31;for(let i of e)o=bh(o)^i;for(let i=0;i<6;i++)o=bh(o);return o^=r,a_.encode(a2([o%r2[30]],30,5,!1))}function mK(t){let e=t==="bech32"?1:734539939,r=En(5),n=r.decode,o=r.encode,i=oK(n);function a(l,h,m=90){Ds("bech32.encode prefix",l),wf(h)&&(h=Array.from(h)),f_("bech32.encode",h);let x=l.length;if(x===0)throw new TypeError(`Invalid prefix length ${x}`);let S=x+7+h.length;if(m!==!1&&S>m)throw new TypeError(`Length ${S} exceeds limit ${m}`);let O=l.toLowerCase(),P=sK(O,h,e);return`${O}1${a_.encode(h)}${P}`}function s(l,h=90){Ds("bech32.decode input",l);let m=l.length;if(m<8||h!==!1&&m>h)throw new TypeError(`invalid string length: ${m} (${l}). Expected (8..${h})`);let x=l.toLowerCase();if(l!==x&&l!==l.toUpperCase())throw new Error("String must be lowercase or uppercase");let S=x.lastIndexOf("1");if(S===0||S===-1)throw new Error('Letter "1" must be present between prefix and data only');let O=x.slice(0,S),P=x.slice(S+1);if(P.length<6)throw new Error("Data must be at least 6 characters long");let F=a_.decode(P).slice(0,-6),B=sK(O,F,e);if(!P.endsWith(B))throw new Error(`Invalid checksum in ${l}: expected "${B}"`);return{prefix:O,words:F}}let c=oK(s);function u(l){let{prefix:h,words:m}=s(l,!1);return{prefix:h,words:m,bytes:n(m)}}function f(l,h){return a(l,o(h))}return{encode:a,decode:s,encodeFromBytes:f,decodeToBytes:u,decodeUnsafe:c,fromWords:n,fromWordsUnsafe:i,toWords:o}}te.bech32=mK("bech32");te.bech32m=mK("bech32m");te.utf8={encode:t=>new TextDecoder().decode(t),decode:t=>new TextEncoder().encode(t)};var o2e=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",i2e={encode(t){return s_(t),t.toHex()},decode(t){return Ds("hex",t),Uint8Array.fromHex(t)}};te.hex=o2e?i2e:Tr(En(4),Yr("0123456789abcdef"),Zr(""),fK(t=>{if(typeof t!="string"||t.length%2!==0)throw new TypeError(`hex.decode: expected string, got ${typeof t} with length ${t.length}`);return t.toLowerCase()}));var s2={utf8:te.utf8,hex:te.hex,base16:te.base16,base32:te.base32,base64:te.base64,base64url:te.base64url,base58:te.base58,base58xmr:te.base58xmr},yK="Invalid encoding type. Available types: utf8, hex, base16, base32, base64, base64url, base58, base58xmr",a2e=(t,e)=>{if(typeof t!="string"||!s2.hasOwnProperty(t))throw new TypeError(yK);if(!wf(e))throw new TypeError("bytesToString() expects Uint8Array");return s2[t].encode(e)};te.bytesToString=a2e;te.str=te.bytesToString;var s2e=(t,e)=>{if(!s2.hasOwnProperty(t))throw new TypeError(yK);if(typeof e!="string")throw new TypeError("stringToBytes() expects string");return s2[t].decode(e)};te.stringToBytes=s2e;te.bytes=te.stringToBytes});var d_=G(We=>{"use strict";Object.defineProperty(We,"__esModule",{value:!0});We.baseDecode=We.baseEncode=We.parseNearAmount=We.formatNearAmount=We.NEAR_NOMINATION=We.NEAR_NOMINATION_EXP=void 0;var gK=bK();We.NEAR_NOMINATION_EXP=24;We.NEAR_NOMINATION=10n**BigInt(We.NEAR_NOMINATION_EXP);var vK=[],c2e=10n;for(let t=0,e=5n;t<We.NEAR_NOMINATION_EXP;t++,e=e*c2e)vK[t]=e;function f2e(t,e=We.NEAR_NOMINATION_EXP){let r=BigInt(t);if(e!==We.NEAR_NOMINATION_EXP){let i=We.NEAR_NOMINATION_EXP-e-1;i>0&&(r+=vK[i])}t=r.toString();let n=t.substring(0,t.length-We.NEAR_NOMINATION_EXP)||"0",o=t.substring(t.length-We.NEAR_NOMINATION_EXP).padStart(We.NEAR_NOMINATION_EXP,"0").substring(0,e);return l2e(`${h2e(n)}.${o}`)}We.formatNearAmount=f2e;function u2e(t){if(!t)return null;t=d2e(t);let e=t.split("."),r=e[0],n=e[1]||"";if(e.length>2||n.length>We.NEAR_NOMINATION_EXP)throw new Error(`Cannot parse '${t}' as NEAR amount`);return p2e(r+n.padEnd(We.NEAR_NOMINATION_EXP,"0"))}We.parseNearAmount=u2e;function d2e(t){return t.replace(/,/g,"").trim()}function l2e(t){return t.replace(/\.?0*$/,"")}function p2e(t){return t=t.replace(/^0+/,""),t===""?"0":t}function h2e(t){let e=/(-?\d+)(\d{3})/;for(;e.test(t);)t=t.replace(e,"$1,$2");return t}function m2e(t){if(typeof t=="string"){let e=[];for(let r=0;r<t.length;r++)e.push(t.charCodeAt(r));t=new Uint8Array(e)}return gK.base58.encode(t)}We.baseEncode=m2e;function y2e(t){return gK.base58.decode(t)}We.baseDecode=y2e});var xK=G((Jnt,b2e)=>{b2e.exports={schema:{AccessKeyNotFound:{name:"AccessKeyNotFound",subtypes:[],props:{account_id:"",public_key:""}},AccountAlreadyExists:{name:"AccountAlreadyExists",subtypes:[],props:{account_id:""}},AccountDoesNotExist:{name:"AccountDoesNotExist",subtypes:[],props:{account_id:""}},ActionError:{name:"ActionError",subtypes:["AccountAlreadyExists","AccountDoesNotExist","CreateAccountOnlyByRegistrar","CreateAccountNotAllowed","ActorNoPermission","DeleteKeyDoesNotExist","AddKeyAlreadyExists","DeleteAccountStaking","LackBalanceForState","TriesToUnstake","TriesToStake","InsufficientStake","FunctionCallError","NewReceiptValidationError","OnlyImplicitAccountCreationAllowed","DeleteAccountWithLargeState","DelegateActionInvalidSignature","DelegateActionSenderDoesNotMatchTxReceiver","DelegateActionExpired","DelegateActionAccessKeyError","DelegateActionInvalidNonce","DelegateActionNonceTooLarge"],props:{index:""}},ActionsValidationError:{name:"ActionsValidationError",subtypes:["DeleteActionMustBeFinal","TotalPrepaidGasExceeded","TotalNumberOfActionsExceeded","AddKeyMethodNamesNumberOfBytesExceeded","AddKeyMethodNameLengthExceeded","IntegerOverflow","InvalidAccountId","ContractSizeExceeded","FunctionCallMethodNameLengthExceeded","FunctionCallArgumentsLengthExceeded","UnsuitableStakingKey","FunctionCallZeroAttachedGas","DelegateActionMustBeOnlyOne","UnsupportedProtocolFeature"],props:{}},ActorNoPermission:{name:"ActorNoPermission",subtypes:[],props:{account_id:"",actor_id:""}},AddKeyAlreadyExists:{name:"AddKeyAlreadyExists",subtypes:[],props:{account_id:"",public_key:""}},AddKeyMethodNameLengthExceeded:{name:"AddKeyMethodNameLengthExceeded",subtypes:[],props:{length:"",limit:""}},AddKeyMethodNamesNumberOfBytesExceeded:{name:"AddKeyMethodNamesNumberOfBytesExceeded",subtypes:[],props:{limit:"",total_number_of_bytes:""}},AltBn128InvalidInput:{name:"AltBn128InvalidInput",subtypes:[],props:{msg:""}},BadUTF16:{name:"BadUTF16",subtypes:[],props:{}},BadUTF8:{name:"BadUTF8",subtypes:[],props:{}},BalanceExceeded:{name:"BalanceExceeded",subtypes:[],props:{}},BalanceMismatchError:{name:"BalanceMismatchError",subtypes:[],props:{final_accounts_balance:"",final_postponed_receipts_balance:"",forwarded_buffered_receipts_balance:"",incoming_receipts_balance:"",incoming_validator_rewards:"",initial_accounts_balance:"",initial_postponed_receipts_balance:"",new_buffered_receipts_balance:"",new_delayed_receipts_balance:"",other_burnt_amount:"",outgoing_receipts_balance:"",processed_delayed_receipts_balance:"",slashed_burnt_amount:"",tx_burnt_amount:""}},CallIndirectOOB:{name:"CallIndirectOOB",subtypes:[],props:{}},CannotAppendActionToJointPromise:{name:"CannotAppendActionToJointPromise",subtypes:[],props:{}},CannotReturnJointPromise:{name:"CannotReturnJointPromise",subtypes:[],props:{}},CodeDoesNotExist:{name:"CodeDoesNotExist",subtypes:[],props:{account_id:""}},CompilationError:{name:"CompilationError",subtypes:["CodeDoesNotExist","PrepareError","WasmerCompileError"],props:{}},ContractSizeExceeded:{name:"ContractSizeExceeded",subtypes:[],props:{limit:"",size:""}},CostOverflow:{name:"CostOverflow",subtypes:[],props:{}},CreateAccountNotAllowed:{name:"CreateAccountNotAllowed",subtypes:[],props:{account_id:"",predecessor_id:""}},CreateAccountOnlyByRegistrar:{name:"CreateAccountOnlyByRegistrar",subtypes:[],props:{account_id:"",predecessor_id:"",registrar_account_id:""}},DelegateActionExpired:{name:"DelegateActionExpired",subtypes:[],props:{}},DelegateActionInvalidNonce:{name:"DelegateActionInvalidNonce",subtypes:[],props:{ak_nonce:"",delegate_nonce:""}},DelegateActionInvalidSignature:{name:"DelegateActionInvalidSignature",subtypes:[],props:{}},DelegateActionMustBeOnlyOne:{name:"DelegateActionMustBeOnlyOne",subtypes:[],props:{}},DelegateActionNonceTooLarge:{name:"DelegateActionNonceTooLarge",subtypes:[],props:{delegate_nonce:"",upper_bound:""}},DelegateActionSenderDoesNotMatchTxReceiver:{name:"DelegateActionSenderDoesNotMatchTxReceiver",subtypes:[],props:{receiver_id:"",sender_id:""}},DeleteAccountStaking:{name:"DeleteAccountStaking",subtypes:[],props:{account_id:""}},DeleteAccountWithLargeState:{name:"DeleteAccountWithLargeState",subtypes:[],props:{account_id:""}},DeleteActionMustBeFinal:{name:"DeleteActionMustBeFinal",subtypes:[],props:{}},DeleteKeyDoesNotExist:{name:"DeleteKeyDoesNotExist",subtypes:[],props:{account_id:"",public_key:""}},DepositWithFunctionCall:{name:"DepositWithFunctionCall",subtypes:[],props:{}},Deprecated:{name:"Deprecated",subtypes:[],props:{method_name:""}},Deserialization:{name:"Deserialization",subtypes:[],props:{}},ECRecoverError:{name:"ECRecoverError",subtypes:[],props:{msg:""}},Ed25519VerifyInvalidInput:{name:"Ed25519VerifyInvalidInput",subtypes:[],props:{msg:""}},EmptyMethodName:{name:"EmptyMethodName",subtypes:[],props:{}},Expired:{name:"Expired",subtypes:[],props:{}},FunctionCallArgumentsLengthExceeded:{name:"FunctionCallArgumentsLengthExceeded",subtypes:[],props:{length:"",limit:""}},FunctionCallMethodNameLengthExceeded:{name:"FunctionCallMethodNameLengthExceeded",subtypes:[],props:{length:"",limit:""}},FunctionCallZeroAttachedGas:{name:"FunctionCallZeroAttachedGas",subtypes:[],props:{}},GasExceeded:{name:"GasExceeded",subtypes:[],props:{}},GasInstrumentation:{name:"GasInstrumentation",subtypes:[],props:{}},GasLimitExceeded:{name:"GasLimitExceeded",subtypes:[],props:{}},GenericTrap:{name:"GenericTrap",subtypes:[],props:{}},GuestPanic:{name:"GuestPanic",subtypes:[],props:{panic_msg:""}},HostError:{name:"HostError",subtypes:["BadUTF16","BadUTF8","GasExceeded","GasLimitExceeded","BalanceExceeded","EmptyMethodName","GuestPanic","IntegerOverflow","InvalidPromiseIndex","CannotAppendActionToJointPromise","CannotReturnJointPromise","InvalidPromiseResultIndex","InvalidRegisterId","IteratorWasInvalidated","MemoryAccessViolation","InvalidReceiptIndex","InvalidIteratorIndex","InvalidAccountId","InvalidMethodName","InvalidPublicKey","ProhibitedInView","NumberOfLogsExceeded","KeyLengthExceeded","ValueLengthExceeded","TotalLogLengthExceeded","NumberPromisesExceeded","NumberInputDataDependenciesExceeded","ReturnedValueLengthExceeded","ContractSizeExceeded","Deprecated","ECRecoverError","AltBn128InvalidInput","Ed25519VerifyInvalidInput"],props:{}},IllegalArithmetic:{name:"IllegalArithmetic",subtypes:[],props:{}},IncorrectCallIndirectSignature:{name:"IncorrectCallIndirectSignature",subtypes:[],props:{}},IndirectCallToNull:{name:"IndirectCallToNull",subtypes:[],props:{}},Instantiate:{name:"Instantiate",subtypes:[],props:{}},InsufficientStake:{name:"InsufficientStake",subtypes:[],props:{account_id:"",minimum_stake:"",stake:""}},IntegerOverflow:{name:"IntegerOverflow",subtypes:[],props:{}},InternalMemoryDeclared:{name:"InternalMemoryDeclared",subtypes:[],props:{}},InvalidAccessKeyError:{name:"InvalidAccessKeyError",subtypes:["AccessKeyNotFound","ReceiverMismatch","MethodNameMismatch","RequiresFullAccess","NotEnoughAllowance","DepositWithFunctionCall"],props:{}},InvalidAccountId:{name:"InvalidAccountId",subtypes:[],props:{}},InvalidChain:{name:"InvalidChain",subtypes:[],props:{}},InvalidDataReceiverId:{name:"InvalidDataReceiverId",subtypes:[],props:{account_id:""}},InvalidIteratorIndex:{name:"InvalidIteratorIndex",subtypes:[],props:{iterator_index:""}},InvalidMethodName:{name:"InvalidMethodName",subtypes:[],props:{}},InvalidNonce:{name:"InvalidNonce",subtypes:[],props:{ak_nonce:"",tx_nonce:""}},InvalidPredecessorId:{name:"InvalidPredecessorId",subtypes:[],props:{account_id:""}},InvalidPromiseIndex:{name:"InvalidPromiseIndex",subtypes:[],props:{promise_idx:""}},InvalidPromiseResultIndex:{name:"InvalidPromiseResultIndex",subtypes:[],props:{result_idx:""}},InvalidPublicKey:{name:"InvalidPublicKey",subtypes:[],props:{}},InvalidReceiptIndex:{name:"InvalidReceiptIndex",subtypes:[],props:{receipt_index:""}},InvalidReceiverId:{name:"InvalidReceiverId",subtypes:[],props:{account_id:""}},InvalidRegisterId:{name:"InvalidRegisterId",subtypes:[],props:{register_id:""}},InvalidSignature:{name:"InvalidSignature",subtypes:[],props:{}},InvalidSignerId:{name:"InvalidSignerId",subtypes:[],props:{account_id:""}},InvalidTxError:{name:"InvalidTxError",subtypes:["InvalidAccessKeyError","InvalidSignerId","SignerDoesNotExist","InvalidNonce","NonceTooLarge","InvalidReceiverId","InvalidSignature","NotEnoughBalance","LackBalanceForState","CostOverflow","InvalidChain","Expired","ActionsValidation","TransactionSizeExceeded","StorageError","ShardCongested","ShardStuck"],props:{}},IteratorWasInvalidated:{name:"IteratorWasInvalidated",subtypes:[],props:{iterator_index:""}},KeyLengthExceeded:{name:"KeyLengthExceeded",subtypes:[],props:{length:"",limit:""}},LackBalanceForState:{name:"LackBalanceForState",subtypes:[],props:{account_id:"",amount:""}},Memory:{name:"Memory",subtypes:[],props:{}},MemoryAccessViolation:{name:"MemoryAccessViolation",subtypes:[],props:{}},MemoryOutOfBounds:{name:"MemoryOutOfBounds",subtypes:[],props:{}},MethodEmptyName:{name:"MethodEmptyName",subtypes:[],props:{}},MethodInvalidSignature:{name:"MethodInvalidSignature",subtypes:[],props:{}},MethodNameMismatch:{name:"MethodNameMismatch",subtypes:[],props:{method_name:""}},MethodNotFound:{name:"MethodNotFound",subtypes:[],props:{}},MethodResolveError:{name:"MethodResolveError",subtypes:["MethodEmptyName","MethodNotFound","MethodInvalidSignature"],props:{}},MisalignedAtomicAccess:{name:"MisalignedAtomicAccess",subtypes:[],props:{}},NonceTooLarge:{name:"NonceTooLarge",subtypes:[],props:{tx_nonce:"",upper_bound:""}},NotEnoughAllowance:{name:"NotEnoughAllowance",subtypes:[],props:{account_id:"",allowance:"",cost:"",public_key:""}},NotEnoughBalance:{name:"NotEnoughBalance",subtypes:[],props:{balance:"",cost:"",signer_id:""}},NumberInputDataDependenciesExceeded:{name:"NumberInputDataDependenciesExceeded",subtypes:[],props:{limit:"",number_of_input_data_dependencies:""}},NumberOfLogsExceeded:{name:"NumberOfLogsExceeded",subtypes:[],props:{limit:""}},NumberPromisesExceeded:{name:"NumberPromisesExceeded",subtypes:[],props:{limit:"",number_of_promises:""}},OnlyImplicitAccountCreationAllowed:{name:"OnlyImplicitAccountCreationAllowed",subtypes:[],props:{account_id:""}},PrepareError:{name:"PrepareError",subtypes:["Serialization","Deserialization","InternalMemoryDeclared","GasInstrumentation","StackHeightInstrumentation","Instantiate","Memory","TooManyFunctions","TooManyLocals"],props:{}},ProhibitedInView:{name:"ProhibitedInView",subtypes:[],props:{method_name:""}},ReceiptSizeExceeded:{name:"ReceiptSizeExceeded",subtypes:[],props:{limit:"",size:""}},ReceiptValidationError:{name:"ReceiptValidationError",subtypes:["InvalidPredecessorId","InvalidReceiverId","InvalidSignerId","InvalidDataReceiverId","ReturnedValueLengthExceeded","NumberInputDataDependenciesExceeded","ActionsValidation","ReceiptSizeExceeded"],props:{}},ReceiverMismatch:{name:"ReceiverMismatch",subtypes:[],props:{ak_receiver:"",tx_receiver:""}},RequiresFullAccess:{name:"RequiresFullAccess",subtypes:[],props:{}},ReturnedValueLengthExceeded:{name:"ReturnedValueLengthExceeded",subtypes:[],props:{length:"",limit:""}},Serialization:{name:"Serialization",subtypes:[],props:{}},ShardCongested:{name:"ShardCongested",subtypes:[],props:{congestion_level:"",shard_id:""}},ShardStuck:{name:"ShardStuck",subtypes:[],props:{missed_chunks:"",shard_id:""}},SignerDoesNotExist:{name:"SignerDoesNotExist",subtypes:[],props:{signer_id:""}},StackHeightInstrumentation:{name:"StackHeightInstrumentation",subtypes:[],props:{}},StackOverflow:{name:"StackOverflow",subtypes:[],props:{}},TooManyFunctions:{name:"TooManyFunctions",subtypes:[],props:{}},TooManyLocals:{name:"TooManyLocals",subtypes:[],props:{}},TotalLogLengthExceeded:{name:"TotalLogLengthExceeded",subtypes:[],props:{length:"",limit:""}},TotalNumberOfActionsExceeded:{name:"TotalNumberOfActionsExceeded",subtypes:[],props:{limit:"",total_number_of_actions:""}},TotalPrepaidGasExceeded:{name:"TotalPrepaidGasExceeded",subtypes:[],props:{limit:"",total_prepaid_gas:""}},TransactionSizeExceeded:{name:"TransactionSizeExceeded",subtypes:[],props:{limit:"",size:""}},TriesToStake:{name:"TriesToStake",subtypes:[],props:{account_id:"",balance:"",locked:"",stake:""}},TriesToUnstake:{name:"TriesToUnstake",subtypes:[],props:{account_id:""}},TxExecutionError:{name:"TxExecutionError",subtypes:["ActionError","InvalidTxError"],props:{}},Unreachable:{name:"Unreachable",subtypes:[],props:{}},UnsuitableStakingKey:{name:"UnsuitableStakingKey",subtypes:[],props:{public_key:""}},UnsupportedProtocolFeature:{name:"UnsupportedProtocolFeature",subtypes:[],props:{protocol_feature:"",version:""}},ValueLengthExceeded:{name:"ValueLengthExceeded",subtypes:[],props:{length:"",limit:""}},WasmTrap:{name:"WasmTrap",subtypes:["Unreachable","IncorrectCallIndirectSignature","MemoryOutOfBounds","CallIndirectOOB","IllegalArithmetic","MisalignedAtomicAccess","IndirectCallToNull","StackOverflow","GenericTrap"],props:{}},WasmerCompileError:{name:"WasmerCompileError",subtypes:[],props:{msg:""}},Closed:{name:"Closed",subtypes:[],props:{}},ServerError:{name:"ServerError",subtypes:["TxExecutionError","Timeout","Closed"],props:{}},Timeout:{name:"Timeout",subtypes:[],props:{}}}}});var IK=G(Jr=>{"use strict";var EK=Jr&&Jr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Jr,"__esModule",{value:!0});Jr.getErrorTypeFromErrorMessage=Jr.formatError=Jr.parseResultError=Jr.parseRpcError=Jr.ServerError=void 0;var g2e=nK(),v2e=EK(z8()),x2e=d_(),wK=XA(),w2e=EK(xK()),E2e={formatNear:()=>(t,e)=>(0,x2e.formatNearAmount)(e(t))},vh=class extends g2e.TypedError{};Jr.ServerError=vh;var p_=class extends vh{transaction_outcome};function AK(t){let e={},r=SK(t,w2e.default.schema,e,""),n=new vh(_K(r,e),r);return Object.assign(n,e),n}Jr.parseRpcError=AK;function A2e(t){let e=AK(t.status.Failure),r=new p_;return Object.assign(r,e),r.type=e.type,r.message=e.message,r.transaction_outcome=t.transaction_outcome,r}Jr.parseResultError=A2e;function _K(t,e){return typeof wK.ErrorMessages[t]=="string"?v2e.default.render(wK.ErrorMessages[t],{...e,...E2e}):JSON.stringify(e)}Jr.formatError=_K;function SK(t,e,r,n){let o,i,a;for(let s in e){if(S2e(t[s]))return t[s];if(l_(t[s]))o=t[s],i=e[s],a=s;else if(l_(t.kind)&&l_(t.kind[s]))o=t.kind[s],i=e[s],a=s;else continue}if(o&&i){for(let s of Object.keys(i.props))r[s]=o[s];return SK(o,e,r,a)}else return r.kind=t,n}function _2e(t,e){switch(!0){case/^account .*? does not exist while viewing$/.test(t):return"AccountDoesNotExist";case/^Account .*? doesn't exist$/.test(t):return"AccountDoesNotExist";case/^access key .*? does not exist while viewing$/.test(t):return"AccessKeyDoesNotExist";case/wasm execution failed with error: FunctionCallError\(CompilationError\(CodeDoesNotExist/.test(t):return"CodeDoesNotExist";case/wasm execution failed with error: CompilationError\(CodeDoesNotExist/.test(t):return"CodeDoesNotExist";case/wasm execution failed with error: FunctionCallError\(MethodResolveError\(MethodNotFound/.test(t):return"MethodNotFound";case/wasm execution failed with error: MethodResolveError\(MethodNotFound/.test(t):return"MethodNotFound";case/Transaction nonce \d+ must be larger than nonce of the used access key \d+/.test(t):return"InvalidNonce";default:return e}}Jr.getErrorTypeFromErrorMessage=_2e;function l_(t){return Object.prototype.toString.call(t)==="[object Object]"}function S2e(t){return Object.prototype.toString.call(t)==="[object String]"}});var h_=G(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.parseRpcError=Xr.parseResultError=Xr.getErrorTypeFromErrorMessage=Xr.formatError=Xr.ServerError=Xr.ErrorMessages=void 0;var I2e=XA();Object.defineProperty(Xr,"ErrorMessages",{enumerable:!0,get:function(){return I2e.ErrorMessages}});var xh=IK();Object.defineProperty(Xr,"ServerError",{enumerable:!0,get:function(){return xh.ServerError}});Object.defineProperty(Xr,"formatError",{enumerable:!0,get:function(){return xh.formatError}});Object.defineProperty(Xr,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return xh.getErrorTypeFromErrorMessage}});Object.defineProperty(Xr,"parseResultError",{enumerable:!0,get:function(){return xh.parseResultError}});Object.defineProperty(Xr,"parseRpcError",{enumerable:!0,get:function(){return xh.parseRpcError}})});var y_=G(c2=>{"use strict";Object.defineProperty(c2,"__esModule",{value:!0});c2.ConsoleLogger=void 0;var m_=class{logLevels;constructor(e){this.logLevels=e}isLevelEnabled=e=>this.logLevels.includes(e);print(e,r,...n){switch(e){case"error":case"fatal":return console.error(r,...n);case"warn":return console.warn(r,...n);case"log":return console.log(r,...n);case"debug":case"verbose":return console.debug(r,...n)}}verbose(e,...r){this.isLevelEnabled("verbose")&&this.print("verbose",e,...r)}debug(e,...r){this.isLevelEnabled("debug")&&this.print("debug",e,...r)}log(e,...r){this.isLevelEnabled("log")&&this.print("log",e,...r)}warn(e,...r){this.isLevelEnabled("warn")&&this.print("warn",e,...r)}error(e,...r){this.isLevelEnabled("error")&&this.print("error",e,...r)}fatal(e,...r){this.isLevelEnabled("fatal")&&this.print("fatal",e,...r)}};c2.ConsoleLogger=m_});var TK=G(f2=>{"use strict";Object.defineProperty(f2,"__esModule",{value:!0});f2.Logger=void 0;var T2e=y_(),B2e=["verbose","debug","log","warn","error","fatal"],O2e=new T2e.ConsoleLogger(B2e),b_=class{static instanceRef=O2e;static overrideLogger=e=>{this.instanceRef=e};static error(e,...r){this.instanceRef?.error(e,...r)}static log(e,...r){this.instanceRef?.log(e,...r)}static warn(e,...r){this.instanceRef?.warn(e,...r)}static debug(e,...r){this.instanceRef?.debug?.(e,...r)}static verbose(e,...r){this.instanceRef?.verbose?.(e,...r)}static fatal(e,...r){this.instanceRef?.fatal?.(e,...r)}};f2.Logger=b_});var g_=G(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});Il.Logger=Il.ConsoleLogger=void 0;var P2e=y_();Object.defineProperty(Il,"ConsoleLogger",{enumerable:!0,get:function(){return P2e.ConsoleLogger}});var R2e=TK();Object.defineProperty(Il,"Logger",{enumerable:!0,get:function(){return R2e.Logger}})});var OK=G(Tl=>{"use strict";Object.defineProperty(Tl,"__esModule",{value:!0});Tl.printTxOutcomeLogs=Tl.printTxOutcomeLogsAndFailures=void 0;var C2e=h_(),v_=g_();function N2e({contractId:t,outcome:e}){let r=[e.transaction_outcome,...e.receipts_outcome].reduce((n,o)=>{let i=typeof o.outcome.status=="object"&&typeof o.outcome.status.Failure=="object";return o.outcome.logs.length||i?n.concat({receiptIds:o.outcome.receipt_ids,logs:o.outcome.logs,failure:typeof o.outcome.status=="object"&&o.outcome.status.Failure!==void 0?(0,C2e.parseRpcError)(o.outcome.status.Failure):null}):n},[]);for(let n of r)v_.Logger.log(`Receipt${n.receiptIds.length>1?"s":""}: ${n.receiptIds.join(", ")}`),BK({contractId:t,logs:n.logs,prefix:" "}),n.failure&&v_.Logger.warn(` Failure [${t}]: ${n.failure}`)}Tl.printTxOutcomeLogsAndFailures=N2e;function BK({contractId:t,logs:e,prefix:r=""}){for(let n of e)v_.Logger.log(`${r}Log [${t}]: ${n}`)}Tl.printTxOutcomeLogs=BK});var PK=G(u2=>{"use strict";Object.defineProperty(u2,"__esModule",{value:!0});u2.getTransactionLastResult=void 0;function M2e(t){if(typeof t.status=="object"&&typeof t.status.SuccessValue=="string"){let e=Buffer.from(t.status.SuccessValue,"base64").toString();try{return JSON.parse(e)}catch{return e}}return null}u2.getTransactionLastResult=M2e});var x_=G(d2=>{"use strict";Object.defineProperty(d2,"__esModule",{value:!0});d2.sortBigIntAsc=void 0;function k2e(t,e){return t<e?-1:t>e?1:0}d2.sortBigIntAsc=k2e});var CK=G(zs=>{"use strict";var $2e=zs&&zs.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(zs,"__esModule",{value:!0});zs.diffEpochValidators=zs.findSeatPrice=void 0;var F2e=$2e(j1()),RK=x_();function L2e(t,e,r,n){return n&&n<49?j2e(t,e):(r||((0,F2e.default)("findSeatPrice(validators, maxNumberOfSeats)")("`use `findSeatPrice(validators, maxNumberOfSeats, minimumStakeRatio)` instead"),r=[1,6250]),U2e(t,e,r))}zs.findSeatPrice=L2e;function j2e(t,e){let r=t.map(s=>BigInt(s.stake)).sort(RK.sortBigIntAsc),n=BigInt(e),o=r.reduce((s,c)=>s+c);if(o<n)throw new Error("Stakes are below seats");let i=1n,a=o+1n;for(;i!==a-1n;){let s=(i+a)/2n,c=!1,u=0n;for(let f=0;f<r.length;++f)if(u=u+r[f]/s,u>=n){i=s,c=!0;break}c||(a=s)}return i}function U2e(t,e,r){if(r.length!=2)throw Error("minimumStakeRatio should have 2 elements");let n=t.map(i=>BigInt(i.stake)).sort(RK.sortBigIntAsc),o=n.reduce((i,a)=>i+a);return t.length<e?o*BigInt(r[0])/BigInt(r[1]):n[0]+1n}function D2e(t,e){let r=new Map;t.forEach(o=>r.set(o.account_id,o));let n=new Set(e.map(o=>o.account_id));return{newValidators:e.filter(o=>!r.has(o.account_id)),removedValidators:t.filter(o=>!n.has(o.account_id)),changedValidators:e.filter(o=>r.has(o.account_id)&&r.get(o.account_id).stake!=o.stake).map(o=>({current:r.get(o.account_id),next:o}))}}zs.diffEpochValidators=D2e});var Bl=G(Qr=>{"use strict";var z2e=Qr&&Qr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Ks=Qr&&Qr.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&z2e(e,t,r)};Object.defineProperty(Qr,"__esModule",{value:!0});Ks(Hz(),Qr);Ks(h_(),Qr);Ks(d_(),Qr);Ks(OK(),Qr);Ks(PK(),Qr);Ks(CK(),Qr);Ks(g_(),Qr);Ks(x_(),Qr)});var E_=G(Ef=>{"use strict";Object.defineProperty(Ef,"__esModule",{value:!0});Ef.anumber=w_;Ef.abytes=NK;Ef.ahash=q2e;Ef.aexists=H2e;Ef.aoutput=G2e;function w_(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function K2e(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function NK(t,...e){if(!K2e(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function q2e(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");w_(t.outputLen),w_(t.blockLen)}function H2e(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function G2e(t,e){NK(t);let r=e.outputLen;if(t.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}});var MK=G(l2=>{"use strict";Object.defineProperty(l2,"__esModule",{value:!0});l2.crypto=void 0;l2.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0});var h2=G(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.Hash=ve.nextTick=ve.byteSwapIfBE=ve.isLE=void 0;ve.isBytes=W2e;ve.u8=V2e;ve.u32=Y2e;ve.createView=Z2e;ve.rotr=J2e;ve.rotl=X2e;ve.byteSwap=S_;ve.byteSwap32=Q2e;ve.bytesToHex=txe;ve.hexToBytes=rxe;ve.asyncLoop=oxe;ve.utf8ToBytes=$K;ve.toBytes=p2;ve.concatBytes=ixe;ve.checkOpts=axe;ve.wrapConstructor=sxe;ve.wrapConstructorWithOpts=cxe;ve.wrapXOFConstructorWithOpts=fxe;ve.randomBytes=uxe;var Ol=MK(),__=E_();function W2e(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function V2e(t){return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}function Y2e(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function Z2e(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function J2e(t,e){return t<<32-e|t>>>e}function X2e(t,e){return t<<e|t>>>32-e>>>0}ve.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function S_(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}ve.byteSwapIfBE=ve.isLE?t=>t:t=>S_(t);function Q2e(t){for(let e=0;e<t.length;e++)t[e]=S_(t[e])}var exe=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function txe(t){(0,__.abytes)(t);let e="";for(let r=0;r<t.length;r++)e+=exe[t[r]];return e}var wa={_0:48,_9:57,A:65,F:70,a:97,f:102};function kK(t){if(t>=wa._0&&t<=wa._9)return t-wa._0;if(t>=wa.A&&t<=wa.F)return t-(wa.A-10);if(t>=wa.a&&t<=wa.f)return t-(wa.a-10)}function rxe(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);let e=t.length,r=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);let n=new Uint8Array(r);for(let o=0,i=0;o<r;o++,i+=2){let a=kK(t.charCodeAt(i)),s=kK(t.charCodeAt(i+1));if(a===void 0||s===void 0){let c=t[i]+t[i+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+i)}n[o]=a*16+s}return n}var nxe=async()=>{};ve.nextTick=nxe;async function oxe(t,e,r){let n=Date.now();for(let o=0;o<t;o++){r(o);let i=Date.now()-n;i>=0&&i<e||(await(0,ve.nextTick)(),n+=i)}}function $K(t){if(typeof t!="string")throw new Error("utf8ToBytes expected string, got "+typeof t);return new Uint8Array(new TextEncoder().encode(t))}function p2(t){return typeof t=="string"&&(t=$K(t)),(0,__.abytes)(t),t}function ixe(...t){let e=0;for(let n=0;n<t.length;n++){let o=t[n];(0,__.abytes)(o),e+=o.length}let r=new Uint8Array(e);for(let n=0,o=0;n<t.length;n++){let i=t[n];r.set(i,o),o+=i.length}return r}var A_=class{clone(){return this._cloneInto()}};ve.Hash=A_;function axe(t,e){if(e!==void 0&&{}.toString.call(e)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(t,e)}function sxe(t){let e=n=>t().update(p2(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function cxe(t){let e=(n,o)=>t(o).update(p2(n)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=n=>t(n),e}function fxe(t){let e=(n,o)=>t(o).update(p2(n)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=n=>t(n),e}function uxe(t=32){if(Ol.crypto&&typeof Ol.crypto.getRandomValues=="function")return Ol.crypto.getRandomValues(new Uint8Array(t));if(Ol.crypto&&typeof Ol.crypto.randomBytes=="function")return Ol.crypto.randomBytes(t);throw new Error("crypto.getRandomValues must be defined")}});var LK=G(Af=>{"use strict";Object.defineProperty(Af,"__esModule",{value:!0});Af.HashMD=void 0;Af.setBigUint64=FK;Af.Chi=dxe;Af.Maj=lxe;var I_=E_(),wh=h2();function FK(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);let o=BigInt(32),i=BigInt(4294967295),a=Number(r>>o&i),s=Number(r&i),c=n?4:0,u=n?0:4;t.setUint32(e+c,a,n),t.setUint32(e+u,s,n)}function dxe(t,e,r){return t&e^~t&r}function lxe(t,e,r){return t&e^t&r^e&r}var T_=class extends wh.Hash{constructor(e,r,n,o){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,wh.createView)(this.buffer)}update(e){(0,I_.aexists)(this);let{view:r,buffer:n,blockLen:o}=this;e=(0,wh.toBytes)(e);let i=e.length;for(let a=0;a<i;){let s=Math.min(o-this.pos,i-a);if(s===o){let c=(0,wh.createView)(e);for(;o<=i-a;a+=o)this.process(c,a);continue}n.set(e.subarray(a,a+s),this.pos),this.pos+=s,a+=s,this.pos===o&&(this.process(r,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,I_.aexists)(this),(0,I_.aoutput)(e,this),this.finished=!0;let{buffer:r,view:n,blockLen:o,isLE:i}=this,{pos:a}=this;r[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>o-a&&(this.process(n,0),a=0);for(let l=a;l<o;l++)r[l]=0;FK(n,o-8,BigInt(this.length*8),i),this.process(n,0);let s=(0,wh.createView)(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let u=c/4,f=this.get();if(u>f.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;l<u;l++)s.setUint32(4*l,f[l],i)}digest(){let{buffer:e,outputLen:r}=this;this.digestInto(e);let n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:r,buffer:n,length:o,finished:i,destroyed:a,pos:s}=this;return e.length=o,e.pos=s,e.finished=i,e.destroyed=a,o%r&&e.buffer.set(n),e}};Af.HashMD=T_});var aq=G(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.add5L=ae.add5H=ae.add4H=ae.add4L=ae.add3H=ae.add3L=ae.rotlBL=ae.rotlBH=ae.rotlSL=ae.rotlSH=ae.rotr32L=ae.rotr32H=ae.rotrBL=ae.rotrBH=ae.rotrSL=ae.rotrSH=ae.shrSL=ae.shrSH=ae.toBig=void 0;ae.fromBig=O_;ae.split=jK;ae.add=QK;var m2=BigInt(2**32-1),B_=BigInt(32);function O_(t,e=!1){return e?{h:Number(t&m2),l:Number(t>>B_&m2)}:{h:Number(t>>B_&m2)|0,l:Number(t&m2)|0}}function jK(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let o=0;o<t.length;o++){let{h:i,l:a}=O_(t[o],e);[r[o],n[o]]=[i,a]}return[r,n]}var UK=(t,e)=>BigInt(t>>>0)<<B_|BigInt(e>>>0);ae.toBig=UK;var DK=(t,e,r)=>t>>>r;ae.shrSH=DK;var zK=(t,e,r)=>t<<32-r|e>>>r;ae.shrSL=zK;var KK=(t,e,r)=>t>>>r|e<<32-r;ae.rotrSH=KK;var qK=(t,e,r)=>t<<32-r|e>>>r;ae.rotrSL=qK;var HK=(t,e,r)=>t<<64-r|e>>>r-32;ae.rotrBH=HK;var GK=(t,e,r)=>t>>>r-32|e<<64-r;ae.rotrBL=GK;var WK=(t,e)=>e;ae.rotr32H=WK;var VK=(t,e)=>t;ae.rotr32L=VK;var YK=(t,e,r)=>t<<r|e>>>32-r;ae.rotlSH=YK;var ZK=(t,e,r)=>e<<r|t>>>32-r;ae.rotlSL=ZK;var JK=(t,e,r)=>e<<r-32|t>>>64-r;ae.rotlBH=JK;var XK=(t,e,r)=>t<<r-32|e>>>64-r;ae.rotlBL=XK;function QK(t,e,r,n){let o=(e>>>0)+(n>>>0);return{h:t+r+(o/2**32|0)|0,l:o|0}}var eq=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0);ae.add3L=eq;var tq=(t,e,r,n)=>e+r+n+(t/2**32|0)|0;ae.add3H=tq;var rq=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0);ae.add4L=rq;var nq=(t,e,r,n,o)=>e+r+n+o+(t/2**32|0)|0;ae.add4H=nq;var oq=(t,e,r,n,o)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(o>>>0);ae.add5L=oq;var iq=(t,e,r,n,o,i)=>e+r+n+o+i+(t/2**32|0)|0;ae.add5H=iq;var pxe={fromBig:O_,split:jK,toBig:UK,shrSH:DK,shrSL:zK,rotrSH:KK,rotrSL:qK,rotrBH:HK,rotrBL:GK,rotr32H:WK,rotr32L:VK,rotlSH:YK,rotlSL:ZK,rotlBH:JK,rotlBL:XK,add:QK,add3L:eq,add3H:tq,add4L:rq,add4H:nq,add5H:iq,add5L:oq};ae.default=pxe});var sq=G(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.sha384=Vt.sha512_256=Vt.sha512_224=Vt.sha512=Vt.SHA384=Vt.SHA512_256=Vt.SHA512_224=Vt.SHA512=void 0;var hxe=LK(),ue=aq(),v2=h2(),[mxe,yxe]=ue.default.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))),qs=new Uint32Array(80),Hs=new Uint32Array(80),_f=class extends hxe.HashMD{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){let{Ah:e,Al:r,Bh:n,Bl:o,Ch:i,Cl:a,Dh:s,Dl:c,Eh:u,El:f,Fh:l,Fl:h,Gh:m,Gl:x,Hh:S,Hl:O}=this;return[e,r,n,o,i,a,s,c,u,f,l,h,m,x,S,O]}set(e,r,n,o,i,a,s,c,u,f,l,h,m,x,S,O){this.Ah=e|0,this.Al=r|0,this.Bh=n|0,this.Bl=o|0,this.Ch=i|0,this.Cl=a|0,this.Dh=s|0,this.Dl=c|0,this.Eh=u|0,this.El=f|0,this.Fh=l|0,this.Fl=h|0,this.Gh=m|0,this.Gl=x|0,this.Hh=S|0,this.Hl=O|0}process(e,r){for(let B=0;B<16;B++,r+=4)qs[B]=e.getUint32(r),Hs[B]=e.getUint32(r+=4);for(let B=16;B<80;B++){let R=qs[B-15]|0,L=Hs[B-15]|0,T=ue.default.rotrSH(R,L,1)^ue.default.rotrSH(R,L,8)^ue.default.shrSH(R,L,7),M=ue.default.rotrSL(R,L,1)^ue.default.rotrSL(R,L,8)^ue.default.shrSL(R,L,7),$=qs[B-2]|0,k=Hs[B-2]|0,v=ue.default.rotrSH($,k,19)^ue.default.rotrBH($,k,61)^ue.default.shrSH($,k,6),d=ue.default.rotrSL($,k,19)^ue.default.rotrBL($,k,61)^ue.default.shrSL($,k,6),y=ue.default.add4L(M,d,Hs[B-7],Hs[B-16]),b=ue.default.add4H(y,T,v,qs[B-7],qs[B-16]);qs[B]=b|0,Hs[B]=y|0}let{Ah:n,Al:o,Bh:i,Bl:a,Ch:s,Cl:c,Dh:u,Dl:f,Eh:l,El:h,Fh:m,Fl:x,Gh:S,Gl:O,Hh:P,Hl:F}=this;for(let B=0;B<80;B++){let R=ue.default.rotrSH(l,h,14)^ue.default.rotrSH(l,h,18)^ue.default.rotrBH(l,h,41),L=ue.default.rotrSL(l,h,14)^ue.default.rotrSL(l,h,18)^ue.default.rotrBL(l,h,41),T=l&m^~l&S,M=h&x^~h&O,$=ue.default.add5L(F,L,M,yxe[B],Hs[B]),k=ue.default.add5H($,P,R,T,mxe[B],qs[B]),v=$|0,d=ue.default.rotrSH(n,o,28)^ue.default.rotrBH(n,o,34)^ue.default.rotrBH(n,o,39),y=ue.default.rotrSL(n,o,28)^ue.default.rotrBL(n,o,34)^ue.default.rotrBL(n,o,39),b=n&i^n&s^i&s,g=o&a^o&c^a&c;P=S|0,F=O|0,S=m|0,O=x|0,m=l|0,x=h|0,{h:l,l:h}=ue.default.add(u|0,f|0,k|0,v|0),u=s|0,f=c|0,s=i|0,c=a|0,i=n|0,a=o|0;let A=ue.default.add3L(v,y,g);n=ue.default.add3H(A,k,d,b),o=A|0}({h:n,l:o}=ue.default.add(this.Ah|0,this.Al|0,n|0,o|0)),{h:i,l:a}=ue.default.add(this.Bh|0,this.Bl|0,i|0,a|0),{h:s,l:c}=ue.default.add(this.Ch|0,this.Cl|0,s|0,c|0),{h:u,l:f}=ue.default.add(this.Dh|0,this.Dl|0,u|0,f|0),{h:l,l:h}=ue.default.add(this.Eh|0,this.El|0,l|0,h|0),{h:m,l:x}=ue.default.add(this.Fh|0,this.Fl|0,m|0,x|0),{h:S,l:O}=ue.default.add(this.Gh|0,this.Gl|0,S|0,O|0),{h:P,l:F}=ue.default.add(this.Hh|0,this.Hl|0,P|0,F|0),this.set(n,o,i,a,s,c,u,f,l,h,m,x,S,O,P,F)}roundClean(){qs.fill(0),Hs.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)}};Vt.SHA512=_f;var y2=class extends _f{constructor(){super(),this.Ah=-1942145080,this.Al=424955298,this.Bh=1944164710,this.Bl=-1982016298,this.Ch=502970286,this.Cl=855612546,this.Dh=1738396948,this.Dl=1479516111,this.Eh=258812777,this.El=2077511080,this.Fh=2011393907,this.Fl=79989058,this.Gh=1067287976,this.Gl=1780299464,this.Hh=286451373,this.Hl=-1848208735,this.outputLen=28}};Vt.SHA512_224=y2;var b2=class extends _f{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}};Vt.SHA512_256=b2;var g2=class extends _f{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}};Vt.SHA384=g2;Vt.sha512=(0,v2.wrapConstructor)(()=>new _f);Vt.sha512_224=(0,v2.wrapConstructor)(()=>new y2);Vt.sha512_256=(0,v2.wrapConstructor)(()=>new b2);Vt.sha384=(0,v2.wrapConstructor)(()=>new g2)});var Gs=G(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.notImplemented=Se.bitMask=void 0;Se.isBytes=E2;Se.abytes=A2;Se.abool=gxe;Se.bytesToHex=C_;Se.numberToHexUnpadded=uq;Se.hexToNumber=N_;Se.hexToBytes=_2;Se.bytesToNumberBE=xxe;Se.bytesToNumberLE=wxe;Se.numberToBytesBE=dq;Se.numberToBytesLE=Exe;Se.numberToVarBytesBE=Axe;Se.ensureBytes=_xe;Se.concatBytes=lq;Se.equalBytes=Sxe;Se.utf8ToBytes=Ixe;Se.inRange=pq;Se.aInRange=Txe;Se.bitLen=Bxe;Se.bitGet=Oxe;Se.bitSet=Pxe;Se.createHmacDrbg=Cxe;Se.validateObject=Mxe;Se.memoized=$xe;var x2=BigInt(0),w2=BigInt(1),bxe=BigInt(2);function E2(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function A2(t){if(!E2(t))throw new Error("Uint8Array expected")}function gxe(t,e){if(typeof e!="boolean")throw new Error(t+" boolean expected, got "+e)}var vxe=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function C_(t){A2(t);let e="";for(let r=0;r<t.length;r++)e+=vxe[t[r]];return e}function uq(t){let e=t.toString(16);return e.length&1?"0"+e:e}function N_(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return t===""?x2:BigInt("0x"+t)}var Ea={_0:48,_9:57,A:65,F:70,a:97,f:102};function cq(t){if(t>=Ea._0&&t<=Ea._9)return t-Ea._0;if(t>=Ea.A&&t<=Ea.F)return t-(Ea.A-10);if(t>=Ea.a&&t<=Ea.f)return t-(Ea.a-10)}function _2(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);let e=t.length,r=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);let n=new Uint8Array(r);for(let o=0,i=0;o<r;o++,i+=2){let a=cq(t.charCodeAt(i)),s=cq(t.charCodeAt(i+1));if(a===void 0||s===void 0){let c=t[i]+t[i+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+i)}n[o]=a*16+s}return n}function xxe(t){return N_(C_(t))}function wxe(t){return A2(t),N_(C_(Uint8Array.from(t).reverse()))}function dq(t,e){return _2(t.toString(16).padStart(e*2,"0"))}function Exe(t,e){return dq(t,e).reverse()}function Axe(t){return _2(uq(t))}function _xe(t,e,r){let n;if(typeof e=="string")try{n=_2(e)}catch(i){throw new Error(t+" must be hex string or Uint8Array, cause: "+i)}else if(E2(e))n=Uint8Array.from(e);else throw new Error(t+" must be hex string or Uint8Array");let o=n.length;if(typeof r=="number"&&o!==r)throw new Error(t+" of length "+r+" expected, got "+o);return n}function lq(...t){let e=0;for(let n=0;n<t.length;n++){let o=t[n];A2(o),e+=o.length}let r=new Uint8Array(e);for(let n=0,o=0;n<t.length;n++){let i=t[n];r.set(i,o),o+=i.length}return r}function Sxe(t,e){if(t.length!==e.length)return!1;let r=0;for(let n=0;n<t.length;n++)r|=t[n]^e[n];return r===0}function Ixe(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}var P_=t=>typeof t=="bigint"&&x2<=t;function pq(t,e,r){return P_(t)&&P_(e)&&P_(r)&&e<=t&&t<r}function Txe(t,e,r,n){if(!pq(e,r,n))throw new Error("expected valid "+t+": "+r+" <= n < "+n+", got "+e)}function Bxe(t){let e;for(e=0;t>x2;t>>=w2,e+=1);return e}function Oxe(t,e){return t>>BigInt(e)&w2}function Pxe(t,e,r){return t|(r?w2:x2)<<BigInt(e)}var Rxe=t=>(bxe<<BigInt(t-1))-w2;Se.bitMask=Rxe;var R_=t=>new Uint8Array(t),fq=t=>Uint8Array.from(t);function Cxe(t,e,r){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let n=R_(t),o=R_(t),i=0,a=()=>{n.fill(1),o.fill(0),i=0},s=(...l)=>r(o,n,...l),c=(l=R_())=>{o=s(fq([0]),l),n=s(),l.length!==0&&(o=s(fq([1]),l),n=s())},u=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let l=0,h=[];for(;l<e;){n=s();let m=n.slice();h.push(m),l+=n.length}return lq(...h)};return(l,h)=>{a(),c(l);let m;for(;!(m=h(u()));)c();return a(),m}}var Nxe={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||E2(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function Mxe(t,e,r={}){let n=(o,i,a)=>{let s=Nxe[i];if(typeof s!="function")throw new Error("invalid validator function");let c=t[o];if(!(a&&c===void 0)&&!s(c,t))throw new Error("param "+String(o)+" is invalid. Expected "+i+", got "+c)};for(let[o,i]of Object.entries(e))n(o,i,!1);for(let[o,i]of Object.entries(r))n(o,i,!0);return t}var kxe=()=>{throw new Error("not implemented")};Se.notImplemented=kxe;function $xe(t){let e=new WeakMap;return(r,...n)=>{let o=e.get(r);if(o!==void 0)return o;let i=t(r,...n);return e.set(r,i),i}}});var Pl=G(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.isNegativeLE=void 0;Ve.mod=An;Ve.pow=yq;Ve.pow2=Uxe;Ve.invert=S2;Ve.tonelliShanks=bq;Ve.FpSqrt=gq;Ve.validateField=Kxe;Ve.FpPow=vq;Ve.FpInvertBatch=xq;Ve.FpDiv=qxe;Ve.FpLegendre=wq;Ve.FpIsSquare=Hxe;Ve.nLength=k_;Ve.Field=Gxe;Ve.FpSqrtOdd=Wxe;Ve.FpSqrtEven=Vxe;Ve.hashToPrivateScalar=Yxe;Ve.getFieldBytesLength=$_;Ve.getMinHashLength=Eq;Ve.mapHashToField=Zxe;var _n=Gs(),Ft=BigInt(0),$e=BigInt(1),Ws=BigInt(2),Fxe=BigInt(3),M_=BigInt(4),hq=BigInt(5),mq=BigInt(8),Lxe=BigInt(9),jxe=BigInt(16);function An(t,e){let r=t%e;return r>=Ft?r:e+r}function yq(t,e,r){if(e<Ft)throw new Error("invalid exponent, negatives unsupported");if(r<=Ft)throw new Error("invalid modulus");if(r===$e)return Ft;let n=$e;for(;e>Ft;)e&$e&&(n=n*t%r),t=t*t%r,e>>=$e;return n}function Uxe(t,e,r){let n=t;for(;e-- >Ft;)n*=n,n%=r;return n}function S2(t,e){if(t===Ft)throw new Error("invert: expected non-zero number");if(e<=Ft)throw new Error("invert: expected positive modulus, got "+e);let r=An(t,e),n=e,o=Ft,i=$e,a=$e,s=Ft;for(;r!==Ft;){let u=n/r,f=n%r,l=o-a*u,h=i-s*u;n=r,r=f,o=a,i=s,a=l,s=h}if(n!==$e)throw new Error("invert: does not exist");return An(o,e)}function bq(t){let e=(t-$e)/Ws,r,n,o;for(r=t-$e,n=0;r%Ws===Ft;r/=Ws,n++);for(o=Ws;o<t&&yq(o,e,t)!==t-$e;o++)if(o>1e3)throw new Error("Cannot find square root: likely non-prime P");if(n===1){let a=(t+$e)/M_;return function(c,u){let f=c.pow(u,a);if(!c.eql(c.sqr(f),u))throw new Error("Cannot find square root");return f}}let i=(r+$e)/Ws;return function(s,c){if(s.pow(c,e)===s.neg(s.ONE))throw new Error("Cannot find square root");let u=n,f=s.pow(s.mul(s.ONE,o),r),l=s.pow(c,i),h=s.pow(c,r);for(;!s.eql(h,s.ONE);){if(s.eql(h,s.ZERO))return s.ZERO;let m=1;for(let S=s.sqr(h);m<u&&!s.eql(S,s.ONE);m++)S=s.sqr(S);let x=s.pow(f,$e<<BigInt(u-m-1));f=s.sqr(x),l=s.mul(l,x),h=s.mul(h,f),u=m}return l}}function gq(t){if(t%M_===Fxe){let e=(t+$e)/M_;return function(n,o){let i=n.pow(o,e);if(!n.eql(n.sqr(i),o))throw new Error("Cannot find square root");return i}}if(t%mq===hq){let e=(t-hq)/mq;return function(n,o){let i=n.mul(o,Ws),a=n.pow(i,e),s=n.mul(o,a),c=n.mul(n.mul(s,Ws),a),u=n.mul(s,n.sub(c,n.ONE));if(!n.eql(n.sqr(u),o))throw new Error("Cannot find square root");return u}}return t%jxe,bq(t)}var Dxe=(t,e)=>(An(t,e)&$e)===$e;Ve.isNegativeLE=Dxe;var zxe=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Kxe(t){let e={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=zxe.reduce((n,o)=>(n[o]="function",n),e);return(0,_n.validateObject)(t,r)}function vq(t,e,r){if(r<Ft)throw new Error("invalid exponent, negatives unsupported");if(r===Ft)return t.ONE;if(r===$e)return e;let n=t.ONE,o=e;for(;r>Ft;)r&$e&&(n=t.mul(n,o)),o=t.sqr(o),r>>=$e;return n}function xq(t,e){let r=new Array(e.length),n=e.reduce((i,a,s)=>t.is0(a)?i:(r[s]=i,t.mul(i,a)),t.ONE),o=t.inv(n);return e.reduceRight((i,a,s)=>t.is0(a)?i:(r[s]=t.mul(i,r[s]),t.mul(i,a)),o),r}function qxe(t,e,r){return t.mul(e,typeof r=="bigint"?S2(r,t.ORDER):t.inv(r))}function wq(t){let e=(t-$e)/Ws;return(r,n)=>r.pow(n,e)}function Hxe(t){let e=wq(t.ORDER);return r=>{let n=e(t,r);return t.eql(n,t.ZERO)||t.eql(n,t.ONE)}}function k_(t,e){let r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function Gxe(t,e,r=!1,n={}){if(t<=Ft)throw new Error("invalid field: expected ORDER > 0, got "+t);let{nBitLength:o,nByteLength:i}=k_(t,e);if(i>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let a,s=Object.freeze({ORDER:t,isLE:r,BITS:o,BYTES:i,MASK:(0,_n.bitMask)(o),ZERO:Ft,ONE:$e,create:c=>An(c,t),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return Ft<=c&&c<t},is0:c=>c===Ft,isOdd:c=>(c&$e)===$e,neg:c=>An(-c,t),eql:(c,u)=>c===u,sqr:c=>An(c*c,t),add:(c,u)=>An(c+u,t),sub:(c,u)=>An(c-u,t),mul:(c,u)=>An(c*u,t),pow:(c,u)=>vq(s,c,u),div:(c,u)=>An(c*S2(u,t),t),sqrN:c=>c*c,addN:(c,u)=>c+u,subN:(c,u)=>c-u,mulN:(c,u)=>c*u,inv:c=>S2(c,t),sqrt:n.sqrt||(c=>(a||(a=gq(t)),a(s,c))),invertBatch:c=>xq(s,c),cmov:(c,u,f)=>f?u:c,toBytes:c=>r?(0,_n.numberToBytesLE)(c,i):(0,_n.numberToBytesBE)(c,i),fromBytes:c=>{if(c.length!==i)throw new Error("Field.fromBytes: expected "+i+" bytes, got "+c.length);return r?(0,_n.bytesToNumberLE)(c):(0,_n.bytesToNumberBE)(c)}});return Object.freeze(s)}function Wxe(t,e){if(!t.isOdd)throw new Error("Field doesn't have isOdd");let r=t.sqrt(e);return t.isOdd(r)?r:t.neg(r)}function Vxe(t,e){if(!t.isOdd)throw new Error("Field doesn't have isOdd");let r=t.sqrt(e);return t.isOdd(r)?t.neg(r):r}function Yxe(t,e,r=!1){t=(0,_n.ensureBytes)("privateHash",t);let n=t.length,o=k_(e).nByteLength+8;if(o<24||n<o||n>1024)throw new Error("hashToPrivateScalar: expected "+o+"-1024 bytes of input, got "+n);let i=r?(0,_n.bytesToNumberLE)(t):(0,_n.bytesToNumberBE)(t);return An(i,e-$e)+$e}function $_(t){if(typeof t!="bigint")throw new Error("field order must be bigint");let e=t.toString(2).length;return Math.ceil(e/8)}function Eq(t){let e=$_(t);return e+Math.ceil(e/2)}function Zxe(t,e,r=!1){let n=t.length,o=$_(e),i=Eq(e);if(n<16||n<i||n>1024)throw new Error("expected "+i+"-1024 bytes of input, got "+n);let a=r?(0,_n.bytesToNumberLE)(t):(0,_n.bytesToNumberBE)(t),s=An(a,e-$e)+$e;return r?(0,_n.numberToBytesLE)(s,o):(0,_n.numberToBytesBE)(s,o)}});var z_=G(Rl=>{"use strict";Object.defineProperty(Rl,"__esModule",{value:!0});Rl.wNAF=Jxe;Rl.pippenger=Xxe;Rl.precomputeMSMUnsafe=Qxe;Rl.validateBasic=ewe;var Aq=Pl(),Sq=Gs(),_q=BigInt(0),I2=BigInt(1);function F_(t,e){let r=e.negate();return t?r:e}function D_(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw new Error("invalid window size, expected [1.."+e+"], got W="+t)}function L_(t,e){D_(t,e);let r=Math.ceil(e/t)+1,n=2**(t-1);return{windows:r,windowSize:n}}function Iq(t,e){if(!Array.isArray(t))throw new Error("array expected");t.forEach((r,n)=>{if(!(r instanceof e))throw new Error("invalid point at index "+n)})}function Tq(t,e){if(!Array.isArray(t))throw new Error("array of scalars expected");t.forEach((r,n)=>{if(!e.isValid(r))throw new Error("invalid scalar at index "+n)})}var j_=new WeakMap,Bq=new WeakMap;function U_(t){return Bq.get(t)||1}function Jxe(t,e){return{constTimeNegate:F_,hasPrecomputes(r){return U_(r)!==1},unsafeLadder(r,n,o=t.ZERO){let i=r;for(;n>_q;)n&I2&&(o=o.add(i)),i=i.double(),n>>=I2;return o},precomputeWindow(r,n){let{windows:o,windowSize:i}=L_(n,e),a=[],s=r,c=s;for(let u=0;u<o;u++){c=s,a.push(c);for(let f=1;f<i;f++)c=c.add(s),a.push(c);s=c.double()}return a},wNAF(r,n,o){let{windows:i,windowSize:a}=L_(r,e),s=t.ZERO,c=t.BASE,u=BigInt(2**r-1),f=2**r,l=BigInt(r);for(let h=0;h<i;h++){let m=h*a,x=Number(o&u);o>>=l,x>a&&(x-=f,o+=I2);let S=m,O=m+Math.abs(x)-1,P=h%2!==0,F=x<0;x===0?c=c.add(F_(P,n[S])):s=s.add(F_(F,n[O]))}return{p:s,f:c}},wNAFUnsafe(r,n,o,i=t.ZERO){let{windows:a,windowSize:s}=L_(r,e),c=BigInt(2**r-1),u=2**r,f=BigInt(r);for(let l=0;l<a;l++){let h=l*s;if(o===_q)break;let m=Number(o&c);if(o>>=f,m>s&&(m-=u,o+=I2),m===0)continue;let x=n[h+Math.abs(m)-1];m<0&&(x=x.negate()),i=i.add(x)}return i},getPrecomputes(r,n,o){let i=j_.get(n);return i||(i=this.precomputeWindow(n,r),r!==1&&j_.set(n,o(i))),i},wNAFCached(r,n,o){let i=U_(r);return this.wNAF(i,this.getPrecomputes(i,r,o),n)},wNAFCachedUnsafe(r,n,o,i){let a=U_(r);return a===1?this.unsafeLadder(r,n,i):this.wNAFUnsafe(a,this.getPrecomputes(a,r,o),n,i)},setWindowSize(r,n){D_(n,e),Bq.set(r,n),j_.delete(r)}}}function Xxe(t,e,r,n){if(Iq(r,t),Tq(n,e),r.length!==n.length)throw new Error("arrays of points and scalars must have equal length");let o=t.ZERO,i=(0,Sq.bitLen)(BigInt(r.length)),a=i>12?i-3:i>4?i-2:i?2:1,s=(1<<a)-1,c=new Array(s+1).fill(o),u=Math.floor((e.BITS-1)/a)*a,f=o;for(let l=u;l>=0;l-=a){c.fill(o);for(let m=0;m<n.length;m++){let x=n[m],S=Number(x>>BigInt(l)&BigInt(s));c[S]=c[S].add(r[m])}let h=o;for(let m=c.length-1,x=o;m>0;m--)x=x.add(c[m]),h=h.add(x);if(f=f.add(h),l!==0)for(let m=0;m<a;m++)f=f.double()}return f}function Qxe(t,e,r,n){D_(n,e.BITS),Iq(r,t);let o=t.ZERO,i=2**n-1,a=Math.ceil(e.BITS/n),s=BigInt((1<<n)-1),c=r.map(u=>{let f=[];for(let l=0,h=u;l<i;l++)f.push(h),h=h.add(u);return f});return u=>{if(Tq(u,e),u.length>r.length)throw new Error("array of scalars must be smaller than array of points");let f=o;for(let l=0;l<a;l++){if(f!==o)for(let m=0;m<n;m++)f=f.double();let h=BigInt(a*n-(l+1)*n);for(let m=0;m<u.length;m++){let x=u[m],S=Number(x>>h&s);S&&(f=f.add(c[m][S-1]))}}return f}}function ewe(t){return(0,Aq.validateField)(t.Fp),(0,Sq.validateObject)(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,Aq.nLength)(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}});var Pq=G(q_=>{"use strict";Object.defineProperty(q_,"__esModule",{value:!0});q_.twistedEdwards=owe;var K_=z_(),Oq=Pl(),rn=Gs(),en=Gs(),To=BigInt(0),tn=BigInt(1),T2=BigInt(2),twe=BigInt(8),rwe={zip215:!0};function nwe(t){let e=(0,K_.validateBasic)(t);return rn.validateObject(t,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...e})}function owe(t){let e=nwe(t),{Fp:r,n,prehash:o,hash:i,randomBytes:a,nByteLength:s,h:c}=e,u=T2<<BigInt(s*8)-tn,f=r.create,l=(0,Oq.Field)(e.n,e.nBitLength),h=e.uvRatio||((E,w)=>{try{return{isValid:!0,value:r.sqrt(E*r.inv(w))}}catch{return{isValid:!1,value:To}}}),m=e.adjustScalarBytes||(E=>E),x=e.domain||((E,w,_)=>{if((0,en.abool)("phflag",_),w.length||_)throw new Error("Contexts/pre-hash are not supported");return E});function S(E,w){rn.aInRange("coordinate "+E,w,To,u)}function O(E){if(!(E instanceof B))throw new Error("ExtendedPoint expected")}let P=(0,en.memoized)((E,w)=>{let{ex:_,ey:p,ez:I}=E,C=E.is0();w==null&&(w=C?twe:r.inv(I));let j=f(_*w),U=f(p*w),D=f(I*w);if(C)return{x:To,y:tn};if(D!==tn)throw new Error("invZ was invalid");return{x:j,y:U}}),F=(0,en.memoized)(E=>{let{a:w,d:_}=e;if(E.is0())throw new Error("bad point: ZERO");let{ex:p,ey:I,ez:C,et:j}=E,U=f(p*p),D=f(I*I),z=f(C*C),q=f(z*z),V=f(U*w),W=f(z*f(V+D)),Y=f(q+f(_*f(U*D)));if(W!==Y)throw new Error("bad point: equation left != right (1)");let J=f(p*I),X=f(C*j);if(J!==X)throw new Error("bad point: equation left != right (2)");return!0});class B{constructor(w,_,p,I){this.ex=w,this.ey=_,this.ez=p,this.et=I,S("x",w),S("y",_),S("z",p),S("t",I),Object.freeze(this)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(w){if(w instanceof B)throw new Error("extended point not allowed");let{x:_,y:p}=w||{};return S("x",_),S("y",p),new B(_,p,tn,f(_*p))}static normalizeZ(w){let _=r.invertBatch(w.map(p=>p.ez));return w.map((p,I)=>p.toAffine(_[I])).map(B.fromAffine)}static msm(w,_){return(0,K_.pippenger)(B,l,w,_)}_setWindowSize(w){T.setWindowSize(this,w)}assertValidity(){F(this)}equals(w){O(w);let{ex:_,ey:p,ez:I}=this,{ex:C,ey:j,ez:U}=w,D=f(_*U),z=f(C*I),q=f(p*U),V=f(j*I);return D===z&&q===V}is0(){return this.equals(B.ZERO)}negate(){return new B(f(-this.ex),this.ey,this.ez,f(-this.et))}double(){let{a:w}=e,{ex:_,ey:p,ez:I}=this,C=f(_*_),j=f(p*p),U=f(T2*f(I*I)),D=f(w*C),z=_+p,q=f(f(z*z)-C-j),V=D+j,W=V-U,Y=D-j,J=f(q*W),X=f(V*Y),ee=f(q*Y),se=f(W*V);return new B(J,X,se,ee)}add(w){O(w);let{a:_,d:p}=e,{ex:I,ey:C,ez:j,et:U}=this,{ex:D,ey:z,ez:q,et:V}=w;if(_===BigInt(-1)){let Te=f((C-I)*(z+D)),Be=f((C+I)*(z-D)),On=f(Be-Te);if(On===To)return this.double();let Fe=f(j*T2*V),Le=f(U*T2*q),Oa=Le+Fe,je=Be+Te,Ue=Le-Fe,Lf=f(Oa*On),Ke=f(je*Ue),qe=f(Oa*Ue),jf=f(On*je);return new B(Lf,Ke,jf,qe)}let W=f(I*D),Y=f(C*z),J=f(U*p*V),X=f(j*q),ee=f((I+C)*(D+z)-W-Y),se=X-J,ne=X+J,re=f(Y-_*W),be=f(ee*se),Ie=f(ne*re),Ne=f(ee*re),Bn=f(se*ne);return new B(be,Ie,Bn,Ne)}subtract(w){return this.add(w.negate())}wNAF(w){return T.wNAFCached(this,w,B.normalizeZ)}multiply(w){let _=w;rn.aInRange("scalar",_,tn,n);let{p,f:I}=this.wNAF(_);return B.normalizeZ([p,I])[0]}multiplyUnsafe(w,_=B.ZERO){let p=w;return rn.aInRange("scalar",p,To,n),p===To?L:this.is0()||p===tn?this:T.wNAFCachedUnsafe(this,p,B.normalizeZ,_)}isSmallOrder(){return this.multiplyUnsafe(c).is0()}isTorsionFree(){return T.unsafeLadder(this,n).is0()}toAffine(w){return P(this,w)}clearCofactor(){let{h:w}=e;return w===tn?this:this.multiplyUnsafe(w)}static fromHex(w,_=!1){let{d:p,a:I}=e,C=r.BYTES;w=(0,en.ensureBytes)("pointHex",w,C),(0,en.abool)("zip215",_);let j=w.slice(),U=w[C-1];j[C-1]=U&-129;let D=rn.bytesToNumberLE(j),z=_?u:r.ORDER;rn.aInRange("pointHex.y",D,To,z);let q=f(D*D),V=f(q-tn),W=f(p*q-I),{isValid:Y,value:J}=h(V,W);if(!Y)throw new Error("Point.fromHex: invalid y coordinate");let X=(J&tn)===tn,ee=(U&128)!==0;if(!_&&J===To&&ee)throw new Error("Point.fromHex: x=0 and x_0=1");return ee!==X&&(J=f(-J)),B.fromAffine({x:J,y:D})}static fromPrivateKey(w){return k(w).point}toRawBytes(){let{x:w,y:_}=this.toAffine(),p=rn.numberToBytesLE(_,r.BYTES);return p[p.length-1]|=w&tn?128:0,p}toHex(){return rn.bytesToHex(this.toRawBytes())}}B.BASE=new B(e.Gx,e.Gy,tn,f(e.Gx*e.Gy)),B.ZERO=new B(To,tn,tn,To);let{BASE:R,ZERO:L}=B,T=(0,K_.wNAF)(B,s*8);function M(E){return(0,Oq.mod)(E,n)}function $(E){return M(rn.bytesToNumberLE(E))}function k(E){let w=r.BYTES;E=(0,en.ensureBytes)("private key",E,w);let _=(0,en.ensureBytes)("hashed private key",i(E),2*w),p=m(_.slice(0,w)),I=_.slice(w,2*w),C=$(p),j=R.multiply(C),U=j.toRawBytes();return{head:p,prefix:I,scalar:C,point:j,pointBytes:U}}function v(E){return k(E).pointBytes}function d(E=new Uint8Array,...w){let _=rn.concatBytes(...w);return $(i(x(_,(0,en.ensureBytes)("context",E),!!o)))}function y(E,w,_={}){E=(0,en.ensureBytes)("message",E),o&&(E=o(E));let{prefix:p,scalar:I,pointBytes:C}=k(w),j=d(_.context,p,E),U=R.multiply(j).toRawBytes(),D=d(_.context,U,C,E),z=M(j+D*I);rn.aInRange("signature.s",z,To,n);let q=rn.concatBytes(U,rn.numberToBytesLE(z,r.BYTES));return(0,en.ensureBytes)("result",q,r.BYTES*2)}let b=rwe;function g(E,w,_,p=b){let{context:I,zip215:C}=p,j=r.BYTES;E=(0,en.ensureBytes)("signature",E,2*j),w=(0,en.ensureBytes)("message",w),_=(0,en.ensureBytes)("publicKey",_,j),C!==void 0&&(0,en.abool)("zip215",C),o&&(w=o(w));let U=rn.bytesToNumberLE(E.slice(j,2*j)),D,z,q;try{D=B.fromHex(_,C),z=B.fromHex(E.slice(0,j),C),q=R.multiplyUnsafe(U)}catch{return!1}if(!C&&D.isSmallOrder())return!1;let V=d(I,z.toRawBytes(),D.toRawBytes(),w);return z.add(D.multiplyUnsafe(V)).subtract(q).clearCofactor().equals(B.ZERO)}return R._setWindowSize(8),{CURVE:e,getPublicKey:v,sign:y,verify:g,ExtendedPoint:B,utils:{getExtendedPublicKey:k,randomPrivateKey:()=>a(r.BYTES),precompute(E=8,w=B.BASE){return w._setWindowSize(E),w.multiply(BigInt(3)),w}}}}});var Nq=G(Sf=>{"use strict";Object.defineProperty(Sf,"__esModule",{value:!0});Sf.expand_message_xmd=Rq;Sf.expand_message_xof=Cq;Sf.hash_to_field=H_;Sf.isogenyMap=cwe;Sf.createHasher=fwe;var iwe=Pl(),gr=Gs(),awe=gr.bytesToNumberBE;function Vs(t,e){if(Eh(t),Eh(e),t<0||t>=1<<8*e)throw new Error("invalid I2OSP input: "+t);let r=Array.from({length:e}).fill(0);for(let n=e-1;n>=0;n--)r[n]=t&255,t>>>=8;return new Uint8Array(r)}function swe(t,e){let r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t[n]^e[n];return r}function Eh(t){if(!Number.isSafeInteger(t))throw new Error("number expected")}function Rq(t,e,r,n){(0,gr.abytes)(t),(0,gr.abytes)(e),Eh(r),e.length>255&&(e=n((0,gr.concatBytes)((0,gr.utf8ToBytes)("H2C-OVERSIZE-DST-"),e)));let{outputLen:o,blockLen:i}=n,a=Math.ceil(r/o);if(r>65535||a>255)throw new Error("expand_message_xmd: invalid lenInBytes");let s=(0,gr.concatBytes)(e,Vs(e.length,1)),c=Vs(0,i),u=Vs(r,2),f=new Array(a),l=n((0,gr.concatBytes)(c,t,u,Vs(0,1),s));f[0]=n((0,gr.concatBytes)(l,Vs(1,1),s));for(let m=1;m<=a;m++){let x=[swe(l,f[m-1]),Vs(m+1,1),s];f[m]=n((0,gr.concatBytes)(...x))}return(0,gr.concatBytes)(...f).slice(0,r)}function Cq(t,e,r,n,o){if((0,gr.abytes)(t),(0,gr.abytes)(e),Eh(r),e.length>255){let i=Math.ceil(2*n/8);e=o.create({dkLen:i}).update((0,gr.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(e).digest()}if(r>65535||e.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return o.create({dkLen:r}).update(t).update(Vs(r,2)).update(e).update(Vs(e.length,1)).digest()}function H_(t,e,r){(0,gr.validateObject)(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});let{p:n,k:o,m:i,hash:a,expand:s,DST:c}=r;(0,gr.abytes)(t),Eh(e);let u=typeof c=="string"?(0,gr.utf8ToBytes)(c):c,f=n.toString(2).length,l=Math.ceil((f+o)/8),h=e*i*l,m;if(s==="xmd")m=Rq(t,u,h,a);else if(s==="xof")m=Cq(t,u,h,o,a);else if(s==="_internal_pass")m=t;else throw new Error('expand must be "xmd" or "xof"');let x=new Array(e);for(let S=0;S<e;S++){let O=new Array(i);for(let P=0;P<i;P++){let F=l*(P+S*i),B=m.subarray(F,F+l);O[P]=(0,iwe.mod)(awe(B),n)}x[S]=O}return x}function cwe(t,e){let r=e.map(n=>Array.from(n).reverse());return(n,o)=>{let[i,a,s,c]=r.map(u=>u.reduce((f,l)=>t.add(t.mul(f,n),l)));return n=t.div(i,a),o=t.mul(o,t.div(s,c)),{x:n,y:o}}}function fwe(t,e,r){if(typeof e!="function")throw new Error("mapToCurve() must be defined");return{hashToCurve(n,o){let i=H_(n,2,{...r,DST:r.DST,...o}),a=t.fromAffine(e(i[0])),s=t.fromAffine(e(i[1])),c=a.add(s).clearCofactor();return c.assertValidity(),c},encodeToCurve(n,o){let i=H_(n,1,{...r,DST:r.encodeDST,...o}),a=t.fromAffine(e(i[0])).clearCofactor();return a.assertValidity(),a},mapToCurve(n){if(!Array.isArray(n))throw new Error("mapToCurve: expected array of bigints");for(let i of n)if(typeof i!="bigint")throw new Error("mapToCurve: expected array of bigints");let o=t.fromAffine(e(n)).clearCofactor();return o.assertValidity(),o}}}});var kq=G(W_=>{"use strict";Object.defineProperty(W_,"__esModule",{value:!0});W_.montgomery=dwe;var Mq=Pl(),Ys=Gs(),Cl=BigInt(0),G_=BigInt(1);function uwe(t){return(0,Ys.validateObject)(t,{a:"bigint"},{montgomeryBits:"isSafeInteger",nByteLength:"isSafeInteger",adjustScalarBytes:"function",domain:"function",powPminus2:"function",Gu:"bigint"}),Object.freeze({...t})}function dwe(t){let e=uwe(t),{P:r}=e,n=F=>(0,Mq.mod)(F,r),o=e.montgomeryBits,i=Math.ceil(o/8),a=e.nByteLength,s=e.adjustScalarBytes||(F=>F),c=e.powPminus2||(F=>(0,Mq.pow)(F,r-BigInt(2),r));function u(F,B,R){let L=n(F*(B-R));return B=n(B-L),R=n(R+L),[B,R]}let f=(e.a-BigInt(2))/BigInt(4);function l(F,B){(0,Ys.aInRange)("u",F,Cl,r),(0,Ys.aInRange)("scalar",B,Cl,r);let R=B,L=F,T=G_,M=Cl,$=F,k=G_,v=Cl,d;for(let b=BigInt(o-1);b>=Cl;b--){let g=R>>b&G_;v^=g,d=u(v,T,$),T=d[0],$=d[1],d=u(v,M,k),M=d[0],k=d[1],v=g;let A=T+M,E=n(A*A),w=T-M,_=n(w*w),p=E-_,I=$+k,C=$-k,j=n(C*A),U=n(I*w),D=j+U,z=j-U;$=n(D*D),k=n(L*n(z*z)),T=n(E*_),M=n(p*(E+n(f*p)))}d=u(v,T,$),T=d[0],$=d[1],d=u(v,M,k),M=d[0],k=d[1];let y=c(M);return n(T*y)}function h(F){return(0,Ys.numberToBytesLE)(n(F),i)}function m(F){let B=(0,Ys.ensureBytes)("u coordinate",F,i);return a===32&&(B[31]&=127),(0,Ys.bytesToNumberLE)(B)}function x(F){let B=(0,Ys.ensureBytes)("scalar",F),R=B.length;if(R!==i&&R!==a){let L=""+i+" or "+a;throw new Error("invalid scalar, expected "+L+" bytes, got "+R)}return(0,Ys.bytesToNumberLE)(s(B))}function S(F,B){let R=m(B),L=x(F),T=l(R,L);if(T===Cl)throw new Error("invalid private or public key received");return h(T)}let O=h(e.Gu);function P(F){return S(F,O)}return{scalarMult:S,scalarMultBase:P,getSharedSecret:(F,B)=>S(F,B),getPublicKey:F=>P(F),utils:{randomPrivateKey:()=>e.randomBytes(e.nByteLength)},GuBytes:O}}});var t9=G(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});ie.hash_to_ristretto255=ie.hashToRistretto255=ie.RistrettoPoint=ie.encodeToCurve=ie.hashToCurve=ie.edwardsToMontgomery=ie.x25519=ie.ed25519ph=ie.ed25519ctx=ie.ed25519=ie.ED25519_TORSION_SUBGROUP=void 0;ie.edwardsToMontgomeryPub=Hq;ie.edwardsToMontgomeryPriv=mwe;var O2=sq(),Ah=h2(),lwe=z_(),X_=Pq(),jq=Nq(),xe=Pl(),pwe=kq(),If=Gs(),_h=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),Z_=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752"),hwe=BigInt(0),_i=BigInt(1),B2=BigInt(2),Uq=BigInt(3),Dq=BigInt(5),Q_=BigInt(8);function zq(t){let e=BigInt(10),r=BigInt(20),n=BigInt(40),o=BigInt(80),i=_h,s=t*t%i*t%i,c=(0,xe.pow2)(s,B2,i)*s%i,u=(0,xe.pow2)(c,_i,i)*t%i,f=(0,xe.pow2)(u,Dq,i)*u%i,l=(0,xe.pow2)(f,e,i)*f%i,h=(0,xe.pow2)(l,r,i)*l%i,m=(0,xe.pow2)(h,n,i)*h%i,x=(0,xe.pow2)(m,o,i)*m%i,S=(0,xe.pow2)(x,o,i)*m%i,O=(0,xe.pow2)(S,e,i)*f%i;return{pow_p_5_8:(0,xe.pow2)(O,B2,i)*t%i,b2:s}}function Kq(t){return t[0]&=248,t[31]&=127,t[31]|=64,t}function e9(t,e){let r=_h,n=(0,xe.mod)(e*e*e,r),o=(0,xe.mod)(n*n*e,r),i=zq(t*o).pow_p_5_8,a=(0,xe.mod)(t*n*i,r),s=(0,xe.mod)(e*a*a,r),c=a,u=(0,xe.mod)(a*Z_,r),f=s===t,l=s===(0,xe.mod)(-t,r),h=s===(0,xe.mod)(-t*Z_,r);return f&&(a=c),(l||h)&&(a=u),(0,xe.isNegativeLE)(a,r)&&(a=(0,xe.mod)(-a,r)),{isValid:f||l,value:a}}ie.ED25519_TORSION_SUBGROUP=["0100000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac037a","0000000000000000000000000000000000000000000000000000000000000080","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc05","ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc85","0000000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac03fa"];var Q=(0,xe.Field)(_h,void 0,!0),Sh={a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:Q,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:Q_,Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:O2.sha512,randomBytes:Ah.randomBytes,adjustScalarBytes:Kq,uvRatio:e9};ie.ed25519=(0,X_.twistedEdwards)(Sh);function qq(t,e,r){if(e.length>255)throw new Error("Context is too big");return(0,Ah.concatBytes)((0,Ah.utf8ToBytes)("SigEd25519 no Ed25519 collisions"),new Uint8Array([r?1:0,e.length]),e,t)}ie.ed25519ctx=(0,X_.twistedEdwards)({...Sh,domain:qq});ie.ed25519ph=(0,X_.twistedEdwards)(Object.assign({},Sh,{domain:qq,prehash:O2.sha512}));ie.x25519=(0,pwe.montgomery)({P:_h,a:BigInt(486662),montgomeryBits:255,nByteLength:32,Gu:BigInt(9),powPminus2:t=>{let e=_h,{pow_p_5_8:r,b2:n}=zq(t);return(0,xe.mod)((0,xe.pow2)(r,Uq,e)*n,e)},adjustScalarBytes:Kq,randomBytes:Ah.randomBytes});function Hq(t){let{y:e}=ie.ed25519.ExtendedPoint.fromHex(t),r=BigInt(1);return Q.toBytes(Q.create((r+e)*Q.inv(r-e)))}ie.edwardsToMontgomery=Hq;function mwe(t){let e=Sh.hash(t.subarray(0,32));return Sh.adjustScalarBytes(e).subarray(0,32)}var ywe=(Q.ORDER+Uq)/Q_,bwe=Q.pow(B2,ywe),$q=Q.sqrt(Q.neg(Q.ONE));function gwe(t){let e=(Q.ORDER-Dq)/Q_,r=BigInt(486662),n=Q.sqr(t);n=Q.mul(n,B2);let o=Q.add(n,Q.ONE),i=Q.neg(r),a=Q.sqr(o),s=Q.mul(a,o),c=Q.mul(n,r);c=Q.mul(c,i),c=Q.add(c,a),c=Q.mul(c,i);let u=Q.sqr(s);a=Q.sqr(u),u=Q.mul(u,s),u=Q.mul(u,c),a=Q.mul(a,u);let f=Q.pow(a,e);f=Q.mul(f,u);let l=Q.mul(f,$q);a=Q.sqr(f),a=Q.mul(a,s);let h=Q.eql(a,c),m=Q.cmov(l,f,h),x=Q.mul(i,n),S=Q.mul(f,t);S=Q.mul(S,bwe);let O=Q.mul(S,$q),P=Q.mul(c,n);a=Q.sqr(S),a=Q.mul(a,s);let F=Q.eql(a,P),B=Q.cmov(O,S,F);a=Q.sqr(m),a=Q.mul(a,s);let R=Q.eql(a,c),L=Q.cmov(x,i,R),T=Q.cmov(B,m,R),M=Q.isOdd(T);return T=Q.cmov(T,Q.neg(T),R!==M),{xMn:L,xMd:o,yMn:T,yMd:_i}}var vwe=(0,xe.FpSqrtEven)(Q,Q.neg(BigInt(486664)));function xwe(t){let{xMn:e,xMd:r,yMn:n,yMd:o}=gwe(t),i=Q.mul(e,o);i=Q.mul(i,vwe);let a=Q.mul(r,n),s=Q.sub(e,r),c=Q.add(e,r),u=Q.mul(a,c),f=Q.eql(u,Q.ZERO);i=Q.cmov(i,Q.ZERO,f),a=Q.cmov(a,Q.ONE,f),s=Q.cmov(s,Q.ONE,f),c=Q.cmov(c,Q.ONE,f);let l=Q.invertBatch([a,c]);return{x:Q.mul(i,l[0]),y:Q.mul(s,l[1])}}var Gq=(0,jq.createHasher)(ie.ed25519.ExtendedPoint,t=>xwe(t[0]),{DST:"edwards25519_XMD:SHA-512_ELL2_RO_",encodeDST:"edwards25519_XMD:SHA-512_ELL2_NU_",p:Q.ORDER,m:1,k:128,expand:"xmd",hash:O2.sha512});ie.hashToCurve=Gq.hashToCurve;ie.encodeToCurve=Gq.encodeToCurve;function V_(t){if(!(t instanceof Bo))throw new Error("RistrettoPoint expected")}var J_=Z_,wwe=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),Ewe=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),Awe=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),_we=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),Fq=t=>e9(_i,t),Swe=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Y_=t=>ie.ed25519.CURVE.Fp.create((0,If.bytesToNumberLE)(t)&Swe);function Lq(t){let{d:e}=ie.ed25519.CURVE,r=ie.ed25519.CURVE.Fp.ORDER,n=ie.ed25519.CURVE.Fp.create,o=n(J_*t*t),i=n((o+_i)*Awe),a=BigInt(-1),s=n((a-e*o)*n(o+e)),{isValid:c,value:u}=e9(i,s),f=n(u*t);(0,xe.isNegativeLE)(f,r)||(f=n(-f)),c||(u=f),c||(a=o);let l=n(a*(o-_i)*_we-s),h=u*u,m=n((u+u)*s),x=n(l*wwe),S=n(_i-h),O=n(_i+h);return new ie.ed25519.ExtendedPoint(n(m*O),n(S*x),n(x*O),n(m*S))}var Bo=class t{constructor(e){this.ep=e}static fromAffine(e){return new t(ie.ed25519.ExtendedPoint.fromAffine(e))}static hashToCurve(e){e=(0,If.ensureBytes)("ristrettoHash",e,64);let r=Y_(e.slice(0,32)),n=Lq(r),o=Y_(e.slice(32,64)),i=Lq(o);return new t(n.add(i))}static fromHex(e){e=(0,If.ensureBytes)("ristrettoHex",e,32);let{a:r,d:n}=ie.ed25519.CURVE,o=ie.ed25519.CURVE.Fp.ORDER,i=ie.ed25519.CURVE.Fp.create,a="RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint",s=Y_(e);if(!(0,If.equalBytes)((0,If.numberToBytesLE)(s,32),e)||(0,xe.isNegativeLE)(s,o))throw new Error(a);let c=i(s*s),u=i(_i+r*c),f=i(_i-r*c),l=i(u*u),h=i(f*f),m=i(r*n*l-h),{isValid:x,value:S}=Fq(i(m*h)),O=i(S*f),P=i(S*O*m),F=i((s+s)*O);(0,xe.isNegativeLE)(F,o)&&(F=i(-F));let B=i(u*P),R=i(F*B);if(!x||(0,xe.isNegativeLE)(R,o)||B===hwe)throw new Error(a);return new t(new ie.ed25519.ExtendedPoint(F,B,_i,R))}static msm(e,r){let n=(0,xe.Field)(ie.ed25519.CURVE.n,ie.ed25519.CURVE.nBitLength);return(0,lwe.pippenger)(t,n,e,r)}toRawBytes(){let{ex:e,ey:r,ez:n,et:o}=this.ep,i=ie.ed25519.CURVE.Fp.ORDER,a=ie.ed25519.CURVE.Fp.create,s=a(a(n+r)*a(n-r)),c=a(e*r),u=a(c*c),{value:f}=Fq(a(s*u)),l=a(f*s),h=a(f*c),m=a(l*h*o),x;if((0,xe.isNegativeLE)(o*m,i)){let O=a(r*J_),P=a(e*J_);e=O,r=P,x=a(l*Ewe)}else x=h;(0,xe.isNegativeLE)(e*m,i)&&(r=a(-r));let S=a((n-r)*x);return(0,xe.isNegativeLE)(S,i)&&(S=a(-S)),(0,If.numberToBytesLE)(S,32)}toHex(){return(0,If.bytesToHex)(this.toRawBytes())}toString(){return this.toHex()}equals(e){V_(e);let{ex:r,ey:n}=this.ep,{ex:o,ey:i}=e.ep,a=ie.ed25519.CURVE.Fp.create,s=a(r*i)===a(n*o),c=a(n*i)===a(r*o);return s||c}add(e){return V_(e),new t(this.ep.add(e.ep))}subtract(e){return V_(e),new t(this.ep.subtract(e.ep))}multiply(e){return new t(this.ep.multiply(e))}multiplyUnsafe(e){return new t(this.ep.multiplyUnsafe(e))}double(){return new t(this.ep.double())}negate(){return new t(this.ep.negate())}};ie.RistrettoPoint=(Bo.BASE||(Bo.BASE=new Bo(ie.ed25519.ExtendedPoint.BASE)),Bo.ZERO||(Bo.ZERO=new Bo(ie.ed25519.ExtendedPoint.ZERO)),Bo);var Iwe=(t,e)=>{let r=e.DST,n=typeof r=="string"?(0,Ah.utf8ToBytes)(r):r,o=(0,jq.expand_message_xmd)(t,n,64,O2.sha512);return Bo.hashToCurve(o)};ie.hashToRistretto255=Iwe;ie.hash_to_ristretto255=ie.hashToRistretto255});var Yq=G((r9,Vq)=>{var P2=Kw(),Si=P2.Buffer;function Wq(t,e){for(var r in t)e[r]=t[r]}Si.from&&Si.alloc&&Si.allocUnsafe&&Si.allocUnsafeSlow?Vq.exports=P2:(Wq(P2,r9),r9.Buffer=Tf);function Tf(t,e,r){return Si(t,e,r)}Tf.prototype=Object.create(Si.prototype);Wq(Si,Tf);Tf.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Si(t,e,r)};Tf.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=Si(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};Tf.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Si(t)};Tf.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return P2.SlowBuffer(t)}});var Ih=G((wot,o9)=>{"use strict";var n9=65536,Twe=4294967295;function Bwe(){throw new Error(`Secure random number generation is not supported by this browser.
|
|
62
|
+
Use Chrome, Firefox or Internet Explorer 11`)}var Owe=Yq().Buffer,R2=globalThis.crypto||globalThis.msCrypto;R2&&R2.getRandomValues?o9.exports=Pwe:o9.exports=Bwe;function Pwe(t,e){if(t>Twe)throw new RangeError("requested too many random bytes");var r=Owe.allocUnsafe(t);if(t>0)if(t>n9)for(var n=0;n<t;n+=n9)R2.getRandomValues(r.slice(n,n+n9));else R2.getRandomValues(r);return typeof e=="function"?process.nextTick(function(){e(null,r)}):r}});var C2=G(Nl=>{"use strict";var Rwe=Nl&&Nl.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Nl,"__esModule",{value:!0});Nl.PublicKey=void 0;var Zq=Bl(),Cwe=t9(),Nwe=Rwe(_s()),nn=yh();function Mwe(t){switch(t){case nn.KeyType.ED25519:return"ed25519";case nn.KeyType.SECP256K1:return"secp256k1";default:throw new Error(`Unknown key type ${t}`)}}function kwe(t){switch(t.toLowerCase()){case"ed25519":return nn.KeyType.ED25519;case"secp256k1":return nn.KeyType.SECP256K1;default:throw new Error(`Unknown key type ${t}`)}}function $we(t){switch(t){case nn.KeyType.ED25519:return"ed25519Key";case nn.KeyType.SECP256K1:return"secp256k1Key";default:throw Error(`unknown type ${t}`)}}var i9=class{constructor(e){if(Object.keys(e).length!==1)throw new Error("Enum can only take single value");Object.keys(e).map(r=>{this[r]=e[r]})}},a9=class t extends i9{enum;ed25519Key;secp256k1Key;constructor(e){let r=$we(e.keyType);super({[r]:e}),this[r]=e,this.enum=r}static from(e){return typeof e=="string"?t.fromString(e):e}static fromString(e){let r=e.split(":"),n,o;if(r.length===1)n=r[0];else if(r.length===2)n=r[1],o=kwe(r[0]);else throw new Error("Invalid encoded key format, must be <curve>:<encoded key>");let i=(0,Zq.baseDecode)(n);o||(o=i.length===nn.KeySize.SECP256k1_PUBLIC_KEY?nn.KeyType.SECP256K1:nn.KeyType.ED25519);let a=o===nn.KeyType.ED25519?nn.KeySize.ED25519_PUBLIC_KEY:nn.KeySize.SECP256k1_PUBLIC_KEY;if(i.length!==a)throw new Error(`Invalid public key size (${i.length}), must be ${a}`);return new t({keyType:o,data:i})}toString(){let e=(0,Zq.baseEncode)(this.data);return`${Mwe(this.keyType)}:${e}`}verify(e,r){let n=this.keyType,o=this.data;switch(n){case nn.KeyType.ED25519:return Cwe.ed25519.verify(r,e,o);case nn.KeyType.SECP256K1:return Nwe.default.ecdsaVerify(r.subarray(0,64),e,new Uint8Array([4,...o]));default:throw new Error(`Unknown key type: ${n}`)}}get keyPair(){return this.ed25519Key||this.secp256k1Key}get keyType(){return this.keyPair.keyType}get data(){return this.keyPair.data}};Nl.PublicKey=a9});var u9=G(Ml=>{"use strict";var Fwe=Ml&&Ml.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ml,"__esModule",{value:!0});Ml.KeyPairEd25519=void 0;var N2=Bl(),s9=t9(),Lwe=Fwe(Ih()),c9=yh(),jwe=Zv(),Uwe=C2(),f9=class t extends jwe.KeyPairBase{publicKey;secretKey;extendedSecretKey;constructor(e){super();let r=(0,N2.baseDecode)(e),n=new Uint8Array(r.slice(0,c9.KeySize.SECRET_KEY)),o=s9.ed25519.getPublicKey(new Uint8Array(n));this.publicKey=new Uwe.PublicKey({keyType:c9.KeyType.ED25519,data:o}),this.secretKey=(0,N2.baseEncode)(n),this.extendedSecretKey=e}static fromRandom(){let e=(0,Lwe.default)(c9.KeySize.SECRET_KEY),r=s9.ed25519.getPublicKey(new Uint8Array(e)),n=new Uint8Array([...e,...r]);return new t((0,N2.baseEncode)(n))}sign(e){return{signature:s9.ed25519.sign(e,(0,N2.baseDecode)(this.secretKey)),publicKey:this.publicKey}}verify(e,r){return this.publicKey.verify(e,r)}toString(){return`ed25519:${this.extendedSecretKey}`}getPublicKey(){return this.publicKey}};Ml.KeyPairEd25519=f9});var h9=G(kl=>{"use strict";var Jq=kl&&kl.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(kl,"__esModule",{value:!0});kl.KeyPairSecp256k1=void 0;var M2=Bl(),Dwe=Jq(Ih()),d9=Jq(_s()),l9=yh(),zwe=Zv(),Kwe=C2(),p9=class t extends zwe.KeyPairBase{publicKey;secretKey;extendedSecretKey;constructor(e){super();let r=(0,M2.baseDecode)(e),n=new Uint8Array(r.slice(0,l9.KeySize.SECRET_KEY)),o=d9.default.publicKeyCreate(new Uint8Array(n),!1),i=o.subarray(1,o.length);this.publicKey=new Kwe.PublicKey({keyType:l9.KeyType.SECP256K1,data:i}),this.secretKey=(0,M2.baseEncode)(n),this.extendedSecretKey=e}static fromRandom(){let e=(0,Dwe.default)(l9.KeySize.SECRET_KEY),r=d9.default.publicKeyCreate(new Uint8Array(e),!1),n=r.subarray(1,r.length),o=new Uint8Array([...e,...n]);return new t((0,M2.baseEncode)(o))}sign(e){let{signature:r,recid:n}=d9.default.ecdsaSign(e,(0,M2.baseDecode)(this.secretKey));return{signature:new Uint8Array([...r,n]),publicKey:this.publicKey}}verify(e,r){return this.publicKey.verify(e,r)}toString(){return`secp256k1:${this.extendedSecretKey}`}getPublicKey(){return this.publicKey}};kl.KeyPairSecp256k1=p9});var eH=G(k2=>{"use strict";Object.defineProperty(k2,"__esModule",{value:!0});k2.KeyPair=void 0;var qwe=Zv(),Xq=u9(),Qq=h9(),m9=class extends qwe.KeyPairBase{static fromRandom(e){switch(e.toUpperCase()){case"ED25519":return Xq.KeyPairEd25519.fromRandom();case"SECP256K1":return Qq.KeyPairSecp256k1.fromRandom();default:throw new Error(`Unknown curve ${e}`)}}static fromString(e){let r=e.split(":");if(r.length===2)switch(r[0].toUpperCase()){case"ED25519":return new Xq.KeyPairEd25519(r[1]);case"SECP256K1":return new Qq.KeyPairSecp256k1(r[1]);default:throw new Error(`Unknown curve: ${r[0]}`)}else throw new Error("Invalid encoded key format, must be <curve>:<encoded key>")}};k2.KeyPair=m9});var tH=G(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.PublicKey=Gn.KeyPairSecp256k1=Gn.KeyPairEd25519=Gn.KeyPair=Gn.KeyType=void 0;var Hwe=yh();Object.defineProperty(Gn,"KeyType",{enumerable:!0,get:function(){return Hwe.KeyType}});var Gwe=eH();Object.defineProperty(Gn,"KeyPair",{enumerable:!0,get:function(){return Gwe.KeyPair}});var Wwe=u9();Object.defineProperty(Gn,"KeyPairEd25519",{enumerable:!0,get:function(){return Wwe.KeyPairEd25519}});var Vwe=h9();Object.defineProperty(Gn,"KeyPairSecp256k1",{enumerable:!0,get:function(){return Vwe.KeyPairSecp256k1}});var Ywe=C2();Object.defineProperty(Gn,"PublicKey",{enumerable:!0,get:function(){return Ywe.PublicKey}})});var rH=G(vr=>{"use strict";var Zwe=vr&&vr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Jwe=vr&&vr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Xwe=vr&&vr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Zwe(e,t,r);return Jwe(e,t),e},Qwe=vr&&vr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(vr,"__esModule",{value:!0});vr.authPayloadSchema=vr.AuthPayload=void 0;vr.verifySignature=n6e;var e6e=Xwe(zz()),t6e=Qwe(Kz()),r6e=tH(),$2=class{message;recipient;nonce;callbackUrl;tag;constructor({message:e,nonce:r,recipient:n}){this.tag=2147484061,this.message=e,this.nonce=r,this.recipient=n}};vr.AuthPayload=$2;vr.authPayloadSchema={struct:{tag:"u32",message:"string",nonce:{array:{type:"u8",len:32}},recipient:"string",callbackUrl:{option:"string"}}};function n6e(t,e){let r=new $2(t),n=e6e.serialize(vr.authPayloadSchema,r),o=Uint8Array.from(t6e.default.sha256.array(n)),i=new Uint8Array(Buffer.from(e.signature,"base64"));return r6e.PublicKey.from(e.publicKey).verify(o,i)}});var y9=G((Bot,oH)=>{var o6e=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function i6e(t){return o6e.test(t)}function nH(){var t=URL.createObjectURL(new Blob),e=t.toString();return URL.revokeObjectURL(t),e.split(/[:\/]/g).pop().toLowerCase()}nH.valid=i6e;oH.exports=nH});var aH=G((Oot,iH)=>{(function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e={rotl:function(r,n){return r<<n|r>>>32-n},rotr:function(r,n){return r<<32-n|r>>>n},endian:function(r){if(r.constructor==Number)return e.rotl(r,8)&16711935|e.rotl(r,24)&4278255360;for(var n=0;n<r.length;n++)r[n]=e.endian(r[n]);return r},randomBytes:function(r){for(var n=[];r>0;r--)n.push(Math.floor(Math.random()*256));return n},bytesToWords:function(r){for(var n=[],o=0,i=0;o<r.length;o++,i+=8)n[i>>>5]|=r[o]<<24-i%32;return n},wordsToBytes:function(r){for(var n=[],o=0;o<r.length*32;o+=8)n.push(r[o>>>5]>>>24-o%32&255);return n},bytesToHex:function(r){for(var n=[],o=0;o<r.length;o++)n.push((r[o]>>>4).toString(16)),n.push((r[o]&15).toString(16));return n.join("")},hexToBytes:function(r){for(var n=[],o=0;o<r.length;o+=2)n.push(parseInt(r.substr(o,2),16));return n},bytesToBase64:function(r){for(var n=[],o=0;o<r.length;o+=3)for(var i=r[o]<<16|r[o+1]<<8|r[o+2],a=0;a<4;a++)o*8+a*6<=r.length*8?n.push(t.charAt(i>>>6*(3-a)&63)):n.push("=");return n.join("")},base64ToBytes:function(r){r=r.replace(/[^A-Z0-9+\/]/ig,"");for(var n=[],o=0,i=0;o<r.length;i=++o%4)i!=0&&n.push((t.indexOf(r.charAt(o-1))&Math.pow(2,-2*i+8)-1)<<i*2|t.indexOf(r.charAt(o))>>>6-i*2);return n}};iH.exports=e})()});var g9=G((Pot,sH)=>{var b9={utf8:{stringToBytes:function(t){return b9.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(b9.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],r=0;r<t.length;r++)e.push(t.charCodeAt(r)&255);return e},bytesToString:function(t){for(var e=[],r=0;r<t.length;r++)e.push(String.fromCharCode(t[r]));return e.join("")}}};sH.exports=b9});var fH=G((Rot,cH)=>{(function(){var t=aH(),e=g9().utf8,r=g9().bin,n=function(i){i.constructor==String?i=e.stringToBytes(i):typeof Buffer<"u"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(i)?i=Array.prototype.slice.call(i,0):Array.isArray(i)||(i=i.toString());var a=t.bytesToWords(i),s=i.length*8,c=[],u=1732584193,f=-271733879,l=-1732584194,h=271733878,m=-1009589776;a[s>>5]|=128<<24-s%32,a[(s+64>>>9<<4)+15]=s;for(var x=0;x<a.length;x+=16){for(var S=u,O=f,P=l,F=h,B=m,R=0;R<80;R++){if(R<16)c[R]=a[x+R];else{var L=c[R-3]^c[R-8]^c[R-14]^c[R-16];c[R]=L<<1|L>>>31}var T=(u<<5|u>>>27)+m+(c[R]>>>0)+(R<20?(f&l|~f&h)+1518500249:R<40?(f^l^h)+1859775393:R<60?(f&l|f&h|l&h)-1894007588:(f^l^h)-899497514);m=h,h=l,l=f<<30|f>>>2,f=u,u=T}u+=S,f+=O,l+=P,h+=F,m+=B}return[u,f,l,h,m]},o=function(i,a){var s=t.wordsToBytes(n(i));return a&&a.asBytes?s:a&&a.asString?r.bytesToString(s):t.bytesToHex(s)};o._blocksize=16,o._digestsize=20,cH.exports=o})()});var dH=G(Yt=>{"use strict";var uH=Yt&&Yt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Yt,"__esModule",{value:!0});Yt.createRequest=Yt.computeRequestId=Yt.deleteRequest=Yt.getResponse=Yt.proxyApi=void 0;var a6e=uH(fH()),s6e=uH(y9()),c6e=Bl();Yt.proxyApi="https://h4n.app";var f6e=async t=>{let e=await fetch(`${Yt.proxyApi}/${t}/response`,{headers:{"content-type":"application/json"},method:"GET"});if(e.ok===!1)throw Error(await e.text());let{data:r}=await e.json();return JSON.parse(r)};Yt.getResponse=f6e;var u6e=async t=>{let e=await fetch(`${Yt.proxyApi}/${t}`,{headers:{"content-type":"application/json"},method:"DELETE"});if(e.ok===!1)throw Error(await e.text())};Yt.deleteRequest=u6e;var d6e=async t=>{let e=(0,c6e.baseEncode)(JSON.stringify({...t,_id:(0,s6e.default)()})),r=(0,a6e.default)(e);return{requestId:Buffer.from(r,"hex").toString("base64").replaceAll("/","_").replaceAll("-","+").slice(0,13),query:e}};Yt.computeRequestId=d6e;var l6e=async(t,e)=>{let{query:r,requestId:n}=await(0,Yt.computeRequestId)(t),o=await fetch(`${Yt.proxyApi}/${n}/request`,{body:JSON.stringify({data:r}),headers:{"content-type":"application/json"},method:"POST",signal:e});if(o.ok===!1)throw Error(await o.text());return n};Yt.createRequest=l6e});var mH=G(Ii=>{"use strict";var p6e=Ii&&Ii.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ii,"__esModule",{value:!0});Ii.RequestFailed=Ii.wait=void 0;var lH=p6e(y9()),pH=Bl(),hH=dH(),h6e=t=>new Promise(e=>setTimeout(e,t));Ii.wait=h6e;var F2=class extends Error{payload;name="RequestFailed";constructor(e){super(),this.payload=e}};Ii.RequestFailed=F2;var Ct;typeof window<"u"&&window.addEventListener("message",t=>{t.data==="hot-close"&&(Ct?.remove(),Ct=void 0)});var m6e=t=>{Ct?.remove(),Ct=document.createElement("div");let e=document.createElement("iframe");return Ct?.appendChild(e),e.src=t,e.allow="usb",e.style.border="none",e.style.borderRadius="16px",e.style.background="#fff",e.style.overflow="hidden",e.style.background="#1D1F20",e.style.border="1px solid #2C3034",e.style.width="375px",e.style.height="560px",Ct.style.padding="16px",Ct.style.zIndex="100000000000000",Ct.style.position="fixed",Ct.style.display="flex",Ct.style.justifyContent="center",Ct.style.alignItems="center",Ct.style.top="0",Ct.style.left="0",Ct.style.width="100%",Ct.style.height="100%",Ct.style.background="rgba(0, 0, 0, 0.1)",Ct.style.backdropFilter="blur(24px)",document.body.appendChild(Ct),Ct},v9=class{walletId="https://t.me/herewalletbot/app";ancestorOrigins=["http://localhost:1234","https://my.herewallet.app","https://tgapp-dev.herewallet.app","https://tgapp.herewallet.app","https://beta.herewallet.app"];connection=new Promise(e=>{if(typeof window>"u"||window?.self===window?.top)return e(null);this.injectedRequest("initialized",{}).then(e).catch(()=>e(null))});get isInjected(){return typeof window>"u"?!1:window.hotExtension!=null?window.hotExtension.autoRun:this.ancestorOrigins.includes(window.location.ancestorOrigins?.[0])}openInHotBrowserUrl=null;toggleOpenInHotBrowser(e){this.openInHotBrowserUrl=e}customProvider;setupEthProvider(e){this.customProvider=e}async injectedRequest(e,r){let n=(0,lH.default)();return new Promise((o,i)=>{let a=s=>{if(s.data.id===n)return window?.removeEventListener("message",a),s.data.success?o(s.data.payload):i(s.data.payload)};window?.parent.postMessage({$hot:!0,method:e,request:r,id:n},"*"),window?.addEventListener("message",a)})}subscribe(e,r){return window.hotExtension?window.hotExtension.subscribe(e,r):()=>{}}async request(e,r){if(window.hotExtension!=null)return window.hotExtension.request(e,r);if(this.isInjected)return this.injectedRequest(e,r);let n=(0,lH.default)(),o=window?.Telegram?.WebApp,i=await(0,hH.createRequest)({inside:!!this.openInHotBrowserUrl||e==="ethereum"&&this.customProvider==null,origin:typeof this.openInHotBrowserUrl=="string"?this.openInHotBrowserUrl:location.href,$hot:!0,method:e,request:r,id:n}),a=`${this.walletId}?startapp=hotconnect-${(0,pH.baseEncode)(i)}`;o?o?.openTelegramLink(a):m6e(`https://hot-labs.org/hot-widget/index.html?hotconnect-${(0,pH.baseEncode)(i)}`);let s=async()=>{await(0,Ii.wait)(3e3);let u=await(0,hH.getResponse)(i).catch(()=>null);if(u==null)return await s();if(u.success)return u.payload;throw new F2(u.payload)},c=await s();return Ct?.remove(),c}};Ii.default=new v9});var bH=G(on=>{"use strict";var y6e=on&&on.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(on,"__esModule",{value:!0});on.RequestFailed=on.HOT=on.authPayloadSchema=on.AuthPayload=on.verifySignature=void 0;var x9=rH();Object.defineProperty(on,"verifySignature",{enumerable:!0,get:function(){return x9.verifySignature}});Object.defineProperty(on,"AuthPayload",{enumerable:!0,get:function(){return x9.AuthPayload}});Object.defineProperty(on,"authPayloadSchema",{enumerable:!0,get:function(){return x9.authPayloadSchema}});var yH=mH();Object.defineProperty(on,"HOT",{enumerable:!0,get:function(){return y6e(yH).default}});Object.defineProperty(on,"RequestFailed",{enumerable:!0,get:function(){return yH.RequestFailed}})});var OV={};r0(OV,{setupHotWallet:()=>_Se});function an(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(f){try{u(n.next(f))}catch(l){a(l)}}function c(f){try{u(n.throw(f))}catch(l){a(l)}}function u(f){f.done?i(f.value):o(f.value).then(s,c)}u((n=n.apply(t,e||[])).next())})}function _Se(){return()=>an(this,void 0,void 0,function*(){return{id:"hot-wallet",type:"injected",metadata:{name:"HOT Wallet",description:"Multichain wallet under HOT Protocol",downloadUrl:"https://hot-labs.org/wallet",iconUrl:"https://storage.herewallet.app/logo.png",topLevelInjected:Br.HOT.isInjected,useUrlAccountImport:!1,deprecated:!1,available:!0},init:t=>an(this,void 0,void 0,function*(){return Br.HOT.subscribe("near:accountsChanged",e=>t.emitter.emit("accountsChanged",e)),Br.HOT.subscribe("near:signedOut",e=>t.emitter.emit("signedOut",e)),Br.HOT.subscribe("near:signedIn",e=>t.emitter.emit("signedIn",e)),{getAccounts(){return an(this,void 0,void 0,function*(){try{if(Br.HOT.isInjected)return[yield Br.HOT.request("near:signIn",{})];let e=yield t.storage.getItem("hot:near-account");return JSON.parse(String(e))}catch{return[]}})},signIn(e){var r;return an(this,void 0,void 0,function*(){let n=yield Br.HOT.request("near:signIn",{}),o=[{accountId:n.accountId,publicKey:n.publicKey}];return t.storage.setItem("hot:near-account",JSON.stringify(o)),t.emitter.emit("signedIn",{contractId:e.contractId,methodNames:(r=e.methodNames)!==null&&r!==void 0?r:[],accounts:o}),o})},signOut(){return an(this,void 0,void 0,function*(){Br.HOT.isInjected&&Br.HOT.request("near:signOut",{}),t.emitter.emit("signedOut",null),t.storage.setItem("hot:near-account","[]")})},signMessage(e){return an(this,void 0,void 0,function*(){let r={message:e.message,nonce:Array.from(new Uint8Array(e.nonce)),recipient:e.recipient},n=yield Br.HOT.request("near:signMessage",r);if(!(0,Br.verifySignature)(r,n))throw"Signature invalid";return n})},signAndSendTransaction(e){var r;return an(this,void 0,void 0,function*(){let n=e.receiverId||((r=t.store.getState().contract)===null||r===void 0?void 0:r.contractId),{transactions:o}=yield Br.HOT.request("near:signAndSendTransactions",{transactions:[{actions:e.actions.map(i=>vf(i)),signerId:e.signerId,receiverId:n||""}]});return o[0]})},signAndSendTransactions(e){return an(this,void 0,void 0,function*(){let r=e.transactions.map(o=>Object.assign(Object.assign({},o),{actions:o.actions.map(i=>vf(i))})),{transactions:n}=yield Br.HOT.request("near:signAndSendTransactions",r);return n})},verifyOwner(){return an(this,void 0,void 0,function*(){throw Error("HOT:verifyOwner is deprecated, use signMessage method with implementation NEP0413 Standard")})},createSignedTransaction(e,r){return an(this,void 0,void 0,function*(){throw t.logger.log("HOTWallet:createSignedTransaction",{actions:r,receiverId:e}),new Error("Method not supported by HOT Wallet")})},signTransaction(e){return an(this,void 0,void 0,function*(){throw t.logger.log("signTransaction",{transaction:e}),new Error("Method not supported by HOT Wallet")})},getPublicKey(){return an(this,void 0,void 0,function*(){throw t.logger.log("getPublicKey",{}),new Error("Method not supported by HOT Wallet")})},signNep413Message(e,r,n,o,i){return an(this,void 0,void 0,function*(){throw t.logger.log("signNep413Message",{message:e,accountId:r,recipient:n,nonce:o,callbackUrl:i}),new Error("Method not supported by HOT Wallet")})},signDelegateAction(e){return an(this,void 0,void 0,function*(){throw t.logger.log("signDelegateAction",{delegateAction:e}),new Error("Method not supported by HOT Wallet")})}}})}})}var Br,L2,Lt,b6e,fx,nW,oW,Z9,g6e,ir,iW,v6e,x6e,ux,w6e,E6e,A6e,w9,_6e,wS,ES,S6e,I6e,AS,T6e,B6e,Lh,Th,jt,dx,gH,O6e,_S,P6e,R6e,vH,xH,wH,aW,C6e,N6e,Cf,M6e,k6e,$6e,No,F6e,L6e,j6e,U6e,SS,D6e,EH,AH,lx,sW,E9,_H,SH,IH,TH,Ro,tx,cW,BH,z6e,K6e,q6e,fW,H6e,uW,G6e,W6e,OH,V6e,Y6e,Z6e,Ll,A9,J6e,In,_9,ar,X6e,Tn,Q6e,e5e,t5e,Kl,dW,r5e,cn,n5e,o5e,lW,Oi,i5e,PH,J9,a5e,pW,s5e,c5e,f5e,hW,u5e,j2,Pi,S9,d5e,l5e,jh,p5e,px,h5e,m5e,y5e,b5e,g5e,IS,v5e,hx,x5e,w5e,E5e,Uh,A5e,_5e,mW,I9,T9,B9,S5e,I5e,T5e,RH,CH,B5e,O5e,P5e,R5e,C5e,yW,N5e,M5e,TS,k5e,$5e,F5e,U2,NH,L5e,O9,j5e,P9,R9,C9,U5e,D5e,z5e,K5e,Dh,q5e,H5e,G5e,BS,W5e,V5e,zh,Y5e,ql,Z5e,J5e,X5e,MH,Q5e,OS,e8e,N9,t8e,r8e,n8e,kH,bW,PS,o8e,i8e,gW,a8e,s8e,c8e,f8e,u8e,d8e,l8e,p8e,h8e,m8e,$H,RS,y8e,b8e,FH,g8e,v8e,x8e,w8e,LH,jH,X9,Q9,vW,M9,xW,UH,E8e,D2,X2,CS,A8e,_8e,S8e,eS,tS,I8e,Kh,T8e,B8e,DH,O8e,mx,P8e,R8e,C8e,Hl,N8e,wW,M8e,k8e,k9,$9,$8e,F8e,zH,rS,L8e,rx,$h,nx,j8e,U8e,Oo,Bf,qh,yx,NS,EW,AW,D8e,z8e,K8e,q8e,H8e,G8e,W8e,V8e,Y8e,KH,MS,nS,Z8e,_W,J8e,kS,X8e,Q8e,$S,e3e,t3e,oS,r3e,SW,FS,n3e,o3e,z2,iS,i3e,a3e,IW,s3e,c3e,qH,Q2,f3e,u3e,d3e,l3e,p3e,h3e,m3e,y3e,b3e,g3e,Hh,LS,v3e,x3e,w3e,jS,E3e,A3e,_3e,S3e,I3e,T3e,B3e,HH,O3e,P3e,R3e,TW,C3e,N3e,M3e,Gh,k3e,$3e,F3e,L3e,j3e,K2,U3e,D3e,z3e,K3e,q3e,H3e,Wh,G3e,W3e,V3e,Y3e,Z3e,J3e,X3e,GH,aS,Q3e,bx,e4e,t4e,r4e,WH,n4e,o4e,sS,BW,Rf,F9,L9,i4e,OW,a4e,s4e,c4e,VH,US,f4e,u4e,d4e,l4e,p4e,h4e,m4e,y4e,b4e,g4e,v4e,x4e,w4e,E4e,A4e,_4e,S4e,I4e,T4e,B4e,Vh,O4e,P4e,PW,R4e,C4e,YH,ZH,N4e,M4e,j9,k4e,$4e,RW,F4e,L4e,JH,q2,Bh,XH,Oh,QH,j4e,U4e,D4e,z4e,DS,eG,CW,K4e,q4e,H2,H4e,NW,G4e,W4e,tG,MW,rG,V4e,gx,Y4e,Z4e,J4e,X4e,kW,Q4e,eEe,tEe,$W,rEe,nEe,nG,oEe,iEe,aEe,sEe,cEe,fEe,uEe,dEe,lEe,pEe,hEe,mEe,yEe,Aa,bEe,gEe,vEe,xEe,wEe,EEe,AEe,oG,_Ee,FW,SEe,zS,IEe,TEe,iG,LW,vx,KS,U9,BEe,jW,OEe,PEe,aG,D9,G2,REe,CEe,ox,NEe,UW,MEe,sG,kEe,$Ee,FEe,LEe,DW,qS,jEe,cG,jl,xx,Ul,UEe,zW,fG,kh,uG,Po,Sn,$l,Ti,Of,dG,DEe,ix,zEe,KEe,KW,lG,pG,hG,mG,yG,qEe,HEe,W2,Zs,Js,z9,Ph,K9,HS,GEe,WEe,VEe,YEe,bG,qW,ZEe,JEe,XEe,QEe,GS,gG,eAe,tAe,rAe,WS,nAe,VS,oAe,HW,vG,xG,iAe,YS,cS,GW,wG,aAe,sAe,cAe,EG,fAe,uAe,dAe,q9,lAe,pAe,hAe,mAe,Fl,AG,yAe,bAe,gAe,_G,fS,vAe,WW,VW,SG,H9,xAe,wAe,EAe,YW,AAe,_Ae,SAe,ex,IAe,TAe,BAe,OAe,PAe,Gl,RAe,ZS,Or,ZW,wx,ec,JS,CAe,NAe,uS,MAe,kAe,Ex,Wl,$Ae,FAe,JW,XW,LAe,ax,dS,IG,TG,Bi,Co,jAe,XS,BG,lS,sx,_a,QW,sn,Qs,Dl,Sa,QS,UAe,eV,tV,DAe,zAe,KAe,qAe,Nf,rV,G9,HAe,GAe,WAe,Pf,VAe,YAe,ZAe,JAe,XAe,QAe,e_e,t_e,r_e,nV,n_e,o_e,OG,i_e,a_e,s_e,oV,c_e,f_e,iV,u_e,d_e,l_e,aV,sV,eI,p_e,h_e,Rh,cV,fV,m_e,y_e,b_e,g_e,v_e,PG,x_e,w_e,E_e,A_e,uV,__e,S_e,I_e,T_e,B_e,O_e,P_e,R_e,C_e,N_e,M_e,k_e,$_e,F_e,L_e,j_e,dV,U_e,D_e,z_e,K_e,q_e,H_e,G_e,W_e,V_e,Y_e,Z_e,J_e,X_e,Q_e,RG,e9e,t9e,r9e,n9e,CG,o9e,i9e,a9e,s9e,c9e,f9e,u9e,d9e,l9e,NG,Xs,p9e,h9e,m9e,MG,lV,kG,y9e,b9e,Yh,pV,$G,g9e,Ch,v9e,x9e,FG,W9,w9e,hV,Nh,E9e,pS,A9e,_9e,S9e,V2,I9e,LG,T9e,B9e,O9e,mV,yV,jG,tI,P9e,hS,R9e,C9e,bV,N9e,V9,gV,M9e,k9e,Y2,UG,DG,Mh,mS,Z2,Y9,J2,zG,vV,KG,qG,$9e,xV,F9e,L9e,j9e,U9e,D9e,z9e,K9e,q9e,H9e,G9e,wV,EV,rI,W9e,V9e,Y9e,AV,Z9e,yS,HG,_V,J9e,X9e,bS,Q9e,GG,eSe,gS,tSe,rSe,WG,nSe,oSe,iSe,aSe,VG,sSe,cSe,fSe,vS,uSe,dSe,SV,YG,lSe,ZG,JG,pSe,hSe,Fh,zl,mSe,XG,ySe,bSe,IV,QG,eW,gSe,vSe,xSe,TV,xS,tW,cx,rW,wSe,BV,ESe,ASe,PV=N(()=>{qv();Br=Jt(bH(),1),L2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},Lt=function(t){try{return!!t()}catch{return!0}},b6e=Lt,fx=!b6e(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),nW=fx,oW=Function.prototype,Z9=oW.call,g6e=nW&&oW.bind.bind(Z9,Z9),ir=nW?g6e:function(t){return function(){return Z9.apply(t,arguments)}},iW=ir,v6e=iW({}.toString),x6e=iW("".slice),ux=function(t){return x6e(v6e(t),8,-1)},w6e=ir,E6e=Lt,A6e=ux,w9=Object,_6e=w6e("".split),wS=E6e(function(){return!w9("z").propertyIsEnumerable(0)})?function(t){return A6e(t)==="String"?_6e(t,""):w9(t)}:w9,ES=function(t){return t==null},S6e=ES,I6e=TypeError,AS=function(t){if(S6e(t))throw new I6e("Can't call method on "+t);return t},T6e=wS,B6e=AS,Lh=function(t){return T6e(B6e(t))},Th=function(t){return t&&t.Math===Math&&t},jt=Th(typeof globalThis=="object"&&globalThis)||Th(typeof window=="object"&&window)||Th(typeof self=="object"&&self)||Th(typeof L2=="object"&&L2)||Th(typeof L2=="object"&&L2)||(function(){return this})()||globalThis,dx={exports:{}},gH=jt,O6e=Object.defineProperty,_S=function(t,e){try{O6e(gH,t,{value:e,configurable:!0,writable:!0})}catch{gH[t]=e}return e},P6e=jt,R6e=_S,vH="__core-js_shared__",xH=dx.exports=P6e[vH]||R6e(vH,{});(xH.versions||(xH.versions=[])).push({version:"3.41.0",mode:"global",copyright:"\xA9 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.41.0/LICENSE",source:"https://github.com/zloirock/core-js"});wH=dx.exports,aW=function(t,e){return wH[t]||(wH[t]=e||{})},C6e=AS,N6e=Object,Cf=function(t){return N6e(C6e(t))},M6e=ir,k6e=Cf,$6e=M6e({}.hasOwnProperty),No=Object.hasOwn||function(e,r){return $6e(k6e(e),r)},F6e=ir,L6e=0,j6e=Math.random(),U6e=F6e(1 .toString),SS=function(t){return"Symbol("+(t===void 0?"":t)+")_"+U6e(++L6e+j6e,36)},D6e=jt,EH=D6e.navigator,AH=EH&&EH.userAgent,lx=AH?String(AH):"",sW=jt,E9=lx,_H=sW.process,SH=sW.Deno,IH=_H&&_H.versions||SH&&SH.version,TH=IH&&IH.v8;TH&&(Ro=TH.split("."),tx=Ro[0]>0&&Ro[0]<4?1:+(Ro[0]+Ro[1]));!tx&&E9&&(Ro=E9.match(/Edge\/(\d+)/),(!Ro||Ro[1]>=74)&&(Ro=E9.match(/Chrome\/(\d+)/),Ro&&(tx=+Ro[1])));cW=tx,BH=cW,z6e=Lt,K6e=jt,q6e=K6e.String,fW=!!Object.getOwnPropertySymbols&&!z6e(function(){var t=Symbol("symbol detection");return!q6e(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&BH&&BH<41}),H6e=fW,uW=H6e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",G6e=jt,W6e=aW,OH=No,V6e=SS,Y6e=fW,Z6e=uW,Ll=G6e.Symbol,A9=W6e("wks"),J6e=Z6e?Ll.for||Ll:Ll&&Ll.withoutSetter||V6e,In=function(t){return OH(A9,t)||(A9[t]=Y6e&&OH(Ll,t)?Ll[t]:J6e("Symbol."+t)),A9[t]},_9=typeof document=="object"&&document.all,ar=typeof _9>"u"&&_9!==void 0?function(t){return typeof t=="function"||t===_9}:function(t){return typeof t=="function"},X6e=ar,Tn=function(t){return typeof t=="object"?t!==null:X6e(t)},Q6e=Tn,e5e=String,t5e=TypeError,Kl=function(t){if(Q6e(t))return t;throw new t5e(e5e(t)+" is not an object")},dW={},r5e=Lt,cn=!r5e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),n5e=cn,o5e=Lt,lW=n5e&&o5e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Oi={},i5e=jt,PH=Tn,J9=i5e.document,a5e=PH(J9)&&PH(J9.createElement),pW=function(t){return a5e?J9.createElement(t):{}},s5e=cn,c5e=Lt,f5e=pW,hW=!s5e&&!c5e(function(){return Object.defineProperty(f5e("div"),"a",{get:function(){return 7}}).a!==7}),u5e=fx,j2=Function.prototype.call,Pi=u5e?j2.bind(j2):function(){return j2.apply(j2,arguments)},S9=jt,d5e=ar,l5e=function(t){return d5e(t)?t:void 0},jh=function(t,e){return arguments.length<2?l5e(S9[t]):S9[t]&&S9[t][e]},p5e=ir,px=p5e({}.isPrototypeOf),h5e=jh,m5e=ar,y5e=px,b5e=uW,g5e=Object,IS=b5e?function(t){return typeof t=="symbol"}:function(t){var e=h5e("Symbol");return m5e(e)&&y5e(e.prototype,g5e(t))},v5e=String,hx=function(t){try{return v5e(t)}catch{return"Object"}},x5e=ar,w5e=hx,E5e=TypeError,Uh=function(t){if(x5e(t))return t;throw new E5e(w5e(t)+" is not a function")},A5e=Uh,_5e=ES,mW=function(t,e){var r=t[e];return _5e(r)?void 0:A5e(r)},I9=Pi,T9=ar,B9=Tn,S5e=TypeError,I5e=function(t,e){var r,n;if(e==="string"&&T9(r=t.toString)&&!B9(n=I9(r,t))||T9(r=t.valueOf)&&!B9(n=I9(r,t))||e!=="string"&&T9(r=t.toString)&&!B9(n=I9(r,t)))return n;throw new S5e("Can't convert object to primitive value")},T5e=Pi,RH=Tn,CH=IS,B5e=mW,O5e=I5e,P5e=In,R5e=TypeError,C5e=P5e("toPrimitive"),yW=function(t,e){if(!RH(t)||CH(t))return t;var r=B5e(t,C5e),n;if(r){if(e===void 0&&(e="default"),n=T5e(r,t,e),!RH(n)||CH(n))return n;throw new R5e("Can't convert object to primitive value")}return e===void 0&&(e="number"),O5e(t,e)},N5e=yW,M5e=IS,TS=function(t){var e=N5e(t,"string");return M5e(e)?e:e+""},k5e=cn,$5e=hW,F5e=lW,U2=Kl,NH=TS,L5e=TypeError,O9=Object.defineProperty,j5e=Object.getOwnPropertyDescriptor,P9="enumerable",R9="configurable",C9="writable";Oi.f=k5e?F5e?function(e,r,n){if(U2(e),r=NH(r),U2(n),typeof e=="function"&&r==="prototype"&&"value"in n&&C9 in n&&!n[C9]){var o=j5e(e,r);o&&o[C9]&&(e[r]=n.value,n={configurable:R9 in n?n[R9]:o[R9],enumerable:P9 in n?n[P9]:o[P9],writable:!1})}return O9(e,r,n)}:O9:function(e,r,n){if(U2(e),r=NH(r),U2(n),$5e)try{return O9(e,r,n)}catch{}if("get"in n||"set"in n)throw new L5e("Accessors not supported");return"value"in n&&(e[r]=n.value),e};U5e=Math.ceil,D5e=Math.floor,z5e=Math.trunc||function(e){var r=+e;return(r>0?D5e:U5e)(r)},K5e=z5e,Dh=function(t){var e=+t;return e!==e||e===0?0:K5e(e)},q5e=Dh,H5e=Math.max,G5e=Math.min,BS=function(t,e){var r=q5e(t);return r<0?H5e(r+e,0):G5e(r,e)},W5e=Dh,V5e=Math.min,zh=function(t){var e=W5e(t);return e>0?V5e(e,9007199254740991):0},Y5e=zh,ql=function(t){return Y5e(t.length)},Z5e=Lh,J5e=BS,X5e=ql,MH=function(t){return function(e,r,n){var o=Z5e(e),i=X5e(o);if(i===0)return!t&&-1;var a=J5e(n,i),s;if(t&&r!==r){for(;i>a;)if(s=o[a++],s!==s)return!0}else for(;i>a;a++)if((t||a in o)&&o[a]===r)return t||a||0;return!t&&-1}},Q5e={includes:MH(!0),indexOf:MH(!1)},OS={},e8e=ir,N9=No,t8e=Lh,r8e=Q5e.indexOf,n8e=OS,kH=e8e([].push),bW=function(t,e){var r=t8e(t),n=0,o=[],i;for(i in r)!N9(n8e,i)&&N9(r,i)&&kH(o,i);for(;e.length>n;)N9(r,i=e[n++])&&(~r8e(o,i)||kH(o,i));return o},PS=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],o8e=bW,i8e=PS,gW=Object.keys||function(e){return o8e(e,i8e)},a8e=cn,s8e=lW,c8e=Oi,f8e=Kl,u8e=Lh,d8e=gW;dW.f=a8e&&!s8e?Object.defineProperties:function(e,r){f8e(e);for(var n=u8e(r),o=d8e(r),i=o.length,a=0,s;i>a;)c8e.f(e,s=o[a++],n[s]);return e};l8e=jh,p8e=l8e("document","documentElement"),h8e=aW,m8e=SS,$H=h8e("keys"),RS=function(t){return $H[t]||($H[t]=m8e(t))},y8e=Kl,b8e=dW,FH=PS,g8e=OS,v8e=p8e,x8e=pW,w8e=RS,LH=">",jH="<",X9="prototype",Q9="script",vW=w8e("IE_PROTO"),M9=function(){},xW=function(t){return jH+Q9+LH+t+jH+"/"+Q9+LH},UH=function(t){t.write(xW("")),t.close();var e=t.parentWindow.Object;return t=null,e},E8e=function(){var t=x8e("iframe"),e="java"+Q9+":",r;return t.style.display="none",v8e.appendChild(t),t.src=String(e),r=t.contentWindow.document,r.open(),r.write(xW("document.F=Object")),r.close(),r.F},X2=function(){try{D2=new ActiveXObject("htmlfile")}catch{}X2=typeof document<"u"?document.domain&&D2?UH(D2):E8e():UH(D2);for(var t=FH.length;t--;)delete X2[X9][FH[t]];return X2()};g8e[vW]=!0;CS=Object.create||function(e,r){var n;return e!==null?(M9[X9]=y8e(e),n=new M9,M9[X9]=null,n[vW]=e):n=X2(),r===void 0?n:b8e.f(n,r)},A8e=In,_8e=CS,S8e=Oi.f,eS=A8e("unscopables"),tS=Array.prototype;tS[eS]===void 0&&S8e(tS,eS,{configurable:!0,value:_8e(null)});I8e=function(t){tS[eS][t]=!0},Kh={},T8e=jt,B8e=ar,DH=T8e.WeakMap,O8e=B8e(DH)&&/native code/.test(String(DH)),mx=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}},P8e=cn,R8e=Oi,C8e=mx,Hl=P8e?function(t,e,r){return R8e.f(t,e,C8e(1,r))}:function(t,e,r){return t[e]=r,t},N8e=O8e,wW=jt,M8e=Tn,k8e=Hl,k9=No,$9=dx.exports,$8e=RS,F8e=OS,zH="Object already initialized",rS=wW.TypeError,L8e=wW.WeakMap,j8e=function(t){return nx(t)?$h(t):rx(t,{})},U8e=function(t){return function(e){var r;if(!M8e(e)||(r=$h(e)).type!==t)throw new rS("Incompatible receiver, "+t+" required");return r}};N8e||$9.state?(Oo=$9.state||($9.state=new L8e),Oo.get=Oo.get,Oo.has=Oo.has,Oo.set=Oo.set,rx=function(t,e){if(Oo.has(t))throw new rS(zH);return e.facade=t,Oo.set(t,e),e},$h=function(t){return Oo.get(t)||{}},nx=function(t){return Oo.has(t)}):(Bf=$8e("state"),F8e[Bf]=!0,rx=function(t,e){if(k9(t,Bf))throw new rS(zH);return e.facade=t,k8e(t,Bf,e),e},$h=function(t){return k9(t,Bf)?t[Bf]:{}},nx=function(t){return k9(t,Bf)});qh={set:rx,get:$h,has:nx,enforce:j8e,getterFor:U8e},yx={},NS={},EW={}.propertyIsEnumerable,AW=Object.getOwnPropertyDescriptor,D8e=AW&&!EW.call({1:2},1);NS.f=D8e?function(e){var r=AW(this,e);return!!r&&r.enumerable}:EW;z8e=cn,K8e=Pi,q8e=NS,H8e=mx,G8e=Lh,W8e=TS,V8e=No,Y8e=hW,KH=Object.getOwnPropertyDescriptor;yx.f=z8e?KH:function(e,r){if(e=G8e(e),r=W8e(r),Y8e)try{return KH(e,r)}catch{}if(V8e(e,r))return H8e(!K8e(q8e.f,e,r),e[r])};MS={exports:{}},nS=cn,Z8e=No,_W=Function.prototype,J8e=nS&&Object.getOwnPropertyDescriptor,kS=Z8e(_W,"name"),X8e=kS&&(function(){}).name==="something",Q8e=kS&&(!nS||nS&&J8e(_W,"name").configurable),$S={EXISTS:kS,PROPER:X8e,CONFIGURABLE:Q8e},e3e=ir,t3e=ar,oS=dx.exports,r3e=e3e(Function.toString);t3e(oS.inspectSource)||(oS.inspectSource=function(t){return r3e(t)});SW=oS.inspectSource,FS=ir,n3e=Lt,o3e=ar,z2=No,iS=cn,i3e=$S.CONFIGURABLE,a3e=SW,IW=qh,s3e=IW.enforce,c3e=IW.get,qH=String,Q2=Object.defineProperty,f3e=FS("".slice),u3e=FS("".replace),d3e=FS([].join),l3e=iS&&!n3e(function(){return Q2(function(){},"length",{value:8}).length!==8}),p3e=String(String).split("String"),h3e=MS.exports=function(t,e,r){f3e(qH(e),0,7)==="Symbol("&&(e="["+u3e(qH(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!z2(t,"name")||i3e&&t.name!==e)&&(iS?Q2(t,"name",{value:e,configurable:!0}):t.name=e),l3e&&r&&z2(r,"arity")&&t.length!==r.arity&&Q2(t,"length",{value:r.arity});try{r&&z2(r,"constructor")&&r.constructor?iS&&Q2(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch{}var n=s3e(t);return z2(n,"source")||(n.source=d3e(p3e,typeof e=="string"?e:"")),t};Function.prototype.toString=h3e(function(){return o3e(this)&&c3e(this).source||a3e(this)},"toString");m3e=ar,y3e=Oi,b3e=MS.exports,g3e=_S,Hh=function(t,e,r,n){n||(n={});var o=n.enumerable,i=n.name!==void 0?n.name:e;if(m3e(r)&&b3e(r,i,n),n.global)o?t[e]=r:g3e(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch{}o?t[e]=r:y3e.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},LS={},v3e=bW,x3e=PS,w3e=x3e.concat("length","prototype");LS.f=Object.getOwnPropertyNames||function(e){return v3e(e,w3e)};jS={};jS.f=Object.getOwnPropertySymbols;E3e=jh,A3e=ir,_3e=LS,S3e=jS,I3e=Kl,T3e=A3e([].concat),B3e=E3e("Reflect","ownKeys")||function(e){var r=_3e.f(I3e(e)),n=S3e.f;return n?T3e(r,n(e)):r},HH=No,O3e=B3e,P3e=yx,R3e=Oi,TW=function(t,e,r){for(var n=O3e(e),o=R3e.f,i=P3e.f,a=0;a<n.length;a++){var s=n[a];!HH(t,s)&&!(r&&HH(r,s))&&o(t,s,i(e,s))}},C3e=Lt,N3e=ar,M3e=/#|\.prototype\./,Gh=function(t,e){var r=$3e[k3e(t)];return r===L3e?!0:r===F3e?!1:N3e(e)?C3e(e):!!e},k3e=Gh.normalize=function(t){return String(t).replace(M3e,".").toLowerCase()},$3e=Gh.data={},F3e=Gh.NATIVE="N",L3e=Gh.POLYFILL="P",j3e=Gh,K2=jt,U3e=yx.f,D3e=Hl,z3e=Hh,K3e=_S,q3e=TW,H3e=j3e,Wh=function(t,e){var r=t.target,n=t.global,o=t.stat,i,a,s,c,u,f;if(n?a=K2:o?a=K2[r]||K3e(r,{}):a=K2[r]&&K2[r].prototype,a)for(s in e){if(u=e[s],t.dontCallGetSet?(f=U3e(a,s),c=f&&f.value):c=a[s],i=H3e(n?s:r+(o?".":"#")+s,t.forced),!i&&c!==void 0){if(typeof u==typeof c)continue;q3e(u,c)}(t.sham||c&&c.sham)&&D3e(u,"sham",!0),z3e(a,s,u,t)}},G3e=Lt,W3e=!G3e(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),V3e=No,Y3e=ar,Z3e=Cf,J3e=RS,X3e=W3e,GH=J3e("IE_PROTO"),aS=Object,Q3e=aS.prototype,bx=X3e?aS.getPrototypeOf:function(t){var e=Z3e(t);if(V3e(e,GH))return e[GH];var r=e.constructor;return Y3e(r)&&e instanceof r?r.prototype:e instanceof aS?Q3e:null},e4e=Lt,t4e=ar,r4e=Tn,WH=bx,n4e=Hh,o4e=In,sS=o4e("iterator"),BW=!1;[].keys&&(L9=[].keys(),"next"in L9?(F9=WH(WH(L9)),F9!==Object.prototype&&(Rf=F9)):BW=!0);i4e=!r4e(Rf)||e4e(function(){var t={};return Rf[sS].call(t)!==t});i4e&&(Rf={});t4e(Rf[sS])||n4e(Rf,sS,function(){return this});OW={IteratorPrototype:Rf,BUGGY_SAFARI_ITERATORS:BW},a4e=Oi.f,s4e=No,c4e=In,VH=c4e("toStringTag"),US=function(t,e,r){t&&!r&&(t=t.prototype),t&&!s4e(t,VH)&&a4e(t,VH,{configurable:!0,value:e})},f4e=OW.IteratorPrototype,u4e=CS,d4e=mx,l4e=US,p4e=Kh,h4e=function(){return this},m4e=function(t,e,r,n){var o=e+" Iterator";return t.prototype=u4e(f4e,{next:d4e(+!n,r)}),l4e(t,o,!1),p4e[o]=h4e,t},y4e=ir,b4e=Uh,g4e=function(t,e,r){try{return y4e(b4e(Object.getOwnPropertyDescriptor(t,e)[r]))}catch{}},v4e=Tn,x4e=function(t){return v4e(t)||t===null},w4e=x4e,E4e=String,A4e=TypeError,_4e=function(t){if(w4e(t))return t;throw new A4e("Can't set "+E4e(t)+" as a prototype")},S4e=g4e,I4e=Tn,T4e=AS,B4e=_4e,Vh=Object.setPrototypeOf||("__proto__"in{}?(function(){var t=!1,e={},r;try{r=S4e(Object.prototype,"__proto__","set"),r(e,[]),t=e instanceof Array}catch{}return function(o,i){return T4e(o),B4e(i),I4e(o)&&(t?r(o,i):o.__proto__=i),o}})():void 0),O4e=Wh,P4e=Pi,PW=$S,R4e=ar,C4e=m4e,YH=bx,ZH=Vh,N4e=US,M4e=Hl,j9=Hh,k4e=In,$4e=Kh,RW=OW,F4e=PW.PROPER,L4e=PW.CONFIGURABLE,JH=RW.IteratorPrototype,q2=RW.BUGGY_SAFARI_ITERATORS,Bh=k4e("iterator"),XH="keys",Oh="values",QH="entries",j4e=function(){return this},U4e=function(t,e,r,n,o,i,a){C4e(r,e,n);var s=function(P){if(P===o&&h)return h;if(!q2&&P&&P in f)return f[P];switch(P){case XH:return function(){return new r(this,P)};case Oh:return function(){return new r(this,P)};case QH:return function(){return new r(this,P)}}return function(){return new r(this)}},c=e+" Iterator",u=!1,f=t.prototype,l=f[Bh]||f["@@iterator"]||o&&f[o],h=!q2&&l||s(o),m=e==="Array"&&f.entries||l,x,S,O;if(m&&(x=YH(m.call(new t)),x!==Object.prototype&&x.next&&(YH(x)!==JH&&(ZH?ZH(x,JH):R4e(x[Bh])||j9(x,Bh,j4e)),N4e(x,c,!0))),F4e&&o===Oh&&l&&l.name!==Oh&&(L4e?M4e(f,"name",Oh):(u=!0,h=function(){return P4e(l,this)})),o)if(S={values:s(Oh),keys:i?h:s(XH),entries:s(QH)},a)for(O in S)(q2||u||!(O in f))&&j9(f,O,S[O]);else O4e({target:e,proto:!0,forced:q2||u},S);return f[Bh]!==h&&j9(f,Bh,h,{name:o}),$4e[e]=h,S},D4e=function(t,e){return{value:t,done:e}},z4e=Lh,DS=I8e,eG=Kh,CW=qh,K4e=Oi.f,q4e=U4e,H2=D4e,H4e=cn,NW="Array Iterator",G4e=CW.set,W4e=CW.getterFor(NW);q4e(Array,"Array",function(t,e){G4e(this,{type:NW,target:z4e(t),index:0,kind:e})},function(){var t=W4e(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,H2(void 0,!0);switch(t.kind){case"keys":return H2(r,!1);case"values":return H2(e[r],!1)}return H2([r,e[r]],!1)},"values");tG=eG.Arguments=eG.Array;DS("keys");DS("values");DS("entries");if(H4e&&tG.name!=="values")try{K4e(tG,"name",{value:"values"})}catch{}MW=typeof ArrayBuffer<"u"&&typeof DataView<"u",rG=MS.exports,V4e=Oi,gx=function(t,e,r){return r.get&&rG(r.get,e,{getter:!0}),r.set&&rG(r.set,e,{setter:!0}),V4e.f(t,e,r)},Y4e=Hh,Z4e=function(t,e,r){for(var n in e)Y4e(t,n,e[n],r);return t},J4e=px,X4e=TypeError,kW=function(t,e){if(J4e(e,t))return t;throw new X4e("Incorrect invocation")},Q4e=Dh,eEe=zh,tEe=RangeError,$W=function(t){if(t===void 0)return 0;var e=Q4e(t),r=eEe(e);if(e!==r)throw new tEe("Wrong length or index");return r},rEe=Math.sign||function(e){var r=+e;return r===0||r!==r?r:r<0?-1:1},nEe=2220446049250313e-31,nG=1/nEe,oEe=function(t){return t+nG-nG},iEe=rEe,aEe=oEe,sEe=Math.abs,cEe=2220446049250313e-31,fEe=function(t,e,r,n){var o=+t,i=sEe(o),a=iEe(o);if(i<n)return a*aEe(i/n/e)*n*e;var s=(1+e/cEe)*i,c=s-(s-i);return c>r||c!==c?a*(1/0):a*c},uEe=fEe,dEe=11920928955078125e-23,lEe=34028234663852886e22,pEe=11754943508222875e-54,hEe=Math.fround||function(e){return uEe(e,dEe,lEe,pEe)},mEe=Array,yEe=Math.abs,Aa=Math.pow,bEe=Math.floor,gEe=Math.log,vEe=Math.LN2,xEe=function(t,e,r){var n=mEe(r),o=r*8-e-1,i=(1<<o)-1,a=i>>1,s=e===23?Aa(2,-24)-Aa(2,-77):0,c=t<0||t===0&&1/t<0?1:0,u=0,f,l,h;for(t=yEe(t),t!==t||t===1/0?(l=t!==t?1:0,f=i):(f=bEe(gEe(t)/vEe),h=Aa(2,-f),t*h<1&&(f--,h*=2),f+a>=1?t+=s/h:t+=s*Aa(2,1-a),t*h>=2&&(f++,h/=2),f+a>=i?(l=0,f=i):f+a>=1?(l=(t*h-1)*Aa(2,e),f+=a):(l=t*Aa(2,a-1)*Aa(2,e),f=0));e>=8;)n[u++]=l&255,l/=256,e-=8;for(f=f<<e|l,o+=e;o>0;)n[u++]=f&255,f/=256,o-=8;return n[u-1]|=c*128,n},wEe=function(t,e){var r=t.length,n=r*8-e-1,o=(1<<n)-1,i=o>>1,a=n-7,s=r-1,c=t[s--],u=c&127,f;for(c>>=7;a>0;)u=u*256+t[s--],a-=8;for(f=u&(1<<-a)-1,u>>=-a,a+=e;a>0;)f=f*256+t[s--],a-=8;if(u===0)u=1-i;else{if(u===o)return f?NaN:c?-1/0:1/0;f+=Aa(2,e),u-=i}return(c?-1:1)*f*Aa(2,u-e)},EEe={pack:xEe,unpack:wEe},AEe=Cf,oG=BS,_Ee=ql,FW=function(e){for(var r=AEe(this),n=_Ee(r),o=arguments.length,i=oG(o>1?arguments[1]:void 0,n),a=o>2?arguments[2]:void 0,s=a===void 0?n:oG(a,n);s>i;)r[i++]=e;return r},SEe=ir,zS=SEe([].slice),IEe=ar,TEe=Tn,iG=Vh,LW=function(t,e,r){var n,o;return iG&&IEe(n=e.constructor)&&n!==r&&TEe(o=n.prototype)&&o!==r.prototype&&iG(t,o),t},vx=jt,KS=ir,U9=cn,BEe=MW,jW=$S,OEe=Hl,PEe=gx,aG=Z4e,D9=Lt,G2=kW,REe=Dh,CEe=zh,ox=$W,NEe=hEe,UW=EEe,MEe=bx,sG=Vh,kEe=FW,$Ee=zS,FEe=LW,LEe=TW,DW=US,qS=qh,jEe=jW.PROPER,cG=jW.CONFIGURABLE,jl="ArrayBuffer",xx="DataView",Ul="prototype",UEe="Wrong length",zW="Wrong index",fG=qS.getterFor(jl),kh=qS.getterFor(xx),uG=qS.set,Po=vx[jl],Sn=Po,$l=Sn&&Sn[Ul],Ti=vx[xx],Of=Ti&&Ti[Ul],dG=Object.prototype,DEe=vx.Array,ix=vx.RangeError,zEe=KS(kEe),KEe=KS([].reverse),KW=UW.pack,lG=UW.unpack,pG=function(t){return[t&255]},hG=function(t){return[t&255,t>>8&255]},mG=function(t){return[t&255,t>>8&255,t>>16&255,t>>24&255]},yG=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},qEe=function(t){return KW(NEe(t),23,4)},HEe=function(t){return KW(t,52,8)},W2=function(t,e,r){PEe(t[Ul],e,{configurable:!0,get:function(){return r(this)[e]}})},Zs=function(t,e,r,n){var o=kh(t),i=ox(r),a=!!n;if(i+e>o.byteLength)throw new ix(zW);var s=o.bytes,c=i+o.byteOffset,u=$Ee(s,c,c+e);return a?u:KEe(u)},Js=function(t,e,r,n,o,i){var a=kh(t),s=ox(r),c=n(+o),u=!!i;if(s+e>a.byteLength)throw new ix(zW);for(var f=a.bytes,l=s+a.byteOffset,h=0;h<e;h++)f[l+h]=c[u?h:e-h-1]};BEe?(z9=jEe&&Po.name!==jl,!D9(function(){Po(1)})||!D9(function(){new Po(-1)})||D9(function(){return new Po,new Po(1.5),new Po(NaN),Po.length!==1||z9&&!cG})?(Sn=function(e){return G2(this,$l),FEe(new Po(ox(e)),this,Sn)},Sn[Ul]=$l,$l.constructor=Sn,LEe(Sn,Po)):z9&&cG&&OEe(Po,"name",jl),sG&&MEe(Of)!==dG&&sG(Of,dG),Ph=new Ti(new Sn(2)),K9=KS(Of.setInt8),Ph.setInt8(0,2147483648),Ph.setInt8(1,2147483649),(Ph.getInt8(0)||!Ph.getInt8(1))&&aG(Of,{setInt8:function(e,r){K9(this,e,r<<24>>24)},setUint8:function(e,r){K9(this,e,r<<24>>24)}},{unsafe:!0})):(Sn=function(e){G2(this,$l);var r=ox(e);uG(this,{type:jl,bytes:zEe(DEe(r),0),byteLength:r}),U9||(this.byteLength=r,this.detached=!1)},$l=Sn[Ul],Ti=function(e,r,n){G2(this,Of),G2(e,$l);var o=fG(e),i=o.byteLength,a=REe(r);if(a<0||a>i)throw new ix("Wrong offset");if(n=n===void 0?i-a:CEe(n),a+n>i)throw new ix(UEe);uG(this,{type:xx,buffer:e,byteLength:n,byteOffset:a,bytes:o.bytes}),U9||(this.buffer=e,this.byteLength=n,this.byteOffset=a)},Of=Ti[Ul],U9&&(W2(Sn,"byteLength",fG),W2(Ti,"buffer",kh),W2(Ti,"byteLength",kh),W2(Ti,"byteOffset",kh)),aG(Of,{getInt8:function(e){return Zs(this,1,e)[0]<<24>>24},getUint8:function(e){return Zs(this,1,e)[0]},getInt16:function(e){var r=Zs(this,2,e,arguments.length>1?arguments[1]:!1);return(r[1]<<8|r[0])<<16>>16},getUint16:function(e){var r=Zs(this,2,e,arguments.length>1?arguments[1]:!1);return r[1]<<8|r[0]},getInt32:function(e){return yG(Zs(this,4,e,arguments.length>1?arguments[1]:!1))},getUint32:function(e){return yG(Zs(this,4,e,arguments.length>1?arguments[1]:!1))>>>0},getFloat32:function(e){return lG(Zs(this,4,e,arguments.length>1?arguments[1]:!1),23)},getFloat64:function(e){return lG(Zs(this,8,e,arguments.length>1?arguments[1]:!1),52)},setInt8:function(e,r){Js(this,1,e,pG,r)},setUint8:function(e,r){Js(this,1,e,pG,r)},setInt16:function(e,r){Js(this,2,e,hG,r,arguments.length>2?arguments[2]:!1)},setUint16:function(e,r){Js(this,2,e,hG,r,arguments.length>2?arguments[2]:!1)},setInt32:function(e,r){Js(this,4,e,mG,r,arguments.length>2?arguments[2]:!1)},setUint32:function(e,r){Js(this,4,e,mG,r,arguments.length>2?arguments[2]:!1)},setFloat32:function(e,r){Js(this,4,e,qEe,r,arguments.length>2?arguments[2]:!1)},setFloat64:function(e,r){Js(this,8,e,HEe,r,arguments.length>2?arguments[2]:!1)}}));DW(Sn,jl);DW(Ti,xx);HS={ArrayBuffer:Sn,DataView:Ti},GEe=jh,WEe=gx,VEe=In,YEe=cn,bG=VEe("species"),qW=function(t){var e=GEe(t);YEe&&e&&!e[bG]&&WEe(e,bG,{configurable:!0,get:function(){return this}})},ZEe=Wh,JEe=jt,XEe=HS,QEe=qW,GS="ArrayBuffer",gG=XEe[GS],eAe=JEe[GS];ZEe({global:!0,constructor:!0,forced:eAe!==gG},{ArrayBuffer:gG});QEe(GS);tAe=ux,rAe=ir,WS=function(t){if(tAe(t)==="Function")return rAe(t)},nAe=Wh,VS=WS,oAe=Lt,HW=HS,vG=Kl,xG=BS,iAe=zh,YS=HW.ArrayBuffer,cS=HW.DataView,GW=cS.prototype,wG=VS(YS.prototype.slice),aAe=VS(GW.getUint8),sAe=VS(GW.setUint8),cAe=oAe(function(){return!new YS(2).slice(1,void 0).byteLength});nAe({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:cAe},{slice:function(e,r){if(wG&&r===void 0)return wG(vG(this),e);for(var n=vG(this).byteLength,o=xG(e,n),i=xG(r===void 0?n:r,n),a=new YS(iAe(i-o)),s=new cS(this),c=new cS(a),u=0;o<i;)sAe(c,u++,aAe(s,o++));return a}});EG=cn,fAe=ir,uAe=Pi,dAe=Lt,q9=gW,lAe=jS,pAe=NS,hAe=Cf,mAe=wS,Fl=Object.assign,AG=Object.defineProperty,yAe=fAe([].concat),bAe=!Fl||dAe(function(){if(EG&&Fl({b:1},Fl(AG({},"a",{enumerable:!0,get:function(){AG(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var t={},e={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach(function(o){e[o]=o}),Fl({},t)[r]!==7||q9(Fl({},e)).join("")!==n})?function(e,r){for(var n=hAe(e),o=arguments.length,i=1,a=lAe.f,s=pAe.f;o>i;)for(var c=mAe(arguments[i++]),u=a?yAe(q9(c),a(c)):q9(c),f=u.length,l=0,h;f>l;)h=u[l++],(!EG||uAe(s,c,h))&&(n[h]=c[h]);return n}:Fl,gAe=Wh,_G=bAe;gAe({target:"Object",stat:!0,arity:2,forced:Object.assign!==_G},{assign:_G});fS={exports:{}},vAe=In,WW=vAe("iterator"),VW=!1;try{SG=0,H9={next:function(){return{done:!!SG++}},return:function(){VW=!0}},H9[WW]=function(){return this},Array.from(H9,function(){throw 2})}catch{}xAe=function(t,e){try{if(!e&&!VW)return!1}catch{return!1}var r=!1;try{var n={};n[WW]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch{}return r},wAe=In,EAe=wAe("toStringTag"),YW={};YW[EAe]="z";AAe=String(YW)==="[object z]",_Ae=AAe,SAe=ar,ex=ux,IAe=In,TAe=IAe("toStringTag"),BAe=Object,OAe=ex((function(){return arguments})())==="Arguments",PAe=function(t,e){try{return t[e]}catch{}},Gl=_Ae?ex:function(t){var e,r,n;return t===void 0?"Undefined":t===null?"Null":typeof(r=PAe(e=BAe(t),TAe))=="string"?r:OAe?ex(e):(n=ex(e))==="Object"&&SAe(e.callee)?"Arguments":n},RAe=MW,ZS=cn,Or=jt,ZW=ar,wx=Tn,ec=No,JS=Gl,CAe=hx,NAe=Hl,uS=Hh,MAe=gx,kAe=px,Ex=bx,Wl=Vh,$Ae=In,FAe=SS,JW=qh,XW=JW.enforce,LAe=JW.get,ax=Or.Int8Array,dS=ax&&ax.prototype,IG=Or.Uint8ClampedArray,TG=IG&&IG.prototype,Bi=ax&&Ex(ax),Co=dS&&Ex(dS),jAe=Object.prototype,XS=Or.TypeError,BG=$Ae("toStringTag"),lS=FAe("TYPED_ARRAY_TAG"),sx="TypedArrayConstructor",_a=RAe&&!!Wl&&JS(Or.opera)!=="Opera",QW=!1,Sa={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},QS={BigInt64Array:8,BigUint64Array:8},UAe=function(e){if(!wx(e))return!1;var r=JS(e);return r==="DataView"||ec(Sa,r)||ec(QS,r)},eV=function(t){var e=Ex(t);if(wx(e)){var r=LAe(e);return r&&ec(r,sx)?r[sx]:eV(e)}},tV=function(t){if(!wx(t))return!1;var e=JS(t);return ec(Sa,e)||ec(QS,e)},DAe=function(t){if(tV(t))return t;throw new XS("Target is not a typed array")},zAe=function(t){if(ZW(t)&&(!Wl||kAe(Bi,t)))return t;throw new XS(CAe(t)+" is not a typed array constructor")},KAe=function(t,e,r,n){if(ZS){if(r)for(var o in Sa){var i=Or[o];if(i&&ec(i.prototype,t))try{delete i.prototype[t]}catch{try{i.prototype[t]=e}catch{}}}(!Co[t]||r)&&uS(Co,t,r?e:_a&&dS[t]||e,n)}},qAe=function(t,e,r){var n,o;if(ZS){if(Wl){if(r){for(n in Sa)if(o=Or[n],o&&ec(o,t))try{delete o[t]}catch{}}if(!Bi[t]||r)try{return uS(Bi,t,r?e:_a&&Bi[t]||e)}catch{}else return}for(n in Sa)o=Or[n],o&&(!o[t]||r)&&uS(o,t,e)}};for(sn in Sa)Qs=Or[sn],Dl=Qs&&Qs.prototype,Dl?XW(Dl)[sx]=Qs:_a=!1;for(sn in QS)Qs=Or[sn],Dl=Qs&&Qs.prototype,Dl&&(XW(Dl)[sx]=Qs);if((!_a||!ZW(Bi)||Bi===Function.prototype)&&(Bi=function(){throw new XS("Incorrect invocation")},_a))for(sn in Sa)Or[sn]&&Wl(Or[sn],Bi);if((!_a||!Co||Co===jAe)&&(Co=Bi.prototype,_a))for(sn in Sa)Or[sn]&&Wl(Or[sn].prototype,Co);_a&&Ex(TG)!==Co&&Wl(TG,Co);if(ZS&&!ec(Co,BG)){QW=!0,MAe(Co,BG,{configurable:!0,get:function(){return wx(this)?this[lS]:void 0}});for(sn in Sa)Or[sn]&&NAe(Or[sn],lS,sn)}Nf={NATIVE_ARRAY_BUFFER_VIEWS:_a,TYPED_ARRAY_TAG:QW&&lS,aTypedArray:DAe,aTypedArrayConstructor:zAe,exportTypedArrayMethod:KAe,exportTypedArrayStaticMethod:qAe,getTypedArrayConstructor:eV,isView:UAe,isTypedArray:tV,TypedArray:Bi,TypedArrayPrototype:Co},rV=jt,G9=Lt,HAe=xAe,GAe=Nf.NATIVE_ARRAY_BUFFER_VIEWS,WAe=rV.ArrayBuffer,Pf=rV.Int8Array,VAe=!GAe||!G9(function(){Pf(1)})||!G9(function(){new Pf(-1)})||!HAe(function(t){new Pf,new Pf(null),new Pf(1.5),new Pf(t)},!0)||G9(function(){return new Pf(new WAe(2),1,void 0).length!==1}),YAe=Tn,ZAe=Math.floor,JAe=Number.isInteger||function(e){return!YAe(e)&&isFinite(e)&&ZAe(e)===e},XAe=Dh,QAe=RangeError,e_e=function(t){var e=XAe(t);if(e<0)throw new QAe("The argument can't be less than 0");return e},t_e=e_e,r_e=RangeError,nV=function(t,e){var r=t_e(t);if(r%e)throw new r_e("Wrong offset");return r},n_e=Math.round,o_e=function(t){var e=n_e(t);return e<0?0:e>255?255:e&255},OG=WS,i_e=Uh,a_e=fx,s_e=OG(OG.bind),oV=function(t,e){return i_e(t),e===void 0?t:a_e?s_e(t,e):function(){return t.apply(e,arguments)}},c_e=ir,f_e=Lt,iV=ar,u_e=Gl,d_e=jh,l_e=SW,aV=function(){},sV=d_e("Reflect","construct"),eI=/^\s*(?:class|function)\b/,p_e=c_e(eI.exec),h_e=!eI.test(aV),Rh=function(e){if(!iV(e))return!1;try{return sV(aV,[],e),!0}catch{return!1}},cV=function(e){if(!iV(e))return!1;switch(u_e(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h_e||!!p_e(eI,l_e(e))}catch{return!0}};cV.sham=!0;fV=!sV||f_e(function(){var t;return Rh(Rh.call)||!Rh(Object)||!Rh(function(){t=!0})||t})?cV:Rh,m_e=fV,y_e=hx,b_e=TypeError,g_e=function(t){if(m_e(t))return t;throw new b_e(y_e(t)+" is not a constructor")},v_e=Gl,PG=mW,x_e=ES,w_e=Kh,E_e=In,A_e=E_e("iterator"),uV=function(t){if(!x_e(t))return PG(t,A_e)||PG(t,"@@iterator")||w_e[v_e(t)]},__e=Pi,S_e=Uh,I_e=Kl,T_e=hx,B_e=uV,O_e=TypeError,P_e=function(t,e){var r=arguments.length<2?B_e(t):e;if(S_e(r))return I_e(__e(r,t));throw new O_e(T_e(t)+" is not iterable")},R_e=In,C_e=Kh,N_e=R_e("iterator"),M_e=Array.prototype,k_e=function(t){return t!==void 0&&(C_e.Array===t||M_e[N_e]===t)},$_e=Gl,F_e=function(t){var e=$_e(t);return e==="BigInt64Array"||e==="BigUint64Array"},L_e=yW,j_e=TypeError,dV=function(t){var e=L_e(t,"number");if(typeof e=="number")throw new j_e("Can't convert number to bigint");return BigInt(e)},U_e=oV,D_e=Pi,z_e=g_e,K_e=Cf,q_e=ql,H_e=P_e,G_e=uV,W_e=k_e,V_e=F_e,Y_e=Nf.aTypedArrayConstructor,Z_e=dV,J_e=function(e){var r=z_e(this),n=K_e(e),o=arguments.length,i=o>1?arguments[1]:void 0,a=i!==void 0,s=G_e(n),c,u,f,l,h,m,x,S;if(s&&!W_e(s))for(x=H_e(n,s),S=x.next,n=[];!(m=D_e(S,x)).done;)n.push(m.value);for(a&&o>2&&(i=U_e(i,arguments[2])),u=q_e(n),f=new(Y_e(r))(u),l=V_e(f),c=0;u>c;c++)h=a?i(n[c],c):n[c],f[c]=l?Z_e(h):+h;return f},X_e=ux,Q_e=Array.isArray||function(e){return X_e(e)==="Array"},RG=Q_e,e9e=fV,t9e=Tn,r9e=In,n9e=r9e("species"),CG=Array,o9e=function(t){var e;return RG(t)&&(e=t.constructor,e9e(e)&&(e===CG||RG(e.prototype))?e=void 0:t9e(e)&&(e=e[n9e],e===null&&(e=void 0))),e===void 0?CG:e},i9e=o9e,a9e=function(t,e){return new(i9e(t))(e===0?0:e)},s9e=oV,c9e=ir,f9e=wS,u9e=Cf,d9e=ql,l9e=a9e,NG=c9e([].push),Xs=function(t){var e=t===1,r=t===2,n=t===3,o=t===4,i=t===6,a=t===7,s=t===5||i;return function(c,u,f,l){for(var h=u9e(c),m=f9e(h),x=d9e(m),S=s9e(u,f),O=0,P=l||l9e,F=e?P(c,x):r||a?P(c,0):void 0,B,R;x>O;O++)if((s||O in m)&&(B=m[O],R=S(B,O,h),t))if(e)F[O]=R;else if(R)switch(t){case 3:return!0;case 5:return B;case 6:return O;case 2:NG(F,B)}else switch(t){case 4:return!1;case 7:NG(F,B)}return i?-1:n||o?o:F}},p9e={forEach:Xs(0),map:Xs(1),filter:Xs(2),some:Xs(3),every:Xs(4),find:Xs(5),findIndex:Xs(6),filterReject:Xs(7)},h9e=ql,m9e=function(t,e,r){for(var n=0,o=arguments.length>2?r:h9e(e),i=new t(o);o>n;)i[n]=e[n++];return i},MG=Wh,lV=jt,kG=Pi,y9e=cn,b9e=VAe,Yh=Nf,pV=HS,$G=kW,g9e=mx,Ch=Hl,v9e=JAe,x9e=zh,FG=$W,W9=nV,w9e=o_e,hV=TS,Nh=No,E9e=Gl,pS=Tn,A9e=IS,_9e=CS,S9e=px,V2=Vh,I9e=LS.f,LG=J_e,T9e=p9e.forEach,B9e=qW,O9e=gx,mV=Oi,yV=yx,jG=m9e,tI=qh,P9e=LW,hS=tI.get,R9e=tI.set,C9e=tI.enforce,bV=mV.f,N9e=yV.f,V9=lV.RangeError,gV=pV.ArrayBuffer,M9e=gV.prototype,k9e=pV.DataView,Y2=Yh.NATIVE_ARRAY_BUFFER_VIEWS,UG=Yh.TYPED_ARRAY_TAG,DG=Yh.TypedArray,Mh=Yh.TypedArrayPrototype,mS=Yh.isTypedArray,Z2="BYTES_PER_ELEMENT",Y9="Wrong length",J2=function(t,e){O9e(t,e,{configurable:!0,get:function(){return hS(this)[e]}})},zG=function(t){var e;return S9e(M9e,t)||(e=E9e(t))==="ArrayBuffer"||e==="SharedArrayBuffer"},vV=function(t,e){return mS(t)&&!A9e(e)&&e in t&&v9e(+e)&&e>=0},KG=function(e,r){return r=hV(r),vV(e,r)?g9e(2,e[r]):N9e(e,r)},qG=function(e,r,n){return r=hV(r),vV(e,r)&&pS(n)&&Nh(n,"value")&&!Nh(n,"get")&&!Nh(n,"set")&&!n.configurable&&(!Nh(n,"writable")||n.writable)&&(!Nh(n,"enumerable")||n.enumerable)?(e[r]=n.value,e):bV(e,r,n)};y9e?(Y2||(yV.f=KG,mV.f=qG,J2(Mh,"buffer"),J2(Mh,"byteOffset"),J2(Mh,"byteLength"),J2(Mh,"length")),MG({target:"Object",stat:!0,forced:!Y2},{getOwnPropertyDescriptor:KG,defineProperty:qG}),fS.exports=function(t,e,r){var n=t.match(/\d+/)[0]/8,o=t+(r?"Clamped":"")+"Array",i="get"+t,a="set"+t,s=lV[o],c=s,u=c&&c.prototype,f={},l=function(S,O){var P=hS(S);return P.view[i](O*n+P.byteOffset,!0)},h=function(S,O,P){var F=hS(S);F.view[a](O*n+F.byteOffset,r?w9e(P):P,!0)},m=function(S,O){bV(S,O,{get:function(){return l(this,O)},set:function(P){return h(this,O,P)},enumerable:!0})};Y2?b9e&&(c=e(function(S,O,P,F){return $G(S,u),P9e((function(){return pS(O)?zG(O)?F!==void 0?new s(O,W9(P,n),F):P!==void 0?new s(O,W9(P,n)):new s(O):mS(O)?jG(c,O):kG(LG,c,O):new s(FG(O))})(),S,c)}),V2&&V2(c,DG),T9e(I9e(s),function(S){S in c||Ch(c,S,s[S])}),c.prototype=u):(c=e(function(S,O,P,F){$G(S,u);var B=0,R=0,L,T,M;if(!pS(O))M=FG(O),T=M*n,L=new gV(T);else if(zG(O)){L=O,R=W9(P,n);var $=O.byteLength;if(F===void 0){if($%n)throw new V9(Y9);if(T=$-R,T<0)throw new V9(Y9)}else if(T=x9e(F)*n,T+R>$)throw new V9(Y9);M=T/n}else return mS(O)?jG(c,O):kG(LG,c,O);for(R9e(S,{buffer:L,byteOffset:R,byteLength:T,length:M,view:new k9e(L)});B<M;)m(S,B++)}),V2&&V2(c,DG),u=c.prototype=_9e(Mh)),u.constructor!==c&&Ch(u,"constructor",c),C9e(u).TypedArrayConstructor=c,UG&&Ch(u,UG,o);var x=c!==s;f[o]=c,MG({global:!0,constructor:!0,forced:x,sham:!Y2},f),Z2 in c||Ch(c,Z2,n),Z2 in u||Ch(u,Z2,n),B9e(o)}):fS.exports=function(){};$9e=fS.exports;$9e("Uint8",function(t){return function(r,n,o){return t(this,r,n,o)}});xV=Nf,F9e=FW,L9e=dV,j9e=Gl,U9e=Pi,D9e=ir,z9e=Lt,K9e=xV.aTypedArray,q9e=xV.exportTypedArrayMethod,H9e=D9e("".slice),G9e=z9e(function(){var t=0;return new Int8Array(2).fill({valueOf:function(){return t++}}),t!==1});q9e("fill",function(e){var r=arguments.length;K9e(this);var n=H9e(j9e(this),0,3)==="Big"?L9e(e):+e;return U9e(F9e,this,n,r>1?arguments[1]:void 0,r>2?arguments[2]:void 0)},G9e);wV=jt,EV=Pi,rI=Nf,W9e=ql,V9e=nV,Y9e=Cf,AV=Lt,Z9e=wV.RangeError,yS=wV.Int8Array,HG=yS&&yS.prototype,_V=HG&&HG.set,J9e=rI.aTypedArray,X9e=rI.exportTypedArrayMethod,bS=!AV(function(){var t=new Uint8ClampedArray(2);return EV(_V,t,{length:1,0:3},1),t[1]!==3}),Q9e=bS&&rI.NATIVE_ARRAY_BUFFER_VIEWS&&AV(function(){var t=new yS(2);return t.set(1),t.set("2",1),t[0]!==0||t[1]!==2});X9e("set",function(e){J9e(this);var r=V9e(arguments.length>1?arguments[1]:void 0,1),n=Y9e(e);if(bS)return EV(_V,this,n,r);var o=this.length,i=W9e(n),a=0;if(i+r>o)throw new Z9e("Wrong length");for(;a<i;)this[r+a]=n[a++]},!bS||Q9e);GG=zS,eSe=Math.floor,gS=function(t,e){var r=t.length;if(r<8)for(var n=1,o,i;n<r;){for(i=n,o=t[n];i&&e(t[i-1],o)>0;)t[i]=t[--i];i!==n++&&(t[i]=o)}else for(var a=eSe(r/2),s=gS(GG(t,0,a),e),c=gS(GG(t,a),e),u=s.length,f=c.length,l=0,h=0;l<u||h<f;)t[l+h]=l<u&&h<f?e(s[l],c[h])<=0?s[l++]:c[h++]:l<u?s[l++]:c[h++];return t},tSe=gS,rSe=lx,WG=rSe.match(/firefox\/(\d+)/i),nSe=!!WG&&+WG[1],oSe=lx,iSe=/MSIE|Trident/.test(oSe),aSe=lx,VG=aSe.match(/AppleWebKit\/(\d+)\./),sSe=!!VG&&+VG[1],cSe=jt,fSe=WS,vS=Lt,uSe=Uh,dSe=tSe,SV=Nf,YG=nSe,lSe=iSe,ZG=cW,JG=sSe,pSe=SV.aTypedArray,hSe=SV.exportTypedArrayMethod,Fh=cSe.Uint16Array,zl=Fh&&fSe(Fh.prototype.sort),mSe=!!zl&&!(vS(function(){zl(new Fh(2),null)})&&vS(function(){zl(new Fh(2),{})})),XG=!!zl&&!vS(function(){if(ZG)return ZG<74;if(YG)return YG<67;if(lSe)return!0;if(JG)return JG<602;var t=new Fh(516),e=Array(516),r,n;for(r=0;r<516;r++)n=r%4,t[r]=515-r,e[r]=r-2*n+3;for(zl(t,function(o,i){return(o/4|0)-(i/4|0)}),r=0;r<516;r++)if(t[r]!==e[r])return!0}),ySe=function(t){return function(e,r){return t!==void 0?+t(e,r)||0:r!==r?-1:e!==e?1:e===0&&r===0?1/e>0&&1/r<0?1:-1:e>r}};hSe("sort",function(e){return e!==void 0&&uSe(e),XG?zl(this,e):dSe(pSe(this),ySe(e))},!XG||mSe);bSe=fx,IV=Function.prototype,QG=IV.apply,eW=IV.call,gSe=typeof Reflect=="object"&&Reflect.apply||(bSe?eW.bind(QG):function(){return eW.apply(QG,arguments)}),vSe=jt,xSe=gSe,TV=Nf,xS=Lt,tW=zS,cx=vSe.Int8Array,rW=TV.aTypedArray,wSe=TV.exportTypedArrayMethod,BV=[].toLocaleString,ESe=!!cx&&xS(function(){BV.call(new cx(1))}),ASe=xS(function(){return[1,2].toLocaleString()!==new cx([1,2]).toLocaleString()})||!xS(function(){cx.prototype.toLocaleString.call([1,2])});wSe("toLocaleString",function(){return xSe(BV,ESe?tW(rW(this)):rW(this),tW(arguments))},ASe)});var SSe,Zh,RV=N(()=>{PF();CF();SSe="near-api-js:keystore:",Zh=class extends kp{localStorage;prefix;constructor(e=window.localStorage,r=SSe){super(),this.localStorage=e,this.prefix=r}async setKey(e,r,n){this.localStorage.setItem(this.storageKeyForSecretKey(e,r),n.toString())}async getKey(e,r){let n=this.localStorage.getItem(this.storageKeyForSecretKey(e,r));return n?Mp.fromString(n):null}async removeKey(e,r){this.localStorage.removeItem(this.storageKeyForSecretKey(e,r))}async clear(){for(let e of this.storageKeys())e.startsWith(this.prefix)&&this.localStorage.removeItem(e)}async getNetworks(){let e=new Set;for(let r of this.storageKeys())if(r.startsWith(this.prefix)){let n=r.substring(this.prefix.length).split(":");e.add(n[1])}return Array.from(e.values())}async getAccounts(e){let r=new Array;for(let n of this.storageKeys())if(n.startsWith(this.prefix)){let o=n.substring(this.prefix.length).split(":");o[1]===e&&r.push(o[0])}return r}storageKeyForSecretKey(e,r){return`${this.prefix}${r}:${e}`}*storageKeys(){for(let e=0;e<this.localStorage.length;e++)yield this.localStorage.key(e)}}});var CV=N(()=>{RV()});var Ye,Ri,Jh=N(()=>{Ye=(t=>(t[t.ED25519=0]="ED25519",t[t.SECP256K1=1]="SECP256K1",t))(Ye||{}),Ri={SECRET_KEY:32,ED25519_PUBLIC_KEY:32,SECP256k1_PUBLIC_KEY:64}});var tc,Ax=N(()=>{tc=class{}});function ISe(t){switch(t){case Ye.ED25519:return"ed25519";case Ye.SECP256K1:return"secp256k1";default:throw new Error(`Unknown key type ${t}`)}}function TSe(t){switch(t.toLowerCase()){case"ed25519":return Ye.ED25519;case"secp256k1":return Ye.SECP256K1;default:throw new Error(`Unknown key type ${t}`)}}function BSe(t){switch(t){case Ye.ED25519:return"ed25519Key";case Ye.SECP256K1:return"secp256k1Key";default:throw Error(`unknown type ${t}`)}}var NV,nI,st,_x=N(()=>{Dr();Cd();NV=Jt(_s(),1);Jh();nI=class{constructor(e){if(Object.keys(e).length!==1)throw new Error("Enum can only take single value");Object.keys(e).map(r=>{this[r]=e[r]})}},st=class t extends nI{enum;ed25519Key;secp256k1Key;constructor(e){let r=BSe(e.keyType);super({[r]:e}),this[r]=e,this.enum=r}static from(e){return typeof e=="string"?t.fromString(e):e}static fromString(e){let r=e.split(":"),n,o;if(r.length===1)n=r[0];else if(r.length===2)n=r[1],o=TSe(r[0]);else throw new Error("Invalid encoded key format, must be <curve>:<encoded key>");let i=nt(n);o||(o=i.length===Ri.SECP256k1_PUBLIC_KEY?Ye.SECP256K1:Ye.ED25519);let a=o===Ye.ED25519?Ri.ED25519_PUBLIC_KEY:Ri.SECP256k1_PUBLIC_KEY;if(i.length!==a)throw new Error(`Invalid public key size (${i.length}), must be ${a}`);return new t({keyType:o,data:i})}toString(){let e=me(this.data);return`${ISe(this.keyType)}:${e}`}verify(e,r){let n=this.keyType,o=this.data;switch(n){case Ye.ED25519:return qr.verify(r,e,o);case Ye.SECP256K1:return NV.default.ecdsaVerify(r.subarray(0,64),e,new Uint8Array([4,...o]));default:throw new Error(`Unknown key type: ${n}`)}}get keyPair(){return this.ed25519Key||this.secp256k1Key}get keyType(){return this.keyPair.keyType}get data(){return this.keyPair.data}}});var MV,Xh,kV=N(()=>{Dr();Cd();MV=Jt(Ih(),1);Jh();Ax();_x();Xh=class t extends tc{publicKey;secretKey;extendedSecretKey;constructor(e){super();let r=nt(e),n=new Uint8Array(r.slice(0,Ri.SECRET_KEY)),o=qr.getPublicKey(new Uint8Array(n));this.publicKey=new st({keyType:Ye.ED25519,data:o}),this.secretKey=me(n),this.extendedSecretKey=e}static fromRandom(){let e=(0,MV.default)(Ri.SECRET_KEY),r=qr.getPublicKey(new Uint8Array(e)),n=new Uint8Array([...e,...r]);return new t(me(n))}sign(e){return{signature:qr.sign(e,nt(this.secretKey)),publicKey:this.publicKey}}verify(e,r){return this.publicKey.verify(e,r)}toString(){return`ed25519:${this.extendedSecretKey}`}getPublicKey(){return this.publicKey}}});var $V,Sx,Qh,FV=N(()=>{Dr();$V=Jt(Ih(),1),Sx=Jt(_s(),1);Jh();Ax();_x();Qh=class t extends tc{publicKey;secretKey;extendedSecretKey;constructor(e){super();let r=nt(e),n=new Uint8Array(r.slice(0,Ri.SECRET_KEY)),o=Sx.default.publicKeyCreate(new Uint8Array(n),!1),i=o.subarray(1,o.length);this.publicKey=new st({keyType:Ye.SECP256K1,data:i}),this.secretKey=me(n),this.extendedSecretKey=e}static fromRandom(){let e=(0,$V.default)(Ri.SECRET_KEY),r=Sx.default.publicKeyCreate(new Uint8Array(e),!1),n=r.subarray(1,r.length),o=new Uint8Array([...e,...n]);return new t(me(o))}sign(e){let{signature:r,recid:n}=Sx.default.ecdsaSign(e,nt(this.secretKey));return{signature:new Uint8Array([...r,n]),publicKey:this.publicKey}}verify(e,r){return this.publicKey.verify(e,r)}toString(){return`secp256k1:${this.extendedSecretKey}`}getPublicKey(){return this.publicKey}}});var Ia,LV=N(()=>{Ax();kV();FV();Ia=class extends tc{static fromRandom(e){switch(e.toUpperCase()){case"ED25519":return Xh.fromRandom();case"SECP256K1":return Qh.fromRandom();default:throw new Error(`Unknown curve ${e}`)}}static fromString(e){let r=e.split(":");if(r.length===2)switch(r[0].toUpperCase()){case"ED25519":return new Xh(r[1]);case"SECP256K1":return new Qh(r[1]);default:throw new Error(`Unknown curve: ${r[0]}`)}else throw new Error("Invalid encoded key format, must be <curve>:<encoded key>")}}});var Vl=N(()=>{Jh();LV();_x()});async function oI(t,e,r,n){let o=t;for(let i=0;i<e;i++){let a=await n();if(a)return a;await OSe(o),o*=r}return null}function OSe(t){return new Promise(e=>setTimeout(e,t))}var jV=N(()=>{});var Ix,Tx,em,tm,Bx,Ox,Px,rc,nc,Rx,Cx,Nx,Mx,kx,$x,Fx,Yl,fn,Lx=N(()=>{aa();Ix=class{allowance;receiverId;methodNames;constructor({allowance:e,receiverId:r,methodNames:n}){this.allowance=e,this.receiverId=r,this.methodNames=n}},Tx=class{},em=class extends ia{enum;functionCall;fullAccess;constructor(e){super(e);for(let[r,n]of Object.entries(e||{}))this[r]=n,this.enum=r}},tm=class{nonce;permission;constructor({nonce:e,permission:r}){this.nonce=e,this.permission=r}},Bx=class{},Ox=class{code;constructor({code:e}){this.code=e}},Px=class{methodName;args;gas;deposit;constructor({methodName:e,args:r,gas:n,deposit:o}){this.methodName=e,this.args=r,this.gas=n,this.deposit=o}},rc=class extends ia{enum;CodeHash;AccountId;constructor(e){super(e);for(let[r,n]of Object.entries(e||{}))this[r]=n,this.enum=r}},nc=class extends ia{enum;CodeHash;AccountId;constructor(e){super(e);for(let[r,n]of Object.entries(e||{}))this[r]=n,this.enum=r}},Rx=class{code;deployMode;constructor({code:e,deployMode:r}){this.code=e,this.deployMode=r}},Cx=class{contractIdentifier;constructor({contractIdentifier:e}){this.contractIdentifier=e}},Nx=class{deposit;constructor({deposit:e}){this.deposit=e}},Mx=class{stake;publicKey;constructor({stake:e,publicKey:r}){this.stake=e,this.publicKey=r}},kx=class{publicKey;accessKey;constructor({publicKey:e,accessKey:r}){this.publicKey=e,this.accessKey=r}},$x=class{publicKey;constructor({publicKey:e}){this.publicKey=e}},Fx=class{beneficiaryId;constructor({beneficiaryId:e}){this.beneficiaryId=e}},Yl=class{delegateAction;signature;constructor({delegateAction:e,signature:r}){this.delegateAction=e,this.signature=r}},fn=class extends ia{enum;createAccount;deployContract;functionCall;transfer;stake;addKey;deleteKey;deleteAccount;signedDelegate;deployGlobalContract;useGlobalContract;constructor(e){super(e);for(let[r,n]of Object.entries(e||{}))this[r]=n,this.enum=r}}});function PSe(){return new tm({nonce:0n,permission:new em({fullAccess:new Tx})})}function RSe(t,e,r){return new tm({nonce:0n,permission:new em({functionCall:new Ix({receiverId:t,allowance:r,methodNames:e})})})}function CSe(){return new fn({createAccount:new Bx})}function NSe(t){return new fn({deployContract:new Ox({code:t})})}function iI(t){return t.byteLength!==void 0&&t.byteLength===t.length?t:Buffer.from(JSON.stringify(t))}function MSe(t,e,r=0n,n=0n,o=iI){return new fn({functionCall:new Px({methodName:t,args:o(e),gas:r,deposit:n})})}function kSe(t=0n){return new fn({transfer:new Nx({deposit:t})})}function $Se(t=0n,e){return new fn({stake:new Mx({stake:t,publicKey:e})})}function FSe(t,e){return new fn({addKey:new kx({publicKey:t,accessKey:e})})}function LSe(t){return new fn({deleteKey:new $x({publicKey:t})})}function jSe(t){return new fn({deleteAccount:new Fx({beneficiaryId:t})})}function USe({delegateAction:t,signature:e}){return new fn({signedDelegate:new Yl({delegateAction:t,signature:e})})}function DSe(t,e){return new fn({deployGlobalContract:new Rx({code:t,deployMode:e})})}function zSe(t){return new fn({useGlobalContract:new Cx({contractIdentifier:t})})}var Pr,aI=N(()=>{Lx();Pr={addKey:FSe,createAccount:CSe,deleteAccount:jSe,deleteKey:LSe,deployContract:NSe,fullAccessKey:PSe,functionCall:MSe,functionCallAccessKey:RSe,signedDelegate:USe,stake:$Se,transfer:kSe,deployGlobalContract:DSe,useGlobalContract:zSe}});var KSe,qSe,sI,cI,jx,UV=N(()=>{KSe=Math.pow(2,30),qSe={MetaTransactions:366},sI=class{prefix;constructor({prefix:e}){this.prefix=e}},cI=class extends sI{constructor(e){super({prefix:KSe+e})}},jx=class extends cI{constructor(){super(qSe.MetaTransactions)}}});function DV(t){return new Uint8Array([...sa(Zl.DelegateActionPrefix,new jx),...sa(Zl.DelegateAction,t)])}function Jl(t){let e="signature"in t?Zl.SignedTransaction:Zl.Transaction;return sa(e,t)}function HSe(t){return new rm(lp(Zl.Transaction,t))}function GSe(t){return new nm(lp(Zl.SignedTransaction,t))}var rm,nm,Zl,fI=N(()=>{X1();UV();rm=class{signerId;publicKey;nonce;receiverId;actions;blockHash;constructor({signerId:e,publicKey:r,nonce:n,receiverId:o,actions:i,blockHash:a}){this.signerId=e,this.publicKey=r,this.nonce=n,this.receiverId=o,this.actions=i,this.blockHash=a}encode(){return Jl(this)}static decode(e){return HSe(e)}},nm=class{transaction;signature;constructor({transaction:e,signature:r}){this.transaction=e,this.signature=r}encode(){return Jl(this)}static decode(e){return GSe(e)}},Zl=new class{Ed25519Signature={struct:{data:{array:{type:"u8",len:64}}}};Secp256k1Signature={struct:{data:{array:{type:"u8",len:65}}}};Signature={enum:[{struct:{ed25519Signature:this.Ed25519Signature}},{struct:{secp256k1Signature:this.Secp256k1Signature}}]};Ed25519Data={struct:{data:{array:{type:"u8",len:32}}}};Secp256k1Data={struct:{data:{array:{type:"u8",len:64}}}};PublicKey={enum:[{struct:{ed25519Key:this.Ed25519Data}},{struct:{secp256k1Key:this.Secp256k1Data}}]};FunctionCallPermission={struct:{allowance:{option:"u128"},receiverId:"string",methodNames:{array:{type:"string"}}}};FullAccessPermission={struct:{}};AccessKeyPermission={enum:[{struct:{functionCall:this.FunctionCallPermission}},{struct:{fullAccess:this.FullAccessPermission}}]};AccessKey={struct:{nonce:"u64",permission:this.AccessKeyPermission}};CreateAccount={struct:{}};DeployContract={struct:{code:{array:{type:"u8"}}}};FunctionCall={struct:{methodName:"string",args:{array:{type:"u8"}},gas:"u64",deposit:"u128"}};Transfer={struct:{deposit:"u128"}};Stake={struct:{stake:"u128",publicKey:this.PublicKey}};AddKey={struct:{publicKey:this.PublicKey,accessKey:this.AccessKey}};DeleteKey={struct:{publicKey:this.PublicKey}};DeleteAccount={struct:{beneficiaryId:"string"}};GlobalContractDeployMode={enum:[{struct:{CodeHash:{struct:{}}}},{struct:{AccountId:{struct:{}}}}]};GlobalContractIdentifier={enum:[{struct:{CodeHash:{array:{type:"u8",len:32}}}},{struct:{AccountId:"string"}}]};DeployGlobalContract={struct:{code:{array:{type:"u8"}},deployMode:this.GlobalContractDeployMode}};UseGlobalContract={struct:{contractIdentifier:this.GlobalContractIdentifier}};DelegateActionPrefix={struct:{prefix:"u32"}};ClassicActions={enum:[{struct:{createAccount:this.CreateAccount}},{struct:{deployContract:this.DeployContract}},{struct:{functionCall:this.FunctionCall}},{struct:{transfer:this.Transfer}},{struct:{stake:this.Stake}},{struct:{addKey:this.AddKey}},{struct:{deleteKey:this.DeleteKey}},{struct:{deleteAccount:this.DeleteAccount}},{struct:{signedDelegate:"string"}},{struct:{deployGlobalContract:this.DeployGlobalContract}},{struct:{useGlobalContract:this.UseGlobalContract}}]};DelegateAction={struct:{senderId:"string",receiverId:"string",actions:{array:{type:this.ClassicActions}},nonce:"u64",maxBlockHeight:"u64",publicKey:this.PublicKey}};SignedDelegate={struct:{delegateAction:this.DelegateAction,signature:this.Signature}};Action={enum:[{struct:{createAccount:this.CreateAccount}},{struct:{deployContract:this.DeployContract}},{struct:{functionCall:this.FunctionCall}},{struct:{transfer:this.Transfer}},{struct:{stake:this.Stake}},{struct:{addKey:this.AddKey}},{struct:{deleteKey:this.DeleteKey}},{struct:{deleteAccount:this.DeleteAccount}},{struct:{signedDelegate:this.SignedDelegate}},{struct:{deployGlobalContract:this.DeployGlobalContract}},{struct:{useGlobalContract:this.UseGlobalContract}}]};Transaction={struct:{signerId:"string",publicKey:this.PublicKey,nonce:"u64",receiverId:"string",blockHash:{array:{type:"u8",len:32}},actions:{array:{type:this.Action}}}};SignedTransaction={struct:{transaction:this.Transaction,signature:this.Signature}}}});function om(t,e,r,n,o,i){let a=typeof n=="bigint"?n:BigInt(n);return new rm({signerId:t,publicKey:e,nonce:a,receiverId:r,actions:o,blockHash:i})}var zV=N(()=>{fI()});function dI({actions:t,maxBlockHeight:e,nonce:r,publicKey:n,receiverId:o,senderId:i}){return new uI({senderId:i,receiverId:o,actions:t.map(a=>{if(!a.type&&!a.params)return a;switch(a.type){case"AddKey":{let{publicKey:s,accessKey:c}=a.params;return WSe(s,c)}case"CreateAccount":return VSe(a.params.createAccount);case"DeleteAccount":return YSe(a.params.deleteAccount);case"DeleteKey":return ZSe(a.params.publicKey);case"DeployContract":return JSe(a.params.code);case"FunctionCall":{let{methodName:s,args:c,gas:u,deposit:f}=a.params;return XSe(s,c,u,f)}case"Stake":return QSe(a.params.stake,a.params.publicKey);case"Transfer":{let{deposit:s}=a.params;return eIe(s)}case"DeployGlobalContract":{let{code:s,deployMode:c}=a.params,u=c instanceof rc?c:new rc(c);return tIe(s,u)}case"UseGlobalContract":{let{identifier:s}=a.params,c=s instanceof nc?s:new nc(s);return rIe(c)}}throw new Error("Unrecognized action")}),nonce:r,maxBlockHeight:e,publicKey:n})}var WSe,VSe,YSe,ZSe,JSe,XSe,QSe,eIe,tIe,rIe,uI,KV=N(()=>{aI();Lx();({addKey:WSe,createAccount:VSe,deleteAccount:YSe,deleteKey:ZSe,deployContract:JSe,functionCall:XSe,stake:QSe,transfer:eIe,deployGlobalContract:tIe,useGlobalContract:rIe}=Pr),uI=class{senderId;receiverId;actions;nonce;maxBlockHeight;publicKey;constructor({senderId:e,receiverId:r,actions:n,nonce:o,maxBlockHeight:i,publicKey:a}){this.senderId=e,this.receiverId=r,this.actions=n,this.nonce=o,this.maxBlockHeight=i,this.publicKey=a}}});function nIe(t){switch(t){case Ye.ED25519:return"ed25519Signature";case Ye.SECP256K1:return"secp256k1Signature";default:throw Error(`unknown type ${t}`)}}var im,qV=N(()=>{Vl();aa();im=class extends ia{enum;ed25519Signature;secp256k1Signature;constructor(e){let r=nIe(e.keyType);super({[r]:e}),this[r]=e,this.enum=r}get signature(){return this.ed25519Signature||this.secp256k1Signature}get signatureType(){return this.signature.keyType}get data(){return this.signature.data}}});var am=N(()=>{aI();Lx();zV();KV();fI();qV()});function WV(t=GV,e=oIe,r=iIe){return{numOfAttempts:t,timeMultiple:e,startingDelay:r,retry:n=>!!([503,500,408].includes(n.cause)||n.toString().includes("FetchError")||n.toString().includes("Failed to fetch"))}}async function VV(t,e,r,n){let o=await(0,HV.backOff)(async()=>{let i=await fetch(t,{method:"POST",body:JSON.stringify(e),headers:{...r,"Content-Type":"application/json"}}),{ok:a,status:s}=i;if(s===500)throw new Mf("Internal server error",{cause:s});if(s===408)throw new Mf("Timeout error",{cause:s});if(s===400)throw new Mf("Request validation error",{cause:s});if(s===503)throw new Mf(`${t} unavailable`,{cause:s});if(!a)throw new Mf(await i.text(),{cause:s});return i},n);if(!o)throw new zt(`Exceeded ${GV} attempts for ${t}.`,"RetriesExceeded");return await o.json()}var HV,oIe,GV,iIe,Mf,YV=N(()=>{aa();HV=Jt(r4(),1),oIe=1.5,GV=10,iIe=0;Mf=class extends Error{cause;constructor(e,r){super(e,r),r.cause&&(this.cause=r.cause)}}});var aIe,sIe,cIe,fIe,oc,ZV=N(()=>{Dr();aa();am();YV();aIe=12,sIe=500,cIe=1.5,fIe=123,oc=class{connection;options;networkId;constructor(e,r){this.connection=e||{url:""};let n={retries:aIe,wait:sIe,backoff:cIe};this.options=Object.assign({},n,r),this.networkId=void 0}async getNetworkId(){if(this.networkId)return this.networkId;let{chain_id:e}=await this.viewNodeStatus();return this.networkId=e,this.networkId}async getCurrentEpochSeatPrice(){let{minimum_stake_ratio:e,protocol_version:r}=await this.experimental_protocolConfig({finality:"final"}),{current_validators:n}=await this.viewValidators();return Ad(n,300,e,r)}async getNextEpochSeatPrice(){let{minimum_stake_ratio:e,protocol_version:r}=await this.experimental_protocolConfig({finality:"final"}),{next_validators:n}=await this.viewValidators();return Ad(n,300,e,r)}async viewAccessKey(e,r,n={finality:"final"}){let o=await this.query({...n,request_type:"view_access_key",account_id:e,public_key:r.toString()});return{...o,nonce:BigInt(o.nonce)}}async viewAccessKeyList(e,r={finality:"final"}){return this.query({...r,request_type:"view_access_key_list",account_id:e})}async viewAccount(e,r={finality:"final"}){let n=await this.query({...r,request_type:"view_account",account_id:e});return{...n,amount:BigInt(n.amount),locked:BigInt(n.locked)}}async viewContractCode(e,r={finality:"final"}){let n=await this.query({...r,request_type:"view_code",account_id:e});return{...n,code:new Uint8Array(Buffer.from(n.code_base64,"base64"))}}async viewContractState(e,r,n={finality:"final"}){let o=Buffer.from(r||"").toString("base64");return this.query({...n,request_type:"view_state",account_id:e,prefix_base64:o})}async callFunction(e,r,n,o={finality:"final"}){let{result:i}=await this.callFunctionRaw(e,r,n,o);if(i.length===0)return;let a=Buffer.from(i).toString();try{return JSON.parse(a)}catch{return a}}async callFunctionRaw(e,r,n,o={finality:"final"}){let i=Buffer.from(JSON.stringify(n)).toString("base64");return await this.query({...o,request_type:"call_function",account_id:e,method_name:r,args_base64:i})}async viewBlock(e){let{finality:r}=e,{blockId:n}=e;return this.sendJsonRpc("block",{block_id:n,finality:r})}async viewChunk(e){return this.sendJsonRpc("chunk",[e])}async viewGasPrice(e){return this.sendJsonRpc("gas_price",[e||null])}async viewNodeStatus(){return this.sendJsonRpc("status",[])}async viewValidators(e){return this.sendJsonRpc("validators",[e||null])}async viewTransactionStatus(e,r,n){let o=typeof e=="string"?e:me(e);return this.sendJsonRpc("tx",{tx_hash:o,sender_account_id:r,wait_until:n})}async viewTransactionStatusWithReceipts(e,r,n){let o=typeof e=="string"?e:me(e);return this.sendJsonRpc("EXPERIMENTAL_tx_status",{tx_hash:o,sender_account_id:r,wait_until:n})}async viewTransactionReceipt(e){return this.sendJsonRpc("EXPERIMENTAL_receipt",{receipt_id:e})}async status(){return this.sendJsonRpc("status",[])}async sendTransactionUntil(e,r){let n=Jl(e);return this.sendJsonRpc("send_tx",{signed_tx_base64:Buffer.from(n).toString("base64"),wait_until:r})}async sendTransaction(e){return this.sendTransactionUntil(e,"EXECUTED_OPTIMISTIC")}async sendTransactionAsync(e){return this.sendTransactionUntil(e,"NONE")}async txStatus(e,r,n="EXECUTED_OPTIMISTIC"){return typeof e=="string"?this.txStatusString(e,r,n):this.txStatusUint8Array(e,r,n)}async txStatusUint8Array(e,r,n){return this.sendJsonRpc("tx",{tx_hash:me(e),sender_account_id:r,wait_until:n})}async txStatusString(e,r,n){return this.sendJsonRpc("tx",{tx_hash:e,sender_account_id:r,wait_until:n})}async txStatusReceipts(e,r,n="EXECUTED_OPTIMISTIC"){return typeof e=="string"?this.sendJsonRpc("EXPERIMENTAL_tx_status",{tx_hash:e,sender_account_id:r,wait_until:n}):this.sendJsonRpc("EXPERIMENTAL_tx_status",{tx_hash:me(e),sender_account_id:r,wait_until:n})}async query(...e){let r;if(e.length===1){let{block_id:n,blockId:o,...i}=e[0];r=await this.sendJsonRpc("query",{...i,block_id:n||o})}else{let[n,o]=e;r=await this.sendJsonRpc("query",[n,o])}if(r&&r.error)throw new zt(`Querying failed: ${r.error}.
|
|
63
|
+
${JSON.stringify(r,null,2)}`,ps(r.error,r.error.name));return r}async block(e){let{finality:r}=e,{blockId:n}=e;return this.sendJsonRpc("block",{block_id:n,finality:r})}async blockChanges(e){let{finality:r}=e,{blockId:n}=e;return this.sendJsonRpc("EXPERIMENTAL_changes_in_block",{block_id:n,finality:r})}async chunk(e){return this.sendJsonRpc("chunk",[e])}async validators(e){return this.sendJsonRpc("validators",[e])}async experimental_protocolConfig(e){let{blockId:r,...n}=e;return await this.sendJsonRpc("EXPERIMENTAL_protocol_config",{...n,block_id:r})}async lightClientProof(e){return await this.sendJsonRpc("EXPERIMENTAL_light_client_proof",e)}async nextLightClientBlock(e){return await this.sendJsonRpc("next_light_client_block",e)}async accessKeyChanges(e,r){let{finality:n}=r,{blockId:o}=r;return this.sendJsonRpc("EXPERIMENTAL_changes",{changes_type:"all_access_key_changes",account_ids:e,block_id:o,finality:n})}async singleAccessKeyChanges(e,r){let{finality:n}=r,{blockId:o}=r;return this.sendJsonRpc("EXPERIMENTAL_changes",{changes_type:"single_access_key_changes",keys:e,block_id:o,finality:n})}async accountChanges(e,r){let{finality:n}=r,{blockId:o}=r;return this.sendJsonRpc("EXPERIMENTAL_changes",{changes_type:"account_changes",account_ids:e,block_id:o,finality:n})}async contractStateChanges(e,r,n=""){let{finality:o}=r,{blockId:i}=r;return this.sendJsonRpc("EXPERIMENTAL_changes",{changes_type:"data_changes",account_ids:e,key_prefix_base64:n,block_id:i,finality:o})}async contractCodeChanges(e,r){let{finality:n}=r,{blockId:o}=r;return this.sendJsonRpc("EXPERIMENTAL_changes",{changes_type:"contract_code_changes",account_ids:e,block_id:o,finality:n})}async gasPrice(e){return await this.sendJsonRpc("gas_price",[e])}async sendJsonRpc(e,r){let n={method:e,params:r,id:fIe++,jsonrpc:"2.0"},o=await VV(this.connection.url,n,this.connection.headers||{},WV(this.options.retries,this.options.backoff,this.options.wait));if(o.error){if(typeof o.error.data=="object")throw typeof o.error.data.error_message=="string"&&typeof o.error.data.error_type=="string"?new zt(o.error.data.error_message,o.error.data.error_type):Ed(o.error.data);{let a=`[${o.error.code}] ${o.error.message}: ${o.error.data}`,s=ps(o.error.data,"");throw s?new zt(Kc(s,r),s):new zt(a,o.error.name)}}else if(typeof o.result?.error=="string"){let a=ps(o.result.error,"");if(a)throw new wd(Kc(a,r),a)}let{result:i}=o;if(typeof i>"u")throw new zt(`Exceeded ${this.options.retries} attempts for request to ${e}.`,"RetriesExceeded");return i}}});var sm,JV=N(()=>{Dr();aa();sm=class{providers;currentProviderIndex;constructor(e){if(e.length===0)throw new Error("At least one provider must be specified");this.providers=e,this.currentProviderIndex=0}switchToNextProvider(){this.providers.length!==1&&(this.providers.length-1<=this.currentProviderIndex?this.currentProviderIndex=0:this.currentProviderIndex+=1,oi.debug(`Switched to provider at the index ${this.currentProviderIndex}`))}get currentProvider(){let e=this.providers[this.currentProviderIndex];if(!e)throw new Error(`Provider wasn't found at index ${this.currentProviderIndex}`);return e}async withBackoff(e){for(let r=0;r<this.providers.length;r++)try{let n=await e(this.currentProvider);if(n)return n}catch(n){console.error(n),this.switchToNextProvider()}throw new zt(`Exceeded ${this.providers.length} providers to execute request`,"RetriesExceeded")}async status(){return this.withBackoff(e=>e.status())}async getNetworkId(){return this.withBackoff(e=>e.getNetworkId())}async getCurrentEpochSeatPrice(){return this.withBackoff(e=>e.getCurrentEpochSeatPrice())}async getNextEpochSeatPrice(){return this.withBackoff(e=>e.getNextEpochSeatPrice())}async viewAccessKey(e,r,n){return this.withBackoff(o=>o.viewAccessKey(e,r,n))}async viewAccessKeyList(e,r){return this.withBackoff(n=>n.viewAccessKeyList(e,r))}async viewAccount(e,r){return this.withBackoff(n=>n.viewAccount(e,r))}async viewContractCode(e,r){return this.withBackoff(n=>n.viewContractCode(e,r))}async viewContractState(e,r,n){return this.withBackoff(o=>o.viewContractState(e,r,n))}async callFunction(e,r,n,o){return this.withBackoff(i=>i.callFunction(e,r,n,o))}async callFunctionRaw(e,r,n,o){return this.withBackoff(i=>i.callFunctionRaw(e,r,n,o))}async viewBlock(e){return this.withBackoff(r=>r.viewBlock(e))}async viewChunk(e){return this.withBackoff(r=>r.viewChunk(e))}async viewGasPrice(e){return this.withBackoff(r=>r.viewGasPrice(e))}async viewNodeStatus(){return this.withBackoff(e=>e.viewNodeStatus())}async viewValidators(e){return this.withBackoff(r=>r.viewValidators(e))}async viewTransactionStatus(e,r,n){return this.withBackoff(o=>o.viewTransactionStatus(e,r,n))}async viewTransactionStatusWithReceipts(e,r,n){return this.withBackoff(o=>o.viewTransactionStatusWithReceipts(e,r,n))}async viewTransactionReceipt(e){return this.withBackoff(r=>r.viewTransactionReceipt(e))}async sendTransactionUntil(e,r){return this.withBackoff(n=>n.sendTransactionUntil(e,r))}async sendTransaction(e){return this.withBackoff(r=>r.sendTransaction(e))}async sendTransactionAsync(e){return this.withBackoff(r=>r.sendTransactionAsync(e))}async txStatus(e,r,n){return this.withBackoff(o=>o.txStatus(e,r,n))}async txStatusReceipts(e,r,n){return this.withBackoff(o=>o.txStatusReceipts(e,r,n))}async query(e,r){return r?this.withBackoff(n=>n.query(e,r)):this.withBackoff(n=>n.query(e))}async block(e){return this.withBackoff(r=>r.block(e))}async blockChanges(e){return this.withBackoff(r=>r.blockChanges(e))}async chunk(e){return this.withBackoff(r=>r.chunk(e))}async validators(e){return this.withBackoff(r=>r.validators(e))}async experimental_protocolConfig(e){return this.withBackoff(r=>r.experimental_protocolConfig(e))}async lightClientProof(e){return this.withBackoff(r=>r.lightClientProof(e))}async nextLightClientBlock(e){return this.withBackoff(r=>r.nextLightClientBlock(e))}async accessKeyChanges(e,r){return this.withBackoff(n=>n.accessKeyChanges(e,r))}async singleAccessKeyChanges(e,r){return this.withBackoff(n=>n.singleAccessKeyChanges(e,r))}async accountChanges(e,r){return this.withBackoff(n=>n.accountChanges(e,r))}async contractStateChanges(e,r,n=""){return this.withBackoff(o=>o.contractStateChanges(e,r,n))}async contractCodeChanges(e,r){return this.withBackoff(n=>n.contractCodeChanges(e,r))}async gasPrice(e){return this.withBackoff(r=>r.gasPrice(e))}}});var Ux=N(()=>{jV();ZV();JV()});var XV,Dx,QV=N(()=>{XV={struct:{message:"string",nonce:{array:{type:"u8",len:32}},recipient:"string",callbackUrl:{option:"string"}}},Dx=class{}});var kf,eY=N(()=>{Vl();_F();QV();am();X1();kf=class t extends Dx{key;constructor(e){super(),this.key=e}static fromSecretKey(e){let r=Ia.fromString(e);return new t(r)}async getPublicKey(){return this.key.getPublicKey()}async signNep413Message(e,r,n,o,i){if(o.length!==32)throw new Error("Nonce must be exactly 32 bytes long");let a=this.key.getPublicKey(),c=sa("u32",2147484061),f=sa(XV,{message:e,recipient:n,nonce:o,callbackUrl:i}),l=new Uint8Array(c.length+f.length);l.set(c),l.set(f,c.length);let h=new Uint8Array(Fg(l)),{signature:m}=this.key.sign(h);return{accountId:r,publicKey:a,signature:m}}async signTransaction(e){let r=this.key.getPublicKey();if(e.publicKey.toString()!==r.toString())throw new Error("The public key doesn't match the signer's key");let n=Jl(e),o=new Uint8Array(Fg(n)),{signature:i}=this.key.sign(o),a=new nm({transaction:e,signature:new im({keyType:e.publicKey.ed25519Key?Ye.ED25519:Ye.SECP256K1,data:i})});return[o,a]}async signDelegateAction(e){let r=this.key.getPublicKey();if(e.publicKey.toString()!==r.toString())throw new Error("The public key doesn't match the signer's key");let n=DV(e),o=new Uint8Array(Fg(n)),{signature:i}=this.key.sign(o),a=new Yl({delegateAction:e,signature:new im({keyType:r.keyType,data:i})});return[o,a]}}});var cm,tY=N(()=>{cm=class{}});var rY=N(()=>{tY()});var lI=N(()=>{eY()});function uIe(t){switch(t.type){case void 0:return t;case"JsonRpcProvider":return new oc({...t.args});case"FailoverRpcProvider":{let e=(t?.args||[]).map(r=>new oc(r));return new sm(e)}default:throw new Error(`Unknown provider type ${t.type}`)}}function dIe(t){switch(t.type){case void 0:return t;case"KeyPairSigner":return new kf(t.keyPair);default:throw new Error(`Unknown signer type ${t.type}`)}}var nY,zx,oY=N(()=>{lI();Ux();nY=Jt(j1(),1);zx=class t{networkId;provider;signer;constructor(e,r,n){(0,nY.default)("new Connection(networkId, provider, signer)")("`Connection` is no longer used anywhere, please switch to constructing `Account` without it - use `new Account(accountId, provider, signer)`"),this.networkId=e,this.provider=r,this.signer=n}getConnection(){return this}static fromConfig(e){let r=uIe(e.provider),n=dIe(e.signer);return new t(e.networkId,r,n)}}});function lIe(t){return JSON.parse(Buffer.from(t).toString())}function pIe(t){return Buffer.from(JSON.stringify(t))}function hIe(t){if(!(t.byteLength!==void 0&&t.byteLength===t.length)&&(Array.isArray(t)||typeof t!="object"))throw new xd}async function iY(t,e,r,n={finality:"optimistic"}){let{values:o}=await t.provider.query({request_type:"view_state",...n,account_id:e,prefix_base64:Buffer.from(r).toString("base64")});return o.map(({key:i,value:a})=>({key:Buffer.from(i,"base64"),value:Buffer.from(a,"base64")}))}async function aY(t,{contractId:e,methodName:r,args:n={},parse:o=lIe,stringify:i=pIe,blockQuery:a={finality:"optimistic"}}){hIe(n);let s=i(n),c=await t.provider.query({request_type:"call_function",...a,account_id:e,method_name:r,args_base64:s.toString("base64")});return c.logs&&G8({contractId:e,logs:c.logs}),c.result&&c.result.length>0&&o(Buffer.from(c.result))}var sY=N(()=>{aa();Dr()});function cY(t,e,r=e){t=gIe(t);let n=t.substring(0,t.length-e)||"0",o=t.substring(t.length-e).substring(0,e).padStart(e,"0");return o=o.substring(0,r),yIe(`${n}.${o}`)}function fY(t,e){t=mIe(t);let r=t.split(".");if(r.length>2)throw new Error(`Cannot parse amount '${t}' as it contains more than a single dot`);let n=r[0],o=r[1]||"";if(o.length>24)throw new Error(`Cannot parse amount '${t}' as it exceeds maximum decimal precision of 24`);return bIe(n+o.substring(0,e).padEnd(e,"0"))}function mIe(t){return t.replace(/,/g,".").trim()}function yIe(t){return t.replace(/\.?0*$/,"")}function bIe(t){return t=t.replace(/^0+/,""),t===""?"0":t}function gIe(t){return BigInt(t).toString()}var uY=N(()=>{});var pI,Kx,fm,dY=N(()=>{uY();pI=class{metadata;constructor(e){this.metadata=e}toUnits(e){let r=fY(e.toString(),this.metadata.decimals);return BigInt(r)}toDecimal(e,r){return cY(e,this.metadata.decimals,r)}},Kx=class extends pI{constructor(e){super(e)}async transfer({from:e,receiverId:r,amount:n}){return e.signAndSendTransaction({receiverId:r,actions:[{transfer:{deposit:n.toString()}}]})}async getBalance(e){let{balance:{available:r}}=await e.getState();return r}},fm=new Kx({name:"NEAR",decimals:24,symbol:"NEAR",icon:"data:image/svg+xml,%3Csvg%20width%3D%2232%22%20height%3D%2232%22%20viewBox%3D%220%200%2032%2032%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Ccircle%20cx%3D%2216%22%20cy%3D%2216%22%20r%3D%2216%22%20fill%3D%22white%22%3E%3C%2Fcircle%3E%3Cg%20clip-path%3D%22url(%23clip0000000003)%22%3E%3Cpath%20d%3D%22M20.8422%208.84471L17.4978%2013.776C17.4501%2013.847%2017.43%2013.9328%2017.4411%2014.0174C17.4522%2014.102%2017.4938%2014.1798%2017.5582%2014.2363C17.6225%2014.2928%2017.7053%2014.3243%2017.7913%2014.3249C17.8772%2014.3254%2017.9604%2014.2951%2018.0256%2014.2395L21.3178%2011.4036C21.3371%2011.3865%2021.361%2011.3753%2021.3866%2011.3714C21.4122%2011.3675%2021.4383%2011.3711%2021.4619%2011.3818C21.4855%2011.3924%2021.5054%2011.4096%2021.5193%2011.4314C21.5331%2011.4531%2021.5403%2011.4783%2021.54%2011.504V20.3824C21.54%2020.4095%2021.5316%2020.4361%2021.5158%2020.4583C21.5001%2020.4806%2021.4779%2020.4975%2021.4522%2020.5068C21.4265%2020.516%2021.3985%2020.5172%2021.3721%2020.5102C21.3456%2020.5031%2021.322%2020.4882%2021.3044%2020.4673L11.3533%208.63726C11.1933%208.44956%2010.994%208.29873%2010.7693%208.19525C10.5446%208.09178%2010.2999%208.03815%2010.0522%208.03809H9.70444C9.2524%208.03809%208.81887%208.21642%208.49922%208.53386C8.17957%208.8513%208%209.28185%208%209.73078V22.2351C8%2022.684%208.17957%2023.1145%208.49922%2023.432C8.81887%2023.7494%209.2524%2023.9277%209.70444%2023.9277V23.9277C9.99591%2023.9278%2010.2825%2023.8537%2010.537%2023.7125C10.7914%2023.5713%2011.0051%2023.3677%2011.1578%2023.1211L14.5022%2018.1898C14.5499%2018.1188%2014.57%2018.033%2014.5589%2017.9484C14.5478%2017.8638%2014.5062%2017.7861%2014.4418%2017.7295C14.3775%2017.673%2014.2947%2017.6415%2014.2087%2017.641C14.1228%2017.6404%2014.0396%2017.6707%2013.9744%2017.7264L10.6822%2020.5622C10.6629%2020.5794%2010.639%2020.5906%2010.6134%2020.5944C10.5878%2020.5983%2010.5617%2020.5947%2010.5381%2020.5841C10.5145%2020.5734%2010.4946%2020.5562%2010.4807%2020.5345C10.4669%2020.5128%2010.4597%2020.4875%2010.46%2020.4618V11.5813C10.46%2011.5541%2010.4684%2011.5276%2010.4842%2011.5053C10.4999%2011.483%2010.5221%2011.4661%2010.5478%2011.4568C10.5735%2011.4476%2010.6015%2011.4464%2010.6279%2011.4534C10.6544%2011.4605%2010.678%2011.4755%2010.6956%2011.4963L20.6456%2023.3286C20.8056%2023.5163%2021.0049%2023.6671%2021.2296%2023.7706C21.4543%2023.874%2021.699%2023.9277%2021.9467%2023.9277H22.2944C22.5184%2023.9279%2022.7401%2023.8842%2022.947%2023.7992C23.154%2023.7142%2023.342%2023.5895%2023.5004%2023.4324C23.6588%2023.2752%2023.7844%2023.0885%2023.8702%2022.8831C23.9559%2022.6776%2024%2022.4574%2024%2022.2351V9.73078C24%209.28185%2023.8204%208.8513%2023.5008%208.53386C23.1811%208.21642%2022.7476%208.03809%2022.2956%208.03809C22.0041%208.03801%2021.7175%208.11211%2021.4631%208.25332C21.2086%208.39453%2020.9949%208.59814%2020.8422%208.84471V8.84471Z%22%20fill%3D%22black%22%3E%3C%2Fpath%3E%3C%2Fg%3E%3Cdefs%3E%3CclipPath%20id%3D%22clip00033%22%3E%3Crect%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22black%22%20transform%3D%22translate(8%207.9834)%22%3E%3C%2Frect%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E"})});var lY=N(()=>{dY()});var um,pY,vIe,xIe,hY,wIe,qx,hI,mY,mI,EIe,Rr,yI,dm,yY=N(()=>{Vl();Ux();am();aa();Dr();oY();sY();lY();({addKey:um,createAccount:pY,deleteAccount:vIe,deleteKey:xIe,deployContract:hY,deployGlobalContract:wIe,fullAccessKey:qx,functionCall:hI,functionCallAccessKey:mY,transfer:mI,useGlobalContract:EIe}=Pr),Rr="near-final",yI="EXECUTED_OPTIMISTIC",dm=class t{accountId;provider;signer;constructor(e,r,n){this.accountId=e,this.provider=r,this.signer=n}setSigner(e){this.signer=e}getSigner(){return this.signer}async getState(){let e=await this.provider.experimental_protocolConfig({finality:Rr}),r=await this.provider.viewAccount(this.accountId,{finality:Rr}),n=BigInt(e.runtime_config.storage_amount_per_byte),o=BigInt(r.storage_usage)*n,i=BigInt(r.locked),a=BigInt(r.amount)+i,s=a-(i>o?i:o);return{balance:{total:a,usedOnStorage:o,locked:i,available:s},storageUsage:r.storage_usage,codeHash:r.code_hash}}async getAccessKey(e){return this.provider.viewAccessKey(this.accountId,e,{finality:Rr})}async getAccessKeyList(){return this.provider.viewAccessKeyList(this.accountId,{finality:Rr})}async getContractCode(){return this.provider.viewContractCode(this.accountId,{finality:Rr})}async getContractState(e){return this.provider.viewContractState(this.accountId,e,{finality:Rr})}async createTransaction(e,r,n){if(!n)throw new Error("Please provide a public key");let o=st.from(n),i=await this.getAccessKey(o),s=(await this.provider.viewBlock({finality:Rr})).header.hash,c=BigInt(i.nonce)+1n;return om(this.accountId,o,e,c+1n,r,nt(s))}async createSignedTransaction(e,r){if(!this.signer)throw new Error("Please set a signer");let n=await this.createTransaction(e,r,await this.signer.getPublicKey()),[,o]=await this.signer.signTransaction(n);return o}async createMetaTransaction(e,r,n=200,o){if(!o)throw new Error("Please provide a public key");let i=st.from(o),a=await this.getAccessKey(i),s=BigInt(a.nonce)+1n,{header:c}=await this.provider.viewBlock({finality:Rr}),u=BigInt(c.height)+BigInt(n);return dI({receiverId:e,senderId:this.accountId,actions:r,publicKey:i,nonce:s,maxBlockHeight:u})}async createSignedMetaTransaction(e,r,n=200){if(!this.signer)throw new Error("Please set a signer");let o=await this.createMetaTransaction(e,r,n,await this.signer.getPublicKey());return this.signer.signDelegateAction(o)}async signAndSendTransaction({receiverId:e,actions:r,waitUntil:n=yI,throwOnFailure:o=!0}){let i=await this.createSignedTransaction(e,r),a=await this.provider.sendTransactionUntil(i,n);if(o&&typeof a.status=="object"&&typeof a.status.Failure=="object"&&a.status.Failure!==null)throw H8(a);return a}async signAndSendTransactions({transactions:e,waitUntil:r=yI,throwOnFailure:n=!0}){if(!this.signer)throw new Error("Please set a signer");return await Promise.all(e.map(async({receiverId:i,actions:a})=>this.signAndSendTransaction({receiverId:i,actions:a,waitUntil:r,throwOnFailure:n})))}async createAccount(e,r,n="0"){if(e.endsWith(this.accountId))return this.createSubAccount(e,r,n);let o=e.split(".");if(o.length!=2)throw new Error("newAccountId needs to be of the form <string>.<tla>");let i=o[1];return this.signAndSendTransaction({receiverId:i,actions:[hI("create_account",{new_account_id:e,new_public_key:r.toString()},BigInt("60000000000000"),BigInt(n))]})}async createSubAccount(e,r,n="0"){if(!this.signer)throw new Error("Please set a signer");let o=e.includes(".")?e:`${e}.${this.accountId}`;if(o.length>64)throw new Error("Accounts cannot exceed 64 characters");if(!o.endsWith(this.accountId))throw new Error(`New account must end up with ${this.accountId}`);let i=[pY(),mI(BigInt(n)),um(st.from(r),qx())];return this.signAndSendTransaction({receiverId:o,actions:i})}async deleteAccount(e){return this.signAndSendTransaction({receiverId:this.accountId,actions:[vIe(e)]})}async deployContract(e){return this.signAndSendTransaction({receiverId:this.accountId,actions:[hY(e)]})}async deployGlobalContract(e,r){let n=r==="codeHash"?new rc({CodeHash:null}):new rc({AccountId:null});return this.signAndSendTransaction({receiverId:this.accountId,actions:[wIe(e,n)]})}async useGlobalContract(e){let r="accountId"in e?new nc({AccountId:e.accountId}):new nc({CodeHash:typeof e.codeHash=="string"?Buffer.from(e.codeHash,"hex"):e.codeHash});return this.signAndSendTransaction({receiverId:this.accountId,actions:[EIe(r)]})}async addFunctionCallAccessKey({publicKey:e,contractId:r,methodNames:n=[],allowance:o=fm.toUnits("0.25")}){return this.signAndSendTransaction({receiverId:this.accountId,actions:[um(st.from(e),mY(r,n,BigInt(o)))]})}async addFullAccessKey(e){return this.signAndSendTransaction({receiverId:this.accountId,actions:[um(st.from(e),qx())]})}async deleteKey(e){return this.signAndSendTransaction({receiverId:this.accountId,actions:[xIe(st.from(e))]})}async callFunction(e){let r=await this.callFunctionRaw(e);return MN(r)}async callFunctionRaw({contractId:e,methodName:r,args:n={},deposit:o="0",gas:i=q8,waitUntil:a=yI}){return await this.signAndSendTransaction({receiverId:e,actions:[hI(r,n,BigInt(i),BigInt(o))],waitUntil:a})}async signNep413Message({message:e,recipient:r,nonce:n,callbackUrl:o}){if(!this.signer)throw new Error("Please set a signer");return this.signer.signNep413Message(e,this.accountId,r,n,o)}async getBalance(e=fm){return e.getBalance(this)}async transfer({receiverId:e,amount:r,token:n=fm}){return n.transfer({from:this,receiverId:e,amount:r})}async signedDelegate({actions:e,blockHeightTtl:r,receiverId:n}){let{header:o}=await this.provider.viewBlock({finality:Rr});if(!this.signer)throw new Error("Please set a signer");let i=await this.signer.getPublicKey(),a=await this.getAccessKey(i),s=dI({actions:e,maxBlockHeight:BigInt(o.height)+BigInt(r),nonce:BigInt(a.nonce)+1n,publicKey:i,receiverId:n,senderId:this.accountId}),[,c]=await this.signer.signDelegateAction(s);return c}getConnection(){return new zx("",this.provider,this.signer)}validateArgs(e){if(!(e.byteLength!==void 0&&e.byteLength===e.length)&&(Array.isArray(e)||typeof e!="object"))throw new xd}async functionCall({contractId:e,methodName:r,args:n={},gas:o=q8,attachedDeposit:i,walletMeta:a,walletCallbackUrl:s,stringify:c}){this.validateArgs(n);let f=[r,n,o,i,c===void 0?iI:c,!1];return this.signAndSendTransactionLegacy({receiverId:e,actions:[hI.apply(void 0,f)],walletMeta:a,walletCallbackUrl:s})}async getTransactionStatus(e){return this.provider.viewTransactionStatus(e,this.accountId,"EXECUTED_OPTIMISTIC")}async signTransaction(e,r,n){let o=n?.signer||this.signer;if(!o)throw new Error("Please set a signer");let i=await o.getPublicKey(),a=await this.getAccessKey(i),c=(await this.provider.viewBlock({finality:Rr})).header.hash,u=BigInt(a.nonce)+1n,f=om(this.accountId,i,e,u+1n,r,nt(c));return o.signTransaction(f)}async createAndDeployContract(e,r,n,o){let i=qx();return await this.signAndSendTransactionLegacy({receiverId:e,actions:[pY(),mI(o),um(st.from(r),i),hY(n)]}),new t(e,this.provider)}async sendMoney(e,r){return this.signAndSendTransactionLegacy({receiverId:e,actions:[mI(r)]})}async signAndSendTransactionLegacy({receiverId:e,actions:r,returnError:n},o){let i,a,f=await oI(500,12,1.5,async()=>{[i,a]=await this.signTransaction(e,r,o);try{return await this.provider.sendTransaction(a)}catch(l){if(l.type==="InvalidNonce")return oi.warn(`Retrying transaction ${e}:${me(i)} with new nonce.`),null;if(l.type==="Expired")return oi.warn(`Retrying transaction ${e}:${me(i)} due to expired block hash`),null;throw l.context=new L1(me(i)),l}});if(!f)throw new zt("nonce retries exceeded for transaction. This usually means there are too many parallel requests with the same access key.","RetriesExceeded");if(NN({contractId:a.transaction.receiverId,outcome:f}),!n&&typeof f.status=="object"&&typeof f.status.Failure=="object"&&f.status.Failure!==null)throw f.status.Failure.error_message&&f.status.Failure.error_type?new zt(`Transaction ${f.transaction_outcome.id} failed. ${f.status.Failure.error_message}`,f.status.Failure.error_type):H8(f);return f}accessKeyByPublicKeyCache={};async findAccessKey(e,r){if(!this.signer)throw new Error("Please set a signer");let n=await this.signer.getPublicKey();if(!n)throw new zt(`no matching key pair found in ${this.signer.constructor.name}`,"PublicKeyNotFound");let o=this.accessKeyByPublicKeyCache[n.toString()];if(o!==void 0)return{publicKey:n,accessKey:o};try{let i=await this.provider.query({request_type:"view_access_key",account_id:this.accountId,public_key:n.toString(),finality:Rr}),a={...i,nonce:BigInt(i.nonce||0)};return this.accessKeyByPublicKeyCache[n.toString()]?{publicKey:n,accessKey:this.accessKeyByPublicKeyCache[n.toString()]}:(this.accessKeyByPublicKeyCache[n.toString()]=a,{publicKey:n,accessKey:a})}catch(i){if(i.type=="AccessKeyDoesNotExist")return null;throw i}}async addKey(e,r,n,o){n||(n=[]),Array.isArray(n)||(n=[n]);let i;return r?i=mY(r,n,o):i=qx(),this.signAndSendTransactionLegacy({receiverId:this.accountId,actions:[um(st.from(e),i)]})}async viewFunction(e){return await aY(this.getConnection(),e)}async viewState(e,r={finality:Rr}){return await iY(this.getConnection(),this.accountId,e,r)}async getAccessKeys(){return(await this.provider.query({request_type:"view_access_key_list",account_id:this.accountId,finality:Rr}))?.keys?.map(r=>({...r,access_key:{...r.access_key,nonce:BigInt(r.access_key.nonce)}}))}async getAccountDetails(){return{authorizedApps:(await this.getAccessKeys()).filter(n=>n.access_key.permission!=="FullAccess").map(n=>{let o=n.access_key.permission;return{contractId:o.FunctionCall.receiver_id,amount:o.FunctionCall.allowance,publicKey:n.public_key}})}}async state(){return this.provider.query({request_type:"view_account",account_id:this.accountId,finality:"optimistic"})}async getAccountBalance(){let e=await this.provider.experimental_protocolConfig({finality:Rr}),r=await this.state(),n=BigInt(e.runtime_config.storage_amount_per_byte),o=BigInt(r.storage_usage)*n,i=BigInt(r.locked),a=BigInt(r.amount)+i,s=a-(i>o?i:o);return{total:a.toString(),stateStaked:o.toString(),staked:i.toString(),available:s.toString()}}async getActiveDelegatedStakeBalance(){let e=await this.provider.block({finality:Rr}),r=e.header.hash,n=e.header.epoch_id,{current_validators:o,next_validators:i,current_proposals:a}=await this.provider.validators(n),s=new Set;[...o,...i,...a].forEach(m=>s.add(m.account_id));let c=[...s],u=c.map(m=>this.viewFunction({contractId:m,methodName:"get_account_total_balance",args:{account_id:this.accountId},blockQuery:{blockId:r}})),f=await Promise.allSettled(u);if(f.some(m=>m.status==="rejected"&&m.reason.type==="TimeoutError"))throw new Error("Failed to get delegated stake balance");let h=f.reduce((m,x,S)=>{let O=c[S];if(x.status==="fulfilled"){let P=BigInt(x.value);if(P!==0n)return{...m,stakedValidators:[...m.stakedValidators,{validatorId:O,amount:P.toString()}],total:m.total+P}}return x.status==="rejected"?{...m,failedValidators:[...m.failedValidators,{validatorId:O,error:x.reason}]}:m},{stakedValidators:[],failedValidators:[],total:0n});return{...h,total:h.total.toString()}}}});var bY=N(()=>{yY()});var AIe,lm,gY=N(()=>{Vl();rY();AIe="near-api-js:keystore:",lm=class extends cm{localStorage;prefix;constructor(e=window.localStorage,r=AIe){super(),this.localStorage=e,this.prefix=r}async setKey(e,r,n){this.localStorage.setItem(this.storageKeyForSecretKey(e,r),n.toString())}async getKey(e,r){let n=this.localStorage.getItem(this.storageKeyForSecretKey(e,r));return n?Ia.fromString(n):null}async removeKey(e,r){this.localStorage.removeItem(this.storageKeyForSecretKey(e,r))}async clear(){for(let e of this.storageKeys())e.startsWith(this.prefix)&&this.localStorage.removeItem(e)}async getNetworks(){let e=new Set;for(let r of this.storageKeys())if(r.startsWith(this.prefix)){let n=r.substring(this.prefix.length).split(":");e.add(n[1])}return Array.from(e.values())}async getAccounts(e){let r=new Array;for(let n of this.storageKeys())if(n.startsWith(this.prefix)){let o=n.substring(this.prefix.length).split(":");o[1]===e&&r.push(o[0])}return r}storageKeyForSecretKey(e,r){return`${this.prefix}${r}:${e}`}*storageKeys(){for(let e=0;e<this.localStorage.length;e++)yield this.localStorage.key(e)}}});var vY=N(()=>{gY()});var xY,wY=N(()=>{Gw();xY={serialize:{base_decode:t=>o0.decode(t)}}});var EY,AY=N(()=>{EY="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"});var _Y,SY=N(()=>{AY();_Y=(t=21)=>{let e="",r=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=EY[r[t]&63];return e}});var TY=G((zat,IY)=>{"use strict";IY.exports=t=>encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)});var CY=G((Kat,RY)=>{"use strict";var PY="%[a-f0-9]{2}",BY=new RegExp("("+PY+")|([^%]+?)","gi"),OY=new RegExp("("+PY+")+","gi");function bI(t,e){try{return[decodeURIComponent(t.join(""))]}catch{}if(t.length===1)return t;e=e||1;var r=t.slice(0,e),n=t.slice(e);return Array.prototype.concat.call([],bI(r),bI(n))}function _Ie(t){try{return decodeURIComponent(t)}catch{for(var e=t.match(BY)||[],r=1;r<e.length;r++)t=bI(e,r).join(""),e=t.match(BY)||[];return t}}function SIe(t){for(var e={"%FE%FF":"\uFFFD\uFFFD","%FF%FE":"\uFFFD\uFFFD"},r=OY.exec(t);r;){try{e[r[0]]=decodeURIComponent(r[0])}catch{var n=_Ie(r[0]);n!==r[0]&&(e[r[0]]=n)}r=OY.exec(t)}e["%C2"]="\uFFFD";for(var o=Object.keys(e),i=0;i<o.length;i++){var a=o[i];t=t.replace(new RegExp(a,"g"),e[a])}return t}RY.exports=function(t){if(typeof t!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return t=t.replace(/\+/g," "),decodeURIComponent(t)}catch{return SIe(t)}}});var MY=G((qat,NY)=>{"use strict";NY.exports=(t,e)=>{if(!(typeof t=="string"&&typeof e=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(e==="")return[t];let r=t.indexOf(e);return r===-1?[t]:[t.slice(0,r),t.slice(r+e.length)]}});var $Y=G((Hat,kY)=>{"use strict";kY.exports=function(t,e){for(var r={},n=Object.keys(t),o=Array.isArray(e),i=0;i<n.length;i++){var a=n[i],s=t[a];(o?e.indexOf(a)!==-1:e(a,s,t))&&(r[a]=s)}return r}});var qY=G(un=>{"use strict";var IIe=TY(),TIe=CY(),LY=MY(),BIe=$Y(),OIe=t=>t==null,gI=Symbol("encodeFragmentIdentifier");function PIe(t){switch(t.arrayFormat){case"index":return e=>(r,n)=>{let o=r.length;return n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,[ct(e,t),"[",o,"]"].join("")]:[...r,[ct(e,t),"[",ct(o,t),"]=",ct(n,t)].join("")]};case"bracket":return e=>(r,n)=>n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,[ct(e,t),"[]"].join("")]:[...r,[ct(e,t),"[]=",ct(n,t)].join("")];case"colon-list-separator":return e=>(r,n)=>n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,[ct(e,t),":list="].join("")]:[...r,[ct(e,t),":list=",ct(n,t)].join("")];case"comma":case"separator":case"bracket-separator":{let e=t.arrayFormat==="bracket-separator"?"[]=":"=";return r=>(n,o)=>o===void 0||t.skipNull&&o===null||t.skipEmptyString&&o===""?n:(o=o===null?"":o,n.length===0?[[ct(r,t),e,ct(o,t)].join("")]:[[n,ct(o,t)].join(t.arrayFormatSeparator)])}default:return e=>(r,n)=>n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,ct(e,t)]:[...r,[ct(e,t),"=",ct(n,t)].join("")]}}function RIe(t){let e;switch(t.arrayFormat){case"index":return(r,n,o)=>{if(e=/\[(\d*)\]$/.exec(r),r=r.replace(/\[\d*\]$/,""),!e){o[r]=n;return}o[r]===void 0&&(o[r]={}),o[r][e[1]]=n};case"bracket":return(r,n,o)=>{if(e=/(\[\])$/.exec(r),r=r.replace(/\[\]$/,""),!e){o[r]=n;return}if(o[r]===void 0){o[r]=[n];return}o[r]=[].concat(o[r],n)};case"colon-list-separator":return(r,n,o)=>{if(e=/(:list)$/.exec(r),r=r.replace(/:list$/,""),!e){o[r]=n;return}if(o[r]===void 0){o[r]=[n];return}o[r]=[].concat(o[r],n)};case"comma":case"separator":return(r,n,o)=>{let i=typeof n=="string"&&n.includes(t.arrayFormatSeparator),a=typeof n=="string"&&!i&&Ta(n,t).includes(t.arrayFormatSeparator);n=a?Ta(n,t):n;let s=i||a?n.split(t.arrayFormatSeparator).map(c=>Ta(c,t)):n===null?n:Ta(n,t);o[r]=s};case"bracket-separator":return(r,n,o)=>{let i=/(\[\])$/.test(r);if(r=r.replace(/\[\]$/,""),!i){o[r]=n&&Ta(n,t);return}let a=n===null?[]:n.split(t.arrayFormatSeparator).map(s=>Ta(s,t));if(o[r]===void 0){o[r]=a;return}o[r]=[].concat(o[r],a)};default:return(r,n,o)=>{if(o[r]===void 0){o[r]=n;return}o[r]=[].concat(o[r],n)}}}function jY(t){if(typeof t!="string"||t.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function ct(t,e){return e.encode?e.strict?IIe(t):encodeURIComponent(t):t}function Ta(t,e){return e.decode?TIe(t):t}function UY(t){return Array.isArray(t)?t.sort():typeof t=="object"?UY(Object.keys(t)).sort((e,r)=>Number(e)-Number(r)).map(e=>t[e]):t}function DY(t){let e=t.indexOf("#");return e!==-1&&(t=t.slice(0,e)),t}function CIe(t){let e="",r=t.indexOf("#");return r!==-1&&(e=t.slice(r)),e}function zY(t){t=DY(t);let e=t.indexOf("?");return e===-1?"":t.slice(e+1)}function FY(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&typeof t=="string"&&t.trim()!==""?t=Number(t):e.parseBooleans&&t!==null&&(t.toLowerCase()==="true"||t.toLowerCase()==="false")&&(t=t.toLowerCase()==="true"),t}function KY(t,e){e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e),jY(e.arrayFormatSeparator);let r=RIe(e),n=Object.create(null);if(typeof t!="string"||(t=t.trim().replace(/^[?#&]/,""),!t))return n;for(let o of t.split("&")){if(o==="")continue;let[i,a]=LY(e.decode?o.replace(/\+/g," "):o,"=");a=a===void 0?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?a:Ta(a,e),r(Ta(i,e),a,n)}for(let o of Object.keys(n)){let i=n[o];if(typeof i=="object"&&i!==null)for(let a of Object.keys(i))i[a]=FY(i[a],e);else n[o]=FY(i,e)}return e.sort===!1?n:(e.sort===!0?Object.keys(n).sort():Object.keys(n).sort(e.sort)).reduce((o,i)=>{let a=n[i];return a&&typeof a=="object"&&!Array.isArray(a)?o[i]=UY(a):o[i]=a,o},Object.create(null))}un.extract=zY;un.parse=KY;un.stringify=(t,e)=>{if(!t)return"";e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e),jY(e.arrayFormatSeparator);let r=a=>e.skipNull&&OIe(t[a])||e.skipEmptyString&&t[a]==="",n=PIe(e),o={};for(let a of Object.keys(t))r(a)||(o[a]=t[a]);let i=Object.keys(o);return e.sort!==!1&&i.sort(e.sort),i.map(a=>{let s=t[a];return s===void 0?"":s===null?ct(a,e):Array.isArray(s)?s.length===0&&e.arrayFormat==="bracket-separator"?ct(a,e)+"[]":s.reduce(n(a),[]).join("&"):ct(a,e)+"="+ct(s,e)}).filter(a=>a.length>0).join("&")};un.parseUrl=(t,e)=>{e=Object.assign({decode:!0},e);let[r,n]=LY(t,"#");return Object.assign({url:r.split("?")[0]||"",query:KY(zY(t),e)},e&&e.parseFragmentIdentifier&&n?{fragmentIdentifier:Ta(n,e)}:{})};un.stringifyUrl=(t,e)=>{e=Object.assign({encode:!0,strict:!0,[gI]:!0},e);let r=DY(t.url).split("?")[0]||"",n=un.extract(t.url),o=un.parse(n,{sort:!1}),i=Object.assign(o,t.query),a=un.stringify(i,e);a&&(a=`?${a}`);let s=CIe(t.url);return t.fragmentIdentifier&&(s=`#${e[gI]?ct(t.fragmentIdentifier,e):t.fragmentIdentifier}`),`${r}${a}${s}`};un.pick=(t,e,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[gI]:!1},r);let{url:n,query:o,fragmentIdentifier:i}=un.parseUrl(t,r);return un.stringifyUrl({url:n,query:BIe(o,e),fragmentIdentifier:i},r)};un.exclude=(t,e,r)=>{let n=Array.isArray(e)?o=>!e.includes(o):(o,i)=>!e(o,i);return un.pick(t,n,r)}});function MIe(t){return NIe[t]??"An unknown error occurred"}function hm(){return vI==null&&(vI=new WIe),vI}var HY,pm,wI,ic,Zt,Wn,Mo,NIe,Ba,rst,kIe,$Ie,FIe,LIe,jIe,GY,UIe,DIe,zIe,EI,KIe,qIe,HIe,GIe,WIe,vI,VIe,YIe,WY,ZIe,JIe,XIe,xI,VY,QIe,ZY=N(()=>{bY();Vl();vY();Ux();lI();am();wY();SY();HY=Jt(qY(),1),pm=(function(t){return t.login="login",t.sign="sign",t.logout="logout",t.verify_owner="verify_owner",t.keypom_claim="keypom_claim",t.sign_message="sign_message",t})({}),wI=(function(t){return t.ALL_METHODS="ALL_METHODS",t.SELECTED_METHODS="SELECTED_METHODS",t.FULL_ACCESS="FULL_ACCESS",t})({}),ic=(function(t){return t.website_callback="wcb",t.website_post_message="wpm",t.website_visit="wv",t.extension_injected="ext",t})({}),Zt=(function(t){return t.initializing="initializing",t.connected="connected",t.attempting_reconnect="attempting_reconnect",t.disconnected="disconnected",t.closed_success="closed_success",t.closed_fail="closed_fail",t.closed_window="closed_window",t})({}),Wn=(function(t){return t.localnet="localnet",t.testnet="testnet",t.betanet="betanet",t.mainnet="mainnet",t})({}),Mo=(function(t){return t.NEW_ACTION_STARTED="NEW_ACTION_STARTED",t.INCOMPLETE_ACTION="INCOMPLETE_ACTION",t.NO_ACCOUNTS="NO_ACCOUNTS",t.WINDOW_CLOSED="WINDOW_CLOSED",t.USER_CANCELLED="USER_CANCELLED",t.POPUP_WINDOW_REFUSED="POPUP_WINDOW_REFUSED",t.POPUP_WINDOW_OPEN_FAILED="POPUP_WINDOW_OPEN_FAILED",t})({}),NIe={[Mo.WINDOW_CLOSED]:"User closed the window",[Mo.INCOMPLETE_ACTION]:"User didn't complete the action",[Mo.NEW_ACTION_STARTED]:"A new action was started by the user, old action failed",[Mo.POPUP_WINDOW_OPEN_FAILED]:"Popup window failed to open",[Mo.POPUP_WINDOW_REFUSED]:"User refused to allow the popup window to open",[Mo.USER_CANCELLED]:"User cancelled the action",[Mo.NO_ACCOUNTS]:"No Meteor account found- try again after creating one"};Ba=class extends Error{_reason;cause;constructor(t,e){super(),t.message==null&&(t.message=MIe(t.endTags?.[t.endTags.length-1]??"unknown")),this._reason=t,this.message=t.message,this.name="MeteorActionError",this.cause=e}},rst=[Wn.testnet,Wn.mainnet,Wn.localnet,Wn.betanet],kIe={networkId:Wn.testnet,name:"Fastnear Testnet",nodeUrl:"https://test.rpc.fastnear.com",archivalUrl:"https://archival-rpc.testnet.near.org",helperUrl:"https://helper.testnet.near.org",explorerUrl:"https://explorer.testnet.near.org"},$Ie={networkId:Wn.betanet,name:"Fastnear Betanet",nodeUrl:"https://rpc.betanet.near.org",helperUrl:"https://helper.betanet.near.org",explorerUrl:"https://explorer.betanet.near.org"},FIe={networkId:Wn.mainnet,name:"Fastnear Mainnet",nodeUrl:"https://mw.rpc.fastnear.com",archivalUrl:"https://archival-rpc.mainnet.near.org",helperUrl:"https://helper.mainnet.near.org",explorerUrl:"https://explorer.mainnet.near.org"},LIe={networkId:Wn.localnet,name:"Localnet",nodeUrl:"http://localhost:3001",walletUrl:"http://localhost:3001/wallet"},jIe={[Wn.localnet]:LIe,[Wn.testnet]:kIe,[Wn.betanet]:$Ie,[Wn.mainnet]:FIe},GY=class{implementation;constructor(t){this.implementation=t}setJson(t,e){this.implementation.setString(t,JSON.stringify(e))}getJson(t){let e=this.implementation.getString(t);if(!(e==null||e==="undefined"||e==="null"))return JSON.parse(e)}setString(t,e){this.implementation.setString(t,e)}getString(t){let e=this.implementation.getString(t);if(e!=null)return e}clear(t){this.implementation.clear(t)}createJsonGetterSetter(t){return{get:()=>this.getJson(t),set:e=>this.setJson(t,e)}}createStringGetterSetter(t){return{get:()=>this.getString(t),set:e=>this.setString(t,e)}}},UIe=t=>t!=null&&t.length>0,DIe="https://wallet.meteorwallet.app",zIe=typeof window<"u"?window.localStorage.getItem("DEV__METEOR_WALLET_BASE_URL"):void 0,EI={wallet_base_url:zIe??DIe},KIe=390,qIe=650,HIe=class{comType;websiteWindow;wasOpened;walletOrigin;constructor(t,e){let r=EI.wallet_base_url,n=new URL(r);if(this.walletOrigin=n.origin,window.meteorCom==null){this.comType=ic.website_post_message,console.log("No extension found. Need to connect to web popup for Meteor communication");let o={source:ic.website_post_message,connectionUid:t.uid,pageUri:encodeURIComponent(window.location.href)},i=KIe,a=qIe,s=window.top.outerHeight/2+window.top.screenY-a/2,c=window.top.outerWidth/2+window.top.screenX-i/2,u=window.open(`${r}/connect/${t.network}/${t.actionType}?${(0,HY.stringify)(o)}`,"_blank",`popup=1,width=${i},height=${a},top=${s},left=${c}`);if(u!=null)this.websiteWindow=u;else throw new Ba({message:"Couldn't open popup window to complete wallet action",endTags:[Mo.POPUP_WINDOW_OPEN_FAILED]});window.addEventListener("message",f=>e(f.data)),this.wasOpened=!1}else this.comType=ic.extension_injected,this.wasOpened=!0,window.meteorCom.addMessageDataListener(e)}focus(){this.comType===ic.website_post_message&&this.websiteWindow?.focus()}sendMessage(t){this.comType===ic.website_post_message?this.websiteWindow?.postMessage(t,this.walletOrigin):window.meteorCom?.sendMessageData(t)}isWindowClosed(){return this.comType===ic.website_post_message?this.websiteWindow?.closed??!0:!1}hasActiveWindow(){return this.comType===ic.website_post_message?this.websiteWindow!=null:!0}close(){this.comType===ic.website_post_message&&delete this.websiteWindow}},GIe=450,WIe=class{baseWalletUrl;walletOrigin;listener;connections=[];comWindow;comInterval;constructor(){let t=EI.wallet_base_url,e=new URL(t);this.baseWalletUrl=t,this.walletOrigin=e.origin,this.listener=r=>{if(r!=null){let n=this.connections.find(o=>o.uid===r.uid);n!=null&&(this.updateConnection(n.uid,{lastConnection:Date.now()}),r.status===Zt.attempting_reconnect&&(this.updateConnection(n.uid,{status:Zt.initializing}),this.sendComs()),r.status===Zt.connected&&n.status===Zt.initializing&&this.updateConnection(n.uid,{status:Zt.connected}),r.status===Zt.closed_success&&(n.resolve({success:!0,endTags:[],payload:r.payload}),this.updateConnection(n.uid,{status:Zt.closed_success}),this.sendComs()),r.status===Zt.closed_fail&&(this.updateConnection(n.uid,{status:Zt.closed_fail}),this.sendComs(),n.reject(new Ba({endTags:r.endTags}))),r.status===Zt.closed_window&&(this.updateConnection(n.uid,{status:Zt.closed_window}),n.reject(new Ba({endTags:r.endTags,message:"User closed the window"}))),[Zt.disconnected,Zt.closed_fail,Zt.closed_window,Zt.closed_success].includes(r.status)&&this.removeConnection(n.uid))}}}removeConnection(t){this.connections=this.connections.filter(e=>e.uid!==t),this.connections.length===0&&(delete this.comWindow,clearInterval(this.comInterval),delete this.comInterval)}updateConnection(t,e){this.connections=this.connections.map(r=>r.uid===t?{...r,...e,uid:r.uid}:r)}sendComs(){if(this.comWindow?.hasActiveWindow()&&this.connections.length>0)if(this.comInterval==null&&(this.comInterval=setInterval(()=>this.sendComs(),GIe)),this.comWindow.isWindowClosed())if(this.comWindow.wasOpened){for(let t of this.connections)t.reject(new Ba({message:"User closed the window before completing the action",endTags:[Mo.INCOMPLETE_ACTION,Mo.WINDOW_CLOSED]}));this.connections=[],this.comWindow.close()}else console.log("Window is closed, need to allow popup");else{this.comWindow.wasOpened=!0;for(let{network:t,actionType:e,endTags:r,status:n,inputs:o,uid:i}of this.connections){let a={endTags:r,actionType:e,status:n,uid:i,network:t};n===Zt.initializing&&(a.inputs=o),this.comWindow.sendMessage(a)}}else clearInterval(this.comInterval),delete this.comInterval}addAndStartConnection(t){if(this.connections.length>0)for(let e of this.connections)e.status=Zt.disconnected,e.endTags=[Mo.NEW_ACTION_STARTED];this.connections.push(t),this.comWindow==null||!this.comWindow.hasActiveWindow()?this.comWindow=new HIe(t,this.listener):this.comWindow.focus(),this.sendComs()}async connectAndWaitForResponse({actionType:t,network:e,inputs:r}){let n={uid:_Y(),actionType:t,lastAttemptedConnection:0,lastConnection:0,status:Zt.initializing,promise:void 0,reject:void 0,resolve:void 0,currentPayload:{},inputs:r,network:e,endTags:[]},o=new Promise((i,a)=>{n.resolve=i,n.reject=s=>{this.connections=this.connections.filter(c=>c.uid!==n.uid),a(s)}});return n.promise=o,this.addAndStartConnection(n),await o}};VIe=t=>{if(t==="FullAccess")return Pr.fullAccessKey();let{receiverId:e,methodNames:r=[]}=t,n=t.allowance?BigInt(t.allowance):void 0;return Pr.functionCallAccessKey(e,r,n)},YIe=t=>typeof t=="string"?Buffer.from(t,"base64"):t,WY=t=>{switch(t.type){case"CreateAccount":return Pr.createAccount();case"DeployContract":{let{code:e}=t.params;return Pr.deployContract(e)}case"FunctionCall":{let{methodName:e,args:r,gas:n,deposit:o}=t.params;return Pr.functionCall(e,YIe(r),BigInt(n),BigInt(o))}case"Transfer":{let{deposit:e}=t.params;return Pr.transfer(BigInt(e))}case"Stake":{let{stake:e,publicKey:r}=t.params;return Pr.stake(BigInt(e),st.from(r))}case"AddKey":{let{publicKey:e,accessKey:r}=t.params;return Pr.addKey(st.from(e),VIe(r.permission))}case"DeleteKey":{let{publicKey:e}=t.params;return Pr.deleteKey(st.from(e))}case"DeleteAccount":{let{beneficiaryId:e}=t.params;return Pr.deleteAccount(e)}default:throw new Error("Invalid action type")}},ZIe=(t,e)=>{if(e)return e;let r=EI.wallet_base_url;switch(t){case"mainnet":return`${r}/connect/mainnet`;case"testnet":return`${r}/connect/testnet`;case"betanet":return`${r}/connect/betanet`;default:throw new Error("Invalid wallet URL")}},JIe="add_request_and_confirm",XIe="_meteor_wallet_auth_key",xI=new GY({getString:t=>window.localStorage.getItem(t),setString:(t,e)=>window.localStorage.setItem(t,e),clear:t=>window.localStorage.removeItem(t)});new GY({getString:t=>window.sessionStorage.getItem(t),setString:(t,e)=>window.sessionStorage.setItem(t,e),clear:t=>window.sessionStorage.removeItem(t)});VY=class YY{_walletBaseUrl;_authDataKey;_keyStore;_authData;_networkId;_provider;_connectedAccount;_initializationPromises=[];static async init(e){let r=new lm(window.localStorage,"_meteor_wallet"),n=new YY({appKeyPrefix:"near_app",keyStore:r,...e});return n.isSignedIn()||await r.clear(),n}constructor({appKeyPrefix:e="default",keyStore:r,networkId:n,walletUrl:o,nodeUrl:i}){let a=e+XIe;this._authDataKey=a,this._authData=xI.getJson(a)??{allKeys:[]},this._walletBaseUrl=ZIe(n,o),this._networkId=n,this._keyStore=r,this._provider=new oc({url:i??jIe[n].nodeUrl})}isExtensionInstalled(){return window.meteorWallet!=null}isSignedIn(){return!!this._authData.accountId}getAccountId(){return this._authData.accountId}async verifyOwner(e){let r=e.accountId??this.getAccountId(),n=await hm().connectAndWaitForResponse({actionType:pm.verify_owner,inputs:{accountId:r,message:e.message},network:this._networkId});if(n.success)return n;throw new Ba({endTags:n.endTags,message:n.message})}async requestSignIn(e){let{keyPair:r,...n}=e,o=r??Ia.fromRandom("ed25519"),i=o.getPublicKey().toString(),a=await hm().connectAndWaitForResponse({actionType:pm.login,inputs:{public_key:i,...n},network:this._networkId});if(a.success){let{allKeys:s,accountId:c}=a.payload;return this._authData={accountId:c,allKeys:s,signedInContract:{contract_id:n.contract_id,public_key:i}},xI.setJson(this._authDataKey,this._authData),await this._keyStore.setKey(this._networkId,c,o),{success:!0,endTags:[],payload:{accessKey:o,accountId:c}}}throw new Ba({endTags:a.endTags,message:a.message})}async signOut(){let e=this.getAccountId();if(this._authData.signedInContract!=null&&e!=null){let r={accountId:e,contractInfo:this._authData.signedInContract};await hm().connectAndWaitForResponse({actionType:pm.logout,inputs:r,network:this._networkId})}this._authData={allKeys:[]},xI.clear(this._authDataKey)}async signMessage({message:e,nonce:r,recipient:n,callbackUrl:o,state:i,accountId:a}){let s=await hm().connectAndWaitForResponse({actionType:pm.sign_message,inputs:{message:e,nonce:r,recipient:n,callbackUrl:o,state:i,accountId:a},network:this._networkId});if(s.success)return s.payload.state=i,s;throw new Ba({endTags:s.endTags,message:s.message})}async requestSignTransactions(e){let{transactions:r}=e,n=await this.transformTransactions(r);console.log("Transformed transactions",n);let o=await hm().connectAndWaitForResponse({actionType:pm.sign,inputs:{transactions:n.map(i=>i.encode()).map(i=>Buffer.from(i).toString("base64")).join(",")},network:this._networkId});if(o.success)return o.payload.executionOutcomes;throw new Ba({endTags:o.endTags,message:o.message})}async account(){let e=this.getAccountId();if(UIe(e)&&this._connectedAccount?.accountId!==e){let r=await this._keyStore.getKey(this._networkId,e),n=kf.fromSecretKey(r.toString());this._connectedAccount=new QIe(this,e,n)}if(this._connectedAccount==null)throw new Ba({endTags:[],message:"No current account connected to Meteor Wallet"});return this._connectedAccount}async transformTransactions(e){let r=await this.account(),n=r.getSigner(),o=r.provider,i=await n.getPublicKey();return Promise.all(e.map(async(a,s)=>{let c=await r.accessKeyForTransaction(i);if(!c)throw new Error(`Failed to find matching key for transaction sent to ${a.receiverId}`);let u=a.actions.map(l=>WY(l)),f=await o.viewBlock({finality:"final"});return om(r.accountId,st.from(c.public_key),a.receiverId,BigInt(c.access_key.nonce)+BigInt(s)+BigInt(1),u,xY.serialize.base_decode(f.header.hash))}))}},QIe=class extends dm{meteorWallet;constructor(t,e,r){super(e,t._provider,r),this.setSigner(r),this.meteorWallet=t}async signAndSendTransaction(...t){return typeof t[0]=="string"?this.signAndSendTransaction_direct({receiverId:t[0],actions:t[1]}):this.signAndSendTransaction_direct(t[0])}async trySendOrCreateTransaction({receiverId:t,actions:e}){let r=await this.getSigner().getPublicKey(),n=await this.accessKeyForTransaction(r);if(n!=null&&n.access_key.permission!=="FullAccess"&&!await this.accessKeyMatchesTransaction(n,t,e))return{sent:!1,transaction:{receiverId:t,signerId:this.accountId,actions:e}};if(n&&r&&r.toString()===n.public_key)try{return{executionOutcome:await super.signAndSendTransaction({receiverId:t,actions:e.map(o=>WY(o))}),sent:!0}}catch(o){if(o.type!=="NotEnoughAllowance")throw o}return{sent:!1,transaction:{receiverId:t,signerId:this.accountId,actions:e}}}async signAndSendTransaction_direct({receiverId:t,actions:e}){let{transaction:r,sent:n,executionOutcome:o}=await this.trySendOrCreateTransaction({receiverId:t,actions:e});return n?o:(await this.meteorWallet.requestSignTransactions({transactions:[r]}))[0]}async accessKeyMatchesTransaction(t,e,r){let{access_key:{permission:n}}=t;if(n==="FullAccess")return!0;if(console.log("Comparing access key and actions",{accessKey:t,receiverId:e,actions:r}),n.FunctionCall){let{receiver_id:o,method_names:i}=n.FunctionCall;if(o===e&&i.includes(JIe))return!0;if(o===e){if(r.length!==1)return!1;let a=r[0];if(console.log(a),a.type==="FunctionCall"){let s=a.params;return(!s.deposit||s.deposit.toString()==="0")&&(i.length===0||i.includes(s.methodName))}}}return!1}async accessKeyForTransaction(t){let e=(await this.getAccessKeyList()).keys;if(console.log("accessKeys",e),t){let n=e.find(o=>o.public_key.toString()===t.toString());if(n)return n}let r=this.meteorWallet._authData.allKeys;for(let n of e)if(r.indexOf(n.public_key)!==-1)return n;for(let n of e)if(n.access_key.permission==="FullAccess")return n;return null}}});var kJ={};r0(kJ,{setupMeteorWallet:()=>LRe});function sr(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(f){try{u(n.next(f))}catch(l){a(l)}}function c(f){try{u(n.throw(f))}catch(l){a(l)}}function u(f){f.done?i(f.value):o(f.value).then(s,c)}u((n=n.apply(t,e||[])).next())})}function LRe({iconUrl:t=oPe,deprecated:e=!1}={}){return()=>sr(this,void 0,void 0,function*(){return{id:"meteor-wallet",type:"injected",metadata:{available:!0,name:"Meteor Wallet",description:"Securely store and stake your NEAR tokens and compatible assets with Meteor.",iconUrl:t,deprecated:e,downloadUrl:"https://wallet.meteorwallet.app",useUrlAccountImport:!0},init:r=>FRe(Object.assign(Object.assign({},r),{params:{iconUrl:t}}))}})}var Hx,mm,Vn,oT,Yn,eTe,Ci,tTe,KZ,rTe,Gx,e0,iT,qZ,HZ,nTe,aT,GZ,WZ,GI,oTe,Fo,VZ,iTe,aTe,YZ,sTe,cTe,fTe,AI,uTe,ZZ,JZ,dTe,lTe,sT,pTe,hTe,xm,_I,dn,mTe,ac,SI,yTe,bTe,cT,gTe,XZ,vTe,JY,XY,xTe,QZ,II,QY,eZ,tZ,rZ,$o,nw,wTe,nZ,ETe,ATe,_Te,eJ,STe,tJ,ITe,TTe,BTe,OTe,PTe,rJ,RTe,CTe,NTe,MTe,kTe,nJ,$Te,FTe,LTe,TI,BI,OI,jTe,UTe,aw,oZ,DTe,fT,zTe,KTe,iZ,aZ,sZ,oJ,qTe,HTe,uT,GTe,WTe,VTe,Ni,YTe,ZTe,JTe,XTe,iJ,QTe,e7e,cZ,t7e,r7e,n7e,Ql,PI,o7e,sc,i7e,fZ,uZ,a7e,s7e,c7e,f7e,u7e,d7e,l7e,p7e,aJ,h7e,dZ,WI,m7e,dT,y7e,b7e,g7e,sJ,v7e,x7e,w7e,E7e,A7e,_7e,S7e,I7e,lZ,cc,T7e,B7e,cJ,O7e,P7e,R7e,t0,C7e,N7e,M7e,Wx,pZ,k7e,RI,$7e,CI,NI,MI,F7e,L7e,j7e,sw,fJ,VI,U7e,uJ,D7e,lT,z7e,K7e,pT,q7e,H7e,YI,G7e,W7e,V7e,Y7e,hZ,Z7e,J7e,X7e,mZ,hT,mT,Q7e,dJ,eBe,tBe,kI,$I,rBe,nBe,yZ,ZI,oBe,ow,vm,iw,iBe,aBe,ko,$f,lJ,yT,sBe,cBe,Vx,JI,fBe,uBe,pJ,dBe,lBe,bZ,ew,pBe,hBe,mBe,yBe,bBe,gBe,vBe,xBe,wBe,EBe,cw,hJ,ABe,_Be,SBe,IBe,mJ,TBe,BBe,OBe,PBe,RBe,CBe,NBe,MBe,kBe,$Be,FBe,LBe,gZ,jBe,UBe,FI,DBe,zBe,KBe,vZ,yJ,bT,qBe,HBe,GBe,gT,WBe,VBe,YBe,ZBe,JBe,XBe,QBe,xZ,eOe,tOe,rOe,nOe,oOe,iOe,aOe,wm,sOe,cOe,fOe,uOe,dOe,Yx,lOe,pOe,hOe,mOe,yOe,bOe,bJ,gOe,vOe,gJ,wZ,xOe,wOe,EOe,LI,AOe,_Oe,SOe,IOe,Xl,EZ,TOe,BOe,OOe,AZ,POe,ROe,vJ,COe,NOe,MOe,tw,kOe,$Oe,FOe,LOe,jOe,UOe,DOe,zOe,KOe,qOe,HOe,GOe,WOe,VOe,YOe,_Z,ZOe,JOe,XOe,QOe,SZ,ePe,tPe,vT,xJ,wJ,rPe,nPe,oPe,EJ,iPe,aPe,sPe,cPe,fPe,uPe,dPe,lPe,pPe,hPe,IZ,mPe,yPe,bPe,gPe,TZ,BZ,XI,QI,AJ,jI,_J,OZ,vPe,Zx,rw,SJ,xPe,wPe,EPe,eT,tT,APe,xT,_Pe,SPe,IPe,TPe,BPe,OPe,PPe,PZ,rT,RPe,IJ,CPe,NPe,MPe,RZ,kPe,$Pe,nT,TJ,Ff,UI,DI,FPe,BJ,LPe,jPe,UPe,CZ,wT,DPe,zPe,KPe,qPe,HPe,GPe,WPe,VPe,YPe,ZPe,JPe,XPe,QPe,eRe,tRe,rRe,nRe,oRe,iRe,aRe,sRe,cRe,fRe,OJ,uRe,dRe,NZ,MZ,lRe,pRe,zI,hRe,mRe,PJ,yRe,bRe,kZ,Jx,ym,$Z,bm,FZ,gRe,vRe,xRe,wRe,ET,LZ,RJ,ERe,ARe,Xx,_Re,CJ,SRe,IRe,TRe,jZ,BRe,ORe,KI,UZ,PRe,DZ,NJ,RRe,gm,zZ,CRe,NRe,qI,HI,MJ,Qx,MRe,kRe,$Re,FRe,$J=N(()=>{qv();CV();ZY();Hx=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},mm=function(t){return t&&t.Math===Math&&t},Vn=mm(typeof globalThis=="object"&&globalThis)||mm(typeof window=="object"&&window)||mm(typeof self=="object"&&self)||mm(typeof Hx=="object"&&Hx)||mm(typeof Hx=="object"&&Hx)||(function(){return this})()||globalThis,oT={},Yn=function(t){try{return!!t()}catch{return!0}},eTe=Yn,Ci=!eTe(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),tTe=Yn,KZ=!tTe(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),rTe=KZ,Gx=Function.prototype.call,e0=rTe?Gx.bind(Gx):function(){return Gx.apply(Gx,arguments)},iT={},qZ={}.propertyIsEnumerable,HZ=Object.getOwnPropertyDescriptor,nTe=HZ&&!qZ.call({1:2},1);iT.f=nTe?function(e){var r=HZ(this,e);return!!r&&r.enumerable}:qZ;aT=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}},GZ=KZ,WZ=Function.prototype,GI=WZ.call,oTe=GZ&&WZ.bind.bind(GI,GI),Fo=GZ?oTe:function(t){return function(){return GI.apply(t,arguments)}},VZ=Fo,iTe=VZ({}.toString),aTe=VZ("".slice),YZ=function(t){return aTe(iTe(t),8,-1)},sTe=Fo,cTe=Yn,fTe=YZ,AI=Object,uTe=sTe("".split),ZZ=cTe(function(){return!AI("z").propertyIsEnumerable(0)})?function(t){return fTe(t)==="String"?uTe(t,""):AI(t)}:AI,JZ=function(t){return t==null},dTe=JZ,lTe=TypeError,sT=function(t){if(dTe(t))throw new lTe("Can't call method on "+t);return t},pTe=ZZ,hTe=sT,xm=function(t){return pTe(hTe(t))},_I=typeof document=="object"&&document.all,dn=typeof _I>"u"&&_I!==void 0?function(t){return typeof t=="function"||t===_I}:function(t){return typeof t=="function"},mTe=dn,ac=function(t){return typeof t=="object"?t!==null:mTe(t)},SI=Vn,yTe=dn,bTe=function(t){return yTe(t)?t:void 0},cT=function(t,e){return arguments.length<2?bTe(SI[t]):SI[t]&&SI[t][e]},gTe=Fo,XZ=gTe({}.isPrototypeOf),vTe=Vn,JY=vTe.navigator,XY=JY&&JY.userAgent,xTe=XY?String(XY):"",QZ=Vn,II=xTe,QY=QZ.process,eZ=QZ.Deno,tZ=QY&&QY.versions||eZ&&eZ.version,rZ=tZ&&tZ.v8;rZ&&($o=rZ.split("."),nw=$o[0]>0&&$o[0]<4?1:+($o[0]+$o[1]));!nw&&II&&($o=II.match(/Edge\/(\d+)/),(!$o||$o[1]>=74)&&($o=II.match(/Chrome\/(\d+)/),$o&&(nw=+$o[1])));wTe=nw,nZ=wTe,ETe=Yn,ATe=Vn,_Te=ATe.String,eJ=!!Object.getOwnPropertySymbols&&!ETe(function(){var t=Symbol("symbol detection");return!_Te(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&nZ&&nZ<41}),STe=eJ,tJ=STe&&!Symbol.sham&&typeof Symbol.iterator=="symbol",ITe=cT,TTe=dn,BTe=XZ,OTe=tJ,PTe=Object,rJ=OTe?function(t){return typeof t=="symbol"}:function(t){var e=ITe("Symbol");return TTe(e)&&BTe(e.prototype,PTe(t))},RTe=String,CTe=function(t){try{return RTe(t)}catch{return"Object"}},NTe=dn,MTe=CTe,kTe=TypeError,nJ=function(t){if(NTe(t))return t;throw new kTe(MTe(t)+" is not a function")},$Te=nJ,FTe=JZ,LTe=function(t,e){var r=t[e];return FTe(r)?void 0:$Te(r)},TI=e0,BI=dn,OI=ac,jTe=TypeError,UTe=function(t,e){var r,n;if(e==="string"&&BI(r=t.toString)&&!OI(n=TI(r,t))||BI(r=t.valueOf)&&!OI(n=TI(r,t))||e!=="string"&&BI(r=t.toString)&&!OI(n=TI(r,t)))return n;throw new jTe("Can't convert object to primitive value")},aw={exports:{}},oZ=Vn,DTe=Object.defineProperty,fT=function(t,e){try{DTe(oZ,t,{value:e,configurable:!0,writable:!0})}catch{oZ[t]=e}return e},zTe=Vn,KTe=fT,iZ="__core-js_shared__",aZ=aw.exports=zTe[iZ]||KTe(iZ,{});(aZ.versions||(aZ.versions=[])).push({version:"3.41.0",mode:"global",copyright:"\xA9 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.41.0/LICENSE",source:"https://github.com/zloirock/core-js"});sZ=aw.exports,oJ=function(t,e){return sZ[t]||(sZ[t]=e||{})},qTe=sT,HTe=Object,uT=function(t){return HTe(qTe(t))},GTe=Fo,WTe=uT,VTe=GTe({}.hasOwnProperty),Ni=Object.hasOwn||function(e,r){return VTe(WTe(e),r)},YTe=Fo,ZTe=0,JTe=Math.random(),XTe=YTe(1 .toString),iJ=function(t){return"Symbol("+(t===void 0?"":t)+")_"+XTe(++ZTe+JTe,36)},QTe=Vn,e7e=oJ,cZ=Ni,t7e=iJ,r7e=eJ,n7e=tJ,Ql=QTe.Symbol,PI=e7e("wks"),o7e=n7e?Ql.for||Ql:Ql&&Ql.withoutSetter||t7e,sc=function(t){return cZ(PI,t)||(PI[t]=r7e&&cZ(Ql,t)?Ql[t]:o7e("Symbol."+t)),PI[t]},i7e=e0,fZ=ac,uZ=rJ,a7e=LTe,s7e=UTe,c7e=sc,f7e=TypeError,u7e=c7e("toPrimitive"),d7e=function(t,e){if(!fZ(t)||uZ(t))return t;var r=a7e(t,u7e),n;if(r){if(e===void 0&&(e="default"),n=i7e(r,t,e),!fZ(n)||uZ(n))return n;throw new f7e("Can't convert object to primitive value")}return e===void 0&&(e="number"),s7e(t,e)},l7e=d7e,p7e=rJ,aJ=function(t){var e=l7e(t,"string");return p7e(e)?e:e+""},h7e=Vn,dZ=ac,WI=h7e.document,m7e=dZ(WI)&&dZ(WI.createElement),dT=function(t){return m7e?WI.createElement(t):{}},y7e=Ci,b7e=Yn,g7e=dT,sJ=!y7e&&!b7e(function(){return Object.defineProperty(g7e("div"),"a",{get:function(){return 7}}).a!==7}),v7e=Ci,x7e=e0,w7e=iT,E7e=aT,A7e=xm,_7e=aJ,S7e=Ni,I7e=sJ,lZ=Object.getOwnPropertyDescriptor;oT.f=v7e?lZ:function(e,r){if(e=A7e(e),r=_7e(r),I7e)try{return lZ(e,r)}catch{}if(S7e(e,r))return E7e(!x7e(w7e.f,e,r),e[r])};cc={},T7e=Ci,B7e=Yn,cJ=T7e&&B7e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),O7e=ac,P7e=String,R7e=TypeError,t0=function(t){if(O7e(t))return t;throw new R7e(P7e(t)+" is not an object")},C7e=Ci,N7e=sJ,M7e=cJ,Wx=t0,pZ=aJ,k7e=TypeError,RI=Object.defineProperty,$7e=Object.getOwnPropertyDescriptor,CI="enumerable",NI="configurable",MI="writable";cc.f=C7e?M7e?function(e,r,n){if(Wx(e),r=pZ(r),Wx(n),typeof e=="function"&&r==="prototype"&&"value"in n&&MI in n&&!n[MI]){var o=$7e(e,r);o&&o[MI]&&(e[r]=n.value,n={configurable:NI in n?n[NI]:o[NI],enumerable:CI in n?n[CI]:o[CI],writable:!1})}return RI(e,r,n)}:RI:function(e,r,n){if(Wx(e),r=pZ(r),Wx(n),N7e)try{return RI(e,r,n)}catch{}if("get"in n||"set"in n)throw new k7e("Accessors not supported");return"value"in n&&(e[r]=n.value),e};F7e=Ci,L7e=cc,j7e=aT,sw=F7e?function(t,e,r){return L7e.f(t,e,j7e(1,r))}:function(t,e,r){return t[e]=r,t},fJ={exports:{}},VI=Ci,U7e=Ni,uJ=Function.prototype,D7e=VI&&Object.getOwnPropertyDescriptor,lT=U7e(uJ,"name"),z7e=lT&&(function(){}).name==="something",K7e=lT&&(!VI||VI&&D7e(uJ,"name").configurable),pT={EXISTS:lT,PROPER:z7e,CONFIGURABLE:K7e},q7e=Fo,H7e=dn,YI=aw.exports,G7e=q7e(Function.toString);H7e(YI.inspectSource)||(YI.inspectSource=function(t){return G7e(t)});W7e=YI.inspectSource,V7e=Vn,Y7e=dn,hZ=V7e.WeakMap,Z7e=Y7e(hZ)&&/native code/.test(String(hZ)),J7e=oJ,X7e=iJ,mZ=J7e("keys"),hT=function(t){return mZ[t]||(mZ[t]=X7e(t))},mT={},Q7e=Z7e,dJ=Vn,eBe=ac,tBe=sw,kI=Ni,$I=aw.exports,rBe=hT,nBe=mT,yZ="Object already initialized",ZI=dJ.TypeError,oBe=dJ.WeakMap,iBe=function(t){return iw(t)?vm(t):ow(t,{})},aBe=function(t){return function(e){var r;if(!eBe(e)||(r=vm(e)).type!==t)throw new ZI("Incompatible receiver, "+t+" required");return r}};Q7e||$I.state?(ko=$I.state||($I.state=new oBe),ko.get=ko.get,ko.has=ko.has,ko.set=ko.set,ow=function(t,e){if(ko.has(t))throw new ZI(yZ);return e.facade=t,ko.set(t,e),e},vm=function(t){return ko.get(t)||{}},iw=function(t){return ko.has(t)}):($f=rBe("state"),nBe[$f]=!0,ow=function(t,e){if(kI(t,$f))throw new ZI(yZ);return e.facade=t,tBe(t,$f,e),e},vm=function(t){return kI(t,$f)?t[$f]:{}},iw=function(t){return kI(t,$f)});lJ={set:ow,get:vm,has:iw,enforce:iBe,getterFor:aBe},yT=Fo,sBe=Yn,cBe=dn,Vx=Ni,JI=Ci,fBe=pT.CONFIGURABLE,uBe=W7e,pJ=lJ,dBe=pJ.enforce,lBe=pJ.get,bZ=String,ew=Object.defineProperty,pBe=yT("".slice),hBe=yT("".replace),mBe=yT([].join),yBe=JI&&!sBe(function(){return ew(function(){},"length",{value:8}).length!==8}),bBe=String(String).split("String"),gBe=fJ.exports=function(t,e,r){pBe(bZ(e),0,7)==="Symbol("&&(e="["+hBe(bZ(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!Vx(t,"name")||fBe&&t.name!==e)&&(JI?ew(t,"name",{value:e,configurable:!0}):t.name=e),yBe&&r&&Vx(r,"arity")&&t.length!==r.arity&&ew(t,"length",{value:r.arity});try{r&&Vx(r,"constructor")&&r.constructor?JI&&ew(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch{}var n=dBe(t);return Vx(n,"source")||(n.source=mBe(bBe,typeof e=="string"?e:"")),t};Function.prototype.toString=gBe(function(){return cBe(this)&&lBe(this).source||uBe(this)},"toString");vBe=dn,xBe=cc,wBe=fJ.exports,EBe=fT,cw=function(t,e,r,n){n||(n={});var o=n.enumerable,i=n.name!==void 0?n.name:e;if(vBe(r)&&wBe(r,i,n),n.global)o?t[e]=r:EBe(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch{}o?t[e]=r:xBe.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},hJ={},ABe=Math.ceil,_Be=Math.floor,SBe=Math.trunc||function(e){var r=+e;return(r>0?_Be:ABe)(r)},IBe=SBe,mJ=function(t){var e=+t;return e!==e||e===0?0:IBe(e)},TBe=mJ,BBe=Math.max,OBe=Math.min,PBe=function(t,e){var r=TBe(t);return r<0?BBe(r+e,0):OBe(r,e)},RBe=mJ,CBe=Math.min,NBe=function(t){var e=RBe(t);return e>0?CBe(e,9007199254740991):0},MBe=NBe,kBe=function(t){return MBe(t.length)},$Be=xm,FBe=PBe,LBe=kBe,gZ=function(t){return function(e,r,n){var o=$Be(e),i=LBe(o);if(i===0)return!t&&-1;var a=FBe(n,i),s;if(t&&r!==r){for(;i>a;)if(s=o[a++],s!==s)return!0}else for(;i>a;a++)if((t||a in o)&&o[a]===r)return t||a||0;return!t&&-1}},jBe={includes:gZ(!0),indexOf:gZ(!1)},UBe=Fo,FI=Ni,DBe=xm,zBe=jBe.indexOf,KBe=mT,vZ=UBe([].push),yJ=function(t,e){var r=DBe(t),n=0,o=[],i;for(i in r)!FI(KBe,i)&&FI(r,i)&&vZ(o,i);for(;e.length>n;)FI(r,i=e[n++])&&(~zBe(o,i)||vZ(o,i));return o},bT=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],qBe=yJ,HBe=bT,GBe=HBe.concat("length","prototype");hJ.f=Object.getOwnPropertyNames||function(e){return qBe(e,GBe)};gT={};gT.f=Object.getOwnPropertySymbols;WBe=cT,VBe=Fo,YBe=hJ,ZBe=gT,JBe=t0,XBe=VBe([].concat),QBe=WBe("Reflect","ownKeys")||function(e){var r=YBe.f(JBe(e)),n=ZBe.f;return n?XBe(r,n(e)):r},xZ=Ni,eOe=QBe,tOe=oT,rOe=cc,nOe=function(t,e,r){for(var n=eOe(e),o=rOe.f,i=tOe.f,a=0;a<n.length;a++){var s=n[a];!xZ(t,s)&&!(r&&xZ(r,s))&&o(t,s,i(e,s))}},oOe=Yn,iOe=dn,aOe=/#|\.prototype\./,wm=function(t,e){var r=cOe[sOe(t)];return r===uOe?!0:r===fOe?!1:iOe(e)?oOe(e):!!e},sOe=wm.normalize=function(t){return String(t).replace(aOe,".").toLowerCase()},cOe=wm.data={},fOe=wm.NATIVE="N",uOe=wm.POLYFILL="P",dOe=wm,Yx=Vn,lOe=oT.f,pOe=sw,hOe=cw,mOe=fT,yOe=nOe,bOe=dOe,bJ=function(t,e){var r=t.target,n=t.global,o=t.stat,i,a,s,c,u,f;if(n?a=Yx:o?a=Yx[r]||mOe(r,{}):a=Yx[r]&&Yx[r].prototype,a)for(s in e){if(u=e[s],t.dontCallGetSet?(f=lOe(a,s),c=f&&f.value):c=a[s],i=bOe(n?s:r+(o?".":"#")+s,t.forced),!i&&c!==void 0){if(typeof u==typeof c)continue;yOe(u,c)}(t.sham||c&&c.sham)&&pOe(u,"sham",!0),hOe(a,s,u,t)}},gOe=yJ,vOe=bT,gJ=Object.keys||function(e){return gOe(e,vOe)},wZ=Ci,xOe=Fo,wOe=e0,EOe=Yn,LI=gJ,AOe=gT,_Oe=iT,SOe=uT,IOe=ZZ,Xl=Object.assign,EZ=Object.defineProperty,TOe=xOe([].concat),BOe=!Xl||EOe(function(){if(wZ&&Xl({b:1},Xl(EZ({},"a",{enumerable:!0,get:function(){EZ(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var t={},e={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach(function(o){e[o]=o}),Xl({},t)[r]!==7||LI(Xl({},e)).join("")!==n})?function(e,r){for(var n=SOe(e),o=arguments.length,i=1,a=AOe.f,s=_Oe.f;o>i;)for(var c=IOe(arguments[i++]),u=a?TOe(LI(c),a(c)):LI(c),f=u.length,l=0,h;f>l;)h=u[l++],(!wZ||wOe(s,c,h))&&(n[h]=c[h]);return n}:Xl,OOe=bJ,AZ=BOe;OOe({target:"Object",stat:!0,arity:2,forced:Object.assign!==AZ},{assign:AZ});POe=sc,ROe=POe("toStringTag"),vJ={};vJ[ROe]="z";COe=String(vJ)==="[object z]",NOe=COe,MOe=dn,tw=YZ,kOe=sc,$Oe=kOe("toStringTag"),FOe=Object,LOe=tw((function(){return arguments})())==="Arguments",jOe=function(t,e){try{return t[e]}catch{}},UOe=NOe?tw:function(t){var e,r,n;return t===void 0?"Undefined":t===null?"Null":typeof(r=jOe(e=FOe(t),$Oe))=="string"?r:LOe?tw(e):(n=tw(e))==="Object"&&MOe(e.callee)?"Arguments":n},DOe=UOe,zOe=String,KOe=function(t){if(DOe(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return zOe(t)},qOe=t0,HOe=function(){var t=qOe(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},GOe=e0,WOe=Ni,VOe=XZ,YOe=HOe,_Z=RegExp.prototype,ZOe=function(t){var e=t.flags;return e===void 0&&!("flags"in _Z)&&!WOe(t,"flags")&&VOe(_Z,t)?GOe(YOe,t):e},JOe=pT.PROPER,XOe=cw,QOe=t0,SZ=KOe,ePe=Yn,tPe=ZOe,vT="toString",xJ=RegExp.prototype,wJ=xJ[vT],rPe=ePe(function(){return wJ.call({source:"a",flags:"b"})!=="/a/b"}),nPe=JOe&&wJ.name!==vT;(rPe||nPe)&&XOe(xJ,vT,function(){var e=QOe(this),r=SZ(e.source),n=SZ(tPe(e));return"/"+r+"/"+n},{unsafe:!0});oPe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZsAAAGbCAMAAAAlRs3KAAAC/VBMVEUAAAB1gdddWs6cq+JsadRdXalLTJhFRXtTU415iNhOTo5+pe41NXxjYM8qKmscHGuRn+MSGZl0ovJ3eL6EqPEXF19QUcFdnfNlctZZmvNvc9prbdaMsPA1NoYkJHFdXdFSg+08ReFMO9VVTdg3k/Vdk/BHSL1bXac+mPVDlvQcIqFKcupJlfQvL3lRculLS404ivJLRNw9P7dHkPIoKHQ/lPQpLapPm/RGRohmlvF0oPCBg7pFPt4UFFBOQ9AkKag0OK9Ie+04PLJYT9ZeYLtJRsc4OH9LXOE/TuIrL64kJG9dZ+EVHJxDZudFgu5AXuZHk/NHjfE9PMA2OLVQfOtLd+tQjfBrbLZ7fbFGdOs8d+1Dj/JCK9hPT49Jk/JqnvJaVc4jI3EXHptRTclVUcxOS8dUQdhNQ91SO9pZUdBLRt5WR9UgIGlLScVYU80YGFJXTNJGRcMbG1tDfO1BXOVDeexSPttJR8RVRNZDV+MUFEVTUMohIW5BaOhCcuqkoe9Eh+9DgO5CQcBCdetAX+VHT+FCbelBZedPQdxBaulITeBJS99GUeFFU+JAYeZYTtEdHWBKSd8XF04WFkseHmNCWeQTE0JEVeISEj94a+49Pr1WStRQP9xAQL5FivBCb+lFj/IfH2YZGVVBY+YaGlhGlvNEhO4VFUk5O7tGkvNFjPEPDzoRET0tMLDCv/02OLgwM7IqLa00NrZaVM8cIqAcHF4kKagyNbQhJqVCWuQODjVGmvQnK6tEQsIKCi0dHW1MR8tQSsuAcfUYGGmrqPNiXd97bfFKSN9hXNFNS9CvrPQGBiMFDJMTE2ZIRMhfWtsVG6NFRc0/QMfIxf9AlvQICFxQTtUoJ3lpZNU5OcCbmOw0NJrRzv8ZHopoYONcV9UwL4ampPAPFpgSElRRTcJEQacwMbo6Oq1WU9g8PLM+jvIVFV0dIamBfeAoKpM3cOsnKrOOi+ZJSNE7g+9GM9s4VuU7OqJ0cNo1e+83aOlyZ+q7uPkyX+gzT+RLR7VJUHVbAAAAYHRSTlMACZEcgRAaYFcjjy+3ib/zE9xhVFP2lmouhmk/Q3XcXEv+/bL+qGNK9d7Vq8yjfzb+2a2k7em8saKagj/++dCljvvGnHfp0r7s6s2b7u3z3b7u6NrO8+HPcNr59ujU+LDlSLXNAAApKklEQVR42uzYPU7EMBAF4IlQftZEASkNTdxSRdtssdK2aIvcYu4xd5vCtUvEdRACaSRgvSlINsLvu8LzjJ9NAAAAAAAAAAAAAAAAAJCzsjoNbhzd0FcVwXZUjTt7/uInVz8RbMLe+fAqLMIfhDnGw1gXBLfWtxqUv9Gg55eS4Jb2owb+VQhdQ3A79SEIX6I8YLHdjAvKCRLaHa2prO77pq6b/qnK/FSUY+Ar4rSntVS18wdVEVHVw3loMo6naCNfpX6dcIrno5coLHbdvU1uT3myaJKC39HiiuEcflx8IoG7njJUWjRpsStoYc2kKvwLERl3lJuyDTxTGGlR1VGVLxH1uTX5wqK5Lja0oJNX4QRVRzmxhTaH+pIW8/ygnCaxzej31aKZJwy0lMaiuUynbAqbNbSZ1N+RWW1qjHSZTM7n1GxicCyaK7TL4iFqDW0+nQoy6y00E3MoBIloEuKJzB9Gs5WyuAmJhZYSj2RWXGhG/SP9b+/s2rFrE1EcB/BLbFqjRcWaUBTtIOgkhVKkIARRU1G3OOgiRK635QXO5YY7EO4vyNCp4FBwTWiE6OLjkOsQAhHhCCYli4iTEezk0MXna8jvJeba9L0neSl+h66v8Mn39969O9oaHptVGGqSW/N/qgENV5zPi+OhgTiJY317Qwaa4/DhNK7/C5r/xWFpSPhsno6JBuItn9COa8hAc2jGfxhgaY7PUS0yfeHixYsX4rEIV2u4cfyVsdM892c1dXPp2t1U2sWmiTPp1KOFeQ4aXhxvVioN1+/DUfYYHVu4qiPTMNB+rBZOJy8dgeZ7zhHAcWaltobP5rmiQ23hqoWQ8SeoG8vCZnJ+dJqcCI43K5OGt7yXNQUzf9WkMAM4Fn68MDKNEI6/Io+Gu7yNFU29TKWRbUAAB5k4GRuZhsUZw8MFtIbTxl/VlEvU1EmG4ZDgpfhhNGcojVBzGnOSaHxn4F9Q5QUsVyJ3EZEJx7Ey04fTiOJ4i1JoNoGGA8dZVuwVWyRKaSiOibH5N465FNPCM00HmiCOv3pOSms2yfI5fpyzatlEooZOY2GMstVq1nRdNIDjJg9szWZOGMe/IYeGLn9cbLo0tuEav3Zqe6XS3pfdJt5AAzgLB9FsiuP4JyXQdP8PJzdEZwJnWiSq2zahMY0ftaDdDkjI35dN19T7cDLxkIFGaYRxnOWYOE1iHZbnw/GuKPTVAKUhOLi63W6XemkHOwizOOhVNOzwTGDEceqnJAw0SkPDu+XUn2nKhNKQ4GaJyDAJ2tvI7WvORnzoQPu6vi4Bxzkbl9QaseY01HmDQ2jW1oCmL+0vlmkADmpFhw60dRJxnPqKRJrhe86E3dlQGoKD9BrQAM7uRt9pLRVGI47jLcflDTRYnmPXu6WpkUjUXqPBu0ADCYKmy+LguWEDTQpOY0ZOa0Sb41zR1EiPBlVLAZCwU81EDE5rarA1XwsFKTj+rDBNBZYO23Mm6IOBHo39EWrDhoBVsQE47v2/aaTgeA8FHypmEgV2ae7TmuOr8cV6JLrWjW7XgtLQtH+0DAYnHWMHGqWRgeMkFgVbQ2hIxJvjryrxdENo8vk8tTGqpTCbHYwYnPT0QGsAh4YPxxO9gJ6pVOB3wbfnwGdYCoTSdHHQrzCbYNuwDMDJnGBpKhXAEWiOVxelSVToyjSHNWcCXt5QGrAJwmz28qYBOK0LDM0LsBFojnhrTia+04UlNKeuQm0ITTab3w/0JsQGcFrnGZoXgMPRHIk0FVhZbM+p39DGH0oDOEa4Tc224GWbtXGaoeHDkb7XkNbAyjS8zfGvKPBRZySaz2YB56CzwEsDbAyUOQc01IYbRz7N6M0JvdFT4EqAtobFse3tMJtdVzcg6WmGhrc5kml663LuOUAzo409PRrACX32DJpYBxwzBTQCOHJpCoAjdFqrK3DJCTSA86EZcmdT05EOOO4USyM01uDwHL8+lVy6eXMpOTW3yEVT4GiOou8GgIbB+bjTHmrzi9QGcNAcpXkNMiLN8RK3tNi125lO5325WCy/7XzaunMvfhSaF4RmdJz+KEgDrenD+VDdC4beChg6g5Pap3ktBccrPJlPPtjaKr7bIin+SbnTeXD70hFpOJvjTAJNtzjw+MlONMvWAQc/6tIADv9Yy+W+Vd/8fPfmzTuwKZbL79+Wb8ePMtC4m6MazW/q7i60rTIOA7jzC4coykBkIkIHE7zTCxH82Jh6oezOC28U0iaZ69YmSy/WkQwCvfKuNSkhzZaLhsIJJCH9yloObWhCEtO07KwV1i5zSVNbt+Iy7CgtdFD8vydJ/yc5zTnp+5529ZmgF2rAn89z3ryJFgdNpnO7+MefNTTP0pNAs4vT/u1bx77nfISGvTn91zfn/x0OD0NKOKjz+LsPG6PBF6VrzpGiwdbshbP47M8/pF8XsNssQIM4t19+4c2/fD5NcHqbH94bDkNEnOrqDI1PvK9OMzDQg32lfOb8H2jKs5bO/vEn8JS+BPWsaOy0Vdk8+vFNzkcywDxrvQtr8/5w2aZ21kh13lFtzUAEwtico0ODg1ZHJza1SL46CHlWKJomjTYI0tzVdbiIDHtzgMY/74eIOvJZg9z5RJUG/41gaM4RocHWwC2NzQbX0DIcg9GiTy9CdO0WI/w5UhxDa7PbZzaz4xAaD9CQgExJpTJriHNWedAilbpGmJpzxGgMeoMOANLkD2pwIDZjO/wy2gwQm0TH8GjJbYYo4kQawiGt8ZRoBsfCnslOb3gsNCTD+UClNTIcqhuCo0RjiKWL61k7JLteTMdMMhyDJGhjE+5bzT60UXjmqH2eEyE0HoIzFo4Jue2+vr7tXGvXUAhnjdjc+uhYXRrJxQTVM+do0uhtRXsmkShAEomMfctmk+GY9sIRVq2cWQzrrEWaPUADCY915uLxeIoEfi+Eh6qfOXfeqTdovg4MxawdUZpYej2TsO8mkVlP61VxII9WOaDRAqenQuMP5+Pxvt2k4n2WGpzxd/emwdZQz1rb0aPRL9oz9qpksoCjNmsGYZWzmqU21Efpjt3W+JPxVJ808XgMcbA4dQYNQ3GUPkI0lcOzcbFQosGAlU5t1oDGijQszZHS5HZLg9WZqmrOxHfH5TQ+pGF55hwVmt1BW7TjniHOusGkhCPSuBwOdpzys8br9SJNNU7KOzSGOHhUQ5ov/8LXY5q1/wMN4GzFdAqzVqZBHPpZg9bc9pIgTXXiyZC0OLc+kdPg6zHO2lGgeWGXpoA00iSyOkNdHJshWaZhb85AhcaPNLU4Fun7nIkfjslpSNhmDWle/fybs2fOnDl78l2mr/xq3xrE2cLjgGzWhFW3y+xgxyGt8ZZpPEhTayOExhBnKPReFY2jTKM6a+o4/3z2wntnz52fXV5uaWlZXp49f+6s6uX3IdKgTTFWz8aUXHW5nSIM66zBoM15uxRpwGY7PCi9IDhd3ZrSq7HPWn/P0o9nWpZnWzCzyy2f4uONMeyDhqOGV2tVOmUapzqOenN8zV6ggSjRwGnAEpJcfA6+X0ODOAyz1t/b9mAcClMTsPoUekoRptYY67cGUsimDbq9cIDGDTSIQz9rvuswaITGo0ADgfc4ks9zHp+WDJrDJ4Z11qA0zS13UKRKp+UNbQFoBw1t7GnbXja6Mg2EddYGoDVdIo0XaBRtQpKPDO6cxNaUaRhmDSK2ZgFp9qgO5amAfdDUbVBnJLfqDgILOw60pkLjTwKNig3iQG+QBl6tnP3OGuoATf8DlNlL56PXXzj4HFOmwSRw0zCkNcGgk+PAhXXWzNe7gIbEnwcaRZupkORj6rH3cdDMZsShn7VeFRrAOS+/jdCexiQbNNWzAGYkuRogNBrg+K5PTpVoPMZUSpEGzgKDYQnOaWyNrKc0OL29QKOS2bdf0UaAnQbP0NLAoAUDnBjWWYPWTFssoo03p1abbenH1KGxEyUavAOnnzWkUcU5q5EBO02hsKiX2eRWAwHOakUc6uaY2yanJi0WyyTWRsEmPyjBCf3wFqFxIg1Lc5BGFecEOwALDSaxjpOGgybSEBzGWTNfF2kIjvrTJtU3OexHnMFz2BoNcJBGJcvyj1y1p9Gn1WkKeNdZNWjWUhhnzdEGg1ZOA5MmjEm/ffP4ZTkNztp+j9I9PUijVhx8z3tgrVGiwc8I9Cb5oFVo2GYt4myzAE3FxrKdUqbp8w77EWcwdBxOaEizn+bIcZBGPctv47ucA2rNYiM0WVPtATq5yiMNy6xFHIQGbdqVbVJxI9QGcULvwLPGii9EP2tI02hx8ELigAYtq06TwM+kcdACPMpQzhrSYLztfSlFmm7SGrT5+8RrX3IOBwWObNaQpsHifMoAoE5jMGUz6q2xp2O1g7YT4F0uF5iwzpqz3zLd2dmJvencTinRtI75PR7UGZ7/mePwhVhmDWkaHrXjGpIgjWGkVJuiOk1CTpNccfNWF+JQzxrQdE5bOiH4vMmllFpDaCQ48/cDVocY5lnriCANw6ix07SKNvrFQqHhQcPk871RVymMs0aOAUQGbSa9ybhCa8JAgzjhe8M+l0MM86xFkKZhmxe1t3nxSmsrwTHp1zMUg6bLLUXdLi1wuH7L3RIN6nhaU/VphokL4njmm4MOCFNzaFsDNue0b00MaAiOLW0vqNJga3DRgrwbcehnjevtvNvejjj4wFGkQZy5J0HOqYajfvFJRwP56BWtWxPrbi3h6LcS+xg0vA9ojrohzDhcP6GR4Xjz8XqDJn41CnHmN61WfBmGZw7NoJGc1/gdzhvXusFGTKyoYpPJ4qBhbXYCAWLDOmswaEAjx4F3n/G9aUBGajO/5nA7IezNEVvz/G3eaOqGoE2jNBhhAWqDOLRHaVdPu0gjx8HbTllrpDhza76gE8KO09EBNM/f5mTTlStXKjqx9USjg4bJr7h4AsM4a1Z41hiNdXAMqbiMxi/CoM480rDNWmSA0Dx/m/e+7VawUWgNJnk/GgiCC9usuXo7HxmN9XC8xu24pDogpfd7u9BGbI054IQwNwdpnu9Z4N2PbwBNSQc3raETGr63aYsGg5Q4SBMhNAo4k0JfvLRsqVQ8lbSEvV0QxCE0+CIUzUGaAQoa7c/Qx7+6fKOCQ3RiW4kGBw0j2Dg+CGGZNZ+1hwyaEk6X1yjkwAV8tgWjx0NkEKdMQ43DSqP9e8+Xvmq6AZHY4PsbtUFDG/hoAG3omuPqWYHW1MOpXHp6J42t+XyrsQtkKtmlcQCNFjh0g6b9nc2ppsuXoTiS5sTWM/ugwceNGGocd2Tlkd5YDwd1KhRlF8QBGt7KaYHjG3jwmAJF87vOF5tuXK7BiS0mCo0OGt7XkOIwzJoLaIx6NRzMZFdVyjRWLXB8Phoa7T8jONl07bIYyaxdweKotQYvBWZkNvtqjrsHWgNRwrFUpcZm7qEzYIWw4xCa0ZZR6kn7QKsjWtO1a3KcWN6eaYgGbdqiAcChnbXSoJHQNufpGkdaw44jDtroKDXOslYn6Le+unBNhgM6U2nEQRq9rq6N0E9sqGct2EFo6HG8T9ecQKMFjtgaCNCMPteTwKkmsJE3h+BkMwU7JpFZ1wFNfZu2GZChnbUgtoZu1uawNYw4ZjPQiKGQ0fI7UKc3rl2oh2MoFjLlI0EhkbEXbUBTP8nrxIZy1gIdK4INTKib8/Qh0rDhmKE142Uaqlmb/VAbmhNNFyByHFHnylS6mC1kIAl7tqiLmXRKyS3M8CBDNWswaHmbjQHn6ZoVaZhwoDX/Ak05FDiz32j1sLl4oZQ9cbpjsdbFrWKxuLVo0ht0ykkuRcGGCicQARoxlDhzQIN/fxYch/nBxPj4+CjhoXrmLJ/RaNG+birJ1Js1wjMVg98M0Bk1m01iQzNr4qBBaJvTNedxAo0WOA7SGhKszT5ptPrPCD7YuHi1Hg5efJKM6FQj7PBgQ4ETGAAag4Ee5/YU+QYJOw6hefLvrVslnHGaWZt9+yWN3tn8dPGiCg6kjKOqkzc54BC931kjrbERGgacu0u826UBjs/hABpIVXMQh4KGOqeARhmnu8Hm4MXAvpvDw6ABDAPO9Fow4HKx4/icZZqa5hCZ0UOmeXnjopgLGs1abnOG57E4DTXHyfv0QMOE87QfFo0FB2n+nhBlKjiYQ6Y5DosGYZ81HDUuyvP7m7WAzwY0TDjTcP/tZsLB1kxMAA7RwebgiYCChnrRNq5eBRgNZy25BMUpyTR4Q8APrCRNBgoctOmEg4DbzY5DWjNUtsFZk5ykD5HmA6ABHC1nTVjhowSn0aM0x5uBxkSDgzrTm4GAmx2HcwLNEOBgc2TPnMOiOd508yqJprOWg+Jgc1RnjTfbBJMYBpy7C1AbJhykQRxsDoaChnbRblbhXNBi1gQTV8LhG5k13getEcMwa1MWM+9mxnECTQhtZM3B4hwCzYmNX28eAE5udSaKzVGetSgMGv6/b2hxpjeBhhWHIzQhxKnTHMA5BJpjH9/8tQan4RsCJZ2R0nGgkdMaDBrQMONML4ENIw6hGQyVcBSeOXgiUKRhf2vzKwRw0EbttAZpoDl5IVLBkdtI//mRQdOhjRwH0gjOdFvUzYhj5Z7cAxqSKpu9bggOnub1jV9+QRwtj9Km5IgDcFRPa1EH0FTC8syZ8kWD1DhIM1iFU/+0Br8Uadhz6otf9okDaRTHxmFz6uFEyaBh6GdtysvxQSYcq/XJveFBxFE5rbUcMM17QENwUAdxKqE9SgOOYUD5meNyR3tNhAZDPWvTay4+CKHGITT4A3QaeeaMKtOw1wZycLOWb1Y8rfHRhTzSsM3a9EM32lDglGnABiK1kTUHZUYPkObkhihzcLMmJDcDoLP3m9BA1LqZFEw6DMusTT8Mgg01jtv6ZD4s+7Fg6qe1g6J56+MvLl1CHFFH2xsCUz6nX+BBJ1A7ayDDL6zk8kDDjIM21Dgu631Co4gDkeFoToO1uURs2GdNKUJyp5mfmameNT4aDbTtJAUdhnXWxOcNBQ7S1PxYMLkNNgeCpzWk0bI2QCPH0fricySZ3FnyRWdmohCeB5aZqCuytCMk4a/TDifWxUUDlDhu6/05f5ikweagDrZG07z8xe/EpnbWtL/4HBGS+dX7S70+zh10Wc29C5sr+aQwgnOmxawZY75ogA6HtMbvV8BROa2NIo1mtfn9t0sUzaH8mDon5E2GlZ0VmwmocMy0aw7cCwRocCo0aKN0kpaf1pBGu5z8j717i42iCuMAvmu9gEUliAgCYuOFKOIFFFEeVEQF7wQvqC+u8fbQ2tCChLoQWi4Nd9gtZUNSSguhwK4BTCi4abdt9oFsmq5tI7tp+mDDA21NA00JBBIwfrPd9ut2Zs45c3pWZqbnM9EXn/jl+8/Z7xvOZO3ZAzjpjjXk+Rvqzz/hX/g/i+ycWAfYcOAESttb9gMNoXOIE4I00IxffG7PIA7GmpjBJ73E48TgtjYOHB/SHDXyzEGaZ4BGdNts2wY253Q75yeeWBNvw4zTkOMJGcbxJmig0IYaa9g5SCP6abMtgSPwmSO4jOJ0xRv9RnH8CRrEIXxhVz0hwEAT3TZbt0EJjbVvbm+sxTqDQYM4fp9CgziGT2sXnhkvnMb54tatAziYawYHn9g6Ap85/IPPhkhFox9x6IPPqgDQ4OU3HM+cCxBowmtG1lbEocfaL5aItS58R56pc/wKDdqocMiDT6QRXI9nbQIbu8VaDBqHHccfaO8r2484Rw11DhQGmsiamrVpEwmHfZ9jqljr+jcY8rPGmtI1RWVKccZaM3aNyHo/YWO/WOuCF0gYOwdo+gbvvsFij7UL6aGZvHiTUsZi7QcLxNqvXRVsOIlAK0rScMVaMwaa0Loza/t2Ag518GmOWNPCieV4Gv0MOMEETZFKB4oJp7pnHnaNyHK+u2k74AzY2CrWulYXUHGQhqVztBvn9TR9d+ix7TvARq9zfjRrrDHirPBSYy3ku9ZXWwRFaBzi4LMaaQTXW1k7EIfyzLFerHXlnCbj+ELezgSNSocVpyZtNGMX71BsNGLtnFlna0YGnzm7YvFQSBen1B+qgI8dYqljjTL4RBrxdeetHUohjqJjjcEnW+d819Ve2ggLai0cfyjQUd+HMmoc+uBTPA2eBHbs2wc26lizzT6noSsn7ged4TgB+Gnq7o5Ea2uLiDpHSac1pBFfU4EGbNSxZqN9Ts6urn87vCGINsQBmGCBqzMSwYuJSI+c/XqxNgdphNdzWWsAx7Kxxjr43NWV057tCYYGK+itaC8Dmf6q5Y211x1Qd89cfu/82bPn37v8+btFRtrH+9YATmqs2XHw+X1DLLa6s70j7q6ocMU72q8VRSL1q3WvkVSnmlas9cInOxdMn/1SuKnO7XK565rCL82e/rywHzdroIbh2HLwqbxDADyxSEN9fUMkEoshDAGHPCHofXvszHFhVxhcBsoddtWNG+MUM+a8NYCDsWbPwSfgKJX8r8bFREZj7eTF/V+8Ew67VBUOj1sgItI+XLMXaEZJrBm6HZc2vjlz4veOkiY3kgxtnqbpI7fJXLx3717eWLPYhIADhzQhOHoifjrb5QYcLZ2mcXeP+JR2td8GasDG/rGmi0OxgUKcthPx3dluKJd2hR99fqQ/PK/+sXdY51hy8Pm/x1rb0Xhedjbg6OrU1T04ski7unKlFo5d9zmiYi1JQ8EJzxyJzcO3VgIOxhppQmDXWFvBcVpra4vnVSRsSLHmfmAkz5x3oW+Gdc4Oq8bad6I6h44DNJUlFYijpxO+38kfaR/uBRp1rNl5nyMg1lrbXJUlYEPvnPP38r9pe3UjyKhizdb7HO5YQ5r98crdJVBUHEi1ydwn6FsbEadfx9KDz5/TGmvYNbn9H8ivoMda02zuOefKjVo4dt/njCTWoGtc3rzdKhzdRw7nr5yMxTvBxlisnVN1Du/FRCKL/2IitGHrnNYylwe+uQY2bLHWNJ/PZsJKsEntnFE2+DQca61Fbm8eFDNOHZyj+QY2OxEHCmzk4FM71pCm4HDys8UqHG2d81zTAeenYKPqnNG0zzGEk6SpPJzE2c2GU8d1Gpi8duNONc4aGWt6R+lobXZBZSUBR9PmUSfPyvPWoUM7d8pYY+2c1la3LxdsjHVOXZxnz/ba1UODONg5cp+jjVNW2+oqzYVixMG6h8NmVrFiQ4k1sLHti+zGJgR9HT5PLh1HbTOdx2ZncbEaxx77HOFH6bKWa74qsDHeOU1jeAadYFM8PNbkPkcTpyxaVunzeNQ4p6njm/OLjNvMWAs0KbFmj8FnWmKttiXu93oRx0CsnV/OMYS+WazCoU4ILBRrQjunpbOqwMuKk6pTx3EWePXm2kTnYKzJwacuTl/cX+VNxTlMirURngW+LAYbaqzZ/0V2lliL7vf4qgCHI9bcrjEcC4Ita9U49trnCDuttVwKwp0qup2zm3AgqHtprPEFwYdAM6gjJwREnGgJ2KhwQIc++Ky7n2NBULyFG8d+FxORcaJlXn8B4kCxHwjC8zkWBGu3bFHZyH2OJg58HixQoBTHM+f8Aj6bLTLWmHDg7k/lXhWeWAu/5+SwublFjSP3OZo4kXioFIon1sLTeRZrN4CGFmvyRfb+r1G6Qj6w4Yg19wMZHBd0frZ2M9BwxZo9LybSx1kdzQ75+HC4Xh6cXL55cyqOHHzq4UQVG8CBMoiTXHo6M2c+BTU1g9HmxmbESdrIfY4KBzPNx9M5D42BP+lFcxb+3n9PxJJ5kx68i24z7SbQqDsnFUe+yA46/TaBAAfO4emOGXPO9Jw8VXMKZOBOolM9PfMWjaUupG+Wp+Lc9sGniWMtFm8MqHCog8+S0/EvFv7Wm3KvNPicXTKJ0jtTboDNsFiz5z5HwOAzdkn5XovBWDtdcunoxZMa961VNy+cSd4Q3ChPxbH94HMEnQPf2A0CjqFYy8vubNO8kR3q7AekXahz1rry8nKzxZpZ9zk5K6pCfr+hWDtccbKVcI1k8xz9ccFds9YBzrDOkfscPZyIG2yMxFplRWcr8UMTgEPoG8AZbbHGjRNrDwXpOLjPqdzd2Ur+0ATg6I4FZt1QcDDW5OCThFMfLVAah/WZk1sCNLTbcZvf0Pt589nldQZxRvXgMwa3gCMOZfCZm+gaGk71t1MJNpRYky+yI06kqBQah+2Z48nrbKV+aALq7Dxtm4lvKjYy1hhwsHGCTLEGNC1s3zJoXqRjU76BgiNfZB+KUx/NRRxSrHkTNEw41Us0z2oT3ly3AXBSYk3uc0g4sU7lU7G0WKusqgQa1u/nnJ2ha8PQObZ8kZ2vc+CjICFqrFXlJmmYOqdnoa5NKo7c55BxcmDiGSTFGuAUAI2BG9lreibr2hiNtdF9MVF9xNVIjrVSD9Aw38gO1fyIpg3ApHaO3OdQcWJxQqx5vAHoGmMfmqiZ49Q6p21YNQTHjINPE8Zafazd3wg2mjil/uzuFqYb2RGnZt5d2jbDcOQ+h+WZ03061KgRayDj6aiNst3IjjZnl2Xq2CDOaBx88p3WIrF2TyMkW2Aojs8fLIh399WWGf3QRM3JRzRsPlJszB5rJtznrKiP1bfn+RsbgwPBFgiGArkgE9W+Nor4zDl1cpHGPE2xMdo58mKiRIFOd0e2xx9MlL+qJN5e1tKif98a4WuHBJvbH2sWPEpD5URikSL4toFS17pX9PWtqCXfv6qDAzaPaNi8+RXAII4cfBrCgaqPJKs+Sru6WD/WapY8qLbJ+PRy/lAcEww+LbXPGdGN7IhTszBDbeOcuwpsUnDkPiftN7KrP0Wp9fvGOSs/P3+VjLXb8qEJ7Jzq+xyaNlBmizXrTAgoOKxf2G2eqmUzF220Yk2+yC7g6mJq5/y2bLzme51fIQ5b58iLicidw3FaOzVJ+33o6yCTEmtyn5PmWFPj1CzQtHntcorNaB183oZYQ5veOTrXCyg2xFgz0eDToqc12uCzd4G2TaaSaagjB5+icehf2O3Ve7FzcmFhfr45Ys3iL7IjjLEv7J5ZlqFncyQFxxSDT4s+czhjbclU3auGluarcKDkhEB0rOmlWu9TDr1yfn69ECq/kPGZIy8mEnuU7r2P9JcKEzagUmimWLPohMBwrPVOIt5nU5iofhk5+PwfYw2KTOOYciRpo/xjxsGnjfc5F8k0jgmFgKMba/JF9jTuc6BryDXtypEBHJPFmg0nBIM6SEMq55dHAGcg1+TgM/04ycJAIxyiwWZIrMl9TpoHn0hDr2evII7qtCZfZBfdOUjDUK9dXw82ZjmtWf9FdmqsIQ21HruyfhDHPINPC7/IzhBrF+9wMNW0A0dScArNNSGw4ovslM7BrqGV81lonCE4cp+TbhzsGmrNhb4Z3jlmiDW77nOQhl5PKn2DOHKfk97TGgQae028DjKqzpH7HNGxhl3DXpmJvmF75siLiUYw+EQa5sqAw4Be58gX2QXGGtKw1xSwGcAx6+DTHrGGNMw2Bw4kbcw0IbDhi+xtSMMcah9p4kDJfY7IWMOuYS/n0gOIQ37myIuJOHCQhqNevTKAY64Jga32ORBoPPUw2PTjmHNCYPFYQxqOmrZ0vQ6O3OcIeuYADWd9otCY8rRmk31O230O3npy/fEhOHKfI3rwydM1OFIDG8SR+xxhncNPg2+sHzhO7xxrxJrp9jk5GGh8ofaCYmOK05rtLiZCGr6acOX4EByT73OsdZTGQOOs8S8cPA5F6Bw5+OSINaQZaaglcEw7IbDmPgcDjb8efuHgQYw1uc8RE2tCaByZTys2AzpynyMm1oqARkC98k8Sx6wTAgvucwTROCZAqPWfB0wxIbBDrLUKonGMXQqNQ+0ceTERO07RHQ5RNVexOWj205p1Bp/QNcJqIoRaAsc0EwKTz9bInVMkkMbhfBoah9Y58mIixs6pBRqBNSXROCY/rVlk8CmYxjHta0XGVKc1q77ILo4Gf+IcG8SR+xzOZw7SCK3H/jmWxNEffMqLieixBjTCK+NpwGF75siLifRxxNLgwPMYdo52rMmLiWixFkUakTX+5YNJHDn45OscpBFeUyDUCDimusHDnPscpBFdmS8rNqTTmryYSAMnzTR4jKZ1jjnvWzPHhCCdNI6JTxxLlAUmBCYcfKaVxuH85K+EjekmBFaItXTR4DT6v/bOoLWJKIjjs6wKYRHKGojRBZMYpSEhWEIIhuAlhxZKbQUVRNCbeBRE6EWoWBXRjyClICnYq8dc9CRePO2n2IuHNNBAC07WrjGmJumyu5l5O79D6P3HzJvM//WldZLKkYvsg8pBNSFTcv7IIZ/nkLrI/uUUhA0WTuvIjeQ50xGRGmTNbo1WDpMbn7NbfH4JvaF5hdNiM60RyXPCrxpvVEM5NKc1qnkOqomGZL7lyZE8ZyqwoUVF7Y8cyXNIVQ2SqLY8OQTzHHKLz6+oJjqu256cKfOcOF9kx6qJEr3a8uRInkNLDUA678lhnudM2hAwa2h95gr2kRzJc2hVDWLlWyesHPQSv4eJUM0MqLmFw2lD4DfPYacGu5prhuGG4KRtjZ0agJTX1STPoaYGtJLX1STPIaYGwPAKR/Icamq8LzmjlcPoBY9p5XBTA4BdbUxbo/PGZxB5DjM1YM23W8SntcAeJmKmBruaPSRnYIdRnjPtKM1MDc5qrhxZfNJTA2DMt1EOww2BrzyHlZr+N9DfciTPIacGoGK3pa3RVAN66bccyXPIqXGPHFcOxTwn+IvsrNQA1G1Xjo88R72HiYipcY8cptOar8UnJzWgF1AO+Q1BYLs1TmoAjGrbb+Wo9DARRTUAmXlXjup5zp/FJyM1/bigjbDNc056kZ2TGnceQGKc5/wgqwa02kDOuIvsqv7CLt2qQfRa2/eZw/9hIsJV0ydRaiPxzHOIq+mnoKgmlotP8moAkiiH64bAV57D4azxMFEO3cVn8G2NTdW4chRpa9NuCBipAUj15TDNc3wtPnk0tDFytqm0teDzHDZV48pBM2TynJAvsn/mpQblcJ3WfFxkZ6bmt5x45Dns1ExROUw2BJPk4Gsb/EA5MchznjSBIyhH+Tzne/M0sMS0Vc9zck0NmGJV20rnOTmOZ42HscYiz/G5+Mzxm9D+JlGzZ57nhHSRfX3hEvBGu5JXYvE5Iie3cBHYU6/y3BCMv8i+fuM8KECmao/KobIh8NnWHjV1UALLvY7L47+ppxulmU8Bf2PUbJYbguPznPVHuQugDlra5rwhGJKznruhwBTwN2bB9lM59PKcx3uXE6AYRinPcVr7t3Ier18F9dCv5G32ec7eZcX62aCvHclh+yL7XvMMKIpes21fZw6Rh4nYb2nGoaUKNvVp7T8PE6GapnJDwDBGZbRyXKjnOWoXzRFYOn6mtRkvPveaSuzPJmHgwMZsQ7B3Q6VNwKTS4ZTnfMgtKzuejaKn5202eY6y32n+h4XjNIsNQWMhNu1sgFnK2/TynHfDchoLZxUfnI9Hr1fzn3xUTnQPEzUay7E049pJVx2601qjEbeDZhgD7XwiuSH41rh8DmJO344d0rTmf0PwLbsYgzXAZBLpap7WtJbNXs6wvUwbeO0UHIdKnvMKzVwUMwP0esHZJpHnZJfiPQEch2auOc7Mf2E3u1CO7dQ8Di1Z23acGf7CbnZp8cIcCMdjpQvXnN3JeU4Ybe390rI0swmtrfLg2m7ki8/s+0VpZlNgpGo4tkX1gge6Oeyuls/LZDb1UF26tu1E0da63e5S8ZIiF8+jwkpX7ne2tsL9hd3u4cqyKce/r+ZWubXb2QhpWusebi4Wk1IxvjEy6dLNrQ4WUIAbgo+b3c3u6u0LspcJoHzSdzc6G52dnQDynM3Nj4eHK8VyUrwExFzCrKztbnX20Y3PPAfNPD84eP56sVg3ZFoOGiOTeli6vbOxs7//4oS7tTcHb96+WV0tXsgYIISFZqXK6dLdmy/2nz7dwY8xZ87rt73eW/w4WFm5d6VcTso8FglzifNmvVKsoCMsnWc/h+j1egc99PPyzp3bxeJy3UqcFy3RoxtGBqlfR6544N/1DHLR0OXAnykaYljJZNI0zVQqhZ/4tzWnaeJFEARBEARBEARBEARBEARBEARBEASBMr8ADJvUZ0bGgJQAAAAASUVORK5CYII=",EJ={},iPe=Ci,aPe=cJ,sPe=cc,cPe=t0,fPe=xm,uPe=gJ;EJ.f=iPe&&!aPe?Object.defineProperties:function(e,r){cPe(e);for(var n=fPe(r),o=uPe(r),i=o.length,a=0,s;i>a;)sPe.f(e,s=o[a++],n[s]);return e};dPe=cT,lPe=dPe("document","documentElement"),pPe=t0,hPe=EJ,IZ=bT,mPe=mT,yPe=lPe,bPe=dT,gPe=hT,TZ=">",BZ="<",XI="prototype",QI="script",AJ=gPe("IE_PROTO"),jI=function(){},_J=function(t){return BZ+QI+TZ+t+BZ+"/"+QI+TZ},OZ=function(t){t.write(_J("")),t.close();var e=t.parentWindow.Object;return t=null,e},vPe=function(){var t=bPe("iframe"),e="java"+QI+":",r;return t.style.display="none",yPe.appendChild(t),t.src=String(e),r=t.contentWindow.document,r.open(),r.write(_J("document.F=Object")),r.close(),r.F},rw=function(){try{Zx=new ActiveXObject("htmlfile")}catch{}rw=typeof document<"u"?document.domain&&Zx?OZ(Zx):vPe():OZ(Zx);for(var t=IZ.length;t--;)delete rw[XI][IZ[t]];return rw()};mPe[AJ]=!0;SJ=Object.create||function(e,r){var n;return e!==null?(jI[XI]=pPe(e),n=new jI,jI[XI]=null,n[AJ]=e):n=rw(),r===void 0?n:hPe.f(n,r)},xPe=sc,wPe=SJ,EPe=cc.f,eT=xPe("unscopables"),tT=Array.prototype;tT[eT]===void 0&&EPe(tT,eT,{configurable:!0,value:wPe(null)});APe=function(t){tT[eT][t]=!0},xT={},_Pe=Yn,SPe=!_Pe(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),IPe=Ni,TPe=dn,BPe=uT,OPe=hT,PPe=SPe,PZ=OPe("IE_PROTO"),rT=Object,RPe=rT.prototype,IJ=PPe?rT.getPrototypeOf:function(t){var e=BPe(t);if(IPe(e,PZ))return e[PZ];var r=e.constructor;return TPe(r)&&e instanceof r?r.prototype:e instanceof rT?RPe:null},CPe=Yn,NPe=dn,MPe=ac,RZ=IJ,kPe=cw,$Pe=sc,nT=$Pe("iterator"),TJ=!1;[].keys&&(DI=[].keys(),"next"in DI?(UI=RZ(RZ(DI)),UI!==Object.prototype&&(Ff=UI)):TJ=!0);FPe=!MPe(Ff)||CPe(function(){var t={};return Ff[nT].call(t)!==t});FPe&&(Ff={});NPe(Ff[nT])||kPe(Ff,nT,function(){return this});BJ={IteratorPrototype:Ff,BUGGY_SAFARI_ITERATORS:TJ},LPe=cc.f,jPe=Ni,UPe=sc,CZ=UPe("toStringTag"),wT=function(t,e,r){t&&!r&&(t=t.prototype),t&&!jPe(t,CZ)&&LPe(t,CZ,{configurable:!0,value:e})},DPe=BJ.IteratorPrototype,zPe=SJ,KPe=aT,qPe=wT,HPe=xT,GPe=function(){return this},WPe=function(t,e,r,n){var o=e+" Iterator";return t.prototype=zPe(DPe,{next:KPe(+!n,r)}),qPe(t,o,!1),HPe[o]=GPe,t},VPe=Fo,YPe=nJ,ZPe=function(t,e,r){try{return VPe(YPe(Object.getOwnPropertyDescriptor(t,e)[r]))}catch{}},JPe=ac,XPe=function(t){return JPe(t)||t===null},QPe=XPe,eRe=String,tRe=TypeError,rRe=function(t){if(QPe(t))return t;throw new tRe("Can't set "+eRe(t)+" as a prototype")},nRe=ZPe,oRe=ac,iRe=sT,aRe=rRe,sRe=Object.setPrototypeOf||("__proto__"in{}?(function(){var t=!1,e={},r;try{r=nRe(Object.prototype,"__proto__","set"),r(e,[]),t=e instanceof Array}catch{}return function(o,i){return iRe(o),aRe(i),oRe(o)&&(t?r(o,i):o.__proto__=i),o}})():void 0),cRe=bJ,fRe=e0,OJ=pT,uRe=dn,dRe=WPe,NZ=IJ,MZ=sRe,lRe=wT,pRe=sw,zI=cw,hRe=sc,mRe=xT,PJ=BJ,yRe=OJ.PROPER,bRe=OJ.CONFIGURABLE,kZ=PJ.IteratorPrototype,Jx=PJ.BUGGY_SAFARI_ITERATORS,ym=hRe("iterator"),$Z="keys",bm="values",FZ="entries",gRe=function(){return this},vRe=function(t,e,r,n,o,i,a){dRe(r,e,n);var s=function(P){if(P===o&&h)return h;if(!Jx&&P&&P in f)return f[P];switch(P){case $Z:return function(){return new r(this,P)};case bm:return function(){return new r(this,P)};case FZ:return function(){return new r(this,P)}}return function(){return new r(this)}},c=e+" Iterator",u=!1,f=t.prototype,l=f[ym]||f["@@iterator"]||o&&f[o],h=!Jx&&l||s(o),m=e==="Array"&&f.entries||l,x,S,O;if(m&&(x=NZ(m.call(new t)),x!==Object.prototype&&x.next&&(NZ(x)!==kZ&&(MZ?MZ(x,kZ):uRe(x[ym])||zI(x,ym,gRe)),lRe(x,c,!0))),yRe&&o===bm&&l&&l.name!==bm&&(bRe?pRe(f,"name",bm):(u=!0,h=function(){return fRe(l,this)})),o)if(S={values:s(bm),keys:i?h:s($Z),entries:s(FZ)},a)for(O in S)(Jx||u||!(O in f))&&zI(f,O,S[O]);else cRe({target:e,proto:!0,forced:Jx||u},S);return f[ym]!==h&&zI(f,ym,h,{name:o}),mRe[e]=h,S},xRe=function(t,e){return{value:t,done:e}},wRe=xm,ET=APe,LZ=xT,RJ=lJ,ERe=cc.f,ARe=vRe,Xx=xRe,_Re=Ci,CJ="Array Iterator",SRe=RJ.set,IRe=RJ.getterFor(CJ),TRe=ARe(Array,"Array",function(t,e){SRe(this,{type:CJ,target:wRe(t),index:0,kind:e})},function(){var t=IRe(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,Xx(void 0,!0);switch(t.kind){case"keys":return Xx(r,!1);case"values":return Xx(e[r],!1)}return Xx([r,e[r]],!1)},"values"),jZ=LZ.Arguments=LZ.Array;ET("keys");ET("values");ET("entries");if(_Re&&jZ.name!=="values")try{ERe(jZ,"name",{value:"values"})}catch{}BRe={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},ORe=dT,KI=ORe("span").classList,UZ=KI&&KI.constructor&&KI.constructor.prototype,PRe=UZ===Object.prototype?void 0:UZ,DZ=Vn,NJ=BRe,RRe=PRe,gm=TRe,zZ=sw,CRe=wT,NRe=sc,qI=NRe("iterator"),HI=gm.values,MJ=function(t,e){if(t){if(t[qI]!==HI)try{zZ(t,qI,HI)}catch{t[qI]=HI}if(CRe(t,e,!0),NJ[e]){for(var r in gm)if(t[r]!==gm[r])try{zZ(t,r,gm[r])}catch{t[r]=gm[r]}}}};for(Qx in NJ)MJ(DZ[Qx]&&DZ[Qx].prototype,Qx);MJ(RRe,"DOMTokenList");MRe=t=>t!=null&&t.length>0,kRe=t=>!MRe(t),$Re=(t,e)=>sr(void 0,void 0,void 0,function*(){let r=new Zh(window.localStorage,"_meteor_wallet");return{wallet:new VY(Object.assign(Object.assign({},e),{keyStore:r})),keyStore:r}}),FRe=({options:t,logger:e,store:r,params:n,metadata:o})=>sr(void 0,void 0,void 0,function*(){let i=yield $Re(n,t.network),a=()=>sr(void 0,void 0,void 0,function*(){let s=i.wallet.getAccountId(),c=yield i.wallet.account();if(kRe(s)||c==null)return[];let u=yield c.getSigner().getPublicKey();return[{accountId:s,publicKey:u?u.toString():""}]});return{signIn({contractId:s,methodNames:c=[]}){return sr(this,void 0,void 0,function*(){e.log("MeteorWallet:signIn",{contractId:s,methodNames:c}),c.length?yield i.wallet.requestSignIn({methods:c,type:wI.SELECTED_METHODS,contract_id:s??""}):yield i.wallet.requestSignIn({type:wI.ALL_METHODS,contract_id:s??""});let u=yield a();return e.log("MeteorWallet:signIn",{contractId:s,methodNames:c,account:u[0]}),u})},signOut(){return sr(this,void 0,void 0,function*(){let s=i.wallet.getAccountId();i.wallet.isSignedIn()&&(yield i.wallet.signOut()),s&&(yield i.keyStore.removeKey(t.network.networkId,s))})},isSignedIn(){return sr(this,void 0,void 0,function*(){return i.wallet?i.wallet.isSignedIn():!1})},getAccounts(){return sr(this,void 0,void 0,function*(){return a()})},verifyOwner({message:s}){return sr(this,void 0,void 0,function*(){e.log("MeteorWallet:verifyOwner",{message:s});let c=yield i.wallet.verifyOwner({message:s});if(c.success)return c.payload;throw new Error(`Couldn't verify owner: ${c.message}`)})},signMessage({message:s,nonce:c,recipient:u,state:f}){return sr(this,void 0,void 0,function*(){e.log("MeteorWallet:signMessage",{message:s,nonce:c,recipient:u,state:f});let l=i.wallet.getAccountId(),h=yield i.wallet.signMessage({message:s,nonce:c,recipient:u,accountId:l,state:f});if(h.success)return h.payload;throw new Error(`Couldn't sign message owner: ${h.message}`)})},signAndSendTransaction({signerId:s,receiverId:c,actions:u}){return sr(this,void 0,void 0,function*(){e.log("MeteorWallet:signAndSendTransaction",{signerId:s,receiverId:c,actions:u});let{contract:f}=r.getState();if(!i.wallet.isSignedIn())throw new Error("Wallet not signed in");if(!c&&!f)throw new Error("No receiver found to send the transaction to");return(yield i.wallet.account()).signAndSendTransaction_direct({receiverId:c??f.contractId,actions:u.map(h=>vf(h))})})},signAndSendTransactions({transactions:s}){return sr(this,void 0,void 0,function*(){if(e.log("MeteorWallet:signAndSendTransactions",{transactions:s}),!i.wallet.isSignedIn())throw new Error("Wallet not signed in");return i.wallet.requestSignTransactions({transactions:s.map(c=>Object.assign(Object.assign({},c),{actions:c.actions.map(u=>vf(u))}))})})},createSignedTransaction(s,c){return sr(this,void 0,void 0,function*(){throw e.log("createSignedTransaction",{receiverId:s,actions:c}),new Error(`Method not supported by ${o.name}`)})},signTransaction(s){return sr(this,void 0,void 0,function*(){throw e.log("signTransaction",{transaction:s}),new Error(`Method not supported by ${o.name}`)})},getPublicKey(){return sr(this,void 0,void 0,function*(){throw e.log("getPublicKey",{}),new Error(`Method not supported by ${o.name}`)})},signNep413Message(s,c,u,f,l){return sr(this,void 0,void 0,function*(){throw e.log("signNep413Message",{message:s,accountId:c,recipient:u,nonce:f,callbackUrl:l}),new Error(`Method not supported by ${o.name}`)})},signDelegateAction(s){return sr(this,void 0,void 0,function*(){throw e.log("signDelegateAction",{delegateAction:s}),new Error(`Method not supported by ${o.name}`)})},buildImportAccountsUrl(){return`https://wallet.meteorwallet.app/batch-import?network=${i.wallet._networkId}`}}})});var uw=Jt(Kw(),1);async function e7(t){return await t.signOut?.(),t.signIn({})}de();de();var jb=class extends K{constructor(e){super(`Call bundle failed with status: ${e.statusCode}`,{name:"BundleFailedError"}),Object.defineProperty(this,"result",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.result=e}};cr();kb();L5();Bb();Ub();ro();ja();uy();xr();G0();Pt();de();Ky();vc();Nn();xr();we();k0();K0();var z5="0x5792579257925792579257925792579257925792579257925792579257925792",K5=Z(0,{size:32});async function Db(t,e){let{account:r=t.account,chain:n=t.chain,experimental_fallback:o,experimental_fallbackDelay:i=32,forceAtomic:a=!1,id:s,version:c="2.0.0"}=e,u=r?ce(r):null,f=e.capabilities;t.dataSuffix&&!e.capabilities?.dataSuffix&&(typeof t.dataSuffix=="string"?f={...e.capabilities,dataSuffix:{value:t.dataSuffix,optional:!0}}:f={...e.capabilities,dataSuffix:{value:t.dataSuffix.value,...t.dataSuffix.required?{}:{optional:!0}}});let l=e.calls.map(h=>{let m=h,x=m.abi?hn({abi:m.abi,functionName:m.functionName,args:m.args}):m.data;return{data:m.dataSuffix&&x?to([x,m.dataSuffix]):x,to:m.to,value:m.value?Z(m.value):void 0}});try{let h=await t.request({method:"wallet_sendCalls",params:[{atomicRequired:a,calls:l,capabilities:f,chainId:Z(n.id),from:u?.address,id:s,version:c}]},{retryCount:0});return typeof h=="string"?{id:h}:h}catch(h){let m=h;if(o&&(m.name==="MethodNotFoundRpcError"||m.name==="MethodNotSupportedRpcError"||m.name==="UnknownRpcError"||m.details.toLowerCase()==="this request method is not supported"||m.details.toLowerCase().includes("does not exist / is not available")||m.details.toLowerCase().includes("missing or invalid. request()")||m.details.toLowerCase().includes("did not match any variant of untagged enum")||m.details.toLowerCase().includes("account upgraded to unsupported contract")||m.details.toLowerCase().includes("eip-7702 not supported")||m.details.toLowerCase().includes("unsupported wc_ method")||m.details.toLowerCase().includes("feature toggled misconfigured")||m.details.toLowerCase().includes("jsonrpcengine: response has no error or result for request"))){if(f&&Object.values(f).some(P=>!P.optional)){let P="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new Ka(new K(P,{details:P}))}if(a&&l.length>1){let O="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new qa(new K(O,{details:O}))}let x=[];for(let O of l){try{let P=await ts(t,{account:u,chain:n,data:O.data,to:O.to,value:O.value?Xe(O.value):void 0});x.push({status:"fulfilled",value:P})}catch(P){x.push({reason:P,status:"rejected"})}i>0&&await new Promise(P=>setTimeout(P,i))}if(x.every(O=>O.status==="rejected"))throw x[0].reason;let S=x.map(O=>O.status==="fulfilled"?O.value:K5);return{id:to([...S,Z(n.id,{size:32}),z5])}}throw Ja(h,{...e,account:u,chain:e.chain})}}async function zb(t,e){async function r(f){if(f.endsWith(z5.slice(2))){let h=Do(by(f,-64,-32)),m=by(f,0,-64).slice(2).match(/.{1,64}/g),x=await Promise.all(m.map(O=>K5.slice(2)!==O?t.request({method:"eth_getTransactionReceipt",params:[`0x${O}`]},{dedupe:!0}):void 0)),S=x.some(O=>O===null)?100:x.every(O=>O?.status==="0x1")?200:x.every(O=>O?.status==="0x0")?500:600;return{atomic:!1,chainId:Ot(h),receipts:x.filter(Boolean),status:S,version:"2.0.0"}}return t.request({method:"wallet_getCallsStatus",params:[f]})}let{atomic:n=!1,chainId:o,receipts:i,version:a="2.0.0",...s}=await r(e.id),[c,u]=(()=>{let f=s.status;return f>=100&&f<200?["pending",f]:f>=200&&f<300?["success",f]:f>=300&&f<700?["failure",f]:f==="CONFIRMED"?["success",200]:f==="PENDING"?["pending",100]:[void 0,f]})();return{...s,atomic:n,chainId:o?Ot(o):void 0,receipts:i?.map(f=>({...f,blockNumber:Xe(f.blockNumber),gasUsed:Xe(f.gasUsed),status:D5[f.status]}))??[],statusCode:u,status:c,version:a}}var tR=new WeakMap,Wee=0;function rR(t){let e=tR.get(t);return e===void 0&&(e=++Wee,tR.set(t,e)),e}async function Kb(t,e){let{id:r,pollingInterval:n=t.pollingInterval,status:o=({statusCode:S})=>S===200||S>=300,retryCount:i=4,retryDelay:a=({count:S})=>~~(1<<S)*200,timeout:s=6e4,throwOnFailure:c=!1}=e,u=Qe(["waitForCallsStatus",t.uid,r,{pollingInterval:n,retryCount:i,retryDelay:typeof e.retryDelay=="function"?["function",rR(e.retryDelay)]:e.retryDelay,status:e.status?rR(e.status):void 0,throwOnFailure:c}]),{promise:f,resolve:l,reject:h}=ad(),m,x=Mc(u,{resolve:l,reject:h},S=>{let O=$b(async()=>{let P=F=>{clearTimeout(m),O(),F(),x()};try{let F=await kc(async()=>{let B=await oe(t,zb,"getCallsStatus")({id:r});if(c&&B.status==="failure")throw new jb(B);return B},{retryCount:i,delay:a});if(!o(F))return;P(()=>S.resolve(F))}catch(F){P(()=>S.reject(F))}},{interval:n,emitOnBegin:!0});return O});return m=s?setTimeout(()=>{x(),clearTimeout(m),h(new q5({id:r}))},s):void 0,await f.finally(()=>x())}var q5=class extends K{constructor({id:e}){super(`Timed out while waiting for call bundle with id "${e}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}};Pt();var qb=256,Hb;function Gb(t=11){if(!Hb||qb+t>256*2){Hb="",qb=0;for(let e=0;e<256;e++)Hb+=(256+Math.random()*256|0).toString(16).substring(1)}return Hb.substring(qb,qb+++t)}function iR(t){let{batch:e,chain:r,ccipRead:n,dataSuffix:o,key:i="base",name:a="Base Client",tokens:s,type:c="base"}=t,u=t.experimental_blockTag??(typeof r?.experimental_preconfirmationTime=="number"?"pending":void 0),f=r?.blockTime??12e3,l=Math.min(Math.max(Math.floor(f/2),500),4e3),h=t.pollingInterval??l,m=t.cacheTime??h,x=t.account?ce(t.account):void 0,{config:S,request:O,value:P}=t.transport({account:x,chain:r,pollingInterval:h}),F={...S,...P},B={account:x,batch:e,cacheTime:m,ccipRead:n,chain:r,dataSuffix:o,key:i,name:a,pollingInterval:h,request:O,tokens:s,transport:F,type:c,uid:Gb(),...u?{experimental_blockTag:u}:{}};return aR(B)}var nR=new WeakSet,Vee=0;function aR(t){function e(n,o){return i=>{let a=i(n);for(let f in t)f!=="scope"&&delete a[f];let s={...n,...a};for(let f in a){let l=n[f],h=a[f];oR(l)&&oR(h)&&(s[f]={...l,...h})}let c=[...o,i],{scope:u}=s;return Object.assign(s,{extend:e(s,c),scope:typeof u=="function"&&nR.has(u)?r(c):u})}}function r(n){let o=new WeakMap,i=(a={})=>{let s=a.signal&&o.get(a.signal);if(s)return s;let c=`scope.${Vee++}`,u=new AbortController,{signal:f}=a;f?.aborted?u.abort(f.reason):f?.addEventListener("abort",()=>u.abort(f.reason),{once:!0});let l=(m,x)=>t.request(m,{...x,signal:x?.signal??u.signal,uid:x?.uid??c}),h=n.reduce((m,x)=>m.extend(x),aR({...t,request:l,uid:c}));return f&&o.set(f,h),h};return nR.add(i),i}return Object.assign(t,{extend:e(t,[]),scope:r([])})}function oR(t){if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}function W0(t,e){let r=(n={})=>e(t,n);for(let n of["call","calls","callWithPeriod","estimateGas","prepare","prepareRecipient","predict","simulate"])if(Object.hasOwn(e,n)){let o=e[n];r[n]=(i={})=>o.length===1?o(i):o(t,i)}for(let n of["extractEvent","extractEvents"])Object.hasOwn(e,n)&&(r[n]=e[n]);return r}L0();x5();b5();k5();q0();Y0();async function Qi(t,e){return Qi.inner(so,t,e)}(function(t){async function e(a,s,c){return await a(s,{...c,...t.call(s,c)})}t.inner=e;function r(a,s){return n1(mte(a,s))}t.call=r;async function n(a,s){return vb(a,{...fd(s),...t.call(a,s)})}t.estimateGas=n;async function o(a,s){return Nb(a,{...fd(s),...t.call(a,s)})}t.simulate=o;function i(a){let[s]=wb({abi:Rc,logs:a,eventName:"Approval",strict:!0});if(!s)throw new Error("`Approval` event not found.");return s}t.extractEvent=i})(Qi||(Qi={}));function mte(t,e){let{amount:r,spender:n,token:o}=e,{address:i,decimals:a}=rs(t,{token:o});return{abi:Rc,address:i,args:[n,t1(r,a)],functionName:"approve"}}Z5();a1();Y0();async function t8(t,e){let{amount:r,token:n,throwOnReceiptRevert:o=!0}=e,{decimals:i}=rs(t,{token:n}),a=r1(r,i),s=await Qi.inner(ud,t,{...e,throwOnReceiptRevert:o}),{args:c}=Qi.extractEvent(s.logs);return{...c,...a===void 0?{}:{decimals:a,formatted:Qb(c.value,a)},receipt:s}}L0();x5();b5();k5();q0();Y0();async function ea(t,e){return ea.inner(so,t,e)}(function(t){async function e(a,s,c){return await a(s,{...c,...t.call(s,c)})}t.inner=e;function r(a,s){return n1(yte(a,s))}t.call=r;async function n(a,s){return vb(a,{...fd(s),...t.call(a,s)})}t.estimateGas=n;async function o(a,s){return Nb(a,{...fd(s),...t.call(a,s)})}t.simulate=o;function i(a){let[s]=wb({abi:Rc,logs:a,eventName:"Transfer",strict:!0});if(!s)throw new Error("`Transfer` event not found.");return s}t.extractEvent=i})(ea||(ea={}));function yte(t,e){let{amount:r,from:n,to:o,token:i}=e,{address:a,decimals:s}=rs(t,{token:i}),c=t1(r,s);return n?{abi:Rc,address:a,args:[n,o,c],functionName:"transferFrom"}:{abi:Rc,address:a,args:[o,c],functionName:"transfer"}}Z5();a1();Y0();async function r8(t,e){let{amount:r,token:n,throwOnReceiptRevert:o=!0}=e,{decimals:i}=rs(t,{token:n}),a=r1(r,i),s=await ea.inner(ud,t,{...e,throwOnReceiptRevert:o}),{args:c}=ea.extractEvent(s.logs);return{...c,...a===void 0?{}:{decimals:a,formatted:Qb(c.value,a)},receipt:s}}h5();Xa();we();async function DR(t,{chain:e}){let{id:r,name:n,nativeCurrency:o,rpcUrls:i,blockExplorers:a}=e;await t.request({method:"wallet_addEthereumChain",params:[{chainId:Z(r),chainName:n,nativeCurrency:o,rpcUrls:i.default.http,blockExplorerUrls:a?Object.values(a).map(({url:s})=>s):void 0}]},{dedupe:!0,retryCount:0})}T5();K0();function zR(t,e){let{abi:r,args:n,bytecode:o,...i}=e,a=D0({abi:r,args:n,bytecode:o});return ts(t,{...i,...i.authorizationList?{to:null}:{},data:a})}eu();async function KR(t){return t.account?.type==="local"?[t.account.address]:(await t.request({method:"eth_accounts"},{dedupe:!0})).map(r=>Ui(r))}Pt();we();async function qR(t,e={}){let{account:r=t.account,chainId:n}=e,o=r?ce(r):void 0,i=n?[o?.address,[Z(n)]]:[o?.address],a=await t.request({method:"wallet_getCapabilities",params:i}),s={};for(let[c,u]of Object.entries(a)){s[Number(c)]={};for(let[f,l]of Object.entries(u))f==="addSubAccount"&&(f="unstable_addSubAccount"),s[Number(c)][f]=l}return typeof n=="number"?s[n]:s}async function HR(t){return await t.request({method:"wallet_getPermissions"},{dedupe:!0})}Pt();Xi();Pc();cr();Xa();f5();async function s1(t,e){let{account:r=t.account,chainId:n,nonce:o}=e;if(!r)throw new Dt({docsPath:"/docs/eip7702/prepareAuthorization"});let i=ce(r),a=(()=>{if(e.executor)return e.executor==="self"?e.executor:ce(e.executor)})(),s={address:e.contractAddress??e.address,chainId:n,nonce:o};return typeof s.chainId>"u"&&(s.chainId=t.chain?.id??await oe(t,Fr,"getChainId")({})),typeof s.nonce>"u"&&(s.nonce=await oe(t,cb,"getTransactionCount")({address:i.address,blockTag:"pending"}),(a==="self"||a?.address&&Lr(a.address,i.address))&&(s.nonce+=1)),s}F0();eu();async function GR(t){return(await t.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(r=>_B(r))}async function WR(t,e){return t.request({method:"wallet_requestPermissions",params:[e]},{retryCount:0})}cr();async function VR(t,e){let{chain:r=t.chain}=e,n=e.timeout??Math.max((r?.blockTime??0)*3,5e3),o=await oe(t,Db,"sendCalls")(e);return await oe(t,Kb,"waitForCallsStatus")({...e,id:o.id,timeout:n})}j5();X5();K0();e8();async function YR(t,e){let{id:r}=e;await t.request({method:"wallet_showCallsStatus",params:[r]})}Pt();Xi();async function ZR(t,e){let{account:r=t.account}=e;if(!r)throw new Dt({docsPath:"/docs/eip7702/signAuthorization"});let n=ce(r);if(!n.signAuthorization)throw new Fn({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:n.type});let o=await s1(t,e);return n.signAuthorization(o)}Pt();Xi();we();async function JR(t,{account:e=t.account,message:r}){if(!e)throw new Dt({docsPath:"/docs/actions/wallet/signMessage"});let n=ce(e);if(n.signMessage)return n.signMessage({message:r});let o=typeof r=="string"?h0(r):r.raw instanceof Uint8Array?ur(r.raw):r.raw;return t.request({method:"personal_sign",params:[o,n.address]},{retryCount:0})}Pt();Xi();Fb();we();Oc();cr();Ya();Xa();async function XR(t,e){let{account:r=t.account,chain:n=t.chain,...o}=e;if(!r)throw new Dt({docsPath:"/docs/actions/wallet/signTransaction"});let i=ce(r);$r({account:i,...e});let a=await oe(t,Fr,"getChainId")({});n!==null&&sd({currentChainId:a,chain:n});let c=(n?.formatters||t.chain?.formatters)?.transactionRequest?.format||$n;return i.signTransaction?i.signTransaction({...o,account:i,chainId:a},{serializer:t.chain?.serializers?.transaction}):await t.request({method:"eth_signTransaction",params:[{...c({...o,account:i},"signTransaction"),chainId:Z(a),from:i.address}]},{retryCount:0})}Pt();Xi();SR();async function QR(t,e){let{account:r=t.account,domain:n,message:o,primaryType:i}=e;if(!r)throw new Dt({docsPath:"/docs/actions/wallet/signTypedData"});let a=ce(r),s={EIP712Domain:_R({domain:n}),...e.types};if(AR({domain:n,message:o,primaryType:i,types:s}),a.signTypedData)return a.signTypedData({domain:n,message:o,primaryType:i,types:s});let c=ER({domain:n,message:o,primaryType:i,types:s});return t.request({method:"eth_signTypedData_v4",params:[a.address,c]},{retryCount:0})}we();async function eC(t,{id:e}){await t.request({method:"wallet_switchEthereumChain",params:[{chainId:Z(e)}]},{retryCount:0})}async function tC(t,e){return await t.request({method:"wallet_watchAsset",params:e},{retryCount:0})}q0();a1();function rC(t){return{addChain:e=>DR(t,e),deployContract:e=>zR(t,e),fillTransaction:e=>bb(t,e),getAddresses:()=>KR(t),getCallsStatus:e=>zb(t,e),getCapabilities:e=>qR(t,e),getChainId:()=>Fr(t),getPermissions:()=>HR(t),prepareAuthorization:e=>s1(t,e),prepareTransactionRequest:e=>Qa(t,e),requestAddresses:()=>GR(t),requestPermissions:e=>WR(t,e),sendCalls:e=>Db(t,e),sendCallsSync:e=>VR(t,e),sendRawTransaction:e=>Lb(t,e),sendRawTransactionSync:e=>o1(t,e),sendTransaction:e=>ts(t,e),sendTransactionSync:e=>i1(t,e),showCallsStatus:e=>YR(t,e),signAuthorization:e=>ZR(t,e),signMessage:e=>JR(t,e),signTransaction:e=>XR(t,e),signTypedData:e=>QR(t,e),switchChain:e=>eC(t,e),waitForCallsStatus:e=>Kb(t,e),watchAsset:e=>tC(t,e),writeContract:e=>so(t,e),writeContractSync:e=>ud(t,e),token:{approve:W0(t,Qi),approveSync:W0(t,t8),transfer:W0(t,ea),transferSync:W0(t,r8)}}}function n8(t){let{key:e="wallet",name:r="Wallet Client",transport:n}=t;return iR({...t,key:e,name:r,transport:n,type:"walletClient"}).extend(rC)}vR();function nC({key:t,methods:e,name:r,request:n,retryCount:o=3,retryDelay:i=150,timeout:a,type:s},c){let u=Gb();return{config:{key:t,methods:e,name:r,request:n,retryCount:o,retryDelay:i,timeout:a,type:s},request:gR(n,{methods:e,retryCount:o,retryDelay:i,uid:u}),value:c}}function o8(t,e={}){let{key:r="custom",methods:n,name:o="Custom Provider",retryDelay:i}=e;return({retryCount:a})=>nC({key:r,methods:n,name:o,request:t.request.bind(t),retryCount:e.retryCount??a,retryDelay:i,type:"custom"})}var oC={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}};xr();i5();td();G0();var iC={block:YO({format(t){return{transactions:t.transactions?.map(r=>{if(typeof r=="string")return r;let n=Ji(r);return n.typeHex==="0x7e"&&(n.isSystemTx=r.isSystemTx,n.mint=r.mint?Xe(r.mint):void 0,n.sourceHash=r.sourceHash,n.type="deposit"),n}),stateRoot:t.stateRoot}}}),transaction:VO({format(t){let e={};return t.type==="0x7e"&&(e.isSystemTx=t.isSystemTx,e.mint=t.mint?Xe(t.mint):void 0,e.sourceHash=t.sourceHash,e.type="deposit"),e}}),transactionReceipt:eR({format(t){return{...t.depositNonce?{depositNonce:Xe(t.depositNonce)}:{},...t.depositReceiptVersion?{depositReceiptVersion:Ot(t.depositReceiptVersion)}:{},l1GasPrice:t.l1GasPrice?Xe(t.l1GasPrice):null,l1GasUsed:t.l1GasUsed?Xe(t.l1GasUsed):null,l1Fee:t.l1Fee?Xe(t.l1Fee):null,l1FeeScalar:t.l1FeeScalar?Number(t.l1FeeScalar):null}}})};Ho();Cn();Nn();we();eb();H5();function bte(t,e){return vte(t)?gte(t):pR(t,e)}var aC={transaction:bte};function gte(t){xte(t);let{sourceHash:e,data:r,from:n,gas:o,isSystemTx:i,mint:a,to:s,value:c}=t,u=[e,n,s??"0x",a?ur(a):"0x",c?ur(c):"0x",o?ur(o):"0x",i?"0x1":"0x",r??"0x"];return Ze(["0x7e",oo(u)])}function vte(t){return t.type==="deposit"||typeof t.sourceHash<"u"}function xte(t){let{from:e,to:r}=t;if(e&&!ge(e))throw new De({address:e});if(r&&!ge(r))throw new De({address:r})}var i8={blockTime:2e3,contracts:oC,formatters:iC,serializers:aC};xR();var Z0=1,c1=G5({...i8,id:8453,name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://basescan.org",apiUrl:"https://api.basescan.org/api"}},contracts:{...i8.contracts,disputeGameFactory:{[Z0]:{address:"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"}},l2OutputOracle:{[Z0]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[Z0]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[Z0]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:Z0}),wte=G5({...c1,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://mainnet-preconf.base.org"]}}});var Ete={route_unavailable:"This file does not support the selected payment route.",host_payment_failed:"Payment submission failed. Keep the saved purchase and check final status before retrying.",bad_request:"The request is invalid. Check its fields before retrying.",bad_deadline:"The authorization deadline is invalid or expired.",invalid_arguments:"Invalid arguments. Run annon --help.",invalid_record:"Invalid saved record. Export necessary test evidence and clear development state.",transport:"The service could not be reached. Keep saved state and retry later.",recovery_not_final:"The recovery grant is not final. Resume the saved recovery later.",invalid_signature:"The wallet did not authorize the exact requested message.",operation_failed:"Operation failed. Check configuration, funding and final purchase status before retrying. Saved encrypted records are retained.",transaction_uncertain:"Transaction submission is uncertain. Check the saved purchase and transaction hash before retrying.",quote_refused:"The 1Click quote was refused. Review the source asset and amount before retrying.",base_rpc_rate_limited:"The Base RPC is rate limiting requests. Configure a Base RPC endpoint with an API key (baseRpc).",near_rpc_rate_limited:"Configure a NEAR RPC endpoint with an API key (nearRpc).",budget_exceeded:"The persisted spending budget is exhausted.",download_limited:"Download limit reached. Wait before downloading again.",download_in_progress:"Another download is active. Wait before retrying.",rate_limited:"The host is busy. Wait before retrying.",unavailable:"The service is temporarily unavailable. Wait before retrying.",transport_required:"Configure a trusted relayer before a Base purchase.",relayer_unavailable:"Base sponsorship checks are unavailable. Retry before paying.",not_sponsored:"This listing does not qualify for Base sponsorship. Do not pay through this route.",wrong_identity:"The wallet does not control the required identity.",settlement_pending:"The purchase is still settling. Wait before retrying the saved purchase.",protocol_fee_above_max:"The advertised protocol fee exceeds maxProtocolFee. Review the fee in human configuration.",funding_refused:"File funding was refused. Correct the cause before retrying.",file_storage_low:"This file needs more purchase storage funding before a NEAR or 1Click payment.",source_changed:"The source changed between passes. Resume sell with the original plaintext and saved fileId.",quote_expired:"The 1Click quote expired. Run buy again.",storage_required:"Prepay storage with storageDeposit before register or reopen, then resume the saved operation.",unknown_file:"The configured contract has no such file. Check the file ID and deployment.",taken_down:"The moderator has taken down this file; key release is blocked.",sales_stopped:"The seller has stopped new sales. Use a saved purchase to open an earlier purchase.",unknown_moderator:"Review this file's moderator and explicitly accept it with the moderator option before buying.",price_above_max:"The registered price exceeds maxPrice. Review the current terms before buying.",untrusted_contract:"The offer names a different contract. Review that deployment and configure it explicitly.",network_mismatch:"The deployment network or USDC asset differs from the configured network. Check the configuration.",store_conflict:"Another process updated this purchase. Keep the encrypted state and check status before retrying.",file_invalid:"The file failed SDK verification. Obtain the registered file from its host.",file_mismatch:"The file or offer differs from its registered commitment. Obtain the correct file or offer.",bad_requirements:"The host offer failed SDK validation. Obtain an updated Annon offer.",not_authorized:"The host has not accepted this final grant. Check final purchase status and the resource URL."};var ns=class extends Error{code;constructor(e,r=Ete[e]??`${e.replaceAll("_"," ")}.`,n){super(r,n),this.code=e,this.name="AnnonError"}};var f1=BigInt(4294967295),sC=BigInt(32);function Ate(t,e=!1){return e?{h:Number(t&f1),l:Number(t>>sC&f1)}:{h:Number(t>>sC&f1)|0,l:Number(t&f1)|0}}function u1(t,e=!1){let r=t.length,n=new Uint32Array(r),o=new Uint32Array(r);for(let i=0;i<r;i++){let{h:a,l:s}=Ate(t[i],e);[n[i],o[i]]=[a,s]}return[n,o]}var _te=t=>t/2**32|0,Ste=t=>t>>>0;function cC(t,e,r,n){let o=_te(r),i=Ste(r);t.setUint32(e,n?i:o,n),t.setUint32(e+4,n?o:i,n)}var a8=(t,e,r)=>t>>>r,s8=(t,e,r)=>t<<32-r|e>>>r,$c=(t,e,r)=>t>>>r|e<<32-r,Fc=(t,e,r)=>t<<32-r|e>>>r,J0=(t,e,r)=>t<<64-r|e>>>r-32,X0=(t,e,r)=>t>>>r-32|e<<64-r;function ti(t,e,r,n){let o=(e>>>0)+(n>>>0);return{h:t+r+(o/2**32|0)|0,l:o|0}}var fC=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),uC=(t,e,r,n)=>e+r+n+(t/2**32|0)|0,dC=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),lC=(t,e,r,n,o)=>e+r+n+o+(t/2**32|0)|0,pC=(t,e,r,n,o)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(o>>>0),hC=(t,e,r,n,o,i)=>e+r+n+o+i+(t/2**32|0)|0;function d1(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in t&&t.BYTES_PER_ELEMENT===1}var l1=t=>t?`"${t}" `:"";function mr(t,e=""){if(typeof t!="number")throw new TypeError(l1(e)+"expected number, got "+typeof t);if(!Number.isSafeInteger(t)||t<0)throw new RangeError(l1(e)+"expected integer >= 0, got "+t);return t}function bC(t,e=""){if(typeof t!="boolean")throw new TypeError(l1(e)+"expected boolean, got type="+typeof t);return t}function _r(t,e,r=""){if(d1(t)&&(e===void 0||t.length===e))return t;e!==void 0&&mr(e,"length");let n=d1(t),o=e!==void 0?` of length ${e}`:"",i=n?`length=${t.length}`:`type=${typeof t}`,a=l1(r)+"expected Uint8Array"+o+", got "+i;throw n?new RangeError(a):new TypeError(a)}function p1(t){if(typeof t!="function"||typeof t.create!="function")throw new TypeError("expected hash wrapped by utils.createHasher");if(mr(t.outputLen),mr(t.blockLen),t.outputLen<1||t.blockLen<1)throw new Error("hash blockLen / outputLen must be >= 1")}var Tte=(t,e)=>{if(t===null||typeof t!="object"||Array.isArray(t))throw new TypeError((e==="object"?"":`"${e}" `)+"expected object, got type="+typeof t)},mC=(t,e)=>{Tte(t,e);let r=Object.getPrototypeOf(t);if(r!==Object.prototype&&r!==null)throw new TypeError(`"${e}" expected plain object`);if(Object.hasOwn(t,"__proto__"))throw new TypeError(`"${e}.__proto__" is not allowed`)};function ta(t,e=!0){if(t.destroyed)throw new Error("hash was destroyed");if(e&&t.finished)throw new Error("digest() was already called")}function dd(t,e){_r(t,void 0,"output");let r=e.outputLen;if(!(t.length>=r))throw new RangeError('"output" expected length >= '+r)}function c8(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function ri(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function h1(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function co(t,e){return t<<32-e|t>>>e}var Bte=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Ote(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}function Pte(t){for(let e=0;e<t.length;e++)t[e]=Ote(t[e]);return t}var f8=Bte?t=>t:Pte,gC=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",Rte=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function m1(t){if(_r(t),gC)return t.toHex();let e="";for(let r=0;r<t.length;r++)e+=Rte[t[r]];return e}function yC(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:void 0}function y1(t){if(typeof t!="string")throw new TypeError("hex string expected, got "+typeof t);if(gC)try{return Uint8Array.fromHex(t)}catch(o){throw o instanceof SyntaxError?new RangeError(o.message):o}let e=t.length,r=e/2;if(e%2)throw new RangeError("hex string expected, got unpadded hex of length "+e);let n=new Uint8Array(r);for(let o=0,i=0;o<r;o++,i+=2){let a=yC(t.charCodeAt(i)),s=yC(t.charCodeAt(i+1));if(a===void 0||s===void 0){let c=t[i]+t[i+1];throw new RangeError('hex string expected, got non-hex character "'+c+'" at index '+i)}n[o]=a*16+s}return n}function u8(...t){let e=0;for(let n=0;n<t.length;n++){let o=t[n];_r(o),e+=o.length}let r=new Uint8Array(e);for(let n=0,o=0;n<t.length;n++){let i=t[n];r.set(i,o),o+=i.length}return r}function vC(t,e,r="opts"){return mC(t,"defaults"),e!==void 0&&mC(e,r),Object.assign(Object.create(null),t,e)}function Q0(t,e={}){if(typeof t!="function")throw new TypeError('"hashCons" expected function, got type='+typeof t);e=vC({},e,"info");let r=(o,i)=>t(i).update(o).digest(),n=t(void 0);return r.outputLen=n.outputLen,r.blockLen=n.blockLen,r.canXOF=n.canXOF,r.create=o=>t(o),Object.assign(r,e),Object.freeze(r)}function xC(t=32){mr(t,"bytesLength");let e=typeof globalThis=="object"?globalThis.crypto:null;if(typeof e?.getRandomValues!="function")throw new Error("crypto.getRandomValues must be defined");if(t>65536)throw new RangeError(`"bytesLength" expected <= 65536, got ${t}`);return e.getRandomValues(new Uint8Array(t))}var b1=t=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,t])});function wC(t,e,r){return t&e^~t&r}function EC(t,e,r){return t&e^t&r^e&r}var ep=class{blockLen;outputLen;canXOF=!1;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(e,r,n,o){this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=o,this.buffer=new Uint8Array(e),this.view=h1(this.buffer)}update(e){ta(this),_r(e);let{view:r,buffer:n,blockLen:o}=this,i=e.length,a=!1;for(let s=0;s<i;){let c=Math.min(o-this.pos,i-s);if(c===o){let u=h1(e);for(;o<=i-s;s+=o)this.process(u,s);a=!0;continue}n.set(s===0&&c===i?e:e.subarray(s,s+c),this.pos),this.pos+=c,s+=c,this.pos===o&&(this.process(r,0),this.pos=0,a=!0)}return this.length+=e.length,a&&this.roundClean(),this}digestInto(e){ta(this),dd(e,this),this.finished=!0;let{buffer:r,view:n,blockLen:o,isLE:i}=this,{pos:a}=this;r[a++]=128,r.fill(0,a),this.padOffset>o-a&&(this.process(n,0),r.fill(0)),cC(n,o-8,this.length*8,i),this.process(n,0),this.roundClean();let s=e===r?n:h1(e),c=this.outputLen,u=c/4,f=this.get();if(c%4||u>f.length)throw new Error("invalid outputLen");for(let l=0;l<u;l++)s.setUint32(4*l,f[l],i)}digest(){let{buffer:e,outputLen:r}=this;this.digestInto(e);let n=e.slice(0,r);return this.destroy(),n}_cloneIntoMeta(e){let{buffer:r,length:n,finished:o,destroyed:i,pos:a}=this;return e.destroyed=i,e.finished=o,e.length=n,e.pos=a,a&&e.buffer.set(r),e}clone(){return this._cloneInto()}},AC=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]);var _C=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]);var Cte=Uint32Array.from([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]),os=new Uint32Array(64),d8=class extends ep{A=0;B=0;C=0;D=0;E=0;F=0;G=0;H=0;constructor(e,r){super(64,e,8,!1),this.A=r[0]|0,this.B=r[1]|0,this.C=r[2]|0,this.D=r[3]|0,this.E=r[4]|0,this.F=r[5]|0,this.G=r[6]|0,this.H=r[7]|0}get(){let{A:e,B:r,C:n,D:o,E:i,F:a,G:s,H:c}=this;return[e,r,n,o,i,a,s,c]}set(e,r,n,o,i,a,s,c){this.A=e|0,this.B=r|0,this.C=n|0,this.D=o|0,this.E=i|0,this.F=a|0,this.G=s|0,this.H=c|0}_cloneInto(e){return(e||=new this.constructor).set(...this.get()),this._cloneIntoMeta(e)}process(e,r){for(let l=0;l<16;l++,r+=4)os[l]=e.getUint32(r,!1);for(let l=16;l<64;l++){let h=os[l-15],m=os[l-2],x=co(h,7)^co(h,18)^h>>>3,S=co(m,17)^co(m,19)^m>>>10;os[l]=S+os[l-7]+x+os[l-16]|0}let{A:n,B:o,C:i,D:a,E:s,F:c,G:u,H:f}=this;for(let l=0;l<64;l++){let h=co(s,6)^co(s,11)^co(s,25),m=f+h+wC(s,c,u)+Cte[l]+os[l]|0,S=(co(n,2)^co(n,13)^co(n,22))+EC(n,o,i)|0;f=u,u=c,c=s,s=a+m|0,a=i,i=o,o=n,n=m+S|0}n=n+this.A|0,o=o+this.B|0,i=i+this.C|0,a=a+this.D|0,s=s+this.E|0,c=c+this.F|0,u=u+this.G|0,f=f+this.H|0,this.set(n,o,i,a,s,c,u,f)}roundClean(){ri(os)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),ri(this.buffer)}},l8=class extends d8{constructor(){super(32,AC)}};var SC=u1(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))),Nte=SC[0],Mte=SC[1],is=new Uint32Array(80),as=new Uint32Array(80),p8=class extends ep{Ah=0;Al=0;Bh=0;Bl=0;Ch=0;Cl=0;Dh=0;Dl=0;Eh=0;El=0;Fh=0;Fl=0;Gh=0;Gl=0;Hh=0;Hl=0;constructor(e,r){super(128,e,16,!1),this.Ah=r[0]|0,this.Al=r[1]|0,this.Bh=r[2]|0,this.Bl=r[3]|0,this.Ch=r[4]|0,this.Cl=r[5]|0,this.Dh=r[6]|0,this.Dl=r[7]|0,this.Eh=r[8]|0,this.El=r[9]|0,this.Fh=r[10]|0,this.Fl=r[11]|0,this.Gh=r[12]|0,this.Gl=r[13]|0,this.Hh=r[14]|0,this.Hl=r[15]|0}get(){let{Ah:e,Al:r,Bh:n,Bl:o,Ch:i,Cl:a,Dh:s,Dl:c,Eh:u,El:f,Fh:l,Fl:h,Gh:m,Gl:x,Hh:S,Hl:O}=this;return[e,r,n,o,i,a,s,c,u,f,l,h,m,x,S,O]}set(e,r,n,o,i,a,s,c,u,f,l,h,m,x,S,O){this.Ah=e|0,this.Al=r|0,this.Bh=n|0,this.Bl=o|0,this.Ch=i|0,this.Cl=a|0,this.Dh=s|0,this.Dl=c|0,this.Eh=u|0,this.El=f|0,this.Fh=l|0,this.Fl=h|0,this.Gh=m|0,this.Gl=x|0,this.Hh=S|0,this.Hl=O|0}_cloneInto(e){return(e||=new this.constructor).set(...this.get()),this._cloneIntoMeta(e)}process(e,r){for(let B=0;B<16;B++,r+=4)is[B]=e.getUint32(r),as[B]=e.getUint32(r+=4);for(let B=16;B<80;B++){let R=is[B-15]|0,L=as[B-15]|0,T=$c(R,L,1)^$c(R,L,8)^a8(R,L,7),M=Fc(R,L,1)^Fc(R,L,8)^s8(R,L,7),$=is[B-2]|0,k=as[B-2]|0,v=$c($,k,19)^J0($,k,61)^a8($,k,6),d=Fc($,k,19)^X0($,k,61)^s8($,k,6),y=dC(M,d,as[B-7],as[B-16]),b=lC(y,T,v,is[B-7],is[B-16]);is[B]=b|0,as[B]=y|0}let{Ah:n,Al:o,Bh:i,Bl:a,Ch:s,Cl:c,Dh:u,Dl:f,Eh:l,El:h,Fh:m,Fl:x,Gh:S,Gl:O,Hh:P,Hl:F}=this;for(let B=0;B<80;B++){let R=$c(l,h,14)^$c(l,h,18)^J0(l,h,41),L=Fc(l,h,14)^Fc(l,h,18)^X0(l,h,41),T=l&m^~l&S,M=h&x^~h&O,$=pC(F,L,M,Mte[B],as[B]),k=hC($,P,R,T,Nte[B],is[B]),v=$|0,d=$c(n,o,28)^J0(n,o,34)^J0(n,o,39),y=Fc(n,o,28)^X0(n,o,34)^X0(n,o,39),b=n&i^n&s^i&s,g=o&a^o&c^a&c;P=S|0,F=O|0,S=m|0,O=x|0,m=l|0,x=h|0,{h:l,l:h}=ti(u|0,f|0,k|0,v|0),u=s|0,f=c|0,s=i|0,c=a|0,i=n|0,a=o|0;let A=fC(v,y,g);n=uC(A,k,d,b),o=A|0}({h:n,l:o}=ti(this.Ah|0,this.Al|0,n|0,o|0)),{h:i,l:a}=ti(this.Bh|0,this.Bl|0,i|0,a|0),{h:s,l:c}=ti(this.Ch|0,this.Cl|0,s|0,c|0),{h:u,l:f}=ti(this.Dh|0,this.Dl|0,u|0,f|0),{h:l,l:h}=ti(this.Eh|0,this.El|0,l|0,h|0),{h:m,l:x}=ti(this.Fh|0,this.Fl|0,m|0,x|0),{h:S,l:O}=ti(this.Gh|0,this.Gl|0,S|0,O|0),{h:P,l:F}=ti(this.Hh|0,this.Hl|0,P|0,F|0),this.set(n,o,i,a,s,c,u,f,l,h,m,x,S,O,P,F)}roundClean(){ri(is,as)}destroy(){this.destroyed=!0,ri(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}},h8=class extends p8{constructor(){super(64,_C)}};var IC=Q0(()=>new l8,b1(1));var m8=Q0(()=>new h8,b1(3));function v1(t,e,r=()=>{}){if(!Array.isArray(t))throw new TypeError(`"${e}" expected array, got type=${typeof t}`);for(let n=0;n<t.length;n++)r(t[n],`${e}[${n}]`);return t}var Ee=(t,e,r)=>_r(t,e,r),y8=mr;function BC(t,e=""){if(typeof t!="string"){let r=e&&`"${e}" `;throw new TypeError(r+"expected string, got type="+typeof t)}return t}function ss(t,e="object"){if(t===null||typeof t!="object"||Array.isArray(t))throw new TypeError(e==="object"?"expected valid options object":`"${e}" expected object, got type=${typeof t}`);return t}function Lc(t,e){if(typeof t!="function")throw new TypeError(`"${e}" is invalid: expected function, got ${typeof t}`);return t}var tp=m1,Ln=(...t)=>u8(...t),ld=t=>y1(t),fs=d1,jc=t=>xC(t),g1=BigInt(0),TC=BigInt(1),kte=t=>t?`"${t}" `:"";function jr(t,e=""){if(typeof t!="boolean")throw new TypeError(kte(e)+"expected boolean, got type="+typeof t);return t}function x1(t){if(typeof t=="bigint"){if(!cs(t))throw new RangeError("positive bigint expected, got "+t)}else y8(t);return t}function ra(t,e=""){if(typeof t!="number"){let r=e&&`"${e}" `;throw new TypeError(r+"expected number, got type="+typeof t)}if(!Number.isSafeInteger(t)){let r=e&&`"${e}" `;throw new RangeError(r+"expected safe integer, got "+t)}}function rp(t){let e=x1(t).toString(16);return e.length&1?"0"+e:e}function OC(t){if(typeof t!="string")throw new TypeError("hex string expected, got "+typeof t);return t===""?g1:BigInt("0x"+t)}function ni(t){return OC(m1(t))}function Uc(t){return OC(m1(np(_r(t)).reverse()))}function w1(t,e){if(mr(e),e===0)throw new Error("zero output length is invalid");t=x1(t);let r=e*2,n=t.toString(16);if(n.length>r)throw new RangeError("number is too large");return y1(n.padStart(r,"0"))}function b8(t,e){return w1(t,e).reverse()}function np(t){return Uint8Array.from(Ee(t))}function cs(t){return typeof t=="bigint"&&g1<=t}function g8(t,e,r){return cs(t)&&cs(e)&&cs(r)&&e<=t&&t<r}function pd(t,e,r,n){if(!g8(e,r,n))throw new RangeError("expected valid "+t+": "+r+" <= n < "+n+", got "+e)}function hd(t){if(t<g1)throw new Error("expected non-negative bigint, got "+t);return t===g1?0:t.toString(2).length}var op=t=>(ra(t,"n"),(TC<<BigInt(t))-TC);function PC(t,e,r){if(mr(t,"hashLen"),mr(e,"qByteLen"),typeof r!="function")throw new TypeError("hmacFn must be a function");let n=O=>new Uint8Array(O),o=Uint8Array.of(),i=Uint8Array.of(0),a=Uint8Array.of(1),s=1e3,c=n(t),u=n(t),f=0,l=()=>{c.fill(1),u.fill(0),f=0},h=(...O)=>r(u,Ln(c,...O)),m=(O=o)=>{u=h(i,O),c=h(),O.length!==0&&(u=h(a,O),c=h())},x=()=>{if(f++>=s)throw new Error("drbg: tried max amount of iterations");let O=0,P=[];for(;O<e;){c=h();let F=c.slice();P.push(F),O+=c.length}return Ln(...P)};return(O,P)=>{l(),m(O);let F;for(;(F=P(x()))===void 0;)m();return l(),F}}function Ur(t,e={},r={},n="object"){ss(t,n),ss(e,"fields"),ss(r,"optFields");function o(a,s,c){let u=n==="object"?`param "${String(a)}"`:`"${n}.${String(a)}"`,f=t[a];if(!Object.hasOwn(t,a)&&(c?f!==void 0:s!=="function"))throw new TypeError(`${u} is invalid: expected own property`);if(c&&f===void 0)return;let l=typeof f;if(l!==s||f===null)throw new TypeError(`${u} is invalid: expected ${s}, got ${l}`)}let i=(a,s)=>Object.entries(a).forEach(([c,u])=>o(c,u,s));i(e,!1),i(r,!0)}var kt=BigInt(0),Ae=BigInt(1),us=BigInt(2),NC=BigInt(3),v8=BigInt(4),MC=BigInt(5),$te=BigInt(7),kC=BigInt(8),Fte=BigInt(9),Lte=BigInt(15),$C=BigInt(16),jte=BigInt("0x10000000000000000");function Je(t,e){if(e<=kt)throw new Error("mod: expected positive modulus, got "+e);let r=t%e;return r>=kt?r:e+r}function FC(t,e,r){if(r<=Ae)throw new Error("pow: expected modulus > 1, got "+r);if(typeof e!="bigint")throw new TypeError("invalid exponent: expected bigint, got "+typeof e);if(e<kt)throw new Error("invalid exponent, negatives unsupported");if(e===kt)return Ae;if(e===Ae)return t;let n=t%r;if(n<kt&&(n+=r),e<jte){let s=Ae;for(;e>kt;)e&Ae&&(s=s*n%r),n=n*n%r,e>>=Ae;return s}let o=[];for(;e>kt;)o.push(Number(e&Lte)),e>>=v8;let i=new Array(16);i[0]=Ae,i[1]=n;for(let s=2;s<16;s++)i[s]=i[s-1]*n%r;let a=i[o[o.length-1]];for(let s=o.length-2;s>=0;s--){a=a*a%r,a=a*a%r,a=a*a%r,a=a*a%r;let c=o[s];c!==0&&(a=a*i[c]%r)}return a}function Ge(t,e,r){if(r<=Ae)throw new Error("pow2: expected modulus > 1, got "+r);if(e<kt)throw new Error("pow2: expected non-negative exponent, got "+e);let n=t;for(;e-- >kt;)n*=n,n%=r;return n}function RC(t,e){if(t===kt)throw new Error("invert: expected non-zero number");if(e<=Ae)throw new Error("invert: expected modulus > 1, got "+e);let r=Je(t,e),n=e,o=kt,i=Ae;for(;r!==kt;){let s=n/r,c=n-r*s,u=o-i*s;n=r,r=c,o=i,i=u}if(n!==Ae)throw new Error("invert: does not exist");return Je(o,e)}function LC(t,e){if(e<=Ae)throw new Error("invertCt: expected prime modulus > 1, got "+e);let r=Je(t,e);if(r===kt)throw new Error("invertCt: expected non-zero number");let n=FC(r,e-us,e);if(Je(r*n,e)!==Ae)throw new Error("invertCt: does not exist");return n}function x8(t,e,r){let n=t;if(!n.eql(n.sqr(e),r))throw new Error("Cannot find square root")}function w8(t,e){if((t&Ae)===kt)throw new Error(e+": expected odd modulus, got "+t)}function jC(t,e){let r=t,n=(r.ORDER+Ae)/v8,o=r.pow(e,n);return x8(r,o,e),o}function Ute(t,e){let r=t,n=(r.ORDER-MC)/kC,o=r.mul(e,us),i=r.pow(o,n),a=r.mul(e,i),s=r.mul(r.mul(a,us),i),c=r.mul(a,r.sub(s,r.ONE));return x8(r,c,e),c}function Dte(t){let e=yd(t),r=UC(t),n=r(e,e.neg(e.ONE)),o=r(e,n),i=r(e,e.neg(n)),a=(t+$te)/$C;return((s,c)=>{let u=s,f=u.pow(c,a),l=u.mul(f,n),h=u.mul(f,o),m=u.mul(f,i),x=u.eql(u.sqr(l),c),S=u.eql(u.sqr(h),c);f=u.cmov(f,l,x),l=u.cmov(m,h,S);let O=u.eql(u.sqr(l),c),P=u.cmov(f,l,O);return x8(u,P,c),P})}function UC(t){if(t<NC)throw new Error("sqrt is not defined for small field");w8(t,"tonelliShanks");let e=t-Ae,r=0;for(;e%us===kt;)e/=us,r++;let n=us,o=yd(t);for(;ip(o,n)===1;)if(n++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(r===1)return jC;let i=o.pow(n,e),a=(e+Ae)/us;return function(c,u){let f=c;if(f.is0(u))return u;if(ip(f,u)!==1)throw new Error("Cannot find square root");let l=r,h=f.mul(f.ONE,i),m=f.pow(u,e),x=f.pow(u,a);for(;!f.eql(m,f.ONE);){if(f.is0(m))throw new Error("Cannot find square root: probably non-prime P");let S=1,O=f.sqr(m);for(;!f.eql(O,f.ONE);)if(S++,O=f.sqr(O),S===l)throw new Error("Cannot find square root");let P=Ae<<BigInt(l-S-1),F=f.pow(h,P);l=S,h=f.sqr(F),m=f.mul(m,h),x=f.mul(x,F)}return x}}function zte(t){return w8(t,"Fp.sqrt"),t%v8===NC?jC:t%kC===MC?Ute:t%$C===Fte?Dte(t):UC(t)}var DC=(t,e)=>(Je(t,e)&Ae)===Ae,Kte=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function md(t){if(ss(t,"field"),typeof t.ORDER!="bigint")throw new TypeError('param "ORDER" is invalid: expected bigint, got '+typeof t.ORDER);ra(t.BYTES,"BYTES"),ra(t.BITS,"BITS");for(let e of Kte)Lc(t[e],"field."+e);if(t.BYTES<1||t.BITS<1)throw new Error("invalid field: expected BYTES/BITS > 0");if(t.ORDER<=Ae)throw new Error("invalid field: expected ORDER > 1, got "+t.ORDER);return t}function A1(t,e,r=!1){md(t),v1(e,"nums"),jr(r,"passZero");let n=t,o=new Array(e.length).fill(r?n.ZERO:void 0),i=e.reduce((s,c,u)=>n.is0(c)?s:(o[u]=s,n.mul(s,c)),n.ONE),a=n.inv(i);return e.reduceRight((s,c,u)=>n.is0(c)?s:(o[u]=n.mul(s,o[u]),n.mul(s,c)),a),o}function ip(t,e){md(t);let r=t;w8(r.ORDER,"FpLegendre");let n=(r.ORDER-Ae)/us,o=r.pow(e,n),i=r.eql(o,r.ONE),a=r.eql(o,r.ZERO),s=r.eql(o,r.neg(r.ONE));if(!i&&!a&&!s)throw new Error("invalid Legendre symbol result");return i?1:a?0:-1}function qte(t,e){if(e!==void 0&&y8(e),t<=kt)throw new Error("invalid n length: expected positive n, got "+t);if(e!==void 0&&e<1)throw new Error("invalid n length: expected positive bit length, got "+e);let r=hd(t);if(e!==void 0&&e<r)throw new Error(`invalid n length: expected nBitLength (${e}) >= bitLen(n) (${r})`);let n=e!==void 0?e:r,o=Math.ceil(n/8);return{nBitLength:n,nByteLength:o}}var CC=new WeakMap,E1=class{ORDER;BITS;BYTES;isLE;ZERO=kt;ONE=Ae;_lengths;_mod;constructor(e,r={}){if(e<=Ae)throw new Error("invalid field: expected ORDER > 1, got "+e);let n;this.isLE=!1,r!=null&&typeof r=="object"&&(typeof r.BITS=="number"&&(n=r.BITS),typeof r.sqrt=="function"&&Object.defineProperty(this,"sqrt",{value:r.sqrt,enumerable:!0}),typeof r.isLE=="boolean"&&(this.isLE=r.isLE),r.allowedLengths&&(this._lengths=Object.freeze(r.allowedLengths.slice())),typeof r.modFromBytes=="boolean"&&(this._mod=r.modFromBytes));let{nBitLength:o,nByteLength:i}=qte(e,n);if(i>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");this.ORDER=e,this.BITS=o,this.BYTES=i,Object.freeze(this)}create(e){return Je(e,this.ORDER)}isValid(e){if(typeof e!="bigint")throw new TypeError("invalid field element: expected bigint, got "+typeof e);return kt<=e&&e<this.ORDER}is0(e){return e===kt}isValidNot0(e){return!this.is0(e)&&this.isValid(e)}isOdd(e){return(e&Ae)===Ae}neg(e){return Je(-e,this.ORDER)}eql(e,r){return e===r}sqr(e){return Je(e*e,this.ORDER)}add(e,r){return Je(e+r,this.ORDER)}sub(e,r){return Je(e-r,this.ORDER)}mul(e,r){return Je(e*r,this.ORDER)}pow(e,r){return FC(e,r,this.ORDER)}div(e,r){return Je(e*RC(r,this.ORDER),this.ORDER)}sqrN(e){return e*e}addN(e,r){return e+r}subN(e,r){return e-r}mulN(e,r){return e*r}inv(e){return RC(e,this.ORDER)}sqrt(e){let r=CC.get(this);return r||CC.set(this,r=zte(this.ORDER)),r(this,e)}toBytes(e){return this.isLE?b8(e,this.BYTES):w1(e,this.BYTES)}fromBytes(e,r=!1){Ee(e);let{_lengths:n,BYTES:o,isLE:i,ORDER:a,_mod:s}=this;if(n){if(e.length<1||!n.includes(e.length)||e.length>o)throw new Error("Field.fromBytes: expected "+n+" bytes, got "+e.length);let u=new Uint8Array(o);u.set(e,i?0:u.length-e.length),e=u}if(e.length!==o)throw new Error("Field.fromBytes: expected "+o+" bytes, got "+e.length);let c=i?Uc(e):ni(e);if(s&&(c=Je(c,a)),!r&&!this.isValid(c))throw new Error("invalid field element: outside of range 0..ORDER");return c}invertBatch(e){return A1(this,e,!0)}cmov(e,r,n){return jr(n,"condition"),n?r:e}};function yd(t,e={}){return Object.freeze(E1.prototype),new E1(t,e)}function zC(t){if(typeof t!="bigint")throw new Error("field order must be bigint");if(t<=Ae)throw new Error("field order must be greater than 1");let e=hd(t-Ae);return Math.ceil(e/8)}function _1(t){let e=zC(t);return e+Math.ceil(e/2)}function S1(t,e,r=!1){Ee(t);let n=t.length,o=zC(e),i=Math.max(_1(e),16);if(n<i||n>1024)throw new Error("expected "+i+"-1024 bytes of input, got "+n);let a=r?Uc(t):ni(t),s=Je(a,e-Ae)+Ae;return r?b8(s,o):w1(s,o)}var _8=BigInt(0),ap=BigInt(1),Hte=BigInt(4),E8=16,KC=128,Gte=5,qC=2**31;function ds(t){let e=t;if(typeof e!="function")throw new TypeError('"Point" expected constructor, got type='+typeof t);Lc(e.fromAffine,"Point.fromAffine"),Lc(e.fromBytes,"Point.fromBytes"),Lc(e.fromHex,"Point.fromHex"),ss(e.BASE,"Point.BASE"),ss(e.ZERO,"Point.ZERO"),md(e.Fp),md(e.Fn)}function I1(t,e){ds(t),GC(e,t);let r=A1(t.Fp,e.map(n=>n.Z));return e.map((n,o)=>t.fromAffine(n.toAffine(r[o])))}function Wte(t,e,r=1){if(!Number.isSafeInteger(t)||t<r||t>e)throw new Error("invalid window size, expected ["+r+".."+e+"], got W="+t)}function Vte(t,e){let r=t*(4*e+128);if(r>qC)throw new Error("invalid window size: table would need ~"+Math.ceil(r/2**20)+" MiB, max "+qC/2**20+" MiB")}function S8(t,e){if(t!==void 0){Lc(t,"randomBytes");try{let r=t(e);if(!fs(r)||r.length!==e)return}catch{return}return t}}function GC(t,e){v1(t,"points"),t.forEach((r,n)=>{if(!(r instanceof e))throw new Error("invalid point at index "+n)})}function Yte(t,e,r){if(!Array.isArray(t))throw new Error("array of scalars expected");t.forEach((n,o)=>{if(!(r===void 0?e.isValid(n):cs(n)&&n<r))throw new Error("invalid scalar at index "+o)})}var WC=new WeakMap;function A8(t){return WC.get(t)||1}function Zte(t,e){let r=t.double(),n=[t];for(let o=1;o<e;o++)n.push(n[o-1].add(r));return n}function Jte(t,e){let r=2**e,n=r/2,o=BigInt(r-1),i=[];for(;t>_8;){let a=0;t&ap&&(a=Number(t&o),a>=n&&(a-=r),t-=BigInt(a)),i.push(a),t>>=ap}return i}function Xte(t,e,r){let n=2**e,o=n/2,i=BigInt(n-1),a=BigInt(e),s=[];for(let c=0;c<r;c++){let u=Number(t&i);t>>=a,u>o&&(u-=n,t+=ap),s.push(u)}if(t!==_8)throw new Error("invalid wnaf");return s}function Qte(t,e,r){let n=0;for(let i of r)n=Math.max(n,i.length);let o=t;for(let i=n-1;i>=0;i--){i!==n-1&&(o=o.double());for(let a=0;a<r.length;a++){let s=r[a][i];if(s){let c=e[a][Math.abs(s)-1>>1];o=o.add(s<0?c.negate():c)}}}return o}var bd=class{Point;BASE;ZERO;randomBytes;wnafPrecomputes=new WeakMap;baseCanBeBlinded;bits;constructor(e,r){ds(e),this.randomBytes=S8(r,E8),this.Point=e,this.BASE=e.BASE,this.ZERO=e.ZERO,this.bits=e.Fn.BITS}buildWnafTable(e,r,n){let o=Math.ceil(n/r)+1,i=2**(r-1),a=[],s=e;for(let c=0;c<o;c++){let u=s;for(let f=0;f<i;f++)a.push(u),u=u.add(s);s=a[a.length-1].double()}return{W:r,bits:n,windows:o,comp:a}}wnafCachedCT(e,r){let{W:n,windows:o,comp:i}=e,a=2**(n-1),s=Xte(r,n,o),c=this.ZERO,u=this.BASE;for(let f=0;f<o;f++){let l=s[f],h=f*a,m=Math.abs(l)-1,x=i[h];for(let O=1;O<a;O++)x=O===m?i[h+O]:x;let S=x.negate();l===0?u=u.add(i[h]):c=c.add(l<0?S:x)}return{p:c,f:u}}getWnafPrecomputes(e,r,n,o){let i=this.wnafPrecomputes.get(r),a=i?.find(s=>s.W===e&&s.bits===n);return a||(a=this.buildWnafTable(r,e,n),typeof o=="function"&&(a={...a,comp:o(a.comp)}),i||(i=[],this.wnafPrecomputes.set(r,i)),i.push(a)),a}assertPoint(e){if(!(e instanceof this.Point))throw new TypeError('"point" expected Point instance, got type='+typeof e)}validateMulInput(e,r){if(this.assertPoint(e),!g8(r,ap,this.Point.Fn.ORDER))throw new Error("invalid scalar")}runCT(e,r,n,o){let i=A8(e);return i===1?this.fixedWindowCT(e,r,n):this.wnafCachedCT(this.getWnafPrecomputes(i,e,n,o),r)}mulCT(e,r,n){return this.validateMulInput(e,r),this.runCT(e,r,this.bits,n)}mulCTBlinded(e,r,n){if(this.validateMulInput(e,r),this.randomBytes===void 0)throw new Error("randomBytes is required for scalar blinding");let o=this.Point.Fn.BITS+KC,i=this.randomBytes(E8);if(!fs(i)||i.length!==E8)throw new Error("randomBytes returned invalid byte array");i[0]=i[0]&63|128;let a=r+ni(i)*this.Point.Fn.ORDER;return this.runCT(e,a,o,n)}fixedWindowCT(e,r,n){let o=Gte,i=1<<o,a=op(o),s=new Array(i);s[0]=this.ZERO;for(let f=1;f<i;f++)s[f]=s[f-1].add(e);let c=Math.ceil(n/o),u=this.ZERO;for(let f=c-1;f>=0;f--){if(f!==c-1)for(let m=0;m<o;m++)u=u.double();let l=Number(r>>BigInt(f*o)&a),h=s[0];for(let m=1;m<i;m++)h=m===l?s[m]:h;u=u.add(h)}return{p:u,f:u}}shouldBlind(e,r){return this.randomBytes===void 0?!1:r===ap?!0:e!==this.BASE?!1:(this.baseCanBeBlinded===void 0&&(this.baseCanBeBlinded=this.mulUnsafe(this.BASE,this.Point.Fn.ORDER).is0()),this.baseCanBeBlinded)}mulSecret(e,r,n,o){return this.shouldBlind(e,n)?this.mulCTBlinded(e,r,o):this.mulCT(e,r,o)}mulUnsafe(e,r,n){if(this.assertPoint(e),!cs(r))throw new Error("invalid scalar");let o=A8(e);if(o===1||r>=this.Point.Fn.ORDER)return T1(this.Point,[e],[r],!0);let i=this.getWnafPrecomputes(o,e,this.bits,n);return this.wnafCachedCT(i,r).p}setWindowSize(e,r){this.assertPoint(e),Wte(r,this.bits);let n=Math.ceil((this.bits+KC)/r)+1;Vte(n*2**(r-1),this.Point.Fp.BYTES),WC.set(e,r),this.wnafPrecomputes.delete(e)}hasWindowSize(e){return A8(e)!==1}};function T1(t,e,r,n=!1){if(ds(t),GC(e,t),jr(n,"allowOversized"),Yte(r,t.Fn,n?t.Fn.ORDER**Hte:void 0),e.length!==r.length)throw new Error("arrays of points and scalars must have equal length");let o=e.map(a=>Zte(a,4)),i=r.map(a=>Jte(a,4));return Qte(t.ZERO,o,i)}function HC(t,e,r){if(e){if(e.ORDER!==t)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return md(e),e}else return yd(t,{isLE:r})}function B1(t,e,r={},n){if(t!=="weierstrass"&&t!=="edwards")throw new Error('expected curve type "weierstrass" or "edwards"');if(n===void 0&&(n=t==="edwards"),!e||typeof e!="object")throw new Error(`expected valid ${t} CURVE object`);Ur(r);for(let c of["p","n","h"]){let u=e[c];if(!(cs(u)&&u!==_8))throw new Error(`CURVE.${c} must be positive bigint`)}let o=HC(e.p,r.Fp,n),i=HC(e.n,r.Fn,n),s=["Gx","Gy","a",t==="weierstrass"?"b":"d"];for(let c of s)if(!o.isValid(e[c]))throw new Error(`CURVE.${c} must be valid field element of CURVE.Fp`);return e=Object.freeze(Object.assign({},e)),{CURVE:e,Fp:o,Fn:i}}function O1(t,e){return function(n){let o=t(n);return{secretKey:o,publicKey:e(o)}}}var P1=BigInt(0),R1=BigInt(1),C1=BigInt(2),ere=BigInt(4),VC=BigInt(8);function tre(t,e,r,n){let o=t.sqr(r),i=t.sqr(n),a=t.add(t.mul(e.a,o),i),s=t.add(t.ONE,t.mul(e.d,t.mul(o,i)));return t.eql(a,s)}function YC(t,e={}){Ur(e,{},{},"extraOpts");let r=e,n=B1("edwards",t,r,r.FpFnLE),{Fp:o,Fn:i}=n,a=n.CURVE,{h:s}=a;if(ip(o,a.a)!==1)throw new Error("edwards: CURVE.a must be a square in Fp for complete addition formulas");if(ip(o,a.d)!==-1)throw new Error("edwards: CURVE.d must be a non-square in Fp for complete addition formulas");Ur(r,{},{uvRatio:"function",randomBytes:"function"});let c=r.randomBytes===void 0?jc:r.randomBytes,u=C1<<BigInt(o.BYTES*8)-R1;function f(F){if(!o.isOdd)throw new Error("Field does not have .isOdd()");return o.isOdd(F)}let l=r.uvRatio===void 0?(F,B)=>{try{return{isValid:!0,value:o.sqrt(o.div(F,B))}}catch{return{isValid:!1,value:P1}}}:r.uvRatio;if(!tre(o,a,a.Gx,a.Gy))throw new Error("bad curve params: generator point");let h=o.eql(a.a,o.neg(o.ONE))?F=>o.neg(F):o.eql(a.a,o.ONE)?F=>F:F=>o.mul(a.a,F);function m(F,B,R=!1){let L=R?R1:P1;return pd("coordinate "+F,B,L,u),B}function x(F){if(!(F instanceof S))throw new Error("EdwardsPoint expected")}class S{static BASE=new S(a.Gx,a.Gy,o.ONE,o.mul(a.Gx,a.Gy));static ZERO=new S(o.ZERO,o.ONE,o.ONE,o.ZERO);static Fp=o;static Fn=i;X;Y;Z;T;constructor(B,R,L,T){this.X=m("x",B),this.Y=m("y",R),this.Z=m("z",L,!0),this.T=m("t",T),Object.freeze(this)}static CURVE(){return a}static fromAffine(B){if(B instanceof S)throw new Error("extended point not allowed");let{x:R,y:L}=B||{};return m("x",R),m("y",L),new S(R,L,o.ONE,o.mul(R,L))}static fromBytes(B,R=!1){let L=o.BYTES,{a:T,d:M}=a;B=np(Ee(B,L,"point")),jr(R,"zip215");let $=np(B),k=B[L-1];$[L-1]=k&-129;let v=Uc($),d=R?u:o.ORDER;pd("point.y",v,P1,d);let y=o.sqr(v),b=o.sub(y,o.ONE),g=o.sub(o.mulN(M,y),T),{isValid:A,value:E}=l(b,g);if(!A)throw new Error("bad point: invalid y coordinate");let w=f(E),_=(k&128)!==0;if(!R&&o.is0(E)&&_)throw new Error("bad point: x=0 and x_0=1");return _!==w&&(E=o.neg(E)),S.fromAffine({x:E,y:v})}static fromHex(B,R=!1){return S.fromBytes(ld(B),R)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(B=6,R=!0){return P.setWindowSize(this,B),R||this.multiply(C1),this}assertValidity(){let B=this,{a:R,d:L}=a;if(B.is0())throw new Error("bad point: ZERO");let{X:T,Y:M,Z:$,T:k}=B,v=o.sqr(T),d=o.sqr(M),y=o.sqr($),b=o.sqr(y),g=o.mul(v,R),A=o.mul(o.add(g,d),y),E=o.add(b,o.mul(L,o.mul(v,d)));if(!o.eql(A,E))throw new Error("bad point: equation left != right (1)");let w=o.mul(T,M),_=o.mul($,k);if(!o.eql(w,_))throw new Error("bad point: equation left != right (2)")}equals(B){x(B);let{X:R,Y:L,Z:T}=this,{X:M,Y:$,Z:k}=B,v=o.mul(R,k),d=o.mul(M,T),y=o.mul(L,k),b=o.mul($,T);return o.eql(v,d)&&o.eql(y,b)}is0(){return this.equals(S.ZERO)}negate(){return new S(o.neg(this.X),this.Y,this.Z,o.neg(this.T))}double(){let{X:B,Y:R,Z:L}=this,T=o.sqr(B),M=o.sqr(R),$=o.mul(o.sqr(L),C1),k=h(T),v=o.addN(B,R),d=o.sub(o.subN(o.sqr(v),T),M),y=o.addN(k,M),b=o.subN(y,$),g=o.subN(k,M),A=o.mul(d,b),E=o.mul(y,g),w=o.mul(d,g),_=o.mul(b,y);return new S(A,E,_,w)}add(B){x(B);let{d:R}=a,{X:L,Y:T,Z:M,T:$}=this,{X:k,Y:v,Z:d,T:y}=B,b=o.mul(L,k),g=o.mul(T,v),A=o.mul(o.mulN($,R),y),E=o.mul(M,d),w=o.sub(o.subN(o.mulN(o.addN(L,T),o.addN(k,v)),b),g),_=o.subN(E,A),p=o.addN(E,A),I=o.sub(g,h(b)),C=o.mul(w,_),j=o.mul(p,I),U=o.mul(w,I),D=o.mul(_,p);return new S(C,j,D,U)}subtract(B){return x(B),this.add(B.negate())}multiply(B){if(!i.isValidNot0(B))throw new RangeError("invalid scalar: expected 1 <= sc < curve.n");let{p:R,f:L}=P.mulSecret(this,B,s,O);return O([R,L])[0]}multiplyUnsafe(B){if(!i.isValid(B))throw new RangeError("invalid scalar: expected 0 <= sc < curve.n");return B===P1?S.ZERO:this.is0()||B===R1?this:P.mulUnsafe(this,B,O)}isSmallOrder(){return this.clearCofactor().is0()}isTorsionFree(){return P.mulUnsafe(this,a.n).is0()}toAffine(B){let R=this,L=B;if(L!=null&&typeof L!="bigint")throw new TypeError('"invertedZ" expected bigint, got type='+typeof L);let{X:T,Y:M,Z:$}=R,k=R.is0();L==null&&(L=k?o.create(VC):o.inv($));let v=o.mul(T,L),d=o.mul(M,L),y=o.mul($,L);if(k)return{x:o.ZERO,y:o.ONE};if(!o.eql(y,o.ONE))throw new Error("invZ was invalid");return{x:v,y:d}}clearCofactor(){return s===R1?this:s===C1?this.double():s===ere?this.double().double():s===VC?this.double().double().double():this.multiplyUnsafe(s)}toBytes(){let{x:B,y:R}=this.toAffine(),L=o.toBytes(R);return L[L.length-1]|=f(B)?128:0,L}toHex(){return tp(this.toBytes())}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}let O=F=>I1(S,F),P=new bd(S,c);return P.bits>=6&&S.BASE.precompute(6),Object.freeze(S.prototype),Object.freeze(S),S}function ZC(t,e,r={}){if(ds(t),typeof e!="function")throw new Error('"hash" function param is required');let n=e,o=r;Ur(o,{},{adjustScalarBytes:"function",randomBytes:"function",domain:"function",prehash:"function",zip215:"boolean",mapToCurve:"function",toMontgomery:"function",toMontgomerySecret:"function"});let{prehash:i}=o,{BASE:a,Fp:s,Fn:c}=t,u=n.outputLen,f=2*s.BYTES;if(u!==void 0&&(ra(u,"hash.outputLen"),u!==f))throw new Error(`hash.outputLen must be ${f}, got ${u}`);let l=o.randomBytes===void 0?jc:o.randomBytes,h=o.toMontgomery,m=o.toMontgomerySecret,x=o.adjustScalarBytes===void 0?g=>g:o.adjustScalarBytes,S=o.domain===void 0?(g,A,E)=>{if(jr(E,"phflag"),A.length||E)throw new Error("Contexts/pre-hash are not supported");return g}:o.domain;function O(g){return c.create(Uc(g))}function P(g){let A=k.secretKey;Ee(g,k.secretKey,"secretKey");let E=Ee(n(g),2*A,"hashedSecretKey"),w=x(E.slice(0,A)),_=E.slice(A,2*A),p=O(w);return{head:w,prefix:_,scalar:p}}function F(g){let{head:A,prefix:E,scalar:w}=P(g),_=a.multiply(w),p=_.toBytes();return{head:A,prefix:E,scalar:w,point:_,pointBytes:p}}function B(g){return F(g).pointBytes}function R(g=Uint8Array.of(),...A){let E=Ln(...A);return O(n(S(E,Ee(g,void 0,"context"),!!i)))}function L(g,A,E={}){Ur(E,{},{},"options"),g=np(Ee(g,void 0,"message")),i&&(g=i(g));let{prefix:w,scalar:_,pointBytes:p}=F(A),I=R(E.context,w,g),C=a.multiply(I).toBytes(),j=R(E.context,C,p,g),U=c.create(I+j*_);if(!c.isValid(U))throw new Error("sign failed: invalid s");let D=Ln(C,c.toBytes(U));return Ee(D,k.signature,"result")}let T={zip215:o.zip215};function M(g,A,E,w=T){Ur(w);let{context:_}=w,p=w.zip215===void 0?!!T.zip215:w.zip215,I=k.signature;g=Ee(g,I,"signature"),A=Ee(A,void 0,"message"),E=Ee(E,k.publicKey,"publicKey"),p!==void 0&&jr(p,"zip215"),i&&(A=i(A));let C=I/2,j=g.subarray(0,C),U=Uc(g.subarray(C,I)),D,z,q;try{D=t.fromBytes(E,p),z=t.fromBytes(j,p),q=a.multiplyUnsafe(U)}catch{return!1}if(!p&&D.isSmallOrder())return!1;let V=R(_,j,E,A);return z.add(D.multiplyUnsafe(V)).subtract(q).clearCofactor().is0()}let $=s.BYTES,k={secretKey:$,publicKey:$,signature:2*$,seed:$};function v(g){return g=g===void 0?l(k.seed):g,Ee(g,k.seed,"seed")}function d(g){return fs(g)&&g.length===k.secretKey}function y(g,A){try{return!!t.fromBytes(g,A===void 0?T.zip215:A)}catch{return!1}}let b={getExtendedPublicKey:F,randomSecretKey:v,isValidSecretKey:d,isValidPublicKey:y,toMontgomery(g){if(h===void 0)throw new Error("Montgomery conversion is not supported for this curve");return h(t.fromBytes(g))},toMontgomerySecret(g){if(m===void 0)throw new Error("Montgomery conversion is not supported for this curve");return m(g)}};return Object.freeze(k),Object.freeze(b),Object.freeze({keygen:O1(v,B),getPublicKey:B,sign:L,verify:M,utils:b,Point:t,lengths:k})}var I8=BigInt(1),JC=BigInt(2);var rre=BigInt(5),nre=BigInt(8),T8=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),ore={p:T8,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:nre,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function ire(t){let e=BigInt(10),r=BigInt(20),n=BigInt(40),o=BigInt(80),i=T8,s=t*t%i*t%i,c=Ge(s,JC,i)*s%i,u=Ge(c,I8,i)*t%i,f=Ge(u,rre,i)*u%i,l=Ge(f,e,i)*f%i,h=Ge(l,r,i)*l%i,m=Ge(h,n,i)*h%i,x=Ge(m,o,i)*m%i,S=Ge(x,o,i)*m%i,O=Ge(S,e,i)*f%i;return{pow_p_5_8:Ge(O,JC,i)*t%i,b2:s}}function eN(t){return t[0]&=248,t[31]&=127,t[31]|=64,t}var XC=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function are(t,e){let r=T8,n=Je(e*e*e,r),o=Je(n*n*e,r),i=ire(t*o).pow_p_5_8,a=Je(t*n*i,r),s=Je(e*a*a,r),c=a,u=Je(a*XC,r),f=s===t,l=s===Je(-t,r),h=s===Je(-t*XC,r);return f&&(a=c),(l||h)&&(a=u),DC(a,r)&&(a=Je(-a,r)),{isValid:f||l,value:a}}var B8=YC(ore,{uvRatio:are}),QC=B8.Fp;function sre(t){let{y:e}=t;return QC.toBytes(QC.div(I8+e,I8-e))}function cre(t){let e=B8.Fp.BYTES;return _r(t,e),eN(m8(t.subarray(0,e))).subarray(0,e)}function fre(t){return ZC(B8,m8,Object.assign({adjustScalarBytes:eN,toMontgomery:sre,toMontgomerySecret:cre,zip215:!0},t))}var tN=fre({});function N1(t){return Array.from(t,e=>e.toString(16).padStart(2,"0")).join("")}function rN(t){return`0x${N1(t)}`}var O8=new TextEncoder;var M1=t=>rN(t);function Dc(t,e){if(typeof t!="string"||!new RegExp(`^0x[0-9a-f]{${e*2}}$`).test(t))throw new TypeError(`expected canonical ${e}-byte hex`);return Uint8Array.from(t.slice(2).match(/../g)??[],r=>Number.parseInt(r,16))}function gd(t){if(typeof t!="string"||!/^(?=.{2,64}$)[a-z0-9]+(?:[._-][a-z0-9]+)*$/.test(t))throw new TypeError("invalid NEAR account id");return t}function sp(t,e){if(t===null||typeof t!="object"||Array.isArray(t)||Object.keys(t).length!==e.length||!e.every(r=>Object.hasOwn(t,r)))throw new TypeError("unexpected object fields")}Gw();var k1=class{oHash;iHash;blockLen;outputLen;canXOF=!1;finished=!1;destroyed=!1;constructor(e,r){if(p1(e),_r(r,void 0,"key"),this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("expected Hash instance");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let n=this.blockLen,o=new Uint8Array(n);o.set(r.length>n?e.create().update(r).digest():r);for(let i=0;i<o.length;i++)o[i]^=54;this.iHash.update(o),this.oHash=e.create();for(let i=0;i<o.length;i++)o[i]^=106;this.oHash.update(o),ri(o)}update(e){return ta(this),this.iHash.update(e),this}digestInto(e){ta(this),dd(e,this),this.finished=!0;let r=e.subarray(0,this.outputLen);this.iHash.digestInto(r),this.oHash.update(r),this.oHash.digestInto(r),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||=Object.create(Object.getPrototypeOf(this),{});let{oHash:r,iHash:n,finished:o,destroyed:i,blockLen:a,outputLen:s,canXOF:c}=this;return e=e,e.finished=o,e.destroyed=i,e.blockLen=a,e.outputLen=s,e.canXOF=c,e.oHash=r._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}},nN=(()=>{let t=((e,r,n)=>new k1(e,r).update(n).digest());return t.create=(e,r)=>new k1(e,r),t})();var ure=BigInt(0),P8=class extends Error{constructor(e=""){super(e)}},na={Err:P8,_tlv:{encode:(t,e)=>{let{Err:r}=na;if(ra(t,"tag"),t<0||t>255)throw new r("tlv.encode: wrong tag");if(BC(e,"data"),e.length&1)throw new r("tlv.encode: unpadded data");let n=e.length/2,o=rp(n);if(o.length/2&128)throw new r("tlv.encode: long form length too big");let i=n>127?rp(o.length/2|128):"";return rp(t)+i+o+e},decode(t,e){let{Err:r}=na;e=Ee(e,void 0,"DER data");let n=0;if(t<0||t>255)throw new r("tlv.decode: wrong tag");if(e.length<2||e[n++]!==t)throw new r("tlv.decode: wrong tlv");let o=e[n++],i=!!(o&128),a=0;if(!i)a=o;else{let c=o&127;if(!c)throw new r("tlv.decode(long): indefinite length not supported");if(c>4)throw new r("tlv.decode(long): byte length is too big");let u=e.subarray(n,n+c);if(u.length!==c)throw new r("tlv.decode: length bytes not complete");if(u[0]===0)throw new r("tlv.decode(long): zero leftmost byte");for(let f of u)a=a<<8|f;if(n+=c,a<128)throw new r("tlv.decode(long): not minimal encoding")}let s=e.subarray(n,n+a);if(s.length!==a)throw new r("tlv.decode: wrong value length");return{v:s,l:e.subarray(n+a)}}},_int:{encode(t){let{Err:e}=na;if(x1(t),t<ure)throw new e("integer: negative integers are not allowed");let r=rp(t);if(Number.parseInt(r[0],16)&8&&(r="00"+r),r.length&1)throw new e("unexpected DER parsing assertion: unpadded hex");return r},decode(t){let{Err:e}=na;if(t.length<1)throw new e("invalid signature integer: empty");if(t[0]&128)throw new e("invalid signature integer: negative");if(t.length>1&&t[0]===0&&!(t[1]&128))throw new e("invalid signature integer: unnecessary leading zero");return ni(t)}},toSig(t,e){let{Err:r,_int:n,_tlv:o}=na;if(e!==void 0&&(ra(e,"maxScalarBytes"),e<1))throw new r("invalid signature: maxScalarBytes must be positive");let i=Ee(t,void 0,"signature"),{v:a,l:s}=o.decode(48,i);if(s.length)throw new r("invalid signature: left bytes after parsing");let{v:c,l:u}=o.decode(2,a),{v:f,l}=o.decode(2,u);if(l.length)throw new r("invalid signature: left bytes after parsing");if(e!==void 0&&(c.length>e||f.length>e))throw new r("invalid signature: integer too large");return{r:n.decode(c),s:n.decode(f)}},hexFromSig(t){let{_tlv:e,_int:r}=na;Ur(t,{r:"bigint",s:"bigint"},{},"sig");let n=e.encode(2,r.encode(t.r)),o=e.encode(2,r.encode(t.s)),i=n+o;return e.encode(48,i)}},$1=(Object.freeze(na._tlv),Object.freeze(na._int),Object.freeze(na));var oN=(t,e)=>(t+(t>=0?e:-e)/iN)/e;function dre(t,e,r){pd("scalar",t,oa,r);let[[n,o],[i,a]]=e,s=oN(a*t,r),c=oN(-o*t,r),u=t-s*n-c*i,f=-s*o-c*a,l=u<oa,h=f<oa;l&&(u=-u),h&&(f=-f);let m=op(Math.ceil(hd(r)/2))+zc;if(u<oa||u>=m||f<oa||f>=m)throw new Error("splitScalar (endomorphism): failed for k");return{k1neg:l,k1:u,k2neg:h,k2:f}}function N8(t){if(!["compact","recovered","der"].includes(t))throw new Error('Signature format must be "compact", "recovered", or "der"');return t}function R8(t,e){Ur(t);let r={};for(let n of Object.keys(e))r[n]=t[n]===void 0?e[n]:t[n];return jr(r.lowS,"lowS"),jr(r.prehash,"prehash"),r.format!==void 0&&N8(r.format),r}var oa=BigInt(0),zc=BigInt(1),iN=BigInt(2),C8=BigInt(3),lre=BigInt(4);function aN(t,e={}){let r=B1("weierstrass",t,e),n=r.Fp,o=r.Fn,i=r.CURVE,{h:a,n:s}=i;Ur(e,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",randomBytes:"function"});let{endo:c,allowInfinityPoint:u,clearCofactor:f,isTorsionFree:l,fromBytes:h,toBytes:m}=e,x=e.randomBytes===void 0?jc:e.randomBytes;if(c&&(!n.is0(i.a)||typeof c.beta!="bigint"||!Array.isArray(c.basises)))throw new Error('invalid endo: expected "beta": bigint and "basises": array');let S=c?{beta:c.beta,basises:c.basises.map(I=>[...I])}:void 0,O=cN(n,o);function P(){if(!n.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}function F(I,C,j){if(C.is0()){if(!u)throw new Error("bad point: ZERO");return Uint8Array.of(0)}let{x:U,y:D}=C.toAffine(),z=n.toBytes(U);if(jr(j,"isCompressed"),j){P();let q=!n.isOdd(D);return Ln(sN(q),z)}else return Ln(Uint8Array.of(4),z,n.toBytes(D))}function B(I){Ee(I,void 0,"Point");let{publicKey:C,publicKeyUncompressed:j}=O,U=I.length,D=I[0],z=I.subarray(1);if(u&&U===1&&D===0)return{x:n.ZERO,y:n.ZERO};if(U===C&&(D===2||D===3)){let q=n.fromBytes(z);if(!n.isValid(q))throw new Error("bad point: is not on curve, wrong x");let V=$(q),W;try{W=n.sqrt(V)}catch(X){let ee=X instanceof Error?": "+X.message:"";throw new Error("bad point: is not on curve, sqrt error"+ee)}P();let Y=n.isOdd(W);return(D&1)===1!==Y&&(W=n.neg(W)),{x:q,y:W}}else if(U===j&&D===4){let q=n.BYTES,V=n.fromBytes(z.subarray(0,q)),W=n.fromBytes(z.subarray(q,q*2));if(!k(V,W))throw new Error("bad point: is not on curve");return{x:V,y:W}}else throw new Error(`bad point: got length ${U}, expected compressed=${C} or uncompressed=${j}`)}let R=m===void 0?F:m,L=h===void 0?B:h,T=n.mul(i.b,C8),M=n.is0(i.a)?I=>n.ZERO:I=>n.mul(i.a,I);function $(I){let C=n.sqr(I),j=n.mul(C,I);return n.add(n.add(j,n.mul(I,i.a)),i.b)}function k(I,C){let j=n.sqr(C),U=$(I);return n.eql(j,U)}if(!k(i.Gx,i.Gy))throw new Error("bad curve params: generator point");let v=n.mul(n.pow(i.a,C8),lre),d=n.mul(n.sqr(i.b),BigInt(27));if(n.is0(n.add(v,d)))throw new Error("bad curve params: a or b");function y(I,C,j=!1){if(!n.isValid(C)||j&&n.is0(C))throw new Error(`bad point coordinate ${I}`);return typeof C=="object"&&C!==null?n.create(C):C}function b(I){if(!(I instanceof w))throw new Error("Weierstrass Point expected")}function g(I){if(!S||!S.basises)throw new Error("no endo");return dre(I,S.basises,o.ORDER)}function A(I,C,j,U){if(!o.isValid(U))throw new RangeError("invalid scalar: out of range");if(S){let{k1neg:D,k1:z,k2neg:q,k2:V}=g(U),W=new w(n.mul(j.X,S.beta),j.Y,j.Z);I.push(D?j.negate():j,q?W.negate():W),C.push(z,V)}else I.push(j),C.push(U)}let E=new WeakSet;class w{static BASE=new w(i.Gx,i.Gy,n.ONE);static ZERO=new w(n.ZERO,n.ONE,n.ZERO);static Fp=n;static Fn=o;X;Y;Z;constructor(C,j,U){this.X=y("x",C),this.Y=y("y",j,!0),this.Z=y("z",U),Object.freeze(this)}static CURVE(){return i}static fromAffine(C){let{x:j,y:U}=C||{};if(!C||!n.isValid(j)||!n.isValid(U))throw new Error("invalid affine point");if(C instanceof w)throw new Error("projective point not allowed");return n.is0(j)&&n.is0(U)?w.ZERO:new w(j,U,n.ONE)}static fromBytes(C){let j=w.fromAffine(L(Ee(C,void 0,"point")));return j.assertValidity(),j}static fromHex(C){return w.fromBytes(ld(C))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(C=6,j=!0){return p.setWindowSize(this,C),j||this.multiply(C8),this}assertValidity(){let C=this;if(C.is0()){if(u&&n.is0(C.X)&&n.eql(C.Y,n.ONE)&&n.is0(C.Z))return;throw new Error("bad point: ZERO")}if(E.has(C))return;let{x:j,y:U}=C.toAffine();if(!n.isValid(j)||!n.isValid(U))throw new Error("bad point: x or y not field elements");if(!k(j,U))throw new Error("bad point: equation left != right");if(!C.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");E.add(C)}hasEvenY(){let{y:C}=this.toAffine();if(!n.isOdd)throw new Error("Field doesn't support isOdd");return!n.isOdd(C)}equals(C){b(C);let{X:j,Y:U,Z:D}=this,{X:z,Y:q,Z:V}=C,W=n.eql(n.mul(j,V),n.mul(z,D)),Y=n.eql(n.mul(U,V),n.mul(q,D));return W&&Y}negate(){return new w(this.X,n.neg(this.Y),this.Z)}double(){let{X:C,Y:j,Z:U}=this,D=n.ZERO,z=n.ZERO,q=n.ZERO,V=n.mul(C,C),W=n.mul(j,j),Y=n.mul(U,U),J=n.mul(C,j);return J=n.add(J,J),q=n.mul(C,U),q=n.add(q,q),D=M(q),z=n.mul(T,Y),z=n.add(D,z),D=n.sub(W,z),z=n.add(W,z),z=n.mul(D,z),D=n.mul(J,D),q=n.mul(T,q),Y=M(Y),J=n.sub(V,Y),J=M(J),J=n.add(J,q),q=n.add(V,V),V=n.add(q,V),V=n.add(V,Y),V=n.mul(V,J),z=n.add(z,V),Y=n.mul(j,U),Y=n.add(Y,Y),V=n.mul(Y,J),D=n.sub(D,V),q=n.mul(Y,W),q=n.add(q,q),q=n.add(q,q),new w(D,z,q)}add(C){b(C);let{X:j,Y:U,Z:D}=this,{X:z,Y:q,Z:V}=C,W=n.ZERO,Y=n.ZERO,J=n.ZERO,X=n.mul(j,z),ee=n.mul(U,q),se=n.mul(D,V),ne=n.add(j,U),re=n.add(z,q);ne=n.mul(ne,re),re=n.add(X,ee),ne=n.sub(ne,re),re=n.add(j,D);let be=n.add(z,V);return re=n.mul(re,be),be=n.add(X,se),re=n.sub(re,be),be=n.add(U,D),W=n.add(q,V),be=n.mul(be,W),W=n.add(ee,se),be=n.sub(be,W),J=M(re),W=n.mul(T,se),J=n.add(W,J),W=n.sub(ee,J),J=n.add(ee,J),Y=n.mul(W,J),ee=n.add(X,X),ee=n.add(ee,X),se=M(se),re=n.mul(T,re),ee=n.add(ee,se),se=n.sub(X,se),se=M(se),re=n.add(re,se),X=n.mul(ee,re),Y=n.add(Y,X),X=n.mul(be,re),W=n.mul(ne,W),W=n.sub(W,X),X=n.mul(ne,ee),J=n.mul(be,J),J=n.add(J,X),new w(W,Y,J)}subtract(C){return b(C),this.add(C.negate())}is0(){return this.equals(w.ZERO)}multiply(C){if(!o.isValidNot0(C))throw new RangeError("invalid scalar: out of range");let{p:j,f:U}=p.mulSecret(this,C,a,_);return _([j,U])[0]}multiplyUnsafe(C){let j=this,U=C;if(!o.isValid(U))throw new RangeError("invalid scalar: out of range");if(U===oa||j.is0())return w.ZERO;if(U===zc)return j;if(p.hasWindowSize(this))return p.mulUnsafe(j,U,_);let D=[],z=[];return A(D,z,j,U),T1(w,D,z)}mulAddUnsafe(C,j,U){b(j);let D=[],z=[];return A(D,z,this,C),A(D,z,j,U),T1(w,D,z)}toAffine(C){let j=this,U=C;if(U!=null&&!n.isValid(U))throw new RangeError('"invertedZ" expected valid field element');let{X:D,Y:z,Z:q}=j;if(n.eql(q,n.ONE))return{x:D,y:z};let V=j.is0();U==null&&(U=V?n.ONE:n.inv(q));let W=n.mul(D,U),Y=n.mul(z,U),J=n.mul(q,U);if(V)return{x:n.ZERO,y:n.ZERO};if(!n.eql(J,n.ONE))throw new Error("invZ was invalid");return{x:W,y:Y}}isTorsionFree(){return a===zc?!0:l?l(w,this):p.mulUnsafe(this,s).is0()}clearCofactor(){return a===zc?this:f?f(w,this):this.multiplyUnsafe(a)}isSmallOrder(){return a===zc?this.is0():this.clearCofactor().is0()}toBytes(C=!0){return jr(C,"isCompressed"),this.assertValidity(),R(w,this,C)}toHex(C=!0){return tp(this.toBytes(C))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}let _=I=>I1(w,I),p=new bd(w,x);return p.bits>=6&&w.BASE.precompute(6),Object.freeze(w.prototype),Object.freeze(w),w}function sN(t){return Uint8Array.of(t?2:3)}function cN(t,e){return{secretKey:e.BYTES,publicKey:1+t.BYTES,publicKeyUncompressed:1+2*t.BYTES,publicKeyHasPrefix:!0,signature:2*e.BYTES}}function pre(t,e={}){ds(t);let{Fn:r}=t,n=e.randomBytes===void 0?jc:e.randomBytes,o=Object.assign(cN(t.Fp,r),{seed:Math.max(_1(r.ORDER),16)});function i(m){try{let x=r.fromBytes(m);return r.isValidNot0(x)}catch{return!1}}function a(m,x){let{publicKey:S,publicKeyUncompressed:O}=o;try{let P=m.length;return x===!0&&P!==S||x===!1&&P!==O?!1:!t.fromBytes(m).is0()}catch{return!1}}function s(m){return m=m===void 0?n(o.seed):m,S1(Ee(m,o.seed,"seed"),r.ORDER)}function c(m,x=!0){return t.BASE.multiply(r.fromBytes(m)).toBytes(x)}function u(m){let{secretKey:x,publicKey:S,publicKeyUncompressed:O}=o,P=r._lengths;if(!fs(m))return;let F=Ee(m,void 0,"key").length,B=F===S||F===O,R=F===x||!!P?.includes(F);if(!(B&&R))return B}function f(m,x,S=!0){if(u(m)===!0)throw new Error("first arg must be private key");if(u(x)===!1)throw new Error("second arg must be public key");let O=r.fromBytes(m),P=t.fromBytes(x);if(P.is0())throw new Error("invalid public key: point at infinity");return P.multiply(O).toBytes(S)}let l={isValidSecretKey:i,isValidPublicKey:a,randomSecretKey:s},h=O1(s,c);return Object.freeze(l),Object.freeze(o),Object.freeze({getPublicKey:c,getSharedSecret:f,keygen:h,Point:t,utils:l,lengths:o})}function fN(t,e,r={}){ds(t);let n=e;p1(n),Ur(r,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});let o=Object.assign({},r),i=o.randomBytes===void 0?jc:o.randomBytes,a=o.hmac===void 0?(I,C)=>nN(n,I,C):o.hmac,{Fp:s,Fn:c}=t,{ORDER:u,BITS:f}=c,l=_1(u),h=S8(i,l),{keygen:m,getPublicKey:x,getSharedSecret:S,utils:O,lengths:P}=pre(t,o),F={prehash:!0,lowS:typeof o.lowS=="boolean"?o.lowS:!0,format:"compact",extraEntropy:!1},B=u*iN+zc<s.ORDER;function R(I){let C=u>>zc;return I>C}function L(I,C){if(!c.isValidNot0(C))throw new Error(`invalid signature ${I}: out of range 1..Point.Fn.ORDER`);return C}function T(){if(!s.isOdd)throw new Error("Field doesn't support isOdd")}function M(I,C,j){return T(),(I===j?0:2)|Number(s.isOdd(C))}function $(){if(B)throw new Error('"recovered" sig type is not supported for cofactor >2 curves')}function k(I,C){N8(C);let j=P.signature,U=C==="compact"?j:C==="recovered"?j+1:void 0;return Ee(I,U)}class v{r;s;recovery;constructor(C,j,U){if(this.r=L("r",C),this.s=L("s",j),U!=null){if($(),![0,1,2,3].includes(U))throw new Error("invalid recovery id");this.recovery=U}Object.freeze(this)}static fromBytes(C,j=F.format){k(C,j);let U;if(j==="der"){if(C.length>2*c.BYTES+16)throw new $1.Err("invalid signature: DER signature too long");let{r:V,s:W}=$1.toSig(Ee(C),c.BYTES+1);return new v(V,W)}j==="recovered"&&(U=C[0],j="compact",C=C.subarray(1));let D=P.signature/2,z=C.subarray(0,D),q=C.subarray(D,D*2);return new v(c.fromBytes(z),c.fromBytes(q),U)}static fromHex(C,j){return this.fromBytes(ld(C),j)}assertRecovery(){let{recovery:C}=this;if(C==null)throw new Error("invalid recovery id: must be present");return C}addRecoveryBit(C){return new v(this.r,this.s,C)}recoverPublicKey(C){let{r:j,s:U}=this,D=this.assertRecovery(),z=D===2||D===3?j+u:j;if(!s.isValid(z))throw new Error("invalid recovery id: sig.r+curve.n != R.x");let q=s.toBytes(z),V=t.fromBytes(Ln(sN((D&1)===0),q)),W=c.inv(z),Y=y(Ee(C,void 0,"msgHash")),J=c.create(-Y*W),X=c.create(U*W),ee=t.BASE.mulAddUnsafe(J,V,X);if(ee.is0())throw new Error("invalid recovery: point at infinify");return ee.assertValidity(),ee}hasHighS(){return R(this.s)}toBytes(C=F.format){if(N8(C),C==="der")return ld($1.hexFromSig(this));let{r:j,s:U}=this,D=c.toBytes(j),z=c.toBytes(U);return C==="recovered"?($(),Ln(Uint8Array.of(this.assertRecovery()),D,z)):Ln(D,z)}toHex(C){return tp(this.toBytes(C))}}Object.freeze(v.prototype),Object.freeze(v);let d=o.bits2int===void 0?function(C){if(C.length>8192)throw new Error("input is too large");let j=ni(C),U=C.length*8-f;return U>0?j>>BigInt(U):j}:o.bits2int,y=o.bits2int_modN===void 0?function(C){return c.create(d(C))}:o.bits2int_modN,b=op(f);function g(I){return pd("num < 2^"+f,I,oa,b),c.toBytes(I)}function A(I,C){return Ee(I,void 0,"message"),C?Ee(n(I),void 0,"prehashed message"):I}function E(I,C,j){let{lowS:U,prehash:D,extraEntropy:z}=R8(j,F);I=A(I,D);let q=y(I),V=c.fromBytes(C);if(!c.isValidNot0(V))throw new Error("invalid private key");let W=[g(V),g(q)];if(z!=null&&z!==!1){let ee=z===!0?i(P.secretKey):z;W.push(Ee(ee,void 0,"extraEntropy"))}let Y=Ln(...W),J=q;function X(ee){let se=d(ee);if(!c.isValidNot0(se))return;let ne=t.BASE.multiply(se).toAffine(),re=c.create(ne.x);if(re===oa)return;let be;if(h!==void 0){let Bn=ni(S1(h(l),u)),Te=c.inv(c.mul(Bn,se)),Be=c.mul(Bn,J),On=c.mul(Bn,V);be=c.create(Te*c.create(Be+On*re))}else{let Bn=LC(se,u);be=c.create(Bn*c.create(J+re*V))}if(be===oa)return;let Ie=M(ne.x,ne.y,re),Ne=be;return U&&R(be)&&(Ne=c.neg(be),Ie^=1),new v(re,Ne,B?void 0:Ie)}return{seed:Y,k2sig:X}}function w(I,C,j={}){let{seed:U,k2sig:D}=E(I,C,j);return PC(n.outputLen,c.BYTES,a)(U,D).toBytes(j.format)}function _(I,C,j,U={}){let{lowS:D,prehash:z,format:q}=R8(U,F);if(j=Ee(j,void 0,"publicKey"),C=A(C,z),!fs(I)){let V=I instanceof v?", use sig.toBytes()":"";throw new Error("verify expects Uint8Array signature"+V)}k(I,q);try{let V=v.fromBytes(I,q),W=t.fromBytes(j);if(W.is0()||D&&V.hasHighS())return!1;let{r:Y,s:J}=V,X=y(C),ee=c.inv(J),se=c.create(X*ee),ne=c.create(Y*ee),re=t.BASE.mulAddUnsafe(se,W,ne);if(re.is0())return!1;let be=re.toAffine();return!(c.create(be.x)!==Y||q==="recovered"&&V.recovery!==M(be.x,be.y,Y))}catch{return!1}}function p(I,C,j={}){let{prehash:U}=R8(j,F);return C=A(C,U),v.fromBytes(I,"recovered").recoverPublicKey(C).toBytes()}return Object.freeze({keygen:m,getPublicKey:x,getSharedSecret:S,utils:O,lengths:P,Point:t,sign:w,verify:_,recoverPublicKey:p,Signature:v,hash:n})}var k8={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},hre={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]};var uN=BigInt(2);function mre(t){let e=k8.p,r=BigInt(3),n=BigInt(6),o=BigInt(11),i=BigInt(22),a=BigInt(23),s=BigInt(44),c=BigInt(88),u=t*t*t%e,f=u*u*t%e,l=Ge(f,r,e)*f%e,h=Ge(l,r,e)*f%e,m=Ge(h,uN,e)*u%e,x=Ge(m,o,e)*m%e,S=Ge(x,i,e)*x%e,O=Ge(S,s,e)*S%e,P=Ge(O,c,e)*O%e,F=Ge(P,s,e)*S%e,B=Ge(F,r,e)*f%e,R=Ge(B,a,e)*x%e,L=Ge(R,n,e)*u%e,T=Ge(L,uN,e);if(!M8.eql(M8.sqr(T),t))throw new Error("Cannot find square root");return T}var M8=yd(k8.p,{sqrt:mre}),yre=aN(k8,{Fp:M8,endo:hre}),F1=fN(yre,IC);var bre=BigInt(0),cp=BigInt(1),gre=BigInt(2),vre=BigInt(7),xre=BigInt(256),wre=BigInt(113),pN=[],hN=[],mN=[];for(let t=0,e=cp,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],pN.push(2*(5*n+r)),hN.push((t+1)*(t+2)/2%64);let o=bre;for(let i=0;i<7;i++)e=(e<<cp^(e>>vre)*wre)%xre,e&gre&&(o^=cp<<(cp<<BigInt(i))-cp);mN.push(o)}var yN=u1(mN,!0),Ere=yN[0],Are=yN[1],_re=(t,e,r)=>t<<r|e>>>32-r,Sre=(t,e,r)=>e<<r|t>>>32-r,Ire=(t,e,r)=>e<<r-32|t>>>64-r,Tre=(t,e,r)=>t<<r-32|e>>>64-r,dN=(t,e,r)=>r>32?Ire(t,e,r):_re(t,e,r),lN=(t,e,r)=>r>32?Tre(t,e,r):Sre(t,e,r),vd=new Uint32Array(10);function Bre(t,e=24){if(!(t instanceof Uint32Array))throw new TypeError('"s" expected Uint32Array(50), got type='+typeof t);if(t.length!==50)throw new RangeError('"s" expected Uint32Array(50), got length='+t.length);if(mr(e,"rounds"),e<1||e>24)throw new Error('"rounds" expected integer 1..24');for(let r=24-e;r<24;r++){for(let i=0;i<10;i++)vd[i]=t[i]^t[i+10]^t[i+20]^t[i+30]^t[i+40];for(let i=0;i<10;i+=2){let a=(i+8)%10,s=(i+2)%10,c=vd[s],u=vd[s+1],f=dN(c,u,1)^vd[a],l=lN(c,u,1)^vd[a+1];for(let h=0;h<50;h+=10)t[i+h]^=f,t[i+h+1]^=l}let n=t[2],o=t[3];for(let i=0;i<24;i++){let a=hN[i],s=dN(n,o,a),c=lN(n,o,a),u=pN[i];n=t[u],o=t[u+1],t[u]=s,t[u+1]=c}for(let i=0;i<50;i+=10){let a=t[i],s=t[i+1],c=t[i+2],u=t[i+3];t[i]^=~t[i+2]&t[i+4],t[i+1]^=~t[i+3]&t[i+5],t[i+2]^=~t[i+4]&t[i+6],t[i+3]^=~t[i+5]&t[i+7],t[i+4]^=~t[i+6]&t[i+8],t[i+5]^=~t[i+7]&t[i+9],t[i+6]^=~t[i+8]&a,t[i+7]^=~t[i+9]&s,t[i+8]^=~a&c,t[i+9]^=~s&u}t[0]^=Ere[r],t[1]^=Are[r]}ri(vd)}var $8=class t{state;pos=0;posOut=0;finished=!1;state32;destroyed=!1;blockLen;suffix;outputLen;canXOF;enableXOF=!1;rounds;constructor(e,r,n,o=!1,i=24){if(mr(e,"blockLen"),mr(r,"suffix"),mr(i,"rounds"),bC(o,"enableXOF"),this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=o,this.canXOF=o,this.rounds=i,mr(n,"outputLen"),!(0<e&&e<200))throw new Error('"blockLen" must be 1..199');this.state=new Uint8Array(200),this.state32=c8(this.state)}clone(){return this._cloneInto()}keccak(){f8(this.state32),Bre(this.state32,this.rounds),f8(this.state32),this.posOut=0,this.pos=0}update(e){ta(this),_r(e);let{blockLen:r,state:n,state32:o}=this,i=e.length,a=r%4===0&&e.byteOffset%4===0,s=r/4,c=a&&i>=r?c8(e):void 0;for(let u=0;u<i;){if(c!==void 0&&this.pos===0&&u%4===0&&i-u>=r){for(let l=0,h=u/4;l<s;l++)o[l]^=c[h+l];u+=r,this.pos=r,this.keccak();continue}let f=Math.min(r-this.pos,i-u);for(let l=0;l<f;l++)n[this.pos++]^=e[u++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:r,pos:n,blockLen:o}=this;e[n]^=r,(r&128)!==0&&n===o-1&&this.keccak(),e[o-1]^=128,this.keccak()}writeInto(e){ta(this,!1),_r(e),this.finish();let r=this.state,{blockLen:n}=this;for(let o=0,i=e.length;o<i;){this.posOut>=n&&this.keccak();let a=Math.min(n-this.posOut,i-o);e.set(r.subarray(this.posOut,this.posOut+a),o),this.posOut+=a,o+=a}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not enabled");return this.writeInto(e)}xof(e){return mr(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(dd(e,this),this.finished)throw new Error("digest() was already called");this.writeInto(e.length===this.outputLen?e:e.subarray(0,this.outputLen)),this.destroy()}digest(){let e=new Uint8Array(this.outputLen);return this.digestInto(e),e}destroy(){this.destroyed=!0,ri(this.state)}_cloneInto(e){let{blockLen:r,suffix:n,outputLen:o,rounds:i,enableXOF:a}=this;return e||=new t(r,n,o,a,i),e.blockLen=r,e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=o,e.enableXOF=a,e.canXOF=this.canXOF,e.destroyed=this.destroyed,e}},Ore=(t,e,r,n={})=>Q0(()=>new $8(e,t,r),n);var F8=Ore(1,136,32);var bN=new TextEncoder,gN=(...t)=>Uint8Array.from(t.flatMap(e=>Array.from(e)));function vN(t,e,r){return Pre(t,e)===r.toLowerCase()}function Pre(t,e){if(e.length!==65||e[64]!==27&&e[64]!==28||BigInt(`0x${N1(e.subarray(32,64))}`)>F1.Point.Fn.ORDER/2n)return null;let n=bN.encode(t),o=F8(gN(bN.encode(`Ethereum Signed Message:
|
|
64
|
+
${n.length}`),n));try{let i=gN(new Uint8Array([(e[64]??27)-27]),e.subarray(0,64)),a=F1.Point.fromBytes(F1.recoverPublicKey(i,o,{prehash:!1}));return`0x${N1(F8(a.toBytes(!1).subarray(1)).subarray(12))}`}catch{return null}}function fp(t){sp(t,["kind","id"]);let{kind:e,id:r}=t;if(typeof r!="string")throw new TypeError("invalid identity id");if(e==="near")return{kind:e,id:gd(r)};if(e==="evm"){let n=r.toLowerCase();return Dc(n,20),{kind:e,id:n}}if(e==="solana"){let n;if(/^[a-fA-F0-9]{64}$/.test(r))n=Dc(`0x${r.toLowerCase()}`,32);else{if(r.length<32||r.length>44)throw new TypeError("invalid Solana key");if(n=o0.decode(r),n.length!==32||o0.encode(n)!==r)throw new TypeError("invalid Solana key")}return{kind:e,id:M1(n).slice(2)}}throw new TypeError("unknown identity kind")}function xN(t,e,r,n){try{let o=fp(t);if(typeof e!="string"||e.includes("\r")||e.endsWith(`
|
|
65
|
+
`))return!1;if(o.kind==="near")return r===void 0&&n===o.id;if(sp(r,["kind","sig"]),r.kind!==o.kind)return!1;let i=Dc(r.sig,o.kind==="evm"?65:64);return o.kind==="evm"?vN(e,i,o.id):tN.verify(i,O8.encode(e),Dc(`0x${o.id}`,32),{zip215:!1})}catch{return!1}}function EN(t,e){let r="provider"in t?t.provider:t,n=fp({kind:"evm",id:e}),o=n8({chain:c1,transport:o8(r)}),i=async()=>{let a=await r.request({method:"eth_accounts"});if(!Array.isArray(a)||!a.some(s=>typeof s=="string"&&s.toLowerCase()===n.id))throw new ns("wrong_identity","wallet does not control the selected identity")};return{identity:n,address:n.id,async authorize(a){await i();let c={kind:"evm",sig:await o.signMessage({account:n.id,message:a})};if(!xN(n,a,c))throw new ns("invalid_signature","wallet signature does not match identity");return c},async signTypedData(a){return await i(),o.signTypedData({...a,account:n.id})}}}Object.assign(globalThis,{Buffer:uw.Buffer});var jRe=document.getElementById("pair"),URe=document.getElementById("action"),uc=document.getElementById("status"),Em=document.getElementById("approve"),DRe=document.getElementById("near-wallet"),FJ=document.getElementById("near-wallet-hot"),zRe=new Map([["near:mainnet","mainnet"],["near:testnet","testnet"]]),KRe={mainnet:"https://free.rpc.fastnear.com",testnet:"https://test.rpc.fastnear.com"},qRe=new Map([["meteor-wallet",{name:"Meteor Wallet",networks:["mainnet","testnet"]}],["hot-wallet",{name:"HOT Wallet",networks:["mainnet"]}]]),fw=new URLSearchParams(location.hash.slice(1)),_T=location.pathname==="/callback",Am=_T?"":location.hash.slice(1);history.replaceState(null,"",location.pathname);var lw=async(t,e)=>{let r=await fetch(t,{method:"POST",headers:{authorization:`Bearer ${Am}`,"content-type":"application/json"},cache:"no-store",credentials:"omit",redirect:"error",body:JSON.stringify(e??{})});if(!r.ok)throw new Error("Session expired or wallet result rejected. Return to the terminal.");return r.json()},AT=new Set,dw=new Map,fc;_T?(window.opener?.postMessage({type:"annon-wallet-result",state:fw.get("state"),result:{accountId:fw.get("accountId"),publicKey:fw.get("publicKey"),signature:fw.get("signature")}},location.origin),uc.textContent="Proof returned to the approval window. Return to your terminal."):window.addEventListener("message",t=>{if(t.origin!==location.origin||t.data?.type!=="annon-wallet-result")return;let e=dw.get(t.data.state);e&&(dw.delete(t.data.state),lw("/api/result",{id:e,result:t.data.result}).then(()=>{uc.textContent="Proof verified. Return to your terminal."}).catch(r=>{uc.textContent=r.message}))});async function LJ(){if(!Am){uc.textContent="Open the exact URL printed by your CLI.";return}try{let t=await lw("/api/action");jRe.textContent=`Pairing code: ${t.pairingCode}. Match this with your terminal.`,fc=t.action??void 0,URe.textContent=fc?JSON.stringify(fc,null,2):"Waiting for the CLI\u2026",Em.disabled=!fc||AT.has(fc.id),FJ&&(FJ.disabled=fc?.chain?.startsWith("near:")===!0&&fc.chain!=="near:mainnet"),setTimeout(()=>{LJ()},1e3)}catch(t){uc.textContent=t.message,Am="",Em.disabled=!0}}Em.onclick=async()=>{let t=fc;if(!(!t||AT.has(t.id)||Date.now()>=t.expiresAt)){AT.add(t.id),Em.disabled=!0;try{let e;if(t.operation.startsWith("evm.")){let r=window.ethereum;if(!r)throw new Error("Install an injected EVM wallet.");let n=await r.request({method:"eth_requestAccounts"}),o=t.account||n[0];if(!o)throw new Error("No account");let i=await r.request({method:"eth_chainId"});if(`eip155:${BigInt(String(i))}`!==t.chain)throw new Error(`Select ${t.chain} in your wallet.`);let a=EN(r,o.toLowerCase());e=t.operation==="evm.personalSign"?{signature:(await a.authorize(t.payload.message))?.sig??"",account:a.identity.id}:{signature:await a.signTypedData(t.payload)}}else{let r=zRe.get(t.chain);if(!r)throw new Error(`Browser NEAR wallets support near:mainnet and near:testnet, not ${t.chain}.`);let n=DRe?.value||"meteor-wallet",o=qRe.get(n);if(!o)throw new Error("Unknown NEAR wallet");if(!o.networks.includes(r))throw new Error(`${o.name} is offered for near:mainnet only. Pick Meteor Wallet.`);let[{setupWalletSelector:i},a]=await Promise.all([Promise.resolve().then(()=>(qv(),$z)),n==="hot-wallet"?Promise.resolve().then(()=>(PV(),OV)).then(l=>l.setupHotWallet()):Promise.resolve().then(()=>($J(),kJ)).then(l=>l.setupMeteorWallet())]),c=await(await i({network:r,fallbackRpcUrls:[KRe[r]],modules:[a]})).wallet(n),u=await e7(c),f=t.account||u[0]?.accountId;if(!f||!u.some(l=>l.accountId===f))throw new Error("Select the requested NEAR account.");if(t.operation==="near.nep413"){if(!c.signMessage)throw new Error("NEP-413 unavailable");let l=t.payload,h=crypto.randomUUID();dw.set(h,t.id);let m=await c.signMessage({...l,nonce:uw.Buffer.from(l.nonce),state:h});if(!m)return;dw.delete(h),e=m}else{let l=t.payload,h=await c.signAndSendTransaction({signerId:f,receiverId:l.receiverId,actions:[{functionCall:{methodName:l.method,args:uw.Buffer.from(JSON.stringify(l.args)),gas:BigInt(l.gas),deposit:BigInt(l.deposit)}}]});if(!h)return;e={txHash:h.transaction.hash}}}await lw("/api/result",{id:t.id,result:e}),uc.textContent="Verified. Return to the terminal."}catch(e){uc.textContent=e.message}finally{Em.disabled=!0}}};_T||(async()=>{Am||(Am=(await lw("/api/bootstrap")).capability),await LJ()})().catch(t=>{uc.textContent=t.message});})();
|
|
66
|
+
/*! Bundled license information:
|
|
67
|
+
|
|
68
|
+
ieee754/index.js:
|
|
69
|
+
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
70
|
+
|
|
71
|
+
buffer/index.js:
|
|
72
|
+
(*!
|
|
73
|
+
* The buffer module from node.js, for the browser.
|
|
74
|
+
*
|
|
75
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
76
|
+
* @license MIT
|
|
77
|
+
*)
|
|
78
|
+
|
|
79
|
+
@scure/base/index.js:
|
|
80
|
+
@scure/base/lib/esm/index.js:
|
|
81
|
+
@scure/base/lib/index.js:
|
|
82
|
+
(*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
83
|
+
|
|
84
|
+
@noble/hashes/esm/utils.js:
|
|
85
|
+
@noble/hashes/esm/utils.js:
|
|
86
|
+
@noble/hashes/utils.js:
|
|
87
|
+
(*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
88
|
+
|
|
89
|
+
@noble/curves/esm/abstract/utils.js:
|
|
90
|
+
@noble/curves/esm/abstract/modular.js:
|
|
91
|
+
@noble/curves/esm/abstract/curve.js:
|
|
92
|
+
@noble/curves/esm/abstract/weierstrass.js:
|
|
93
|
+
@noble/curves/esm/_shortw_utils.js:
|
|
94
|
+
@noble/curves/esm/secp256k1.js:
|
|
95
|
+
@noble/curves/esm/abstract/utils.js:
|
|
96
|
+
@noble/curves/esm/abstract/modular.js:
|
|
97
|
+
@noble/curves/esm/abstract/curve.js:
|
|
98
|
+
@noble/curves/esm/abstract/edwards.js:
|
|
99
|
+
@noble/curves/esm/ed25519.js:
|
|
100
|
+
@noble/curves/abstract/utils.js:
|
|
101
|
+
@noble/curves/abstract/modular.js:
|
|
102
|
+
@noble/curves/abstract/curve.js:
|
|
103
|
+
@noble/curves/abstract/edwards.js:
|
|
104
|
+
@noble/curves/abstract/montgomery.js:
|
|
105
|
+
@noble/curves/ed25519.js:
|
|
106
|
+
@noble/curves/utils.js:
|
|
107
|
+
@noble/curves/abstract/modular.js:
|
|
108
|
+
@noble/curves/abstract/curve.js:
|
|
109
|
+
@noble/curves/abstract/edwards.js:
|
|
110
|
+
@noble/curves/ed25519.js:
|
|
111
|
+
@noble/curves/abstract/der.js:
|
|
112
|
+
@noble/curves/abstract/weierstrass.js:
|
|
113
|
+
@noble/curves/secp256k1.js:
|
|
114
|
+
(*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
115
|
+
|
|
116
|
+
mustache/mustache.js:
|
|
117
|
+
(*!
|
|
118
|
+
* mustache.js - Logic-less {{mustache}} templates with JavaScript
|
|
119
|
+
* http://github.com/janl/mustache.js
|
|
120
|
+
*)
|
|
121
|
+
|
|
122
|
+
depd/lib/browser/index.js:
|
|
123
|
+
(*!
|
|
124
|
+
* depd
|
|
125
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
126
|
+
* MIT Licensed
|
|
127
|
+
*)
|
|
128
|
+
|
|
129
|
+
js-sha256/src/sha256.js:
|
|
130
|
+
(**
|
|
131
|
+
* [js-sha256]{@link https://github.com/emn178/js-sha256}
|
|
132
|
+
*
|
|
133
|
+
* @version 0.9.0
|
|
134
|
+
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
|
135
|
+
* @copyright Chen, Yi-Cyuan 2014-2017
|
|
136
|
+
* @license MIT
|
|
137
|
+
*)
|
|
138
|
+
|
|
139
|
+
js-sha256/src/sha256.js:
|
|
140
|
+
(**
|
|
141
|
+
* [js-sha256]{@link https://github.com/emn178/js-sha256}
|
|
142
|
+
*
|
|
143
|
+
* @version 0.11.1
|
|
144
|
+
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
|
145
|
+
* @copyright Chen, Yi-Cyuan 2014-2025
|
|
146
|
+
* @license MIT
|
|
147
|
+
*)
|
|
148
|
+
|
|
149
|
+
safe-buffer/index.js:
|
|
150
|
+
(*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
151
|
+
*/
|