o1js
Version:
TypeScript framework for zk-SNARKs and zkApps
12 lines • 15.2 MB
JavaScript
var O2=Object.create;var BE=Object.defineProperty;var Z2=Object.getOwnPropertyDescriptor;var T2=Object.getOwnPropertyNames;var W2=Object.getPrototypeOf,X2=Object.prototype.hasOwnProperty;var Dg=(g,A)=>()=>(A||g((A={exports:{}}).exports,A),A.exports),cI=(g,A)=>{for(var _ in A)BE(g,_,{get:A[_],enumerable:!0})},Ak=(g,A,_,I)=>{if(A&&typeof A=="object"||typeof A=="function")for(let Q of T2(A))!X2.call(g,Q)&&Q!==_&&BE(g,Q,{get:()=>A[Q],enumerable:!(I=Z2(A,Q))||I.enumerable});return g};var aC=(g,A,_)=>(_=g!=null?O2(W2(g)):{},Ak(A||!g||!g.__esModule?BE(_,"default",{value:g,enumerable:!0}):_,g));var ic=Dg((exports,module)=>{(function(){"use strict";var ERROR="input is invalid type",WINDOW=typeof window=="object",root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&typeof self=="object",NODE_JS=!root.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&typeof module=="object"&&module.exports,AMD=typeof define=="function"&&define.amd,ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[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],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];(root.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(g){return Object.prototype.toString.call(g)==="[object Array]"}),ARRAY_BUFFER&&(root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(g){return typeof g=="object"&&g.buffer&&g.buffer.constructor===ArrayBuffer});var createOutputMethod=function(g,A){return function(_){return new Sha256(A,!0).update(_)[g]()}},createMethod=function(g){var A=createOutputMethod("hex",g);NODE_JS&&(A=nodeWrap(A,g)),A.create=function(){return new Sha256(g)},A.update=function(Q){return A.create().update(Q)};for(var _=0;_<OUTPUT_TYPES.length;++_){var I=OUTPUT_TYPES[_];A[I]=createOutputMethod(I,g)}return A},nodeWrap=function(method,is224){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),algorithm=is224?"sha224":"sha256",nodeMethod=function(g){if(typeof g=="string")return crypto.createHash(algorithm).update(g,"utf8").digest("hex");if(g==null)throw new Error(ERROR);return g.constructor===ArrayBuffer&&(g=new Uint8Array(g)),Array.isArray(g)||ArrayBuffer.isView(g)||g.constructor===Buffer?crypto.createHash(algorithm).update(new Buffer(g)).digest("hex"):method(g)};return nodeMethod},createHmacOutputMethod=function(g,A){return function(_,I){return new HmacSha256(_,A,!0).update(I)[g]()}},createHmacMethod=function(g){var A=createHmacOutputMethod("hex",g);A.create=function(Q){return new HmacSha256(Q,g)},A.update=function(Q,B){return A.create(Q).update(B)};for(var _=0;_<OUTPUT_TYPES.length;++_){var I=OUTPUT_TYPES[_];A[I]=createHmacOutputMethod(I,g)}return A};function Sha256(g,A){A?(blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],g?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=g}Sha256.prototype.update=function(g){if(!this.finalized){var A,_=typeof g;if(_!=="string"){if(_==="object"){if(g===null)throw new Error(ERROR);if(ARRAY_BUFFER&&g.constructor===ArrayBuffer)g=new Uint8Array(g);else if(!Array.isArray(g)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(g)))throw new Error(ERROR)}else throw new Error(ERROR);A=!0}for(var I,Q=0,B,a=g.length,e=this.blocks;Q<a;){if(this.hashed&&(this.hashed=!1,e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),A)for(B=this.start;Q<a&&B<64;++Q)e[B>>2]|=g[Q]<<SHIFT[B++&3];else for(B=this.start;Q<a&&B<64;++Q)I=g.charCodeAt(Q),I<128?e[B>>2]|=I<<SHIFT[B++&3]:I<2048?(e[B>>2]|=(192|I>>6)<<SHIFT[B++&3],e[B>>2]|=(128|I&63)<<SHIFT[B++&3]):I<55296||I>=57344?(e[B>>2]|=(224|I>>12)<<SHIFT[B++&3],e[B>>2]|=(128|I>>6&63)<<SHIFT[B++&3],e[B>>2]|=(128|I&63)<<SHIFT[B++&3]):(I=65536+((I&1023)<<10|g.charCodeAt(++Q)&1023),e[B>>2]|=(240|I>>18)<<SHIFT[B++&3],e[B>>2]|=(128|I>>12&63)<<SHIFT[B++&3],e[B>>2]|=(128|I>>6&63)<<SHIFT[B++&3],e[B>>2]|=(128|I&63)<<SHIFT[B++&3]);this.lastByteIndex=B,this.bytes+=B-this.start,B>=64?(this.block=e[16],this.start=B-64,this.hash(),this.hashed=!0):this.start=B}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var g=this.blocks,A=this.lastByteIndex;g[16]=this.block,g[A>>2]|=EXTRA[A&3],this.block=g[16],A>=56&&(this.hashed||this.hash(),g[0]=this.block,g[16]=g[1]=g[2]=g[3]=g[4]=g[5]=g[6]=g[7]=g[8]=g[9]=g[10]=g[11]=g[12]=g[13]=g[14]=g[15]=0),g[14]=this.hBytes<<3|this.bytes>>>29,g[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var g=this.h0,A=this.h1,_=this.h2,I=this.h3,Q=this.h4,B=this.h5,a=this.h6,e=this.h7,r=this.blocks,i,E,l,u,f,o,w,y,h,k,c;for(i=16;i<64;++i)f=r[i-15],E=(f>>>7|f<<25)^(f>>>18|f<<14)^f>>>3,f=r[i-2],l=(f>>>17|f<<15)^(f>>>19|f<<13)^f>>>10,r[i]=r[i-16]+E+r[i-7]+l<<0;for(c=A&_,i=0;i<64;i+=4)this.first?(this.is224?(y=300032,f=r[0]-1413257819,e=f-150054599<<0,I=f+24177077<<0):(y=704751109,f=r[0]-210244248,e=f-1521486534<<0,I=f+143694565<<0),this.first=!1):(E=(g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10),l=(Q>>>6|Q<<26)^(Q>>>11|Q<<21)^(Q>>>25|Q<<7),y=g&A,u=y^g&_^c,w=Q&B^~Q&a,f=e+l+w+K[i]+r[i],o=E+u,e=I+f<<0,I=f+o<<0),E=(I>>>2|I<<30)^(I>>>13|I<<19)^(I>>>22|I<<10),l=(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7),h=I&g,u=h^I&A^y,w=e&Q^~e&B,f=a+l+w+K[i+1]+r[i+1],o=E+u,a=_+f<<0,_=f+o<<0,E=(_>>>2|_<<30)^(_>>>13|_<<19)^(_>>>22|_<<10),l=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),k=_&I,u=k^_&g^h,w=a&e^~a&Q,f=B+l+w+K[i+2]+r[i+2],o=E+u,B=A+f<<0,A=f+o<<0,E=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),l=(B>>>6|B<<26)^(B>>>11|B<<21)^(B>>>25|B<<7),c=A&_,u=c^A&I^k,w=B&a^~B&e,f=Q+l+w+K[i+3]+r[i+3],o=E+u,Q=g+f<<0,g=f+o<<0;this.h0=this.h0+g<<0,this.h1=this.h1+A<<0,this.h2=this.h2+_<<0,this.h3=this.h3+I<<0,this.h4=this.h4+Q<<0,this.h5=this.h5+B<<0,this.h6=this.h6+a<<0,this.h7=this.h7+e<<0},Sha256.prototype.hex=function(){this.finalize();var g=this.h0,A=this.h1,_=this.h2,I=this.h3,Q=this.h4,B=this.h5,a=this.h6,e=this.h7,r=HEX_CHARS[g>>28&15]+HEX_CHARS[g>>24&15]+HEX_CHARS[g>>20&15]+HEX_CHARS[g>>16&15]+HEX_CHARS[g>>12&15]+HEX_CHARS[g>>8&15]+HEX_CHARS[g>>4&15]+HEX_CHARS[g&15]+HEX_CHARS[A>>28&15]+HEX_CHARS[A>>24&15]+HEX_CHARS[A>>20&15]+HEX_CHARS[A>>16&15]+HEX_CHARS[A>>12&15]+HEX_CHARS[A>>8&15]+HEX_CHARS[A>>4&15]+HEX_CHARS[A&15]+HEX_CHARS[_>>28&15]+HEX_CHARS[_>>24&15]+HEX_CHARS[_>>20&15]+HEX_CHARS[_>>16&15]+HEX_CHARS[_>>12&15]+HEX_CHARS[_>>8&15]+HEX_CHARS[_>>4&15]+HEX_CHARS[_&15]+HEX_CHARS[I>>28&15]+HEX_CHARS[I>>24&15]+HEX_CHARS[I>>20&15]+HEX_CHARS[I>>16&15]+HEX_CHARS[I>>12&15]+HEX_CHARS[I>>8&15]+HEX_CHARS[I>>4&15]+HEX_CHARS[I&15]+HEX_CHARS[Q>>28&15]+HEX_CHARS[Q>>24&15]+HEX_CHARS[Q>>20&15]+HEX_CHARS[Q>>16&15]+HEX_CHARS[Q>>12&15]+HEX_CHARS[Q>>8&15]+HEX_CHARS[Q>>4&15]+HEX_CHARS[Q&15]+HEX_CHARS[B>>28&15]+HEX_CHARS[B>>24&15]+HEX_CHARS[B>>20&15]+HEX_CHARS[B>>16&15]+HEX_CHARS[B>>12&15]+HEX_CHARS[B>>8&15]+HEX_CHARS[B>>4&15]+HEX_CHARS[B&15]+HEX_CHARS[a>>28&15]+HEX_CHARS[a>>24&15]+HEX_CHARS[a>>20&15]+HEX_CHARS[a>>16&15]+HEX_CHARS[a>>12&15]+HEX_CHARS[a>>8&15]+HEX_CHARS[a>>4&15]+HEX_CHARS[a&15];return this.is224||(r+=HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[e&15]),r},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var g=this.h0,A=this.h1,_=this.h2,I=this.h3,Q=this.h4,B=this.h5,a=this.h6,e=this.h7,r=[g>>24&255,g>>16&255,g>>8&255,g&255,A>>24&255,A>>16&255,A>>8&255,A&255,_>>24&255,_>>16&255,_>>8&255,_&255,I>>24&255,I>>16&255,I>>8&255,I&255,Q>>24&255,Q>>16&255,Q>>8&255,Q&255,B>>24&255,B>>16&255,B>>8&255,B&255,a>>24&255,a>>16&255,a>>8&255,a&255];return this.is224||r.push(e>>24&255,e>>16&255,e>>8&255,e&255),r},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var g=new ArrayBuffer(this.is224?28:32),A=new DataView(g);return A.setUint32(0,this.h0),A.setUint32(4,this.h1),A.setUint32(8,this.h2),A.setUint32(12,this.h3),A.setUint32(16,this.h4),A.setUint32(20,this.h5),A.setUint32(24,this.h6),this.is224||A.setUint32(28,this.h7),g};function HmacSha256(g,A,_){var I,Q=typeof g;if(Q==="string"){var B=[],a=g.length,e=0,r;for(I=0;I<a;++I)r=g.charCodeAt(I),r<128?B[e++]=r:r<2048?(B[e++]=192|r>>6,B[e++]=128|r&63):r<55296||r>=57344?(B[e++]=224|r>>12,B[e++]=128|r>>6&63,B[e++]=128|r&63):(r=65536+((r&1023)<<10|g.charCodeAt(++I)&1023),B[e++]=240|r>>18,B[e++]=128|r>>12&63,B[e++]=128|r>>6&63,B[e++]=128|r&63);g=B}else if(Q==="object"){if(g===null)throw new Error(ERROR);if(ARRAY_BUFFER&&g.constructor===ArrayBuffer)g=new Uint8Array(g);else if(!Array.isArray(g)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(g)))throw new Error(ERROR)}else throw new Error(ERROR);g.length>64&&(g=new Sha256(A,!0).update(g).array());var i=[],E=[];for(I=0;I<64;++I){var l=g[I]||0;i[I]=92^l,E[I]=54^l}Sha256.call(this,A,_),this.update(E),this.oKeyPad=i,this.inner=!0,this.sharedMemory=_}HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var g=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(g),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&define(function(){return exports}))})()});var Jc=Dg((_$,ou)=>{var bd="Input must be an string, Buffer or Uint8Array";function Md(g){let A;if(g instanceof Uint8Array)A=g;else if(typeof g=="string")A=new TextEncoder().encode(g);else throw new Error(bd);return A}function Rd(g){return Array.prototype.map.call(g,function(A){return(A<16?"0":"")+A.toString(16)}).join("")}function rr(g){return(4294967296+g).toString(16).substring(1)}function Kd(g,A,_){let I=`
`+g+" = ";for(let Q=0;Q<A.length;Q+=2){if(_===32)I+=rr(A[Q]).toUpperCase(),I+=" ",I+=rr(A[Q+1]).toUpperCase();else if(_===64)I+=rr(A[Q+1]).toUpperCase(),I+=rr(A[Q]).toUpperCase();else throw new Error("Invalid size "+_);Q%6===4?I+=`
`+new Array(g.length+4).join(" "):Q<A.length-2&&(I+=" ")}console.log(I)}function vd(g,A,_){let I=new Date().getTime(),Q=new Uint8Array(A);for(let a=0;a<A;a++)Q[a]=a%256;let B=new Date().getTime();console.log("Generated random input in "+(B-I)+"ms"),I=B;for(let a=0;a<_;a++){let e=g(Q),r=new Date().getTime(),i=r-I;I=r,console.log("Hashed in "+i+"ms: "+e.substring(0,20)+"..."),console.log(Math.round(A/(1<<20)/(i/1e3)*100)/100+" MB PER SECOND")}}ou.exports={normalizeInput:Md,toHex:Rd,debugPrint:Kd,testSpeed:vd}});var yu=Dg((g$,mu)=>{var Er=Jc();function ir(g,A,_){let I=g[A]+g[_],Q=g[A+1]+g[_+1];I>=4294967296&&Q++,g[A]=I,g[A+1]=Q}function nu(g,A,_,I){let Q=g[A]+_;_<0&&(Q+=4294967296);let B=g[A+1]+I;Q>=4294967296&&B++,g[A]=Q,g[A+1]=B}function su(g,A){return g[A]^g[A+1]<<8^g[A+2]<<16^g[A+3]<<24}function Ft(g,A,_,I,Q,B){let a=Xa[Q],e=Xa[Q+1],r=Xa[B],i=Xa[B+1];ir(UA,g,A),nu(UA,g,a,e);let E=UA[I]^UA[g],l=UA[I+1]^UA[g+1];UA[I]=l,UA[I+1]=E,ir(UA,_,I),E=UA[A]^UA[_],l=UA[A+1]^UA[_+1],UA[A]=E>>>24^l<<8,UA[A+1]=l>>>24^E<<8,ir(UA,g,A),nu(UA,g,r,i),E=UA[I]^UA[g],l=UA[I+1]^UA[g+1],UA[I]=E>>>16^l<<16,UA[I+1]=l>>>16^E<<16,ir(UA,_,I),E=UA[A]^UA[_],l=UA[A+1]^UA[_+1],UA[A]=l>>>31^E<<1,UA[A+1]=E>>>31^l<<1}var lu=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),Ud=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],$g=new Uint8Array(Ud.map(function(g){return g*2})),UA=new Uint32Array(32),Xa=new Uint32Array(32);function Du(g,A){let _=0;for(_=0;_<16;_++)UA[_]=g.h[_],UA[_+16]=lu[_];for(UA[24]=UA[24]^g.t,UA[25]=UA[25]^g.t/4294967296,A&&(UA[28]=~UA[28],UA[29]=~UA[29]),_=0;_<32;_++)Xa[_]=su(g.b,4*_);for(_=0;_<12;_++)Ft(0,8,16,24,$g[_*16+0],$g[_*16+1]),Ft(2,10,18,26,$g[_*16+2],$g[_*16+3]),Ft(4,12,20,28,$g[_*16+4],$g[_*16+5]),Ft(6,14,22,30,$g[_*16+6],$g[_*16+7]),Ft(0,10,20,30,$g[_*16+8],$g[_*16+9]),Ft(2,12,22,24,$g[_*16+10],$g[_*16+11]),Ft(4,14,16,26,$g[_*16+12],$g[_*16+13]),Ft(6,8,18,28,$g[_*16+14],$g[_*16+15]);for(_=0;_<16;_++)g.h[_]=g.h[_]^UA[_]^UA[_+16]}var pt=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function uu(g,A,_,I){if(g===0||g>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(A&&A.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(_&&_.length!==16)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(I&&I.length!==16)throw new Error("Illegal personal, expected Uint8Array with length is 16");let Q={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:g};pt.fill(0),pt[0]=g,A&&(pt[1]=A.length),pt[2]=1,pt[3]=1,_&&pt.set(_,32),I&&pt.set(I,48);for(let B=0;B<16;B++)Q.h[B]=lu[B]^su(pt,B*4);return A&&(Lc(Q,A),Q.c=128),Q}function Lc(g,A){for(let _=0;_<A.length;_++)g.c===128&&(g.t+=g.c,Du(g,!1),g.c=0),g.b[g.c++]=A[_]}function fu(g){for(g.t+=g.c;g.c<128;)g.b[g.c++]=0;Du(g,!0);let A=new Uint8Array(g.outlen);for(let _=0;_<g.outlen;_++)A[_]=g.h[_>>2]>>8*(_&3);return A}function wu(g,A,_,I,Q){_=_||64,g=Er.normalizeInput(g),I&&(I=Er.normalizeInput(I)),Q&&(Q=Er.normalizeInput(Q));let B=uu(_,A,I,Q);return Lc(B,g),fu(B)}function $d(g,A,_,I,Q){let B=wu(g,A,_,I,Q);return Er.toHex(B)}mu.exports={blake2b:wu,blake2bHex:$d,blake2bInit:uu,blake2bUpdate:Lc,blake2bFinal:fu}});var xu=Dg((I$,Gu)=>{var ku=Jc();function Sd(g,A){return g[A]^g[A+1]<<8^g[A+2]<<16^g[A+3]<<24}function dt(g,A,_,I,Q,B){B_[g]=B_[g]+B_[A]+Q,B_[I]=cr(B_[I]^B_[g],16),B_[_]=B_[_]+B_[I],B_[A]=cr(B_[A]^B_[_],12),B_[g]=B_[g]+B_[A]+B,B_[I]=cr(B_[I]^B_[g],8),B_[_]=B_[_]+B_[I],B_[A]=cr(B_[A]^B_[_],7)}function cr(g,A){return g>>>A^g<<32-A}var Fu=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Sg=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),B_=new Uint32Array(16),kg=new Uint32Array(16);function pu(g,A){let _=0;for(_=0;_<8;_++)B_[_]=g.h[_],B_[_+8]=Fu[_];for(B_[12]^=g.t,B_[13]^=g.t/4294967296,A&&(B_[14]=~B_[14]),_=0;_<16;_++)kg[_]=Sd(g.b,4*_);for(_=0;_<10;_++)dt(0,4,8,12,kg[Sg[_*16+0]],kg[Sg[_*16+1]]),dt(1,5,9,13,kg[Sg[_*16+2]],kg[Sg[_*16+3]]),dt(2,6,10,14,kg[Sg[_*16+4]],kg[Sg[_*16+5]]),dt(3,7,11,15,kg[Sg[_*16+6]],kg[Sg[_*16+7]]),dt(0,5,10,15,kg[Sg[_*16+8]],kg[Sg[_*16+9]]),dt(1,6,11,12,kg[Sg[_*16+10]],kg[Sg[_*16+11]]),dt(2,7,8,13,kg[Sg[_*16+12]],kg[Sg[_*16+13]]),dt(3,4,9,14,kg[Sg[_*16+14]],kg[Sg[_*16+15]]);for(_=0;_<8;_++)g.h[_]^=B_[_]^B_[_+8]}function du(g,A){if(!(g>0&&g<=32))throw new Error("Incorrect output length, should be in [1, 32]");let _=A?A.length:0;if(A&&!(_>0&&_<=32))throw new Error("Incorrect key length, should be in [1, 32]");let I={h:new Uint32Array(Fu),b:new Uint8Array(64),c:0,t:0,outlen:g};return I.h[0]^=16842752^_<<8^g,_>0&&(Yc(I,A),I.c=64),I}function Yc(g,A){for(let _=0;_<A.length;_++)g.c===64&&(g.t+=g.c,pu(g,!1),g.c=0),g.b[g.c++]=A[_]}function hu(g){for(g.t+=g.c;g.c<64;)g.b[g.c++]=0;pu(g,!0);let A=new Uint8Array(g.outlen);for(let _=0;_<g.outlen;_++)A[_]=g.h[_>>2]>>8*(_&3)&255;return A}function Nu(g,A,_){_=_||32,g=ku.normalizeInput(g);let I=du(_,A);return Yc(I,g),hu(I)}function qd(g,A,_){let I=Nu(g,A,_);return ku.toHex(I)}Gu.exports={blake2s:Nu,blake2sHex:qd,blake2sInit:du,blake2sUpdate:Yc,blake2sFinal:hu}});var Mu=Dg((Q$,bu)=>{var Ae=yu(),_e=xu();bu.exports={blake2b:Ae.blake2b,blake2bHex:Ae.blake2bHex,blake2bInit:Ae.blake2bInit,blake2bUpdate:Ae.blake2bUpdate,blake2bFinal:Ae.blake2bFinal,blake2s:_e.blake2s,blake2sHex:_e.blake2sHex,blake2sInit:_e.blake2sInit,blake2sUpdate:_e.blake2sUpdate,blake2sFinal:_e.blake2sFinal}});var Ki=Dg((As,Ww)=>{(function(g,A){"use strict";typeof define=="function"&&define.amd?define("stackframe",[],A):typeof As=="object"?Ww.exports=A():g.StackFrame=A()})(As,function(){"use strict";function g(f){return!isNaN(parseFloat(f))&&isFinite(f)}function A(f){return f.charAt(0).toUpperCase()+f.substring(1)}function _(f){return function(){return this[f]}}var I=["isConstructor","isEval","isNative","isToplevel"],Q=["columnNumber","lineNumber"],B=["fileName","functionName","source"],a=["args"],e=["evalOrigin"],r=I.concat(Q,B,a,e);function i(f){if(f)for(var o=0;o<r.length;o++)f[r[o]]!==void 0&&this["set"+A(r[o])](f[r[o]])}i.prototype={getArgs:function(){return this.args},setArgs:function(f){if(Object.prototype.toString.call(f)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=f},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(f){if(f instanceof i)this.evalOrigin=f;else if(f instanceof Object)this.evalOrigin=new i(f);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var f=this.getFileName()||"",o=this.getLineNumber()||"",w=this.getColumnNumber()||"",y=this.getFunctionName()||"";return this.getIsEval()?f?"[eval] ("+f+":"+o+":"+w+")":"[eval]:"+o+":"+w:y?y+" ("+f+":"+o+":"+w+")":f+":"+o+":"+w}},i.fromString=function(o){var w=o.indexOf("("),y=o.lastIndexOf(")"),h=o.substring(0,w),k=o.substring(w+1,y).split(","),c=o.substring(y+1);if(c.indexOf("@")===0)var m=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(c,""),p=m[1],R=m[2],M=m[3];return new i({functionName:h,args:k||void 0,fileName:p,lineNumber:R||void 0,columnNumber:M||void 0})};for(var E=0;E<I.length;E++)i.prototype["get"+A(I[E])]=_(I[E]),i.prototype["set"+A(I[E])]=function(f){return function(o){this[f]=!!o}}(I[E]);for(var l=0;l<Q.length;l++)i.prototype["get"+A(Q[l])]=_(Q[l]),i.prototype["set"+A(Q[l])]=function(f){return function(o){if(!g(o))throw new TypeError(f+" must be a Number");this[f]=Number(o)}}(Q[l]);for(var u=0;u<B.length;u++)i.prototype["get"+A(B[u])]=_(B[u]),i.prototype["set"+A(B[u])]=function(f){return function(o){this[f]=String(o)}}(B[u]);return i})});var Am=Dg((_s,Xw)=>{(function(g,A){"use strict";typeof define=="function"&&define.amd?define("error-stack-parser",["stackframe"],A):typeof _s=="object"?Xw.exports=A(Ki()):g.ErrorStackParser=A(g.StackFrame)})(_s,function(A){"use strict";var _=/(^|@)\S+:\d+/,I=/^\s*at .*(\S+:\d+|\(native\))/m,Q=/^(eval@)?(\[native code])?$/;return{parse:function(a){if(typeof a.stacktrace<"u"||typeof a["opera#sourceloc"]<"u")return this.parseOpera(a);if(a.stack&&a.stack.match(I))return this.parseV8OrIE(a);if(a.stack)return this.parseFFOrSafari(a);throw new Error("Cannot parse given Error object")},extractLocation:function(a){if(a.indexOf(":")===-1)return[a];var e=/(.+?)(?::(\d+))?(?::(\d+))?$/,r=e.exec(a.replace(/[()]/g,""));return[r[1],r[2]||void 0,r[3]||void 0]},parseV8OrIE:function(a){var e=a.stack.split(`
`).filter(function(r){return!!r.match(I)},this);return e.map(function(r){r.indexOf("(eval ")>-1&&(r=r.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var i=r.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),E=i.match(/ (\(.+\)$)/);i=E?i.replace(E[0],""):i;var l=this.extractLocation(E?E[1]:i),u=E&&i||void 0,f=["eval","<anonymous>"].indexOf(l[0])>-1?void 0:l[0];return new A({functionName:u,fileName:f,lineNumber:l[1],columnNumber:l[2],source:r})},this)},parseFFOrSafari:function(a){var e=a.stack.split(`
`).filter(function(r){return!r.match(Q)},this);return e.map(function(r){if(r.indexOf(" > eval")>-1&&(r=r.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),r.indexOf("@")===-1&&r.indexOf(":")===-1)return new A({functionName:r});var i=/((.*".+"[^@]*)?[^@]*)(?:@)/,E=r.match(i),l=E&&E[1]?E[1]:void 0,u=this.extractLocation(r.replace(i,""));return new A({functionName:l,fileName:u[0],lineNumber:u[1],columnNumber:u[2],source:r})},this)},parseOpera:function(a){return!a.stacktrace||a.message.indexOf(`
`)>-1&&a.message.split(`
`).length>a.stacktrace.split(`
`).length?this.parseOpera9(a):a.stack?this.parseOpera11(a):this.parseOpera10(a)},parseOpera9:function(a){for(var e=/Line (\d+).*script (?:in )?(\S+)/i,r=a.message.split(`
`),i=[],E=2,l=r.length;E<l;E+=2){var u=e.exec(r[E]);u&&i.push(new A({fileName:u[2],lineNumber:u[1],source:r[E]}))}return i},parseOpera10:function(a){for(var e=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=a.stacktrace.split(`
`),i=[],E=0,l=r.length;E<l;E+=2){var u=e.exec(r[E]);u&&i.push(new A({functionName:u[3]||void 0,fileName:u[2],lineNumber:u[1],source:r[E]}))}return i},parseOpera11:function(a){var e=a.stack.split(`
`).filter(function(r){return!!r.match(_)&&!r.match(/^Error created at/)},this);return e.map(function(r){var i=r.split("@"),E=this.extractLocation(i.pop()),l=i.shift()||"",u=l.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,f;l.match(/\(([^)]*)\)/)&&(f=l.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var o=f===void 0||f==="[arguments not available]"?void 0:f.split(",");return new A({functionName:u,args:o,fileName:E[0],lineNumber:E[1],columnNumber:E[2],source:r})},this)}}})});var gm=Dg((gs,_m)=>{(function(g,A){"use strict";typeof define=="function"&&define.amd?define("stack-generator",["stackframe"],A):typeof gs=="object"?_m.exports=A(Ki()):g.StackGenerator=A(g.StackFrame)})(gs,function(g){return{backtrace:function(_){var I=[],Q=10;typeof _=="object"&&typeof _.maxStackSize=="number"&&(Q=_.maxStackSize);for(var B=arguments.callee;B&&I.length<Q&&B.arguments;){for(var a=new Array(B.arguments.length),e=0;e<a.length;++e)a[e]=B.arguments[e];/function(?:\s+([\w$]+))+\s*\(/.test(B.toString())?I.push(new g({functionName:RegExp.$1||void 0,args:a})):I.push(new g({args:a}));try{B=B.caller}catch{break}}return I}}})});var Is=Dg(aI=>{function RG(g,A,_){if(A in g)return g[A];if(arguments.length===3)return _;throw new Error('"'+A+'" is a required argument.')}aI.getArg=RG;var Qm=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,KG=/^data:.+\,.+$/;function vi(g){var A=g.match(Qm);return A?{scheme:A[1],auth:A[2],host:A[3],port:A[4],path:A[5]}:null}aI.urlParse=vi;function Se(g){var A="";return g.scheme&&(A+=g.scheme+":"),A+="//",g.auth&&(A+=g.auth+"@"),g.host&&(A+=g.host),g.port&&(A+=":"+g.port),g.path&&(A+=g.path),A}aI.urlGenerate=Se;function tm(g){var A=g,_=vi(g);if(_){if(!_.path)return g;A=_.path}for(var I=aI.isAbsolute(A),Q=A.split(/\/+/),B,a=0,e=Q.length-1;e>=0;e--)B=Q[e],B==="."?Q.splice(e,1):B===".."?a++:a>0&&(B===""?(Q.splice(e+1,a),a=0):(Q.splice(e,2),a--));return A=Q.join("/"),A===""&&(A=I?"/":"."),_?(_.path=A,Se(_)):A}aI.normalize=tm;function vG(g,A){g===""&&(g="."),A===""&&(A=".");var _=vi(A),I=vi(g);if(I&&(g=I.path||"/"),_&&!_.scheme)return I&&(_.scheme=I.scheme),Se(_);if(_||A.match(KG))return A;if(I&&!I.host&&!I.path)return I.host=A,Se(I);var Q=A.charAt(0)==="/"?A:tm(g.replace(/\/+$/,"")+"/"+A);return I?(I.path=Q,Se(I)):Q}aI.join=vG;aI.isAbsolute=function(g){return g.charAt(0)==="/"||!!g.match(Qm)};function UG(g,A){g===""&&(g="."),g=g.replace(/\/$/,"");for(var _=0;A.indexOf(g+"/")!==0;){var I=g.lastIndexOf("/");if(I<0||(g=g.slice(0,I),g.match(/^([^\/]+:\/)?\/*$/)))return A;++_}return Array(_+1).join("../")+A.substr(g.length+1)}aI.relative=UG;var Bm=function(){var g=Object.create(null);return!("__proto__"in g)}();function am(g){return g}function $G(g){return em(g)?"$"+g:g}aI.toSetString=Bm?am:$G;function SG(g){return em(g)?g.slice(1):g}aI.fromSetString=Bm?am:SG;function em(g){if(!g)return!1;var A=g.length;if(A<9||g.charCodeAt(A-1)!==95||g.charCodeAt(A-2)!==95||g.charCodeAt(A-3)!==111||g.charCodeAt(A-4)!==116||g.charCodeAt(A-5)!==111||g.charCodeAt(A-6)!==114||g.charCodeAt(A-7)!==112||g.charCodeAt(A-8)!==95||g.charCodeAt(A-9)!==95)return!1;for(var _=A-10;_>=0;_--)if(g.charCodeAt(_)!==36)return!1;return!0}function qG(g,A,_){var I=g.source-A.source;return I!==0||(I=g.originalLine-A.originalLine,I!==0)||(I=g.originalColumn-A.originalColumn,I!==0||_)||(I=g.generatedColumn-A.generatedColumn,I!==0)||(I=g.generatedLine-A.generatedLine,I!==0)?I:g.name-A.name}aI.compareByOriginalPositions=qG;function JG(g,A,_){var I=g.generatedLine-A.generatedLine;return I!==0||(I=g.generatedColumn-A.generatedColumn,I!==0||_)||(I=g.source-A.source,I!==0)||(I=g.originalLine-A.originalLine,I!==0)||(I=g.originalColumn-A.originalColumn,I!==0)?I:g.name-A.name}aI.compareByGeneratedPositionsDeflated=JG;function Im(g,A){return g===A?0:g>A?1:-1}function LG(g,A){var _=g.generatedLine-A.generatedLine;return _!==0||(_=g.generatedColumn-A.generatedColumn,_!==0)||(_=Im(g.source,A.source),_!==0)||(_=g.originalLine-A.originalLine,_!==0)||(_=g.originalColumn-A.originalColumn,_!==0)?_:Im(g.name,A.name)}aI.compareByGeneratedPositionsInflated=LG});var Cm=Dg(YB=>{YB.GREATEST_LOWER_BOUND=1;YB.LEAST_UPPER_BOUND=2;function Qs(g,A,_,I,Q,B){var a=Math.floor((A-g)/2)+g,e=Q(_,I[a],!0);return e===0?a:e>0?A-a>1?Qs(a,A,_,I,Q,B):B==YB.LEAST_UPPER_BOUND?A<I.length?A:-1:a:a-g>1?Qs(g,a,_,I,Q,B):B==YB.LEAST_UPPER_BOUND?a:g<0?-1:g}YB.search=function(A,_,I,Q){if(_.length===0)return-1;var B=Qs(-1,_.length,A,_,I,Q||YB.GREATEST_LOWER_BOUND);if(B<0)return-1;for(;B-1>=0&&I(_[B],_[B-1],!0)===0;)--B;return B}});var im=Dg(rm=>{var ts=Is(),Bs=Object.prototype.hasOwnProperty;function at(){this._array=[],this._set=Object.create(null)}at.fromArray=function(A,_){for(var I=new at,Q=0,B=A.length;Q<B;Q++)I.add(A[Q],_);return I};at.prototype.size=function(){return Object.getOwnPropertyNames(this._set).length};at.prototype.add=function(A,_){var I=ts.toSetString(A),Q=Bs.call(this._set,I),B=this._array.length;(!Q||_)&&this._array.push(A),Q||(this._set[I]=B)};at.prototype.has=function(A){var _=ts.toSetString(A);return Bs.call(this._set,_)};at.prototype.indexOf=function(A){var _=ts.toSetString(A);if(Bs.call(this._set,_))return this._set[_];throw new Error('"'+A+'" is not in the set.')};at.prototype.at=function(A){if(A>=0&&A<this._array.length)return this._array[A];throw new Error("No element indexed by "+A)};at.prototype.toArray=function(){return this._array.slice()};rm.ArraySet=at});var cm=Dg(as=>{var Em="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");as.encode=function(g){if(0<=g&&g<Em.length)return Em[g];throw new TypeError("Must be between 0 and 63: "+g)};as.decode=function(g){var A=65,_=90,I=97,Q=122,B=48,a=57,e=43,r=47,i=26,E=52;return A<=g&&g<=_?g-A:I<=g&&g<=Q?g-I+i:B<=g&&g<=a?g-B+E:g==e?62:g==r?63:-1}});var Dm=Dg(Cs=>{var om=cm(),es=5,nm=1<<es,sm=nm-1,lm=nm;function YG(g){return g<0?(-g<<1)+1:(g<<1)+0}function HG(g){var A=(g&1)===1,_=g>>1;return A?-_:_}Cs.encode=function(A){var _="",I,Q=YG(A);do I=Q&sm,Q>>>=es,Q>0&&(I|=lm),_+=om.encode(I);while(Q>0);return _};Cs.decode=function(A,_,I){var Q=A.length,B=0,a=0,e,r;do{if(_>=Q)throw new Error("Expected more digits in base 64 VLQ value.");if(r=om.decode(A.charCodeAt(_++)),r===-1)throw new Error("Invalid base64 digit: "+A.charAt(_-1));e=!!(r&lm),r&=sm,B=B+(r<<a),a+=es}while(e);I.value=HG(B),I.rest=_}});var fm=Dg(um=>{function rs(g,A,_){var I=g[A];g[A]=g[_],g[_]=I}function jG(g,A){return Math.round(g+Math.random()*(A-g))}function is(g,A,_,I){if(_<I){var Q=jG(_,I),B=_-1;rs(g,Q,I);for(var a=g[I],e=_;e<I;e++)A(g[e],a)<=0&&(B+=1,rs(g,B,e));rs(g,B+1,e);var r=B+1;is(g,A,_,r-1),is(g,A,r+1,I)}}um.quickSort=function(g,A){is(g,A,0,g.length-1)}});var mm=Dg(Ui=>{var lA=Is(),Es=Cm(),Z0=im().ArraySet,zG=Dm(),qe=fm().quickSort;function b_(g){var A=g;return typeof g=="string"&&(A=JSON.parse(g.replace(/^\)\]\}'/,""))),A.sections!=null?new XI(A):new Lg(A)}b_.fromSourceMap=function(g){return Lg.fromSourceMap(g)};b_.prototype._version=3;b_.prototype.__generatedMappings=null;Object.defineProperty(b_.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});b_.prototype.__originalMappings=null;Object.defineProperty(b_.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});b_.prototype._charIsMappingSeparator=function(A,_){var I=A.charAt(_);return I===";"||I===","};b_.prototype._parseMappings=function(A,_){throw new Error("Subclasses must implement _parseMappings")};b_.GENERATED_ORDER=1;b_.ORIGINAL_ORDER=2;b_.GREATEST_LOWER_BOUND=1;b_.LEAST_UPPER_BOUND=2;b_.prototype.eachMapping=function(A,_,I){var Q=_||null,B=I||b_.GENERATED_ORDER,a;switch(B){case b_.GENERATED_ORDER:a=this._generatedMappings;break;case b_.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var e=this.sourceRoot;a.map(function(r){var i=r.source===null?null:this._sources.at(r.source);return i!=null&&e!=null&&(i=lA.join(e,i)),{source:i,generatedLine:r.generatedLine,generatedColumn:r.generatedColumn,originalLine:r.originalLine,originalColumn:r.originalColumn,name:r.name===null?null:this._names.at(r.name)}},this).forEach(A,Q)};b_.prototype.allGeneratedPositionsFor=function(A){var _=lA.getArg(A,"line"),I={source:lA.getArg(A,"source"),originalLine:_,originalColumn:lA.getArg(A,"column",0)};if(this.sourceRoot!=null&&(I.source=lA.relative(this.sourceRoot,I.source)),!this._sources.has(I.source))return[];I.source=this._sources.indexOf(I.source);var Q=[],B=this._findMapping(I,this._originalMappings,"originalLine","originalColumn",lA.compareByOriginalPositions,Es.LEAST_UPPER_BOUND);if(B>=0){var a=this._originalMappings[B];if(A.column===void 0)for(var e=a.originalLine;a&&a.originalLine===e;)Q.push({line:lA.getArg(a,"generatedLine",null),column:lA.getArg(a,"generatedColumn",null),lastColumn:lA.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++B];else for(var r=a.originalColumn;a&&a.originalLine===_&&a.originalColumn==r;)Q.push({line:lA.getArg(a,"generatedLine",null),column:lA.getArg(a,"generatedColumn",null),lastColumn:lA.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++B]}return Q};Ui.SourceMapConsumer=b_;function Lg(g){var A=g;typeof g=="string"&&(A=JSON.parse(g.replace(/^\)\]\}'/,"")));var _=lA.getArg(A,"version"),I=lA.getArg(A,"sources"),Q=lA.getArg(A,"names",[]),B=lA.getArg(A,"sourceRoot",null),a=lA.getArg(A,"sourcesContent",null),e=lA.getArg(A,"mappings"),r=lA.getArg(A,"file",null);if(_!=this._version)throw new Error("Unsupported version: "+_);I=I.map(String).map(lA.normalize).map(function(i){return B&&lA.isAbsolute(B)&&lA.isAbsolute(i)?lA.relative(B,i):i}),this._names=Z0.fromArray(Q.map(String),!0),this._sources=Z0.fromArray(I,!0),this.sourceRoot=B,this.sourcesContent=a,this._mappings=e,this.file=r}Lg.prototype=Object.create(b_.prototype);Lg.prototype.consumer=b_;Lg.fromSourceMap=function(A){var _=Object.create(Lg.prototype),I=_._names=Z0.fromArray(A._names.toArray(),!0),Q=_._sources=Z0.fromArray(A._sources.toArray(),!0);_.sourceRoot=A._sourceRoot,_.sourcesContent=A._generateSourcesContent(_._sources.toArray(),_.sourceRoot),_.file=A._file;for(var B=A._mappings.toArray().slice(),a=_.__generatedMappings=[],e=_.__originalMappings=[],r=0,i=B.length;r<i;r++){var E=B[r],l=new wm;l.generatedLine=E.generatedLine,l.generatedColumn=E.generatedColumn,E.source&&(l.source=Q.indexOf(E.source),l.originalLine=E.originalLine,l.originalColumn=E.originalColumn,E.name&&(l.name=I.indexOf(E.name)),e.push(l)),a.push(l)}return qe(_.__originalMappings,lA.compareByOriginalPositions),_};Lg.prototype._version=3;Object.defineProperty(Lg.prototype,"sources",{get:function(){return this._sources.toArray().map(function(g){return this.sourceRoot!=null?lA.join(this.sourceRoot,g):g},this)}});function wm(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Lg.prototype._parseMappings=function(A,_){for(var I=1,Q=0,B=0,a=0,e=0,r=0,i=A.length,E=0,l={},u={},f=[],o=[],w,y,h,k,c;E<i;)if(A.charAt(E)===";")I++,E++,Q=0;else if(A.charAt(E)===",")E++;else{for(w=new wm,w.generatedLine=I,k=E;k<i&&!this._charIsMappingSeparator(A,k);k++);if(y=A.slice(E,k),h=l[y],h)E+=y.length;else{for(h=[];E<k;)zG.decode(A,E,u),c=u.value,E=u.rest,h.push(c);if(h.length===2)throw new Error("Found a source, but no line and column");if(h.length===3)throw new Error("Found a source and line, but no column");l[y]=h}w.generatedColumn=Q+h[0],Q=w.generatedColumn,h.length>1&&(w.source=e+h[1],e+=h[1],w.originalLine=B+h[2],B=w.originalLine,w.originalLine+=1,w.originalColumn=a+h[3],a=w.originalColumn,h.length>4&&(w.name=r+h[4],r+=h[4])),o.push(w),typeof w.originalLine=="number"&&f.push(w)}qe(o,lA.compareByGeneratedPositionsDeflated),this.__generatedMappings=o,qe(f,lA.compareByOriginalPositions),this.__originalMappings=f};Lg.prototype._findMapping=function(A,_,I,Q,B,a){if(A[I]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+A[I]);if(A[Q]<0)throw new TypeError("Column must be greater than or equal to 0, got "+A[Q]);return Es.search(A,_,B,a)};Lg.prototype.computeColumnSpans=function(){for(var A=0;A<this._generatedMappings.length;++A){var _=this._generatedMappings[A];if(A+1<this._generatedMappings.length){var I=this._generatedMappings[A+1];if(_.generatedLine===I.generatedLine){_.lastGeneratedColumn=I.generatedColumn-1;continue}}_.lastGeneratedColumn=1/0}};Lg.prototype.originalPositionFor=function(A){var _={generatedLine:lA.getArg(A,"line"),generatedColumn:lA.getArg(A,"column")},I=this._findMapping(_,this._generatedMappings,"generatedLine","generatedColumn",lA.compareByGeneratedPositionsDeflated,lA.getArg(A,"bias",b_.GREATEST_LOWER_BOUND));if(I>=0){var Q=this._generatedMappings[I];if(Q.generatedLine===_.generatedLine){var B=lA.getArg(Q,"source",null);B!==null&&(B=this._sources.at(B),this.sourceRoot!=null&&(B=lA.join(this.sourceRoot,B)));var a=lA.getArg(Q,"name",null);return a!==null&&(a=this._names.at(a)),{source:B,line:lA.getArg(Q,"originalLine",null),column:lA.getArg(Q,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}};Lg.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(A){return A==null}):!1};Lg.prototype.sourceContentFor=function(A,_){if(!this.sourcesContent)return null;if(this.sourceRoot!=null&&(A=lA.relative(this.sourceRoot,A)),this._sources.has(A))return this.sourcesContent[this._sources.indexOf(A)];var I;if(this.sourceRoot!=null&&(I=lA.urlParse(this.sourceRoot))){var Q=A.replace(/^file:\/\//,"");if(I.scheme=="file"&&this._sources.has(Q))return this.sourcesContent[this._sources.indexOf(Q)];if((!I.path||I.path=="/")&&this._sources.has("/"+A))return this.sourcesContent[this._sources.indexOf("/"+A)]}if(_)return null;throw new Error('"'+A+'" is not in the SourceMap.')};Lg.prototype.generatedPositionFor=function(A){var _=lA.getArg(A,"source");if(this.sourceRoot!=null&&(_=lA.relative(this.sourceRoot,_)),!this._sources.has(_))return{line:null,column:null,lastColumn:null};_=this._sources.indexOf(_);var I={source:_,originalLine:lA.getArg(A,"line"),originalColumn:lA.getArg(A,"column")},Q=this._findMapping(I,this._originalMappings,"originalLine","originalColumn",lA.compareByOriginalPositions,lA.getArg(A,"bias",b_.GREATEST_LOWER_BOUND));if(Q>=0){var B=this._originalMappings[Q];if(B.source===I.source)return{line:lA.getArg(B,"generatedLine",null),column:lA.getArg(B,"generatedColumn",null),lastColumn:lA.getArg(B,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Ui.BasicSourceMapConsumer=Lg;function XI(g){var A=g;typeof g=="string"&&(A=JSON.parse(g.replace(/^\)\]\}'/,"")));var _=lA.getArg(A,"version"),I=lA.getArg(A,"sections");if(_!=this._version)throw new Error("Unsupported version: "+_);this._sources=new Z0,this._names=new Z0;var Q={line:-1,column:0};this._sections=I.map(function(B){if(B.url)throw new Error("Support for url field in sections not implemented.");var a=lA.getArg(B,"offset"),e=lA.getArg(a,"line"),r=lA.getArg(a,"column");if(e<Q.line||e===Q.line&&r<Q.column)throw new Error("Section offsets must be ordered and non-overlapping.");return Q=a,{generatedOffset:{generatedLine:e+1,generatedColumn:r+1},consumer:new b_(lA.getArg(B,"map"))}})}XI.prototype=Object.create(b_.prototype);XI.prototype.constructor=b_;XI.prototype._version=3;Object.defineProperty(XI.prototype,"sources",{get:function(){for(var g=[],A=0;A<this._sections.length;A++)for(var _=0;_<this._sections[A].consumer.sources.length;_++)g.push(this._sections[A].consumer.sources[_]);return g}});XI.prototype.originalPositionFor=function(A){var _={generatedLine:lA.getArg(A,"line"),generatedColumn:lA.getArg(A,"column")},I=Es.search(_,this._sections,function(B,a){var e=B.generatedLine-a.generatedOffset.generatedLine;return e||B.generatedColumn-a.generatedOffset.generatedColumn}),Q=this._sections[I];return Q?Q.consumer.originalPositionFor({line:_.generatedLine-(Q.generatedOffset.generatedLine-1),column:_.generatedColumn-(Q.generatedOffset.generatedLine===_.generatedLine?Q.generatedOffset.generatedColumn-1:0),bias:A.bias}):{source:null,line:null,column:null,name:null}};XI.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(A){return A.consumer.hasContentsOfAllSources()})};XI.prototype.sourceContentFor=function(A,_){for(var I=0;I<this._sections.length;I++){var Q=this._sections[I],B=Q.consumer.sourceContentFor(A,!0);if(B)return B}if(_)return null;throw new Error('"'+A+'" is not in the SourceMap.')};XI.prototype.generatedPositionFor=function(A){for(var _=0;_<this._sections.length;_++){var I=this._sections[_];if(I.consumer.sources.indexOf(lA.getArg(A,"source"))!==-1){var Q=I.consumer.generatedPositionFor(A);if(Q){var B={line:Q.line+(I.generatedOffset.generatedLine-1),column:Q.column+(I.generatedOffset.generatedLine===Q.line?I.generatedOffset.generatedColumn-1:0)};return B}}}return{line:null,column:null}};XI.prototype._parseMappings=function(A,_){this.__generatedMappings=[],this.__originalMappings=[];for(var I=0;I<this._sections.length;I++)for(var Q=this._sections[I],B=Q.consumer._generatedMappings,a=0;a<B.length;a++){var e=B[a],r=Q.consumer._sources.at(e.source);Q.consumer.sourceRoot!==null&&(r=lA.join(Q.consumer.sourceRoot,r)),this._sources.add(r),r=this._sources.indexOf(r);var i=Q.consumer._names.at(e.name);this._names.add(i),i=this._names.indexOf(i);var E={source:r,generatedLine:e.generatedLine+(Q.generatedOffset.generatedLine-1),generatedColumn:e.generatedColumn+(Q.generatedOffset.generatedLine===e.generatedLine?Q.generatedOffset.generatedColumn-1:0),originalLine:e.originalLine,originalColumn:e.originalColumn,name:i};this.__generatedMappings.push(E),typeof E.originalLine=="number"&&this.__originalMappings.push(E)}qe(this.__generatedMappings,lA.compareByGeneratedPositionsDeflated),qe(this.__originalMappings,lA.compareByOriginalPositions)};Ui.IndexedSourceMapConsumer=XI});var km=Dg((cs,ym)=>{(function(g,A){"use strict";typeof define=="function"&&define.amd?define("stacktrace-gps",["source-map","stackframe"],A):typeof cs=="object"?ym.exports=A(mm(),Ki()):g.StackTraceGPS=A(g.SourceMap||g.sourceMap,g.StackFrame)})(cs,function(g,A){"use strict";function _(E){return new Promise(function(l,u){var f=new XMLHttpRequest;f.open("get",E),f.onerror=u,f.onreadystatechange=function(){f.readyState===4&&(f.status>=200&&f.status<300||E.substr(0,7)==="file://"&&f.responseText?l(f.responseText):u(new Error("HTTP status: "+f.status+" retrieving "+E)))},f.send()})}function I(E){if(typeof window<"u"&&window.atob)return window.atob(E);throw new Error("You must supply a polyfill for window.atob in this environment")}function Q(E){if(typeof JSON<"u"&&JSON.parse)return JSON.parse(E);throw new Error("You must supply a polyfill for JSON.parse in this environment")}function B(E,l){for(var u=[/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*function\b/,/function\s+([^('"`]*?)\s*\(([^)]*)\)/,/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*(?:eval|new Function)\b/,/\b(?!(?:if|for|switch|while|with|catch)\b)(?:(?:static)\s+)?(\S+)\s*\(.*?\)\s*\{/,/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*\(.*?\)\s*=>/],f=E.split(`
`),o="",w=Math.min(l,20),y=0;y<w;++y){var h=f[l-y-1],k=h.indexOf("//");if(k>=0&&(h=h.substr(0,k)),h){o=h+o;for(var c=u.length,m=0;m<c;m++){var p=u[m].exec(o);if(p&&p[1])return p[1]}}}}function a(){if(typeof Object.defineProperty!="function"||typeof Object.create!="function")throw new Error("Unable to consume source maps in older browsers")}function e(E){if(typeof E!="object")throw new TypeError("Given StackFrame is not an object");if(typeof E.fileName!="string")throw new TypeError("Given file name is not a String");if(typeof E.lineNumber!="number"||E.lineNumber%1!==0||E.lineNumber<1)throw new TypeError("Given line number must be a positive integer");if(typeof E.columnNumber!="number"||E.columnNumber%1!==0||E.columnNumber<0)throw new TypeError("Given column number must be a non-negative integer");return!0}function r(E){for(var l=/\/\/[#@] ?sourceMappingURL=([^\s'"]+)\s*$/mg,u,f;f=l.exec(E);)u=f[1];if(u)return u;throw new Error("sourceMappingURL not found")}function i(E,l,u){return new Promise(function(f,o){var w=l.originalPositionFor({line:E.lineNumber,column:E.columnNumber});if(w.source){var y=l.sourceContentFor(w.source);y&&(u[w.source]=y),f(new A({functionName:w.name||E.functionName,args:E.args,fileName:w.source,lineNumber:w.line,columnNumber:w.column}))}else o(new Error("Could not get original source for given stackframe and source map"))})}return function E(l){if(!(this instanceof E))return new E(l);l=l||{},this.sourceCache=l.sourceCache||{},this.sourceMapConsumerCache=l.sourceMapConsumerCache||{},this.ajax=l.ajax||_,this._atob=l.atob||I,this._get=function(f){return new Promise(function(o,w){var y=f.substr(0,5)==="data:";if(this.sourceCache[f])o(this.sourceCache[f]);else if(l.offline&&!y)w(new Error("Cannot make network requests in offline mode"));else if(y){var h=/^data:application\/json;([\w=:"-]+;)*base64,/,k=f.match(h);if(k){var c=k[0].length,m=f.substr(c),p=this._atob(m);this.sourceCache[f]=p,o(p)}else w(new Error("The encoding of the inline sourcemap is not supported"))}else{var R=this.ajax(f,{method:"get"});this.sourceCache[f]=R,R.then(o,w)}}.bind(this))},this._getSourceMapConsumer=function(f,o){return new Promise(function(w){if(this.sourceMapConsumerCache[f])w(this.sourceMapConsumerCache[f]);else{var y=new Promise(function(h,k){return this._get(f).then(function(c){typeof c=="string"&&(c=Q(c.replace(/^\)\]\}'/,""))),typeof c.sourceRoot>"u"&&(c.sourceRoot=o),h(new g.SourceMapConsumer(c))}).catch(k)}.bind(this));this.sourceMapConsumerCache[f]=y,w(y)}}.bind(this))},this.pinpoint=function(f){return new Promise(function(o,w){this.getMappedLocation(f).then(function(y){function h(){o(y)}this.findFunctionName(y).then(o,h).catch(h)}.bind(this),w)}.bind(this))},this.findFunctionName=function(f){return new Promise(function(o,w){e(f),this._get(f.fileName).then(function(h){var k=f.lineNumber,c=f.columnNumber,m=B(h,k,c);o(m?new A({functionName:m,args:f.args,fileName:f.fileName,lineNumber:k,columnNumber:c}):f)},w).catch(w)}.bind(this))},this.getMappedLocation=function(f){return new Promise(function(o,w){a(),e(f);var y=this.sourceCache,h=f.fileName;this._get(h).then(function(k){var c=r(k),m=c.substr(0,5)==="data:",p=h.substring(0,h.lastIndexOf("/")+1);return c[0]!=="/"&&!m&&!/^https?:\/\/|^\/\//i.test(c)&&(c=p+c),this._getSourceMapConsumer(c,p).then(function(R){return i(f,R,y).then(o).catch(function(){o(f)})})}.bind(this),w).catch(w)}.bind(this))}}})});var pm=Dg((os,Fm)=>{(function(g,A){"use strict";typeof define=="function"&&define.amd?define("stacktrace",["error-stack-parser","stack-generator","stacktrace-gps"],A):typeof os=="object"?Fm.exports=A(Am(),gm(),km()):g.StackTrace=A(g.ErrorStackParser,g.StackGenerator,g.StackTraceGPS)})(os,function(A,_,I){var Q={filter:function(i){return(i.functionName||"").indexOf("StackTrace$$")===-1&&(i.functionName||"").indexOf("ErrorStackParser$$")===-1&&(i.functionName||"").indexOf("StackTraceGPS$$")===-1&&(i.functionName||"").indexOf("StackGenerator$$")===-1},sourceCache:{}},B=function(){try{throw new Error}catch(E){return E}};function a(i,E){var l={};return[i,E].forEach(function(u){for(var f in u)Object.prototype.hasOwnProperty.call(u,f)&&(l[f]=u[f]);return l}),l}function e(i){return i.stack||i["opera#sourceloc"]}function r(i,E){return typeof E=="function"?i.filter(E):i}return{get:function(E){var l=B();return e(l)?this.fromError(l,E):this.generateArtificially(E)},getSync:function(E){E=a(Q,E);var l=B(),u=e(l)?A.parse(l):_.backtrace(E);return r(u,E.filter)},fromError:function(E,l){l=a(Q,l);var u=new I(l);return new Promise(function(f){var o=r(A.parse(E),l.filter);f(Promise.all(o.map(function(w){return new Promise(function(y){function h(){y(w)}u.pinpoint(w).then(y,h).catch(h)})})))}.bind(this))},generateArtificially:function(E){E=a(Q,E);var l=_.backtrace(E);return typeof E.filter=="function"&&(l=l.filter(E.filter)),Promise.resolve(l)},instrument:function(E,l,u,f){if(typeof E!="function")throw new Error("Cannot instrument non-function object");if(typeof E.__stacktraceOriginalFn=="function")return E;var o=function(){try{return this.get().then(l,u).catch(u),E.apply(f||this,arguments)}catch(y){throw e(y)&&this.fromError(y).then(l,u).catch(u),y}}.bind(this);return o.__stacktraceOriginalFn=E,o},deinstrument:function(E){if(typeof E!="function")throw new Error("Cannot de-instrument non-function object");return typeof E.__stacktraceOriginalFn=="function"?E.__stacktraceOriginalFn:E},report:function(E,l,u,f){return new Promise(function(o,w){var y=new XMLHttpRequest;if(y.onerror=w,y.onreadystatechange=function(){y.readyState===4&&(y.status>=200&&y.status<400?o(y.responseText):w(new Error("POST to "+l+" failed with status: "+y.status)))},y.open("post",l),y.setRequestHeader("Content-Type","application/json"),f&&typeof f.headers=="object"){var h=f.headers;for(var k in h)Object.prototype.hasOwnProperty.call(h,k)&&y.setRequestHeader(k,h[k])}var c={stack:E};u!=null&&(c.message=u),y.send(JSON.stringify(c))})}}})});var iE={};cI(iE,{mocks:()=>Gg,poseidonParamsKimchiFp:()=>CE,poseidonParamsLegacyFp:()=>rE,prefixHashes:()=>aE,prefixHashesLegacy:()=>eE,prefixes:()=>kA,protocolVersions:()=>xQ,versionBytes:()=>Cg});var kA={event:"MinaZkappEvent******",events:"MinaZkappEvents*****",sequenceEvents:"MinaZkappSeqEvents**",zkappBodyMainnet:"MainnetZkappBody****",zkappBodyTestnet:"TestnetZkappBody****",accountUpdateCons:"MinaAcctUpdateCons**",accountUpdateNode:"MinaAcctUpdateNode**",account:"MinaAccount*********",zkappAccount:"MinaZkappAccount****",zkappMemo:"MinaZkappMemo*******",signatureMainnet:"MinaSignatureMainnet",signatureTestnet:"CodaSignature*******",zkappUri:"MinaZkappUri********",deriveTokenId:"MinaDeriveTokenId***",sideLoadedVK:"MinaSideLoadedVk****",merkleTree:["MinaMklTree000******","MinaMklTree001******","MinaMklTree002******","MinaMklTree003******","MinaMklTree004******","MinaMklTree005******","MinaMklTree006******","MinaMklTree007******","MinaMklTree008******","MinaMklTree009******","MinaMklTree010******","MinaMklTree011******","MinaMklTree012******","MinaMklTree013******","MinaMklTree014******","MinaMklTree015******","MinaMklTree016******","MinaMklTree017******","MinaMklTree018******","MinaMklTree019******","MinaMklTree020******","MinaMklTree021******","MinaMklTree022******","MinaMklTree023******","MinaMklTree024******","MinaMklTree025******","MinaMklTree026******","MinaMklTree027******","MinaMklTree028******","MinaMklTree029******","MinaMklTree030******","MinaMklTree031******","MinaMklTree032******","MinaMklTree033******","MinaMklTree034******"]},aE={"CodaReceiptUC*******":["2930292359494829300271368860633580634815819151887078160583250237349129726103","15303314845540397914948764201521841781296890621466368017042313538410516382474","8520568699315305732843613022173524514377597839978192694761879649747314556194"],"CodaReceiptZkapp****":["10173709693039436418323173817852473796760618468635274081106091878172355412495","8139892805413950771311540201181177376747817902069998595519899391903936767134","13514876620613630149351219463845257700223634963001020028151406467995275024594"],"Coinbase************":["