@wormhole-foundation/wormhole-connect 1.0.0-beta.6-development → 1.0.0-beta.8-development
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/README.md +30 -9
- package/dist/assets/{ccip-HS3Cs5py.js → ccip-BorgJkc_.js} +1 -1
- package/dist/assets/{evm-DyY55Fca.js → evm-DqZ4cf4F.js} +24 -24
- package/dist/assets/{index-CeF-n8om.js → index-D2KpdQOJ.js} +1 -1
- package/dist/assets/{index-CqxhuXyT.js → index-Sz5xP7AP.js} +1 -1
- package/dist/assets/{index-CwoiJQ9y.js → index-atAB1u0t.js} +2 -2
- package/dist/assets/{index.es-BHZwRRXn.js → index.es-dXXum9j3.js} +2 -2
- package/dist/main.js +64 -65
- package/dist/src/config/ui.d.ts +0 -24
- package/dist/src/config/ui.d.ts.map +1 -1
- package/dist/src/hosted.d.ts +10 -0
- package/dist/src/hosted.d.ts.map +1 -0
- package/dist/src/index.d.ts +4 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/main.d.ts.map +1 -1
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/src/utils/index.d.ts.map +1 -1
- package/dist/src/utils/wallet/evm.d.ts +2 -1
- package/dist/src/utils/wallet/evm.d.ts.map +1 -1
- package/dist/src/views/v2/Bridge/AssetPicker/ChainList.d.ts.map +1 -1
- package/dist/src/views/v2/Bridge/Routes/SingleRoute.d.ts.map +1 -1
- package/dist/src/views/v2/Bridge/WalletConnector/index.d.ts.map +1 -1
- package/lib/{algorand-CIOlvhGh.mjs → algorand-BDmGwgo0.mjs} +3 -3
- package/lib/{algorand-B3jpS4mY.js → algorand-BRrCXLHv.js} +1 -1
- package/lib/{aptos-CKPSmGSC.mjs → aptos-B4tHgth_.mjs} +3 -3
- package/lib/{aptos-CrnZjgsh.mjs → aptos-BDOVJaPS.mjs} +1 -1
- package/lib/{aptos-B7P6JL1S.js → aptos-CocAk52h.js} +1 -1
- package/lib/{aptos-Cx4TaXYo.js → aptos-Olu7hLbM.js} +2 -2
- package/lib/{ccip-B-q-r_A1.js → ccip-DW70XeRB.js} +1 -1
- package/lib/{ccip-pU66-Jja.mjs → ccip-csPmnvrR.mjs} +1 -1
- package/lib/{cosmos-BDlV5WWM.js → cosmos-J7vmObWX.js} +1 -1
- package/lib/{cosmos-mLLSK_Nm.mjs → cosmos-Q00_Achm.mjs} +6 -6
- package/lib/{cosmwasm-CViLVch6.js → cosmwasm-FcaxCHUR.js} +2 -2
- package/lib/{cosmwasm-CGolR9gL.mjs → cosmwasm-Ukd2lv6A.mjs} +7 -7
- package/lib/{events-Dzr-GrPB.mjs → events-Bp5VnuCn.mjs} +1 -1
- package/lib/{events-BSNN9qkd.js → events-wlbN7cam.js} +1 -1
- package/lib/{evm-DXAiSRNs.mjs → evm-CAbq9PkI.mjs} +7 -7
- package/lib/{evm-DMGYpAGT.js → evm-DLuufB6t.js} +19 -19
- package/lib/{evm-BILIyDaj.mjs → evm-DPxnFflA.mjs} +1440 -1431
- package/lib/{evm-ronpaGiZ.js → evm-eTUzSuGR.js} +1 -1
- package/lib/{index-Byr7P1JY.js → index-0Pz-U2V0.js} +1 -1
- package/lib/{index-YNti7nIJ.mjs → index-1LKv8b31.mjs} +3 -3
- package/lib/{index-Dpzov1Io.js → index-2fV7-V0g.js} +1 -1
- package/lib/{index-C1jcO7wH.mjs → index-872kdch5.mjs} +1 -1
- package/lib/{index-bdAItiPr.js → index-9lDHF16W.js} +1 -1
- package/lib/{index-Da7Cxyq1.mjs → index-B1X1DEbd.mjs} +2 -2
- package/lib/{index-Be-kzEHF.mjs → index-B6FCEsUJ.mjs} +4 -4
- package/lib/{index-DFZ0Ndqh.js → index-B7Wuhlae.js} +1 -1
- package/lib/{index-C2WFu8In.mjs → index-BHg1HEL3.mjs} +2 -2
- package/lib/{index-C2DCdxRC.mjs → index-BNQfXzmT.mjs} +1153 -1119
- package/lib/{index-BWe8c3sQ.mjs → index-BVYe6gGw.mjs} +2 -2
- package/lib/{index-e3UZ_0nd.mjs → index-BW6AEYrS.mjs} +3 -3
- package/lib/{index-CSKSjjgt.mjs → index-BapiN3L3.mjs} +2 -2
- package/lib/{index-CZj2FglQ.mjs → index-Bd9jd8Va.mjs} +2 -2
- package/lib/{index-DFa89Itc.js → index-BhhG9UHE.js} +1 -1
- package/lib/{index-BvbKk4T6.mjs → index-Bk-7wCMM.mjs} +1 -1
- package/lib/{index-DEAhtMw_.js → index-Bob7GenS.js} +1 -1
- package/lib/{index-AslWQnUt.js → index-C9KuiVwT.js} +1 -1
- package/lib/{index-DXCl1vFR.mjs → index-CCOplDw1.mjs} +3 -3
- package/lib/{index-D6u6ZlbM.mjs → index-CGgCe-TN.mjs} +4 -4
- package/lib/{index-DiF1ira9.mjs → index-CQvIjyqH.mjs} +1 -1
- package/lib/{index-CMWEjIGj.mjs → index-CUqF5ByT.mjs} +1 -1
- package/lib/{index-BVxqSkXh.js → index-CZPVj8Bj.js} +1 -1
- package/lib/{index-BAErxF8G.mjs → index-C_Z08_5j.mjs} +2 -2
- package/lib/{index-wXdILngm.js → index-CctKy8T0.js} +1 -1
- package/lib/{index-g3eZpZJ1.js → index-CqdXRW8h.js} +1 -1
- package/lib/{index-Co1vTibS.mjs → index-CskDAU3i.mjs} +2 -2
- package/lib/{index-BO5ATVUH.js → index-Ct15piQO.js} +1 -1
- package/lib/{index-ZD733qpV.js → index-Cxt_cpUB.js} +1 -1
- package/lib/{index-oMwdMcy1.mjs → index-DB-FvxOY.mjs} +1 -1
- package/lib/{index-58isS1fK.js → index-DHP-njvh.js} +1 -1
- package/lib/{index-BTS53_Aj.mjs → index-DNAg_uGu.mjs} +2 -2
- package/lib/{index-DWKvilYv.mjs → index-DRHfM-dJ.mjs} +4 -4
- package/lib/{index-iXByZuY7.js → index-DYietgbP.js} +1 -1
- package/lib/{index-BN2lROi0.js → index-DbmyBX4Q.js} +1 -1
- package/lib/{index-BRdg8SSa.js → index-De3vN78v.js} +1 -1
- package/lib/{index-Cd8xotiJ.js → index-DjM7nJNJ.js} +1 -1
- package/lib/{index-BHGS0dw3.js → index-DpZGf7ao.js} +49 -49
- package/lib/{index-DbI4zYHg.js → index-DtM_PqGv.js} +1 -1
- package/lib/{index-CruftbOC.mjs → index-DwR3_jmz.mjs} +7 -7
- package/lib/{index-BJQjdDt-.js → index-KhbqJyoM.js} +1 -1
- package/lib/{index-CAcB_0Hd.js → index-NBy_JDT2.js} +1 -1
- package/lib/{index-BdINnTi7.mjs → index-PUKgAuvv.mjs} +2 -2
- package/lib/{index-mUmOCSLG.mjs → index-WWXvZLn0.mjs} +1 -1
- package/lib/{index-Dmko8wT8.js → index-XTtbdN9X.js} +1 -1
- package/lib/{index-CHAdrAO4.js → index-YgTGeKLj.js} +1 -1
- package/lib/{index-BKDeZ8n5.js → index-mom8Zmou.js} +1 -1
- package/lib/{index-CAHXQCTs.mjs → index-tGVSGULu.mjs} +2 -2
- package/lib/{index.es-B6NnL7-2.js → index.es-B9gxwZcm.js} +2 -2
- package/lib/{index.es-DNGjs0VX.mjs → index.es-Dt88ZW7f.mjs} +5 -5
- package/lib/index.js +1 -1
- package/lib/index.mjs +17 -15
- package/lib/{libsodium-wrappers-B21TAmoM.js → libsodium-wrappers-BuwfTfTY.js} +1 -1
- package/lib/{libsodium-wrappers-BKcruoKB.mjs → libsodium-wrappers-DLU5hUMu.mjs} +1 -1
- package/lib/{pako.esm-C_3vjkSx.mjs → pako.esm-CZW6iyfv.mjs} +3 -3
- package/lib/{pako.esm-x_RIwOhS.js → pako.esm-DUxkbXW4.js} +1 -1
- package/lib/{pbkdf2-h3af_qT8.mjs → pbkdf2-BYeu_Rh5.mjs} +1 -1
- package/lib/{pbkdf2-BiOly-Fb.js → pbkdf2-CQsb-hnh.js} +1 -1
- package/lib/{sei-CsiLK3q4.js → sei-DldsY9OJ.js} +1 -1
- package/lib/{sei-J7Ndid0z.mjs → sei-jkF24TbQ.mjs} +4 -4
- package/lib/{signer-Bqq-7pmw.mjs → signer-BHaj-Q7Z.mjs} +1 -1
- package/lib/{signer-DqTjY4LV.js → signer-DAZjtwBF.js} +1 -1
- package/lib/{solana-Ce3qepls.js → solana-B6pHDYwK.js} +1 -1
- package/lib/{solana-DoXIYwUz.mjs → solana-BGrKM-L5.mjs} +4 -4
- package/lib/solana-BJkYDvEg.js +1 -0
- package/lib/solana-BhT0qjBR.mjs +16 -0
- package/lib/{solanaEmbed.esm-BDiuwARH.mjs → solanaEmbed.esm-DsaELY_p.mjs} +4 -4
- package/lib/{solanaEmbed.esm-aEhVr3dz.js → solanaEmbed.esm-byA6SJdX.js} +1 -1
- package/lib/src/config/ui.d.ts +0 -24
- package/lib/src/config/ui.d.ts.map +1 -1
- package/lib/src/hosted.d.ts +10 -0
- package/lib/src/hosted.d.ts.map +1 -0
- package/lib/src/index.d.ts +4 -2
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/main.d.ts.map +1 -1
- package/lib/src/utils/index.d.ts +1 -0
- package/lib/src/utils/index.d.ts.map +1 -1
- package/lib/src/utils/wallet/evm.d.ts +2 -1
- package/lib/src/utils/wallet/evm.d.ts.map +1 -1
- package/lib/src/views/v2/Bridge/AssetPicker/ChainList.d.ts.map +1 -1
- package/lib/src/views/v2/Bridge/Routes/SingleRoute.d.ts.map +1 -1
- package/lib/src/views/v2/Bridge/WalletConnector/index.d.ts.map +1 -1
- package/lib/{sui-sEkivVSe.mjs → sui-Bxl_8F_i.mjs} +4 -4
- package/lib/{sui-CthAG5pi.js → sui-CusyBEEj.js} +1 -1
- package/lib/{sui-Bd2bm_yF.mjs → sui-J5LtM0N2.mjs} +1 -1
- package/lib/{sui-CNNdjXyR.js → sui-ShulHFzj.js} +2 -2
- package/lib/{unsignedTransaction-CA2s3rKG.mjs → unsignedTransaction-BjLsY8jQ.mjs} +2 -2
- package/lib/{unsignedTransaction-qKKmqcBf.js → unsignedTransaction-DIl-FgDa.js} +1 -1
- package/lib/{utils-OPA3b1An.mjs → utils-Cvu_YuwT.mjs} +2 -2
- package/lib/{utils-Deb--_8V.js → utils-lAfFWpGW.js} +1 -1
- package/package.json +4 -4
- package/lib/solana-CRL9xy7K.mjs +0 -16
- package/lib/solana-rhlzUaN7.js +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var m = Object.defineProperty;
|
|
2
2
|
var w = (i, e, t) => e in i ? m(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
3
3
|
var a = (i, e, t) => w(i, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { C as u } from "./cosmwasm-
|
|
5
|
-
import { cL as g, c9 as l, u as h, bR as p, a9 as f } from "./index-
|
|
4
|
+
import { C as u } from "./cosmwasm-Ukd2lv6A.mjs";
|
|
5
|
+
import { cL as g, c9 as l, u as h, bR as p, a9 as f } from "./index-BNQfXzmT.mjs";
|
|
6
6
|
class c {
|
|
7
7
|
constructor(e, t, s, r) {
|
|
8
8
|
a(this, "network");
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
var b = Object.defineProperty;
|
|
2
2
|
var W = (h, t, e) => t in h ? b(h, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[t] = e;
|
|
3
3
|
var c = (h, t, e) => W(h, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
-
import "./index-
|
|
5
|
-
import { C as p, G as v } from "./cosmwasm-
|
|
6
|
-
import { b as o, c as g, C as x } from "./unsignedTransaction-
|
|
7
|
-
import { p as u, N as d, a8 as B, ce as S, a3 as a, c8 as E, c9 as q, bM as y, bR as I, a9 as D } from "./index-
|
|
4
|
+
import "./index-DNAg_uGu.mjs";
|
|
5
|
+
import { C as p, G as v } from "./cosmwasm-Ukd2lv6A.mjs";
|
|
6
|
+
import { b as o, c as g, C as x } from "./unsignedTransaction-BjLsY8jQ.mjs";
|
|
7
|
+
import { p as u, N as d, a8 as B, ce as S, a3 as a, c8 as E, c9 as q, bM as y, bR as I, a9 as D } from "./index-BNQfXzmT.mjs";
|
|
8
8
|
class k {
|
|
9
9
|
constructor(t, e, r, s) {
|
|
10
10
|
c(this, "network");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const U=require("./index-BHGS0dw3.js"),mr=U.getAugmentedNamespace(U.sha256$1),br=U.getAugmentedNamespace(U.sha3$1);var L=Object.prototype.toString,nr=function(r){var e=L.call(r),t=e==="[object Arguments]";return t||(t=e!=="[object Array]"&&r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&L.call(r.callee)==="[object Function]"),t},N,z;function Ar(){if(z)return N;z=1;var n;if(!Object.keys){var r=Object.prototype.hasOwnProperty,e=Object.prototype.toString,t=nr,o=Object.prototype.propertyIsEnumerable,i=!o.call({toString:null},"toString"),s=o.call(function(){},"prototype"),p=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(l){var y=l.constructor;return y&&y.prototype===l},v={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},c=function(){if(typeof window>"u")return!1;for(var l in window)try{if(!v["$"+l]&&r.call(window,l)&&window[l]!==null&&typeof window[l]=="object")try{u(window[l])}catch{return!0}}catch{return!0}return!1}(),g=function(l){if(typeof window>"u"||!c)return u(l);try{return u(l)}catch{return!1}};n=function(y){var d=y!==null&&typeof y=="object",h=e.call(y)==="[object Function]",K=t(y),gr=d&&e.call(y)==="[object String]",O=[];if(!d&&!h&&!K)throw new TypeError("Object.keys called on a non-object");var dr=s&&h;if(gr&&y.length>0&&!r.call(y,0))for(var D=0;D<y.length;++D)O.push(String(D));if(K&&y.length>0)for(var x=0;x<y.length;++x)O.push(String(x));else for(var k in y)!(dr&&k==="prototype")&&r.call(y,k)&&O.push(String(k));if(i)for(var hr=g(y),E=0;E<p.length;++E)!(hr&&p[E]==="constructor")&&r.call(y,p[E])&&O.push(p[E]);return O}}return N=n,N}var Pr=Array.prototype.slice,Sr=nr,Y=Object.keys,F=Y?function(r){return Y(r)}:Ar(),H=Object.keys;F.shim=function(){if(Object.keys){var r=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);r||(Object.keys=function(t){return Sr(t)?H(Pr.call(t)):H(t)})}else Object.keys=F;return Object.keys||F};var ar=F,wr=Error,$r=EvalError,Or=RangeError,Er=ReferenceError,ir=SyntaxError,C=TypeError,Ir=URIError,yr=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},e=Symbol("test"),t=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(t)!=="[object Symbol]")return!1;var o=42;r[e]=o;for(e in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var i=Object.getOwnPropertySymbols(r);if(i.length!==1||i[0]!==e||!Object.prototype.propertyIsEnumerable.call(r,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(r,e);if(s.value!==o||s.enumerable!==!0)return!1}return!0},X=typeof Symbol<"u"&&Symbol,Fr=yr,Rr=function(){return typeof X!="function"||typeof Symbol!="function"||typeof X("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Fr()},T={__proto__:null,foo:{}},jr=Object,Ur=function(){return{__proto__:T}.foo===T.foo&&!(T instanceof jr)},_r="Function.prototype.bind called on incompatible ",Br=Object.prototype.toString,Dr=Math.max,xr="[object Function]",Q=function(r,e){for(var t=[],o=0;o<r.length;o+=1)t[o]=r[o];for(var i=0;i<e.length;i+=1)t[i+r.length]=e[i];return t},kr=function(r,e){for(var t=[],o=e,i=0;o<r.length;o+=1,i+=1)t[i]=r[o];return t},Nr=function(n,r){for(var e="",t=0;t<n.length;t+=1)e+=n[t],t+1<n.length&&(e+=r);return e},Tr=function(r){var e=this;if(typeof e!="function"||Br.apply(e)!==xr)throw new TypeError(_r+e);for(var t=kr(arguments,1),o,i=function(){if(this instanceof o){var c=e.apply(this,Q(t,arguments));return Object(c)===c?c:this}return e.apply(r,Q(t,arguments))},s=Dr(0,e.length-t.length),p=[],u=0;u<s;u++)p[u]="$"+u;if(o=Function("binder","return function ("+Nr(p,",")+"){ return binder.apply(this,arguments); }")(i),e.prototype){var v=function(){};v.prototype=e.prototype,o.prototype=new v,v.prototype=null}return o},Gr=Tr,q=Function.prototype.bind||Gr,Wr=Function.prototype.call,Mr=Object.prototype.hasOwnProperty,Cr=q,qr=Cr.call(Wr,Mr),a,Jr=wr,Vr=$r,Kr=Or,Lr=Er,$=ir,w=C,zr=Ir,pr=Function,G=function(n){try{return pr('"use strict"; return ('+n+").constructor;")()}catch{}},m=Object.getOwnPropertyDescriptor;if(m)try{m({},"")}catch{m=null}var W=function(){throw new w},Yr=m?function(){try{return arguments.callee,W}catch{try{return m(arguments,"callee").get}catch{return W}}}():W,A=Rr(),Hr=Ur(),f=Object.getPrototypeOf||(Hr?function(n){return n.__proto__}:null),S={},Xr=typeof Uint8Array>"u"||!f?a:f(Uint8Array),b={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?a:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?a:ArrayBuffer,"%ArrayIteratorPrototype%":A&&f?f([][Symbol.iterator]()):a,"%AsyncFromSyncIteratorPrototype%":a,"%AsyncFunction%":S,"%AsyncGenerator%":S,"%AsyncGeneratorFunction%":S,"%AsyncIteratorPrototype%":S,"%Atomics%":typeof Atomics>"u"?a:Atomics,"%BigInt%":typeof BigInt>"u"?a:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?a:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?a:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?a:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Jr,"%eval%":eval,"%EvalError%":Vr,"%Float32Array%":typeof Float32Array>"u"?a:Float32Array,"%Float64Array%":typeof Float64Array>"u"?a:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?a:FinalizationRegistry,"%Function%":pr,"%GeneratorFunction%":S,"%Int8Array%":typeof Int8Array>"u"?a:Int8Array,"%Int16Array%":typeof Int16Array>"u"?a:Int16Array,"%Int32Array%":typeof Int32Array>"u"?a:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":A&&f?f(f([][Symbol.iterator]())):a,"%JSON%":typeof JSON=="object"?JSON:a,"%Map%":typeof Map>"u"?a:Map,"%MapIteratorPrototype%":typeof Map>"u"||!A||!f?a:f(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?a:Promise,"%Proxy%":typeof Proxy>"u"?a:Proxy,"%RangeError%":Kr,"%ReferenceError%":Lr,"%Reflect%":typeof Reflect>"u"?a:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?a:Set,"%SetIteratorPrototype%":typeof Set>"u"||!A||!f?a:f(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?a:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":A&&f?f(""[Symbol.iterator]()):a,"%Symbol%":A?Symbol:a,"%SyntaxError%":$,"%ThrowTypeError%":Yr,"%TypedArray%":Xr,"%TypeError%":w,"%Uint8Array%":typeof Uint8Array>"u"?a:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?a:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?a:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?a:Uint32Array,"%URIError%":zr,"%WeakMap%":typeof WeakMap>"u"?a:WeakMap,"%WeakRef%":typeof WeakRef>"u"?a:WeakRef,"%WeakSet%":typeof WeakSet>"u"?a:WeakSet};if(f)try{null.error}catch(n){var Qr=f(f(n));b["%Error.prototype%"]=Qr}var Zr=function n(r){var e;if(r==="%AsyncFunction%")e=G("async function () {}");else if(r==="%GeneratorFunction%")e=G("function* () {}");else if(r==="%AsyncGeneratorFunction%")e=G("async function* () {}");else if(r==="%AsyncGenerator%"){var t=n("%AsyncGeneratorFunction%");t&&(e=t.prototype)}else if(r==="%AsyncIteratorPrototype%"){var o=n("%AsyncGenerator%");o&&f&&(e=f(o.prototype))}return b[r]=e,e},Z={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},I=q,_=qr,re=I.call(Function.call,Array.prototype.concat),ee=I.call(Function.apply,Array.prototype.splice),rr=I.call(Function.call,String.prototype.replace),B=I.call(Function.call,String.prototype.slice),te=I.call(Function.call,RegExp.prototype.exec),oe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ne=/\\(\\)?/g,ae=function(r){var e=B(r,0,1),t=B(r,-1);if(e==="%"&&t!=="%")throw new $("invalid intrinsic syntax, expected closing `%`");if(t==="%"&&e!=="%")throw new $("invalid intrinsic syntax, expected opening `%`");var o=[];return rr(r,oe,function(i,s,p,u){o[o.length]=p?rr(u,ne,"$1"):s||i}),o},ie=function(r,e){var t=r,o;if(_(Z,t)&&(o=Z[t],t="%"+o[0]+"%"),_(b,t)){var i=b[t];if(i===S&&(i=Zr(t)),typeof i>"u"&&!e)throw new w("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:o,name:t,value:i}}throw new $("intrinsic "+r+" does not exist!")},J=function(r,e){if(typeof r!="string"||r.length===0)throw new w("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof e!="boolean")throw new w('"allowMissing" argument must be a boolean');if(te(/^%?[^%]*%?$/,r)===null)throw new $("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var t=ae(r),o=t.length>0?t[0]:"",i=ie("%"+o+"%",e),s=i.name,p=i.value,u=!1,v=i.alias;v&&(o=v[0],ee(t,re([0,1],v)));for(var c=1,g=!0;c<t.length;c+=1){var l=t[c],y=B(l,0,1),d=B(l,-1);if((y==='"'||y==="'"||y==="`"||d==='"'||d==="'"||d==="`")&&y!==d)throw new $("property names with quotes must have matching quotes");if((l==="constructor"||!g)&&(u=!0),o+="."+l,s="%"+o+"%",_(b,s))p=b[s];else if(p!=null){if(!(l in p)){if(!e)throw new w("base intrinsic for "+r+" exists, but the property is not available.");return}if(m&&c+1>=t.length){var h=m(p,l);g=!!h,g&&"get"in h&&!("originalValue"in h.get)?p=h.get:p=p[l]}else g=_(p,l),p=p[l];g&&!u&&(b[s]=p)}}return p},ye=J,R=ye("%Object.defineProperty%",!0)||!1;if(R)try{R({},"a",{value:1})}catch{R=!1}var V=R,pe=J,j=pe("%Object.getOwnPropertyDescriptor%",!0);if(j)try{j([],"length")}catch{j=null}var lr=j,er=V,le=ir,P=C,tr=lr,ur=function(r,e,t){if(!r||typeof r!="object"&&typeof r!="function")throw new P("`obj` must be an object or a function`");if(typeof e!="string"&&typeof e!="symbol")throw new P("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new P("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new P("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new P("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new P("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,p=arguments.length>6?arguments[6]:!1,u=!!tr&&tr(r,e);if(er)er(r,e,{configurable:s===null&&u?u.configurable:!s,enumerable:o===null&&u?u.enumerable:!o,value:t,writable:i===null&&u?u.writable:!i});else if(p||!o&&!i&&!s)r[e]=t;else throw new le("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},M=V,fr=function(){return!!M};fr.hasArrayLengthDefineBug=function(){if(!M)return null;try{return M([],"length",{value:1}).length!==1}catch{return!0}};var sr=fr,ue=ar,fe=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",se=Object.prototype.toString,ce=Array.prototype.concat,or=ur,ve=function(n){return typeof n=="function"&&se.call(n)==="[object Function]"},cr=sr(),ge=function(n,r,e,t){if(r in n){if(t===!0){if(n[r]===e)return}else if(!ve(t)||!t())return}cr?or(n,r,e,!0):or(n,r,e)},vr=function(n,r){var e=arguments.length>2?arguments[2]:{},t=ue(r);fe&&(t=ce.call(t,Object.getOwnPropertySymbols(r)));for(var o=0;o<t.length;o+=1)ge(n,t[o],r[t[o]],e[t[o]])};vr.supportsDescriptors=!!cr;var de=vr;exports.defineDataProperty=ur;exports.defineProperties_1=de;exports.esDefineProperty=V;exports.functionBind=q;exports.getIntrinsic=J;exports.gopd=lr;exports.hasPropertyDescriptors_1=sr;exports.objectKeys=ar;exports.require$$0=mr;exports.require$$0$1=br;exports.shams=yr;exports.type=C;
|
|
1
|
+
"use strict";const U=require("./index-DpZGf7ao.js"),mr=U.getAugmentedNamespace(U.sha256$1),br=U.getAugmentedNamespace(U.sha3$1);var L=Object.prototype.toString,nr=function(r){var e=L.call(r),t=e==="[object Arguments]";return t||(t=e!=="[object Array]"&&r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&L.call(r.callee)==="[object Function]"),t},N,z;function Ar(){if(z)return N;z=1;var n;if(!Object.keys){var r=Object.prototype.hasOwnProperty,e=Object.prototype.toString,t=nr,o=Object.prototype.propertyIsEnumerable,i=!o.call({toString:null},"toString"),s=o.call(function(){},"prototype"),p=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(l){var y=l.constructor;return y&&y.prototype===l},v={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},c=function(){if(typeof window>"u")return!1;for(var l in window)try{if(!v["$"+l]&&r.call(window,l)&&window[l]!==null&&typeof window[l]=="object")try{u(window[l])}catch{return!0}}catch{return!0}return!1}(),g=function(l){if(typeof window>"u"||!c)return u(l);try{return u(l)}catch{return!1}};n=function(y){var d=y!==null&&typeof y=="object",h=e.call(y)==="[object Function]",K=t(y),gr=d&&e.call(y)==="[object String]",O=[];if(!d&&!h&&!K)throw new TypeError("Object.keys called on a non-object");var dr=s&&h;if(gr&&y.length>0&&!r.call(y,0))for(var D=0;D<y.length;++D)O.push(String(D));if(K&&y.length>0)for(var x=0;x<y.length;++x)O.push(String(x));else for(var k in y)!(dr&&k==="prototype")&&r.call(y,k)&&O.push(String(k));if(i)for(var hr=g(y),E=0;E<p.length;++E)!(hr&&p[E]==="constructor")&&r.call(y,p[E])&&O.push(p[E]);return O}}return N=n,N}var Pr=Array.prototype.slice,Sr=nr,Y=Object.keys,F=Y?function(r){return Y(r)}:Ar(),H=Object.keys;F.shim=function(){if(Object.keys){var r=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);r||(Object.keys=function(t){return Sr(t)?H(Pr.call(t)):H(t)})}else Object.keys=F;return Object.keys||F};var ar=F,wr=Error,$r=EvalError,Or=RangeError,Er=ReferenceError,ir=SyntaxError,C=TypeError,Ir=URIError,yr=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},e=Symbol("test"),t=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(t)!=="[object Symbol]")return!1;var o=42;r[e]=o;for(e in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var i=Object.getOwnPropertySymbols(r);if(i.length!==1||i[0]!==e||!Object.prototype.propertyIsEnumerable.call(r,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(r,e);if(s.value!==o||s.enumerable!==!0)return!1}return!0},X=typeof Symbol<"u"&&Symbol,Fr=yr,Rr=function(){return typeof X!="function"||typeof Symbol!="function"||typeof X("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Fr()},T={__proto__:null,foo:{}},jr=Object,Ur=function(){return{__proto__:T}.foo===T.foo&&!(T instanceof jr)},_r="Function.prototype.bind called on incompatible ",Br=Object.prototype.toString,Dr=Math.max,xr="[object Function]",Q=function(r,e){for(var t=[],o=0;o<r.length;o+=1)t[o]=r[o];for(var i=0;i<e.length;i+=1)t[i+r.length]=e[i];return t},kr=function(r,e){for(var t=[],o=e,i=0;o<r.length;o+=1,i+=1)t[i]=r[o];return t},Nr=function(n,r){for(var e="",t=0;t<n.length;t+=1)e+=n[t],t+1<n.length&&(e+=r);return e},Tr=function(r){var e=this;if(typeof e!="function"||Br.apply(e)!==xr)throw new TypeError(_r+e);for(var t=kr(arguments,1),o,i=function(){if(this instanceof o){var c=e.apply(this,Q(t,arguments));return Object(c)===c?c:this}return e.apply(r,Q(t,arguments))},s=Dr(0,e.length-t.length),p=[],u=0;u<s;u++)p[u]="$"+u;if(o=Function("binder","return function ("+Nr(p,",")+"){ return binder.apply(this,arguments); }")(i),e.prototype){var v=function(){};v.prototype=e.prototype,o.prototype=new v,v.prototype=null}return o},Gr=Tr,q=Function.prototype.bind||Gr,Wr=Function.prototype.call,Mr=Object.prototype.hasOwnProperty,Cr=q,qr=Cr.call(Wr,Mr),a,Jr=wr,Vr=$r,Kr=Or,Lr=Er,$=ir,w=C,zr=Ir,pr=Function,G=function(n){try{return pr('"use strict"; return ('+n+").constructor;")()}catch{}},m=Object.getOwnPropertyDescriptor;if(m)try{m({},"")}catch{m=null}var W=function(){throw new w},Yr=m?function(){try{return arguments.callee,W}catch{try{return m(arguments,"callee").get}catch{return W}}}():W,A=Rr(),Hr=Ur(),f=Object.getPrototypeOf||(Hr?function(n){return n.__proto__}:null),S={},Xr=typeof Uint8Array>"u"||!f?a:f(Uint8Array),b={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?a:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?a:ArrayBuffer,"%ArrayIteratorPrototype%":A&&f?f([][Symbol.iterator]()):a,"%AsyncFromSyncIteratorPrototype%":a,"%AsyncFunction%":S,"%AsyncGenerator%":S,"%AsyncGeneratorFunction%":S,"%AsyncIteratorPrototype%":S,"%Atomics%":typeof Atomics>"u"?a:Atomics,"%BigInt%":typeof BigInt>"u"?a:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?a:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?a:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?a:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Jr,"%eval%":eval,"%EvalError%":Vr,"%Float32Array%":typeof Float32Array>"u"?a:Float32Array,"%Float64Array%":typeof Float64Array>"u"?a:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?a:FinalizationRegistry,"%Function%":pr,"%GeneratorFunction%":S,"%Int8Array%":typeof Int8Array>"u"?a:Int8Array,"%Int16Array%":typeof Int16Array>"u"?a:Int16Array,"%Int32Array%":typeof Int32Array>"u"?a:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":A&&f?f(f([][Symbol.iterator]())):a,"%JSON%":typeof JSON=="object"?JSON:a,"%Map%":typeof Map>"u"?a:Map,"%MapIteratorPrototype%":typeof Map>"u"||!A||!f?a:f(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?a:Promise,"%Proxy%":typeof Proxy>"u"?a:Proxy,"%RangeError%":Kr,"%ReferenceError%":Lr,"%Reflect%":typeof Reflect>"u"?a:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?a:Set,"%SetIteratorPrototype%":typeof Set>"u"||!A||!f?a:f(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?a:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":A&&f?f(""[Symbol.iterator]()):a,"%Symbol%":A?Symbol:a,"%SyntaxError%":$,"%ThrowTypeError%":Yr,"%TypedArray%":Xr,"%TypeError%":w,"%Uint8Array%":typeof Uint8Array>"u"?a:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?a:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?a:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?a:Uint32Array,"%URIError%":zr,"%WeakMap%":typeof WeakMap>"u"?a:WeakMap,"%WeakRef%":typeof WeakRef>"u"?a:WeakRef,"%WeakSet%":typeof WeakSet>"u"?a:WeakSet};if(f)try{null.error}catch(n){var Qr=f(f(n));b["%Error.prototype%"]=Qr}var Zr=function n(r){var e;if(r==="%AsyncFunction%")e=G("async function () {}");else if(r==="%GeneratorFunction%")e=G("function* () {}");else if(r==="%AsyncGeneratorFunction%")e=G("async function* () {}");else if(r==="%AsyncGenerator%"){var t=n("%AsyncGeneratorFunction%");t&&(e=t.prototype)}else if(r==="%AsyncIteratorPrototype%"){var o=n("%AsyncGenerator%");o&&f&&(e=f(o.prototype))}return b[r]=e,e},Z={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},I=q,_=qr,re=I.call(Function.call,Array.prototype.concat),ee=I.call(Function.apply,Array.prototype.splice),rr=I.call(Function.call,String.prototype.replace),B=I.call(Function.call,String.prototype.slice),te=I.call(Function.call,RegExp.prototype.exec),oe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ne=/\\(\\)?/g,ae=function(r){var e=B(r,0,1),t=B(r,-1);if(e==="%"&&t!=="%")throw new $("invalid intrinsic syntax, expected closing `%`");if(t==="%"&&e!=="%")throw new $("invalid intrinsic syntax, expected opening `%`");var o=[];return rr(r,oe,function(i,s,p,u){o[o.length]=p?rr(u,ne,"$1"):s||i}),o},ie=function(r,e){var t=r,o;if(_(Z,t)&&(o=Z[t],t="%"+o[0]+"%"),_(b,t)){var i=b[t];if(i===S&&(i=Zr(t)),typeof i>"u"&&!e)throw new w("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:o,name:t,value:i}}throw new $("intrinsic "+r+" does not exist!")},J=function(r,e){if(typeof r!="string"||r.length===0)throw new w("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof e!="boolean")throw new w('"allowMissing" argument must be a boolean');if(te(/^%?[^%]*%?$/,r)===null)throw new $("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var t=ae(r),o=t.length>0?t[0]:"",i=ie("%"+o+"%",e),s=i.name,p=i.value,u=!1,v=i.alias;v&&(o=v[0],ee(t,re([0,1],v)));for(var c=1,g=!0;c<t.length;c+=1){var l=t[c],y=B(l,0,1),d=B(l,-1);if((y==='"'||y==="'"||y==="`"||d==='"'||d==="'"||d==="`")&&y!==d)throw new $("property names with quotes must have matching quotes");if((l==="constructor"||!g)&&(u=!0),o+="."+l,s="%"+o+"%",_(b,s))p=b[s];else if(p!=null){if(!(l in p)){if(!e)throw new w("base intrinsic for "+r+" exists, but the property is not available.");return}if(m&&c+1>=t.length){var h=m(p,l);g=!!h,g&&"get"in h&&!("originalValue"in h.get)?p=h.get:p=p[l]}else g=_(p,l),p=p[l];g&&!u&&(b[s]=p)}}return p},ye=J,R=ye("%Object.defineProperty%",!0)||!1;if(R)try{R({},"a",{value:1})}catch{R=!1}var V=R,pe=J,j=pe("%Object.getOwnPropertyDescriptor%",!0);if(j)try{j([],"length")}catch{j=null}var lr=j,er=V,le=ir,P=C,tr=lr,ur=function(r,e,t){if(!r||typeof r!="object"&&typeof r!="function")throw new P("`obj` must be an object or a function`");if(typeof e!="string"&&typeof e!="symbol")throw new P("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new P("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new P("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new P("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new P("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,p=arguments.length>6?arguments[6]:!1,u=!!tr&&tr(r,e);if(er)er(r,e,{configurable:s===null&&u?u.configurable:!s,enumerable:o===null&&u?u.enumerable:!o,value:t,writable:i===null&&u?u.writable:!i});else if(p||!o&&!i&&!s)r[e]=t;else throw new le("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},M=V,fr=function(){return!!M};fr.hasArrayLengthDefineBug=function(){if(!M)return null;try{return M([],"length",{value:1}).length!==1}catch{return!0}};var sr=fr,ue=ar,fe=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",se=Object.prototype.toString,ce=Array.prototype.concat,or=ur,ve=function(n){return typeof n=="function"&&se.call(n)==="[object Function]"},cr=sr(),ge=function(n,r,e,t){if(r in n){if(t===!0){if(n[r]===e)return}else if(!ve(t)||!t())return}cr?or(n,r,e,!0):or(n,r,e)},vr=function(n,r){var e=arguments.length>2?arguments[2]:{},t=ue(r);fe&&(t=ce.call(t,Object.getOwnPropertySymbols(r)));for(var o=0;o<t.length;o+=1)ge(n,t[o],r[t[o]],e[t[o]])};vr.supportsDescriptors=!!cr;var de=vr;exports.defineDataProperty=ur;exports.defineProperties_1=de;exports.esDefineProperty=V;exports.functionBind=q;exports.getIntrinsic=J;exports.gopd=lr;exports.hasPropertyDescriptors_1=sr;exports.objectKeys=ar;exports.require$$0=mr;exports.require$$0$1=br;exports.shams=yr;exports.type=C;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DpZGf7ao.js");class o extends Error{constructor(r){super(r)}}class s extends o{constructor(){super(...arguments),this.name="TokenOwnerOffCurveError"}}const n=e.struct([e.u32("mintAuthorityOption"),e.publicKey("mintAuthority"),e.u64("supply"),e.u8("decimals"),e.bool("isInitialized"),e.u32("freezeAuthorityOption"),e.publicKey("freezeAuthority")]);n.span;async function f(t,r,u=!1,i=e.TOKEN_PROGRAM_ID,O=e.ASSOCIATED_TOKEN_PROGRAM_ID){if(!u&&!e.PublicKey.isOnCurve(r.toBuffer()))throw new s;const[c]=await e.PublicKey.findProgramAddress([r.toBuffer(),i.toBuffer(),t.toBuffer()],O);return c}exports.ASSOCIATED_TOKEN_PROGRAM_ID=e.ASSOCIATED_TOKEN_PROGRAM_ID;exports.TOKEN_PROGRAM_ID=e.TOKEN_PROGRAM_ID;exports.MintLayout=n;exports.TokenError=o;exports.TokenOwnerOffCurveError=s;exports.getAssociatedTokenAddress=f;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var xr=Object.defineProperty;var Br=(t,e,r)=>e in t?xr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var U=(t,e,r)=>Br(t,typeof e!="symbol"?e+"":e,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("./index-BHGS0dw3.js"),b=require("./sui-CNNdjXyR.js");require("./index-DbI4zYHg.js");class qt{constructor(e,r,n,i,s=!1){U(this,"transaction");U(this,"network");U(this,"chain");U(this,"description");U(this,"parallelizable");this.transaction=e,this.network=r,this.chain=n,this.description=i,this.parallelizable=s}}class Cr extends TypeError{constructor(e,r){let n;const{message:i,explanation:s,...c}=e,{path:a}=e,o=a.length===0?i:`At path: ${a.join(".")} -- ${i}`;super(s??o),s!=null&&(this.cause=o),Object.assign(this,c),this.name=this.constructor.name,this.failures=()=>n??(n=[e,...r()])}}function $r(t){return K(t)&&typeof t[Symbol.iterator]=="function"}function K(t){return typeof t=="object"&&t!=null}function J(t){return typeof t=="symbol"?t.toString():typeof t=="string"?JSON.stringify(t):`${t}`}function Ur(t){const{done:e,value:r}=t.next();return e?void 0:r}function Pr(t,e,r,n){if(t===!0)return;t===!1?t={}:typeof t=="string"&&(t={message:t});const{path:i,branch:s}=e,{type:c}=r,{refinement:a,message:o=`Expected a value of type \`${c}\`${a?` with refinement \`${a}\``:""}, but received: \`${J(n)}\``}=t;return{value:n,type:c,refinement:a,key:i[i.length-1],path:i,branch:s,...t,message:o}}function*Lt(t,e,r,n){$r(t)||(t=[t]);for(const i of t){const s=Pr(i,e,r,n);s&&(yield s)}}function*lt(t,e,r={}){const{path:n=[],branch:i=[t],coerce:s=!1,mask:c=!1}=r,a={path:n,branch:i};if(s&&(t=e.coercer(t,a),c&&e.type!=="type"&&K(e.schema)&&K(t)&&!Array.isArray(t)))for(const d in t)e.schema[d]===void 0&&delete t[d];let o="valid";for(const d of e.validator(t,a))d.explanation=r.message,o="not_valid",yield[d,void 0];for(let[d,u,g]of e.entries(t,a)){const m=lt(u,g,{path:d===void 0?n:[...n,d],branch:d===void 0?i:[...i,u],coerce:s,mask:c,message:r.message});for(const y of m)y[0]?(o=y[0].refinement!=null?"not_refined":"not_valid",yield[y[0],void 0]):s&&(u=y[1],d===void 0?t=u:t instanceof Map?t.set(d,u):t instanceof Set?t.add(u):K(t)&&(u!==void 0||d in t)&&(t[d]=u))}if(o!=="not_valid")for(const d of e.refiner(t,a))d.explanation=r.message,o="not_refined",yield[d,void 0];o==="valid"&&(yield[void 0,t])}class te{constructor(e){const{type:r,schema:n,validator:i,refiner:s,coercer:c=o=>o,entries:a=function*(){}}=e;this.type=r,this.schema=n,this.entries=a,this.coercer=c,i?this.validator=(o,d)=>{const u=i(o,d);return Lt(u,d,this,o)}:this.validator=()=>[],s?this.refiner=(o,d)=>{const u=s(o,d);return Lt(u,d,this,o)}:this.refiner=()=>[]}assert(e,r){return nt(e,this,r)}create(e,r){return Xt(e,this,r)}is(e){return L(e,this)}mask(e,r){return Zt(e,this,r)}validate(e,r={}){return _e(e,this,r)}}function nt(t,e,r){const n=_e(t,e,{message:r});if(n[0])throw n[0]}function Xt(t,e,r){const n=_e(t,e,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function Zt(t,e,r){const n=_e(t,e,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function L(t,e){return!_e(t,e)[0]}function _e(t,e,r={}){const n=lt(t,e,r),i=Ur(n);return i[0]?[new Cr(i[0],function*(){for(const c of n)c[0]&&(yield c[0])}),void 0]:[void 0,i[1]]}function je(...t){const e=t[0].type==="type",r=t.map(i=>i.schema),n=Object.assign({},...r);return e?Rr(n):p(n)}function W(t,e){return new te({type:t,schema:null,validator:e})}function it(){return W("any",()=>!0)}function E(t){return new te({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[r,n]of e.entries())yield[r,n,t]},coercer(e){return Array.isArray(e)?e.slice():e},validator(e){return Array.isArray(e)||`Expected an array value, but received: ${J(e)}`}})}function Mr(){return W("bigint",t=>typeof t=="bigint")}function z(){return W("boolean",t=>typeof t=="boolean")}function ee(){return W("integer",t=>typeof t=="number"&&!isNaN(t)&&Number.isInteger(t)||`Expected an integer, but received: ${J(t)}`)}function k(t){const e=J(t),r=typeof t;return new te({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?t:null,validator(n){return n===t||`Expected the literal \`${e}\`, but received: ${J(n)}`}})}function Yt(){return W("never",()=>!1)}function $(t){return new te({...t,validator:(e,r)=>e===null||t.validator(e,r),refiner:(e,r)=>e===null||t.refiner(e,r)})}function he(){return W("number",t=>typeof t=="number"&&!isNaN(t)||`Expected a number, but received: ${J(t)}`)}function p(t){const e=t?Object.keys(t):[],r=Yt();return new te({type:"object",schema:t||null,*entries(n){if(t&&K(n)){const i=new Set(Object.keys(n));for(const s of e)i.delete(s),yield[s,n[s],t[s]];for(const s of i)yield[s,n[s],r]}},validator(n){return K(n)||`Expected an object, but received: ${J(n)}`},coercer(n){return K(n)?{...n}:n}})}function v(t){return new te({...t,validator:(e,r)=>e===void 0||t.validator(e,r),refiner:(e,r)=>e===void 0||t.refiner(e,r)})}function Q(t,e){return new te({type:"record",schema:null,*entries(r){if(K(r))for(const n in r){const i=r[n];yield[n,n,t],yield[n,i,e]}},validator(r){return K(r)||`Expected an object, but received: ${J(r)}`}})}function h(){return W("string",t=>typeof t=="string"||`Expected a string, but received: ${J(t)}`)}function Qt(t){const e=Yt();return new te({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(t.length,r.length);for(let i=0;i<n;i++)yield[i,r[i],t[i]||e]}},validator(r){return Array.isArray(r)||`Expected an array, but received: ${J(r)}`}})}function Rr(t){const e=Object.keys(t);return new te({type:"type",schema:t,*entries(r){if(K(r))for(const n of e)yield[n,r[n],t[n]]},validator(r){return K(r)||`Expected an object, but received: ${J(r)}`},coercer(r){return K(r)?{...r}:r}})}function P(t){const e=t.map(r=>r.type).join(" | ");return new te({type:"union",schema:null,coercer(r){for(const n of t){const[i,s]=n.validate(r,{coerce:!0});if(!i)return s}return r},validator(r,n){const i=[];for(const s of t){const[...c]=lt(r,s,n),[a]=c;if(a[0])for(const[o]of c)o&&i.push(o);else return[]}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${J(r)}`,...i]}})}function er(){return W("unknown",()=>!0)}const ft=P([p({AddressOwner:h()}),p({ObjectOwner:h()}),p({Shared:p({initial_shared_version:$(h())})}),k("Immutable")]);W("SuiJsonValue",()=>!0);const Nr=P([p({u32:h()}),p({u64:h()}),p({f64:h()})]);p({attributes:Q(h(),$(Nr)),featureFlags:Q(h(),z()),maxSupportedProtocolVersion:h(),minSupportedProtocolVersion:h(),protocolVersion:h()});P([h(),k("package")]);const ce=p({digest:h(),objectId:h(),version:P([he(),h(),Mr()])});p({owner:ft,reference:ce});p({objectId:h(),sequenceNumber:h()});p({payment:E(ce),owner:h(),price:h(),budget:h()});const Dr=je(ce,p({type:h(),owner:ft,previousTransaction:h()})),Vr=Q(h(),it()),zr=Q(h(),er()),Fr=p({type:h(),fields:Vr,hasPublicTransfer:z()}),Gr=p({disassembled:zr}),Lr=P([je(Fr,p({dataType:k("moveObject")})),je(Gr,p({dataType:k("package")}))]),Wr=p({type:h(),hasPublicTransfer:z(),version:h(),bcsBytes:h()}),Kr=p({id:h(),moduleMap:Q(h(),h())}),Jr=P([je(Wr,p({dataType:k("moveObject")})),je(Kr,p({dataType:k("package")}))]);BigInt(1e9);const tr=p({code:h(),error:v(h()),object_id:v(h()),parent_object_id:v(h()),version:v(h()),digest:v(h())}),Hr=p({data:$(v(Q(h(),h()))),error:$(v(tr))}),qr=P([Hr,v(Q(h(),h()))]),rr=p({objectId:h(),version:h(),digest:h(),type:$(v(h())),content:$(v(Lr)),bcs:$(v(Jr)),owner:$(v(ft)),previousTransaction:$(v(h())),storageRebate:$(v(h())),display:$(v(qr))});p({showType:$(v(z())),showContent:$(v(z())),showBcs:$(v(z())),showOwner:$(v(z())),showPreviousTransaction:$(v(z())),showStorageRebate:$(v(z())),showDisplay:$(v(z()))});P([k("Exists"),k("notExists"),k("Deleted")]);E(Dr);const Xr=p({data:$(v(rr)),error:$(v(tr))});function Zr(t){return t.data}function Yr(t){if(t.error&&"object_id"in t.error&&"version"in t.error&&"digest"in t.error){const e=t.error;return{objectId:e.object_id,version:e.version,digest:e.digest}}}function Wt(t){if("reference"in t)return t.reference;const e=Zr(t);return e?{objectId:e.objectId,version:e.version,digest:e.digest}:Yr(t)}p({objectId:h(),atCheckpoint:v(he())});p({data:E(Xr),nextCursor:v($(h())),hasNextPage:z()});P([p({details:rr,status:k("VersionFound")}),p({details:h(),status:k("ObjectNotExists")}),p({details:ce,status:k("ObjectDeleted")}),p({details:Qt([h(),he()]),status:k("VersionNotFound")}),p({details:p({asked_version:he(),latest_version:he(),object_id:h()}),status:k("VersionTooHigh")})]);const Qr=P([h(),p({Object:h()})]);E(Qr);const en=p({address:h(),name:h()}),tn=P([k("Private"),k("Public"),k("Friend")]),ht=p({abilities:E(h())}),rn=p({constraints:ht,isPhantom:z()}),nn=p({TypeParameter:he()}),Xe=Qt([p({module:h(),package:h(),function:h()}),h()]);p({rank3Days:E(Xe),rank7Days:E(Xe),rank30Days:E(Xe)});function nr(t){if(!t)return!1;if(typeof t=="string"||L(t,nn)||ir(t))return!0;if(typeof t!="object")return!1;const e=t;return!!(L(e.Reference,me)||L(e.MutableReference,me)||L(e.Vector,me))}const me=W("SuiMoveNormalizedType",nr);function ir(t){if(!t||typeof t!="object")return!1;const e=t;if(!e.Struct||typeof e.Struct!="object")return!1;const r=e.Struct;return!(typeof r.address!="string"||typeof r.module!="string"||typeof r.name!="string"||!Array.isArray(r.typeArguments)||!r.typeArguments.every(n=>nr(n)))}W("SuiMoveNormalizedStructType",ir);const sn=p({visibility:tn,isEntry:z(),typeParameters:E(ht),parameters:E(me),return:E(me)}),an=p({name:h(),type:me}),on=p({abilities:ht,typeParameters:E(rn),fields:E(an)}),cn=p({fileFormatVersion:he(),address:h(),name:h(),friends:E(en),structs:Q(h(),on),exposedFunctions:Q(h(),sn)});Q(h(),cn);function st(t){return typeof t=="object"&&"MutableReference"in t?t.MutableReference:void 0}function sr(t){return typeof t=="object"&&"Reference"in t?t.Reference:void 0}function gt(t){if(typeof t=="object"&&"Struct"in t)return t;const e=sr(t),r=st(t);if(typeof e=="object"&&"Struct"in e)return e;if(typeof r=="object"&&"Struct"in r)return r}function un(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r<e.length;r++)e[r]=255;for(var n=0;n<t.length;n++){var i=t.charAt(n),s=i.charCodeAt(0);if(e[s]!==255)throw new TypeError(i+" is ambiguous");e[s]=n}var c=t.length,a=t.charAt(0),o=Math.log(c)/Math.log(256),d=Math.log(256)/Math.log(c);function u(y){if(y instanceof Uint8Array||(ArrayBuffer.isView(y)?y=new Uint8Array(y.buffer,y.byteOffset,y.byteLength):Array.isArray(y)&&(y=Uint8Array.from(y))),!(y instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(y.length===0)return"";for(var S=0,T=0,f=0,O=y.length;f!==O&&y[f]===0;)f++,S++;for(var B=(O-f)*d+1>>>0,M=new Uint8Array(B);f!==O;){for(var A=y[f],j=0,R=B-1;(A!==0||j<T)&&R!==-1;R--,j++)A+=256*M[R]>>>0,M[R]=A%c>>>0,A=A/c>>>0;if(A!==0)throw new Error("Non-zero carry");T=j,f++}for(var H=B-T;H!==B&&M[H]===0;)H++;for(var pe=a.repeat(S);H<B;++H)pe+=t.charAt(M[H]);return pe}function g(y){if(typeof y!="string")throw new TypeError("Expected String");if(y.length===0)return new Uint8Array;for(var S=0,T=0,f=0;y[S]===a;)T++,S++;for(var O=(y.length-S)*o+1>>>0,B=new Uint8Array(O);y[S];){var M=e[y.charCodeAt(S)];if(M===255)return;for(var A=0,j=O-1;(M!==0||A<f)&&j!==-1;j--,A++)M+=c*B[j]>>>0,B[j]=M%256>>>0,M=M/256>>>0;if(M!==0)throw new Error("Non-zero carry");f=A,S++}for(var R=O-f;R!==O&&B[R]===0;)R++;for(var H=new Uint8Array(T+(O-R)),pe=T;R!==O;)H[pe++]=B[R++];return H}function m(y){var S=g(y);if(S)return S;throw new Error("Non-base"+c+" character")}return{encode:u,decodeUnsafe:g,decode:m}}var dn=un;const ln=dn,fn="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";var hn=ln(fn);const ar=w.getDefaultExportFromCjs(hn),xe=t=>ar.encode(t),pt=t=>ar.decode(t);function ue(t){return Uint8Array.from(atob(t),e=>e.charCodeAt(0))}const Ze=8192;function Be(t){if(t.length<Ze)return btoa(String.fromCharCode(...t));let e="";for(var r=0;r<t.length;r+=Ze){const n=t.slice(r,r+Ze);e+=String.fromCharCode(...n)}return btoa(e)}function Je(t){var i;const e=t.startsWith("0x")?t.slice(2):t,n=((i=(e.length%2===0?e:`0${e}}`).match(/.{2}/g))==null?void 0:i.map(s=>parseInt(s,16)))??[];return Uint8Array.from(n)}function Ce(t){return t.reduce((e,r)=>e+r.toString(16).padStart(2,"0"),"")}function yt(t){let e=[],r=0;if(t===0)return[0];for(;t>0;)e[r]=t&127,(t>>=7)&&(e[r]|=128),r+=1;return e}function gn(t){let e=0,r=0,n=0;for(;;){let i=t[n];if(n+=1,e|=(i&127)<<r,!(i&128))break;r+=7}return{value:e,length:n}}class or{constructor(e){this.bytePosition=0,this.dataView=new DataView(e.buffer)}shift(e){return this.bytePosition+=e,this}read8(){let e=this.dataView.getUint8(this.bytePosition);return this.shift(1),e}read16(){let e=this.dataView.getUint16(this.bytePosition,!0);return this.shift(2),e}read32(){let e=this.dataView.getUint32(this.bytePosition,!0);return this.shift(4),e}read64(){let e=this.read32(),n=this.read32().toString(16)+e.toString(16).padStart(8,"0");return BigInt("0x"+n).toString(10)}read128(){let e=BigInt(this.read64()),n=BigInt(this.read64()).toString(16)+e.toString(16).padStart(16,"0");return BigInt("0x"+n).toString(10)}read256(){let e=BigInt(this.read128()),n=BigInt(this.read128()).toString(16)+e.toString(16).padStart(32,"0");return BigInt("0x"+n).toString(10)}readBytes(e){let r=this.bytePosition+this.dataView.byteOffset,n=new Uint8Array(this.dataView.buffer,r,e);return this.shift(e),n}readULEB(){let e=this.bytePosition+this.dataView.byteOffset,r=new Uint8Array(this.dataView.buffer,e),{value:n,length:i}=gn(r);return this.shift(i),n}readVec(e){let r=this.readULEB(),n=[];for(let i=0;i<r;i++)n.push(e(this,i,r));return n}}function pn(t,e){switch(e){case"base58":return xe(t);case"base64":return Be(t);case"hex":return Ce(t);default:throw new Error("Unsupported encoding, supported values are: base64, hex")}}function yn(t,e){switch(e){case"base58":return pt(t);case"base64":return ue(t);case"hex":return Je(t);default:throw new Error("Unsupported encoding, supported values are: base64, hex")}}function mt(t,e=["<",">"]){const[r,n]=e,i=[];let s="",c=0;for(let a=0;a<t.length;a++){const o=t[a];if(o===r&&c++,o===n&&c--,c===0&&o===","){i.push(s.trim()),s="";continue}s+=o}return i.push(s.trim()),i}class cr{constructor({size:e=1024,maxSize:r,allocateSize:n=1024}={}){this.bytePosition=0,this.size=e,this.maxSize=r||e,this.allocateSize=n,this.dataView=new DataView(new ArrayBuffer(e))}ensureSizeOrGrow(e){const r=this.bytePosition+e;if(r>this.size){const n=Math.min(this.maxSize,this.size+this.allocateSize);if(r>n)throw new Error(`Attempting to serialize to BCS, but buffer does not have enough size. Allocated size: ${this.size}, Max size: ${this.maxSize}, Required size: ${r}`);this.size=n;const i=new ArrayBuffer(this.size);new Uint8Array(i).set(new Uint8Array(this.dataView.buffer)),this.dataView=new DataView(i)}}shift(e){return this.bytePosition+=e,this}write8(e){return this.ensureSizeOrGrow(1),this.dataView.setUint8(this.bytePosition,Number(e)),this.shift(1)}write16(e){return this.ensureSizeOrGrow(2),this.dataView.setUint16(this.bytePosition,Number(e),!0),this.shift(2)}write32(e){return this.ensureSizeOrGrow(4),this.dataView.setUint32(this.bytePosition,Number(e),!0),this.shift(4)}write64(e){return Ye(BigInt(e),8).forEach(r=>this.write8(r)),this}write128(e){return Ye(BigInt(e),16).forEach(r=>this.write8(r)),this}write256(e){return Ye(BigInt(e),32).forEach(r=>this.write8(r)),this}writeULEB(e){return yt(e).forEach(r=>this.write8(r)),this}writeVec(e,r){return this.writeULEB(e.length),Array.from(e).forEach((n,i)=>r(this,n,i,e.length)),this}*[Symbol.iterator](){for(let e=0;e<this.bytePosition;e++)yield this.dataView.getUint8(e);return this.toBytes()}toBytes(){return new Uint8Array(this.dataView.buffer.slice(0,this.bytePosition))}toString(e){return pn(this.toBytes(),e)}}function Ye(t,e){let r=new Uint8Array(e),n=0;for(;t>0;)r[n]=Number(t%BigInt(256)),t=t/BigInt(256),n+=1;return r}var ur=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},X=(t,e,r)=>(ur(t,e,"read from private field"),r?r.call(t):e.get(t)),ze=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Fe=(t,e,r,n)=>(ur(t,e,"write to private field"),e.set(t,r),r),ye,Se,Me,ae;const dr=class{constructor(t){ze(this,ye,void 0),ze(this,Se,void 0),this.name=t.name,this.read=t.read,this.serializedSize=t.serializedSize??(()=>null),Fe(this,ye,t.write),Fe(this,Se,t.serialize??((e,r)=>{const n=new cr({size:this.serializedSize(e)??void 0,...r});return X(this,ye).call(this,e,n),n.toBytes()})),this.validate=t.validate??(()=>{})}write(t,e){this.validate(t),X(this,ye).call(this,t,e)}serialize(t,e){return this.validate(t),new mn(this,X(this,Se).call(this,t,e))}parse(t){const e=new or(t);return this.read(e)}transform({name:t,input:e,output:r}){return new dr({name:t??this.name,read:n=>r(this.read(n)),write:(n,i)=>X(this,ye).call(this,e(n),i),serializedSize:n=>this.serializedSize(e(n)),serialize:(n,i)=>X(this,Se).call(this,e(n),i),validate:n=>this.validate(e(n))})}};let Z=dr;ye=new WeakMap;Se=new WeakMap;const lr=Symbol.for("@mysten/serialized-bcs");function wt(t){return!!t&&typeof t=="object"&&t[lr]===!0}class mn{constructor(e,r){ze(this,Me,void 0),ze(this,ae,void 0),Fe(this,Me,e),Fe(this,ae,r)}get[lr](){return!0}toBytes(){return X(this,ae)}toHex(){return Ce(X(this,ae))}toBase64(){return Be(X(this,ae))}toBase58(){return xe(X(this,ae))}parse(){return X(this,Me).parse(X(this,ae))}}Me=new WeakMap;ae=new WeakMap;function Ge({size:t,...e}){return new Z({...e,serializedSize:()=>t})}function Qe({readMethod:t,writeMethod:e,...r}){return Ge({...r,read:n=>n[t](),write:(n,i)=>i[e](n),validate:n=>{var i;if(n<0||n>r.maxValue)throw new TypeError(`Invalid ${r.name} value: ${n}. Expected value in range 0-${r.maxValue}`);(i=r.validate)==null||i.call(r,n)}})}function et({readMethod:t,writeMethod:e,...r}){return Ge({...r,read:n=>n[t](),write:(n,i)=>i[e](BigInt(n)),validate:n=>{var s;const i=BigInt(n);if(i<0||i>r.maxValue)throw new TypeError(`Invalid ${r.name} value: ${i}. Expected value in range 0-${r.maxValue}`);(s=r.validate)==null||s.call(r,i)}})}function wn({serialize:t,...e}){const r=new Z({...e,serialize:t,write:(n,i)=>{for(const s of r.serialize(n).toBytes())i.write8(s)}});return r}function bn({toBytes:t,fromBytes:e,...r}){return new Z({...r,read:n=>{const i=n.readULEB(),s=n.readBytes(i);return e(s)},write:(n,i)=>{const s=t(n);i.writeULEB(s.length);for(let c=0;c<s.length;c++)i.write8(s[c])},serialize:n=>{const i=t(n),s=yt(i.length),c=new Uint8Array(s.length+i.length);return c.set(s,0),c.set(i,s.length),c},validate:n=>{var i;if(typeof n!="string")throw new TypeError(`Invalid ${r.name} value: ${n}. Expected string`);(i=r.validate)==null||i.call(r,n)}})}function Sn(t){let e=null;function r(){return e||(e=t()),e}return new Z({name:"lazy",read:n=>r().read(n),serializedSize:n=>r().serializedSize(n),write:(n,i)=>r().write(n,i),serialize:(n,i)=>r().serialize(n,i).toBytes()})}const l={u8(t){return Qe({name:"u8",readMethod:"read8",writeMethod:"write8",size:1,maxValue:2**8-1,...t})},u16(t){return Qe({name:"u16",readMethod:"read16",writeMethod:"write16",size:2,maxValue:2**16-1,...t})},u32(t){return Qe({name:"u32",readMethod:"read32",writeMethod:"write32",size:4,maxValue:2**32-1,...t})},u64(t){return et({name:"u64",readMethod:"read64",writeMethod:"write64",size:8,maxValue:2n**64n-1n,...t})},u128(t){return et({name:"u128",readMethod:"read128",writeMethod:"write128",size:16,maxValue:2n**128n-1n,...t})},u256(t){return et({name:"u256",readMethod:"read256",writeMethod:"write256",size:32,maxValue:2n**256n-1n,...t})},bool(t){return Ge({name:"bool",size:1,read:e=>e.read8()===1,write:(e,r)=>r.write8(e?1:0),...t,validate:e=>{var r;if((r=t==null?void 0:t.validate)==null||r.call(t,e),typeof e!="boolean")throw new TypeError(`Expected boolean, found ${typeof e}`)}})},uleb128(t){return wn({name:"uleb128",read:e=>e.readULEB(),serialize:e=>Uint8Array.from(yt(e)),...t})},bytes(t,e){return Ge({name:`bytes[${t}]`,size:t,read:r=>r.readBytes(t),write:(r,n)=>{for(let i=0;i<t;i++)n.write8(r[i]??0)},...e,validate:r=>{var n;if((n=e==null?void 0:e.validate)==null||n.call(e,r),!("length"in r))throw new TypeError(`Expected array, found ${typeof r}`);if(r.length!==t)throw new TypeError(`Expected array of length ${t}, found ${r.length}`)}})},string(t){return bn({name:"string",toBytes:e=>new TextEncoder().encode(e),fromBytes:e=>new TextDecoder().decode(e),...t})},fixedArray(t,e,r){return new Z({name:`${e.name}[${t}]`,read:n=>{const i=new Array(t);for(let s=0;s<t;s++)i[s]=e.read(n);return i},write:(n,i)=>{for(const s of n)e.write(s,i)},...r,validate:n=>{var i;if((i=r==null?void 0:r.validate)==null||i.call(r,n),!("length"in n))throw new TypeError(`Expected array, found ${typeof n}`);if(n.length!==t)throw new TypeError(`Expected array of length ${t}, found ${n.length}`)}})},option(t){return l.enum(`Option<${t.name}>`,{None:null,Some:t}).transform({input:e=>e==null?{None:!0}:{Some:e},output:e=>"Some"in e?e.Some:null})},vector(t,e){return new Z({name:`vector<${t.name}>`,read:r=>{const n=r.readULEB(),i=new Array(n);for(let s=0;s<n;s++)i[s]=t.read(r);return i},write:(r,n)=>{n.writeULEB(r.length);for(const i of r)t.write(i,n)},...e,validate:r=>{var n;if((n=e==null?void 0:e.validate)==null||n.call(e,r),!("length"in r))throw new TypeError(`Expected array, found ${typeof r}`)}})},tuple(t,e){return new Z({name:`(${t.map(r=>r.name).join(", ")})`,serializedSize:r=>{let n=0;for(let i=0;i<t.length;i++){const s=t[i].serializedSize(r[i]);if(s==null)return null;n+=s}return n},read:r=>{const n=[];for(const i of t)n.push(i.read(r));return n},write:(r,n)=>{for(let i=0;i<t.length;i++)t[i].write(r[i],n)},...e,validate:r=>{var n;if((n=e==null?void 0:e.validate)==null||n.call(e,r),!Array.isArray(r))throw new TypeError(`Expected array, found ${typeof r}`);if(r.length!==t.length)throw new TypeError(`Expected array of length ${t.length}, found ${r.length}`)}})},struct(t,e,r){const n=Object.entries(e);return new Z({name:t,serializedSize:i=>{let s=0;for(const[c,a]of n){const o=a.serializedSize(i[c]);if(o==null)return null;s+=o}return s},read:i=>{const s={};for(const[c,a]of n)s[c]=a.read(i);return s},write:(i,s)=>{for(const[c,a]of n)a.write(i[c],s)},...r,validate:i=>{var s;if((s=r==null?void 0:r.validate)==null||s.call(r,i),typeof i!="object"||i==null)throw new TypeError(`Expected object, found ${typeof i}`)}})},enum(t,e,r){const n=Object.entries(e);return new Z({name:t,read:i=>{const s=i.readULEB(),[c,a]=n[s];return{[c]:(a==null?void 0:a.read(i))??!0}},write:(i,s)=>{const[c,a]=Object.entries(i)[0];for(let o=0;o<n.length;o++){const[d,u]=n[o];if(d===c){s.writeULEB(o),u==null||u.write(a,s);return}}},...r,validate:i=>{var a;if((a=r==null?void 0:r.validate)==null||a.call(r,i),typeof i!="object"||i==null)throw new TypeError(`Expected object, found ${typeof i}`);const s=Object.keys(i);if(s.length!==1)throw new TypeError(`Expected object with one key, found ${s.length}`);const[c]=s;if(!Object.hasOwn(e,c))throw new TypeError(`Invalid enum variant ${c}`)}})},map(t,e){return l.vector(l.tuple([t,e])).transform({name:`Map<${t.name}, ${e.name}>`,input:r=>[...r.entries()],output:r=>{const n=new Map;for(const[i,s]of r)n.set(i,s);return n}})},generic(t,e){return(...r)=>e(...r).transform({name:`${e.name}<${r.map(n=>n.name).join(", ")}>`,input:n=>n,output:n=>n})},lazy(t){return Sn(t)}},Tn=32,Te=class{constructor(t){if(this.types=new Map,this.counter=0,t instanceof Te){this.schema=t.schema,this.types=new Map(t.types);return}if(this.schema=t,this.registerAddressType(Te.ADDRESS,t.addressLength,t.addressEncoding),this.registerVectorType(t.vectorType),t.types&&t.types.structs)for(let e of Object.keys(t.types.structs))this.registerStructType(e,t.types.structs[e]);if(t.types&&t.types.enums)for(let e of Object.keys(t.types.enums))this.registerEnumType(e,t.types.enums[e]);if(t.types&&t.types.aliases)for(let e of Object.keys(t.types.aliases))this.registerAlias(e,t.types.aliases[e]);t.withPrimitives!==!1&&vn(this)}tempKey(){return`bcs-struct-${++this.counter}`}ser(t,e,r){if(typeof t=="string"||Array.isArray(t)){const{name:n,params:i}=this.parseTypeName(t);return this.getTypeInterface(n).encode(this,e,r,i)}if(typeof t=="object"){const n=this.tempKey();return new Te(this).registerStructType(n,t).ser(n,e,r)}throw new Error(`Incorrect type passed into the '.ser()' function.
|
|
1
|
+
"use strict";var xr=Object.defineProperty;var Br=(t,e,r)=>e in t?xr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var U=(t,e,r)=>Br(t,typeof e!="symbol"?e+"":e,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("./index-DpZGf7ao.js"),b=require("./sui-ShulHFzj.js");require("./index-DtM_PqGv.js");class qt{constructor(e,r,n,i,s=!1){U(this,"transaction");U(this,"network");U(this,"chain");U(this,"description");U(this,"parallelizable");this.transaction=e,this.network=r,this.chain=n,this.description=i,this.parallelizable=s}}class Cr extends TypeError{constructor(e,r){let n;const{message:i,explanation:s,...c}=e,{path:a}=e,o=a.length===0?i:`At path: ${a.join(".")} -- ${i}`;super(s??o),s!=null&&(this.cause=o),Object.assign(this,c),this.name=this.constructor.name,this.failures=()=>n??(n=[e,...r()])}}function $r(t){return K(t)&&typeof t[Symbol.iterator]=="function"}function K(t){return typeof t=="object"&&t!=null}function J(t){return typeof t=="symbol"?t.toString():typeof t=="string"?JSON.stringify(t):`${t}`}function Ur(t){const{done:e,value:r}=t.next();return e?void 0:r}function Pr(t,e,r,n){if(t===!0)return;t===!1?t={}:typeof t=="string"&&(t={message:t});const{path:i,branch:s}=e,{type:c}=r,{refinement:a,message:o=`Expected a value of type \`${c}\`${a?` with refinement \`${a}\``:""}, but received: \`${J(n)}\``}=t;return{value:n,type:c,refinement:a,key:i[i.length-1],path:i,branch:s,...t,message:o}}function*Lt(t,e,r,n){$r(t)||(t=[t]);for(const i of t){const s=Pr(i,e,r,n);s&&(yield s)}}function*lt(t,e,r={}){const{path:n=[],branch:i=[t],coerce:s=!1,mask:c=!1}=r,a={path:n,branch:i};if(s&&(t=e.coercer(t,a),c&&e.type!=="type"&&K(e.schema)&&K(t)&&!Array.isArray(t)))for(const d in t)e.schema[d]===void 0&&delete t[d];let o="valid";for(const d of e.validator(t,a))d.explanation=r.message,o="not_valid",yield[d,void 0];for(let[d,u,g]of e.entries(t,a)){const m=lt(u,g,{path:d===void 0?n:[...n,d],branch:d===void 0?i:[...i,u],coerce:s,mask:c,message:r.message});for(const y of m)y[0]?(o=y[0].refinement!=null?"not_refined":"not_valid",yield[y[0],void 0]):s&&(u=y[1],d===void 0?t=u:t instanceof Map?t.set(d,u):t instanceof Set?t.add(u):K(t)&&(u!==void 0||d in t)&&(t[d]=u))}if(o!=="not_valid")for(const d of e.refiner(t,a))d.explanation=r.message,o="not_refined",yield[d,void 0];o==="valid"&&(yield[void 0,t])}class te{constructor(e){const{type:r,schema:n,validator:i,refiner:s,coercer:c=o=>o,entries:a=function*(){}}=e;this.type=r,this.schema=n,this.entries=a,this.coercer=c,i?this.validator=(o,d)=>{const u=i(o,d);return Lt(u,d,this,o)}:this.validator=()=>[],s?this.refiner=(o,d)=>{const u=s(o,d);return Lt(u,d,this,o)}:this.refiner=()=>[]}assert(e,r){return nt(e,this,r)}create(e,r){return Xt(e,this,r)}is(e){return L(e,this)}mask(e,r){return Zt(e,this,r)}validate(e,r={}){return _e(e,this,r)}}function nt(t,e,r){const n=_e(t,e,{message:r});if(n[0])throw n[0]}function Xt(t,e,r){const n=_e(t,e,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function Zt(t,e,r){const n=_e(t,e,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function L(t,e){return!_e(t,e)[0]}function _e(t,e,r={}){const n=lt(t,e,r),i=Ur(n);return i[0]?[new Cr(i[0],function*(){for(const c of n)c[0]&&(yield c[0])}),void 0]:[void 0,i[1]]}function je(...t){const e=t[0].type==="type",r=t.map(i=>i.schema),n=Object.assign({},...r);return e?Rr(n):p(n)}function W(t,e){return new te({type:t,schema:null,validator:e})}function it(){return W("any",()=>!0)}function E(t){return new te({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[r,n]of e.entries())yield[r,n,t]},coercer(e){return Array.isArray(e)?e.slice():e},validator(e){return Array.isArray(e)||`Expected an array value, but received: ${J(e)}`}})}function Mr(){return W("bigint",t=>typeof t=="bigint")}function z(){return W("boolean",t=>typeof t=="boolean")}function ee(){return W("integer",t=>typeof t=="number"&&!isNaN(t)&&Number.isInteger(t)||`Expected an integer, but received: ${J(t)}`)}function k(t){const e=J(t),r=typeof t;return new te({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?t:null,validator(n){return n===t||`Expected the literal \`${e}\`, but received: ${J(n)}`}})}function Yt(){return W("never",()=>!1)}function $(t){return new te({...t,validator:(e,r)=>e===null||t.validator(e,r),refiner:(e,r)=>e===null||t.refiner(e,r)})}function he(){return W("number",t=>typeof t=="number"&&!isNaN(t)||`Expected a number, but received: ${J(t)}`)}function p(t){const e=t?Object.keys(t):[],r=Yt();return new te({type:"object",schema:t||null,*entries(n){if(t&&K(n)){const i=new Set(Object.keys(n));for(const s of e)i.delete(s),yield[s,n[s],t[s]];for(const s of i)yield[s,n[s],r]}},validator(n){return K(n)||`Expected an object, but received: ${J(n)}`},coercer(n){return K(n)?{...n}:n}})}function v(t){return new te({...t,validator:(e,r)=>e===void 0||t.validator(e,r),refiner:(e,r)=>e===void 0||t.refiner(e,r)})}function Q(t,e){return new te({type:"record",schema:null,*entries(r){if(K(r))for(const n in r){const i=r[n];yield[n,n,t],yield[n,i,e]}},validator(r){return K(r)||`Expected an object, but received: ${J(r)}`}})}function h(){return W("string",t=>typeof t=="string"||`Expected a string, but received: ${J(t)}`)}function Qt(t){const e=Yt();return new te({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(t.length,r.length);for(let i=0;i<n;i++)yield[i,r[i],t[i]||e]}},validator(r){return Array.isArray(r)||`Expected an array, but received: ${J(r)}`}})}function Rr(t){const e=Object.keys(t);return new te({type:"type",schema:t,*entries(r){if(K(r))for(const n of e)yield[n,r[n],t[n]]},validator(r){return K(r)||`Expected an object, but received: ${J(r)}`},coercer(r){return K(r)?{...r}:r}})}function P(t){const e=t.map(r=>r.type).join(" | ");return new te({type:"union",schema:null,coercer(r){for(const n of t){const[i,s]=n.validate(r,{coerce:!0});if(!i)return s}return r},validator(r,n){const i=[];for(const s of t){const[...c]=lt(r,s,n),[a]=c;if(a[0])for(const[o]of c)o&&i.push(o);else return[]}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${J(r)}`,...i]}})}function er(){return W("unknown",()=>!0)}const ft=P([p({AddressOwner:h()}),p({ObjectOwner:h()}),p({Shared:p({initial_shared_version:$(h())})}),k("Immutable")]);W("SuiJsonValue",()=>!0);const Nr=P([p({u32:h()}),p({u64:h()}),p({f64:h()})]);p({attributes:Q(h(),$(Nr)),featureFlags:Q(h(),z()),maxSupportedProtocolVersion:h(),minSupportedProtocolVersion:h(),protocolVersion:h()});P([h(),k("package")]);const ce=p({digest:h(),objectId:h(),version:P([he(),h(),Mr()])});p({owner:ft,reference:ce});p({objectId:h(),sequenceNumber:h()});p({payment:E(ce),owner:h(),price:h(),budget:h()});const Dr=je(ce,p({type:h(),owner:ft,previousTransaction:h()})),Vr=Q(h(),it()),zr=Q(h(),er()),Fr=p({type:h(),fields:Vr,hasPublicTransfer:z()}),Gr=p({disassembled:zr}),Lr=P([je(Fr,p({dataType:k("moveObject")})),je(Gr,p({dataType:k("package")}))]),Wr=p({type:h(),hasPublicTransfer:z(),version:h(),bcsBytes:h()}),Kr=p({id:h(),moduleMap:Q(h(),h())}),Jr=P([je(Wr,p({dataType:k("moveObject")})),je(Kr,p({dataType:k("package")}))]);BigInt(1e9);const tr=p({code:h(),error:v(h()),object_id:v(h()),parent_object_id:v(h()),version:v(h()),digest:v(h())}),Hr=p({data:$(v(Q(h(),h()))),error:$(v(tr))}),qr=P([Hr,v(Q(h(),h()))]),rr=p({objectId:h(),version:h(),digest:h(),type:$(v(h())),content:$(v(Lr)),bcs:$(v(Jr)),owner:$(v(ft)),previousTransaction:$(v(h())),storageRebate:$(v(h())),display:$(v(qr))});p({showType:$(v(z())),showContent:$(v(z())),showBcs:$(v(z())),showOwner:$(v(z())),showPreviousTransaction:$(v(z())),showStorageRebate:$(v(z())),showDisplay:$(v(z()))});P([k("Exists"),k("notExists"),k("Deleted")]);E(Dr);const Xr=p({data:$(v(rr)),error:$(v(tr))});function Zr(t){return t.data}function Yr(t){if(t.error&&"object_id"in t.error&&"version"in t.error&&"digest"in t.error){const e=t.error;return{objectId:e.object_id,version:e.version,digest:e.digest}}}function Wt(t){if("reference"in t)return t.reference;const e=Zr(t);return e?{objectId:e.objectId,version:e.version,digest:e.digest}:Yr(t)}p({objectId:h(),atCheckpoint:v(he())});p({data:E(Xr),nextCursor:v($(h())),hasNextPage:z()});P([p({details:rr,status:k("VersionFound")}),p({details:h(),status:k("ObjectNotExists")}),p({details:ce,status:k("ObjectDeleted")}),p({details:Qt([h(),he()]),status:k("VersionNotFound")}),p({details:p({asked_version:he(),latest_version:he(),object_id:h()}),status:k("VersionTooHigh")})]);const Qr=P([h(),p({Object:h()})]);E(Qr);const en=p({address:h(),name:h()}),tn=P([k("Private"),k("Public"),k("Friend")]),ht=p({abilities:E(h())}),rn=p({constraints:ht,isPhantom:z()}),nn=p({TypeParameter:he()}),Xe=Qt([p({module:h(),package:h(),function:h()}),h()]);p({rank3Days:E(Xe),rank7Days:E(Xe),rank30Days:E(Xe)});function nr(t){if(!t)return!1;if(typeof t=="string"||L(t,nn)||ir(t))return!0;if(typeof t!="object")return!1;const e=t;return!!(L(e.Reference,me)||L(e.MutableReference,me)||L(e.Vector,me))}const me=W("SuiMoveNormalizedType",nr);function ir(t){if(!t||typeof t!="object")return!1;const e=t;if(!e.Struct||typeof e.Struct!="object")return!1;const r=e.Struct;return!(typeof r.address!="string"||typeof r.module!="string"||typeof r.name!="string"||!Array.isArray(r.typeArguments)||!r.typeArguments.every(n=>nr(n)))}W("SuiMoveNormalizedStructType",ir);const sn=p({visibility:tn,isEntry:z(),typeParameters:E(ht),parameters:E(me),return:E(me)}),an=p({name:h(),type:me}),on=p({abilities:ht,typeParameters:E(rn),fields:E(an)}),cn=p({fileFormatVersion:he(),address:h(),name:h(),friends:E(en),structs:Q(h(),on),exposedFunctions:Q(h(),sn)});Q(h(),cn);function st(t){return typeof t=="object"&&"MutableReference"in t?t.MutableReference:void 0}function sr(t){return typeof t=="object"&&"Reference"in t?t.Reference:void 0}function gt(t){if(typeof t=="object"&&"Struct"in t)return t;const e=sr(t),r=st(t);if(typeof e=="object"&&"Struct"in e)return e;if(typeof r=="object"&&"Struct"in r)return r}function un(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r<e.length;r++)e[r]=255;for(var n=0;n<t.length;n++){var i=t.charAt(n),s=i.charCodeAt(0);if(e[s]!==255)throw new TypeError(i+" is ambiguous");e[s]=n}var c=t.length,a=t.charAt(0),o=Math.log(c)/Math.log(256),d=Math.log(256)/Math.log(c);function u(y){if(y instanceof Uint8Array||(ArrayBuffer.isView(y)?y=new Uint8Array(y.buffer,y.byteOffset,y.byteLength):Array.isArray(y)&&(y=Uint8Array.from(y))),!(y instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(y.length===0)return"";for(var S=0,T=0,f=0,O=y.length;f!==O&&y[f]===0;)f++,S++;for(var B=(O-f)*d+1>>>0,M=new Uint8Array(B);f!==O;){for(var A=y[f],j=0,R=B-1;(A!==0||j<T)&&R!==-1;R--,j++)A+=256*M[R]>>>0,M[R]=A%c>>>0,A=A/c>>>0;if(A!==0)throw new Error("Non-zero carry");T=j,f++}for(var H=B-T;H!==B&&M[H]===0;)H++;for(var pe=a.repeat(S);H<B;++H)pe+=t.charAt(M[H]);return pe}function g(y){if(typeof y!="string")throw new TypeError("Expected String");if(y.length===0)return new Uint8Array;for(var S=0,T=0,f=0;y[S]===a;)T++,S++;for(var O=(y.length-S)*o+1>>>0,B=new Uint8Array(O);y[S];){var M=e[y.charCodeAt(S)];if(M===255)return;for(var A=0,j=O-1;(M!==0||A<f)&&j!==-1;j--,A++)M+=c*B[j]>>>0,B[j]=M%256>>>0,M=M/256>>>0;if(M!==0)throw new Error("Non-zero carry");f=A,S++}for(var R=O-f;R!==O&&B[R]===0;)R++;for(var H=new Uint8Array(T+(O-R)),pe=T;R!==O;)H[pe++]=B[R++];return H}function m(y){var S=g(y);if(S)return S;throw new Error("Non-base"+c+" character")}return{encode:u,decodeUnsafe:g,decode:m}}var dn=un;const ln=dn,fn="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";var hn=ln(fn);const ar=w.getDefaultExportFromCjs(hn),xe=t=>ar.encode(t),pt=t=>ar.decode(t);function ue(t){return Uint8Array.from(atob(t),e=>e.charCodeAt(0))}const Ze=8192;function Be(t){if(t.length<Ze)return btoa(String.fromCharCode(...t));let e="";for(var r=0;r<t.length;r+=Ze){const n=t.slice(r,r+Ze);e+=String.fromCharCode(...n)}return btoa(e)}function Je(t){var i;const e=t.startsWith("0x")?t.slice(2):t,n=((i=(e.length%2===0?e:`0${e}}`).match(/.{2}/g))==null?void 0:i.map(s=>parseInt(s,16)))??[];return Uint8Array.from(n)}function Ce(t){return t.reduce((e,r)=>e+r.toString(16).padStart(2,"0"),"")}function yt(t){let e=[],r=0;if(t===0)return[0];for(;t>0;)e[r]=t&127,(t>>=7)&&(e[r]|=128),r+=1;return e}function gn(t){let e=0,r=0,n=0;for(;;){let i=t[n];if(n+=1,e|=(i&127)<<r,!(i&128))break;r+=7}return{value:e,length:n}}class or{constructor(e){this.bytePosition=0,this.dataView=new DataView(e.buffer)}shift(e){return this.bytePosition+=e,this}read8(){let e=this.dataView.getUint8(this.bytePosition);return this.shift(1),e}read16(){let e=this.dataView.getUint16(this.bytePosition,!0);return this.shift(2),e}read32(){let e=this.dataView.getUint32(this.bytePosition,!0);return this.shift(4),e}read64(){let e=this.read32(),n=this.read32().toString(16)+e.toString(16).padStart(8,"0");return BigInt("0x"+n).toString(10)}read128(){let e=BigInt(this.read64()),n=BigInt(this.read64()).toString(16)+e.toString(16).padStart(16,"0");return BigInt("0x"+n).toString(10)}read256(){let e=BigInt(this.read128()),n=BigInt(this.read128()).toString(16)+e.toString(16).padStart(32,"0");return BigInt("0x"+n).toString(10)}readBytes(e){let r=this.bytePosition+this.dataView.byteOffset,n=new Uint8Array(this.dataView.buffer,r,e);return this.shift(e),n}readULEB(){let e=this.bytePosition+this.dataView.byteOffset,r=new Uint8Array(this.dataView.buffer,e),{value:n,length:i}=gn(r);return this.shift(i),n}readVec(e){let r=this.readULEB(),n=[];for(let i=0;i<r;i++)n.push(e(this,i,r));return n}}function pn(t,e){switch(e){case"base58":return xe(t);case"base64":return Be(t);case"hex":return Ce(t);default:throw new Error("Unsupported encoding, supported values are: base64, hex")}}function yn(t,e){switch(e){case"base58":return pt(t);case"base64":return ue(t);case"hex":return Je(t);default:throw new Error("Unsupported encoding, supported values are: base64, hex")}}function mt(t,e=["<",">"]){const[r,n]=e,i=[];let s="",c=0;for(let a=0;a<t.length;a++){const o=t[a];if(o===r&&c++,o===n&&c--,c===0&&o===","){i.push(s.trim()),s="";continue}s+=o}return i.push(s.trim()),i}class cr{constructor({size:e=1024,maxSize:r,allocateSize:n=1024}={}){this.bytePosition=0,this.size=e,this.maxSize=r||e,this.allocateSize=n,this.dataView=new DataView(new ArrayBuffer(e))}ensureSizeOrGrow(e){const r=this.bytePosition+e;if(r>this.size){const n=Math.min(this.maxSize,this.size+this.allocateSize);if(r>n)throw new Error(`Attempting to serialize to BCS, but buffer does not have enough size. Allocated size: ${this.size}, Max size: ${this.maxSize}, Required size: ${r}`);this.size=n;const i=new ArrayBuffer(this.size);new Uint8Array(i).set(new Uint8Array(this.dataView.buffer)),this.dataView=new DataView(i)}}shift(e){return this.bytePosition+=e,this}write8(e){return this.ensureSizeOrGrow(1),this.dataView.setUint8(this.bytePosition,Number(e)),this.shift(1)}write16(e){return this.ensureSizeOrGrow(2),this.dataView.setUint16(this.bytePosition,Number(e),!0),this.shift(2)}write32(e){return this.ensureSizeOrGrow(4),this.dataView.setUint32(this.bytePosition,Number(e),!0),this.shift(4)}write64(e){return Ye(BigInt(e),8).forEach(r=>this.write8(r)),this}write128(e){return Ye(BigInt(e),16).forEach(r=>this.write8(r)),this}write256(e){return Ye(BigInt(e),32).forEach(r=>this.write8(r)),this}writeULEB(e){return yt(e).forEach(r=>this.write8(r)),this}writeVec(e,r){return this.writeULEB(e.length),Array.from(e).forEach((n,i)=>r(this,n,i,e.length)),this}*[Symbol.iterator](){for(let e=0;e<this.bytePosition;e++)yield this.dataView.getUint8(e);return this.toBytes()}toBytes(){return new Uint8Array(this.dataView.buffer.slice(0,this.bytePosition))}toString(e){return pn(this.toBytes(),e)}}function Ye(t,e){let r=new Uint8Array(e),n=0;for(;t>0;)r[n]=Number(t%BigInt(256)),t=t/BigInt(256),n+=1;return r}var ur=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},X=(t,e,r)=>(ur(t,e,"read from private field"),r?r.call(t):e.get(t)),ze=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Fe=(t,e,r,n)=>(ur(t,e,"write to private field"),e.set(t,r),r),ye,Se,Me,ae;const dr=class{constructor(t){ze(this,ye,void 0),ze(this,Se,void 0),this.name=t.name,this.read=t.read,this.serializedSize=t.serializedSize??(()=>null),Fe(this,ye,t.write),Fe(this,Se,t.serialize??((e,r)=>{const n=new cr({size:this.serializedSize(e)??void 0,...r});return X(this,ye).call(this,e,n),n.toBytes()})),this.validate=t.validate??(()=>{})}write(t,e){this.validate(t),X(this,ye).call(this,t,e)}serialize(t,e){return this.validate(t),new mn(this,X(this,Se).call(this,t,e))}parse(t){const e=new or(t);return this.read(e)}transform({name:t,input:e,output:r}){return new dr({name:t??this.name,read:n=>r(this.read(n)),write:(n,i)=>X(this,ye).call(this,e(n),i),serializedSize:n=>this.serializedSize(e(n)),serialize:(n,i)=>X(this,Se).call(this,e(n),i),validate:n=>this.validate(e(n))})}};let Z=dr;ye=new WeakMap;Se=new WeakMap;const lr=Symbol.for("@mysten/serialized-bcs");function wt(t){return!!t&&typeof t=="object"&&t[lr]===!0}class mn{constructor(e,r){ze(this,Me,void 0),ze(this,ae,void 0),Fe(this,Me,e),Fe(this,ae,r)}get[lr](){return!0}toBytes(){return X(this,ae)}toHex(){return Ce(X(this,ae))}toBase64(){return Be(X(this,ae))}toBase58(){return xe(X(this,ae))}parse(){return X(this,Me).parse(X(this,ae))}}Me=new WeakMap;ae=new WeakMap;function Ge({size:t,...e}){return new Z({...e,serializedSize:()=>t})}function Qe({readMethod:t,writeMethod:e,...r}){return Ge({...r,read:n=>n[t](),write:(n,i)=>i[e](n),validate:n=>{var i;if(n<0||n>r.maxValue)throw new TypeError(`Invalid ${r.name} value: ${n}. Expected value in range 0-${r.maxValue}`);(i=r.validate)==null||i.call(r,n)}})}function et({readMethod:t,writeMethod:e,...r}){return Ge({...r,read:n=>n[t](),write:(n,i)=>i[e](BigInt(n)),validate:n=>{var s;const i=BigInt(n);if(i<0||i>r.maxValue)throw new TypeError(`Invalid ${r.name} value: ${i}. Expected value in range 0-${r.maxValue}`);(s=r.validate)==null||s.call(r,i)}})}function wn({serialize:t,...e}){const r=new Z({...e,serialize:t,write:(n,i)=>{for(const s of r.serialize(n).toBytes())i.write8(s)}});return r}function bn({toBytes:t,fromBytes:e,...r}){return new Z({...r,read:n=>{const i=n.readULEB(),s=n.readBytes(i);return e(s)},write:(n,i)=>{const s=t(n);i.writeULEB(s.length);for(let c=0;c<s.length;c++)i.write8(s[c])},serialize:n=>{const i=t(n),s=yt(i.length),c=new Uint8Array(s.length+i.length);return c.set(s,0),c.set(i,s.length),c},validate:n=>{var i;if(typeof n!="string")throw new TypeError(`Invalid ${r.name} value: ${n}. Expected string`);(i=r.validate)==null||i.call(r,n)}})}function Sn(t){let e=null;function r(){return e||(e=t()),e}return new Z({name:"lazy",read:n=>r().read(n),serializedSize:n=>r().serializedSize(n),write:(n,i)=>r().write(n,i),serialize:(n,i)=>r().serialize(n,i).toBytes()})}const l={u8(t){return Qe({name:"u8",readMethod:"read8",writeMethod:"write8",size:1,maxValue:2**8-1,...t})},u16(t){return Qe({name:"u16",readMethod:"read16",writeMethod:"write16",size:2,maxValue:2**16-1,...t})},u32(t){return Qe({name:"u32",readMethod:"read32",writeMethod:"write32",size:4,maxValue:2**32-1,...t})},u64(t){return et({name:"u64",readMethod:"read64",writeMethod:"write64",size:8,maxValue:2n**64n-1n,...t})},u128(t){return et({name:"u128",readMethod:"read128",writeMethod:"write128",size:16,maxValue:2n**128n-1n,...t})},u256(t){return et({name:"u256",readMethod:"read256",writeMethod:"write256",size:32,maxValue:2n**256n-1n,...t})},bool(t){return Ge({name:"bool",size:1,read:e=>e.read8()===1,write:(e,r)=>r.write8(e?1:0),...t,validate:e=>{var r;if((r=t==null?void 0:t.validate)==null||r.call(t,e),typeof e!="boolean")throw new TypeError(`Expected boolean, found ${typeof e}`)}})},uleb128(t){return wn({name:"uleb128",read:e=>e.readULEB(),serialize:e=>Uint8Array.from(yt(e)),...t})},bytes(t,e){return Ge({name:`bytes[${t}]`,size:t,read:r=>r.readBytes(t),write:(r,n)=>{for(let i=0;i<t;i++)n.write8(r[i]??0)},...e,validate:r=>{var n;if((n=e==null?void 0:e.validate)==null||n.call(e,r),!("length"in r))throw new TypeError(`Expected array, found ${typeof r}`);if(r.length!==t)throw new TypeError(`Expected array of length ${t}, found ${r.length}`)}})},string(t){return bn({name:"string",toBytes:e=>new TextEncoder().encode(e),fromBytes:e=>new TextDecoder().decode(e),...t})},fixedArray(t,e,r){return new Z({name:`${e.name}[${t}]`,read:n=>{const i=new Array(t);for(let s=0;s<t;s++)i[s]=e.read(n);return i},write:(n,i)=>{for(const s of n)e.write(s,i)},...r,validate:n=>{var i;if((i=r==null?void 0:r.validate)==null||i.call(r,n),!("length"in n))throw new TypeError(`Expected array, found ${typeof n}`);if(n.length!==t)throw new TypeError(`Expected array of length ${t}, found ${n.length}`)}})},option(t){return l.enum(`Option<${t.name}>`,{None:null,Some:t}).transform({input:e=>e==null?{None:!0}:{Some:e},output:e=>"Some"in e?e.Some:null})},vector(t,e){return new Z({name:`vector<${t.name}>`,read:r=>{const n=r.readULEB(),i=new Array(n);for(let s=0;s<n;s++)i[s]=t.read(r);return i},write:(r,n)=>{n.writeULEB(r.length);for(const i of r)t.write(i,n)},...e,validate:r=>{var n;if((n=e==null?void 0:e.validate)==null||n.call(e,r),!("length"in r))throw new TypeError(`Expected array, found ${typeof r}`)}})},tuple(t,e){return new Z({name:`(${t.map(r=>r.name).join(", ")})`,serializedSize:r=>{let n=0;for(let i=0;i<t.length;i++){const s=t[i].serializedSize(r[i]);if(s==null)return null;n+=s}return n},read:r=>{const n=[];for(const i of t)n.push(i.read(r));return n},write:(r,n)=>{for(let i=0;i<t.length;i++)t[i].write(r[i],n)},...e,validate:r=>{var n;if((n=e==null?void 0:e.validate)==null||n.call(e,r),!Array.isArray(r))throw new TypeError(`Expected array, found ${typeof r}`);if(r.length!==t.length)throw new TypeError(`Expected array of length ${t.length}, found ${r.length}`)}})},struct(t,e,r){const n=Object.entries(e);return new Z({name:t,serializedSize:i=>{let s=0;for(const[c,a]of n){const o=a.serializedSize(i[c]);if(o==null)return null;s+=o}return s},read:i=>{const s={};for(const[c,a]of n)s[c]=a.read(i);return s},write:(i,s)=>{for(const[c,a]of n)a.write(i[c],s)},...r,validate:i=>{var s;if((s=r==null?void 0:r.validate)==null||s.call(r,i),typeof i!="object"||i==null)throw new TypeError(`Expected object, found ${typeof i}`)}})},enum(t,e,r){const n=Object.entries(e);return new Z({name:t,read:i=>{const s=i.readULEB(),[c,a]=n[s];return{[c]:(a==null?void 0:a.read(i))??!0}},write:(i,s)=>{const[c,a]=Object.entries(i)[0];for(let o=0;o<n.length;o++){const[d,u]=n[o];if(d===c){s.writeULEB(o),u==null||u.write(a,s);return}}},...r,validate:i=>{var a;if((a=r==null?void 0:r.validate)==null||a.call(r,i),typeof i!="object"||i==null)throw new TypeError(`Expected object, found ${typeof i}`);const s=Object.keys(i);if(s.length!==1)throw new TypeError(`Expected object with one key, found ${s.length}`);const[c]=s;if(!Object.hasOwn(e,c))throw new TypeError(`Invalid enum variant ${c}`)}})},map(t,e){return l.vector(l.tuple([t,e])).transform({name:`Map<${t.name}, ${e.name}>`,input:r=>[...r.entries()],output:r=>{const n=new Map;for(const[i,s]of r)n.set(i,s);return n}})},generic(t,e){return(...r)=>e(...r).transform({name:`${e.name}<${r.map(n=>n.name).join(", ")}>`,input:n=>n,output:n=>n})},lazy(t){return Sn(t)}},Tn=32,Te=class{constructor(t){if(this.types=new Map,this.counter=0,t instanceof Te){this.schema=t.schema,this.types=new Map(t.types);return}if(this.schema=t,this.registerAddressType(Te.ADDRESS,t.addressLength,t.addressEncoding),this.registerVectorType(t.vectorType),t.types&&t.types.structs)for(let e of Object.keys(t.types.structs))this.registerStructType(e,t.types.structs[e]);if(t.types&&t.types.enums)for(let e of Object.keys(t.types.enums))this.registerEnumType(e,t.types.enums[e]);if(t.types&&t.types.aliases)for(let e of Object.keys(t.types.aliases))this.registerAlias(e,t.types.aliases[e]);t.withPrimitives!==!1&&vn(this)}tempKey(){return`bcs-struct-${++this.counter}`}ser(t,e,r){if(typeof t=="string"||Array.isArray(t)){const{name:n,params:i}=this.parseTypeName(t);return this.getTypeInterface(n).encode(this,e,r,i)}if(typeof t=="object"){const n=this.tempKey();return new Te(this).registerStructType(n,t).ser(n,e,r)}throw new Error(`Incorrect type passed into the '.ser()' function.
|
|
2
2
|
${JSON.stringify(t)}`)}de(t,e,r){if(typeof e=="string")if(r)e=yn(e,r);else throw new Error("To pass a string to `bcs.de`, specify encoding");if(typeof t=="string"||Array.isArray(t)){const{name:n,params:i}=this.parseTypeName(t);return this.getTypeInterface(n).decode(this,e,i)}if(typeof t=="object"){const n=new Te(this),i=this.tempKey();return n.registerStructType(i,t).de(i,e,r)}throw new Error(`Incorrect type passed into the '.de()' function.
|
|
3
3
|
${JSON.stringify(t)}`)}hasType(t){return this.types.has(t)}registerAlias(t,e){return this.types.set(t,e),this}registerType(t,e,r,n=()=>!0){const{name:i,params:s}=this.parseTypeName(t);return this.types.set(i,{encode(c,a,o,d){const u=s.reduce((g,m,y)=>Object.assign(g,{[m]:d[y]}),{});return this._encodeRaw.call(c,new cr(o),a,d,u)},decode(c,a,o){const d=s.reduce((u,g,m)=>Object.assign(u,{[g]:o[m]}),{});return this._decodeRaw.call(c,new or(a),o,d)},_encodeRaw(c,a,o,d){if(n(a))return e.call(this,c,a,o,d);throw new Error(`Validation failed for type ${i}, data: ${a}`)},_decodeRaw(c,a,o){return r.call(this,c,a,o)}}),this}registerBcsType(t,e){return this.registerType(t,(r,n,i)=>{const s=i.map(c=>new Z({name:String(c),write:(a,o)=>{const{name:d,params:u}=this.parseTypeName(c),g=this.getTypeInterface(d),m=u.reduce((y,S,T)=>Object.assign(y,{[S]:i[T]}),{});return g._encodeRaw.call(this,o,a,u,m)},read:()=>{throw new Error("Not implemented")}}));return e(...s).write(n,r),r},(r,n)=>{const i=n.map(s=>new Z({name:String(s),write:(c,a)=>{throw new Error("Not implemented")},read:c=>{const{name:a,params:o}=this.parseTypeName(s),d=this.getTypeInterface(a),u=o.reduce((g,m,y)=>Object.assign(g,{[m]:n[y]}),{});return d._decodeRaw.call(this,c,o,u)}}));return e(...i).read(r)}),this}registerAddressType(t,e,r="hex"){switch(r){case"base64":return this.registerType(t,function(i,s){return ue(s).reduce((c,a)=>c.write8(a),i)},function(i){return Be(i.readBytes(e))});case"hex":return this.registerType(t,function(i,s){return Je(s).reduce((c,a)=>c.write8(a),i)},function(i){return Ce(i.readBytes(e))});default:throw new Error("Unsupported encoding! Use either hex or base64")}}registerVectorType(t){let{name:e,params:r}=this.parseTypeName(t);if(r.length>1)throw new Error("Vector can have only one type parameter; got "+e);return this.registerType(t,function(i,s,c,a){return i.writeVec(s,(o,d)=>{let u=c[0];if(!u)throw new Error(`Incorrect number of type parameters passed a to vector '${t}'`);let{name:g,params:m}=this.parseTypeName(u);if(this.hasType(g))return this.getTypeInterface(g)._encodeRaw.call(this,o,d,m,a);if(!(g in a))throw new Error(`Unable to find a matching type definition for ${g} in vector; make sure you passed a generic`);let{name:y,params:S}=this.parseTypeName(a[g]);return this.getTypeInterface(y)._encodeRaw.call(this,o,d,S,a)})},function(i,s,c){return i.readVec(a=>{let o=s[0];if(!o)throw new Error(`Incorrect number of type parameters passed to a vector '${t}'`);let{name:d,params:u}=this.parseTypeName(o);if(this.hasType(d))return this.getTypeInterface(d)._decodeRaw.call(this,a,u,c);if(!(d in c))throw new Error(`Unable to find a matching type definition for ${d} in vector; make sure you passed a generic`);let{name:g,params:m}=this.parseTypeName(c[d]);return this.getTypeInterface(g)._decodeRaw.call(this,a,m,c)})})}registerStructType(t,e){for(let c in e){let a=this.tempKey(),o=e[c];!Array.isArray(o)&&typeof o!="string"&&(e[c]=a,this.registerStructType(a,o))}let r=Object.freeze(e),n=Object.keys(r),{name:i,params:s}=this.parseTypeName(t);return this.registerType(t,function(a,o,d,u){if(!o||o.constructor!==Object)throw new Error(`Expected ${i} to be an Object, got: ${o}`);if(d.length!==s.length)throw new Error(`Incorrect number of generic parameters passed; expected: ${s.length}, got: ${d.length}`);for(let g of n){if(!(g in o))throw new Error(`Struct ${i} requires field ${g}:${r[g]}`);const{name:m,params:y}=this.parseTypeName(r[g]);if(!s.includes(m))this.getTypeInterface(m)._encodeRaw.call(this,a,o[g],y,u);else{const S=s.indexOf(m);let{name:T,params:f}=this.parseTypeName(d[S]);if(this.hasType(T)){this.getTypeInterface(T)._encodeRaw.call(this,a,o[g],f,u);continue}if(!(T in u))throw new Error(`Unable to find a matching type definition for ${T} in ${i}; make sure you passed a generic`);let{name:O,params:B}=this.parseTypeName(u[T]);this.getTypeInterface(O)._encodeRaw.call(this,a,o[g],B,u)}}return a},function(a,o,d){if(o.length!==s.length)throw new Error(`Incorrect number of generic parameters passed; expected: ${s.length}, got: ${o.length}`);let u={};for(let g of n){const{name:m,params:y}=this.parseTypeName(r[g]);if(!s.includes(m))u[g]=this.getTypeInterface(m)._decodeRaw.call(this,a,y,d);else{const S=s.indexOf(m);let{name:T,params:f}=this.parseTypeName(o[S]);if(this.hasType(T)){u[g]=this.getTypeInterface(T)._decodeRaw.call(this,a,f,d);continue}if(!(T in d))throw new Error(`Unable to find a matching type definition for ${T} in ${i}; make sure you passed a generic`);let{name:O,params:B}=this.parseTypeName(d[T]);u[g]=this.getTypeInterface(O)._decodeRaw.call(this,a,B,d)}}return u})}registerEnumType(t,e){for(let c in e){let a=this.tempKey(),o=e[c];o!==null&&!Array.isArray(o)&&typeof o!="string"&&(e[c]=a,this.registerStructType(a,o))}let r=Object.freeze(e),n=Object.keys(r),{name:i,params:s}=this.parseTypeName(t);return this.registerType(t,function(a,o,d,u){if(!o)throw new Error(`Unable to write enum "${i}", missing data.
|
|
4
4
|
Received: "${o}"`);if(typeof o!="object")throw new Error(`Incorrect data passed into enum "${i}", expected object with properties: "${n.join(" | ")}".
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const Lt=require("./index-BHGS0dw3.js");var ye={},Rt={},M={},pe={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});function r(u,o){var s=u>>>16&65535,_=u&65535,w=o>>>16&65535,d=o&65535;return _*d+(s*d+_*w<<16>>>0)|0}t.mul=Math.imul||r;function n(u,o){return u+o|0}t.add=n;function i(u,o){return u-o|0}t.sub=i;function h(u,o){return u<<o|u>>>32-o}t.rotl=h;function f(u,o){return u<<32-o|u>>>o}t.rotr=f;function E(u){return typeof u=="number"&&isFinite(u)&&Math.floor(u)===u}t.isInteger=Number.isInteger||E,t.MAX_SAFE_INTEGER=9007199254740991,t.isSafeInteger=function(u){return t.isInteger(u)&&u>=-t.MAX_SAFE_INTEGER&&u<=t.MAX_SAFE_INTEGER}})(pe);Object.defineProperty(M,"__esModule",{value:!0});var Se=pe;function Ke(t,r){return r===void 0&&(r=0),(t[r+0]<<8|t[r+1])<<16>>16}M.readInt16BE=Ke;function ze(t,r){return r===void 0&&(r=0),(t[r+0]<<8|t[r+1])>>>0}M.readUint16BE=ze;function Ye(t,r){return r===void 0&&(r=0),(t[r+1]<<8|t[r])<<16>>16}M.readInt16LE=Ye;function We(t,r){return r===void 0&&(r=0),(t[r+1]<<8|t[r])>>>0}M.readUint16LE=We;function me(t,r,n){return r===void 0&&(r=new Uint8Array(2)),n===void 0&&(n=0),r[n+0]=t>>>8,r[n+1]=t>>>0,r}M.writeUint16BE=me;M.writeInt16BE=me;function Ce(t,r,n){return r===void 0&&(r=new Uint8Array(2)),n===void 0&&(n=0),r[n+0]=t>>>0,r[n+1]=t>>>8,r}M.writeUint16LE=Ce;M.writeInt16LE=Ce;function Vt(t,r){return r===void 0&&(r=0),t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3]}M.readInt32BE=Vt;function Xt(t,r){return r===void 0&&(r=0),(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3])>>>0}M.readUint32BE=Xt;function Jt(t,r){return r===void 0&&(r=0),t[r+3]<<24|t[r+2]<<16|t[r+1]<<8|t[r]}M.readInt32LE=Jt;function Zt(t,r){return r===void 0&&(r=0),(t[r+3]<<24|t[r+2]<<16|t[r+1]<<8|t[r])>>>0}M.readUint32LE=Zt;function xt(t,r,n){return r===void 0&&(r=new Uint8Array(4)),n===void 0&&(n=0),r[n+0]=t>>>24,r[n+1]=t>>>16,r[n+2]=t>>>8,r[n+3]=t>>>0,r}M.writeUint32BE=xt;M.writeInt32BE=xt;function Bt(t,r,n){return r===void 0&&(r=new Uint8Array(4)),n===void 0&&(n=0),r[n+0]=t>>>0,r[n+1]=t>>>8,r[n+2]=t>>>16,r[n+3]=t>>>24,r}M.writeUint32LE=Bt;M.writeInt32LE=Bt;function qe(t,r){r===void 0&&(r=0);var n=Vt(t,r),i=Vt(t,r+4);return n*4294967296+i-(i>>31)*4294967296}M.readInt64BE=qe;function Ge(t,r){r===void 0&&(r=0);var n=Xt(t,r),i=Xt(t,r+4);return n*4294967296+i}M.readUint64BE=Ge;function $e(t,r){r===void 0&&(r=0);var n=Jt(t,r),i=Jt(t,r+4);return i*4294967296+n-(n>>31)*4294967296}M.readInt64LE=$e;function Ve(t,r){r===void 0&&(r=0);var n=Zt(t,r),i=Zt(t,r+4);return i*4294967296+n}M.readUint64LE=Ve;function Oe(t,r,n){return r===void 0&&(r=new Uint8Array(8)),n===void 0&&(n=0),xt(t/4294967296>>>0,r,n),xt(t>>>0,r,n+4),r}M.writeUint64BE=Oe;M.writeInt64BE=Oe;function Ue(t,r,n){return r===void 0&&(r=new Uint8Array(8)),n===void 0&&(n=0),Bt(t>>>0,r,n),Bt(t/4294967296>>>0,r,n+4),r}M.writeUint64LE=Ue;M.writeInt64LE=Ue;function Xe(t,r,n){if(n===void 0&&(n=0),t%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(t/8>r.length-n)throw new Error("readUintBE: array is too short for the given bitLength");for(var i=0,h=1,f=t/8+n-1;f>=n;f--)i+=r[f]*h,h*=256;return i}M.readUintBE=Xe;function Je(t,r,n){if(n===void 0&&(n=0),t%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(t/8>r.length-n)throw new Error("readUintLE: array is too short for the given bitLength");for(var i=0,h=1,f=n;f<n+t/8;f++)i+=r[f]*h,h*=256;return i}M.readUintLE=Je;function Ze(t,r,n,i){if(n===void 0&&(n=new Uint8Array(t/8)),i===void 0&&(i=0),t%8!==0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!Se.isSafeInteger(r))throw new Error("writeUintBE value must be an integer");for(var h=1,f=t/8+i-1;f>=i;f--)n[f]=r/h&255,h*=256;return n}M.writeUintBE=Ze;function Qe(t,r,n,i){if(n===void 0&&(n=new Uint8Array(t/8)),i===void 0&&(i=0),t%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!Se.isSafeInteger(r))throw new Error("writeUintLE value must be an integer");for(var h=1,f=i;f<i+t/8;f++)n[f]=r/h&255,h*=256;return n}M.writeUintLE=Qe;function ke(t,r){r===void 0&&(r=0);var n=new DataView(t.buffer,t.byteOffset,t.byteLength);return n.getFloat32(r)}M.readFloat32BE=ke;function tr(t,r){r===void 0&&(r=0);var n=new DataView(t.buffer,t.byteOffset,t.byteLength);return n.getFloat32(r,!0)}M.readFloat32LE=tr;function er(t,r){r===void 0&&(r=0);var n=new DataView(t.buffer,t.byteOffset,t.byteLength);return n.getFloat64(r)}M.readFloat64BE=er;function rr(t,r){r===void 0&&(r=0);var n=new DataView(t.buffer,t.byteOffset,t.byteLength);return n.getFloat64(r,!0)}M.readFloat64LE=rr;function nr(t,r,n){r===void 0&&(r=new Uint8Array(4)),n===void 0&&(n=0);var i=new DataView(r.buffer,r.byteOffset,r.byteLength);return i.setFloat32(n,t),r}M.writeFloat32BE=nr;function ir(t,r,n){r===void 0&&(r=new Uint8Array(4)),n===void 0&&(n=0);var i=new DataView(r.buffer,r.byteOffset,r.byteLength);return i.setFloat32(n,t,!0),r}M.writeFloat32LE=ir;function ar(t,r,n){r===void 0&&(r=new Uint8Array(8)),n===void 0&&(n=0);var i=new DataView(r.buffer,r.byteOffset,r.byteLength);return i.setFloat64(n,t),r}M.writeFloat64BE=ar;function ur(t,r,n){r===void 0&&(r=new Uint8Array(8)),n===void 0&&(n=0);var i=new DataView(r.buffer,r.byteOffset,r.byteLength);return i.setFloat64(n,t,!0),r}M.writeFloat64LE=ur;var Et={};Object.defineProperty(Et,"__esModule",{value:!0});function or(t){for(var r=0;r<t.length;r++)t[r]=0;return t}Et.wipe=or;Object.defineProperty(Rt,"__esModule",{value:!0});var dt=M,Qt=Et,fr=20;function hr(t,r,n){for(var i=1634760805,h=857760878,f=2036477234,E=1797285236,u=n[3]<<24|n[2]<<16|n[1]<<8|n[0],o=n[7]<<24|n[6]<<16|n[5]<<8|n[4],s=n[11]<<24|n[10]<<16|n[9]<<8|n[8],_=n[15]<<24|n[14]<<16|n[13]<<8|n[12],w=n[19]<<24|n[18]<<16|n[17]<<8|n[16],d=n[23]<<24|n[22]<<16|n[21]<<8|n[20],l=n[27]<<24|n[26]<<16|n[25]<<8|n[24],v=n[31]<<24|n[30]<<16|n[29]<<8|n[28],S=r[3]<<24|r[2]<<16|r[1]<<8|r[0],g=r[7]<<24|r[6]<<16|r[5]<<8|r[4],O=r[11]<<24|r[10]<<16|r[9]<<8|r[8],j=r[15]<<24|r[14]<<16|r[13]<<8|r[12],U=i,c=h,b=f,D=E,e=u,a=o,y=s,m=_,A=w,L=d,B=l,x=v,F=S,N=g,p=O,T=j,$=0;$<fr;$+=2)U=U+e|0,F^=U,F=F>>>16|F<<16,A=A+F|0,e^=A,e=e>>>20|e<<12,c=c+a|0,N^=c,N=N>>>16|N<<16,L=L+N|0,a^=L,a=a>>>20|a<<12,b=b+y|0,p^=b,p=p>>>16|p<<16,B=B+p|0,y^=B,y=y>>>20|y<<12,D=D+m|0,T^=D,T=T>>>16|T<<16,x=x+T|0,m^=x,m=m>>>20|m<<12,b=b+y|0,p^=b,p=p>>>24|p<<8,B=B+p|0,y^=B,y=y>>>25|y<<7,D=D+m|0,T^=D,T=T>>>24|T<<8,x=x+T|0,m^=x,m=m>>>25|m<<7,c=c+a|0,N^=c,N=N>>>24|N<<8,L=L+N|0,a^=L,a=a>>>25|a<<7,U=U+e|0,F^=U,F=F>>>24|F<<8,A=A+F|0,e^=A,e=e>>>25|e<<7,U=U+a|0,T^=U,T=T>>>16|T<<16,B=B+T|0,a^=B,a=a>>>20|a<<12,c=c+y|0,F^=c,F=F>>>16|F<<16,x=x+F|0,y^=x,y=y>>>20|y<<12,b=b+m|0,N^=b,N=N>>>16|N<<16,A=A+N|0,m^=A,m=m>>>20|m<<12,D=D+e|0,p^=D,p=p>>>16|p<<16,L=L+p|0,e^=L,e=e>>>20|e<<12,b=b+m|0,N^=b,N=N>>>24|N<<8,A=A+N|0,m^=A,m=m>>>25|m<<7,D=D+e|0,p^=D,p=p>>>24|p<<8,L=L+p|0,e^=L,e=e>>>25|e<<7,c=c+y|0,F^=c,F=F>>>24|F<<8,x=x+F|0,y^=x,y=y>>>25|y<<7,U=U+a|0,T^=U,T=T>>>24|T<<8,B=B+T|0,a^=B,a=a>>>25|a<<7;dt.writeUint32LE(U+i|0,t,0),dt.writeUint32LE(c+h|0,t,4),dt.writeUint32LE(b+f|0,t,8),dt.writeUint32LE(D+E|0,t,12),dt.writeUint32LE(e+u|0,t,16),dt.writeUint32LE(a+o|0,t,20),dt.writeUint32LE(y+s|0,t,24),dt.writeUint32LE(m+_|0,t,28),dt.writeUint32LE(A+w|0,t,32),dt.writeUint32LE(L+d|0,t,36),dt.writeUint32LE(B+l|0,t,40),dt.writeUint32LE(x+v|0,t,44),dt.writeUint32LE(F+S|0,t,48),dt.writeUint32LE(N+g|0,t,52),dt.writeUint32LE(p+O|0,t,56),dt.writeUint32LE(T+j|0,t,60)}function Ae(t,r,n,i,h){if(h===void 0&&(h=0),t.length!==32)throw new Error("ChaCha: key size must be 32 bytes");if(i.length<n.length)throw new Error("ChaCha: destination is shorter than source");var f,E;if(h===0){if(r.length!==8&&r.length!==12)throw new Error("ChaCha nonce must be 8 or 12 bytes");f=new Uint8Array(16),E=f.length-r.length,f.set(r,E)}else{if(r.length!==16)throw new Error("ChaCha nonce with counter must be 16 bytes");f=r,E=h}for(var u=new Uint8Array(64),o=0;o<n.length;o+=64){hr(u,f,t);for(var s=o;s<o+64&&s<n.length;s++)i[s]=n[s]^u[s-o];cr(f,0,E)}return Qt.wipe(u),h===0&&Qt.wipe(f),i}Rt.streamXOR=Ae;function sr(t,r,n,i){return i===void 0&&(i=0),Qt.wipe(n),Ae(t,r,n,n,i)}Rt.stream=sr;function cr(t,r,n){for(var i=1;n--;)i=i+(t[r]&255)|0,t[r]=i&255,i>>>=8,r++;if(i>0)throw new Error("ChaCha: counter overflow")}var Te={},vt={};Object.defineProperty(vt,"__esModule",{value:!0});function lr(t,r,n){return~(t-1)&r|t-1&n}vt.select=lr;function Dr(t,r){return(t|0)-(r|0)-1>>>31&1}vt.lessOrEqual=Dr;function Fe(t,r){if(t.length!==r.length)return 0;for(var n=0,i=0;i<t.length;i++)n|=t[i]^r[i];return 1&n-1>>>8}vt.compare=Fe;function _r(t,r){return t.length===0||r.length===0?!1:Fe(t,r)!==0}vt.equal=_r;(function(t){Object.defineProperty(t,"__esModule",{value:!0});var r=vt,n=Et;t.DIGEST_LENGTH=16;var i=function(){function E(u){this.digestLength=t.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var o=u[0]|u[1]<<8;this._r[0]=o&8191;var s=u[2]|u[3]<<8;this._r[1]=(o>>>13|s<<3)&8191;var _=u[4]|u[5]<<8;this._r[2]=(s>>>10|_<<6)&7939;var w=u[6]|u[7]<<8;this._r[3]=(_>>>7|w<<9)&8191;var d=u[8]|u[9]<<8;this._r[4]=(w>>>4|d<<12)&255,this._r[5]=d>>>1&8190;var l=u[10]|u[11]<<8;this._r[6]=(d>>>14|l<<2)&8191;var v=u[12]|u[13]<<8;this._r[7]=(l>>>11|v<<5)&8065;var S=u[14]|u[15]<<8;this._r[8]=(v>>>8|S<<8)&8191,this._r[9]=S>>>5&127,this._pad[0]=u[16]|u[17]<<8,this._pad[1]=u[18]|u[19]<<8,this._pad[2]=u[20]|u[21]<<8,this._pad[3]=u[22]|u[23]<<8,this._pad[4]=u[24]|u[25]<<8,this._pad[5]=u[26]|u[27]<<8,this._pad[6]=u[28]|u[29]<<8,this._pad[7]=u[30]|u[31]<<8}return E.prototype._blocks=function(u,o,s){for(var _=this._fin?0:2048,w=this._h[0],d=this._h[1],l=this._h[2],v=this._h[3],S=this._h[4],g=this._h[5],O=this._h[6],j=this._h[7],U=this._h[8],c=this._h[9],b=this._r[0],D=this._r[1],e=this._r[2],a=this._r[3],y=this._r[4],m=this._r[5],A=this._r[6],L=this._r[7],B=this._r[8],x=this._r[9];s>=16;){var F=u[o+0]|u[o+1]<<8;w+=F&8191;var N=u[o+2]|u[o+3]<<8;d+=(F>>>13|N<<3)&8191;var p=u[o+4]|u[o+5]<<8;l+=(N>>>10|p<<6)&8191;var T=u[o+6]|u[o+7]<<8;v+=(p>>>7|T<<9)&8191;var $=u[o+8]|u[o+9]<<8;S+=(T>>>4|$<<12)&8191,g+=$>>>1&8191;var Z=u[o+10]|u[o+11]<<8;O+=($>>>14|Z<<2)&8191;var J=u[o+12]|u[o+13]<<8;j+=(Z>>>11|J<<5)&8191;var X=u[o+14]|u[o+15]<<8;U+=(J>>>8|X<<8)&8191,c+=X>>>5|_;var C=0,R=C;R+=w*b,R+=d*(5*x),R+=l*(5*B),R+=v*(5*L),R+=S*(5*A),C=R>>>13,R&=8191,R+=g*(5*m),R+=O*(5*y),R+=j*(5*a),R+=U*(5*e),R+=c*(5*D),C+=R>>>13,R&=8191;var P=C;P+=w*D,P+=d*b,P+=l*(5*x),P+=v*(5*B),P+=S*(5*L),C=P>>>13,P&=8191,P+=g*(5*A),P+=O*(5*m),P+=j*(5*y),P+=U*(5*a),P+=c*(5*e),C+=P>>>13,P&=8191;var I=C;I+=w*e,I+=d*D,I+=l*b,I+=v*(5*x),I+=S*(5*B),C=I>>>13,I&=8191,I+=g*(5*L),I+=O*(5*A),I+=j*(5*m),I+=U*(5*y),I+=c*(5*a),C+=I>>>13,I&=8191;var H=C;H+=w*a,H+=d*e,H+=l*D,H+=v*b,H+=S*(5*x),C=H>>>13,H&=8191,H+=g*(5*B),H+=O*(5*L),H+=j*(5*A),H+=U*(5*m),H+=c*(5*y),C+=H>>>13,H&=8191;var K=C;K+=w*y,K+=d*a,K+=l*e,K+=v*D,K+=S*b,C=K>>>13,K&=8191,K+=g*(5*x),K+=O*(5*B),K+=j*(5*L),K+=U*(5*A),K+=c*(5*m),C+=K>>>13,K&=8191;var z=C;z+=w*m,z+=d*y,z+=l*a,z+=v*e,z+=S*D,C=z>>>13,z&=8191,z+=g*b,z+=O*(5*x),z+=j*(5*B),z+=U*(5*L),z+=c*(5*A),C+=z>>>13,z&=8191;var Y=C;Y+=w*A,Y+=d*m,Y+=l*y,Y+=v*a,Y+=S*e,C=Y>>>13,Y&=8191,Y+=g*D,Y+=O*b,Y+=j*(5*x),Y+=U*(5*B),Y+=c*(5*L),C+=Y>>>13,Y&=8191;var W=C;W+=w*L,W+=d*A,W+=l*m,W+=v*y,W+=S*a,C=W>>>13,W&=8191,W+=g*e,W+=O*D,W+=j*b,W+=U*(5*x),W+=c*(5*B),C+=W>>>13,W&=8191;var G=C;G+=w*B,G+=d*L,G+=l*A,G+=v*m,G+=S*y,C=G>>>13,G&=8191,G+=g*a,G+=O*e,G+=j*D,G+=U*b,G+=c*(5*x),C+=G>>>13,G&=8191;var V=C;V+=w*x,V+=d*B,V+=l*L,V+=v*A,V+=S*m,C=V>>>13,V&=8191,V+=g*y,V+=O*a,V+=j*e,V+=U*D,V+=c*b,C+=V>>>13,V&=8191,C=(C<<2)+C|0,C=C+R|0,R=C&8191,C=C>>>13,P+=C,w=R,d=P,l=I,v=H,S=K,g=z,O=Y,j=W,U=G,c=V,o+=16,s-=16}this._h[0]=w,this._h[1]=d,this._h[2]=l,this._h[3]=v,this._h[4]=S,this._h[5]=g,this._h[6]=O,this._h[7]=j,this._h[8]=U,this._h[9]=c},E.prototype.finish=function(u,o){o===void 0&&(o=0);var s=new Uint16Array(10),_,w,d,l;if(this._leftover){for(l=this._leftover,this._buffer[l++]=1;l<16;l++)this._buffer[l]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(_=this._h[1]>>>13,this._h[1]&=8191,l=2;l<10;l++)this._h[l]+=_,_=this._h[l]>>>13,this._h[l]&=8191;for(this._h[0]+=_*5,_=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=_,_=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=_,s[0]=this._h[0]+5,_=s[0]>>>13,s[0]&=8191,l=1;l<10;l++)s[l]=this._h[l]+_,_=s[l]>>>13,s[l]&=8191;for(s[9]-=8192,w=(_^1)-1,l=0;l<10;l++)s[l]&=w;for(w=~w,l=0;l<10;l++)this._h[l]=this._h[l]&w|s[l];for(this._h[0]=(this._h[0]|this._h[1]<<13)&65535,this._h[1]=(this._h[1]>>>3|this._h[2]<<10)&65535,this._h[2]=(this._h[2]>>>6|this._h[3]<<7)&65535,this._h[3]=(this._h[3]>>>9|this._h[4]<<4)&65535,this._h[4]=(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14)&65535,this._h[5]=(this._h[6]>>>2|this._h[7]<<11)&65535,this._h[6]=(this._h[7]>>>5|this._h[8]<<8)&65535,this._h[7]=(this._h[8]>>>8|this._h[9]<<5)&65535,d=this._h[0]+this._pad[0],this._h[0]=d&65535,l=1;l<8;l++)d=(this._h[l]+this._pad[l]|0)+(d>>>16)|0,this._h[l]=d&65535;return u[o+0]=this._h[0]>>>0,u[o+1]=this._h[0]>>>8,u[o+2]=this._h[1]>>>0,u[o+3]=this._h[1]>>>8,u[o+4]=this._h[2]>>>0,u[o+5]=this._h[2]>>>8,u[o+6]=this._h[3]>>>0,u[o+7]=this._h[3]>>>8,u[o+8]=this._h[4]>>>0,u[o+9]=this._h[4]>>>8,u[o+10]=this._h[5]>>>0,u[o+11]=this._h[5]>>>8,u[o+12]=this._h[6]>>>0,u[o+13]=this._h[6]>>>8,u[o+14]=this._h[7]>>>0,u[o+15]=this._h[7]>>>8,this._finished=!0,this},E.prototype.update=function(u){var o=0,s=u.length,_;if(this._leftover){_=16-this._leftover,_>s&&(_=s);for(var w=0;w<_;w++)this._buffer[this._leftover+w]=u[o+w];if(s-=_,o+=_,this._leftover+=_,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(s>=16&&(_=s-s%16,this._blocks(u,o,_),o+=_,s-=_),s){for(var w=0;w<s;w++)this._buffer[this._leftover+w]=u[o+w];this._leftover+=s}return this},E.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var u=new Uint8Array(16);return this.finish(u),u},E.prototype.clean=function(){return n.wipe(this._buffer),n.wipe(this._r),n.wipe(this._h),n.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},E}();t.Poly1305=i;function h(E,u){var o=new i(E);o.update(u);var s=o.digest();return o.clean(),s}t.oneTimeAuth=h;function f(E,u){return E.length!==t.DIGEST_LENGTH||u.length!==t.DIGEST_LENGTH?!1:r.equal(E,u)}t.equal=f})(Te);(function(t){Object.defineProperty(t,"__esModule",{value:!0});var r=Rt,n=Te,i=Et,h=M,f=vt;t.KEY_LENGTH=32,t.NONCE_LENGTH=12,t.TAG_LENGTH=16;var E=new Uint8Array(16),u=function(){function o(s){if(this.nonceLength=t.NONCE_LENGTH,this.tagLength=t.TAG_LENGTH,s.length!==t.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(s)}return o.prototype.seal=function(s,_,w,d){if(s.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var l=new Uint8Array(16);l.set(s,l.length-s.length);var v=new Uint8Array(32);r.stream(this._key,l,v,4);var S=_.length+this.tagLength,g;if(d){if(d.length!==S)throw new Error("ChaCha20Poly1305: incorrect destination length");g=d}else g=new Uint8Array(S);return r.streamXOR(this._key,l,_,g,4),this._authenticate(g.subarray(g.length-this.tagLength,g.length),v,g.subarray(0,g.length-this.tagLength),w),i.wipe(l),g},o.prototype.open=function(s,_,w,d){if(s.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(_.length<this.tagLength)return null;var l=new Uint8Array(16);l.set(s,l.length-s.length);var v=new Uint8Array(32);r.stream(this._key,l,v,4);var S=new Uint8Array(this.tagLength);if(this._authenticate(S,v,_.subarray(0,_.length-this.tagLength),w),!f.equal(S,_.subarray(_.length-this.tagLength,_.length)))return null;var g=_.length-this.tagLength,O;if(d){if(d.length!==g)throw new Error("ChaCha20Poly1305: incorrect destination length");O=d}else O=new Uint8Array(g);return r.streamXOR(this._key,l,_.subarray(0,_.length-this.tagLength),O,4),i.wipe(l),O},o.prototype.clean=function(){return i.wipe(this._key),this},o.prototype._authenticate=function(s,_,w,d){var l=new n.Poly1305(_);d&&(l.update(d),d.length%16>0&&l.update(E.subarray(d.length%16))),l.update(w),w.length%16>0&&l.update(E.subarray(w.length%16));var v=new Uint8Array(8);d&&h.writeUint64LE(d.length,v),l.update(v),h.writeUint64LE(w.length,v),l.update(v);for(var S=l.digest(),g=0;g<S.length;g++)s[g]=S[g];l.clean(),i.wipe(S),i.wipe(v)},o}();t.ChaCha20Poly1305=u})(ye);var Ne={},Ft={},ne={};Object.defineProperty(ne,"__esModule",{value:!0});function dr(t){return typeof t.saveState<"u"&&typeof t.restoreState<"u"&&typeof t.cleanSavedState<"u"}ne.isSerializableHash=dr;Object.defineProperty(Ft,"__esModule",{value:!0});var bt=ne,Er=vt,br=Et,Me=function(){function t(r,n){this._finished=!1,this._inner=new r,this._outer=new r,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var i=new Uint8Array(this.blockSize);n.length>this.blockSize?this._inner.update(n).finish(i).clean():i.set(n);for(var h=0;h<i.length;h++)i[h]^=54;this._inner.update(i);for(var h=0;h<i.length;h++)i[h]^=106;this._outer.update(i),bt.isSerializableHash(this._inner)&&bt.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),br.wipe(i)}return t.prototype.reset=function(){if(!bt.isSerializableHash(this._inner)||!bt.isSerializableHash(this._outer))throw new Error("hmac: can't reset() because hash doesn't implement restoreState()");return this._inner.restoreState(this._innerKeyedState),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},t.prototype.clean=function(){bt.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),bt.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},t.prototype.update=function(r){return this._inner.update(r),this},t.prototype.finish=function(r){return this._finished?(this._outer.finish(r),this):(this._inner.finish(r),this._outer.update(r.subarray(0,this.digestLength)).finish(r),this._finished=!0,this)},t.prototype.digest=function(){var r=new Uint8Array(this.digestLength);return this.finish(r),r},t.prototype.saveState=function(){if(!bt.isSerializableHash(this._inner))throw new Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},t.prototype.restoreState=function(r){if(!bt.isSerializableHash(this._inner)||!bt.isSerializableHash(this._outer))throw new Error("hmac: can't restoreState() because hash doesn't implement it");return this._inner.restoreState(r),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},t.prototype.cleanSavedState=function(r){if(!bt.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(r)},t}();Ft.HMAC=Me;function vr(t,r,n){var i=new Me(t,r);i.update(n);var h=i.digest();return i.clean(),h}Ft.hmac=vr;Ft.equal=Er.equal;Object.defineProperty(Ne,"__esModule",{value:!0});var ue=Ft,oe=Et,wr=function(){function t(r,n,i,h){i===void 0&&(i=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=r,this._info=h;var f=ue.hmac(this._hash,i,n);this._hmac=new ue.HMAC(r,f),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return t.prototype._fillBuffer=function(){this._counter[0]++;var r=this._counter[0];if(r===0)throw new Error("hkdf: cannot expand more");this._hmac.reset(),r>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},t.prototype.expand=function(r){for(var n=new Uint8Array(r),i=0;i<n.length;i++)this._bufpos===this._buffer.length&&this._fillBuffer(),n[i]=this._buffer[this._bufpos++];return n},t.prototype.clean=function(){this._hmac.clean(),oe.wipe(this._buffer),oe.wipe(this._counter),this._bufpos=0},t}(),gr=Ne.HKDF=wr,jt={},Pt={},It={};Object.defineProperty(It,"__esModule",{value:!0});It.BrowserRandomSource=void 0;const fe=65536;class yr{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const r=typeof self<"u"?self.crypto||self.msCrypto:null;r&&r.getRandomValues!==void 0&&(this._crypto=r,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(r){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const n=new Uint8Array(r);for(let i=0;i<n.length;i+=fe)this._crypto.getRandomValues(n.subarray(i,i+Math.min(n.length-i,fe)));return n}}It.BrowserRandomSource=yr;var Ht={};Object.defineProperty(Ht,"__esModule",{value:!0});Ht.NodeRandomSource=void 0;const pr=Et;class Sr{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,typeof Lt.commonjsRequire<"u"){const r=Lt.requireCryptoBrowserify();r&&r.randomBytes&&(this._crypto=r,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(r){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let n=this._crypto.randomBytes(r);if(n.length!==r)throw new Error("NodeRandomSource: got fewer bytes than requested");const i=new Uint8Array(r);for(let h=0;h<i.length;h++)i[h]=n[h];return(0,pr.wipe)(n),i}}Ht.NodeRandomSource=Sr;Object.defineProperty(Pt,"__esModule",{value:!0});Pt.SystemRandomSource=void 0;const mr=It,Cr=Ht;class Or{constructor(){if(this.isAvailable=!1,this.name="",this._source=new mr.BrowserRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Browser";return}if(this._source=new Cr.NodeRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Node";return}}randomBytes(r){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(r)}}Pt.SystemRandomSource=Or;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.randomStringForEntropy=t.randomString=t.randomUint32=t.randomBytes=t.defaultRandomSource=void 0;const r=Pt,n=M,i=Et;t.defaultRandomSource=new r.SystemRandomSource;function h(s,_=t.defaultRandomSource){return _.randomBytes(s)}t.randomBytes=h;function f(s=t.defaultRandomSource){const _=h(4,s),w=(0,n.readUint32LE)(_);return(0,i.wipe)(_),w}t.randomUint32=f;const E="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function u(s,_=E,w=t.defaultRandomSource){if(_.length<2)throw new Error("randomString charset is too short");if(_.length>256)throw new Error("randomString charset is too long");let d="";const l=_.length,v=256-256%l;for(;s>0;){const S=h(Math.ceil(s*256/v),w);for(let g=0;g<S.length&&s>0;g++){const O=S[g];O<v&&(d+=_.charAt(O%l),s--)}(0,i.wipe)(S)}return d}t.randomString=u;function o(s,_=E,w=t.defaultRandomSource){const d=Math.ceil(s/(Math.log(_.length)/Math.LN2));return u(d,_,w)}t.randomStringForEntropy=o})(jt);const Ur=Lt.getDefaultExportFromCjs(jt);var Le={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});var r=M,n=Et;t.DIGEST_LENGTH=32,t.BLOCK_SIZE=64;var i=function(){function u(){this.digestLength=t.DIGEST_LENGTH,this.blockSize=t.BLOCK_SIZE,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return u.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},u.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},u.prototype.clean=function(){n.wipe(this._buffer),n.wipe(this._temp),this.reset()},u.prototype.update=function(o,s){if(s===void 0&&(s=o.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var _=0;if(this._bytesHashed+=s,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&s>0;)this._buffer[this._bufferLength++]=o[_++],s--;this._bufferLength===this.blockSize&&(f(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(s>=this.blockSize&&(_=f(this._temp,this._state,o,_,s),s%=this.blockSize);s>0;)this._buffer[this._bufferLength++]=o[_++],s--;return this},u.prototype.finish=function(o){if(!this._finished){var s=this._bytesHashed,_=this._bufferLength,w=s/536870912|0,d=s<<3,l=s%64<56?64:128;this._buffer[_]=128;for(var v=_+1;v<l-8;v++)this._buffer[v]=0;r.writeUint32BE(w,this._buffer,l-8),r.writeUint32BE(d,this._buffer,l-4),f(this._temp,this._state,this._buffer,0,l),this._finished=!0}for(var v=0;v<this.digestLength/4;v++)r.writeUint32BE(this._state[v],o,v*4);return this},u.prototype.digest=function(){var o=new Uint8Array(this.digestLength);return this.finish(o),o},u.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},u.prototype.restoreState=function(o){return this._state.set(o.state),this._bufferLength=o.bufferLength,o.buffer&&this._buffer.set(o.buffer),this._bytesHashed=o.bytesHashed,this._finished=!1,this},u.prototype.cleanSavedState=function(o){n.wipe(o.state),o.buffer&&n.wipe(o.buffer),o.bufferLength=0,o.bytesHashed=0},u}();t.SHA256=i;var h=new Int32Array([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 f(u,o,s,_,w){for(;w>=64;){for(var d=o[0],l=o[1],v=o[2],S=o[3],g=o[4],O=o[5],j=o[6],U=o[7],c=0;c<16;c++){var b=_+c*4;u[c]=r.readUint32BE(s,b)}for(var c=16;c<64;c++){var D=u[c-2],e=(D>>>17|D<<15)^(D>>>19|D<<13)^D>>>10;D=u[c-15];var a=(D>>>7|D<<25)^(D>>>18|D<<14)^D>>>3;u[c]=(e+u[c-7]|0)+(a+u[c-16]|0)}for(var c=0;c<64;c++){var e=(((g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&O^~g&j)|0)+(U+(h[c]+u[c]|0)|0)|0,a=((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+(d&l^d&v^l&v)|0;U=j,j=O,O=g,g=S+e|0,S=v,v=l,l=d,d=e+a|0}o[0]+=d,o[1]+=l,o[2]+=v,o[3]+=S,o[4]+=g,o[5]+=O,o[6]+=j,o[7]+=U,_+=64,w-=64}return _}function E(u){var o=new i;o.update(u);var s=o.digest();return o.clean(),s}t.hash=E})(Le);var xe={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.sharedKey=t.generateKeyPair=t.generateKeyPairFromSeed=t.scalarMultBase=t.scalarMult=t.SHARED_KEY_LENGTH=t.SECRET_KEY_LENGTH=t.PUBLIC_KEY_LENGTH=void 0;const r=jt,n=Et;t.PUBLIC_KEY_LENGTH=32,t.SECRET_KEY_LENGTH=32,t.SHARED_KEY_LENGTH=32;function i(c){const b=new Float64Array(16);if(c)for(let D=0;D<c.length;D++)b[D]=c[D];return b}const h=new Uint8Array(32);h[0]=9;const f=i([56129,1]);function E(c){let b=1;for(let D=0;D<16;D++){let e=c[D]+b+65535;b=Math.floor(e/65536),c[D]=e-b*65536}c[0]+=b-1+37*(b-1)}function u(c,b,D){const e=~(D-1);for(let a=0;a<16;a++){const y=e&(c[a]^b[a]);c[a]^=y,b[a]^=y}}function o(c,b){const D=i(),e=i();for(let a=0;a<16;a++)e[a]=b[a];E(e),E(e),E(e);for(let a=0;a<2;a++){D[0]=e[0]-65517;for(let m=1;m<15;m++)D[m]=e[m]-65535-(D[m-1]>>16&1),D[m-1]&=65535;D[15]=e[15]-32767-(D[14]>>16&1);const y=D[15]>>16&1;D[14]&=65535,u(e,D,1-y)}for(let a=0;a<16;a++)c[2*a]=e[a]&255,c[2*a+1]=e[a]>>8}function s(c,b){for(let D=0;D<16;D++)c[D]=b[2*D]+(b[2*D+1]<<8);c[15]&=32767}function _(c,b,D){for(let e=0;e<16;e++)c[e]=b[e]+D[e]}function w(c,b,D){for(let e=0;e<16;e++)c[e]=b[e]-D[e]}function d(c,b,D){let e,a,y=0,m=0,A=0,L=0,B=0,x=0,F=0,N=0,p=0,T=0,$=0,Z=0,J=0,X=0,C=0,R=0,P=0,I=0,H=0,K=0,z=0,Y=0,W=0,G=0,V=0,wt=0,St=0,Ot=0,Mt=0,Yt=0,ae=0,k=D[0],tt=D[1],et=D[2],rt=D[3],nt=D[4],it=D[5],at=D[6],ut=D[7],ot=D[8],ft=D[9],ht=D[10],st=D[11],ct=D[12],lt=D[13],Dt=D[14],_t=D[15];e=b[0],y+=e*k,m+=e*tt,A+=e*et,L+=e*rt,B+=e*nt,x+=e*it,F+=e*at,N+=e*ut,p+=e*ot,T+=e*ft,$+=e*ht,Z+=e*st,J+=e*ct,X+=e*lt,C+=e*Dt,R+=e*_t,e=b[1],m+=e*k,A+=e*tt,L+=e*et,B+=e*rt,x+=e*nt,F+=e*it,N+=e*at,p+=e*ut,T+=e*ot,$+=e*ft,Z+=e*ht,J+=e*st,X+=e*ct,C+=e*lt,R+=e*Dt,P+=e*_t,e=b[2],A+=e*k,L+=e*tt,B+=e*et,x+=e*rt,F+=e*nt,N+=e*it,p+=e*at,T+=e*ut,$+=e*ot,Z+=e*ft,J+=e*ht,X+=e*st,C+=e*ct,R+=e*lt,P+=e*Dt,I+=e*_t,e=b[3],L+=e*k,B+=e*tt,x+=e*et,F+=e*rt,N+=e*nt,p+=e*it,T+=e*at,$+=e*ut,Z+=e*ot,J+=e*ft,X+=e*ht,C+=e*st,R+=e*ct,P+=e*lt,I+=e*Dt,H+=e*_t,e=b[4],B+=e*k,x+=e*tt,F+=e*et,N+=e*rt,p+=e*nt,T+=e*it,$+=e*at,Z+=e*ut,J+=e*ot,X+=e*ft,C+=e*ht,R+=e*st,P+=e*ct,I+=e*lt,H+=e*Dt,K+=e*_t,e=b[5],x+=e*k,F+=e*tt,N+=e*et,p+=e*rt,T+=e*nt,$+=e*it,Z+=e*at,J+=e*ut,X+=e*ot,C+=e*ft,R+=e*ht,P+=e*st,I+=e*ct,H+=e*lt,K+=e*Dt,z+=e*_t,e=b[6],F+=e*k,N+=e*tt,p+=e*et,T+=e*rt,$+=e*nt,Z+=e*it,J+=e*at,X+=e*ut,C+=e*ot,R+=e*ft,P+=e*ht,I+=e*st,H+=e*ct,K+=e*lt,z+=e*Dt,Y+=e*_t,e=b[7],N+=e*k,p+=e*tt,T+=e*et,$+=e*rt,Z+=e*nt,J+=e*it,X+=e*at,C+=e*ut,R+=e*ot,P+=e*ft,I+=e*ht,H+=e*st,K+=e*ct,z+=e*lt,Y+=e*Dt,W+=e*_t,e=b[8],p+=e*k,T+=e*tt,$+=e*et,Z+=e*rt,J+=e*nt,X+=e*it,C+=e*at,R+=e*ut,P+=e*ot,I+=e*ft,H+=e*ht,K+=e*st,z+=e*ct,Y+=e*lt,W+=e*Dt,G+=e*_t,e=b[9],T+=e*k,$+=e*tt,Z+=e*et,J+=e*rt,X+=e*nt,C+=e*it,R+=e*at,P+=e*ut,I+=e*ot,H+=e*ft,K+=e*ht,z+=e*st,Y+=e*ct,W+=e*lt,G+=e*Dt,V+=e*_t,e=b[10],$+=e*k,Z+=e*tt,J+=e*et,X+=e*rt,C+=e*nt,R+=e*it,P+=e*at,I+=e*ut,H+=e*ot,K+=e*ft,z+=e*ht,Y+=e*st,W+=e*ct,G+=e*lt,V+=e*Dt,wt+=e*_t,e=b[11],Z+=e*k,J+=e*tt,X+=e*et,C+=e*rt,R+=e*nt,P+=e*it,I+=e*at,H+=e*ut,K+=e*ot,z+=e*ft,Y+=e*ht,W+=e*st,G+=e*ct,V+=e*lt,wt+=e*Dt,St+=e*_t,e=b[12],J+=e*k,X+=e*tt,C+=e*et,R+=e*rt,P+=e*nt,I+=e*it,H+=e*at,K+=e*ut,z+=e*ot,Y+=e*ft,W+=e*ht,G+=e*st,V+=e*ct,wt+=e*lt,St+=e*Dt,Ot+=e*_t,e=b[13],X+=e*k,C+=e*tt,R+=e*et,P+=e*rt,I+=e*nt,H+=e*it,K+=e*at,z+=e*ut,Y+=e*ot,W+=e*ft,G+=e*ht,V+=e*st,wt+=e*ct,St+=e*lt,Ot+=e*Dt,Mt+=e*_t,e=b[14],C+=e*k,R+=e*tt,P+=e*et,I+=e*rt,H+=e*nt,K+=e*it,z+=e*at,Y+=e*ut,W+=e*ot,G+=e*ft,V+=e*ht,wt+=e*st,St+=e*ct,Ot+=e*lt,Mt+=e*Dt,Yt+=e*_t,e=b[15],R+=e*k,P+=e*tt,I+=e*et,H+=e*rt,K+=e*nt,z+=e*it,Y+=e*at,W+=e*ut,G+=e*ot,V+=e*ft,wt+=e*ht,St+=e*st,Ot+=e*ct,Mt+=e*lt,Yt+=e*Dt,ae+=e*_t,y+=38*P,m+=38*I,A+=38*H,L+=38*K,B+=38*z,x+=38*Y,F+=38*W,N+=38*G,p+=38*V,T+=38*wt,$+=38*St,Z+=38*Ot,J+=38*Mt,X+=38*Yt,C+=38*ae,a=1,e=y+a+65535,a=Math.floor(e/65536),y=e-a*65536,e=m+a+65535,a=Math.floor(e/65536),m=e-a*65536,e=A+a+65535,a=Math.floor(e/65536),A=e-a*65536,e=L+a+65535,a=Math.floor(e/65536),L=e-a*65536,e=B+a+65535,a=Math.floor(e/65536),B=e-a*65536,e=x+a+65535,a=Math.floor(e/65536),x=e-a*65536,e=F+a+65535,a=Math.floor(e/65536),F=e-a*65536,e=N+a+65535,a=Math.floor(e/65536),N=e-a*65536,e=p+a+65535,a=Math.floor(e/65536),p=e-a*65536,e=T+a+65535,a=Math.floor(e/65536),T=e-a*65536,e=$+a+65535,a=Math.floor(e/65536),$=e-a*65536,e=Z+a+65535,a=Math.floor(e/65536),Z=e-a*65536,e=J+a+65535,a=Math.floor(e/65536),J=e-a*65536,e=X+a+65535,a=Math.floor(e/65536),X=e-a*65536,e=C+a+65535,a=Math.floor(e/65536),C=e-a*65536,e=R+a+65535,a=Math.floor(e/65536),R=e-a*65536,y+=a-1+37*(a-1),a=1,e=y+a+65535,a=Math.floor(e/65536),y=e-a*65536,e=m+a+65535,a=Math.floor(e/65536),m=e-a*65536,e=A+a+65535,a=Math.floor(e/65536),A=e-a*65536,e=L+a+65535,a=Math.floor(e/65536),L=e-a*65536,e=B+a+65535,a=Math.floor(e/65536),B=e-a*65536,e=x+a+65535,a=Math.floor(e/65536),x=e-a*65536,e=F+a+65535,a=Math.floor(e/65536),F=e-a*65536,e=N+a+65535,a=Math.floor(e/65536),N=e-a*65536,e=p+a+65535,a=Math.floor(e/65536),p=e-a*65536,e=T+a+65535,a=Math.floor(e/65536),T=e-a*65536,e=$+a+65535,a=Math.floor(e/65536),$=e-a*65536,e=Z+a+65535,a=Math.floor(e/65536),Z=e-a*65536,e=J+a+65535,a=Math.floor(e/65536),J=e-a*65536,e=X+a+65535,a=Math.floor(e/65536),X=e-a*65536,e=C+a+65535,a=Math.floor(e/65536),C=e-a*65536,e=R+a+65535,a=Math.floor(e/65536),R=e-a*65536,y+=a-1+37*(a-1),c[0]=y,c[1]=m,c[2]=A,c[3]=L,c[4]=B,c[5]=x,c[6]=F,c[7]=N,c[8]=p,c[9]=T,c[10]=$,c[11]=Z,c[12]=J,c[13]=X,c[14]=C,c[15]=R}function l(c,b){d(c,b,b)}function v(c,b){const D=i();for(let e=0;e<16;e++)D[e]=b[e];for(let e=253;e>=0;e--)l(D,D),e!==2&&e!==4&&d(D,D,b);for(let e=0;e<16;e++)c[e]=D[e]}function S(c,b){const D=new Uint8Array(32),e=new Float64Array(80),a=i(),y=i(),m=i(),A=i(),L=i(),B=i();for(let p=0;p<31;p++)D[p]=c[p];D[31]=c[31]&127|64,D[0]&=248,s(e,b);for(let p=0;p<16;p++)y[p]=e[p];a[0]=A[0]=1;for(let p=254;p>=0;--p){const T=D[p>>>3]>>>(p&7)&1;u(a,y,T),u(m,A,T),_(L,a,m),w(a,a,m),_(m,y,A),w(y,y,A),l(A,L),l(B,a),d(a,m,a),d(m,y,L),_(L,a,m),w(a,a,m),l(y,a),w(m,A,B),d(a,m,f),_(a,a,A),d(m,m,a),d(a,A,B),d(A,y,e),l(y,L),u(a,y,T),u(m,A,T)}for(let p=0;p<16;p++)e[p+16]=a[p],e[p+32]=m[p],e[p+48]=y[p],e[p+64]=A[p];const x=e.subarray(32),F=e.subarray(16);v(x,x),d(F,F,x);const N=new Uint8Array(32);return o(N,F),N}t.scalarMult=S;function g(c){return S(c,h)}t.scalarMultBase=g;function O(c){if(c.length!==t.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${t.SECRET_KEY_LENGTH} bytes`);const b=new Uint8Array(c);return{publicKey:g(b),secretKey:b}}t.generateKeyPairFromSeed=O;function j(c){const b=(0,r.randomBytes)(32,c),D=O(b);return(0,n.wipe)(b),D}t.generateKeyPair=j;function U(c,b,D=!1){if(c.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(b.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const e=S(c,b);if(D){let a=0;for(let y=0;y<e.length;y++)a|=e[y];if(a===0)throw new Error("X25519: invalid shared key")}return e}t.sharedKey=U})(xe);function Ar(t,r){if(t.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),i=0;i<n.length;i++)n[i]=255;for(var h=0;h<t.length;h++){var f=t.charAt(h),E=f.charCodeAt(0);if(n[E]!==255)throw new TypeError(f+" is ambiguous");n[E]=h}var u=t.length,o=t.charAt(0),s=Math.log(u)/Math.log(256),_=Math.log(256)/Math.log(u);function w(v){if(v instanceof Uint8Array||(ArrayBuffer.isView(v)?v=new Uint8Array(v.buffer,v.byteOffset,v.byteLength):Array.isArray(v)&&(v=Uint8Array.from(v))),!(v instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(v.length===0)return"";for(var S=0,g=0,O=0,j=v.length;O!==j&&v[O]===0;)O++,S++;for(var U=(j-O)*_+1>>>0,c=new Uint8Array(U);O!==j;){for(var b=v[O],D=0,e=U-1;(b!==0||D<g)&&e!==-1;e--,D++)b+=256*c[e]>>>0,c[e]=b%u>>>0,b=b/u>>>0;if(b!==0)throw new Error("Non-zero carry");g=D,O++}for(var a=U-g;a!==U&&c[a]===0;)a++;for(var y=o.repeat(S);a<U;++a)y+=t.charAt(c[a]);return y}function d(v){if(typeof v!="string")throw new TypeError("Expected String");if(v.length===0)return new Uint8Array;var S=0;if(v[S]!==" "){for(var g=0,O=0;v[S]===o;)g++,S++;for(var j=(v.length-S)*s+1>>>0,U=new Uint8Array(j);v[S];){var c=n[v.charCodeAt(S)];if(c===255)return;for(var b=0,D=j-1;(c!==0||b<O)&&D!==-1;D--,b++)c+=u*U[D]>>>0,U[D]=c%256>>>0,c=c/256>>>0;if(c!==0)throw new Error("Non-zero carry");O=b,S++}if(v[S]!==" "){for(var e=j-O;e!==j&&U[e]===0;)e++;for(var a=new Uint8Array(g+(j-e)),y=g;e!==j;)a[y++]=U[e++];return a}}}function l(v){var S=d(v);if(S)return S;throw new Error(`Non-${r} character`)}return{encode:w,decodeUnsafe:d,decode:l}}var Tr=Ar,Fr=Tr;const Nr=t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},Mr=t=>new TextEncoder().encode(t),Lr=t=>new TextDecoder().decode(t);class xr{constructor(r,n,i){this.name=r,this.prefix=n,this.baseEncode=i}encode(r){if(r instanceof Uint8Array)return`${this.prefix}${this.baseEncode(r)}`;throw Error("Unknown type, must be binary type")}}class Br{constructor(r,n,i){if(this.name=r,this.prefix=n,n.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=n.codePointAt(0),this.baseDecode=i}decode(r){if(typeof r=="string"){if(r.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(r)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(r.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(r){return Be(this,r)}}class Rr{constructor(r){this.decoders=r}or(r){return Be(this,r)}decode(r){const n=r[0],i=this.decoders[n];if(i)return i.decode(r);throw RangeError(`Unable to decode multibase string ${JSON.stringify(r)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const Be=(t,r)=>new Rr({...t.decoders||{[t.prefix]:t},...r.decoders||{[r.prefix]:r}});class jr{constructor(r,n,i,h){this.name=r,this.prefix=n,this.baseEncode=i,this.baseDecode=h,this.encoder=new xr(r,n,i),this.decoder=new Br(r,n,h)}encode(r){return this.encoder.encode(r)}decode(r){return this.decoder.decode(r)}}const Kt=({name:t,prefix:r,encode:n,decode:i})=>new jr(t,r,n,i),Nt=({prefix:t,name:r,alphabet:n})=>{const{encode:i,decode:h}=Fr(n,r);return Kt({prefix:t,name:r,encode:i,decode:f=>Nr(h(f))})},Pr=(t,r,n,i)=>{const h={};for(let _=0;_<r.length;++_)h[r[_]]=_;let f=t.length;for(;t[f-1]==="=";)--f;const E=new Uint8Array(f*n/8|0);let u=0,o=0,s=0;for(let _=0;_<f;++_){const w=h[t[_]];if(w===void 0)throw new SyntaxError(`Non-${i} character`);o=o<<n|w,u+=n,u>=8&&(u-=8,E[s++]=255&o>>u)}if(u>=n||255&o<<8-u)throw new SyntaxError("Unexpected end of data");return E},Ir=(t,r,n)=>{const i=r[r.length-1]==="=",h=(1<<n)-1;let f="",E=0,u=0;for(let o=0;o<t.length;++o)for(u=u<<8|t[o],E+=8;E>n;)E-=n,f+=r[h&u>>E];if(E&&(f+=r[h&u<<n-E]),i)for(;f.length*n&7;)f+="=";return f},Q=({name:t,prefix:r,bitsPerChar:n,alphabet:i})=>Kt({prefix:r,name:t,encode(h){return Ir(h,i,n)},decode(h){return Pr(h,i,n,t)}}),Hr=Kt({prefix:"\0",name:"identity",encode:t=>Lr(t),decode:t=>Mr(t)}),Kr=Object.freeze(Object.defineProperty({__proto__:null,identity:Hr},Symbol.toStringTag,{value:"Module"})),zr=Q({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),Yr=Object.freeze(Object.defineProperty({__proto__:null,base2:zr},Symbol.toStringTag,{value:"Module"})),Wr=Q({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),qr=Object.freeze(Object.defineProperty({__proto__:null,base8:Wr},Symbol.toStringTag,{value:"Module"})),Gr=Nt({prefix:"9",name:"base10",alphabet:"0123456789"}),$r=Object.freeze(Object.defineProperty({__proto__:null,base10:Gr},Symbol.toStringTag,{value:"Module"})),Vr=Q({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Xr=Q({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),Jr=Object.freeze(Object.defineProperty({__proto__:null,base16:Vr,base16upper:Xr},Symbol.toStringTag,{value:"Module"})),Zr=Q({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Qr=Q({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),kr=Q({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),tn=Q({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),en=Q({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),rn=Q({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),nn=Q({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),an=Q({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),un=Q({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),on=Object.freeze(Object.defineProperty({__proto__:null,base32:Zr,base32hex:en,base32hexpad:nn,base32hexpadupper:an,base32hexupper:rn,base32pad:kr,base32padupper:tn,base32upper:Qr,base32z:un},Symbol.toStringTag,{value:"Module"})),fn=Nt({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),hn=Nt({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),sn=Object.freeze(Object.defineProperty({__proto__:null,base36:fn,base36upper:hn},Symbol.toStringTag,{value:"Module"})),cn=Nt({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),ln=Nt({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),Dn=Object.freeze(Object.defineProperty({__proto__:null,base58btc:cn,base58flickr:ln},Symbol.toStringTag,{value:"Module"})),_n=Q({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),dn=Q({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),En=Q({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),bn=Q({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),vn=Object.freeze(Object.defineProperty({__proto__:null,base64:_n,base64pad:dn,base64url:En,base64urlpad:bn},Symbol.toStringTag,{value:"Module"})),Re=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),wn=Re.reduce((t,r,n)=>(t[n]=r,t),[]),gn=Re.reduce((t,r,n)=>(t[r.codePointAt(0)]=n,t),[]);function yn(t){return t.reduce((r,n)=>(r+=wn[n],r),"")}function pn(t){const r=[];for(const n of t){const i=gn[n.codePointAt(0)];if(i===void 0)throw new Error(`Non-base256emoji character: ${n}`);r.push(i)}return new Uint8Array(r)}const Sn=Kt({prefix:"🚀",name:"base256emoji",encode:yn,decode:pn}),mn=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:Sn},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;var je={};/*! *****************************************************************************
|
|
1
|
+
"use strict";const Lt=require("./index-DpZGf7ao.js");var ye={},Rt={},M={},pe={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});function r(u,o){var s=u>>>16&65535,_=u&65535,w=o>>>16&65535,d=o&65535;return _*d+(s*d+_*w<<16>>>0)|0}t.mul=Math.imul||r;function n(u,o){return u+o|0}t.add=n;function i(u,o){return u-o|0}t.sub=i;function h(u,o){return u<<o|u>>>32-o}t.rotl=h;function f(u,o){return u<<32-o|u>>>o}t.rotr=f;function E(u){return typeof u=="number"&&isFinite(u)&&Math.floor(u)===u}t.isInteger=Number.isInteger||E,t.MAX_SAFE_INTEGER=9007199254740991,t.isSafeInteger=function(u){return t.isInteger(u)&&u>=-t.MAX_SAFE_INTEGER&&u<=t.MAX_SAFE_INTEGER}})(pe);Object.defineProperty(M,"__esModule",{value:!0});var Se=pe;function Ke(t,r){return r===void 0&&(r=0),(t[r+0]<<8|t[r+1])<<16>>16}M.readInt16BE=Ke;function ze(t,r){return r===void 0&&(r=0),(t[r+0]<<8|t[r+1])>>>0}M.readUint16BE=ze;function Ye(t,r){return r===void 0&&(r=0),(t[r+1]<<8|t[r])<<16>>16}M.readInt16LE=Ye;function We(t,r){return r===void 0&&(r=0),(t[r+1]<<8|t[r])>>>0}M.readUint16LE=We;function me(t,r,n){return r===void 0&&(r=new Uint8Array(2)),n===void 0&&(n=0),r[n+0]=t>>>8,r[n+1]=t>>>0,r}M.writeUint16BE=me;M.writeInt16BE=me;function Ce(t,r,n){return r===void 0&&(r=new Uint8Array(2)),n===void 0&&(n=0),r[n+0]=t>>>0,r[n+1]=t>>>8,r}M.writeUint16LE=Ce;M.writeInt16LE=Ce;function Vt(t,r){return r===void 0&&(r=0),t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3]}M.readInt32BE=Vt;function Xt(t,r){return r===void 0&&(r=0),(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3])>>>0}M.readUint32BE=Xt;function Jt(t,r){return r===void 0&&(r=0),t[r+3]<<24|t[r+2]<<16|t[r+1]<<8|t[r]}M.readInt32LE=Jt;function Zt(t,r){return r===void 0&&(r=0),(t[r+3]<<24|t[r+2]<<16|t[r+1]<<8|t[r])>>>0}M.readUint32LE=Zt;function xt(t,r,n){return r===void 0&&(r=new Uint8Array(4)),n===void 0&&(n=0),r[n+0]=t>>>24,r[n+1]=t>>>16,r[n+2]=t>>>8,r[n+3]=t>>>0,r}M.writeUint32BE=xt;M.writeInt32BE=xt;function Bt(t,r,n){return r===void 0&&(r=new Uint8Array(4)),n===void 0&&(n=0),r[n+0]=t>>>0,r[n+1]=t>>>8,r[n+2]=t>>>16,r[n+3]=t>>>24,r}M.writeUint32LE=Bt;M.writeInt32LE=Bt;function qe(t,r){r===void 0&&(r=0);var n=Vt(t,r),i=Vt(t,r+4);return n*4294967296+i-(i>>31)*4294967296}M.readInt64BE=qe;function Ge(t,r){r===void 0&&(r=0);var n=Xt(t,r),i=Xt(t,r+4);return n*4294967296+i}M.readUint64BE=Ge;function $e(t,r){r===void 0&&(r=0);var n=Jt(t,r),i=Jt(t,r+4);return i*4294967296+n-(n>>31)*4294967296}M.readInt64LE=$e;function Ve(t,r){r===void 0&&(r=0);var n=Zt(t,r),i=Zt(t,r+4);return i*4294967296+n}M.readUint64LE=Ve;function Oe(t,r,n){return r===void 0&&(r=new Uint8Array(8)),n===void 0&&(n=0),xt(t/4294967296>>>0,r,n),xt(t>>>0,r,n+4),r}M.writeUint64BE=Oe;M.writeInt64BE=Oe;function Ue(t,r,n){return r===void 0&&(r=new Uint8Array(8)),n===void 0&&(n=0),Bt(t>>>0,r,n),Bt(t/4294967296>>>0,r,n+4),r}M.writeUint64LE=Ue;M.writeInt64LE=Ue;function Xe(t,r,n){if(n===void 0&&(n=0),t%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(t/8>r.length-n)throw new Error("readUintBE: array is too short for the given bitLength");for(var i=0,h=1,f=t/8+n-1;f>=n;f--)i+=r[f]*h,h*=256;return i}M.readUintBE=Xe;function Je(t,r,n){if(n===void 0&&(n=0),t%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(t/8>r.length-n)throw new Error("readUintLE: array is too short for the given bitLength");for(var i=0,h=1,f=n;f<n+t/8;f++)i+=r[f]*h,h*=256;return i}M.readUintLE=Je;function Ze(t,r,n,i){if(n===void 0&&(n=new Uint8Array(t/8)),i===void 0&&(i=0),t%8!==0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!Se.isSafeInteger(r))throw new Error("writeUintBE value must be an integer");for(var h=1,f=t/8+i-1;f>=i;f--)n[f]=r/h&255,h*=256;return n}M.writeUintBE=Ze;function Qe(t,r,n,i){if(n===void 0&&(n=new Uint8Array(t/8)),i===void 0&&(i=0),t%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!Se.isSafeInteger(r))throw new Error("writeUintLE value must be an integer");for(var h=1,f=i;f<i+t/8;f++)n[f]=r/h&255,h*=256;return n}M.writeUintLE=Qe;function ke(t,r){r===void 0&&(r=0);var n=new DataView(t.buffer,t.byteOffset,t.byteLength);return n.getFloat32(r)}M.readFloat32BE=ke;function tr(t,r){r===void 0&&(r=0);var n=new DataView(t.buffer,t.byteOffset,t.byteLength);return n.getFloat32(r,!0)}M.readFloat32LE=tr;function er(t,r){r===void 0&&(r=0);var n=new DataView(t.buffer,t.byteOffset,t.byteLength);return n.getFloat64(r)}M.readFloat64BE=er;function rr(t,r){r===void 0&&(r=0);var n=new DataView(t.buffer,t.byteOffset,t.byteLength);return n.getFloat64(r,!0)}M.readFloat64LE=rr;function nr(t,r,n){r===void 0&&(r=new Uint8Array(4)),n===void 0&&(n=0);var i=new DataView(r.buffer,r.byteOffset,r.byteLength);return i.setFloat32(n,t),r}M.writeFloat32BE=nr;function ir(t,r,n){r===void 0&&(r=new Uint8Array(4)),n===void 0&&(n=0);var i=new DataView(r.buffer,r.byteOffset,r.byteLength);return i.setFloat32(n,t,!0),r}M.writeFloat32LE=ir;function ar(t,r,n){r===void 0&&(r=new Uint8Array(8)),n===void 0&&(n=0);var i=new DataView(r.buffer,r.byteOffset,r.byteLength);return i.setFloat64(n,t),r}M.writeFloat64BE=ar;function ur(t,r,n){r===void 0&&(r=new Uint8Array(8)),n===void 0&&(n=0);var i=new DataView(r.buffer,r.byteOffset,r.byteLength);return i.setFloat64(n,t,!0),r}M.writeFloat64LE=ur;var Et={};Object.defineProperty(Et,"__esModule",{value:!0});function or(t){for(var r=0;r<t.length;r++)t[r]=0;return t}Et.wipe=or;Object.defineProperty(Rt,"__esModule",{value:!0});var dt=M,Qt=Et,fr=20;function hr(t,r,n){for(var i=1634760805,h=857760878,f=2036477234,E=1797285236,u=n[3]<<24|n[2]<<16|n[1]<<8|n[0],o=n[7]<<24|n[6]<<16|n[5]<<8|n[4],s=n[11]<<24|n[10]<<16|n[9]<<8|n[8],_=n[15]<<24|n[14]<<16|n[13]<<8|n[12],w=n[19]<<24|n[18]<<16|n[17]<<8|n[16],d=n[23]<<24|n[22]<<16|n[21]<<8|n[20],l=n[27]<<24|n[26]<<16|n[25]<<8|n[24],v=n[31]<<24|n[30]<<16|n[29]<<8|n[28],S=r[3]<<24|r[2]<<16|r[1]<<8|r[0],g=r[7]<<24|r[6]<<16|r[5]<<8|r[4],O=r[11]<<24|r[10]<<16|r[9]<<8|r[8],j=r[15]<<24|r[14]<<16|r[13]<<8|r[12],U=i,c=h,b=f,D=E,e=u,a=o,y=s,m=_,A=w,L=d,B=l,x=v,F=S,N=g,p=O,T=j,$=0;$<fr;$+=2)U=U+e|0,F^=U,F=F>>>16|F<<16,A=A+F|0,e^=A,e=e>>>20|e<<12,c=c+a|0,N^=c,N=N>>>16|N<<16,L=L+N|0,a^=L,a=a>>>20|a<<12,b=b+y|0,p^=b,p=p>>>16|p<<16,B=B+p|0,y^=B,y=y>>>20|y<<12,D=D+m|0,T^=D,T=T>>>16|T<<16,x=x+T|0,m^=x,m=m>>>20|m<<12,b=b+y|0,p^=b,p=p>>>24|p<<8,B=B+p|0,y^=B,y=y>>>25|y<<7,D=D+m|0,T^=D,T=T>>>24|T<<8,x=x+T|0,m^=x,m=m>>>25|m<<7,c=c+a|0,N^=c,N=N>>>24|N<<8,L=L+N|0,a^=L,a=a>>>25|a<<7,U=U+e|0,F^=U,F=F>>>24|F<<8,A=A+F|0,e^=A,e=e>>>25|e<<7,U=U+a|0,T^=U,T=T>>>16|T<<16,B=B+T|0,a^=B,a=a>>>20|a<<12,c=c+y|0,F^=c,F=F>>>16|F<<16,x=x+F|0,y^=x,y=y>>>20|y<<12,b=b+m|0,N^=b,N=N>>>16|N<<16,A=A+N|0,m^=A,m=m>>>20|m<<12,D=D+e|0,p^=D,p=p>>>16|p<<16,L=L+p|0,e^=L,e=e>>>20|e<<12,b=b+m|0,N^=b,N=N>>>24|N<<8,A=A+N|0,m^=A,m=m>>>25|m<<7,D=D+e|0,p^=D,p=p>>>24|p<<8,L=L+p|0,e^=L,e=e>>>25|e<<7,c=c+y|0,F^=c,F=F>>>24|F<<8,x=x+F|0,y^=x,y=y>>>25|y<<7,U=U+a|0,T^=U,T=T>>>24|T<<8,B=B+T|0,a^=B,a=a>>>25|a<<7;dt.writeUint32LE(U+i|0,t,0),dt.writeUint32LE(c+h|0,t,4),dt.writeUint32LE(b+f|0,t,8),dt.writeUint32LE(D+E|0,t,12),dt.writeUint32LE(e+u|0,t,16),dt.writeUint32LE(a+o|0,t,20),dt.writeUint32LE(y+s|0,t,24),dt.writeUint32LE(m+_|0,t,28),dt.writeUint32LE(A+w|0,t,32),dt.writeUint32LE(L+d|0,t,36),dt.writeUint32LE(B+l|0,t,40),dt.writeUint32LE(x+v|0,t,44),dt.writeUint32LE(F+S|0,t,48),dt.writeUint32LE(N+g|0,t,52),dt.writeUint32LE(p+O|0,t,56),dt.writeUint32LE(T+j|0,t,60)}function Ae(t,r,n,i,h){if(h===void 0&&(h=0),t.length!==32)throw new Error("ChaCha: key size must be 32 bytes");if(i.length<n.length)throw new Error("ChaCha: destination is shorter than source");var f,E;if(h===0){if(r.length!==8&&r.length!==12)throw new Error("ChaCha nonce must be 8 or 12 bytes");f=new Uint8Array(16),E=f.length-r.length,f.set(r,E)}else{if(r.length!==16)throw new Error("ChaCha nonce with counter must be 16 bytes");f=r,E=h}for(var u=new Uint8Array(64),o=0;o<n.length;o+=64){hr(u,f,t);for(var s=o;s<o+64&&s<n.length;s++)i[s]=n[s]^u[s-o];cr(f,0,E)}return Qt.wipe(u),h===0&&Qt.wipe(f),i}Rt.streamXOR=Ae;function sr(t,r,n,i){return i===void 0&&(i=0),Qt.wipe(n),Ae(t,r,n,n,i)}Rt.stream=sr;function cr(t,r,n){for(var i=1;n--;)i=i+(t[r]&255)|0,t[r]=i&255,i>>>=8,r++;if(i>0)throw new Error("ChaCha: counter overflow")}var Te={},vt={};Object.defineProperty(vt,"__esModule",{value:!0});function lr(t,r,n){return~(t-1)&r|t-1&n}vt.select=lr;function Dr(t,r){return(t|0)-(r|0)-1>>>31&1}vt.lessOrEqual=Dr;function Fe(t,r){if(t.length!==r.length)return 0;for(var n=0,i=0;i<t.length;i++)n|=t[i]^r[i];return 1&n-1>>>8}vt.compare=Fe;function _r(t,r){return t.length===0||r.length===0?!1:Fe(t,r)!==0}vt.equal=_r;(function(t){Object.defineProperty(t,"__esModule",{value:!0});var r=vt,n=Et;t.DIGEST_LENGTH=16;var i=function(){function E(u){this.digestLength=t.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var o=u[0]|u[1]<<8;this._r[0]=o&8191;var s=u[2]|u[3]<<8;this._r[1]=(o>>>13|s<<3)&8191;var _=u[4]|u[5]<<8;this._r[2]=(s>>>10|_<<6)&7939;var w=u[6]|u[7]<<8;this._r[3]=(_>>>7|w<<9)&8191;var d=u[8]|u[9]<<8;this._r[4]=(w>>>4|d<<12)&255,this._r[5]=d>>>1&8190;var l=u[10]|u[11]<<8;this._r[6]=(d>>>14|l<<2)&8191;var v=u[12]|u[13]<<8;this._r[7]=(l>>>11|v<<5)&8065;var S=u[14]|u[15]<<8;this._r[8]=(v>>>8|S<<8)&8191,this._r[9]=S>>>5&127,this._pad[0]=u[16]|u[17]<<8,this._pad[1]=u[18]|u[19]<<8,this._pad[2]=u[20]|u[21]<<8,this._pad[3]=u[22]|u[23]<<8,this._pad[4]=u[24]|u[25]<<8,this._pad[5]=u[26]|u[27]<<8,this._pad[6]=u[28]|u[29]<<8,this._pad[7]=u[30]|u[31]<<8}return E.prototype._blocks=function(u,o,s){for(var _=this._fin?0:2048,w=this._h[0],d=this._h[1],l=this._h[2],v=this._h[3],S=this._h[4],g=this._h[5],O=this._h[6],j=this._h[7],U=this._h[8],c=this._h[9],b=this._r[0],D=this._r[1],e=this._r[2],a=this._r[3],y=this._r[4],m=this._r[5],A=this._r[6],L=this._r[7],B=this._r[8],x=this._r[9];s>=16;){var F=u[o+0]|u[o+1]<<8;w+=F&8191;var N=u[o+2]|u[o+3]<<8;d+=(F>>>13|N<<3)&8191;var p=u[o+4]|u[o+5]<<8;l+=(N>>>10|p<<6)&8191;var T=u[o+6]|u[o+7]<<8;v+=(p>>>7|T<<9)&8191;var $=u[o+8]|u[o+9]<<8;S+=(T>>>4|$<<12)&8191,g+=$>>>1&8191;var Z=u[o+10]|u[o+11]<<8;O+=($>>>14|Z<<2)&8191;var J=u[o+12]|u[o+13]<<8;j+=(Z>>>11|J<<5)&8191;var X=u[o+14]|u[o+15]<<8;U+=(J>>>8|X<<8)&8191,c+=X>>>5|_;var C=0,R=C;R+=w*b,R+=d*(5*x),R+=l*(5*B),R+=v*(5*L),R+=S*(5*A),C=R>>>13,R&=8191,R+=g*(5*m),R+=O*(5*y),R+=j*(5*a),R+=U*(5*e),R+=c*(5*D),C+=R>>>13,R&=8191;var P=C;P+=w*D,P+=d*b,P+=l*(5*x),P+=v*(5*B),P+=S*(5*L),C=P>>>13,P&=8191,P+=g*(5*A),P+=O*(5*m),P+=j*(5*y),P+=U*(5*a),P+=c*(5*e),C+=P>>>13,P&=8191;var I=C;I+=w*e,I+=d*D,I+=l*b,I+=v*(5*x),I+=S*(5*B),C=I>>>13,I&=8191,I+=g*(5*L),I+=O*(5*A),I+=j*(5*m),I+=U*(5*y),I+=c*(5*a),C+=I>>>13,I&=8191;var H=C;H+=w*a,H+=d*e,H+=l*D,H+=v*b,H+=S*(5*x),C=H>>>13,H&=8191,H+=g*(5*B),H+=O*(5*L),H+=j*(5*A),H+=U*(5*m),H+=c*(5*y),C+=H>>>13,H&=8191;var K=C;K+=w*y,K+=d*a,K+=l*e,K+=v*D,K+=S*b,C=K>>>13,K&=8191,K+=g*(5*x),K+=O*(5*B),K+=j*(5*L),K+=U*(5*A),K+=c*(5*m),C+=K>>>13,K&=8191;var z=C;z+=w*m,z+=d*y,z+=l*a,z+=v*e,z+=S*D,C=z>>>13,z&=8191,z+=g*b,z+=O*(5*x),z+=j*(5*B),z+=U*(5*L),z+=c*(5*A),C+=z>>>13,z&=8191;var Y=C;Y+=w*A,Y+=d*m,Y+=l*y,Y+=v*a,Y+=S*e,C=Y>>>13,Y&=8191,Y+=g*D,Y+=O*b,Y+=j*(5*x),Y+=U*(5*B),Y+=c*(5*L),C+=Y>>>13,Y&=8191;var W=C;W+=w*L,W+=d*A,W+=l*m,W+=v*y,W+=S*a,C=W>>>13,W&=8191,W+=g*e,W+=O*D,W+=j*b,W+=U*(5*x),W+=c*(5*B),C+=W>>>13,W&=8191;var G=C;G+=w*B,G+=d*L,G+=l*A,G+=v*m,G+=S*y,C=G>>>13,G&=8191,G+=g*a,G+=O*e,G+=j*D,G+=U*b,G+=c*(5*x),C+=G>>>13,G&=8191;var V=C;V+=w*x,V+=d*B,V+=l*L,V+=v*A,V+=S*m,C=V>>>13,V&=8191,V+=g*y,V+=O*a,V+=j*e,V+=U*D,V+=c*b,C+=V>>>13,V&=8191,C=(C<<2)+C|0,C=C+R|0,R=C&8191,C=C>>>13,P+=C,w=R,d=P,l=I,v=H,S=K,g=z,O=Y,j=W,U=G,c=V,o+=16,s-=16}this._h[0]=w,this._h[1]=d,this._h[2]=l,this._h[3]=v,this._h[4]=S,this._h[5]=g,this._h[6]=O,this._h[7]=j,this._h[8]=U,this._h[9]=c},E.prototype.finish=function(u,o){o===void 0&&(o=0);var s=new Uint16Array(10),_,w,d,l;if(this._leftover){for(l=this._leftover,this._buffer[l++]=1;l<16;l++)this._buffer[l]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(_=this._h[1]>>>13,this._h[1]&=8191,l=2;l<10;l++)this._h[l]+=_,_=this._h[l]>>>13,this._h[l]&=8191;for(this._h[0]+=_*5,_=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=_,_=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=_,s[0]=this._h[0]+5,_=s[0]>>>13,s[0]&=8191,l=1;l<10;l++)s[l]=this._h[l]+_,_=s[l]>>>13,s[l]&=8191;for(s[9]-=8192,w=(_^1)-1,l=0;l<10;l++)s[l]&=w;for(w=~w,l=0;l<10;l++)this._h[l]=this._h[l]&w|s[l];for(this._h[0]=(this._h[0]|this._h[1]<<13)&65535,this._h[1]=(this._h[1]>>>3|this._h[2]<<10)&65535,this._h[2]=(this._h[2]>>>6|this._h[3]<<7)&65535,this._h[3]=(this._h[3]>>>9|this._h[4]<<4)&65535,this._h[4]=(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14)&65535,this._h[5]=(this._h[6]>>>2|this._h[7]<<11)&65535,this._h[6]=(this._h[7]>>>5|this._h[8]<<8)&65535,this._h[7]=(this._h[8]>>>8|this._h[9]<<5)&65535,d=this._h[0]+this._pad[0],this._h[0]=d&65535,l=1;l<8;l++)d=(this._h[l]+this._pad[l]|0)+(d>>>16)|0,this._h[l]=d&65535;return u[o+0]=this._h[0]>>>0,u[o+1]=this._h[0]>>>8,u[o+2]=this._h[1]>>>0,u[o+3]=this._h[1]>>>8,u[o+4]=this._h[2]>>>0,u[o+5]=this._h[2]>>>8,u[o+6]=this._h[3]>>>0,u[o+7]=this._h[3]>>>8,u[o+8]=this._h[4]>>>0,u[o+9]=this._h[4]>>>8,u[o+10]=this._h[5]>>>0,u[o+11]=this._h[5]>>>8,u[o+12]=this._h[6]>>>0,u[o+13]=this._h[6]>>>8,u[o+14]=this._h[7]>>>0,u[o+15]=this._h[7]>>>8,this._finished=!0,this},E.prototype.update=function(u){var o=0,s=u.length,_;if(this._leftover){_=16-this._leftover,_>s&&(_=s);for(var w=0;w<_;w++)this._buffer[this._leftover+w]=u[o+w];if(s-=_,o+=_,this._leftover+=_,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(s>=16&&(_=s-s%16,this._blocks(u,o,_),o+=_,s-=_),s){for(var w=0;w<s;w++)this._buffer[this._leftover+w]=u[o+w];this._leftover+=s}return this},E.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var u=new Uint8Array(16);return this.finish(u),u},E.prototype.clean=function(){return n.wipe(this._buffer),n.wipe(this._r),n.wipe(this._h),n.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},E}();t.Poly1305=i;function h(E,u){var o=new i(E);o.update(u);var s=o.digest();return o.clean(),s}t.oneTimeAuth=h;function f(E,u){return E.length!==t.DIGEST_LENGTH||u.length!==t.DIGEST_LENGTH?!1:r.equal(E,u)}t.equal=f})(Te);(function(t){Object.defineProperty(t,"__esModule",{value:!0});var r=Rt,n=Te,i=Et,h=M,f=vt;t.KEY_LENGTH=32,t.NONCE_LENGTH=12,t.TAG_LENGTH=16;var E=new Uint8Array(16),u=function(){function o(s){if(this.nonceLength=t.NONCE_LENGTH,this.tagLength=t.TAG_LENGTH,s.length!==t.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(s)}return o.prototype.seal=function(s,_,w,d){if(s.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var l=new Uint8Array(16);l.set(s,l.length-s.length);var v=new Uint8Array(32);r.stream(this._key,l,v,4);var S=_.length+this.tagLength,g;if(d){if(d.length!==S)throw new Error("ChaCha20Poly1305: incorrect destination length");g=d}else g=new Uint8Array(S);return r.streamXOR(this._key,l,_,g,4),this._authenticate(g.subarray(g.length-this.tagLength,g.length),v,g.subarray(0,g.length-this.tagLength),w),i.wipe(l),g},o.prototype.open=function(s,_,w,d){if(s.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(_.length<this.tagLength)return null;var l=new Uint8Array(16);l.set(s,l.length-s.length);var v=new Uint8Array(32);r.stream(this._key,l,v,4);var S=new Uint8Array(this.tagLength);if(this._authenticate(S,v,_.subarray(0,_.length-this.tagLength),w),!f.equal(S,_.subarray(_.length-this.tagLength,_.length)))return null;var g=_.length-this.tagLength,O;if(d){if(d.length!==g)throw new Error("ChaCha20Poly1305: incorrect destination length");O=d}else O=new Uint8Array(g);return r.streamXOR(this._key,l,_.subarray(0,_.length-this.tagLength),O,4),i.wipe(l),O},o.prototype.clean=function(){return i.wipe(this._key),this},o.prototype._authenticate=function(s,_,w,d){var l=new n.Poly1305(_);d&&(l.update(d),d.length%16>0&&l.update(E.subarray(d.length%16))),l.update(w),w.length%16>0&&l.update(E.subarray(w.length%16));var v=new Uint8Array(8);d&&h.writeUint64LE(d.length,v),l.update(v),h.writeUint64LE(w.length,v),l.update(v);for(var S=l.digest(),g=0;g<S.length;g++)s[g]=S[g];l.clean(),i.wipe(S),i.wipe(v)},o}();t.ChaCha20Poly1305=u})(ye);var Ne={},Ft={},ne={};Object.defineProperty(ne,"__esModule",{value:!0});function dr(t){return typeof t.saveState<"u"&&typeof t.restoreState<"u"&&typeof t.cleanSavedState<"u"}ne.isSerializableHash=dr;Object.defineProperty(Ft,"__esModule",{value:!0});var bt=ne,Er=vt,br=Et,Me=function(){function t(r,n){this._finished=!1,this._inner=new r,this._outer=new r,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var i=new Uint8Array(this.blockSize);n.length>this.blockSize?this._inner.update(n).finish(i).clean():i.set(n);for(var h=0;h<i.length;h++)i[h]^=54;this._inner.update(i);for(var h=0;h<i.length;h++)i[h]^=106;this._outer.update(i),bt.isSerializableHash(this._inner)&&bt.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),br.wipe(i)}return t.prototype.reset=function(){if(!bt.isSerializableHash(this._inner)||!bt.isSerializableHash(this._outer))throw new Error("hmac: can't reset() because hash doesn't implement restoreState()");return this._inner.restoreState(this._innerKeyedState),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},t.prototype.clean=function(){bt.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),bt.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},t.prototype.update=function(r){return this._inner.update(r),this},t.prototype.finish=function(r){return this._finished?(this._outer.finish(r),this):(this._inner.finish(r),this._outer.update(r.subarray(0,this.digestLength)).finish(r),this._finished=!0,this)},t.prototype.digest=function(){var r=new Uint8Array(this.digestLength);return this.finish(r),r},t.prototype.saveState=function(){if(!bt.isSerializableHash(this._inner))throw new Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},t.prototype.restoreState=function(r){if(!bt.isSerializableHash(this._inner)||!bt.isSerializableHash(this._outer))throw new Error("hmac: can't restoreState() because hash doesn't implement it");return this._inner.restoreState(r),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},t.prototype.cleanSavedState=function(r){if(!bt.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(r)},t}();Ft.HMAC=Me;function vr(t,r,n){var i=new Me(t,r);i.update(n);var h=i.digest();return i.clean(),h}Ft.hmac=vr;Ft.equal=Er.equal;Object.defineProperty(Ne,"__esModule",{value:!0});var ue=Ft,oe=Et,wr=function(){function t(r,n,i,h){i===void 0&&(i=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=r,this._info=h;var f=ue.hmac(this._hash,i,n);this._hmac=new ue.HMAC(r,f),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return t.prototype._fillBuffer=function(){this._counter[0]++;var r=this._counter[0];if(r===0)throw new Error("hkdf: cannot expand more");this._hmac.reset(),r>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},t.prototype.expand=function(r){for(var n=new Uint8Array(r),i=0;i<n.length;i++)this._bufpos===this._buffer.length&&this._fillBuffer(),n[i]=this._buffer[this._bufpos++];return n},t.prototype.clean=function(){this._hmac.clean(),oe.wipe(this._buffer),oe.wipe(this._counter),this._bufpos=0},t}(),gr=Ne.HKDF=wr,jt={},Pt={},It={};Object.defineProperty(It,"__esModule",{value:!0});It.BrowserRandomSource=void 0;const fe=65536;class yr{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const r=typeof self<"u"?self.crypto||self.msCrypto:null;r&&r.getRandomValues!==void 0&&(this._crypto=r,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(r){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const n=new Uint8Array(r);for(let i=0;i<n.length;i+=fe)this._crypto.getRandomValues(n.subarray(i,i+Math.min(n.length-i,fe)));return n}}It.BrowserRandomSource=yr;var Ht={};Object.defineProperty(Ht,"__esModule",{value:!0});Ht.NodeRandomSource=void 0;const pr=Et;class Sr{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,typeof Lt.commonjsRequire<"u"){const r=Lt.requireCryptoBrowserify();r&&r.randomBytes&&(this._crypto=r,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(r){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let n=this._crypto.randomBytes(r);if(n.length!==r)throw new Error("NodeRandomSource: got fewer bytes than requested");const i=new Uint8Array(r);for(let h=0;h<i.length;h++)i[h]=n[h];return(0,pr.wipe)(n),i}}Ht.NodeRandomSource=Sr;Object.defineProperty(Pt,"__esModule",{value:!0});Pt.SystemRandomSource=void 0;const mr=It,Cr=Ht;class Or{constructor(){if(this.isAvailable=!1,this.name="",this._source=new mr.BrowserRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Browser";return}if(this._source=new Cr.NodeRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Node";return}}randomBytes(r){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(r)}}Pt.SystemRandomSource=Or;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.randomStringForEntropy=t.randomString=t.randomUint32=t.randomBytes=t.defaultRandomSource=void 0;const r=Pt,n=M,i=Et;t.defaultRandomSource=new r.SystemRandomSource;function h(s,_=t.defaultRandomSource){return _.randomBytes(s)}t.randomBytes=h;function f(s=t.defaultRandomSource){const _=h(4,s),w=(0,n.readUint32LE)(_);return(0,i.wipe)(_),w}t.randomUint32=f;const E="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function u(s,_=E,w=t.defaultRandomSource){if(_.length<2)throw new Error("randomString charset is too short");if(_.length>256)throw new Error("randomString charset is too long");let d="";const l=_.length,v=256-256%l;for(;s>0;){const S=h(Math.ceil(s*256/v),w);for(let g=0;g<S.length&&s>0;g++){const O=S[g];O<v&&(d+=_.charAt(O%l),s--)}(0,i.wipe)(S)}return d}t.randomString=u;function o(s,_=E,w=t.defaultRandomSource){const d=Math.ceil(s/(Math.log(_.length)/Math.LN2));return u(d,_,w)}t.randomStringForEntropy=o})(jt);const Ur=Lt.getDefaultExportFromCjs(jt);var Le={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});var r=M,n=Et;t.DIGEST_LENGTH=32,t.BLOCK_SIZE=64;var i=function(){function u(){this.digestLength=t.DIGEST_LENGTH,this.blockSize=t.BLOCK_SIZE,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return u.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},u.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},u.prototype.clean=function(){n.wipe(this._buffer),n.wipe(this._temp),this.reset()},u.prototype.update=function(o,s){if(s===void 0&&(s=o.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var _=0;if(this._bytesHashed+=s,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&s>0;)this._buffer[this._bufferLength++]=o[_++],s--;this._bufferLength===this.blockSize&&(f(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(s>=this.blockSize&&(_=f(this._temp,this._state,o,_,s),s%=this.blockSize);s>0;)this._buffer[this._bufferLength++]=o[_++],s--;return this},u.prototype.finish=function(o){if(!this._finished){var s=this._bytesHashed,_=this._bufferLength,w=s/536870912|0,d=s<<3,l=s%64<56?64:128;this._buffer[_]=128;for(var v=_+1;v<l-8;v++)this._buffer[v]=0;r.writeUint32BE(w,this._buffer,l-8),r.writeUint32BE(d,this._buffer,l-4),f(this._temp,this._state,this._buffer,0,l),this._finished=!0}for(var v=0;v<this.digestLength/4;v++)r.writeUint32BE(this._state[v],o,v*4);return this},u.prototype.digest=function(){var o=new Uint8Array(this.digestLength);return this.finish(o),o},u.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},u.prototype.restoreState=function(o){return this._state.set(o.state),this._bufferLength=o.bufferLength,o.buffer&&this._buffer.set(o.buffer),this._bytesHashed=o.bytesHashed,this._finished=!1,this},u.prototype.cleanSavedState=function(o){n.wipe(o.state),o.buffer&&n.wipe(o.buffer),o.bufferLength=0,o.bytesHashed=0},u}();t.SHA256=i;var h=new Int32Array([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 f(u,o,s,_,w){for(;w>=64;){for(var d=o[0],l=o[1],v=o[2],S=o[3],g=o[4],O=o[5],j=o[6],U=o[7],c=0;c<16;c++){var b=_+c*4;u[c]=r.readUint32BE(s,b)}for(var c=16;c<64;c++){var D=u[c-2],e=(D>>>17|D<<15)^(D>>>19|D<<13)^D>>>10;D=u[c-15];var a=(D>>>7|D<<25)^(D>>>18|D<<14)^D>>>3;u[c]=(e+u[c-7]|0)+(a+u[c-16]|0)}for(var c=0;c<64;c++){var e=(((g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&O^~g&j)|0)+(U+(h[c]+u[c]|0)|0)|0,a=((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+(d&l^d&v^l&v)|0;U=j,j=O,O=g,g=S+e|0,S=v,v=l,l=d,d=e+a|0}o[0]+=d,o[1]+=l,o[2]+=v,o[3]+=S,o[4]+=g,o[5]+=O,o[6]+=j,o[7]+=U,_+=64,w-=64}return _}function E(u){var o=new i;o.update(u);var s=o.digest();return o.clean(),s}t.hash=E})(Le);var xe={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.sharedKey=t.generateKeyPair=t.generateKeyPairFromSeed=t.scalarMultBase=t.scalarMult=t.SHARED_KEY_LENGTH=t.SECRET_KEY_LENGTH=t.PUBLIC_KEY_LENGTH=void 0;const r=jt,n=Et;t.PUBLIC_KEY_LENGTH=32,t.SECRET_KEY_LENGTH=32,t.SHARED_KEY_LENGTH=32;function i(c){const b=new Float64Array(16);if(c)for(let D=0;D<c.length;D++)b[D]=c[D];return b}const h=new Uint8Array(32);h[0]=9;const f=i([56129,1]);function E(c){let b=1;for(let D=0;D<16;D++){let e=c[D]+b+65535;b=Math.floor(e/65536),c[D]=e-b*65536}c[0]+=b-1+37*(b-1)}function u(c,b,D){const e=~(D-1);for(let a=0;a<16;a++){const y=e&(c[a]^b[a]);c[a]^=y,b[a]^=y}}function o(c,b){const D=i(),e=i();for(let a=0;a<16;a++)e[a]=b[a];E(e),E(e),E(e);for(let a=0;a<2;a++){D[0]=e[0]-65517;for(let m=1;m<15;m++)D[m]=e[m]-65535-(D[m-1]>>16&1),D[m-1]&=65535;D[15]=e[15]-32767-(D[14]>>16&1);const y=D[15]>>16&1;D[14]&=65535,u(e,D,1-y)}for(let a=0;a<16;a++)c[2*a]=e[a]&255,c[2*a+1]=e[a]>>8}function s(c,b){for(let D=0;D<16;D++)c[D]=b[2*D]+(b[2*D+1]<<8);c[15]&=32767}function _(c,b,D){for(let e=0;e<16;e++)c[e]=b[e]+D[e]}function w(c,b,D){for(let e=0;e<16;e++)c[e]=b[e]-D[e]}function d(c,b,D){let e,a,y=0,m=0,A=0,L=0,B=0,x=0,F=0,N=0,p=0,T=0,$=0,Z=0,J=0,X=0,C=0,R=0,P=0,I=0,H=0,K=0,z=0,Y=0,W=0,G=0,V=0,wt=0,St=0,Ot=0,Mt=0,Yt=0,ae=0,k=D[0],tt=D[1],et=D[2],rt=D[3],nt=D[4],it=D[5],at=D[6],ut=D[7],ot=D[8],ft=D[9],ht=D[10],st=D[11],ct=D[12],lt=D[13],Dt=D[14],_t=D[15];e=b[0],y+=e*k,m+=e*tt,A+=e*et,L+=e*rt,B+=e*nt,x+=e*it,F+=e*at,N+=e*ut,p+=e*ot,T+=e*ft,$+=e*ht,Z+=e*st,J+=e*ct,X+=e*lt,C+=e*Dt,R+=e*_t,e=b[1],m+=e*k,A+=e*tt,L+=e*et,B+=e*rt,x+=e*nt,F+=e*it,N+=e*at,p+=e*ut,T+=e*ot,$+=e*ft,Z+=e*ht,J+=e*st,X+=e*ct,C+=e*lt,R+=e*Dt,P+=e*_t,e=b[2],A+=e*k,L+=e*tt,B+=e*et,x+=e*rt,F+=e*nt,N+=e*it,p+=e*at,T+=e*ut,$+=e*ot,Z+=e*ft,J+=e*ht,X+=e*st,C+=e*ct,R+=e*lt,P+=e*Dt,I+=e*_t,e=b[3],L+=e*k,B+=e*tt,x+=e*et,F+=e*rt,N+=e*nt,p+=e*it,T+=e*at,$+=e*ut,Z+=e*ot,J+=e*ft,X+=e*ht,C+=e*st,R+=e*ct,P+=e*lt,I+=e*Dt,H+=e*_t,e=b[4],B+=e*k,x+=e*tt,F+=e*et,N+=e*rt,p+=e*nt,T+=e*it,$+=e*at,Z+=e*ut,J+=e*ot,X+=e*ft,C+=e*ht,R+=e*st,P+=e*ct,I+=e*lt,H+=e*Dt,K+=e*_t,e=b[5],x+=e*k,F+=e*tt,N+=e*et,p+=e*rt,T+=e*nt,$+=e*it,Z+=e*at,J+=e*ut,X+=e*ot,C+=e*ft,R+=e*ht,P+=e*st,I+=e*ct,H+=e*lt,K+=e*Dt,z+=e*_t,e=b[6],F+=e*k,N+=e*tt,p+=e*et,T+=e*rt,$+=e*nt,Z+=e*it,J+=e*at,X+=e*ut,C+=e*ot,R+=e*ft,P+=e*ht,I+=e*st,H+=e*ct,K+=e*lt,z+=e*Dt,Y+=e*_t,e=b[7],N+=e*k,p+=e*tt,T+=e*et,$+=e*rt,Z+=e*nt,J+=e*it,X+=e*at,C+=e*ut,R+=e*ot,P+=e*ft,I+=e*ht,H+=e*st,K+=e*ct,z+=e*lt,Y+=e*Dt,W+=e*_t,e=b[8],p+=e*k,T+=e*tt,$+=e*et,Z+=e*rt,J+=e*nt,X+=e*it,C+=e*at,R+=e*ut,P+=e*ot,I+=e*ft,H+=e*ht,K+=e*st,z+=e*ct,Y+=e*lt,W+=e*Dt,G+=e*_t,e=b[9],T+=e*k,$+=e*tt,Z+=e*et,J+=e*rt,X+=e*nt,C+=e*it,R+=e*at,P+=e*ut,I+=e*ot,H+=e*ft,K+=e*ht,z+=e*st,Y+=e*ct,W+=e*lt,G+=e*Dt,V+=e*_t,e=b[10],$+=e*k,Z+=e*tt,J+=e*et,X+=e*rt,C+=e*nt,R+=e*it,P+=e*at,I+=e*ut,H+=e*ot,K+=e*ft,z+=e*ht,Y+=e*st,W+=e*ct,G+=e*lt,V+=e*Dt,wt+=e*_t,e=b[11],Z+=e*k,J+=e*tt,X+=e*et,C+=e*rt,R+=e*nt,P+=e*it,I+=e*at,H+=e*ut,K+=e*ot,z+=e*ft,Y+=e*ht,W+=e*st,G+=e*ct,V+=e*lt,wt+=e*Dt,St+=e*_t,e=b[12],J+=e*k,X+=e*tt,C+=e*et,R+=e*rt,P+=e*nt,I+=e*it,H+=e*at,K+=e*ut,z+=e*ot,Y+=e*ft,W+=e*ht,G+=e*st,V+=e*ct,wt+=e*lt,St+=e*Dt,Ot+=e*_t,e=b[13],X+=e*k,C+=e*tt,R+=e*et,P+=e*rt,I+=e*nt,H+=e*it,K+=e*at,z+=e*ut,Y+=e*ot,W+=e*ft,G+=e*ht,V+=e*st,wt+=e*ct,St+=e*lt,Ot+=e*Dt,Mt+=e*_t,e=b[14],C+=e*k,R+=e*tt,P+=e*et,I+=e*rt,H+=e*nt,K+=e*it,z+=e*at,Y+=e*ut,W+=e*ot,G+=e*ft,V+=e*ht,wt+=e*st,St+=e*ct,Ot+=e*lt,Mt+=e*Dt,Yt+=e*_t,e=b[15],R+=e*k,P+=e*tt,I+=e*et,H+=e*rt,K+=e*nt,z+=e*it,Y+=e*at,W+=e*ut,G+=e*ot,V+=e*ft,wt+=e*ht,St+=e*st,Ot+=e*ct,Mt+=e*lt,Yt+=e*Dt,ae+=e*_t,y+=38*P,m+=38*I,A+=38*H,L+=38*K,B+=38*z,x+=38*Y,F+=38*W,N+=38*G,p+=38*V,T+=38*wt,$+=38*St,Z+=38*Ot,J+=38*Mt,X+=38*Yt,C+=38*ae,a=1,e=y+a+65535,a=Math.floor(e/65536),y=e-a*65536,e=m+a+65535,a=Math.floor(e/65536),m=e-a*65536,e=A+a+65535,a=Math.floor(e/65536),A=e-a*65536,e=L+a+65535,a=Math.floor(e/65536),L=e-a*65536,e=B+a+65535,a=Math.floor(e/65536),B=e-a*65536,e=x+a+65535,a=Math.floor(e/65536),x=e-a*65536,e=F+a+65535,a=Math.floor(e/65536),F=e-a*65536,e=N+a+65535,a=Math.floor(e/65536),N=e-a*65536,e=p+a+65535,a=Math.floor(e/65536),p=e-a*65536,e=T+a+65535,a=Math.floor(e/65536),T=e-a*65536,e=$+a+65535,a=Math.floor(e/65536),$=e-a*65536,e=Z+a+65535,a=Math.floor(e/65536),Z=e-a*65536,e=J+a+65535,a=Math.floor(e/65536),J=e-a*65536,e=X+a+65535,a=Math.floor(e/65536),X=e-a*65536,e=C+a+65535,a=Math.floor(e/65536),C=e-a*65536,e=R+a+65535,a=Math.floor(e/65536),R=e-a*65536,y+=a-1+37*(a-1),a=1,e=y+a+65535,a=Math.floor(e/65536),y=e-a*65536,e=m+a+65535,a=Math.floor(e/65536),m=e-a*65536,e=A+a+65535,a=Math.floor(e/65536),A=e-a*65536,e=L+a+65535,a=Math.floor(e/65536),L=e-a*65536,e=B+a+65535,a=Math.floor(e/65536),B=e-a*65536,e=x+a+65535,a=Math.floor(e/65536),x=e-a*65536,e=F+a+65535,a=Math.floor(e/65536),F=e-a*65536,e=N+a+65535,a=Math.floor(e/65536),N=e-a*65536,e=p+a+65535,a=Math.floor(e/65536),p=e-a*65536,e=T+a+65535,a=Math.floor(e/65536),T=e-a*65536,e=$+a+65535,a=Math.floor(e/65536),$=e-a*65536,e=Z+a+65535,a=Math.floor(e/65536),Z=e-a*65536,e=J+a+65535,a=Math.floor(e/65536),J=e-a*65536,e=X+a+65535,a=Math.floor(e/65536),X=e-a*65536,e=C+a+65535,a=Math.floor(e/65536),C=e-a*65536,e=R+a+65535,a=Math.floor(e/65536),R=e-a*65536,y+=a-1+37*(a-1),c[0]=y,c[1]=m,c[2]=A,c[3]=L,c[4]=B,c[5]=x,c[6]=F,c[7]=N,c[8]=p,c[9]=T,c[10]=$,c[11]=Z,c[12]=J,c[13]=X,c[14]=C,c[15]=R}function l(c,b){d(c,b,b)}function v(c,b){const D=i();for(let e=0;e<16;e++)D[e]=b[e];for(let e=253;e>=0;e--)l(D,D),e!==2&&e!==4&&d(D,D,b);for(let e=0;e<16;e++)c[e]=D[e]}function S(c,b){const D=new Uint8Array(32),e=new Float64Array(80),a=i(),y=i(),m=i(),A=i(),L=i(),B=i();for(let p=0;p<31;p++)D[p]=c[p];D[31]=c[31]&127|64,D[0]&=248,s(e,b);for(let p=0;p<16;p++)y[p]=e[p];a[0]=A[0]=1;for(let p=254;p>=0;--p){const T=D[p>>>3]>>>(p&7)&1;u(a,y,T),u(m,A,T),_(L,a,m),w(a,a,m),_(m,y,A),w(y,y,A),l(A,L),l(B,a),d(a,m,a),d(m,y,L),_(L,a,m),w(a,a,m),l(y,a),w(m,A,B),d(a,m,f),_(a,a,A),d(m,m,a),d(a,A,B),d(A,y,e),l(y,L),u(a,y,T),u(m,A,T)}for(let p=0;p<16;p++)e[p+16]=a[p],e[p+32]=m[p],e[p+48]=y[p],e[p+64]=A[p];const x=e.subarray(32),F=e.subarray(16);v(x,x),d(F,F,x);const N=new Uint8Array(32);return o(N,F),N}t.scalarMult=S;function g(c){return S(c,h)}t.scalarMultBase=g;function O(c){if(c.length!==t.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${t.SECRET_KEY_LENGTH} bytes`);const b=new Uint8Array(c);return{publicKey:g(b),secretKey:b}}t.generateKeyPairFromSeed=O;function j(c){const b=(0,r.randomBytes)(32,c),D=O(b);return(0,n.wipe)(b),D}t.generateKeyPair=j;function U(c,b,D=!1){if(c.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(b.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const e=S(c,b);if(D){let a=0;for(let y=0;y<e.length;y++)a|=e[y];if(a===0)throw new Error("X25519: invalid shared key")}return e}t.sharedKey=U})(xe);function Ar(t,r){if(t.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),i=0;i<n.length;i++)n[i]=255;for(var h=0;h<t.length;h++){var f=t.charAt(h),E=f.charCodeAt(0);if(n[E]!==255)throw new TypeError(f+" is ambiguous");n[E]=h}var u=t.length,o=t.charAt(0),s=Math.log(u)/Math.log(256),_=Math.log(256)/Math.log(u);function w(v){if(v instanceof Uint8Array||(ArrayBuffer.isView(v)?v=new Uint8Array(v.buffer,v.byteOffset,v.byteLength):Array.isArray(v)&&(v=Uint8Array.from(v))),!(v instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(v.length===0)return"";for(var S=0,g=0,O=0,j=v.length;O!==j&&v[O]===0;)O++,S++;for(var U=(j-O)*_+1>>>0,c=new Uint8Array(U);O!==j;){for(var b=v[O],D=0,e=U-1;(b!==0||D<g)&&e!==-1;e--,D++)b+=256*c[e]>>>0,c[e]=b%u>>>0,b=b/u>>>0;if(b!==0)throw new Error("Non-zero carry");g=D,O++}for(var a=U-g;a!==U&&c[a]===0;)a++;for(var y=o.repeat(S);a<U;++a)y+=t.charAt(c[a]);return y}function d(v){if(typeof v!="string")throw new TypeError("Expected String");if(v.length===0)return new Uint8Array;var S=0;if(v[S]!==" "){for(var g=0,O=0;v[S]===o;)g++,S++;for(var j=(v.length-S)*s+1>>>0,U=new Uint8Array(j);v[S];){var c=n[v.charCodeAt(S)];if(c===255)return;for(var b=0,D=j-1;(c!==0||b<O)&&D!==-1;D--,b++)c+=u*U[D]>>>0,U[D]=c%256>>>0,c=c/256>>>0;if(c!==0)throw new Error("Non-zero carry");O=b,S++}if(v[S]!==" "){for(var e=j-O;e!==j&&U[e]===0;)e++;for(var a=new Uint8Array(g+(j-e)),y=g;e!==j;)a[y++]=U[e++];return a}}}function l(v){var S=d(v);if(S)return S;throw new Error(`Non-${r} character`)}return{encode:w,decodeUnsafe:d,decode:l}}var Tr=Ar,Fr=Tr;const Nr=t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},Mr=t=>new TextEncoder().encode(t),Lr=t=>new TextDecoder().decode(t);class xr{constructor(r,n,i){this.name=r,this.prefix=n,this.baseEncode=i}encode(r){if(r instanceof Uint8Array)return`${this.prefix}${this.baseEncode(r)}`;throw Error("Unknown type, must be binary type")}}class Br{constructor(r,n,i){if(this.name=r,this.prefix=n,n.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=n.codePointAt(0),this.baseDecode=i}decode(r){if(typeof r=="string"){if(r.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(r)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(r.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(r){return Be(this,r)}}class Rr{constructor(r){this.decoders=r}or(r){return Be(this,r)}decode(r){const n=r[0],i=this.decoders[n];if(i)return i.decode(r);throw RangeError(`Unable to decode multibase string ${JSON.stringify(r)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const Be=(t,r)=>new Rr({...t.decoders||{[t.prefix]:t},...r.decoders||{[r.prefix]:r}});class jr{constructor(r,n,i,h){this.name=r,this.prefix=n,this.baseEncode=i,this.baseDecode=h,this.encoder=new xr(r,n,i),this.decoder=new Br(r,n,h)}encode(r){return this.encoder.encode(r)}decode(r){return this.decoder.decode(r)}}const Kt=({name:t,prefix:r,encode:n,decode:i})=>new jr(t,r,n,i),Nt=({prefix:t,name:r,alphabet:n})=>{const{encode:i,decode:h}=Fr(n,r);return Kt({prefix:t,name:r,encode:i,decode:f=>Nr(h(f))})},Pr=(t,r,n,i)=>{const h={};for(let _=0;_<r.length;++_)h[r[_]]=_;let f=t.length;for(;t[f-1]==="=";)--f;const E=new Uint8Array(f*n/8|0);let u=0,o=0,s=0;for(let _=0;_<f;++_){const w=h[t[_]];if(w===void 0)throw new SyntaxError(`Non-${i} character`);o=o<<n|w,u+=n,u>=8&&(u-=8,E[s++]=255&o>>u)}if(u>=n||255&o<<8-u)throw new SyntaxError("Unexpected end of data");return E},Ir=(t,r,n)=>{const i=r[r.length-1]==="=",h=(1<<n)-1;let f="",E=0,u=0;for(let o=0;o<t.length;++o)for(u=u<<8|t[o],E+=8;E>n;)E-=n,f+=r[h&u>>E];if(E&&(f+=r[h&u<<n-E]),i)for(;f.length*n&7;)f+="=";return f},Q=({name:t,prefix:r,bitsPerChar:n,alphabet:i})=>Kt({prefix:r,name:t,encode(h){return Ir(h,i,n)},decode(h){return Pr(h,i,n,t)}}),Hr=Kt({prefix:"\0",name:"identity",encode:t=>Lr(t),decode:t=>Mr(t)}),Kr=Object.freeze(Object.defineProperty({__proto__:null,identity:Hr},Symbol.toStringTag,{value:"Module"})),zr=Q({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),Yr=Object.freeze(Object.defineProperty({__proto__:null,base2:zr},Symbol.toStringTag,{value:"Module"})),Wr=Q({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),qr=Object.freeze(Object.defineProperty({__proto__:null,base8:Wr},Symbol.toStringTag,{value:"Module"})),Gr=Nt({prefix:"9",name:"base10",alphabet:"0123456789"}),$r=Object.freeze(Object.defineProperty({__proto__:null,base10:Gr},Symbol.toStringTag,{value:"Module"})),Vr=Q({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Xr=Q({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),Jr=Object.freeze(Object.defineProperty({__proto__:null,base16:Vr,base16upper:Xr},Symbol.toStringTag,{value:"Module"})),Zr=Q({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Qr=Q({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),kr=Q({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),tn=Q({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),en=Q({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),rn=Q({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),nn=Q({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),an=Q({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),un=Q({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),on=Object.freeze(Object.defineProperty({__proto__:null,base32:Zr,base32hex:en,base32hexpad:nn,base32hexpadupper:an,base32hexupper:rn,base32pad:kr,base32padupper:tn,base32upper:Qr,base32z:un},Symbol.toStringTag,{value:"Module"})),fn=Nt({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),hn=Nt({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),sn=Object.freeze(Object.defineProperty({__proto__:null,base36:fn,base36upper:hn},Symbol.toStringTag,{value:"Module"})),cn=Nt({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),ln=Nt({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),Dn=Object.freeze(Object.defineProperty({__proto__:null,base58btc:cn,base58flickr:ln},Symbol.toStringTag,{value:"Module"})),_n=Q({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),dn=Q({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),En=Q({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),bn=Q({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),vn=Object.freeze(Object.defineProperty({__proto__:null,base64:_n,base64pad:dn,base64url:En,base64urlpad:bn},Symbol.toStringTag,{value:"Module"})),Re=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),wn=Re.reduce((t,r,n)=>(t[n]=r,t),[]),gn=Re.reduce((t,r,n)=>(t[r.codePointAt(0)]=n,t),[]);function yn(t){return t.reduce((r,n)=>(r+=wn[n],r),"")}function pn(t){const r=[];for(const n of t){const i=gn[n.codePointAt(0)];if(i===void 0)throw new Error(`Non-base256emoji character: ${n}`);r.push(i)}return new Uint8Array(r)}const Sn=Kt({prefix:"🚀",name:"base256emoji",encode:yn,decode:pn}),mn=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:Sn},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;var je={};/*! *****************************************************************************
|
|
2
2
|
Copyright (c) Microsoft Corporation.
|
|
3
3
|
|
|
4
4
|
Permission to use, copy, modify, and/or distribute this software for any
|