globalThis.process={browser:!0,env:{}},function(e,a){if("object"==typeofexports&&"object"==typeofmodule)module.exports=a();elseif("function"==typeofdefine&&define.amd)define([],a);else{varc=a();for(varfinc)("object"==typeofexports?exports:e)[f]=c[f]}}(self,(()=>(()=>{var__webpack_modules__={7736:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.BaseTree=void0,a.BaseTree=class{getcapacity(){return2**this.levels}getlayers(){returnthis._layers.slice()}getzeros(){returnthis._zeros.slice()}getelements(){returnthis._layers[0].slice()}getroot(){vare;returnnull!==(e=this._layers[this.levels][0])&&void0!==e?e:this._zeros[this.levels]}staticindexOf(e,a,c,f){returnf?e.findIndex((e=>f(a,e))):e.indexOf(a,c)}insert(e){if(this._layers[0].length>=this.capacity)thrownewError("Tree is full");this.update(this._layers[0].length,e)}bulkInsert(e){if(e.length){if(this._layers[0].length+e.length>this.capacity)thrownewError("Tree is full");for(leta=0;a<e.length-1;a++){this._layers[0].push(e[a]);letc=0,f=this._layers[0].length-1;for(;f%2==1;){c++,f>>=1;conste=this._layers[c-1][2*f],a=this._layers[c-1][2*f+1];this._layers[c][f]=this._hashFn(e,a)}}this.insert(e[e.length-1])}}update(e,a){if(isNaN(Number(e))||e<0||e>this._layers[0].length||e>=this.capacity)thrownewError("Insert index out of bounds: "+e);this._layers[0][e]=a,this._processUpdate(e)}path(e){if(isNaN(Number(e))||e<0||e>=this._layers[0].length)thrownewError("Index out of bounds: "+e);leta=+e;constc=[],f=[],d=[];for(lete=0;e<this.levels;e++){f[e]=a%2;constb=1^a;b<this._layers[e].length?(c[e]=this._layers[e][b],d[e]=b):(c[e]=this._zeros[e],d[e]=0),a>>=1}return{pathElements:c,pathIndices:f,pathPositions:d,pathRoot:this.root}}_buildZeros(){this._zeros=[this.zeroElement];for(lete=1;e<=this.levels;e++)this._zeros[e]=this._hashFn(this._zeros[e-1],this._zeros[e-1])}_processNodes(e,a){constc=e.length;letf=Math.ceil(c/2);constd=newArray(f);f--;constb=c-(c%2^1);lett=0;for(leti=b;i>=0&&void0!==e[i-1];i-=2){constr=e[i-1],n=i===b&&c%2==1?this._zeros[a-1]:e[i];d[f-t]=this._hashFn(r,n),t++}returnd}_processUpdate(e){for(leta=1;a<=this.levels;a++){e>>=1;constc=this._layers[a-1][2*e],f=2*e+1<this._layers[a-1].length?this._layers[a-1][2*e+1]:this._zeros[a-1];this._layers[a][e]=this._hashFn(c,f)}}}},9093:function(e,a,c){"use strict";varf=this&&this.__importDefault||function(e){returne&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});constd=f(c(5319)),b=c(7736);classtextendsb.BaseTree{constructor(e,a=[],{hashFunction:c=d.default,zeroElement:f=0}={}){if(super(),this.levels=e,a.length>this.capacity)thrownewError("Tree is full");this._hashFn=c,this.zeroElement=f,this._layers=[];constb=a.slice();this._layers=[b],this._buildZeros(),this._buildHashes()}_buildHashes(){for(lete=1;e<=this.levels;e++){consta=this._layers[e-1];this._layers[e]=this._processNodes(a,e)}}bulkInsert(e){if(e.length){if(this._layers[0].length+e.length>this.capacity)thrownewError("Tree is full");for(leta=0;a<e.length-1;a++){this._layers[0].push(e[a]);letc=0,f=this._layers[0].length-1;for(;f%2==1;)c++,f>>=1,this._layers[c][f]=this._hashFn(this._layers[c-1][2*f],this._layers[c-1][2*f+1])}this.insert(e[e.length-1])}}indexOf(e,a){returnb.BaseTree.indexOf(this._layers[0],e,0,a)}proof(e){consta=this.indexOf(e);returnthis.path(a)}getTreeEdge(e){consta=this._layers[0][e];if(void0===a)thrownewError("Element not found");return{edgePath:this.path(e),edgeElement:a,edgeIndex:e,edgeElementsCount:this._layers[0].length}}getTreeSlices(e=4){consta=this._layers[0].length;letc=Math.ceil(a/e);c%2&&c++;constf=[];for(lete=0;e<a;e+=c){consta=e,d=e+c;f.push({edge:this.getTreeEdge(a),elements:this.elements.slice(a,d)})}returnf}serialize(){return{levels:this.levels,_zeros:this._zeros,_layers:this._layers}}staticdeserialize(e,a){constc=Object.assign(Object.create(this.prototype),e);returnc._hashFn=a||d.default,c.zeroElement=c._zeros[0],c}toString(){returnJSON.stringify(this.serialize())}}a.default=t},1230:function(e,a,c){"use strict";var