UNPKG

@substrate-system/mergeparty

Version:
1 lines 128 kB
var Fo=Object.create;var qt=Object.defineProperty;var Po=Object.getOwnPropertyDescriptor;var To=Object.getOwnPropertyNames;var jo=Object.getPrototypeOf,Bo=Object.prototype.hasOwnProperty;var i=(t,e)=>qt(t,"name",{value:e,configurable:!0});var de=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Pr=(t,e)=>{for(var r in e)qt(t,r,{get:e[r],enumerable:!0})},Lo=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of To(e))!Bo.call(t,s)&&s!==r&&qt(t,s,{get:()=>e[s],enumerable:!(n=Po(e,s))||n.enumerable});return t};var xe=(t,e,r)=>(r=t!=null?Fo(jo(t)):{},Lo(e||!t||!t.__esModule?qt(r,"default",{value:t,enumerable:!0}):r,t));var qr=de((uu,rs)=>{"use strict";var yt=1e3,wt=yt*60,_t=wt*60,it=_t*24,pa=it*7,ba=it*365.25;rs.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return ma(t);if(r==="number"&&isFinite(t))return e.long?wa(t):ya(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function ma(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*ba;case"weeks":case"week":case"w":return r*pa;case"days":case"day":case"d":return r*it;case"hours":case"hour":case"hrs":case"hr":case"h":return r*_t;case"minutes":case"minute":case"mins":case"min":case"m":return r*wt;case"seconds":case"second":case"secs":case"sec":case"s":return r*yt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}i(ma,"parse");function ya(t){var e=Math.abs(t);return e>=it?Math.round(t/it)+"d":e>=_t?Math.round(t/_t)+"h":e>=wt?Math.round(t/wt)+"m":e>=yt?Math.round(t/yt)+"s":t+"ms"}i(ya,"fmtShort");function wa(t){var e=Math.abs(t);return e>=it?fr(t,e,it,"day"):e>=_t?fr(t,e,_t,"hour"):e>=wt?fr(t,e,wt,"minute"):e>=yt?fr(t,e,yt,"second"):t+" ms"}i(wa,"fmtLong");function fr(t,e,r,n){var s=e>=r*1.5;return Math.round(t/r)+" "+n+(s?"s":"")}i(fr,"plural")});var ss=de((hu,ns)=>{"use strict";function _a(t){r.debug=r,r.default=r,r.coerce=u,r.disable=a,r.enable=s,r.enabled=c,r.humanize=qr(),r.destroy=m,Object.keys(t).forEach(w=>{r[w]=t[w]}),r.names=[],r.skips=[],r.formatters={};function e(w){let l=0;for(let g=0;g<w.length;g++)l=(l<<5)-l+w.charCodeAt(g),l|=0;return r.colors[Math.abs(l)%r.colors.length]}i(e,"selectColor"),r.selectColor=e;function r(w){let l,g=null,p,_;function I(...v){if(!I.enabled)return;let O=I,H=Number(new Date),U=H-(l||H);O.diff=U,O.prev=l,O.curr=H,l=H,v[0]=r.coerce(v[0]),typeof v[0]!="string"&&v.unshift("%O");let E=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,(K,j)=>{if(K==="%%")return"%";E++;let N=r.formatters[j];if(typeof N=="function"){let $=v[E];K=N.call(O,$),v.splice(E,1),E--}return K}),r.formatArgs.call(O,v),(O.log||r.log).apply(O,v)}return i(I,"debug"),I.namespace=w,I.useColors=r.useColors(),I.color=r.selectColor(w),I.extend=n,I.destroy=r.destroy,Object.defineProperty(I,"enabled",{enumerable:!0,configurable:!1,get:i(()=>g!==null?g:(p!==r.namespaces&&(p=r.namespaces,_=r.enabled(w)),_),"get"),set:i(v=>{g=v},"set")}),typeof r.init=="function"&&r.init(I),I}i(r,"createDebug");function n(w,l){let g=r(this.namespace+(typeof l>"u"?":":l)+w);return g.log=this.log,g}i(n,"extend");function s(w){r.save(w),r.namespaces=w,r.names=[],r.skips=[];let l=(typeof w=="string"?w:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let g of l)g[0]==="-"?r.skips.push(g.slice(1)):r.names.push(g)}i(s,"enable");function o(w,l){let g=0,p=0,_=-1,I=0;for(;g<w.length;)if(p<l.length&&(l[p]===w[g]||l[p]==="*"))l[p]==="*"?(_=p,I=g,p++):(g++,p++);else if(_!==-1)p=_+1,I++,g=I;else return!1;for(;p<l.length&&l[p]==="*";)p++;return p===l.length}i(o,"matchesTemplate");function a(){let w=[...r.names,...r.skips.map(l=>"-"+l)].join(",");return r.enable(""),w}i(a,"disable");function c(w){for(let l of r.skips)if(o(w,l))return!1;for(let l of r.names)if(o(w,l))return!0;return!1}i(c,"enabled");function u(w){return w instanceof Error?w.stack||w.message:w}i(u,"coerce");function m(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return i(m,"destroy"),r.enable(r.load()),r}i(_a,"setup");ns.exports=_a});var Pe=de((we,ur)=>{"use strict";we.formatArgs=Sa;we.save=Aa;we.load=Ca;we.useColors=xa;we.storage=Ea();we.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();we.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function xa(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}i(xa,"useColors");function Sa(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+ur.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,s=>{s!=="%%"&&(r++,s==="%c"&&(n=r))}),t.splice(n,0,e)}i(Sa,"formatArgs");we.log=console.debug||console.log||(()=>{});function Aa(t){try{t?we.storage.setItem("debug",t):we.storage.removeItem("debug")}catch{}}i(Aa,"save");function Ca(){let t;try{t=we.storage.getItem("debug")||we.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}i(Ca,"load");function Ea(){try{return localStorage}catch{}}i(Ea,"localstorage");ur.exports=ss()(we);var{formatters:va}=ur.exports;va.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var is=de((pu,Jr)=>{"use strict";var Ia=Object.prototype.hasOwnProperty,ge="~";function Lt(){}i(Lt,"Events");Object.create&&(Lt.prototype=Object.create(null),new Lt().__proto__||(ge=!1));function ka(t,e,r){this.fn=t,this.context=e,this.once=r||!1}i(ka,"EE");function os(t,e,r,n,s){if(typeof r!="function")throw new TypeError("The listener must be a function");var o=new ka(r,n||t,s),a=ge?ge+e:e;return t._events[a]?t._events[a].fn?t._events[a]=[t._events[a],o]:t._events[a].push(o):(t._events[a]=o,t._eventsCount++),t}i(os,"addListener");function lr(t,e){--t._eventsCount===0?t._events=new Lt:delete t._events[e]}i(lr,"clearEvent");function fe(){this._events=new Lt,this._eventsCount=0}i(fe,"EventEmitter");fe.prototype.eventNames=i(function(){var e=[],r,n;if(this._eventsCount===0)return e;for(n in r=this._events)Ia.call(r,n)&&e.push(ge?n.slice(1):n);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(r)):e},"eventNames");fe.prototype.listeners=i(function(e){var r=ge?ge+e:e,n=this._events[r];if(!n)return[];if(n.fn)return[n.fn];for(var s=0,o=n.length,a=new Array(o);s<o;s++)a[s]=n[s].fn;return a},"listeners");fe.prototype.listenerCount=i(function(e){var r=ge?ge+e:e,n=this._events[r];return n?n.fn?1:n.length:0},"listenerCount");fe.prototype.emit=i(function(e,r,n,s,o,a){var c=ge?ge+e:e;if(!this._events[c])return!1;var u=this._events[c],m=arguments.length,w,l;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),m){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,r),!0;case 3:return u.fn.call(u.context,r,n),!0;case 4:return u.fn.call(u.context,r,n,s),!0;case 5:return u.fn.call(u.context,r,n,s,o),!0;case 6:return u.fn.call(u.context,r,n,s,o,a),!0}for(l=1,w=new Array(m-1);l<m;l++)w[l-1]=arguments[l];u.fn.apply(u.context,w)}else{var g=u.length,p;for(l=0;l<g;l++)switch(u[l].once&&this.removeListener(e,u[l].fn,void 0,!0),m){case 1:u[l].fn.call(u[l].context);break;case 2:u[l].fn.call(u[l].context,r);break;case 3:u[l].fn.call(u[l].context,r,n);break;case 4:u[l].fn.call(u[l].context,r,n,s);break;default:if(!w)for(p=1,w=new Array(m-1);p<m;p++)w[p-1]=arguments[p];u[l].fn.apply(u[l].context,w)}}return!0},"emit");fe.prototype.on=i(function(e,r,n){return os(this,e,r,n,!1)},"on");fe.prototype.once=i(function(e,r,n){return os(this,e,r,n,!0)},"once");fe.prototype.removeListener=i(function(e,r,n,s){var o=ge?ge+e:e;if(!this._events[o])return this;if(!r)return lr(this,o),this;var a=this._events[o];if(a.fn)a.fn===r&&(!s||a.once)&&(!n||a.context===n)&&lr(this,o);else{for(var c=0,u=[],m=a.length;c<m;c++)(a[c].fn!==r||s&&!a[c].once||n&&a[c].context!==n)&&u.push(a[c]);u.length?this._events[o]=u.length===1?u[0]:u:lr(this,o)}return this},"removeListener");fe.prototype.removeAllListeners=i(function(e){var r;return e?(r=ge?ge+e:e,this._events[r]&&lr(this,r)):(this._events=new Lt,this._eventsCount=0),this},"removeAllListeners");fe.prototype.off=fe.prototype.removeListener;fe.prototype.addListener=fe.prototype.on;fe.prefixed=ge;fe.EventEmitter=fe;typeof Jr<"u"&&(Jr.exports=fe)});var as=de(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.crypto=void 0;hr.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0});var en=de(P=>{"use strict";Object.defineProperty(P,"__esModule",{value:!0});P.wrapXOFConstructorWithOpts=P.wrapConstructorWithOpts=P.wrapConstructor=P.Hash=P.nextTick=P.swap32IfBE=P.byteSwapIfBE=P.swap8IfBE=P.isLE=void 0;P.isBytes=fs;P.anumber=Yr;P.abytes=St;P.ahash=Ra;P.aexists=Oa;P.aoutput=Ha;P.u8=Ua;P.u32=Da;P.clean=Ma;P.createView=Fa;P.rotr=Pa;P.rotl=Ta;P.byteSwap=Zr;P.byteSwap32=us;P.bytesToHex=Ba;P.hexToBytes=La;P.asyncLoop=Va;P.utf8ToBytes=Qr;P.bytesToUtf8=Na;P.toBytes=dr;P.kdfInputToBytes=$a;P.concatBytes=Wa;P.checkOpts=Ga;P.createHasher=hs;P.createOptHasher=ds;P.createXOFer=gs;P.randomBytes=Ka;var xt=as();function fs(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}i(fs,"isBytes");function Yr(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}i(Yr,"anumber");function St(t,...e){if(!fs(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}i(St,"abytes");function Ra(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");Yr(t.outputLen),Yr(t.blockLen)}i(Ra,"ahash");function Oa(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}i(Oa,"aexists");function Ha(t,e){St(t);let r=e.outputLen;if(t.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}i(Ha,"aoutput");function Ua(t){return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}i(Ua,"u8");function Da(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}i(Da,"u32");function Ma(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}i(Ma,"clean");function Fa(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}i(Fa,"createView");function Pa(t,e){return t<<32-e|t>>>e}i(Pa,"rotr");function Ta(t,e){return t<<e|t>>>32-e>>>0}i(Ta,"rotl");P.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Zr(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}i(Zr,"byteSwap");P.swap8IfBE=P.isLE?t=>t:t=>Zr(t);P.byteSwapIfBE=P.swap8IfBE;function us(t){for(let e=0;e<t.length;e++)t[e]=Zr(t[e]);return t}i(us,"byteSwap32");P.swap32IfBE=P.isLE?t=>t:us;var ls=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",ja=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function Ba(t){if(St(t),ls)return t.toHex();let e="";for(let r=0;r<t.length;r++)e+=ja[t[r]];return e}i(Ba,"bytesToHex");var We={_0:48,_9:57,A:65,F:70,a:97,f:102};function cs(t){if(t>=We._0&&t<=We._9)return t-We._0;if(t>=We.A&&t<=We.F)return t-(We.A-10);if(t>=We.a&&t<=We.f)return t-(We.a-10)}i(cs,"asciiToBase16");function La(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);if(ls)return Uint8Array.fromHex(t);let e=t.length,r=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);let n=new Uint8Array(r);for(let s=0,o=0;s<r;s++,o+=2){let a=cs(t.charCodeAt(o)),c=cs(t.charCodeAt(o+1));if(a===void 0||c===void 0){let u=t[o]+t[o+1];throw new Error('hex string expected, got non-hex character "'+u+'" at index '+o)}n[s]=a*16+c}return n}i(La,"hexToBytes");var za=i(async()=>{},"nextTick");P.nextTick=za;async function Va(t,e,r){let n=Date.now();for(let s=0;s<t;s++){r(s);let o=Date.now()-n;o>=0&&o<e||(await(0,P.nextTick)(),n+=o)}}i(Va,"asyncLoop");function Qr(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}i(Qr,"utf8ToBytes");function Na(t){return new TextDecoder().decode(t)}i(Na,"bytesToUtf8");function dr(t){return typeof t=="string"&&(t=Qr(t)),St(t),t}i(dr,"toBytes");function $a(t){return typeof t=="string"&&(t=Qr(t)),St(t),t}i($a,"kdfInputToBytes");function Wa(...t){let e=0;for(let n=0;n<t.length;n++){let s=t[n];St(s),e+=s.length}let r=new Uint8Array(e);for(let n=0,s=0;n<t.length;n++){let o=t[n];r.set(o,s),s+=o.length}return r}i(Wa,"concatBytes");function Ga(t,e){if(e!==void 0&&{}.toString.call(e)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(t,e)}i(Ga,"checkOpts");var Xr=class{static{i(this,"Hash")}};P.Hash=Xr;function hs(t){let e=i(n=>t().update(dr(n)).digest(),"hashC"),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}i(hs,"createHasher");function ds(t){let e=i((n,s)=>t(s).update(dr(n)).digest(),"hashC"),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=n=>t(n),e}i(ds,"createOptHasher");function gs(t){let e=i((n,s)=>t(s).update(dr(n)).digest(),"hashC"),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=n=>t(n),e}i(gs,"createXOFer");P.wrapConstructor=hs;P.wrapConstructorWithOpts=ds;P.wrapXOFConstructorWithOpts=gs;function Ka(t=32){if(xt.crypto&&typeof xt.crypto.getRandomValues=="function")return xt.crypto.getRandomValues(new Uint8Array(t));if(xt.crypto&&typeof xt.crypto.randomBytes=="function")return Uint8Array.from(xt.crypto.randomBytes(t));throw new Error("crypto.getRandomValues must be defined")}i(Ka,"randomBytes")});var bs=de(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.SHA512_IV=pe.SHA384_IV=pe.SHA224_IV=pe.SHA256_IV=pe.HashMD=void 0;pe.setBigUint64=ps;pe.Chi=qa;pe.Maj=Ja;var Te=en();function ps(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);let s=BigInt(32),o=BigInt(4294967295),a=Number(r>>s&o),c=Number(r&o),u=n?4:0,m=n?0:4;t.setUint32(e+u,a,n),t.setUint32(e+m,c,n)}i(ps,"setBigUint64");function qa(t,e,r){return t&e^~t&r}i(qa,"Chi");function Ja(t,e,r){return t&e^t&r^e&r}i(Ja,"Maj");var tn=class extends Te.Hash{static{i(this,"HashMD")}constructor(e,r,n,s){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=s,this.buffer=new Uint8Array(e),this.view=(0,Te.createView)(this.buffer)}update(e){(0,Te.aexists)(this),e=(0,Te.toBytes)(e),(0,Te.abytes)(e);let{view:r,buffer:n,blockLen:s}=this,o=e.length;for(let a=0;a<o;){let c=Math.min(s-this.pos,o-a);if(c===s){let u=(0,Te.createView)(e);for(;s<=o-a;a+=s)this.process(u,a);continue}n.set(e.subarray(a,a+c),this.pos),this.pos+=c,a+=c,this.pos===s&&(this.process(r,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,Te.aexists)(this),(0,Te.aoutput)(e,this),this.finished=!0;let{buffer:r,view:n,blockLen:s,isLE:o}=this,{pos:a}=this;r[a++]=128,(0,Te.clean)(this.buffer.subarray(a)),this.padOffset>s-a&&(this.process(n,0),a=0);for(let l=a;l<s;l++)r[l]=0;ps(n,s-8,BigInt(this.length*8),o),this.process(n,0);let c=(0,Te.createView)(e),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let m=u/4,w=this.get();if(m>w.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;l<m;l++)c.setUint32(4*l,w[l],o)}digest(){let{buffer:e,outputLen:r}=this;this.digestInto(e);let n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:r,buffer:n,length:s,finished:o,destroyed:a,pos:c}=this;return e.destroyed=a,e.finished=o,e.length=s,e.pos=c,s%r&&e.buffer.set(n),e}clone(){return this._cloneInto()}};pe.HashMD=tn;pe.SHA256_IV=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]);pe.SHA224_IV=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]);pe.SHA384_IV=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]);pe.SHA512_IV=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209])});var js=de(B=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.toBig=B.shrSL=B.shrSH=B.rotrSL=B.rotrSH=B.rotrBL=B.rotrBH=B.rotr32L=B.rotr32H=B.rotlSL=B.rotlSH=B.rotlBL=B.rotlBH=B.add5L=B.add5H=B.add4L=B.add4H=B.add3L=B.add3H=void 0;B.add=Hs;B.fromBig=nn;B.split=ms;var gr=BigInt(2**32-1),rn=BigInt(32);function nn(t,e=!1){return e?{h:Number(t&gr),l:Number(t>>rn&gr)}:{h:Number(t>>rn&gr)|0,l:Number(t&gr)|0}}i(nn,"fromBig");function ms(t,e=!1){let r=t.length,n=new Uint32Array(r),s=new Uint32Array(r);for(let o=0;o<r;o++){let{h:a,l:c}=nn(t[o],e);[n[o],s[o]]=[a,c]}return[n,s]}i(ms,"split");var ys=i((t,e)=>BigInt(t>>>0)<<rn|BigInt(e>>>0),"toBig");B.toBig=ys;var ws=i((t,e,r)=>t>>>r,"shrSH");B.shrSH=ws;var _s=i((t,e,r)=>t<<32-r|e>>>r,"shrSL");B.shrSL=_s;var xs=i((t,e,r)=>t>>>r|e<<32-r,"rotrSH");B.rotrSH=xs;var Ss=i((t,e,r)=>t<<32-r|e>>>r,"rotrSL");B.rotrSL=Ss;var As=i((t,e,r)=>t<<64-r|e>>>r-32,"rotrBH");B.rotrBH=As;var Cs=i((t,e,r)=>t>>>r-32|e<<64-r,"rotrBL");B.rotrBL=Cs;var Es=i((t,e)=>e,"rotr32H");B.rotr32H=Es;var vs=i((t,e)=>t,"rotr32L");B.rotr32L=vs;var Is=i((t,e,r)=>t<<r|e>>>32-r,"rotlSH");B.rotlSH=Is;var ks=i((t,e,r)=>e<<r|t>>>32-r,"rotlSL");B.rotlSL=ks;var Rs=i((t,e,r)=>e<<r-32|t>>>64-r,"rotlBH");B.rotlBH=Rs;var Os=i((t,e,r)=>t<<r-32|e>>>64-r,"rotlBL");B.rotlBL=Os;function Hs(t,e,r,n){let s=(e>>>0)+(n>>>0);return{h:t+r+(s/2**32|0)|0,l:s|0}}i(Hs,"add");var Us=i((t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),"add3L");B.add3L=Us;var Ds=i((t,e,r,n)=>e+r+n+(t/2**32|0)|0,"add3H");B.add3H=Ds;var Ms=i((t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),"add4L");B.add4L=Ms;var Fs=i((t,e,r,n,s)=>e+r+n+s+(t/2**32|0)|0,"add4H");B.add4H=Fs;var Ps=i((t,e,r,n,s)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(s>>>0),"add5L");B.add5L=Ps;var Ts=i((t,e,r,n,s,o)=>e+r+n+s+o+(t/2**32|0)|0,"add5H");B.add5H=Ts;var Ya={fromBig:nn,split:ms,toBig:ys,shrSH:ws,shrSL:_s,rotrSH:xs,rotrSL:Ss,rotrBH:As,rotrBL:Cs,rotr32H:Es,rotr32L:vs,rotlSH:Is,rotlSL:ks,rotlBH:Rs,rotlBL:Os,add:Hs,add3L:Us,add3H:Ds,add4L:Ms,add4H:Fs,add5H:Ts,add5L:Ps};B.default=Ya});var Ls=de(Z=>{"use strict";Object.defineProperty(Z,"__esModule",{value:!0});Z.sha512_224=Z.sha512_256=Z.sha384=Z.sha512=Z.sha224=Z.sha256=Z.SHA512_256=Z.SHA512_224=Z.SHA384=Z.SHA512=Z.SHA224=Z.SHA256=void 0;var M=bs(),V=js(),te=en(),Xa=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),qe=new Uint32Array(64),zt=class extends M.HashMD{static{i(this,"SHA256")}constructor(e=32){super(64,e,8,!1),this.A=M.SHA256_IV[0]|0,this.B=M.SHA256_IV[1]|0,this.C=M.SHA256_IV[2]|0,this.D=M.SHA256_IV[3]|0,this.E=M.SHA256_IV[4]|0,this.F=M.SHA256_IV[5]|0,this.G=M.SHA256_IV[6]|0,this.H=M.SHA256_IV[7]|0}get(){let{A:e,B:r,C:n,D:s,E:o,F:a,G:c,H:u}=this;return[e,r,n,s,o,a,c,u]}set(e,r,n,s,o,a,c,u){this.A=e|0,this.B=r|0,this.C=n|0,this.D=s|0,this.E=o|0,this.F=a|0,this.G=c|0,this.H=u|0}process(e,r){for(let l=0;l<16;l++,r+=4)qe[l]=e.getUint32(r,!1);for(let l=16;l<64;l++){let g=qe[l-15],p=qe[l-2],_=(0,te.rotr)(g,7)^(0,te.rotr)(g,18)^g>>>3,I=(0,te.rotr)(p,17)^(0,te.rotr)(p,19)^p>>>10;qe[l]=I+qe[l-7]+_+qe[l-16]|0}let{A:n,B:s,C:o,D:a,E:c,F:u,G:m,H:w}=this;for(let l=0;l<64;l++){let g=(0,te.rotr)(c,6)^(0,te.rotr)(c,11)^(0,te.rotr)(c,25),p=w+g+(0,M.Chi)(c,u,m)+Xa[l]+qe[l]|0,I=((0,te.rotr)(n,2)^(0,te.rotr)(n,13)^(0,te.rotr)(n,22))+(0,M.Maj)(n,s,o)|0;w=m,m=u,u=c,c=a+p|0,a=o,o=s,s=n,n=p+I|0}n=n+this.A|0,s=s+this.B|0,o=o+this.C|0,a=a+this.D|0,c=c+this.E|0,u=u+this.F|0,m=m+this.G|0,w=w+this.H|0,this.set(n,s,o,a,c,u,m,w)}roundClean(){(0,te.clean)(qe)}destroy(){this.set(0,0,0,0,0,0,0,0),(0,te.clean)(this.buffer)}};Z.SHA256=zt;var pr=class extends zt{static{i(this,"SHA224")}constructor(){super(28),this.A=M.SHA224_IV[0]|0,this.B=M.SHA224_IV[1]|0,this.C=M.SHA224_IV[2]|0,this.D=M.SHA224_IV[3]|0,this.E=M.SHA224_IV[4]|0,this.F=M.SHA224_IV[5]|0,this.G=M.SHA224_IV[6]|0,this.H=M.SHA224_IV[7]|0}};Z.SHA224=pr;var Bs=V.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))),Za=Bs[0],Qa=Bs[1],Je=new Uint32Array(80),Ye=new Uint32Array(80),at=class extends M.HashMD{static{i(this,"SHA512")}constructor(e=64){super(128,e,16,!1),this.Ah=M.SHA512_IV[0]|0,this.Al=M.SHA512_IV[1]|0,this.Bh=M.SHA512_IV[2]|0,this.Bl=M.SHA512_IV[3]|0,this.Ch=M.SHA512_IV[4]|0,this.Cl=M.SHA512_IV[5]|0,this.Dh=M.SHA512_IV[6]|0,this.Dl=M.SHA512_IV[7]|0,this.Eh=M.SHA512_IV[8]|0,this.El=M.SHA512_IV[9]|0,this.Fh=M.SHA512_IV[10]|0,this.Fl=M.SHA512_IV[11]|0,this.Gh=M.SHA512_IV[12]|0,this.Gl=M.SHA512_IV[13]|0,this.Hh=M.SHA512_IV[14]|0,this.Hl=M.SHA512_IV[15]|0}get(){let{Ah:e,Al:r,Bh:n,Bl:s,Ch:o,Cl:a,Dh:c,Dl:u,Eh:m,El:w,Fh:l,Fl:g,Gh:p,Gl:_,Hh:I,Hl:v}=this;return[e,r,n,s,o,a,c,u,m,w,l,g,p,_,I,v]}set(e,r,n,s,o,a,c,u,m,w,l,g,p,_,I,v){this.Ah=e|0,this.Al=r|0,this.Bh=n|0,this.Bl=s|0,this.Ch=o|0,this.Cl=a|0,this.Dh=c|0,this.Dl=u|0,this.Eh=m|0,this.El=w|0,this.Fh=l|0,this.Fl=g|0,this.Gh=p|0,this.Gl=_|0,this.Hh=I|0,this.Hl=v|0}process(e,r){for(let U=0;U<16;U++,r+=4)Je[U]=e.getUint32(r),Ye[U]=e.getUint32(r+=4);for(let U=16;U<80;U++){let E=Je[U-15]|0,T=Ye[U-15]|0,K=V.rotrSH(E,T,1)^V.rotrSH(E,T,8)^V.shrSH(E,T,7),j=V.rotrSL(E,T,1)^V.rotrSL(E,T,8)^V.shrSL(E,T,7),N=Je[U-2]|0,$=Ye[U-2]|0,me=V.rotrSH(N,$,19)^V.rotrBH(N,$,61)^V.shrSH(N,$,6),he=V.rotrSL(N,$,19)^V.rotrBL(N,$,61)^V.shrSL(N,$,6),Ce=V.add4L(j,he,Ye[U-7],Ye[U-16]),dt=V.add4H(Ce,K,me,Je[U-7],Je[U-16]);Je[U]=dt|0,Ye[U]=Ce|0}let{Ah:n,Al:s,Bh:o,Bl:a,Ch:c,Cl:u,Dh:m,Dl:w,Eh:l,El:g,Fh:p,Fl:_,Gh:I,Gl:v,Hh:O,Hl:H}=this;for(let U=0;U<80;U++){let E=V.rotrSH(l,g,14)^V.rotrSH(l,g,18)^V.rotrBH(l,g,41),T=V.rotrSL(l,g,14)^V.rotrSL(l,g,18)^V.rotrBL(l,g,41),K=l&p^~l&I,j=g&_^~g&v,N=V.add5L(H,T,j,Qa[U],Ye[U]),$=V.add5H(N,O,E,K,Za[U],Je[U]),me=N|0,he=V.rotrSH(n,s,28)^V.rotrBH(n,s,34)^V.rotrBH(n,s,39),Ce=V.rotrSL(n,s,28)^V.rotrBL(n,s,34)^V.rotrBL(n,s,39),dt=n&o^n&c^o&c,h=s&a^s&u^a&u;O=I|0,H=v|0,I=p|0,v=_|0,p=l|0,_=g|0,{h:l,l:g}=V.add(m|0,w|0,$|0,me|0),m=c|0,w=u|0,c=o|0,u=a|0,o=n|0,a=s|0;let k=V.add3L(me,Ce,h);n=V.add3H(k,$,he,dt),s=k|0}({h:n,l:s}=V.add(this.Ah|0,this.Al|0,n|0,s|0)),{h:o,l:a}=V.add(this.Bh|0,this.Bl|0,o|0,a|0),{h:c,l:u}=V.add(this.Ch|0,this.Cl|0,c|0,u|0),{h:m,l:w}=V.add(this.Dh|0,this.Dl|0,m|0,w|0),{h:l,l:g}=V.add(this.Eh|0,this.El|0,l|0,g|0),{h:p,l:_}=V.add(this.Fh|0,this.Fl|0,p|0,_|0),{h:I,l:v}=V.add(this.Gh|0,this.Gl|0,I|0,v|0),{h:O,l:H}=V.add(this.Hh|0,this.Hl|0,O|0,H|0),this.set(n,s,o,a,c,u,m,w,l,g,p,_,I,v,O,H)}roundClean(){(0,te.clean)(Je,Ye)}destroy(){(0,te.clean)(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};Z.SHA512=at;var br=class extends at{static{i(this,"SHA384")}constructor(){super(48),this.Ah=M.SHA384_IV[0]|0,this.Al=M.SHA384_IV[1]|0,this.Bh=M.SHA384_IV[2]|0,this.Bl=M.SHA384_IV[3]|0,this.Ch=M.SHA384_IV[4]|0,this.Cl=M.SHA384_IV[5]|0,this.Dh=M.SHA384_IV[6]|0,this.Dl=M.SHA384_IV[7]|0,this.Eh=M.SHA384_IV[8]|0,this.El=M.SHA384_IV[9]|0,this.Fh=M.SHA384_IV[10]|0,this.Fl=M.SHA384_IV[11]|0,this.Gh=M.SHA384_IV[12]|0,this.Gl=M.SHA384_IV[13]|0,this.Hh=M.SHA384_IV[14]|0,this.Hl=M.SHA384_IV[15]|0}};Z.SHA384=br;var ue=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),le=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]),mr=class extends at{static{i(this,"SHA512_224")}constructor(){super(28),this.Ah=ue[0]|0,this.Al=ue[1]|0,this.Bh=ue[2]|0,this.Bl=ue[3]|0,this.Ch=ue[4]|0,this.Cl=ue[5]|0,this.Dh=ue[6]|0,this.Dl=ue[7]|0,this.Eh=ue[8]|0,this.El=ue[9]|0,this.Fh=ue[10]|0,this.Fl=ue[11]|0,this.Gh=ue[12]|0,this.Gl=ue[13]|0,this.Hh=ue[14]|0,this.Hl=ue[15]|0}};Z.SHA512_224=mr;var yr=class extends at{static{i(this,"SHA512_256")}constructor(){super(32),this.Ah=le[0]|0,this.Al=le[1]|0,this.Bh=le[2]|0,this.Bl=le[3]|0,this.Ch=le[4]|0,this.Cl=le[5]|0,this.Dh=le[6]|0,this.Dl=le[7]|0,this.Eh=le[8]|0,this.El=le[9]|0,this.Fh=le[10]|0,this.Fl=le[11]|0,this.Gh=le[12]|0,this.Gl=le[13]|0,this.Hh=le[14]|0,this.Hl=le[15]|0}};Z.SHA512_256=yr;Z.sha256=(0,te.createHasher)(()=>new zt);Z.sha224=(0,te.createHasher)(()=>new pr);Z.sha512=(0,te.createHasher)(()=>new at);Z.sha384=(0,te.createHasher)(()=>new br);Z.sha512_256=(0,te.createHasher)(()=>new yr);Z.sha512_224=(0,te.createHasher)(()=>new mr)});var zs=de(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.sha224=je.SHA224=je.sha256=je.SHA256=void 0;var wr=Ls();je.SHA256=wr.SHA256;je.sha256=wr.sha256;je.SHA224=wr.SHA224;je.sha224=wr.sha224});var Ns=de((ku,Vs)=>{"use strict";function ec(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 s=t.charAt(n),o=s.charCodeAt(0);if(e[o]!==255)throw new TypeError(s+" is ambiguous");e[o]=n}var a=t.length,c=t.charAt(0),u=Math.log(a)/Math.log(256),m=Math.log(256)/Math.log(a);function w(p){if(p instanceof Uint8Array||(ArrayBuffer.isView(p)?p=new Uint8Array(p.buffer,p.byteOffset,p.byteLength):Array.isArray(p)&&(p=Uint8Array.from(p))),!(p instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(p.length===0)return"";for(var _=0,I=0,v=0,O=p.length;v!==O&&p[v]===0;)v++,_++;for(var H=(O-v)*m+1>>>0,U=new Uint8Array(H);v!==O;){for(var E=p[v],T=0,K=H-1;(E!==0||T<I)&&K!==-1;K--,T++)E+=256*U[K]>>>0,U[K]=E%a>>>0,E=E/a>>>0;if(E!==0)throw new Error("Non-zero carry");I=T,v++}for(var j=H-I;j!==H&&U[j]===0;)j++;for(var N=c.repeat(_);j<H;++j)N+=t.charAt(U[j]);return N}i(w,"encode");function l(p){if(typeof p!="string")throw new TypeError("Expected String");if(p.length===0)return new Uint8Array;for(var _=0,I=0,v=0;p[_]===c;)I++,_++;for(var O=(p.length-_)*u+1>>>0,H=new Uint8Array(O);p[_];){var U=p.charCodeAt(_);if(U>255)return;var E=e[U];if(E===255)return;for(var T=0,K=O-1;(E!==0||T<v)&&K!==-1;K--,T++)E+=a*H[K]>>>0,H[K]=E%256>>>0,E=E/256>>>0;if(E!==0)throw new Error("Non-zero carry");v=T,_++}for(var j=O-v;j!==O&&H[j]===0;)j++;for(var N=new Uint8Array(I+(O-j)),$=I;j!==O;)N[$++]=H[j++];return N}i(l,"decodeUnsafe");function g(p){var _=l(p);if(_)return _;throw new Error("Non-base"+a+" character")}return i(g,"decode"),{encode:w,decodeUnsafe:l,decode:g}}i(ec,"base");Vs.exports=ec});var Ws=de((Ou,$s)=>{"use strict";var tc=Ns(),rc="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";$s.exports=tc(rc)});var Ks=de((Hu,Gs)=>{"use strict";var sn=Ws();Gs.exports=function(t){function e(o){var a=Uint8Array.from(o),c=t(a),u=a.length+4,m=new Uint8Array(u);return m.set(a,0),m.set(c.subarray(0,4),a.length),sn.encode(m,u)}i(e,"encode");function r(o){var a=o.slice(0,-4),c=o.slice(-4),u=t(a);if(!(c[0]^u[0]|c[1]^u[1]|c[2]^u[2]|c[3]^u[3]))return a}i(r,"decodeRaw");function n(o){var a=sn.decodeUnsafe(o);if(a)return r(a)}i(n,"decodeUnsafe");function s(o){var a=sn.decode(o),c=r(a,t);if(!c)throw new Error("Invalid checksum");return c}return i(s,"decode"),{encode:e,decode:s,decodeUnsafe:n}}});var Ys=de((Du,Js)=>{"use strict";var{sha256:qs}=zs(),nc=Ks();function sc(t){return qs(qs(t))}i(sc,"sha256x2");Js.exports=nc(sc)});var _o=de((wo,Ur)=>{"use strict";(function(t,e){var r={};e(r);var n=r.default;for(var s in r)n[s]=r[s];typeof Ur=="object"&&typeof Ur.exports=="object"?Ur.exports=n:typeof define=="function"&&define.amd?define(function(){return n}):t.sha256=n})(wo,function(t){"use strict";t.__esModule=!0,t.digestLength=32,t.blockSize=64;var e=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function r(l,g,p,_,I){for(var v,O,H,U,E,T,K,j,N,$,me,he,Ce;I>=64;){for(v=g[0],O=g[1],H=g[2],U=g[3],E=g[4],T=g[5],K=g[6],j=g[7],$=0;$<16;$++)me=_+$*4,l[$]=(p[me]&255)<<24|(p[me+1]&255)<<16|(p[me+2]&255)<<8|p[me+3]&255;for($=16;$<64;$++)N=l[$-2],he=(N>>>17|N<<15)^(N>>>19|N<<13)^N>>>10,N=l[$-15],Ce=(N>>>7|N<<25)^(N>>>18|N<<14)^N>>>3,l[$]=(he+l[$-7]|0)+(Ce+l[$-16]|0);for($=0;$<64;$++)he=(((E>>>6|E<<26)^(E>>>11|E<<21)^(E>>>25|E<<7))+(E&T^~E&K)|0)+(j+(e[$]+l[$]|0)|0)|0,Ce=((v>>>2|v<<30)^(v>>>13|v<<19)^(v>>>22|v<<10))+(v&O^v&H^O&H)|0,j=K,K=T,T=E,E=U+he|0,U=H,H=O,O=v,v=he+Ce|0;g[0]+=v,g[1]+=O,g[2]+=H,g[3]+=U,g[4]+=E,g[5]+=T,g[6]+=K,g[7]+=j,_+=64,I-=64}return _}i(r,"hashBlocks");var n=(function(){function l(){this.digestLength=t.digestLength,this.blockSize=t.blockSize,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 i(l,"Hash"),l.prototype.reset=function(){return 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,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this},l.prototype.clean=function(){for(var g=0;g<this.buffer.length;g++)this.buffer[g]=0;for(var g=0;g<this.temp.length;g++)this.temp[g]=0;this.reset()},l.prototype.update=function(g,p){if(p===void 0&&(p=g.length),this.finished)throw new Error("SHA256: can't update because hash was finished.");var _=0;if(this.bytesHashed+=p,this.bufferLength>0){for(;this.bufferLength<64&&p>0;)this.buffer[this.bufferLength++]=g[_++],p--;this.bufferLength===64&&(r(this.temp,this.state,this.buffer,0,64),this.bufferLength=0)}for(p>=64&&(_=r(this.temp,this.state,g,_,p),p%=64);p>0;)this.buffer[this.bufferLength++]=g[_++],p--;return this},l.prototype.finish=function(g){if(!this.finished){var p=this.bytesHashed,_=this.bufferLength,I=p/536870912|0,v=p<<3,O=p%64<56?64:128;this.buffer[_]=128;for(var H=_+1;H<O-8;H++)this.buffer[H]=0;this.buffer[O-8]=I>>>24&255,this.buffer[O-7]=I>>>16&255,this.buffer[O-6]=I>>>8&255,this.buffer[O-5]=I>>>0&255,this.buffer[O-4]=v>>>24&255,this.buffer[O-3]=v>>>16&255,this.buffer[O-2]=v>>>8&255,this.buffer[O-1]=v>>>0&255,r(this.temp,this.state,this.buffer,0,O),this.finished=!0}for(var H=0;H<8;H++)g[H*4+0]=this.state[H]>>>24&255,g[H*4+1]=this.state[H]>>>16&255,g[H*4+2]=this.state[H]>>>8&255,g[H*4+3]=this.state[H]>>>0&255;return this},l.prototype.digest=function(){var g=new Uint8Array(this.digestLength);return this.finish(g),g},l.prototype._saveState=function(g){for(var p=0;p<this.state.length;p++)g[p]=this.state[p]},l.prototype._restoreState=function(g,p){for(var _=0;_<this.state.length;_++)this.state[_]=g[_];this.bytesHashed=p,this.finished=!1,this.bufferLength=0},l})();t.Hash=n;var s=(function(){function l(g){this.inner=new n,this.outer=new n,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var p=new Uint8Array(this.blockSize);if(g.length>this.blockSize)new n().update(g).finish(p).clean();else for(var _=0;_<g.length;_++)p[_]=g[_];for(var _=0;_<p.length;_++)p[_]^=54;this.inner.update(p);for(var _=0;_<p.length;_++)p[_]^=106;this.outer.update(p),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate);for(var _=0;_<p.length;_++)p[_]=0}return i(l,"HMAC"),l.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},l.prototype.clean=function(){for(var g=0;g<this.istate.length;g++)this.ostate[g]=this.istate[g]=0;this.inner.clean(),this.outer.clean()},l.prototype.update=function(g){return this.inner.update(g),this},l.prototype.finish=function(g){return this.outer.finished?this.outer.finish(g):(this.inner.finish(g),this.outer.update(g,this.digestLength).finish(g)),this},l.prototype.digest=function(){var g=new Uint8Array(this.digestLength);return this.finish(g),g},l})();t.HMAC=s;function o(l){var g=new n().update(l),p=g.digest();return g.clean(),p}i(o,"hash"),t.hash=o,t.default=o;function a(l,g){var p=new s(l).update(g),_=p.digest();return p.clean(),_}i(a,"hmac"),t.hmac=a;function c(l,g,p,_){var I=_[0];if(I===0)throw new Error("hkdf: cannot expand more");g.reset(),I>1&&g.update(l),p&&g.update(p),g.update(_),g.finish(l),_[0]++}i(c,"fillBuffer");var u=new Uint8Array(t.digestLength);function m(l,g,p,_){g===void 0&&(g=u),_===void 0&&(_=32);for(var I=new Uint8Array([1]),v=a(g,l),O=new s(v),H=new Uint8Array(O.digestLength),U=H.length,E=new Uint8Array(_),T=0;T<_;T++)U===H.length&&(c(H,O,p,I),U=0),E[T]=H[U++];return O.clean(),H.fill(0),I.fill(0),E}i(m,"hkdf"),t.hkdf=m;function w(l,g,p,_){for(var I=new s(l),v=I.digestLength,O=new Uint8Array(4),H=new Uint8Array(v),U=new Uint8Array(v),E=new Uint8Array(_),T=0;T*v<_;T++){var K=T+1;O[0]=K>>>24&255,O[1]=K>>>16&255,O[2]=K>>>8&255,O[3]=K>>>0&255,I.reset(),I.update(g),I.update(O),I.finish(U);for(var j=0;j<v;j++)H[j]=U[j];for(var j=2;j<=p;j++){I.reset(),I.update(U).finish(U);for(var N=0;N<v;N++)H[N]^=U[N]}for(var j=0;j<v&&T*v+j<_;j++)E[T*v+j]=H[j]}for(var T=0;T<v;T++)H[T]=U[T]=0;for(var T=0;T<4;T++)O[T]=0;return I.clean(),E}i(w,"pbkdf2"),t.pbkdf2=w})});var X={};Pr(X,{Counter:()=>Ee,Float64:()=>Mt,ImmutableString:()=>Me,Int:()=>Ut,RawString:()=>da,Uint:()=>Dt,applyChanges:()=>Zn,applyPatch:()=>$r,applyPatches:()=>Wn,block:()=>na,change:()=>Ci,changeAt:()=>Ei,clone:()=>xi,decodeChange:()=>Qn,decodeSyncMessage:()=>Gi,decodeSyncState:()=>Bi,deleteAt:()=>pi,diff:()=>Pi,dump:()=>qi,emptyChange:()=>vi,encodeChange:()=>$i,encodeSyncMessage:()=>Wi,encodeSyncState:()=>ji,equals:()=>ar,free:()=>Si,from:()=>Ai,generateSyncMessage:()=>Li,getActorId:()=>Hi,getAllChanges:()=>Xn,getBackend:()=>mi,getChanges:()=>Mi,getChangesMetaSince:()=>wi,getChangesSince:()=>yi,getConflicts:()=>Ui,getCursor:()=>ca,getCursorPosition:()=>fa,getHeads:()=>es,getHistory:()=>Fi,getLastLocalChange:()=>Di,getMissingDeps:()=>Ki,getObjectId:()=>Yn,hasHeads:()=>Xi,hasOurChanges:()=>Vi,init:()=>cr,initSyncState:()=>Ni,initializeBase64Wasm:()=>Nr,initializeWasm:()=>nr,insertAt:()=>gi,inspectChange:()=>Qi,isAutomerge:()=>ot,isCounter:()=>tr,isImmutableString:()=>pt,isRawString:()=>ha,isWasmInitialized:()=>$n,joinBlock:()=>oa,load:()=>Ii,loadIncremental:()=>Jn,mark:()=>Wr,marks:()=>ua,marksAt:()=>la,merge:()=>Oi,receiveSyncMessage:()=>zi,save:()=>Ri,saveIncremental:()=>ki,saveSince:()=>Yi,spans:()=>ra,splice:()=>or,splitBlock:()=>sa,stats:()=>ea,toJS:()=>Ji,topoHistoryTraversal:()=>Zi,unmark:()=>Gr,updateBlock:()=>ia,updateSpans:()=>aa,updateText:()=>ta,use:()=>bi,view:()=>_i,wasmInitialized:()=>Nn});var Ke=Symbol.for("_am_meta"),Qe=Symbol.for("_am_trace"),et=Symbol.for("_am_objectId"),Rt=Symbol.for("_am_isProxy"),Ot=Symbol.for("_am_clearCache"),Jt=Symbol.for("_am_uint"),Yt=Symbol.for("_am_int"),Xt=Symbol.for("_am_f64"),Ht=Symbol.for("_am_counter"),df=Symbol.for("_am_text"),Zt=Symbol.for("_am_immutableString");var Ee=class{static{i(this,"Counter")}constructor(e){this.value=e||0,Reflect.defineProperty(this,Ht,{value:!0})}valueOf(){return this.value}toString(){return this.valueOf().toString()}toJSON(){return this.value}increment(e){throw new Error("Counters should not be incremented outside of a change callback")}decrement(e){throw new Error("Counters should not be decremented outside of a change callback")}},Tr=class extends Ee{static{i(this,"WriteableCounter")}constructor(e,r,n,s,o){super(e),this.context=r,this.path=n,this.objectId=s,this.key=o}increment(e){return e=typeof e=="number"?e:1,this.context.increment(this.objectId,this.key,e),this.value+=e,this.value}decrement(e){return this.increment(typeof e=="number"?-e:-1)}};function Un(t,e,r,n,s){return new Tr(t,e,r,n,s)}i(Un,"getWriteableCounter");var Dn,Me=class{static{i(this,"ImmutableString")}constructor(e){this[Dn]=!0,this.val=e}toString(){return this.val}toJSON(){return this.val}};Dn=Zt;function ze(t){if(typeof t=="string"&&/^[0-9]+$/.test(t)&&(t=parseInt(t,10)),typeof t!="number")return t;if(t<0||isNaN(t)||t===1/0||t===-1/0)throw new RangeError("A list index must be positive, but you passed "+t);return t}i(ze,"parseListIndex");function Se(t,e){let{context:r,objectId:n,path:s}=t,o=r.getWithType(n,e);if(o===null)return;let a=o[0],c=o[1];switch(a){case void 0:return;case"map":return tt(r,c,[...s,e]);case"list":return gt(r,c,[...s,e]);case"text":return r.text(c);case"str":return new Me(c);case"uint":return c;case"int":return c;case"f64":return c;case"boolean":return c;case"null":return null;case"bytes":return c;case"timestamp":return c;case"counter":return Un(c,r,s,n,e);default:throw RangeError(`datatype ${a} unimplemented`)}}i(Se,"valueAt");function Qt(t,e,r){let n=typeof t;switch(n){case"object":if(t==null)return[null,"null"];if(t[Jt])return[t.value,"uint"];if(t[Yt])return[t.value,"int"];if(t[Xt])return[t.value,"f64"];if(t[Ht])return[t.value,"counter"];if(t instanceof Date)return[t.getTime(),"timestamp"];if(pt(t))return[t.toString(),"str"];if(t instanceof Uint8Array)return[t,"bytes"];if(t instanceof Array)return[t,"list"];if(Object.prototype.toString.call(t)==="[object Object]")return[t,"map"];throw er(t,r)?new RangeError("Cannot create a reference to an existing document object"):new RangeError(`Cannot assign unknown object: ${t}`);case"boolean":return[t,"boolean"];case"number":return Number.isInteger(t)?[t,"int"]:[t,"f64"];case"string":return[t,"text"];case"undefined":throw new RangeError([`Cannot assign undefined value at ${Mn(e)}, `,"because `undefined` is not a valid JSON data type. ","You might consider setting the property's value to `null`, ","or using `delete` to remove it altogether."].join(""));default:throw new RangeError([`Cannot assign ${n} value at ${Mn(e)}. `,"All JSON primitive datatypes (object, array, string, number, boolean, null) ",`are supported in an Automerge document; ${n} values are not. `].join(""))}}i(Qt,"import_value");function er(t,e){var r,n;return t instanceof Date?!1:!!(t&&((n=(r=t[Ke])===null||r===void 0?void 0:r.handle)===null||n===void 0?void 0:n.__wbg_ptr)===e.__wbg_ptr)}i(er,"isSameDocument");var zo={get(t,e){let{context:r,objectId:n,cache:s}=t;return e===Symbol.toStringTag?t[Symbol.toStringTag]:e===et?n:e===Rt?!0:e===Qe?t.trace:e===Ke?{handle:r}:(s[e]||(s[e]=Se(t,e)),s[e])},set(t,e,r){let{context:n,objectId:s,path:o}=t;if(t.cache={},er(r,n))throw new RangeError("Cannot create a reference to an existing document object");if(e===Qe)return t.trace=r,!0;if(e===Ot)return!0;let[a,c]=Qt(r,[...o,e],n);switch(c){case"list":{let u=n.putObject(s,e,[]),m=gt(n,u,[...o,e]);for(let w=0;w<a.length;w++)m[w]=a[w];break}case"text":{n.putObject(s,e,a);break}case"map":{let u=n.putObject(s,e,{}),m=tt(n,u,[...o,e]);for(let w in a)m[w]=a[w];break}default:n.put(s,e,a,c)}return!0},deleteProperty(t,e){let{context:r,objectId:n}=t;return t.cache={},r.delete(n,e),!0},has(t,e){return this.get(t,e)!==void 0},getOwnPropertyDescriptor(t,e){let r=this.get(t,e);if(typeof r<"u")return{configurable:!0,enumerable:!0,value:r}},ownKeys(t){let{context:e,objectId:r}=t,n=e.keys(r);return[...new Set(n)]}},Vo={get(t,e){let{context:r,objectId:n}=t;return e=ze(e),e===Symbol.hasInstance?s=>Array.isArray(s):e===Symbol.toStringTag?t[Symbol.toStringTag]:e===et?n:e===Rt?!0:e===Qe?t.trace:e===Ke?{handle:r}:e==="length"?r.length(n):typeof e=="number"?Se(t,e):No(t)[e]},set(t,e,r){let{context:n,objectId:s,path:o}=t;if(e=ze(e),er(r,n))throw new RangeError("Cannot create a reference to an existing document object");if(e===Ot)return!0;if(e===Qe)return t.trace=r,!0;if(typeof e=="string")throw new RangeError("list index must be a number");let[a,c]=Qt(r,[...o,e],n);switch(c){case"list":{let u;e>=n.length(s)?u=n.insertObject(s,e,[]):u=n.putObject(s,e,[]),gt(n,u,[...o,e]).splice(0,0,...a);break}case"text":{e>=n.length(s)?n.insertObject(s,e,a):n.putObject(s,e,a);break}case"map":{let u;e>=n.length(s)?u=n.insertObject(s,e,{}):u=n.putObject(s,e,{});let m=tt(n,u,[...o,e]);for(let w in a)m[w]=a[w];break}default:e>=n.length(s)?n.insert(s,e,a,c):n.put(s,e,a,c)}return!0},deleteProperty(t,e){let{context:r,objectId:n}=t;e=ze(e);let s=r.get(n,e);if(s!=null&&s[0]=="counter")throw new TypeError("Unsupported operation: deleting a counter from a list");return r.delete(n,e),!0},has(t,e){let{context:r,objectId:n}=t;return e=ze(e),typeof e=="number"?e<r.length(n):e==="length"},getOwnPropertyDescriptor(t,e){let{context:r,objectId:n}=t;return e==="length"?{writable:!0,value:r.length(n)}:e===et?{configurable:!1,enumerable:!1,value:n}:(e=ze(e),{configurable:!0,enumerable:!0,value:Se(t,e)})},getPrototypeOf(t){return Object.getPrototypeOf(t)},ownKeys(){let t=[];return t.push("length"),t}};function tt(t,e,r){let n={context:t,objectId:e,path:r||[],cache:{}},s={};return Object.assign(s,n),new Proxy(s,zo)}i(tt,"mapProxy");function gt(t,e,r){let n={context:t,objectId:e,path:r||[],cache:{}},s=[];return Object.assign(s,n),new Proxy(s,Vo)}i(gt,"listProxy");function Fn(t){return tt(t,"_root",[])}i(Fn,"rootProxy");function No(t){let{context:e,objectId:r,path:n}=t;return{at(o){return Se(t,o)},deleteAt(o,a){return typeof a=="number"?e.splice(r,o,a):e.delete(r,o),this},fill(o,a,c){let[u,m]=Qt(o,[...n,a],e),w=e.length(r);a=ze(a||0),c=ze(c||w);for(let l=a;l<Math.min(c,w);l++)m==="list"||m==="map"||m==="text"?e.putObject(r,l,u):e.put(r,l,u,m);return this},indexOf(o,a=0){let c=e.length(r);for(let u=a;u<c;u++){let m=e.getWithType(r,u);if(!m)continue;let[w,l]=m;if(!["map","list","text"].includes(w)){if(l===o)return u;continue}if(w==="text"&&typeof o=="string"&&o===Se(t,u)||o[et]===l)return u}return-1},insertAt(o,...a){return this.splice(o,0,...a),this},pop(){let o=e.length(r);if(o==0)return;let a=Se(t,o-1);return e.delete(r,o-1),a},push(...o){let a=e.length(r);return this.splice(a,0,...o),e.length(r)},shift(){if(e.length(r)==0)return;let o=Se(t,0);return e.delete(r,0),o},splice(o,a,...c){o=ze(o),typeof a!="number"&&(a=e.length(r)-o),a=ze(a);for(let w of c)if(er(w,e))throw new RangeError("Cannot create a reference to an existing document object");let u=[];for(let w=0;w<a;w++){let l=Se(t,o);l!==void 0&&u.push(l),e.delete(r,o)}let m=c.map((w,l)=>{try{return Qt(w,[...n],e)}catch(g){throw g instanceof RangeError?new RangeError(`${g.message} (at index ${l} in the input)`):g}});for(let[w,l]of m){switch(l){case"list":{let g=e.insertObject(r,o,[]);gt(e,g,[...n,o]).splice(0,0,...w);break}case"text":{e.insertObject(r,o,w);break}case"map":{let g=e.insertObject(r,o,{}),p=tt(e,g,[...n,o]);for(let _ in w)p[_]=w[_];break}default:e.insert(r,o,w,l)}o+=1}return u},unshift(...o){return this.splice(0,0,...o),e.length(r)},entries(){let o=0;return{next:i(()=>{let c=Se(t,o);return c===void 0?{value:void 0,done:!0}:{value:[o++,c],done:!1}},"next"),[Symbol.iterator](){return this}}},keys(){let o=0,a=e.length(r);return{next:i(()=>o<a?{value:o++,done:!1}:{value:void 0,done:!0},"next"),[Symbol.iterator](){return this}}},values(){let o=0;return{next:i(()=>{let c=Se(t,o++);return c===void 0?{value:void 0,done:!0}:{value:c,done:!1}},"next"),[Symbol.iterator](){return this}}},toArray(){let o=[],a;do a=Se(t,o.length),a!==void 0&&o.push(a);while(a!==void 0);return o},map(o){return this.toArray().map(o)},toString(){return this.toArray().toString()},toLocaleString(){return this.toArray().toLocaleString()},forEach(o){return this.toArray().forEach(o)},concat(o){return this.toArray().concat(o)},every(o){return this.toArray().every(o)},filter(o){return this.toArray().filter(o)},find(o){let a=0;for(let c of this){if(o(c,a))return c;a+=1}},findIndex(o){let a=0;for(let c of this){if(o(c,a))return a;a+=1}return-1},includes(o){return this.find(a=>a===o)!==void 0},join(o){return this.toArray().join(o)},reduce(o,a){return this.toArray().reduce(o,a)},reduceRight(o,a){return this.toArray().reduceRight(o,a)},lastIndexOf(o,a=1/0){return this.toArray().lastIndexOf(o,a)},slice(o,a){return this.toArray().slice(o,a)},some(o){let a=0;for(let c of this){if(o(c,a))return!0;a+=1}return!1},[Symbol.iterator]:function*(){let o=0,a=Se(t,o);for(;a!==void 0;)yield a,o+=1,a=Se(t,o)}}}i(No,"listMethods");function Mn(t){let e=t.map(r=>{if(typeof r=="number")return r.toString();if(typeof r=="string")return r.replace(/~/g,"~0").replace(/\//g,"~1")});return t.length===0?"":"/"+e.join("/")}i(Mn,"printPath");function pt(t){return typeof t=="object"&&t!==null&&Object.prototype.hasOwnProperty.call(t,Zt)}i(pt,"isImmutableString");function tr(t){return typeof t=="object"&&t!==null&&Object.prototype.hasOwnProperty.call(t,Ht)}i(tr,"isCounter");var Ut=class{static{i(this,"Int")}constructor(e){if(!(Number.isInteger(e)&&e<=Number.MAX_SAFE_INTEGER&&e>=Number.MIN_SAFE_INTEGER))throw new RangeError(`Value ${e} cannot be a uint`);this.value=e,Reflect.defineProperty(this,Yt,{value:!0}),Object.freeze(this)}},Dt=class{static{i(this,"Uint")}constructor(e){if(!(Number.isInteger(e)&&e<=Number.MAX_SAFE_INTEGER&&e>=0))throw new RangeError(`Value ${e} cannot be a uint`);this.value=e,Reflect.defineProperty(this,Jt,{value:!0}),Object.freeze(this)}},Mt=class{static{i(this,"Float64")}constructor(e){if(typeof e!="number")throw new RangeError(`Value ${e} cannot be a float64`);this.value=e||0,Reflect.defineProperty(this,Xt,{value:!0}),Object.freeze(this)}};var Lr={};Pr(Lr,{Automerge:()=>Tt,SyncState:()=>He,create:()=>Go,decodeChange:()=>Jo,decodeSyncMessage:()=>ei,decodeSyncState:()=>ri,defa