@zama-fhe/relayer-sdk 0.3.0-5 → 0.3.0-7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/relayer-sdk-js.js +2 -2
- package/bundle/relayer-sdk-js.umd.cjs +1 -1
- package/lib/node.cjs +2 -2
- package/lib/node.js +2 -2
- package/lib/web.js +2 -2
- package/package.json +1 -1
package/bundle/relayer-sdk-js.js
CHANGED
|
@@ -32416,7 +32416,7 @@ function NA(n) {
|
|
|
32416
32416
|
//euint64
|
|
32417
32417
|
case 6:
|
|
32418
32418
|
//euint128
|
|
32419
|
-
case
|
|
32419
|
+
case 8: {
|
|
32420
32420
|
r.push(f);
|
|
32421
32421
|
break;
|
|
32422
32422
|
}
|
|
@@ -32605,7 +32605,7 @@ const WA = {
|
|
|
32605
32605
|
throw new Error("No network has been provided!");
|
|
32606
32606
|
const l = await fA(_, n), f = await lA(n), g = await hA(n), y = await pA(_, n), v = await dA(_, n), F = await wA(_, n), k = await gA(_, n);
|
|
32607
32607
|
return {
|
|
32608
|
-
createEncryptedInput: OA(o, e, l, a, Us(n.relayerUrl), f.publicKey, g, F, k),
|
|
32608
|
+
createEncryptedInput: OA(o, e, l, a, Us(n.relayerUrl), f.publicKey, g, F, k, u && { auth: u }),
|
|
32609
32609
|
generateKeypair: GA,
|
|
32610
32610
|
createEIP712: jA(t, l),
|
|
32611
32611
|
publicDecrypt: MA(y, v, a, t, o, Us(n.relayerUrl), _, u && { auth: u }),
|
|
@@ -19,6 +19,6 @@
|
|
|
19
19
|
`)+" "+W.join(`,
|
|
20
20
|
`)+" "+nt[1]:nt[0]+Z+" "+W.join(", ")+" "+nt[1]}n.types=u2();function T(W){return Array.isArray(W)}n.isArray=T;function E(W){return typeof W=="boolean"}n.isBoolean=E;function R(W){return W===null}n.isNull=R;function B(W){return W==null}n.isNullOrUndefined=B;function z(W){return typeof W=="number"}n.isNumber=z;function O(W){return typeof W=="string"}n.isString=O;function C(W){return typeof W=="symbol"}n.isSymbol=C;function N(W){return W===void 0}n.isUndefined=N;function D(W){return $(W)&&wt(W)==="[object RegExp]"}n.isRegExp=D,n.types.isRegExp=D;function $(W){return typeof W=="object"&&W!==null}n.isObject=$;function et(W){return $(W)&&wt(W)==="[object Date]"}n.isDate=et,n.types.isDate=et;function ft(W){return $(W)&&(wt(W)==="[object Error]"||W instanceof Error)}n.isError=ft,n.types.isNativeError=ft;function L(W){return typeof W=="function"}n.isFunction=L;function vt(W){return W===null||typeof W=="boolean"||typeof W=="number"||typeof W=="string"||typeof W=="symbol"||typeof W>"u"}n.isPrimitive=vt,n.isBuffer=_2();function wt(W){return Object.prototype.toString.call(W)}function at(W){return W<10?"0"+W.toString(10):W.toString(10)}var pt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function mt(){var W=new Date,Z=[at(W.getHours()),at(W.getMinutes()),at(W.getSeconds())].join(":");return[W.getDate(),pt[W.getMonth()],Z].join(" ")}n.log=function(){console.log("%s - %s",mt(),n.format.apply(n,arguments))},n.inherits=ds(),n._extend=function(W,Z){if(!Z||!$(Z))return W;for(var nt=Object.keys(Z),yt=nt.length;yt--;)W[nt[yt]]=Z[nt[yt]];return W};function Rt(W,Z){return Object.prototype.hasOwnProperty.call(W,Z)}var xt=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;n.promisify=function(Z){if(typeof Z!="function")throw new TypeError('The "original" argument must be of type Function');if(xt&&Z[xt]){var nt=Z[xt];if(typeof nt!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(nt,xt,{value:nt,enumerable:!1,writable:!1,configurable:!0}),nt}function nt(){for(var yt,H,M=new Promise(function(_t,x){yt=_t,H=x}),X=[],ct=0;ct<arguments.length;ct++)X.push(arguments[ct]);X.push(function(_t,x){_t?H(_t):yt(x)});try{Z.apply(this,X)}catch(_t){H(_t)}return M}return Object.setPrototypeOf(nt,Object.getPrototypeOf(Z)),xt&&Object.defineProperty(nt,xt,{value:nt,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(nt,t(Z))},n.promisify.custom=xt;function Pt(W,Z){if(!W){var nt=new Error("Promise was rejected with a falsy value");nt.reason=W,W=nt}return Z(W)}function jt(W){if(typeof W!="function")throw new TypeError('The "original" argument must be of type Function');function Z(){for(var nt=[],yt=0;yt<arguments.length;yt++)nt.push(arguments[yt]);var H=nt.pop();if(typeof H!="function")throw new TypeError("The last argument must be of type Function");var M=this,X=function(){return H.apply(M,arguments)};W.apply(this,nt).then(function(ct){Ct.nextTick(X.bind(null,null,ct))},function(ct){Ct.nextTick(Pt.bind(null,ct,X))})}return Object.setPrototypeOf(Z,Object.getPrototypeOf(W)),Object.defineProperties(Z,t(W)),Z}n.callbackify=jt}(mc)),mc}var Eu,Yp;function f2(){if(Yp)return Eu;Yp=1;function n(I,k){var T=Object.keys(I);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(I);k&&(E=E.filter(function(R){return Object.getOwnPropertyDescriptor(I,R).enumerable})),T.push.apply(T,E)}return T}function t(I){for(var k=1;k<arguments.length;k++){var T=arguments[k]!=null?arguments[k]:{};k%2?n(Object(T),!0).forEach(function(E){e(I,E,T[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(I,Object.getOwnPropertyDescriptors(T)):n(Object(T)).forEach(function(E){Object.defineProperty(I,E,Object.getOwnPropertyDescriptor(T,E))})}return I}function e(I,k,T){return k=a(k),k in I?Object.defineProperty(I,k,{value:T,enumerable:!0,configurable:!0,writable:!0}):I[k]=T,I}function r(I,k){if(!(I instanceof k))throw new TypeError("Cannot call a class as a function")}function i(I,k){for(var T=0;T<k.length;T++){var E=k[T];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(I,a(E.key),E)}}function o(I,k,T){return k&&i(I.prototype,k),Object.defineProperty(I,"prototype",{writable:!1}),I}function a(I){var k=u(I,"string");return typeof k=="symbol"?k:String(k)}function u(I,k){if(typeof I!="object"||I===null)return I;var T=I[Symbol.toPrimitive];if(T!==void 0){var E=T.call(I,k);if(typeof E!="object")return E;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(I)}var _=Wo(),l=_.Buffer,f=$p(),g=f.inspect,y=g&&g.custom||"inspect";function v(I,k,T){l.prototype.copy.call(I,k,T)}return Eu=function(){function I(){r(this,I),this.head=null,this.tail=null,this.length=0}return o(I,[{key:"push",value:function(T){var E={data:T,next:null};this.length>0?this.tail.next=E:this.head=E,this.tail=E,++this.length}},{key:"unshift",value:function(T){var E={data:T,next:this.head};this.length===0&&(this.tail=E),this.head=E,++this.length}},{key:"shift",value:function(){if(this.length!==0){var T=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,T}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(T){if(this.length===0)return"";for(var E=this.head,R=""+E.data;E=E.next;)R+=T+E.data;return R}},{key:"concat",value:function(T){if(this.length===0)return l.alloc(0);for(var E=l.allocUnsafe(T>>>0),R=this.head,B=0;R;)v(R.data,E,B),B+=R.data.length,R=R.next;return E}},{key:"consume",value:function(T,E){var R;return T<this.head.data.length?(R=this.head.data.slice(0,T),this.head.data=this.head.data.slice(T)):T===this.head.data.length?R=this.shift():R=E?this._getString(T):this._getBuffer(T),R}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(T){var E=this.head,R=1,B=E.data;for(T-=B.length;E=E.next;){var z=E.data,O=T>z.length?z.length:T;if(O===z.length?B+=z:B+=z.slice(0,T),T-=O,T===0){O===z.length?(++R,E.next?this.head=E.next:this.head=this.tail=null):(this.head=E,E.data=z.slice(O));break}++R}return this.length-=R,B}},{key:"_getBuffer",value:function(T){var E=l.allocUnsafe(T),R=this.head,B=1;for(R.data.copy(E),T-=R.data.length;R=R.next;){var z=R.data,O=T>z.length?z.length:T;if(z.copy(E,E.length-T,0,O),T-=O,T===0){O===z.length?(++B,R.next?this.head=R.next:this.head=this.tail=null):(this.head=R,R.data=z.slice(O));break}++B}return this.length-=B,E}},{key:y,value:function(T,E){return g(this,t(t({},E),{},{depth:0,customInspect:!1}))}}]),I}(),Eu}var vu,Zp;function Xp(){if(Zp)return vu;Zp=1;function n(a,u){var _=this,l=this._readableState&&this._readableState.destroyed,f=this._writableState&&this._writableState.destroyed;return l||f?(u?u(a):a&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Ct.nextTick(i,this,a)):Ct.nextTick(i,this,a)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(g){!u&&g?_._writableState?_._writableState.errorEmitted?Ct.nextTick(e,_):(_._writableState.errorEmitted=!0,Ct.nextTick(t,_,g)):Ct.nextTick(t,_,g):u?(Ct.nextTick(e,_),u(g)):Ct.nextTick(e,_)}),this)}function t(a,u){i(a,u),e(a)}function e(a){a._writableState&&!a._writableState.emitClose||a._readableState&&!a._readableState.emitClose||a.emit("close")}function r(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function i(a,u){a.emit("error",u)}function o(a,u){var _=a._readableState,l=a._writableState;_&&_.autoDestroy||l&&l.autoDestroy?a.destroy(u):a.emit("error",u)}return vu={destroy:n,undestroy:r,errorOrDestroy:o},vu}var xu={},td;function ws(){if(td)return xu;td=1;function n(u,_){u.prototype=Object.create(_.prototype),u.prototype.constructor=u,u.__proto__=_}var t={};function e(u,_,l){l||(l=Error);function f(y,v,I){return typeof _=="string"?_:_(y,v,I)}var g=function(y){n(v,y);function v(I,k,T){return y.call(this,f(I,k,T))||this}return v}(l);g.prototype.name=l.name,g.prototype.code=u,t[u]=g}function r(u,_){if(Array.isArray(u)){var l=u.length;return u=u.map(function(f){return String(f)}),l>2?"one of ".concat(_," ").concat(u.slice(0,l-1).join(", "),", or ")+u[l-1]:l===2?"one of ".concat(_," ").concat(u[0]," or ").concat(u[1]):"of ".concat(_," ").concat(u[0])}else return"of ".concat(_," ").concat(String(u))}function i(u,_,l){return u.substr(0,_.length)===_}function o(u,_,l){return(l===void 0||l>u.length)&&(l=u.length),u.substring(l-_.length,l)===_}function a(u,_,l){return typeof l!="number"&&(l=0),l+_.length>u.length?!1:u.indexOf(_,l)!==-1}return e("ERR_INVALID_OPT_VALUE",function(u,_){return'The value "'+_+'" is invalid for option "'+u+'"'},TypeError),e("ERR_INVALID_ARG_TYPE",function(u,_,l){var f;typeof _=="string"&&i(_,"not ")?(f="must not be",_=_.replace(/^not /,"")):f="must be";var g;if(o(u," argument"))g="The ".concat(u," ").concat(f," ").concat(r(_,"type"));else{var y=a(u,".")?"property":"argument";g='The "'.concat(u,'" ').concat(y," ").concat(f," ").concat(r(_,"type"))}return g+=". Received type ".concat(typeof l),g},TypeError),e("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),e("ERR_METHOD_NOT_IMPLEMENTED",function(u){return"The "+u+" method is not implemented"}),e("ERR_STREAM_PREMATURE_CLOSE","Premature close"),e("ERR_STREAM_DESTROYED",function(u){return"Cannot call "+u+" after a stream was destroyed"}),e("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),e("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),e("ERR_STREAM_WRITE_AFTER_END","write after end"),e("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),e("ERR_UNKNOWN_ENCODING",function(u){return"Unknown encoding: "+u},TypeError),e("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),xu.codes=t,xu}var Ru,ed;function rd(){if(ed)return Ru;ed=1;var n=ws().codes.ERR_INVALID_OPT_VALUE;function t(r,i,o){return r.highWaterMark!=null?r.highWaterMark:i?r[o]:null}function e(r,i,o,a){var u=t(i,a,o);if(u!=null){if(!(isFinite(u)&&Math.floor(u)===u)||u<0){var _=a?o:"highWaterMark";throw new n(_,u)}return Math.floor(u)}return r.objectMode?16:16*1024}return Ru={getHighWaterMark:e},Ru}var Su,nd;function l2(){if(nd)return Su;nd=1,Su=n;function n(e,r){if(t("noDeprecation"))return e;var i=!1;function o(){if(!i){if(t("throwDeprecation"))throw new Error(r);t("traceDeprecation")?console.trace(r):console.warn(r),i=!0}return e.apply(this,arguments)}return o}function t(e){try{if(!hi.localStorage)return!1}catch{return!1}var r=hi.localStorage[e];return r==null?!1:String(r).toLowerCase()==="true"}return Su}var zu,id;function sd(){if(id)return zu;id=1,zu=D;function n(H){var M=this;this.next=null,this.entry=null,this.finish=function(){yt(M,H)}}var t;D.WritableState=C;var e={deprecate:l2()},r=Uh(),i=Wo().Buffer,o=(typeof hi<"u"?hi:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(H){return i.from(H)}function u(H){return i.isBuffer(H)||H instanceof o}var _=Xp(),l=rd(),f=l.getHighWaterMark,g=ws().codes,y=g.ERR_INVALID_ARG_TYPE,v=g.ERR_METHOD_NOT_IMPLEMENTED,I=g.ERR_MULTIPLE_CALLBACK,k=g.ERR_STREAM_CANNOT_PIPE,T=g.ERR_STREAM_DESTROYED,E=g.ERR_STREAM_NULL_VALUES,R=g.ERR_STREAM_WRITE_AFTER_END,B=g.ERR_UNKNOWN_ENCODING,z=_.errorOrDestroy;ds()(D,r);function O(){}function C(H,M,X){t=t||gs(),H=H||{},typeof X!="boolean"&&(X=M instanceof t),this.objectMode=!!H.objectMode,X&&(this.objectMode=this.objectMode||!!H.writableObjectMode),this.highWaterMark=f(this,H,"writableHighWaterMark",X),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var ct=H.decodeStrings===!1;this.decodeStrings=!ct,this.defaultEncoding=H.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(_t){pt(M,_t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=H.emitClose!==!1,this.autoDestroy=!!H.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}C.prototype.getBuffer=function(){for(var M=this.bufferedRequest,X=[];M;)X.push(M),M=M.next;return X},function(){try{Object.defineProperty(C.prototype,"buffer",{get:e.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var N;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(N=Function.prototype[Symbol.hasInstance],Object.defineProperty(D,Symbol.hasInstance,{value:function(M){return N.call(this,M)?!0:this!==D?!1:M&&M._writableState instanceof C}})):N=function(M){return M instanceof this};function D(H){t=t||gs();var M=this instanceof t;if(!M&&!N.call(D,this))return new D(H);this._writableState=new C(H,this,M),this.writable=!0,H&&(typeof H.write=="function"&&(this._write=H.write),typeof H.writev=="function"&&(this._writev=H.writev),typeof H.destroy=="function"&&(this._destroy=H.destroy),typeof H.final=="function"&&(this._final=H.final)),r.call(this)}D.prototype.pipe=function(){z(this,new k)};function $(H,M){var X=new R;z(H,X),Ct.nextTick(M,X)}function et(H,M,X,ct){var _t;return X===null?_t=new E:typeof X!="string"&&!M.objectMode&&(_t=new y("chunk",["string","Buffer"],X)),_t?(z(H,_t),Ct.nextTick(ct,_t),!1):!0}D.prototype.write=function(H,M,X){var ct=this._writableState,_t=!1,x=!ct.objectMode&&u(H);return x&&!i.isBuffer(H)&&(H=a(H)),typeof M=="function"&&(X=M,M=null),x?M="buffer":M||(M=ct.defaultEncoding),typeof X!="function"&&(X=O),ct.ending?$(this,X):(x||et(this,ct,H,X))&&(ct.pendingcb++,_t=L(this,ct,x,H,M,X)),_t},D.prototype.cork=function(){this._writableState.corked++},D.prototype.uncork=function(){var H=this._writableState;H.corked&&(H.corked--,!H.writing&&!H.corked&&!H.bufferProcessing&&H.bufferedRequest&&xt(this,H))},D.prototype.setDefaultEncoding=function(M){if(typeof M=="string"&&(M=M.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((M+"").toLowerCase())>-1))throw new B(M);return this._writableState.defaultEncoding=M,this},Object.defineProperty(D.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function ft(H,M,X){return!H.objectMode&&H.decodeStrings!==!1&&typeof M=="string"&&(M=i.from(M,X)),M}Object.defineProperty(D.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function L(H,M,X,ct,_t,x){if(!X){var S=ft(M,ct,_t);ct!==S&&(X=!0,_t="buffer",ct=S)}var rt=M.objectMode?1:ct.length;M.length+=rt;var lt=M.length<M.highWaterMark;if(lt||(M.needDrain=!0),M.writing||M.corked){var Bt=M.lastBufferedRequest;M.lastBufferedRequest={chunk:ct,encoding:_t,isBuf:X,callback:x,next:null},Bt?Bt.next=M.lastBufferedRequest:M.bufferedRequest=M.lastBufferedRequest,M.bufferedRequestCount+=1}else vt(H,M,!1,rt,ct,_t,x);return lt}function vt(H,M,X,ct,_t,x,S){M.writelen=ct,M.writecb=S,M.writing=!0,M.sync=!0,M.destroyed?M.onwrite(new T("write")):X?H._writev(_t,M.onwrite):H._write(_t,x,M.onwrite),M.sync=!1}function wt(H,M,X,ct,_t){--M.pendingcb,X?(Ct.nextTick(_t,ct),Ct.nextTick(Z,H,M),H._writableState.errorEmitted=!0,z(H,ct)):(_t(ct),H._writableState.errorEmitted=!0,z(H,ct),Z(H,M))}function at(H){H.writing=!1,H.writecb=null,H.length-=H.writelen,H.writelen=0}function pt(H,M){var X=H._writableState,ct=X.sync,_t=X.writecb;if(typeof _t!="function")throw new I;if(at(X),M)wt(H,X,ct,M,_t);else{var x=Pt(X)||H.destroyed;!x&&!X.corked&&!X.bufferProcessing&&X.bufferedRequest&&xt(H,X),ct?Ct.nextTick(mt,H,X,x,_t):mt(H,X,x,_t)}}function mt(H,M,X,ct){X||Rt(H,M),M.pendingcb--,ct(),Z(H,M)}function Rt(H,M){M.length===0&&M.needDrain&&(M.needDrain=!1,H.emit("drain"))}function xt(H,M){M.bufferProcessing=!0;var X=M.bufferedRequest;if(H._writev&&X&&X.next){var ct=M.bufferedRequestCount,_t=new Array(ct),x=M.corkedRequestsFree;x.entry=X;for(var S=0,rt=!0;X;)_t[S]=X,X.isBuf||(rt=!1),X=X.next,S+=1;_t.allBuffers=rt,vt(H,M,!0,M.length,_t,"",x.finish),M.pendingcb++,M.lastBufferedRequest=null,x.next?(M.corkedRequestsFree=x.next,x.next=null):M.corkedRequestsFree=new n(M),M.bufferedRequestCount=0}else{for(;X;){var lt=X.chunk,Bt=X.encoding,bt=X.callback,kt=M.objectMode?1:lt.length;if(vt(H,M,!1,kt,lt,Bt,bt),X=X.next,M.bufferedRequestCount--,M.writing)break}X===null&&(M.lastBufferedRequest=null)}M.bufferedRequest=X,M.bufferProcessing=!1}D.prototype._write=function(H,M,X){X(new v("_write()"))},D.prototype._writev=null,D.prototype.end=function(H,M,X){var ct=this._writableState;return typeof H=="function"?(X=H,H=null,M=null):typeof M=="function"&&(X=M,M=null),H!=null&&this.write(H,M),ct.corked&&(ct.corked=1,this.uncork()),ct.ending||nt(this,ct,X),this},Object.defineProperty(D.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Pt(H){return H.ending&&H.length===0&&H.bufferedRequest===null&&!H.finished&&!H.writing}function jt(H,M){H._final(function(X){M.pendingcb--,X&&z(H,X),M.prefinished=!0,H.emit("prefinish"),Z(H,M)})}function W(H,M){!M.prefinished&&!M.finalCalled&&(typeof H._final=="function"&&!M.destroyed?(M.pendingcb++,M.finalCalled=!0,Ct.nextTick(jt,H,M)):(M.prefinished=!0,H.emit("prefinish")))}function Z(H,M){var X=Pt(M);if(X&&(W(H,M),M.pendingcb===0&&(M.finished=!0,H.emit("finish"),M.autoDestroy))){var ct=H._readableState;(!ct||ct.autoDestroy&&ct.endEmitted)&&H.destroy()}return X}function nt(H,M,X){M.ending=!0,Z(H,M),X&&(M.finished?Ct.nextTick(X):H.once("finish",X)),M.ended=!0,H.writable=!1}function yt(H,M,X){var ct=H.entry;for(H.entry=null;ct;){var _t=ct.callback;M.pendingcb--,_t(X),ct=ct.next}M.corkedRequestsFree.next=H}return Object.defineProperty(D.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(M){this._writableState&&(this._writableState.destroyed=M)}}),D.prototype.destroy=_.destroy,D.prototype._undestroy=_.undestroy,D.prototype._destroy=function(H,M){M(H)},zu}var Bu,od;function gs(){if(od)return Bu;od=1;var n=Object.keys||function(l){var f=[];for(var g in l)f.push(g);return f};Bu=a;var t=pd(),e=sd();ds()(a,t);for(var r=n(e.prototype),i=0;i<r.length;i++){var o=r[i];a.prototype[o]||(a.prototype[o]=e.prototype[o])}function a(l){if(!(this instanceof a))return new a(l);t.call(this,l),e.call(this,l),this.allowHalfOpen=!0,l&&(l.readable===!1&&(this.readable=!1),l.writable===!1&&(this.writable=!1),l.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",u)))}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function u(){this._writableState.ended||Ct.nextTick(_,this)}function _(l){l.end()}return Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(f){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=f,this._writableState.destroyed=f)}}),Bu}var ku={},Zo={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ad;function h2(){return ad||(ad=1,function(n,t){var e=Wo(),r=e.Buffer;function i(a,u){for(var _ in a)u[_]=a[_]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?n.exports=e:(i(e,t),t.Buffer=o);function o(a,u,_){return r(a,u,_)}o.prototype=Object.create(r.prototype),i(r,o),o.from=function(a,u,_){if(typeof a=="number")throw new TypeError("Argument must not be a number");return r(a,u,_)},o.alloc=function(a,u,_){if(typeof a!="number")throw new TypeError("Argument must be a number");var l=r(a);return u!==void 0?typeof _=="string"?l.fill(u,_):l.fill(u):l.fill(0),l},o.allocUnsafe=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return r(a)},o.allocUnsafeSlow=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return e.SlowBuffer(a)}}(Zo,Zo.exports)),Zo.exports}var cd;function ud(){if(cd)return ku;cd=1;var n=h2().Buffer,t=n.isEncoding||function(E){switch(E=""+E,E&&E.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function e(E){if(!E)return"utf8";for(var R;;)switch(E){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return E;default:if(R)return;E=(""+E).toLowerCase(),R=!0}}function r(E){var R=e(E);if(typeof R!="string"&&(n.isEncoding===t||!t(E)))throw new Error("Unknown encoding: "+E);return R||E}ku.StringDecoder=i;function i(E){this.encoding=r(E);var R;switch(this.encoding){case"utf16le":this.text=g,this.end=y,R=4;break;case"utf8":this.fillLast=_,R=4;break;case"base64":this.text=v,this.end=I,R=3;break;default:this.write=k,this.end=T;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(R)}i.prototype.write=function(E){if(E.length===0)return"";var R,B;if(this.lastNeed){if(R=this.fillLast(E),R===void 0)return"";B=this.lastNeed,this.lastNeed=0}else B=0;return B<E.length?R?R+this.text(E,B):this.text(E,B):R||""},i.prototype.end=f,i.prototype.text=l,i.prototype.fillLast=function(E){if(this.lastNeed<=E.length)return E.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);E.copy(this.lastChar,this.lastTotal-this.lastNeed,0,E.length),this.lastNeed-=E.length};function o(E){return E<=127?0:E>>5===6?2:E>>4===14?3:E>>3===30?4:E>>6===2?-1:-2}function a(E,R,B){var z=R.length-1;if(z<B)return 0;var O=o(R[z]);return O>=0?(O>0&&(E.lastNeed=O-1),O):--z<B||O===-2?0:(O=o(R[z]),O>=0?(O>0&&(E.lastNeed=O-2),O):--z<B||O===-2?0:(O=o(R[z]),O>=0?(O>0&&(O===2?O=0:E.lastNeed=O-3),O):0))}function u(E,R,B){if((R[0]&192)!==128)return E.lastNeed=0,"�";if(E.lastNeed>1&&R.length>1){if((R[1]&192)!==128)return E.lastNeed=1,"�";if(E.lastNeed>2&&R.length>2&&(R[2]&192)!==128)return E.lastNeed=2,"�"}}function _(E){var R=this.lastTotal-this.lastNeed,B=u(this,E);if(B!==void 0)return B;if(this.lastNeed<=E.length)return E.copy(this.lastChar,R,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);E.copy(this.lastChar,R,0,E.length),this.lastNeed-=E.length}function l(E,R){var B=a(this,E,R);if(!this.lastNeed)return E.toString("utf8",R);this.lastTotal=B;var z=E.length-(B-this.lastNeed);return E.copy(this.lastChar,0,z),E.toString("utf8",R,z)}function f(E){var R=E&&E.length?this.write(E):"";return this.lastNeed?R+"�":R}function g(E,R){if((E.length-R)%2===0){var B=E.toString("utf16le",R);if(B){var z=B.charCodeAt(B.length-1);if(z>=55296&&z<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=E[E.length-2],this.lastChar[1]=E[E.length-1],B.slice(0,-1)}return B}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=E[E.length-1],E.toString("utf16le",R,E.length-1)}function y(E){var R=E&&E.length?this.write(E):"";if(this.lastNeed){var B=this.lastTotal-this.lastNeed;return R+this.lastChar.toString("utf16le",0,B)}return R}function v(E,R){var B=(E.length-R)%3;return B===0?E.toString("base64",R):(this.lastNeed=3-B,this.lastTotal=3,B===1?this.lastChar[0]=E[E.length-1]:(this.lastChar[0]=E[E.length-2],this.lastChar[1]=E[E.length-1]),E.toString("base64",R,E.length-B))}function I(E){var R=E&&E.length?this.write(E):"";return this.lastNeed?R+this.lastChar.toString("base64",0,3-this.lastNeed):R}function k(E){return E.toString(this.encoding)}function T(E){return E&&E.length?this.write(E):""}return ku}var Pu,_d;function Iu(){if(_d)return Pu;_d=1;var n=ws().codes.ERR_STREAM_PREMATURE_CLOSE;function t(o){var a=!1;return function(){if(!a){a=!0;for(var u=arguments.length,_=new Array(u),l=0;l<u;l++)_[l]=arguments[l];o.apply(this,_)}}}function e(){}function r(o){return o.setHeader&&typeof o.abort=="function"}function i(o,a,u){if(typeof a=="function")return i(o,null,a);a||(a={}),u=t(u||e);var _=a.readable||a.readable!==!1&&o.readable,l=a.writable||a.writable!==!1&&o.writable,f=function(){o.writable||y()},g=o._writableState&&o._writableState.finished,y=function(){l=!1,g=!0,_||u.call(o)},v=o._readableState&&o._readableState.endEmitted,I=function(){_=!1,v=!0,l||u.call(o)},k=function(B){u.call(o,B)},T=function(){var B;if(_&&!v)return(!o._readableState||!o._readableState.ended)&&(B=new n),u.call(o,B);if(l&&!g)return(!o._writableState||!o._writableState.ended)&&(B=new n),u.call(o,B)},E=function(){o.req.on("finish",y)};return r(o)?(o.on("complete",y),o.on("abort",T),o.req?E():o.on("request",E)):l&&!o._writableState&&(o.on("end",f),o.on("close",f)),o.on("end",I),o.on("finish",y),a.error!==!1&&o.on("error",k),o.on("close",T),function(){o.removeListener("complete",y),o.removeListener("abort",T),o.removeListener("request",E),o.req&&o.req.removeListener("finish",y),o.removeListener("end",f),o.removeListener("close",f),o.removeListener("finish",y),o.removeListener("end",I),o.removeListener("error",k),o.removeListener("close",T)}}return Pu=i,Pu}var Fu,fd;function p2(){if(fd)return Fu;fd=1;var n;function t(B,z,O){return z=e(z),z in B?Object.defineProperty(B,z,{value:O,enumerable:!0,configurable:!0,writable:!0}):B[z]=O,B}function e(B){var z=r(B,"string");return typeof z=="symbol"?z:String(z)}function r(B,z){if(typeof B!="object"||B===null)return B;var O=B[Symbol.toPrimitive];if(O!==void 0){var C=O.call(B,z);if(typeof C!="object")return C;throw new TypeError("@@toPrimitive must return a primitive value.")}return(z==="string"?String:Number)(B)}var i=Iu(),o=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),_=Symbol("ended"),l=Symbol("lastPromise"),f=Symbol("handlePromise"),g=Symbol("stream");function y(B,z){return{value:B,done:z}}function v(B){var z=B[o];if(z!==null){var O=B[g].read();O!==null&&(B[l]=null,B[o]=null,B[a]=null,z(y(O,!1)))}}function I(B){Ct.nextTick(v,B)}function k(B,z){return function(O,C){B.then(function(){if(z[_]){O(y(void 0,!0));return}z[f](O,C)},C)}}var T=Object.getPrototypeOf(function(){}),E=Object.setPrototypeOf((n={get stream(){return this[g]},next:function(){var z=this,O=this[u];if(O!==null)return Promise.reject(O);if(this[_])return Promise.resolve(y(void 0,!0));if(this[g].destroyed)return new Promise(function($,et){Ct.nextTick(function(){z[u]?et(z[u]):$(y(void 0,!0))})});var C=this[l],N;if(C)N=new Promise(k(C,this));else{var D=this[g].read();if(D!==null)return Promise.resolve(y(D,!1));N=new Promise(this[f])}return this[l]=N,N}},t(n,Symbol.asyncIterator,function(){return this}),t(n,"return",function(){var z=this;return new Promise(function(O,C){z[g].destroy(null,function(N){if(N){C(N);return}O(y(void 0,!0))})})}),n),T),R=function(z){var O,C=Object.create(E,(O={},t(O,g,{value:z,writable:!0}),t(O,o,{value:null,writable:!0}),t(O,a,{value:null,writable:!0}),t(O,u,{value:null,writable:!0}),t(O,_,{value:z._readableState.endEmitted,writable:!0}),t(O,f,{value:function(D,$){var et=C[g].read();et?(C[l]=null,C[o]=null,C[a]=null,D(y(et,!1))):(C[o]=D,C[a]=$)},writable:!0}),O));return C[l]=null,i(z,function(N){if(N&&N.code!=="ERR_STREAM_PREMATURE_CLOSE"){var D=C[a];D!==null&&(C[l]=null,C[o]=null,C[a]=null,D(N)),C[u]=N;return}var $=C[o];$!==null&&(C[l]=null,C[o]=null,C[a]=null,$(y(void 0,!0))),C[_]=!0}),z.on("readable",I.bind(null,C)),C};return Fu=R,Fu}var Ou,ld;function d2(){return ld||(ld=1,Ou=function(){throw new Error("Readable.from is not available in the browser")}),Ou}var Tu,hd;function pd(){if(hd)return Tu;hd=1,Tu=$;var n;$.ReadableState=D,Lh().EventEmitter;var t=function(S,rt){return S.listeners(rt).length},e=Uh(),r=Wo().Buffer,i=(typeof hi<"u"?hi:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(x){return r.from(x)}function a(x){return r.isBuffer(x)||x instanceof i}var u=$p(),_;u&&u.debuglog?_=u.debuglog("stream"):_=function(){};var l=f2(),f=Xp(),g=rd(),y=g.getHighWaterMark,v=ws().codes,I=v.ERR_INVALID_ARG_TYPE,k=v.ERR_STREAM_PUSH_AFTER_EOF,T=v.ERR_METHOD_NOT_IMPLEMENTED,E=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,R,B,z;ds()($,e);var O=f.errorOrDestroy,C=["error","close","destroy","pause","resume"];function N(x,S,rt){if(typeof x.prependListener=="function")return x.prependListener(S,rt);!x._events||!x._events[S]?x.on(S,rt):Array.isArray(x._events[S])?x._events[S].unshift(rt):x._events[S]=[rt,x._events[S]]}function D(x,S,rt){n=n||gs(),x=x||{},typeof rt!="boolean"&&(rt=S instanceof n),this.objectMode=!!x.objectMode,rt&&(this.objectMode=this.objectMode||!!x.readableObjectMode),this.highWaterMark=y(this,x,"readableHighWaterMark",rt),this.buffer=new l,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=x.emitClose!==!1,this.autoDestroy=!!x.autoDestroy,this.destroyed=!1,this.defaultEncoding=x.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,x.encoding&&(R||(R=ud().StringDecoder),this.decoder=new R(x.encoding),this.encoding=x.encoding)}function $(x){if(n=n||gs(),!(this instanceof $))return new $(x);var S=this instanceof n;this._readableState=new D(x,this,S),this.readable=!0,x&&(typeof x.read=="function"&&(this._read=x.read),typeof x.destroy=="function"&&(this._destroy=x.destroy)),e.call(this)}Object.defineProperty($.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(S){this._readableState&&(this._readableState.destroyed=S)}}),$.prototype.destroy=f.destroy,$.prototype._undestroy=f.undestroy,$.prototype._destroy=function(x,S){S(x)},$.prototype.push=function(x,S){var rt=this._readableState,lt;return rt.objectMode?lt=!0:typeof x=="string"&&(S=S||rt.defaultEncoding,S!==rt.encoding&&(x=r.from(x,S),S=""),lt=!0),et(this,x,S,!1,lt)},$.prototype.unshift=function(x){return et(this,x,null,!0,!1)};function et(x,S,rt,lt,Bt){_("readableAddChunk",S);var bt=x._readableState;if(S===null)bt.reading=!1,pt(x,bt);else{var kt;if(Bt||(kt=L(bt,S)),kt)O(x,kt);else if(bt.objectMode||S&&S.length>0)if(typeof S!="string"&&!bt.objectMode&&Object.getPrototypeOf(S)!==r.prototype&&(S=o(S)),lt)bt.endEmitted?O(x,new E):ft(x,bt,S,!0);else if(bt.ended)O(x,new k);else{if(bt.destroyed)return!1;bt.reading=!1,bt.decoder&&!rt?(S=bt.decoder.write(S),bt.objectMode||S.length!==0?ft(x,bt,S,!1):xt(x,bt)):ft(x,bt,S,!1)}else lt||(bt.reading=!1,xt(x,bt))}return!bt.ended&&(bt.length<bt.highWaterMark||bt.length===0)}function ft(x,S,rt,lt){S.flowing&&S.length===0&&!S.sync?(S.awaitDrain=0,x.emit("data",rt)):(S.length+=S.objectMode?1:rt.length,lt?S.buffer.unshift(rt):S.buffer.push(rt),S.needReadable&&mt(x)),xt(x,S)}function L(x,S){var rt;return!a(S)&&typeof S!="string"&&S!==void 0&&!x.objectMode&&(rt=new I("chunk",["string","Buffer","Uint8Array"],S)),rt}$.prototype.isPaused=function(){return this._readableState.flowing===!1},$.prototype.setEncoding=function(x){R||(R=ud().StringDecoder);var S=new R(x);this._readableState.decoder=S,this._readableState.encoding=this._readableState.decoder.encoding;for(var rt=this._readableState.buffer.head,lt="";rt!==null;)lt+=S.write(rt.data),rt=rt.next;return this._readableState.buffer.clear(),lt!==""&&this._readableState.buffer.push(lt),this._readableState.length=lt.length,this};var vt=1073741824;function wt(x){return x>=vt?x=vt:(x--,x|=x>>>1,x|=x>>>2,x|=x>>>4,x|=x>>>8,x|=x>>>16,x++),x}function at(x,S){return x<=0||S.length===0&&S.ended?0:S.objectMode?1:x!==x?S.flowing&&S.length?S.buffer.head.data.length:S.length:(x>S.highWaterMark&&(S.highWaterMark=wt(x)),x<=S.length?x:S.ended?S.length:(S.needReadable=!0,0))}$.prototype.read=function(x){_("read",x),x=parseInt(x,10);var S=this._readableState,rt=x;if(x!==0&&(S.emittedReadable=!1),x===0&&S.needReadable&&((S.highWaterMark!==0?S.length>=S.highWaterMark:S.length>0)||S.ended))return _("read: emitReadable",S.length,S.ended),S.length===0&&S.ended?X(this):mt(this),null;if(x=at(x,S),x===0&&S.ended)return S.length===0&&X(this),null;var lt=S.needReadable;_("need readable",lt),(S.length===0||S.length-x<S.highWaterMark)&&(lt=!0,_("length less than watermark",lt)),S.ended||S.reading?(lt=!1,_("reading or ended",lt)):lt&&(_("do read"),S.reading=!0,S.sync=!0,S.length===0&&(S.needReadable=!0),this._read(S.highWaterMark),S.sync=!1,S.reading||(x=at(rt,S)));var Bt;return x>0?Bt=M(x,S):Bt=null,Bt===null?(S.needReadable=S.length<=S.highWaterMark,x=0):(S.length-=x,S.awaitDrain=0),S.length===0&&(S.ended||(S.needReadable=!0),rt!==x&&S.ended&&X(this)),Bt!==null&&this.emit("data",Bt),Bt};function pt(x,S){if(_("onEofChunk"),!S.ended){if(S.decoder){var rt=S.decoder.end();rt&&rt.length&&(S.buffer.push(rt),S.length+=S.objectMode?1:rt.length)}S.ended=!0,S.sync?mt(x):(S.needReadable=!1,S.emittedReadable||(S.emittedReadable=!0,Rt(x)))}}function mt(x){var S=x._readableState;_("emitReadable",S.needReadable,S.emittedReadable),S.needReadable=!1,S.emittedReadable||(_("emitReadable",S.flowing),S.emittedReadable=!0,Ct.nextTick(Rt,x))}function Rt(x){var S=x._readableState;_("emitReadable_",S.destroyed,S.length,S.ended),!S.destroyed&&(S.length||S.ended)&&(x.emit("readable"),S.emittedReadable=!1),S.needReadable=!S.flowing&&!S.ended&&S.length<=S.highWaterMark,H(x)}function xt(x,S){S.readingMore||(S.readingMore=!0,Ct.nextTick(Pt,x,S))}function Pt(x,S){for(;!S.reading&&!S.ended&&(S.length<S.highWaterMark||S.flowing&&S.length===0);){var rt=S.length;if(_("maybeReadMore read 0"),x.read(0),rt===S.length)break}S.readingMore=!1}$.prototype._read=function(x){O(this,new T("_read()"))},$.prototype.pipe=function(x,S){var rt=this,lt=this._readableState;switch(lt.pipesCount){case 0:lt.pipes=x;break;case 1:lt.pipes=[lt.pipes,x];break;default:lt.pipes.push(x);break}lt.pipesCount+=1,_("pipe count=%d opts=%j",lt.pipesCount,S);var Bt=(!S||S.end!==!1)&&x!==Ct.stdout&&x!==Ct.stderr,bt=Bt?pe:ze;lt.endEmitted?Ct.nextTick(bt):rt.once("end",bt),x.on("unpipe",kt);function kt(Fe,_e){_("onunpipe"),Fe===rt&&_e&&_e.hasUnpiped===!1&&(_e.hasUnpiped=!0,we())}function pe(){_("onend"),x.end()}var it=jt(rt);x.on("drain",it);var de=!1;function we(){_("cleanup"),x.removeListener("close",ge),x.removeListener("finish",he),x.removeListener("drain",it),x.removeListener("error",Qt),x.removeListener("unpipe",kt),rt.removeListener("end",pe),rt.removeListener("end",ze),rt.removeListener("data",Gt),de=!0,lt.awaitDrain&&(!x._writableState||x._writableState.needDrain)&&it()}rt.on("data",Gt);function Gt(Fe){_("ondata");var _e=x.write(Fe);_("dest.write",_e),_e===!1&&((lt.pipesCount===1&<.pipes===x||lt.pipesCount>1&&_t(lt.pipes,x)!==-1)&&!de&&(_("false write response, pause",lt.awaitDrain),lt.awaitDrain++),rt.pause())}function Qt(Fe){_("onerror",Fe),ze(),x.removeListener("error",Qt),t(x,"error")===0&&O(x,Fe)}N(x,"error",Qt);function ge(){x.removeListener("finish",he),ze()}x.once("close",ge);function he(){_("onfinish"),x.removeListener("close",ge),ze()}x.once("finish",he);function ze(){_("unpipe"),rt.unpipe(x)}return x.emit("pipe",rt),lt.flowing||(_("pipe resume"),rt.resume()),x};function jt(x){return function(){var rt=x._readableState;_("pipeOnDrain",rt.awaitDrain),rt.awaitDrain&&rt.awaitDrain--,rt.awaitDrain===0&&t(x,"data")&&(rt.flowing=!0,H(x))}}$.prototype.unpipe=function(x){var S=this._readableState,rt={hasUnpiped:!1};if(S.pipesCount===0)return this;if(S.pipesCount===1)return x&&x!==S.pipes?this:(x||(x=S.pipes),S.pipes=null,S.pipesCount=0,S.flowing=!1,x&&x.emit("unpipe",this,rt),this);if(!x){var lt=S.pipes,Bt=S.pipesCount;S.pipes=null,S.pipesCount=0,S.flowing=!1;for(var bt=0;bt<Bt;bt++)lt[bt].emit("unpipe",this,{hasUnpiped:!1});return this}var kt=_t(S.pipes,x);return kt===-1?this:(S.pipes.splice(kt,1),S.pipesCount-=1,S.pipesCount===1&&(S.pipes=S.pipes[0]),x.emit("unpipe",this,rt),this)},$.prototype.on=function(x,S){var rt=e.prototype.on.call(this,x,S),lt=this._readableState;return x==="data"?(lt.readableListening=this.listenerCount("readable")>0,lt.flowing!==!1&&this.resume()):x==="readable"&&!lt.endEmitted&&!lt.readableListening&&(lt.readableListening=lt.needReadable=!0,lt.flowing=!1,lt.emittedReadable=!1,_("on readable",lt.length,lt.reading),lt.length?mt(this):lt.reading||Ct.nextTick(Z,this)),rt},$.prototype.addListener=$.prototype.on,$.prototype.removeListener=function(x,S){var rt=e.prototype.removeListener.call(this,x,S);return x==="readable"&&Ct.nextTick(W,this),rt},$.prototype.removeAllListeners=function(x){var S=e.prototype.removeAllListeners.apply(this,arguments);return(x==="readable"||x===void 0)&&Ct.nextTick(W,this),S};function W(x){var S=x._readableState;S.readableListening=x.listenerCount("readable")>0,S.resumeScheduled&&!S.paused?S.flowing=!0:x.listenerCount("data")>0&&x.resume()}function Z(x){_("readable nexttick read 0"),x.read(0)}$.prototype.resume=function(){var x=this._readableState;return x.flowing||(_("resume"),x.flowing=!x.readableListening,nt(this,x)),x.paused=!1,this};function nt(x,S){S.resumeScheduled||(S.resumeScheduled=!0,Ct.nextTick(yt,x,S))}function yt(x,S){_("resume",S.reading),S.reading||x.read(0),S.resumeScheduled=!1,x.emit("resume"),H(x),S.flowing&&!S.reading&&x.read(0)}$.prototype.pause=function(){return _("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(_("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function H(x){var S=x._readableState;for(_("flow",S.flowing);S.flowing&&x.read()!==null;);}$.prototype.wrap=function(x){var S=this,rt=this._readableState,lt=!1;x.on("end",function(){if(_("wrapped end"),rt.decoder&&!rt.ended){var kt=rt.decoder.end();kt&&kt.length&&S.push(kt)}S.push(null)}),x.on("data",function(kt){if(_("wrapped data"),rt.decoder&&(kt=rt.decoder.write(kt)),!(rt.objectMode&&kt==null)&&!(!rt.objectMode&&(!kt||!kt.length))){var pe=S.push(kt);pe||(lt=!0,x.pause())}});for(var Bt in x)this[Bt]===void 0&&typeof x[Bt]=="function"&&(this[Bt]=function(pe){return function(){return x[pe].apply(x,arguments)}}(Bt));for(var bt=0;bt<C.length;bt++)x.on(C[bt],this.emit.bind(this,C[bt]));return this._read=function(kt){_("wrapped _read",kt),lt&&(lt=!1,x.resume())},this},typeof Symbol=="function"&&($.prototype[Symbol.asyncIterator]=function(){return B===void 0&&(B=p2()),B(this)}),Object.defineProperty($.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty($.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty($.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(S){this._readableState&&(this._readableState.flowing=S)}}),$._fromList=M,Object.defineProperty($.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function M(x,S){if(S.length===0)return null;var rt;return S.objectMode?rt=S.buffer.shift():!x||x>=S.length?(S.decoder?rt=S.buffer.join(""):S.buffer.length===1?rt=S.buffer.first():rt=S.buffer.concat(S.length),S.buffer.clear()):rt=S.buffer.consume(x,S.decoder),rt}function X(x){var S=x._readableState;_("endReadable",S.endEmitted),S.endEmitted||(S.ended=!0,Ct.nextTick(ct,S,x))}function ct(x,S){if(_("endReadableNT",x.endEmitted,x.length),!x.endEmitted&&x.length===0&&(x.endEmitted=!0,S.readable=!1,S.emit("end"),x.autoDestroy)){var rt=S._writableState;(!rt||rt.autoDestroy&&rt.finished)&&S.destroy()}}typeof Symbol=="function"&&($.from=function(x,S){return z===void 0&&(z=d2()),z($,x,S)});function _t(x,S){for(var rt=0,lt=x.length;rt<lt;rt++)if(x[rt]===S)return rt;return-1}return Tu}var Cu,dd;function wd(){if(dd)return Cu;dd=1,Cu=u;var n=ws().codes,t=n.ERR_METHOD_NOT_IMPLEMENTED,e=n.ERR_MULTIPLE_CALLBACK,r=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,i=n.ERR_TRANSFORM_WITH_LENGTH_0,o=gs();ds()(u,o);function a(f,g){var y=this._transformState;y.transforming=!1;var v=y.writecb;if(v===null)return this.emit("error",new e);y.writechunk=null,y.writecb=null,g!=null&&this.push(g),v(f);var I=this._readableState;I.reading=!1,(I.needReadable||I.length<I.highWaterMark)&&this._read(I.highWaterMark)}function u(f){if(!(this instanceof u))return new u(f);o.call(this,f),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,f&&(typeof f.transform=="function"&&(this._transform=f.transform),typeof f.flush=="function"&&(this._flush=f.flush)),this.on("prefinish",_)}function _(){var f=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(g,y){l(f,g,y)}):l(this,null,null)}u.prototype.push=function(f,g){return this._transformState.needTransform=!1,o.prototype.push.call(this,f,g)},u.prototype._transform=function(f,g,y){y(new t("_transform()"))},u.prototype._write=function(f,g,y){var v=this._transformState;if(v.writecb=y,v.writechunk=f,v.writeencoding=g,!v.transforming){var I=this._readableState;(v.needTransform||I.needReadable||I.length<I.highWaterMark)&&this._read(I.highWaterMark)}},u.prototype._read=function(f){var g=this._transformState;g.writechunk!==null&&!g.transforming?(g.transforming=!0,this._transform(g.writechunk,g.writeencoding,g.afterTransform)):g.needTransform=!0},u.prototype._destroy=function(f,g){o.prototype._destroy.call(this,f,function(y){g(y)})};function l(f,g,y){if(g)return f.emit("error",g);if(y!=null&&f.push(y),f._writableState.length)throw new i;if(f._transformState.transforming)throw new r;return f.push(null)}return Cu}var Nu,gd;function w2(){if(gd)return Nu;gd=1,Nu=t;var n=wd();ds()(t,n);function t(e){if(!(this instanceof t))return new t(e);n.call(this,e)}return t.prototype._transform=function(e,r,i){i(null,e)},Nu}var Lu,yd;function g2(){if(yd)return Lu;yd=1;var n;function t(y){var v=!1;return function(){v||(v=!0,y.apply(void 0,arguments))}}var e=ws().codes,r=e.ERR_MISSING_ARGS,i=e.ERR_STREAM_DESTROYED;function o(y){if(y)throw y}function a(y){return y.setHeader&&typeof y.abort=="function"}function u(y,v,I,k){k=t(k);var T=!1;y.on("close",function(){T=!0}),n===void 0&&(n=Iu()),n(y,{readable:v,writable:I},function(R){if(R)return k(R);T=!0,k()});var E=!1;return function(R){if(!T&&!E){if(E=!0,a(y))return y.abort();if(typeof y.destroy=="function")return y.destroy();k(R||new i("pipe"))}}}function _(y){y()}function l(y,v){return y.pipe(v)}function f(y){return!y.length||typeof y[y.length-1]!="function"?o:y.pop()}function g(){for(var y=arguments.length,v=new Array(y),I=0;I<y;I++)v[I]=arguments[I];var k=f(v);if(Array.isArray(v[0])&&(v=v[0]),v.length<2)throw new r("streams");var T,E=v.map(function(R,B){var z=B<v.length-1,O=B>0;return u(R,z,O,function(C){T||(T=C),C&&E.forEach(_),!z&&(E.forEach(_),k(T))})});return v.reduce(l)}return Lu=g,Lu}var bd;function md(){return bd||(bd=1,function(n,t){t=n.exports=pd(),t.Stream=t,t.Readable=t,t.Writable=sd(),t.Duplex=gs(),t.Transform=wd(),t.PassThrough=w2(),t.finished=Iu(),t.pipeline=g2()}(qo,qo.exports)),qo.exports}var Du,Ad;function y2(){if(Ad)return Du;Ad=1;const{Transform:n}=md();return Du=t=>class Wg extends n{constructor(r,i,o,a,u){super(u),this._rate=r,this._capacity=i,this._delimitedSuffix=o,this._hashBitLength=a,this._options=u,this._state=new t,this._state.initialize(r,i),this._finalized=!1}_transform(r,i,o){let a=null;try{this.update(r,i)}catch(u){a=u}o(a)}_flush(r){let i=null;try{this.push(this.digest())}catch(o){i=o}r(i)}update(r,i){if(!Ne.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return Ne.isBuffer(r)||(r=Ne.from(r,i)),this._state.absorb(r),this}digest(r){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let i=this._state.squeeze(this._hashBitLength/8);return r!==void 0&&(i=i.toString(r)),this._resetState(),i}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new Wg(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}},Du}var Uu,Ed;function b2(){if(Ed)return Uu;Ed=1;const{Transform:n}=md();return Uu=t=>class Jg extends n{constructor(r,i,o,a){super(a),this._rate=r,this._capacity=i,this._delimitedSuffix=o,this._options=a,this._state=new t,this._state.initialize(r,i),this._finalized=!1}_transform(r,i,o){let a=null;try{this.update(r,i)}catch(u){a=u}o(a)}_flush(){}_read(r){this.push(this.squeeze(r))}update(r,i){if(!Ne.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return Ne.isBuffer(r)||(r=Ne.from(r,i)),this._state.absorb(r),this}squeeze(r,i){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let o=this._state.squeeze(r);return i!==void 0&&(o=o.toString(i)),o}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new Jg(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}},Uu}var Mu,vd;function m2(){if(vd)return Mu;vd=1;const n=y2(),t=b2();return Mu=function(e){const r=n(e),i=t(e);return function(o,a){switch(typeof o=="string"?o.toLowerCase():o){case"keccak224":return new r(1152,448,null,224,a);case"keccak256":return new r(1088,512,null,256,a);case"keccak384":return new r(832,768,null,384,a);case"keccak512":return new r(576,1024,null,512,a);case"sha3-224":return new r(1152,448,6,224,a);case"sha3-256":return new r(1088,512,6,256,a);case"sha3-384":return new r(832,768,6,384,a);case"sha3-512":return new r(576,1024,6,512,a);case"shake128":return new i(1344,256,31,a);case"shake256":return new i(1088,512,31,a);default:throw new Error("Invald algorithm: "+o)}}},Mu}var ju={},xd;function A2(){if(xd)return ju;xd=1;const n=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];return ju.p1600=function(t){for(let e=0;e<24;++e){const r=t[0]^t[10]^t[20]^t[30]^t[40],i=t[1]^t[11]^t[21]^t[31]^t[41],o=t[2]^t[12]^t[22]^t[32]^t[42],a=t[3]^t[13]^t[23]^t[33]^t[43],u=t[4]^t[14]^t[24]^t[34]^t[44],_=t[5]^t[15]^t[25]^t[35]^t[45],l=t[6]^t[16]^t[26]^t[36]^t[46],f=t[7]^t[17]^t[27]^t[37]^t[47],g=t[8]^t[18]^t[28]^t[38]^t[48],y=t[9]^t[19]^t[29]^t[39]^t[49];let v=g^(o<<1|a>>>31),I=y^(a<<1|o>>>31);const k=t[0]^v,T=t[1]^I,E=t[10]^v,R=t[11]^I,B=t[20]^v,z=t[21]^I,O=t[30]^v,C=t[31]^I,N=t[40]^v,D=t[41]^I;v=r^(u<<1|_>>>31),I=i^(_<<1|u>>>31);const $=t[2]^v,et=t[3]^I,ft=t[12]^v,L=t[13]^I,vt=t[22]^v,wt=t[23]^I,at=t[32]^v,pt=t[33]^I,mt=t[42]^v,Rt=t[43]^I;v=o^(l<<1|f>>>31),I=a^(f<<1|l>>>31);const xt=t[4]^v,Pt=t[5]^I,jt=t[14]^v,W=t[15]^I,Z=t[24]^v,nt=t[25]^I,yt=t[34]^v,H=t[35]^I,M=t[44]^v,X=t[45]^I;v=u^(g<<1|y>>>31),I=_^(y<<1|g>>>31);const ct=t[6]^v,_t=t[7]^I,x=t[16]^v,S=t[17]^I,rt=t[26]^v,lt=t[27]^I,Bt=t[36]^v,bt=t[37]^I,kt=t[46]^v,pe=t[47]^I;v=l^(r<<1|i>>>31),I=f^(i<<1|r>>>31);const it=t[8]^v,de=t[9]^I,we=t[18]^v,Gt=t[19]^I,Qt=t[28]^v,ge=t[29]^I,he=t[38]^v,ze=t[39]^I,Fe=t[48]^v,_e=t[49]^I,Ye=k,b=T,h=R<<4|E>>>28,d=E<<4|R>>>28,P=B<<3|z>>>29,U=z<<3|B>>>29,J=C<<9|O>>>23,st=O<<9|C>>>23,It=N<<18|D>>>14,Vt=D<<18|N>>>14,qt=$<<1|et>>>31,Wt=et<<1|$>>>31,Ut=L<<12|ft>>>20,yi=ft<<12|L>>>20,Oe=vt<<10|wt>>>22,Wi=wt<<10|vt>>>22,so=pt<<13|at>>>19,Ze=at<<13|pt>>>19,oo=mt<<2|Rt>>>30,m=Rt<<2|mt>>>30,p=Pt<<30|xt>>>2,w=xt<<30|Pt>>>2,F=jt<<6|W>>>26,V=W<<6|jt>>>26,Y=nt<<11|Z>>>21,ot=Z<<11|nt>>>21,Ft=yt<<15|H>>>17,Zt=H<<15|yt>>>17,Jt=X<<29|M>>>3,Xt=M<<29|X>>>3,Ht=ct<<28|_t>>>4,i_=_t<<28|ct>>>4,s_=S<<23|x>>>9,o_=x<<23|S>>>9,a_=rt<<25|lt>>>7,c_=lt<<25|rt>>>7,u_=Bt<<21|bt>>>11,__=bt<<21|Bt>>>11,f_=pe<<24|kt>>>8,l_=kt<<24|pe>>>8,h_=it<<27|de>>>5,p_=de<<27|it>>>5,d_=we<<20|Gt>>>12,w_=Gt<<20|we>>>12,g_=ge<<7|Qt>>>25,y_=Qt<<7|ge>>>25,b_=he<<8|ze>>>24,m_=ze<<8|he>>>24,A_=Fe<<14|_e>>>18,E_=_e<<14|Fe>>>18;t[0]=Ye^~Ut&Y,t[1]=b^~yi&ot,t[10]=Ht^~d_&P,t[11]=i_^~w_&U,t[20]=qt^~F&a_,t[21]=Wt^~V&c_,t[30]=h_^~h&Oe,t[31]=p_^~d&Wi,t[40]=p^~s_&g_,t[41]=w^~o_&y_,t[2]=Ut^~Y&u_,t[3]=yi^~ot&__,t[12]=d_^~P&so,t[13]=w_^~U&Ze,t[22]=F^~a_&b_,t[23]=V^~c_&m_,t[32]=h^~Oe&Ft,t[33]=d^~Wi&Zt,t[42]=s_^~g_&J,t[43]=o_^~y_&st,t[4]=Y^~u_&A_,t[5]=ot^~__&E_,t[14]=P^~so&Jt,t[15]=U^~Ze&Xt,t[24]=a_^~b_&It,t[25]=c_^~m_&Vt,t[34]=Oe^~Ft&f_,t[35]=Wi^~Zt&l_,t[44]=g_^~J&oo,t[45]=y_^~st&m,t[6]=u_^~A_&Ye,t[7]=__^~E_&b,t[16]=so^~Jt&Ht,t[17]=Ze^~Xt&i_,t[26]=b_^~It&qt,t[27]=m_^~Vt&Wt,t[36]=Ft^~f_&h_,t[37]=Zt^~l_&p_,t[46]=J^~oo&p,t[47]=st^~m&w,t[8]=A_^~Ye&Ut,t[9]=E_^~b&yi,t[18]=Jt^~Ht&d_,t[19]=Xt^~i_&w_,t[28]=It^~qt&F,t[29]=Vt^~Wt&V,t[38]=f_^~h_&h,t[39]=l_^~p_&d,t[48]=oo^~p&s_,t[49]=m^~w&o_,t[0]^=n[e*2],t[1]^=n[e*2+1]}},ju}var Gu,Rd;function E2(){if(Rd)return Gu;Rd=1;const n=A2();function t(){this.state=[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],this.blockSize=null,this.count=0,this.squeezing=!1}return t.prototype.initialize=function(e,r){for(let i=0;i<50;++i)this.state[i]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},t.prototype.absorb=function(e){for(let r=0;r<e.length;++r)this.state[~~(this.count/4)]^=e[r]<<8*(this.count%4),this.count+=1,this.count===this.blockSize&&(n.p1600(this.state),this.count=0)},t.prototype.absorbLastFewBits=function(e){this.state[~~(this.count/4)]^=e<<8*(this.count%4),(e&128)!==0&&this.count===this.blockSize-1&&n.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),n.p1600(this.state),this.count=0,this.squeezing=!0},t.prototype.squeeze=function(e){this.squeezing||this.absorbLastFewBits(1);const r=Ne.alloc(e);for(let i=0;i<e;++i)r[i]=this.state[~~(this.count/4)]>>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(n.p1600(this.state),this.count=0);return r},t.prototype.copy=function(e){for(let r=0;r<50;++r)e.state[r]=this.state[r];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},Gu=t,Gu}var Hu,Sd;function v2(){return Sd||(Sd=1,Hu=m2()(E2())),Hu}var x2=v2();const zd=Ih(x2);var Xo={exports:{}},R2=Xo.exports,Bd;function S2(){return Bd||(Bd=1,function(n,t){(function(e,r){n.exports=r()})(R2,function(){var e=function(o,a){if(a=a||{},typeof o!="function")throw new i("fetch must be a function");if(typeof a!="object")throw new i("defaults must be an object");if(a.retries!==void 0&&!r(a.retries))throw new i("retries must be a positive integer");if(a.retryDelay!==void 0&&!r(a.retryDelay)&&typeof a.retryDelay!="function")throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(a.retryOn!==void 0&&!Array.isArray(a.retryOn)&&typeof a.retryOn!="function")throw new i("retryOn property expects an array or function");var u={retries:3,retryDelay:1e3,retryOn:[]};return a=Object.assign(u,a),function(l,f){var g=a.retries,y=a.retryDelay,v=a.retryOn;if(f&&f.retries!==void 0)if(r(f.retries))g=f.retries;else throw new i("retries must be a positive integer");if(f&&f.retryDelay!==void 0)if(r(f.retryDelay)||typeof f.retryDelay=="function")y=f.retryDelay;else throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(f&&f.retryOn)if(Array.isArray(f.retryOn)||typeof f.retryOn=="function")v=f.retryOn;else throw new i("retryOn property expects an array or function");return new Promise(function(I,k){var T=function(R){var B=typeof Request<"u"&&l instanceof Request?l.clone():l;o(B,f).then(function(z){if(Array.isArray(v)&&v.indexOf(z.status)===-1)I(z);else if(typeof v=="function")try{return Promise.resolve(v(R,null,z)).then(function(O){O?E(R,null,z):I(z)}).catch(k)}catch(O){k(O)}else R<g?E(R,null,z):I(z)}).catch(function(z){if(typeof v=="function")try{Promise.resolve(v(R,z,null)).then(function(O){O?E(R,z,null):k(z)}).catch(function(O){k(O)})}catch(O){k(O)}else R<g?E(R,z,null):k(z)})};function E(R,B,z){var O=typeof y=="function"?y(R,B,z):y;setTimeout(function(){T(++R)},O)}T(0)})}};function r(o){return Number.isInteger(o)&&o>=0}function i(o){this.name="ArgumentError",this.message=o}return e})}(Xo)),Xo.exports}var z2=S2();const B2=Ih(z2),k2=()=>(async n=>{try{return typeof MessageChannel<"u"&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(n)}catch{return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]));var ta=typeof Ji<"u"?Ji:typeof self<"u"?self:typeof window<"u"?window:{};function kd(n,t){return new Promise(e=>{n.addEventListener("message",function r({data:i}){i?.type===t&&(n.removeEventListener("message",r),e(i))})})}kd(self,"wasm_bindgen_worker_init").then(async({init:n,receiver:t})=>{const e=await Promise.resolve().then(function(){return U2});await e.default(n),postMessage({type:"wasm_bindgen_worker_ready"}),e.wbg_rayon_start_worker(t)});async function P2(n,t,e){if(e.numThreads()===0)throw new Error("num_threads must be > 0.");const r={type:"wasm_bindgen_worker_init",init:{module_or_path:n,memory:t},receiver:e.receiver()};await Promise.all(Array.from({length:e.numThreads()},async()=>{let i;try{i=new Worker(new URL("/workerHelpers.js",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Ce&&Ce.tagName.toUpperCase()==="SCRIPT"&&Ce.src||new URL("relayer-sdk-js.umd.cjs",document.baseURI).href),{type:"module"})}catch{const u=await(await fetch("/workerHelpers.js")).blob(),_=URL.createObjectURL(u);i=new Worker(_)}return i.postMessage(r),await kd(i,"wasm_bindgen_worker_ready"),i})),e.build()}let s;function Js(n){const t=s.__externref_table_alloc();return s.__wbindgen_export_2.set(t,n),t}function ys(n,t){try{return n.apply(this,t)}catch(e){const r=Js(e);s.__wbindgen_exn_store(r)}}let $s=null;function bs(){return($s===null||$s.buffer!==s.memory.buffer)&&($s=new Uint8Array(s.memory.buffer)),$s}let ea=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});ea.decode();const I2=2146435072;let Vu=0;function F2(n,t){return Vu+=t,Vu>=I2&&(ea=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),ea.decode(),Vu=t),ea.decode(bs().slice(n,n+t))}function Ys(n,t){return n=n>>>0,F2(n,t)}function Q(n,t){return n=n>>>0,bs().subarray(n/1,n/1+t)}let j=0;const ra=new TextEncoder;ra.encodeInto=function(n,t){const e=ra.encode(n);return t.set(e),{read:n.length,written:e.length}};function na(n,t,e){if(e===void 0){const u=ra.encode(n),_=t(u.length,1)>>>0;return bs().subarray(_,_+u.length).set(u),j=u.length,_}let r=n.length,i=t(r,1)>>>0;const o=bs();let a=0;for(;a<r;a++){const u=n.charCodeAt(a);if(u>127)break;o[i+a]=u}if(a!==r){a!==0&&(n=n.slice(a)),i=e(i,r,r=a+n.length*3,1)>>>0;const u=bs().subarray(i+a,i+r),_=ra.encodeInto(n,u);a+=_.written,i=e(i,r,a,1)>>>0}return j=a,i}let Zs=null;function Hn(){return(Zs===null||Zs.buffer!==s.memory.buffer)&&(Zs=new DataView(s.memory.buffer)),Zs}function Di(n){return n==null}function qu(n){const t=typeof n;if(t=="number"||t=="boolean"||n==null)return`${n}`;if(t=="string")return`"${n}"`;if(t=="symbol"){const i=n.description;return i==null?"Symbol":`Symbol(${i})`}if(t=="function"){const i=n.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(n)){const i=n.length;let o="[";i>0&&(o+=qu(n[0]));for(let a=1;a<i;a++)o+=", "+qu(n[a]);return o+="]",o}const e=/\[object ([^\]]+)\]/.exec(toString.call(n));let r;if(e&&e.length>1)r=e[1];else return toString.call(n);if(r=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}
|
|
21
21
|
${n.stack}`:r}function q(n,t){const e=t(n.length*1,1)>>>0;return bs().set(n,e/1),j=n.length,e}function c(n){const t=s.__wbindgen_export_2.get(n);return s.__externref_table_dealloc(n),t}function A(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}function Qu(){s.init_panic_hook()}function O2(n){s.wbg_rayon_start_worker(n)}function Ku(n){return s.initThreadPool(n)}const Pd=Object.freeze({Proof:0,0:"Proof",Verify:1,1:"Verify"});typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_boolean_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_booleanciphertext_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_booleanclientkey_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_booleancompressedciphertext_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_booleancompressedserverkey_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_booleannoisedistribution_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_booleanparameters_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_booleanpublickey_free(n>>>0,1));const Id=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compactciphertextlist_free(n>>>0,1));class Vn{static __wrap(t){t=t>>>0;const e=Object.create(Vn.prototype);return e.__wbg_ptr=t,Id.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Id.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compactciphertextlist_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.compactciphertextlist_deserialize(e,r);if(i[2])throw c(i[1]);return Vn.__wrap(i[0])}get_kind_of(t){const e=s.compactciphertextlist_get_kind_of(this.__wbg_ptr,t);return e===84?void 0:e}safe_serialize(t){const e=s.compactciphertextlist_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.compactciphertextlist_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Vn.__wrap(o[0])}len(){return s.compactciphertextlist_len(this.__wbg_ptr)>>>0}expand(){const t=s.compactciphertextlist_expand(this.__wbg_ptr);if(t[2])throw c(t[1]);return pi.__wrap(t[0])}static builder(t){A(t,Me);const e=s.compactciphertextlist_builder(t.__wbg_ptr);if(e[2])throw c(e[1]);return Ui.__wrap(e[0])}is_empty(){return s.compactciphertextlist_is_empty(this.__wbg_ptr)!==0}serialize(){const t=s.compactciphertextlist_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Vn.prototype[Symbol.dispose]=Vn.prototype.free);const Fd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compactciphertextlistbuilder_free(n>>>0,1));class Ui{static __wrap(t){t=t>>>0;const e=Object.create(Ui.prototype);return e.__wbg_ptr=t,Fd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Fd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compactciphertextlistbuilder_free(t,0)}push_i1024(t){const e=s.compactciphertextlistbuilder_push_i1024(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i2048(t){const e=s.compactciphertextlistbuilder_push_i2048(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u1024(t){const e=s.compactciphertextlistbuilder_push_u1024(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u2048(t){const e=s.compactciphertextlistbuilder_push_u2048(this.__wbg_ptr,t);if(e[1])throw c(e[0])}build_packed(){const t=s.compactciphertextlistbuilder_build_packed(this.__wbg_ptr);if(t[2])throw c(t[1]);return Vn.__wrap(t[0])}push_boolean(t){const e=s.compactciphertextlistbuilder_push_boolean(this.__wbg_ptr,t);if(e[1])throw c(e[0])}build_with_proof_packed(t,e,r){A(t,Ue);const i=q(e,s.__wbindgen_malloc),o=j,a=s.compactciphertextlistbuilder_build_with_proof_packed(this.__wbg_ptr,t.__wbg_ptr,i,o,r);if(a[2])throw c(a[1]);return di.__wrap(a[0])}build(){const t=s.compactciphertextlistbuilder_build(this.__wbg_ptr);if(t[2])throw c(t[1]);return Vn.__wrap(t[0])}push_i2(t){const e=s.compactciphertextlistbuilder_push_i2(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i4(t){const e=s.compactciphertextlistbuilder_push_i4(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i6(t){const e=s.compactciphertextlistbuilder_push_i6(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i8(t){const e=s.compactciphertextlistbuilder_push_i8(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u2(t){const e=s.compactciphertextlistbuilder_push_u2(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u4(t){const e=s.compactciphertextlistbuilder_push_u4(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u6(t){const e=s.compactciphertextlistbuilder_push_u6(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u8(t){const e=s.compactciphertextlistbuilder_push_u8(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i10(t){const e=s.compactciphertextlistbuilder_push_i10(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i12(t){const e=s.compactciphertextlistbuilder_push_i12(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i14(t){const e=s.compactciphertextlistbuilder_push_i14(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i16(t){const e=s.compactciphertextlistbuilder_push_i16(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i24(t){const e=s.compactciphertextlistbuilder_push_i24(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i32(t){const e=s.compactciphertextlistbuilder_push_i32(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i40(t){const e=s.compactciphertextlistbuilder_push_i40(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i48(t){const e=s.compactciphertextlistbuilder_push_i48(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i56(t){const e=s.compactciphertextlistbuilder_push_i56(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i64(t){const e=s.compactciphertextlistbuilder_push_i64(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i72(t){const e=s.compactciphertextlistbuilder_push_i72(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i80(t){const e=s.compactciphertextlistbuilder_push_i80(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i88(t){const e=s.compactciphertextlistbuilder_push_i88(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i96(t){const e=s.compactciphertextlistbuilder_push_i96(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u10(t){const e=s.compactciphertextlistbuilder_push_u10(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u12(t){const e=s.compactciphertextlistbuilder_push_u12(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u14(t){const e=s.compactciphertextlistbuilder_push_u14(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u16(t){const e=s.compactciphertextlistbuilder_push_u16(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u24(t){const e=s.compactciphertextlistbuilder_push_u24(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u32(t){const e=s.compactciphertextlistbuilder_push_u32(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u40(t){const e=s.compactciphertextlistbuilder_push_u40(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u48(t){const e=s.compactciphertextlistbuilder_push_u48(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u56(t){const e=s.compactciphertextlistbuilder_push_u56(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u64(t){const e=s.compactciphertextlistbuilder_push_u64(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u72(t){const e=s.compactciphertextlistbuilder_push_u72(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u80(t){const e=s.compactciphertextlistbuilder_push_u80(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u88(t){const e=s.compactciphertextlistbuilder_push_u88(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u96(t){const e=s.compactciphertextlistbuilder_push_u96(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i104(t){const e=s.compactciphertextlistbuilder_push_i104(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i112(t){const e=s.compactciphertextlistbuilder_push_i112(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i120(t){const e=s.compactciphertextlistbuilder_push_i120(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i128(t){const e=s.compactciphertextlistbuilder_push_i128(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i136(t){const e=s.compactciphertextlistbuilder_push_i136(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i144(t){const e=s.compactciphertextlistbuilder_push_i144(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i152(t){const e=s.compactciphertextlistbuilder_push_i152(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i160(t){const e=s.compactciphertextlistbuilder_push_i160(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i168(t){const e=s.compactciphertextlistbuilder_push_i168(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i176(t){const e=s.compactciphertextlistbuilder_push_i176(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i184(t){const e=s.compactciphertextlistbuilder_push_i184(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i192(t){const e=s.compactciphertextlistbuilder_push_i192(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i200(t){const e=s.compactciphertextlistbuilder_push_i200(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i208(t){const e=s.compactciphertextlistbuilder_push_i208(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i216(t){const e=s.compactciphertextlistbuilder_push_i216(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i224(t){const e=s.compactciphertextlistbuilder_push_i224(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i232(t){const e=s.compactciphertextlistbuilder_push_i232(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i240(t){const e=s.compactciphertextlistbuilder_push_i240(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i248(t){const e=s.compactciphertextlistbuilder_push_i248(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i256(t){const e=s.compactciphertextlistbuilder_push_i256(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i512(t){const e=s.compactciphertextlistbuilder_push_i512(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u104(t){const e=s.compactciphertextlistbuilder_push_u104(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u112(t){const e=s.compactciphertextlistbuilder_push_u112(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u120(t){const e=s.compactciphertextlistbuilder_push_u120(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u128(t){const e=s.compactciphertextlistbuilder_push_u128(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u136(t){const e=s.compactciphertextlistbuilder_push_u136(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u144(t){const e=s.compactciphertextlistbuilder_push_u144(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u152(t){const e=s.compactciphertextlistbuilder_push_u152(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u160(t){const e=s.compactciphertextlistbuilder_push_u160(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u168(t){const e=s.compactciphertextlistbuilder_push_u168(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u176(t){const e=s.compactciphertextlistbuilder_push_u176(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u184(t){const e=s.compactciphertextlistbuilder_push_u184(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u192(t){const e=s.compactciphertextlistbuilder_push_u192(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u200(t){const e=s.compactciphertextlistbuilder_push_u200(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u208(t){const e=s.compactciphertextlistbuilder_push_u208(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u216(t){const e=s.compactciphertextlistbuilder_push_u216(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u224(t){const e=s.compactciphertextlistbuilder_push_u224(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u232(t){const e=s.compactciphertextlistbuilder_push_u232(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u240(t){const e=s.compactciphertextlistbuilder_push_u240(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u248(t){const e=s.compactciphertextlistbuilder_push_u248(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u256(t){const e=s.compactciphertextlistbuilder_push_u256(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u512(t){const e=s.compactciphertextlistbuilder_push_u512(this.__wbg_ptr,t);if(e[1])throw c(e[0])}}Symbol.dispose&&(Ui.prototype[Symbol.dispose]=Ui.prototype.free);const Od=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compactciphertextlistexpander_free(n>>>0,1));class pi{static __wrap(t){t=t>>>0;const e=Object.create(pi.prototype);return e.__wbg_ptr=t,Od.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Od.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compactciphertextlistexpander_free(t,0)}get_int104(t){const e=s.compactciphertextlistexpander_get_int104(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return cr.__wrap(e[0])}get_int112(t){const e=s.compactciphertextlistexpander_get_int112(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return ur.__wrap(e[0])}get_int120(t){const e=s.compactciphertextlistexpander_get_int120(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return fr.__wrap(e[0])}get_int128(t){const e=s.compactciphertextlistexpander_get_int128(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return lr.__wrap(e[0])}get_int136(t){const e=s.compactciphertextlistexpander_get_int136(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return hr.__wrap(e[0])}get_int144(t){const e=s.compactciphertextlistexpander_get_int144(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return dr.__wrap(e[0])}get_int152(t){const e=s.compactciphertextlistexpander_get_int152(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return wr.__wrap(e[0])}get_int160(t){const e=s.compactciphertextlistexpander_get_int160(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return yr.__wrap(e[0])}get_int168(t){const e=s.compactciphertextlistexpander_get_int168(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return br.__wrap(e[0])}get_int176(t){const e=s.compactciphertextlistexpander_get_int176(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return mr.__wrap(e[0])}get_int184(t){const e=s.compactciphertextlistexpander_get_int184(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Ar.__wrap(e[0])}get_int192(t){const e=s.compactciphertextlistexpander_get_int192(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Er.__wrap(e[0])}get_int200(t){const e=s.compactciphertextlistexpander_get_int200(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return xr.__wrap(e[0])}get_int208(t){const e=s.compactciphertextlistexpander_get_int208(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Sr.__wrap(e[0])}get_int216(t){const e=s.compactciphertextlistexpander_get_int216(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return zr.__wrap(e[0])}get_int224(t){const e=s.compactciphertextlistexpander_get_int224(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Br.__wrap(e[0])}get_int232(t){const e=s.compactciphertextlistexpander_get_int232(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return kr.__wrap(e[0])}get_int240(t){const e=s.compactciphertextlistexpander_get_int240(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Ir.__wrap(e[0])}get_int248(t){const e=s.compactciphertextlistexpander_get_int248(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Fr.__wrap(e[0])}get_int256(t){const e=s.compactciphertextlistexpander_get_int256(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Or.__wrap(e[0])}get_int512(t){const e=s.compactciphertextlistexpander_get_int512(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Dr.__wrap(e[0])}get_uint10(t){const e=s.compactciphertextlistexpander_get_uint10(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Kr.__wrap(e[0])}get_uint12(t){const e=s.compactciphertextlistexpander_get_uint12(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Yr.__wrap(e[0])}get_uint14(t){const e=s.compactciphertextlistexpander_get_uint14(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return en.__wrap(e[0])}get_uint16(t){const e=s.compactciphertextlistexpander_get_uint16(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return sn.__wrap(e[0])}get_uint24(t){const e=s.compactciphertextlistexpander_get_uint24(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return yn.__wrap(e[0])}get_uint32(t){const e=s.compactciphertextlistexpander_get_uint32(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return En.__wrap(e[0])}get_uint40(t){const e=s.compactciphertextlistexpander_get_uint40(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return xn.__wrap(e[0])}get_uint48(t){const e=s.compactciphertextlistexpander_get_uint48(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Rn.__wrap(e[0])}get_uint56(t){const e=s.compactciphertextlistexpander_get_uint56(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return zn.__wrap(e[0])}get_uint64(t){const e=s.compactciphertextlistexpander_get_uint64(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return kn.__wrap(e[0])}get_uint72(t){const e=s.compactciphertextlistexpander_get_uint72(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Pn.__wrap(e[0])}get_uint80(t){const e=s.compactciphertextlistexpander_get_uint80(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Fn.__wrap(e[0])}get_uint88(t){const e=s.compactciphertextlistexpander_get_uint88(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return On.__wrap(e[0])}get_uint96(t){const e=s.compactciphertextlistexpander_get_uint96(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Tn.__wrap(e[0])}get_int1024(t){const e=s.compactciphertextlistexpander_get_int1024(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return ar.__wrap(e[0])}get_int2048(t){const e=s.compactciphertextlistexpander_get_int2048(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Rr.__wrap(e[0])}get_kind_of(t){const e=s.compactciphertextlistexpander_get_kind_of(this.__wbg_ptr,t);return e===84?void 0:e}get_uint104(t){const e=s.compactciphertextlistexpander_get_uint104(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Jr.__wrap(e[0])}get_uint112(t){const e=s.compactciphertextlistexpander_get_uint112(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return $r.__wrap(e[0])}get_uint120(t){const e=s.compactciphertextlistexpander_get_uint120(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Zr.__wrap(e[0])}get_uint128(t){const e=s.compactciphertextlistexpander_get_uint128(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Xr.__wrap(e[0])}get_uint136(t){const e=s.compactciphertextlistexpander_get_uint136(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return tn.__wrap(e[0])}get_uint144(t){const e=s.compactciphertextlistexpander_get_uint144(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return rn.__wrap(e[0])}get_uint152(t){const e=s.compactciphertextlistexpander_get_uint152(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return nn.__wrap(e[0])}get_uint160(t){const e=s.compactciphertextlistexpander_get_uint160(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return on.__wrap(e[0])}get_uint168(t){const e=s.compactciphertextlistexpander_get_uint168(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return an.__wrap(e[0])}get_uint176(t){const e=s.compactciphertextlistexpander_get_uint176(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return cn.__wrap(e[0])}get_uint184(t){const e=s.compactciphertextlistexpander_get_uint184(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return un.__wrap(e[0])}get_uint192(t){const e=s.compactciphertextlistexpander_get_uint192(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return _n.__wrap(e[0])}get_uint200(t){const e=s.compactciphertextlistexpander_get_uint200(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return ln.__wrap(e[0])}get_uint208(t){const e=s.compactciphertextlistexpander_get_uint208(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return pn.__wrap(e[0])}get_uint216(t){const e=s.compactciphertextlistexpander_get_uint216(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return dn.__wrap(e[0])}get_uint224(t){const e=s.compactciphertextlistexpander_get_uint224(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return wn.__wrap(e[0])}get_uint232(t){const e=s.compactciphertextlistexpander_get_uint232(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return gn.__wrap(e[0])}get_uint240(t){const e=s.compactciphertextlistexpander_get_uint240(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return bn.__wrap(e[0])}get_uint248(t){const e=s.compactciphertextlistexpander_get_uint248(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return mn.__wrap(e[0])}get_uint256(t){const e=s.compactciphertextlistexpander_get_uint256(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return An.__wrap(e[0])}get_uint512(t){const e=s.compactciphertextlistexpander_get_uint512(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Sn.__wrap(e[0])}get_uint1024(t){const e=s.compactciphertextlistexpander_get_uint1024(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Wr.__wrap(e[0])}get_uint2048(t){const e=s.compactciphertextlistexpander_get_uint2048(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return hn.__wrap(e[0])}len(){return s.compactciphertextlistexpander_len(this.__wbg_ptr)>>>0}get_bool(t){const e=s.compactciphertextlistexpander_get_bool(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return sr.__wrap(e[0])}get_int2(t){const e=s.compactciphertextlistexpander_get_int2(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return vr.__wrap(e[0])}get_int4(t){const e=s.compactciphertextlistexpander_get_int4(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Cr.__wrap(e[0])}get_int6(t){const e=s.compactciphertextlistexpander_get_int6(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Mr.__wrap(e[0])}get_int8(t){const e=s.compactciphertextlistexpander_get_int8(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Hr.__wrap(e[0])}is_empty(){return s.compactciphertextlistexpander_is_empty(this.__wbg_ptr)!==0}get_int10(t){const e=s.compactciphertextlistexpander_get_int10(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return or.__wrap(e[0])}get_int12(t){const e=s.compactciphertextlistexpander_get_int12(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return _r.__wrap(e[0])}get_int14(t){const e=s.compactciphertextlistexpander_get_int14(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return pr.__wrap(e[0])}get_int16(t){const e=s.compactciphertextlistexpander_get_int16(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return gr.__wrap(e[0])}get_int24(t){const e=s.compactciphertextlistexpander_get_int24(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Pr.__wrap(e[0])}get_int32(t){const e=s.compactciphertextlistexpander_get_int32(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Tr.__wrap(e[0])}get_int40(t){const e=s.compactciphertextlistexpander_get_int40(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Nr.__wrap(e[0])}get_int48(t){const e=s.compactciphertextlistexpander_get_int48(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Lr.__wrap(e[0])}get_int56(t){const e=s.compactciphertextlistexpander_get_int56(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Ur.__wrap(e[0])}get_int64(t){const e=s.compactciphertextlistexpander_get_int64(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return jr.__wrap(e[0])}get_int72(t){const e=s.compactciphertextlistexpander_get_int72(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Gr.__wrap(e[0])}get_int80(t){const e=s.compactciphertextlistexpander_get_int80(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Vr.__wrap(e[0])}get_int88(t){const e=s.compactciphertextlistexpander_get_int88(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return qr.__wrap(e[0])}get_int96(t){const e=s.compactciphertextlistexpander_get_int96(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Qr.__wrap(e[0])}get_uint2(t){const e=s.compactciphertextlistexpander_get_uint2(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return fn.__wrap(e[0])}get_uint4(t){const e=s.compactciphertextlistexpander_get_uint4(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return vn.__wrap(e[0])}get_uint6(t){const e=s.compactciphertextlistexpander_get_uint6(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Bn.__wrap(e[0])}get_uint8(t){const e=s.compactciphertextlistexpander_get_uint8(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return In.__wrap(e[0])}}Symbol.dispose&&(pi.prototype[Symbol.dispose]=pi.prototype.free);const Td=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compactpkecrs_free(n>>>0,1));class Ue{static __wrap(t){t=t>>>0;const e=Object.create(Ue.prototype);return e.__wbg_ptr=t,Td.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Td.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compactpkecrs_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.compactpkecrs_deserialize(e,r);if(i[2])throw c(i[1]);return Ue.__wrap(i[0])}static from_config(t,e){A(t,wi);const r=s.compactpkecrs_from_config(t.__wbg_ptr,e);if(r[2])throw c(r[1]);return Ue.__wrap(r[0])}safe_serialize(t){const e=s.compactpkecrs_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.compactpkecrs_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Ue.__wrap(o[0])}static deserialize_from_public_params(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.compactpkecrs_deserialize_from_public_params(e,r);if(i[2])throw c(i[1]);return Ue.__wrap(i[0])}static safe_deserialize_from_public_params(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.compactpkecrs_safe_deserialize_from_public_params(r,i,e);if(o[2])throw c(o[1]);return Ue.__wrap(o[0])}serialize(t){const e=s.compactpkecrs_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}}Symbol.dispose&&(Ue.prototype[Symbol.dispose]=Ue.prototype.free),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfhebool_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint10_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint1024_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint104_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint112_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint12_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint120_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint128_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint136_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint14_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint144_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint152_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint16_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint160_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint168_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint176_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint184_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint192_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint2_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint200_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint2048_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint208_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint216_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint224_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint232_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint24_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint240_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint248_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint256_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint32_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint4_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint40_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint48_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint512_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint56_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint6_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint64_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint72_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint8_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint80_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint88_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint96_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint10_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint1024_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint104_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint112_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint12_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint120_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint128_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint136_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint14_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint144_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint152_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint16_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint160_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint168_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint176_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint184_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint192_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint2_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint200_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint2048_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint208_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint216_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint224_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint232_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint24_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint240_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint248_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint256_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint32_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint4_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint40_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint48_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint512_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint56_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint6_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint64_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint72_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint8_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint80_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint88_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint96_free(n>>>0,1));const Cd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fhebool_free(n>>>0,1));class sr{static __wrap(t){t=t>>>0;const e=Object.create(sr.prototype);return e.__wbg_ptr=t,Cd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Cd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fhebool_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fhebool_deserialize(e,r);if(i[2])throw c(i[1]);return sr.__wrap(i[0])}safe_serialize(t){const e=s.fhebool_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fhebool_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return sr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fhebool_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return sr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fhebool_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return sr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fhebool_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return sr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fhebool_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]!==0}serialize(){const t=s.fhebool_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(sr.prototype[Symbol.dispose]=sr.prototype.free);const Nd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint10_free(n>>>0,1));class or{static __wrap(t){t=t>>>0;const e=Object.create(or.prototype);return e.__wbg_ptr=t,Nd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Nd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint10_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint10_deserialize(e,r);if(i[2])throw c(i[1]);return or.__wrap(i[0])}safe_serialize(t){const e=s.fheint10_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint10_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return or.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint10_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return or.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint10_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return or.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint10_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return or.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint10_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint10_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(or.prototype[Symbol.dispose]=or.prototype.free);const Ld=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint1024_free(n>>>0,1));class ar{static __wrap(t){t=t>>>0;const e=Object.create(ar.prototype);return e.__wbg_ptr=t,Ld.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ld.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint1024_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint1024_deserialize(e,r);if(i[2])throw c(i[1]);return ar.__wrap(i[0])}safe_serialize(t){const e=s.fheint1024_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint1024_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return ar.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint1024_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ar.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint1024_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ar.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint1024_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ar.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint1024_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint1024_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(ar.prototype[Symbol.dispose]=ar.prototype.free);const Dd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint104_free(n>>>0,1));class cr{static __wrap(t){t=t>>>0;const e=Object.create(cr.prototype);return e.__wbg_ptr=t,Dd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Dd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint104_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint104_deserialize(e,r);if(i[2])throw c(i[1]);return cr.__wrap(i[0])}safe_serialize(t){const e=s.fheint104_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint104_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return cr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint104_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return cr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint104_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return cr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint104_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return cr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint104_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint104_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(cr.prototype[Symbol.dispose]=cr.prototype.free);const Ud=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint112_free(n>>>0,1));class ur{static __wrap(t){t=t>>>0;const e=Object.create(ur.prototype);return e.__wbg_ptr=t,Ud.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ud.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint112_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint112_deserialize(e,r);if(i[2])throw c(i[1]);return ur.__wrap(i[0])}safe_serialize(t){const e=s.fheint112_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint112_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return ur.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint112_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ur.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint112_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ur.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint112_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ur.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint112_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint112_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(ur.prototype[Symbol.dispose]=ur.prototype.free);const Md=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint12_free(n>>>0,1));class _r{static __wrap(t){t=t>>>0;const e=Object.create(_r.prototype);return e.__wbg_ptr=t,Md.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Md.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint12_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint12_deserialize(e,r);if(i[2])throw c(i[1]);return _r.__wrap(i[0])}safe_serialize(t){const e=s.fheint12_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint12_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return _r.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint12_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return _r.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint12_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return _r.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint12_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return _r.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint12_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint12_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(_r.prototype[Symbol.dispose]=_r.prototype.free);const jd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint120_free(n>>>0,1));class fr{static __wrap(t){t=t>>>0;const e=Object.create(fr.prototype);return e.__wbg_ptr=t,jd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,jd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint120_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint120_deserialize(e,r);if(i[2])throw c(i[1]);return fr.__wrap(i[0])}safe_serialize(t){const e=s.fheint120_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint120_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return fr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint120_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return fr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint120_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return fr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint120_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return fr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint120_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint120_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(fr.prototype[Symbol.dispose]=fr.prototype.free);const Gd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint128_free(n>>>0,1));class lr{static __wrap(t){t=t>>>0;const e=Object.create(lr.prototype);return e.__wbg_ptr=t,Gd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Gd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint128_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint128_deserialize(e,r);if(i[2])throw c(i[1]);return lr.__wrap(i[0])}safe_serialize(t){const e=s.fheint128_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint128_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return lr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint128_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return lr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint128_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return lr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint128_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return lr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint128_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint128_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(lr.prototype[Symbol.dispose]=lr.prototype.free);const Hd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint136_free(n>>>0,1));class hr{static __wrap(t){t=t>>>0;const e=Object.create(hr.prototype);return e.__wbg_ptr=t,Hd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Hd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint136_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint136_deserialize(e,r);if(i[2])throw c(i[1]);return hr.__wrap(i[0])}safe_serialize(t){const e=s.fheint136_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint136_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return hr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint136_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return hr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint136_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return hr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint136_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return hr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint136_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint136_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(hr.prototype[Symbol.dispose]=hr.prototype.free);const Vd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint14_free(n>>>0,1));class pr{static __wrap(t){t=t>>>0;const e=Object.create(pr.prototype);return e.__wbg_ptr=t,Vd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Vd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint14_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint14_deserialize(e,r);if(i[2])throw c(i[1]);return pr.__wrap(i[0])}safe_serialize(t){const e=s.fheint14_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint14_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return pr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint14_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return pr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint14_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return pr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint14_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return pr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint14_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint14_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(pr.prototype[Symbol.dispose]=pr.prototype.free);const qd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint144_free(n>>>0,1));class dr{static __wrap(t){t=t>>>0;const e=Object.create(dr.prototype);return e.__wbg_ptr=t,qd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,qd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint144_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint144_deserialize(e,r);if(i[2])throw c(i[1]);return dr.__wrap(i[0])}safe_serialize(t){const e=s.fheint144_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint144_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return dr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint144_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return dr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint144_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return dr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint144_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return dr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint144_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint144_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(dr.prototype[Symbol.dispose]=dr.prototype.free);const Qd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint152_free(n>>>0,1));class wr{static __wrap(t){t=t>>>0;const e=Object.create(wr.prototype);return e.__wbg_ptr=t,Qd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Qd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint152_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint152_deserialize(e,r);if(i[2])throw c(i[1]);return wr.__wrap(i[0])}safe_serialize(t){const e=s.fheint152_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint152_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return wr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint152_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return wr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint152_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return wr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint152_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return wr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint152_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint152_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(wr.prototype[Symbol.dispose]=wr.prototype.free);const Kd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint16_free(n>>>0,1));class gr{static __wrap(t){t=t>>>0;const e=Object.create(gr.prototype);return e.__wbg_ptr=t,Kd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Kd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint16_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint16_deserialize(e,r);if(i[2])throw c(i[1]);return gr.__wrap(i[0])}safe_serialize(t){const e=s.fheint16_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint16_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return gr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint16_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return gr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint16_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return gr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint16_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return gr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint16_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint16_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(gr.prototype[Symbol.dispose]=gr.prototype.free);const Wd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint160_free(n>>>0,1));class yr{static __wrap(t){t=t>>>0;const e=Object.create(yr.prototype);return e.__wbg_ptr=t,Wd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Wd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint160_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint160_deserialize(e,r);if(i[2])throw c(i[1]);return yr.__wrap(i[0])}safe_serialize(t){const e=s.fheint160_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint160_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return yr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint160_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return yr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint160_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return yr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint160_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return yr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint160_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint160_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(yr.prototype[Symbol.dispose]=yr.prototype.free);const Jd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint168_free(n>>>0,1));class br{static __wrap(t){t=t>>>0;const e=Object.create(br.prototype);return e.__wbg_ptr=t,Jd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Jd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint168_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint168_deserialize(e,r);if(i[2])throw c(i[1]);return br.__wrap(i[0])}safe_serialize(t){const e=s.fheint168_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint168_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return br.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint168_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return br.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint168_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return br.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint168_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return br.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint168_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint168_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(br.prototype[Symbol.dispose]=br.prototype.free);const $d=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint176_free(n>>>0,1));class mr{static __wrap(t){t=t>>>0;const e=Object.create(mr.prototype);return e.__wbg_ptr=t,$d.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,$d.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint176_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint176_deserialize(e,r);if(i[2])throw c(i[1]);return mr.__wrap(i[0])}safe_serialize(t){const e=s.fheint176_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint176_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return mr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint176_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return mr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint176_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return mr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint176_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return mr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint176_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint176_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(mr.prototype[Symbol.dispose]=mr.prototype.free);const Yd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint184_free(n>>>0,1));class Ar{static __wrap(t){t=t>>>0;const e=Object.create(Ar.prototype);return e.__wbg_ptr=t,Yd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Yd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint184_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint184_deserialize(e,r);if(i[2])throw c(i[1]);return Ar.__wrap(i[0])}safe_serialize(t){const e=s.fheint184_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint184_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Ar.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint184_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ar.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint184_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ar.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint184_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ar.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint184_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint184_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Ar.prototype[Symbol.dispose]=Ar.prototype.free);const Zd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint192_free(n>>>0,1));class Er{static __wrap(t){t=t>>>0;const e=Object.create(Er.prototype);return e.__wbg_ptr=t,Zd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Zd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint192_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint192_deserialize(e,r);if(i[2])throw c(i[1]);return Er.__wrap(i[0])}safe_serialize(t){const e=s.fheint192_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint192_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Er.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint192_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Er.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint192_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Er.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint192_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Er.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint192_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint192_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Er.prototype[Symbol.dispose]=Er.prototype.free);const Xd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint2_free(n>>>0,1));class vr{static __wrap(t){t=t>>>0;const e=Object.create(vr.prototype);return e.__wbg_ptr=t,Xd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Xd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint2_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint2_deserialize(e,r);if(i[2])throw c(i[1]);return vr.__wrap(i[0])}safe_serialize(t){const e=s.fheint2_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint2_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return vr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint2_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return vr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint2_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return vr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint2_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return vr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint2_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint2_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(vr.prototype[Symbol.dispose]=vr.prototype.free);const tw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint200_free(n>>>0,1));class xr{static __wrap(t){t=t>>>0;const e=Object.create(xr.prototype);return e.__wbg_ptr=t,tw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,tw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint200_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint200_deserialize(e,r);if(i[2])throw c(i[1]);return xr.__wrap(i[0])}safe_serialize(t){const e=s.fheint200_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint200_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return xr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint200_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return xr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint200_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return xr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint200_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return xr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint200_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint200_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(xr.prototype[Symbol.dispose]=xr.prototype.free);const ew=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint2048_free(n>>>0,1));class Rr{static __wrap(t){t=t>>>0;const e=Object.create(Rr.prototype);return e.__wbg_ptr=t,ew.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ew.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint2048_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint2048_deserialize(e,r);if(i[2])throw c(i[1]);return Rr.__wrap(i[0])}safe_serialize(t){const e=s.fheint2048_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint2048_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Rr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint2048_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Rr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint2048_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Rr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint2048_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Rr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint2048_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint2048_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Rr.prototype[Symbol.dispose]=Rr.prototype.free);const rw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint208_free(n>>>0,1));class Sr{static __wrap(t){t=t>>>0;const e=Object.create(Sr.prototype);return e.__wbg_ptr=t,rw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,rw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint208_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint208_deserialize(e,r);if(i[2])throw c(i[1]);return Sr.__wrap(i[0])}safe_serialize(t){const e=s.fheint208_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint208_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Sr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint208_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Sr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint208_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Sr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint208_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Sr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint208_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint208_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Sr.prototype[Symbol.dispose]=Sr.prototype.free);const nw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint216_free(n>>>0,1));class zr{static __wrap(t){t=t>>>0;const e=Object.create(zr.prototype);return e.__wbg_ptr=t,nw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,nw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint216_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint216_deserialize(e,r);if(i[2])throw c(i[1]);return zr.__wrap(i[0])}safe_serialize(t){const e=s.fheint216_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint216_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return zr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint216_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return zr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint216_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return zr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint216_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return zr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint216_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint216_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(zr.prototype[Symbol.dispose]=zr.prototype.free);const iw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint224_free(n>>>0,1));class Br{static __wrap(t){t=t>>>0;const e=Object.create(Br.prototype);return e.__wbg_ptr=t,iw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,iw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint224_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint224_deserialize(e,r);if(i[2])throw c(i[1]);return Br.__wrap(i[0])}safe_serialize(t){const e=s.fheint224_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint224_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Br.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint224_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Br.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint224_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Br.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint224_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Br.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint224_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint224_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Br.prototype[Symbol.dispose]=Br.prototype.free);const sw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint232_free(n>>>0,1));class kr{static __wrap(t){t=t>>>0;const e=Object.create(kr.prototype);return e.__wbg_ptr=t,sw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,sw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint232_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint232_deserialize(e,r);if(i[2])throw c(i[1]);return kr.__wrap(i[0])}safe_serialize(t){const e=s.fheint232_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint232_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return kr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint232_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return kr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint232_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return kr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint232_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return kr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint232_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint232_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(kr.prototype[Symbol.dispose]=kr.prototype.free);const ow=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint24_free(n>>>0,1));class Pr{static __wrap(t){t=t>>>0;const e=Object.create(Pr.prototype);return e.__wbg_ptr=t,ow.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ow.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint24_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint24_deserialize(e,r);if(i[2])throw c(i[1]);return Pr.__wrap(i[0])}safe_serialize(t){const e=s.fheint24_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint24_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Pr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint24_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Pr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint24_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Pr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint24_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Pr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint24_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint24_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Pr.prototype[Symbol.dispose]=Pr.prototype.free);const aw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint240_free(n>>>0,1));class Ir{static __wrap(t){t=t>>>0;const e=Object.create(Ir.prototype);return e.__wbg_ptr=t,aw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,aw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint240_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint240_deserialize(e,r);if(i[2])throw c(i[1]);return Ir.__wrap(i[0])}safe_serialize(t){const e=s.fheint240_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint240_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Ir.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint240_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ir.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint240_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ir.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint240_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ir.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint240_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint240_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Ir.prototype[Symbol.dispose]=Ir.prototype.free);const cw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint248_free(n>>>0,1));class Fr{static __wrap(t){t=t>>>0;const e=Object.create(Fr.prototype);return e.__wbg_ptr=t,cw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,cw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint248_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint248_deserialize(e,r);if(i[2])throw c(i[1]);return Fr.__wrap(i[0])}safe_serialize(t){const e=s.fheint248_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint248_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Fr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint248_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Fr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint248_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Fr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint248_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Fr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint248_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint248_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Fr.prototype[Symbol.dispose]=Fr.prototype.free);const uw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint256_free(n>>>0,1));class Or{static __wrap(t){t=t>>>0;const e=Object.create(Or.prototype);return e.__wbg_ptr=t,uw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,uw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint256_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint256_deserialize(e,r);if(i[2])throw c(i[1]);return Or.__wrap(i[0])}safe_serialize(t){const e=s.fheint256_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint256_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Or.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint256_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Or.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint256_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Or.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint256_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Or.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint256_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint256_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Or.prototype[Symbol.dispose]=Or.prototype.free);const _w=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint32_free(n>>>0,1));class Tr{static __wrap(t){t=t>>>0;const e=Object.create(Tr.prototype);return e.__wbg_ptr=t,_w.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,_w.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint32_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint32_deserialize(e,r);if(i[2])throw c(i[1]);return Tr.__wrap(i[0])}safe_serialize(t){const e=s.fheint32_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint32_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Tr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint32_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Tr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint32_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Tr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint32_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Tr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint32_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint32_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Tr.prototype[Symbol.dispose]=Tr.prototype.free);const fw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint4_free(n>>>0,1));class Cr{static __wrap(t){t=t>>>0;const e=Object.create(Cr.prototype);return e.__wbg_ptr=t,fw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,fw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint4_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint4_deserialize(e,r);if(i[2])throw c(i[1]);return Cr.__wrap(i[0])}safe_serialize(t){const e=s.fheint4_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint4_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Cr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint4_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Cr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint4_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Cr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint4_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Cr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint4_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint4_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Cr.prototype[Symbol.dispose]=Cr.prototype.free);const lw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint40_free(n>>>0,1));class Nr{static __wrap(t){t=t>>>0;const e=Object.create(Nr.prototype);return e.__wbg_ptr=t,lw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,lw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint40_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint40_deserialize(e,r);if(i[2])throw c(i[1]);return Nr.__wrap(i[0])}safe_serialize(t){const e=s.fheint40_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint40_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Nr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint40_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Nr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint40_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Nr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint40_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Nr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint40_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint40_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Nr.prototype[Symbol.dispose]=Nr.prototype.free);const hw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint48_free(n>>>0,1));class Lr{static __wrap(t){t=t>>>0;const e=Object.create(Lr.prototype);return e.__wbg_ptr=t,hw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,hw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint48_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint48_deserialize(e,r);if(i[2])throw c(i[1]);return Lr.__wrap(i[0])}safe_serialize(t){const e=s.fheint48_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint48_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Lr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint48_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Lr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint48_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Lr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint48_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Lr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint48_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint48_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Lr.prototype[Symbol.dispose]=Lr.prototype.free);const pw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint512_free(n>>>0,1));class Dr{static __wrap(t){t=t>>>0;const e=Object.create(Dr.prototype);return e.__wbg_ptr=t,pw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,pw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint512_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint512_deserialize(e,r);if(i[2])throw c(i[1]);return Dr.__wrap(i[0])}safe_serialize(t){const e=s.fheint512_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint512_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Dr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint512_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Dr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint512_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Dr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint512_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Dr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint512_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint512_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Dr.prototype[Symbol.dispose]=Dr.prototype.free);const dw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint56_free(n>>>0,1));class Ur{static __wrap(t){t=t>>>0;const e=Object.create(Ur.prototype);return e.__wbg_ptr=t,dw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,dw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint56_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint56_deserialize(e,r);if(i[2])throw c(i[1]);return Ur.__wrap(i[0])}safe_serialize(t){const e=s.fheint56_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint56_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Ur.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint56_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ur.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint56_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ur.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint56_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ur.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint56_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint56_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Ur.prototype[Symbol.dispose]=Ur.prototype.free);const ww=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint6_free(n>>>0,1));class Mr{static __wrap(t){t=t>>>0;const e=Object.create(Mr.prototype);return e.__wbg_ptr=t,ww.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ww.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint6_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint6_deserialize(e,r);if(i[2])throw c(i[1]);return Mr.__wrap(i[0])}safe_serialize(t){const e=s.fheint6_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint6_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Mr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint6_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Mr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint6_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Mr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint6_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Mr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint6_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint6_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Mr.prototype[Symbol.dispose]=Mr.prototype.free);const gw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint64_free(n>>>0,1));class jr{static __wrap(t){t=t>>>0;const e=Object.create(jr.prototype);return e.__wbg_ptr=t,gw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,gw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint64_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint64_deserialize(e,r);if(i[2])throw c(i[1]);return jr.__wrap(i[0])}safe_serialize(t){const e=s.fheint64_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint64_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return jr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint64_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return jr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint64_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return jr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint64_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return jr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint64_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint64_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(jr.prototype[Symbol.dispose]=jr.prototype.free);const yw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint72_free(n>>>0,1));class Gr{static __wrap(t){t=t>>>0;const e=Object.create(Gr.prototype);return e.__wbg_ptr=t,yw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,yw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint72_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint72_deserialize(e,r);if(i[2])throw c(i[1]);return Gr.__wrap(i[0])}safe_serialize(t){const e=s.fheint72_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint72_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Gr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint72_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Gr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint72_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Gr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint72_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Gr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint72_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint72_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Gr.prototype[Symbol.dispose]=Gr.prototype.free);const bw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint8_free(n>>>0,1));class Hr{static __wrap(t){t=t>>>0;const e=Object.create(Hr.prototype);return e.__wbg_ptr=t,bw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,bw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint8_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint8_deserialize(e,r);if(i[2])throw c(i[1]);return Hr.__wrap(i[0])}safe_serialize(t){const e=s.fheint8_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint8_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Hr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint8_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Hr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint8_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Hr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint8_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Hr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint8_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint8_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Hr.prototype[Symbol.dispose]=Hr.prototype.free);const mw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint80_free(n>>>0,1));class Vr{static __wrap(t){t=t>>>0;const e=Object.create(Vr.prototype);return e.__wbg_ptr=t,mw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,mw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint80_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint80_deserialize(e,r);if(i[2])throw c(i[1]);return Vr.__wrap(i[0])}safe_serialize(t){const e=s.fheint80_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint80_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Vr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint80_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Vr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint80_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Vr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint80_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Vr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint80_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint80_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Vr.prototype[Symbol.dispose]=Vr.prototype.free);const Aw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint88_free(n>>>0,1));class qr{static __wrap(t){t=t>>>0;const e=Object.create(qr.prototype);return e.__wbg_ptr=t,Aw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Aw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint88_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint88_deserialize(e,r);if(i[2])throw c(i[1]);return qr.__wrap(i[0])}safe_serialize(t){const e=s.fheint88_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint88_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return qr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint88_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return qr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint88_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return qr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint88_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return qr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint88_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint88_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(qr.prototype[Symbol.dispose]=qr.prototype.free);const Ew=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint96_free(n>>>0,1));class Qr{static __wrap(t){t=t>>>0;const e=Object.create(Qr.prototype);return e.__wbg_ptr=t,Ew.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ew.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint96_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint96_deserialize(e,r);if(i[2])throw c(i[1]);return Qr.__wrap(i[0])}safe_serialize(t){const e=s.fheint96_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint96_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Qr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheint96_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Qr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheint96_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Qr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheint96_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Qr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheint96_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint96_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Qr.prototype[Symbol.dispose]=Qr.prototype.free);const vw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint10_free(n>>>0,1));class Kr{static __wrap(t){t=t>>>0;const e=Object.create(Kr.prototype);return e.__wbg_ptr=t,vw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,vw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint10_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint10_deserialize(e,r);if(i[2])throw c(i[1]);return Kr.__wrap(i[0])}safe_serialize(t){const e=s.fheuint10_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint10_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Kr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint10_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Kr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint10_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Kr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint10_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Kr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint10_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheuint10_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Kr.prototype[Symbol.dispose]=Kr.prototype.free);const xw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint1024_free(n>>>0,1));class Wr{static __wrap(t){t=t>>>0;const e=Object.create(Wr.prototype);return e.__wbg_ptr=t,xw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,xw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint1024_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint1024_deserialize(e,r);if(i[2])throw c(i[1]);return Wr.__wrap(i[0])}safe_serialize(t){const e=s.fheuint1024_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint1024_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Wr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint1024_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Wr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint1024_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Wr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint1024_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Wr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint1024_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint1024_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Wr.prototype[Symbol.dispose]=Wr.prototype.free);const Rw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint104_free(n>>>0,1));class Jr{static __wrap(t){t=t>>>0;const e=Object.create(Jr.prototype);return e.__wbg_ptr=t,Rw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Rw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint104_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint104_deserialize(e,r);if(i[2])throw c(i[1]);return Jr.__wrap(i[0])}safe_serialize(t){const e=s.fheuint104_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint104_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Jr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint104_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Jr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint104_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Jr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint104_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Jr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint104_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint104_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Jr.prototype[Symbol.dispose]=Jr.prototype.free);const Sw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint112_free(n>>>0,1));class $r{static __wrap(t){t=t>>>0;const e=Object.create($r.prototype);return e.__wbg_ptr=t,Sw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Sw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint112_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint112_deserialize(e,r);if(i[2])throw c(i[1]);return $r.__wrap(i[0])}safe_serialize(t){const e=s.fheuint112_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint112_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return $r.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint112_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return $r.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint112_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return $r.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint112_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return $r.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint112_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint112_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&($r.prototype[Symbol.dispose]=$r.prototype.free);const zw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint12_free(n>>>0,1));class Yr{static __wrap(t){t=t>>>0;const e=Object.create(Yr.prototype);return e.__wbg_ptr=t,zw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,zw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint12_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint12_deserialize(e,r);if(i[2])throw c(i[1]);return Yr.__wrap(i[0])}safe_serialize(t){const e=s.fheuint12_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint12_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Yr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint12_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Yr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint12_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Yr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint12_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Yr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint12_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheuint12_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Yr.prototype[Symbol.dispose]=Yr.prototype.free);const Bw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint120_free(n>>>0,1));class Zr{static __wrap(t){t=t>>>0;const e=Object.create(Zr.prototype);return e.__wbg_ptr=t,Bw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Bw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint120_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint120_deserialize(e,r);if(i[2])throw c(i[1]);return Zr.__wrap(i[0])}safe_serialize(t){const e=s.fheuint120_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint120_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Zr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint120_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Zr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint120_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Zr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint120_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Zr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint120_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint120_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Zr.prototype[Symbol.dispose]=Zr.prototype.free);const kw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint128_free(n>>>0,1));class Xr{static __wrap(t){t=t>>>0;const e=Object.create(Xr.prototype);return e.__wbg_ptr=t,kw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,kw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint128_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint128_deserialize(e,r);if(i[2])throw c(i[1]);return Xr.__wrap(i[0])}safe_serialize(t){const e=s.fheuint128_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint128_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Xr.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint128_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Xr.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint128_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Xr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint128_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Xr.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint128_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint128_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Xr.prototype[Symbol.dispose]=Xr.prototype.free);const Pw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint136_free(n>>>0,1));class tn{static __wrap(t){t=t>>>0;const e=Object.create(tn.prototype);return e.__wbg_ptr=t,Pw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Pw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint136_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint136_deserialize(e,r);if(i[2])throw c(i[1]);return tn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint136_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint136_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return tn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint136_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return tn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint136_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return tn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint136_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return tn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint136_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint136_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(tn.prototype[Symbol.dispose]=tn.prototype.free);const Iw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint14_free(n>>>0,1));class en{static __wrap(t){t=t>>>0;const e=Object.create(en.prototype);return e.__wbg_ptr=t,Iw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Iw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint14_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint14_deserialize(e,r);if(i[2])throw c(i[1]);return en.__wrap(i[0])}safe_serialize(t){const e=s.fheuint14_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint14_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return en.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint14_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return en.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint14_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return en.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint14_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return en.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint14_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheuint14_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(en.prototype[Symbol.dispose]=en.prototype.free);const Fw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint144_free(n>>>0,1));class rn{static __wrap(t){t=t>>>0;const e=Object.create(rn.prototype);return e.__wbg_ptr=t,Fw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Fw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint144_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint144_deserialize(e,r);if(i[2])throw c(i[1]);return rn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint144_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint144_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return rn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint144_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return rn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint144_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return rn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint144_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return rn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint144_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint144_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(rn.prototype[Symbol.dispose]=rn.prototype.free);const Ow=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint152_free(n>>>0,1));class nn{static __wrap(t){t=t>>>0;const e=Object.create(nn.prototype);return e.__wbg_ptr=t,Ow.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ow.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint152_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint152_deserialize(e,r);if(i[2])throw c(i[1]);return nn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint152_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint152_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return nn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint152_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return nn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint152_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return nn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint152_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return nn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint152_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint152_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(nn.prototype[Symbol.dispose]=nn.prototype.free);const Tw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint16_free(n>>>0,1));class sn{static __wrap(t){t=t>>>0;const e=Object.create(sn.prototype);return e.__wbg_ptr=t,Tw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Tw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint16_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint16_deserialize(e,r);if(i[2])throw c(i[1]);return sn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint16_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint16_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return sn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint16_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return sn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint16_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return sn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint16_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return sn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint16_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheuint16_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(sn.prototype[Symbol.dispose]=sn.prototype.free);const Cw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint160_free(n>>>0,1));class on{static __wrap(t){t=t>>>0;const e=Object.create(on.prototype);return e.__wbg_ptr=t,Cw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Cw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint160_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint160_deserialize(e,r);if(i[2])throw c(i[1]);return on.__wrap(i[0])}safe_serialize(t){const e=s.fheuint160_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint160_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return on.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint160_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return on.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint160_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return on.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint160_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return on.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint160_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint160_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(on.prototype[Symbol.dispose]=on.prototype.free);const Nw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint168_free(n>>>0,1));class an{static __wrap(t){t=t>>>0;const e=Object.create(an.prototype);return e.__wbg_ptr=t,Nw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Nw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint168_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint168_deserialize(e,r);if(i[2])throw c(i[1]);return an.__wrap(i[0])}safe_serialize(t){const e=s.fheuint168_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint168_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return an.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint168_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return an.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint168_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return an.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint168_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return an.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint168_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint168_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(an.prototype[Symbol.dispose]=an.prototype.free);const Lw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint176_free(n>>>0,1));class cn{static __wrap(t){t=t>>>0;const e=Object.create(cn.prototype);return e.__wbg_ptr=t,Lw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Lw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint176_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint176_deserialize(e,r);if(i[2])throw c(i[1]);return cn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint176_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint176_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return cn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint176_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return cn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint176_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return cn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint176_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return cn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint176_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint176_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(cn.prototype[Symbol.dispose]=cn.prototype.free);const Dw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint184_free(n>>>0,1));class un{static __wrap(t){t=t>>>0;const e=Object.create(un.prototype);return e.__wbg_ptr=t,Dw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Dw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint184_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint184_deserialize(e,r);if(i[2])throw c(i[1]);return un.__wrap(i[0])}safe_serialize(t){const e=s.fheuint184_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint184_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return un.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint184_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return un.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint184_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return un.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint184_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return un.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint184_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint184_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(un.prototype[Symbol.dispose]=un.prototype.free);const Uw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint192_free(n>>>0,1));class _n{static __wrap(t){t=t>>>0;const e=Object.create(_n.prototype);return e.__wbg_ptr=t,Uw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Uw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint192_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint192_deserialize(e,r);if(i[2])throw c(i[1]);return _n.__wrap(i[0])}safe_serialize(t){const e=s.fheuint192_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint192_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return _n.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint192_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return _n.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint192_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return _n.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint192_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return _n.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint192_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint192_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(_n.prototype[Symbol.dispose]=_n.prototype.free);const Mw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint2_free(n>>>0,1));class fn{static __wrap(t){t=t>>>0;const e=Object.create(fn.prototype);return e.__wbg_ptr=t,Mw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Mw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint2_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint2_deserialize(e,r);if(i[2])throw c(i[1]);return fn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint2_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint2_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return fn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint2_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return fn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint2_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return fn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint2_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return fn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint2_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheuint2_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(fn.prototype[Symbol.dispose]=fn.prototype.free);const jw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint200_free(n>>>0,1));class ln{static __wrap(t){t=t>>>0;const e=Object.create(ln.prototype);return e.__wbg_ptr=t,jw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,jw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint200_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint200_deserialize(e,r);if(i[2])throw c(i[1]);return ln.__wrap(i[0])}safe_serialize(t){const e=s.fheuint200_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint200_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return ln.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint200_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ln.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint200_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ln.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint200_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ln.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint200_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint200_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(ln.prototype[Symbol.dispose]=ln.prototype.free);const Gw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint2048_free(n>>>0,1));class hn{static __wrap(t){t=t>>>0;const e=Object.create(hn.prototype);return e.__wbg_ptr=t,Gw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Gw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint2048_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint2048_deserialize(e,r);if(i[2])throw c(i[1]);return hn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint2048_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint2048_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return hn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint2048_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return hn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint2048_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return hn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint2048_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return hn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint2048_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint2048_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(hn.prototype[Symbol.dispose]=hn.prototype.free);const Hw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint208_free(n>>>0,1));class pn{static __wrap(t){t=t>>>0;const e=Object.create(pn.prototype);return e.__wbg_ptr=t,Hw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Hw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint208_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint208_deserialize(e,r);if(i[2])throw c(i[1]);return pn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint208_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint208_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return pn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint208_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return pn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint208_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return pn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint208_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return pn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint208_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint208_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(pn.prototype[Symbol.dispose]=pn.prototype.free);const Vw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint216_free(n>>>0,1));class dn{static __wrap(t){t=t>>>0;const e=Object.create(dn.prototype);return e.__wbg_ptr=t,Vw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Vw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint216_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint216_deserialize(e,r);if(i[2])throw c(i[1]);return dn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint216_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint216_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return dn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint216_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return dn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint216_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return dn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint216_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return dn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint216_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint216_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(dn.prototype[Symbol.dispose]=dn.prototype.free);const qw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint224_free(n>>>0,1));class wn{static __wrap(t){t=t>>>0;const e=Object.create(wn.prototype);return e.__wbg_ptr=t,qw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,qw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint224_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint224_deserialize(e,r);if(i[2])throw c(i[1]);return wn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint224_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint224_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return wn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint224_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return wn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint224_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return wn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint224_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return wn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint224_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint224_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(wn.prototype[Symbol.dispose]=wn.prototype.free);const Qw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint232_free(n>>>0,1));class gn{static __wrap(t){t=t>>>0;const e=Object.create(gn.prototype);return e.__wbg_ptr=t,Qw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Qw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint232_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint232_deserialize(e,r);if(i[2])throw c(i[1]);return gn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint232_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint232_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return gn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint232_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return gn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint232_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return gn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint232_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return gn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint232_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint232_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(gn.prototype[Symbol.dispose]=gn.prototype.free);const Kw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint24_free(n>>>0,1));class yn{static __wrap(t){t=t>>>0;const e=Object.create(yn.prototype);return e.__wbg_ptr=t,Kw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Kw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint24_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint24_deserialize(e,r);if(i[2])throw c(i[1]);return yn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint24_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint24_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return yn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint24_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return yn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint24_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return yn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint24_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return yn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint24_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]>>>0}serialize(){const t=s.fheuint24_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(yn.prototype[Symbol.dispose]=yn.prototype.free);const Ww=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint240_free(n>>>0,1));class bn{static __wrap(t){t=t>>>0;const e=Object.create(bn.prototype);return e.__wbg_ptr=t,Ww.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ww.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint240_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint240_deserialize(e,r);if(i[2])throw c(i[1]);return bn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint240_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint240_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return bn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint240_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return bn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint240_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return bn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint240_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return bn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint240_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint240_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(bn.prototype[Symbol.dispose]=bn.prototype.free);const Jw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint248_free(n>>>0,1));class mn{static __wrap(t){t=t>>>0;const e=Object.create(mn.prototype);return e.__wbg_ptr=t,Jw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Jw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint248_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint248_deserialize(e,r);if(i[2])throw c(i[1]);return mn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint248_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint248_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return mn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint248_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return mn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint248_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return mn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint248_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return mn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint248_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint248_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(mn.prototype[Symbol.dispose]=mn.prototype.free);const $w=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint256_free(n>>>0,1));class An{static __wrap(t){t=t>>>0;const e=Object.create(An.prototype);return e.__wbg_ptr=t,$w.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,$w.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint256_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint256_deserialize(e,r);if(i[2])throw c(i[1]);return An.__wrap(i[0])}safe_serialize(t){const e=s.fheuint256_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint256_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return An.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint256_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return An.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint256_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return An.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint256_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return An.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint256_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint256_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(An.prototype[Symbol.dispose]=An.prototype.free);const Yw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint32_free(n>>>0,1));class En{static __wrap(t){t=t>>>0;const e=Object.create(En.prototype);return e.__wbg_ptr=t,Yw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Yw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint32_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint32_deserialize(e,r);if(i[2])throw c(i[1]);return En.__wrap(i[0])}safe_serialize(t){const e=s.fheuint32_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint32_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return En.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint32_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return En.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint32_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return En.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint32_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return En.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint32_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]>>>0}serialize(){const t=s.fheuint32_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(En.prototype[Symbol.dispose]=En.prototype.free);const Zw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint4_free(n>>>0,1));class vn{static __wrap(t){t=t>>>0;const e=Object.create(vn.prototype);return e.__wbg_ptr=t,Zw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Zw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint4_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint4_deserialize(e,r);if(i[2])throw c(i[1]);return vn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint4_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint4_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return vn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint4_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return vn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint4_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return vn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint4_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return vn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint4_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheuint4_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(vn.prototype[Symbol.dispose]=vn.prototype.free);const Xw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint40_free(n>>>0,1));class xn{static __wrap(t){t=t>>>0;const e=Object.create(xn.prototype);return e.__wbg_ptr=t,Xw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Xw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint40_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint40_deserialize(e,r);if(i[2])throw c(i[1]);return xn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint40_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint40_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return xn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint40_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return xn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint40_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return xn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint40_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return xn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint40_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return BigInt.asUintN(64,e[0])}serialize(){const t=s.fheuint40_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(xn.prototype[Symbol.dispose]=xn.prototype.free);const tg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint48_free(n>>>0,1));class Rn{static __wrap(t){t=t>>>0;const e=Object.create(Rn.prototype);return e.__wbg_ptr=t,tg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,tg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint48_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint48_deserialize(e,r);if(i[2])throw c(i[1]);return Rn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint48_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint48_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Rn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint48_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Rn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint48_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Rn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint48_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Rn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint48_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return BigInt.asUintN(64,e[0])}serialize(){const t=s.fheuint48_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Rn.prototype[Symbol.dispose]=Rn.prototype.free);const eg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint512_free(n>>>0,1));class Sn{static __wrap(t){t=t>>>0;const e=Object.create(Sn.prototype);return e.__wbg_ptr=t,eg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,eg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint512_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint512_deserialize(e,r);if(i[2])throw c(i[1]);return Sn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint512_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint512_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Sn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint512_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Sn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint512_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Sn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint512_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Sn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint512_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint512_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Sn.prototype[Symbol.dispose]=Sn.prototype.free);const rg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint56_free(n>>>0,1));class zn{static __wrap(t){t=t>>>0;const e=Object.create(zn.prototype);return e.__wbg_ptr=t,rg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,rg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint56_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint56_deserialize(e,r);if(i[2])throw c(i[1]);return zn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint56_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint56_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return zn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint56_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return zn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint56_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return zn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint56_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return zn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint56_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return BigInt.asUintN(64,e[0])}serialize(){const t=s.fheuint56_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(zn.prototype[Symbol.dispose]=zn.prototype.free);const ng=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint6_free(n>>>0,1));class Bn{static __wrap(t){t=t>>>0;const e=Object.create(Bn.prototype);return e.__wbg_ptr=t,ng.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ng.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint6_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint6_deserialize(e,r);if(i[2])throw c(i[1]);return Bn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint6_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint6_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Bn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint6_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Bn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint6_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Bn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint6_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Bn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint6_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheuint6_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Bn.prototype[Symbol.dispose]=Bn.prototype.free);const ig=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint64_free(n>>>0,1));class kn{static __wrap(t){t=t>>>0;const e=Object.create(kn.prototype);return e.__wbg_ptr=t,ig.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ig.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint64_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint64_deserialize(e,r);if(i[2])throw c(i[1]);return kn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint64_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint64_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return kn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint64_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return kn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint64_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return kn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint64_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return kn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint64_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return BigInt.asUintN(64,e[0])}serialize(){const t=s.fheuint64_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(kn.prototype[Symbol.dispose]=kn.prototype.free);const sg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint72_free(n>>>0,1));class Pn{static __wrap(t){t=t>>>0;const e=Object.create(Pn.prototype);return e.__wbg_ptr=t,sg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,sg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint72_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint72_deserialize(e,r);if(i[2])throw c(i[1]);return Pn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint72_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint72_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Pn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint72_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Pn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint72_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Pn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint72_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Pn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint72_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint72_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Pn.prototype[Symbol.dispose]=Pn.prototype.free);const og=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint8_free(n>>>0,1));class In{static __wrap(t){t=t>>>0;const e=Object.create(In.prototype);return e.__wbg_ptr=t,og.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,og.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint8_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint8_deserialize(e,r);if(i[2])throw c(i[1]);return In.__wrap(i[0])}safe_serialize(t){const e=s.fheuint8_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint8_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return In.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint8_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return In.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint8_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return In.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint8_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return In.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint8_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheuint8_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(In.prototype[Symbol.dispose]=In.prototype.free);const ag=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint80_free(n>>>0,1));class Fn{static __wrap(t){t=t>>>0;const e=Object.create(Fn.prototype);return e.__wbg_ptr=t,ag.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ag.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint80_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint80_deserialize(e,r);if(i[2])throw c(i[1]);return Fn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint80_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint80_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Fn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint80_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Fn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint80_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Fn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint80_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Fn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint80_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint80_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Fn.prototype[Symbol.dispose]=Fn.prototype.free);const cg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint88_free(n>>>0,1));class On{static __wrap(t){t=t>>>0;const e=Object.create(On.prototype);return e.__wbg_ptr=t,cg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,cg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint88_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint88_deserialize(e,r);if(i[2])throw c(i[1]);return On.__wrap(i[0])}safe_serialize(t){const e=s.fheuint88_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint88_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return On.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint88_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return On.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint88_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return On.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint88_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return On.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint88_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint88_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(On.prototype[Symbol.dispose]=On.prototype.free);const ug=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint96_free(n>>>0,1));class Tn{static __wrap(t){t=t>>>0;const e=Object.create(Tn.prototype);return e.__wbg_ptr=t,ug.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ug.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint96_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint96_deserialize(e,r);if(i[2])throw c(i[1]);return Tn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint96_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint96_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Tn.__wrap(o[0])}static encrypt_with_client_key(t,e){A(e,K);const r=s.fheuint96_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Tn.__wrap(r[0])}static encrypt_with_public_key(t,e){A(e,ht);const r=s.fheuint96_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Tn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){A(e,dt);const r=s.fheuint96_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Tn.__wrap(r[0])}decrypt(t){A(t,K);const e=s.fheuint96_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint96_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Tn.prototype[Symbol.dispose]=Tn.prototype.free);const _g=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_provencompactciphertextlist_free(n>>>0,1));class di{static __wrap(t){t=t>>>0;const e=Object.create(di.prototype);return e.__wbg_ptr=t,_g.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,_g.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_provencompactciphertextlist_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.provencompactciphertextlist_deserialize(e,r);if(i[2])throw c(i[1]);return di.__wrap(i[0])}get_kind_of(t){const e=s.provencompactciphertextlist_get_kind_of(this.__wbg_ptr,t);return e===84?void 0:e}safe_serialize(t){const e=s.provencompactciphertextlist_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.provencompactciphertextlist_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return di.__wrap(o[0])}verify_and_expand(t,e,r){A(t,Ue),A(e,Me);const i=q(r,s.__wbindgen_malloc),o=j,a=s.provencompactciphertextlist_verify_and_expand(this.__wbg_ptr,t.__wbg_ptr,e.__wbg_ptr,i,o);if(a[2])throw c(a[1]);return pi.__wrap(a[0])}expand_without_verification(){const t=s.provencompactciphertextlist_expand_without_verification(this.__wbg_ptr);if(t[2])throw c(t[1]);return pi.__wrap(t[0])}len(){return s.compactciphertextlistexpander_len(this.__wbg_ptr)>>>0}static builder(t){A(t,Me);const e=s.provencompactciphertextlist_builder(t.__wbg_ptr);if(e[2])throw c(e[1]);return Ui.__wrap(e[0])}is_empty(){return s.compactciphertextlistexpander_is_empty(this.__wbg_ptr)!==0}serialize(){const t=s.provencompactciphertextlist_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(di.prototype[Symbol.dispose]=di.prototype.free),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_shortint_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_shortintciphertext_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_shortintclientkey_free(n>>>0,1));const Wu=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_shortintcompactpublickeyencryptionparameters_free(n>>>0,1));class Mi{static __wrap(t){t=t>>>0;const e=Object.create(Mi.prototype);return e.__wbg_ptr=t,Wu.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Wu.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_shortintcompactpublickeyencryptionparameters_free(t,0)}static new_parameters(t,e,r,i,o,a,u,_){A(e,ms);const l=s.shortintcompactpublickeyencryptionparameters_new_parameters(t,e.__wbg_ptr,r,i,o,a,u,_);if(l[2])throw c(l[1]);return Mi.__wrap(l[0])}constructor(t){const e=s.shortintcompactpublickeyencryptionparameters_new(t);return this.__wbg_ptr=e>>>0,Wu.register(this,this.__wbg_ptr,this),this}}Symbol.dispose&&(Mi.prototype[Symbol.dispose]=Mi.prototype.free),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_shortintcompressedciphertext_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_shortintcompressedpublickey_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_shortintcompressedserverkey_free(n>>>0,1));const fg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_shortintnoisedistribution_free(n>>>0,1));class ms{static __wrap(t){t=t>>>0;const e=Object.create(ms.prototype);return e.__wbg_ptr=t,fg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,fg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_shortintnoisedistribution_free(t,0)}}Symbol.dispose&&(ms.prototype[Symbol.dispose]=ms.prototype.free),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_shortintparameters_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_shortintpublickey_free(n>>>0,1));const lg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfheclientkey_free(n>>>0,1));class K{static __wrap(t){t=t>>>0;const e=Object.create(K.prototype);return e.__wbg_ptr=t,lg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,lg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_tfheclientkey_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.tfheclientkey_deserialize(e,r);if(i[2])throw c(i[1]);return K.__wrap(i[0])}safe_serialize(t){const e=s.tfheclientkey_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.tfheclientkey_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return K.__wrap(o[0])}static generate_with_seed(t,e){A(t,wi);const r=s.tfheclientkey_generate_with_seed(t.__wbg_ptr,e);if(r[2])throw c(r[1]);return K.__wrap(r[0])}static generate(t){A(t,wi);const e=s.tfheclientkey_generate(t.__wbg_ptr);if(e[2])throw c(e[1]);return K.__wrap(e[0])}serialize(){const t=s.tfheclientkey_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(K.prototype[Symbol.dispose]=K.prototype.free);const hg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfhecompactpublickey_free(n>>>0,1));class Me{static __wrap(t){t=t>>>0;const e=Object.create(Me.prototype);return e.__wbg_ptr=t,hg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,hg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_tfhecompactpublickey_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.tfhecompactpublickey_deserialize(e,r);if(i[2])throw c(i[1]);return Me.__wrap(i[0])}safe_serialize(t){const e=s.tfhecompactpublickey_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.tfhecompactpublickey_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Me.__wrap(o[0])}static safe_deserialize_conformant(t,e,r){const i=q(t,s.__wbindgen_malloc),o=j;A(r,Mi);const a=s.tfhecompactpublickey_safe_deserialize_conformant(i,o,e,r.__wbg_ptr);if(a[2])throw c(a[1]);return Me.__wrap(a[0])}static new(t){A(t,K);const e=s.tfhecompactpublickey_new(t.__wbg_ptr);if(e[2])throw c(e[1]);return Me.__wrap(e[0])}serialize(){const t=s.tfhecompactpublickey_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(Me.prototype[Symbol.dispose]=Me.prototype.free),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_tfhecompressedcompactpublickey_free(n>>>0,1));const pg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfhecompressedpublickey_free(n>>>0,1));class dt{static __wrap(t){t=t>>>0;const e=Object.create(dt.prototype);return e.__wbg_ptr=t,pg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,pg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_tfhecompressedpublickey_free(t,0)}decompress(){const t=s.tfhecompressedpublickey_decompress(this.__wbg_ptr);if(t[2])throw c(t[1]);return ht.__wrap(t[0])}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.tfhecompressedpublickey_deserialize(e,r);if(i[2])throw c(i[1]);return dt.__wrap(i[0])}safe_serialize(t){const e=s.tfhecompressedpublickey_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.tfhecompressedpublickey_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return dt.__wrap(o[0])}static new(t){A(t,K);const e=s.tfhecompressedpublickey_new(t.__wbg_ptr);if(e[2])throw c(e[1]);return dt.__wrap(e[0])}serialize(){const t=s.tfhecompressedpublickey_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(dt.prototype[Symbol.dispose]=dt.prototype.free),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_tfhecompressedserverkey_free(n>>>0,1));const dg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfheconfig_free(n>>>0,1));class wi{static __wrap(t){t=t>>>0;const e=Object.create(wi.prototype);return e.__wbg_ptr=t,dg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,dg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_tfheconfig_free(t,0)}}Symbol.dispose&&(wi.prototype[Symbol.dispose]=wi.prototype.free),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_tfheconfigbuilder_free(n>>>0,1));const wg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfhepublickey_free(n>>>0,1));class ht{static __wrap(t){t=t>>>0;const e=Object.create(ht.prototype);return e.__wbg_ptr=t,wg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,wg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_tfhepublickey_free(t,0)}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.tfhepublickey_deserialize(e,r);if(i[2])throw c(i[1]);return ht.__wrap(i[0])}safe_serialize(t){const e=s.tfhepublickey_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.tfhepublickey_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return ht.__wrap(o[0])}static new(t){A(t,K);const e=s.tfhepublickey_new(t.__wbg_ptr);if(e[2])throw c(e[1]);return ht.__wrap(e[0])}serialize(){const t=s.tfhepublickey_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}}Symbol.dispose&&(ht.prototype[Symbol.dispose]=ht.prototype.free),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_tfheserverkey_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_tfhe_free(n>>>0,1));const gg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_wbg_rayon_poolbuilder_free(n>>>0,1));class As{static __wrap(t){t=t>>>0;const e=Object.create(As.prototype);return e.__wbg_ptr=t,gg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,gg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_wbg_rayon_poolbuilder_free(t,0)}numThreads(){return s.wbg_rayon_poolbuilder_numThreads(this.__wbg_ptr)>>>0}build(){s.wbg_rayon_poolbuilder_build(this.__wbg_ptr)}receiver(){return s.wbg_rayon_poolbuilder_receiver(this.__wbg_ptr)>>>0}}Symbol.dispose&&(As.prototype[Symbol.dispose]=As.prototype.free);const T2=new Set(["basic","cors","default"]);async function C2(n,t){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,t)}catch(r){if(n.ok&&T2.has(n.type)&&n.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}const e=await n.arrayBuffer();return await WebAssembly.instantiate(e,t)}else{const e=await WebAssembly.instantiate(n,t);return e instanceof WebAssembly.Instance?{instance:e,module:n}:e}}function N2(){const n={};return n.wbg={},n.wbg.__wbg_BigInt_40a77d45cca49470=function(){return ys(function(t){return BigInt(t)},arguments)},n.wbg.__wbg_BigInt_6adbfd8eb0f7ec07=function(t){return BigInt(t)},n.wbg.__wbg_Error_e17e777aac105295=function(t,e){return Error(Ys(t,e))},n.wbg.__wbg_call_13410aac570ffff7=function(){return ys(function(t,e){return t.call(e)},arguments)},n.wbg.__wbg_call_a5400b25a865cfd8=function(){return ys(function(t,e,r){return t.call(e,r)},arguments)},n.wbg.__wbg_crypto_574e78ad8b13b65f=function(t){return t.crypto},n.wbg.__wbg_error_7534b8e9a36f1ab4=function(t,e){let r,i;try{r=t,i=e,console.error(Ys(t,e))}finally{s.__wbindgen_free(r,i,1)}},n.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e=function(){return ys(function(t,e){t.getRandomValues(e)},arguments)},n.wbg.__wbg_getTime_6bb3f64e0f18f817=function(t){return t.getTime()},n.wbg.__wbg_instanceof_Window_12d20d558ef92592=function(t){let e;try{e=t instanceof Window}catch{e=!1}return e},n.wbg.__wbg_length_6bb7e81f9d7713e4=function(t){return t.length},n.wbg.__wbg_msCrypto_a61aeb35a24c1329=function(t){return t.msCrypto},n.wbg.__wbg_new0_b0a0a38c201e6df5=function(){return new Date},n.wbg.__wbg_new_8a6f238a6ece86ea=function(){return new Error},n.wbg.__wbg_newnoargs_254190557c45b4ec=function(t,e){return new Function(Ys(t,e))},n.wbg.__wbg_newwithlength_a167dcc7aaa3ba77=function(t){return new Uint8Array(t>>>0)},n.wbg.__wbg_node_905d3e251edff8a2=function(t){return t.node},n.wbg.__wbg_process_dc0fbacc7c1c06f7=function(t){return t.process},n.wbg.__wbg_prototypesetcall_3d4a26c1ed734349=function(t,e,r){Uint8Array.prototype.set.call(Q(t,e),r)},n.wbg.__wbg_randomFillSync_ac0988aba3254290=function(){return ys(function(t,e){t.randomFillSync(e)},arguments)},n.wbg.__wbg_require_60cc747a6bc5215a=function(){return ys(function(){return module.require},arguments)},n.wbg.__wbg_stack_0ed75d68575b0f3c=function(t,e){const r=e.stack,i=na(r,s.__wbindgen_malloc,s.__wbindgen_realloc),o=j;Hn().setInt32(t+4*1,o,!0),Hn().setInt32(t+4*0,i,!0)},n.wbg.__wbg_startWorkers_2ca11761e08ff5d5=function(t,e,r){return P2(t,e,As.__wrap(r))},n.wbg.__wbg_static_accessor_GLOBAL_8921f820c2ce3f12=function(){const t=typeof ta>"u"?null:ta;return Di(t)?0:Js(t)},n.wbg.__wbg_static_accessor_GLOBAL_THIS_f0a4409105898184=function(){const t=typeof globalThis>"u"?null:globalThis;return Di(t)?0:Js(t)},n.wbg.__wbg_static_accessor_SELF_995b214ae681ff99=function(){const t=typeof self>"u"?null:self;return Di(t)?0:Js(t)},n.wbg.__wbg_static_accessor_WINDOW_cde3890479c675ea=function(){const t=typeof window>"u"?null:window;return Di(t)?0:Js(t)},n.wbg.__wbg_subarray_70fd07feefe14294=function(t,e,r){return t.subarray(e>>>0,r>>>0)},n.wbg.__wbg_toString_1f1286a7a97689fe=function(t,e,r){const i=e.toString(r),o=na(i,s.__wbindgen_malloc,s.__wbindgen_realloc),a=j;Hn().setInt32(t+4*1,a,!0),Hn().setInt32(t+4*0,o,!0)},n.wbg.__wbg_toString_d8f537919ef401d6=function(t){return t.toString()},n.wbg.__wbg_versions_c01dfd4722a88165=function(t){return t.versions},n.wbg.__wbg_wbindgenbigintgetasi64_ac743ece6ab9bba1=function(t,e){const r=e,i=typeof r=="bigint"?r:void 0;Hn().setBigInt64(t+8*1,Di(i)?BigInt(0):i,!0),Hn().setInt32(t+4*0,!Di(i),!0)},n.wbg.__wbg_wbindgenbitand_24bfc92ff26d44cb=function(t,e){return t&e},n.wbg.__wbg_wbindgenbitor_87169f71f306a104=function(t,e){return t|e},n.wbg.__wbg_wbindgendebugstring_99ef257a3ddda34d=function(t,e){const r=qu(e),i=na(r,s.__wbindgen_malloc,s.__wbindgen_realloc),o=j;Hn().setInt32(t+4*1,o,!0),Hn().setInt32(t+4*0,i,!0)},n.wbg.__wbg_wbindgenisfunction_8cee7dce3725ae74=function(t){return typeof t=="function"},n.wbg.__wbg_wbindgenisobject_307a53c6bd97fbf8=function(t){const e=t;return typeof e=="object"&&e!==null},n.wbg.__wbg_wbindgenisstring_d4fa939789f003b0=function(t){return typeof t=="string"},n.wbg.__wbg_wbindgenisundefined_c4b71d073b92f3c5=function(t){return t===void 0},n.wbg.__wbg_wbindgenjsvaleq_e6f2ad59ccae1b58=function(t,e){return t===e},n.wbg.__wbg_wbindgenlt_544155a2b3097bd5=function(t,e){return t<e},n.wbg.__wbg_wbindgenmemory_d84da70f7c42d172=function(){return s.memory},n.wbg.__wbg_wbindgenmodule_7e59019f6366ff9c=function(){return Xs.__wbindgen_wasm_module},n.wbg.__wbg_wbindgenneg_3577d8a6fd6fd98b=function(t){return-t},n.wbg.__wbg_wbindgenshl_54c6fe049ff902f0=function(t,e){return t<<e},n.wbg.__wbg_wbindgenshr_7d2aae6044c0dab1=function(t,e){return t>>e},n.wbg.__wbg_wbindgenstringget_0f16a6ddddef376f=function(t,e){const r=e,i=typeof r=="string"?r:void 0;var o=Di(i)?0:na(i,s.__wbindgen_malloc,s.__wbindgen_realloc),a=j;Hn().setInt32(t+4*1,a,!0),Hn().setInt32(t+4*0,o,!0)},n.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6=function(t,e){throw new Error(Ys(t,e))},n.wbg.__wbindgen_cast_2241b6af4c4b2941=function(t,e){return Ys(t,e)},n.wbg.__wbindgen_cast_2ddd8a25ff58642a=function(t,e){return BigInt.asUintN(64,t)|e<<BigInt(64)},n.wbg.__wbindgen_cast_4625c577ab2ec9ee=function(t){return BigInt.asUintN(64,t)},n.wbg.__wbindgen_cast_9ae0607507abb057=function(t){return t},n.wbg.__wbindgen_cast_cb9088102bce6b30=function(t,e){return Q(t,e)},n.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(t){return t},n.wbg.__wbindgen_cast_e7b45dd881f38ce3=function(t,e){return BigInt.asUintN(64,t)|BigInt.asUintN(64,e)<<BigInt(64)},n.wbg.__wbindgen_init_externref_table=function(){const t=s.__wbindgen_export_2,e=t.grow(4);t.set(0,void 0),t.set(e+0,void 0),t.set(e+1,null),t.set(e+2,!0),t.set(e+3,!1)},n}function L2(n,t){n.wbg.memory=t||new WebAssembly.Memory({initial:21,maximum:16384,shared:!0})}function D2(n,t,e){if(s=n.exports,Xs.__wbindgen_wasm_module=t,Zs=null,$s=null,typeof e<"u"&&(typeof e!="number"||e===0||e%65536!==0))throw"invalid stack size";return s.__wbindgen_start(e),s}async function Xs(n,t){if(s!==void 0)return s;let e;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n,memory:t,thread_stack_size:e}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof n>"u"&&(n=new URL("/tfhe_bg.wasm",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Ce&&Ce.tagName.toUpperCase()==="SCRIPT"&&Ce.src||new URL("relayer-sdk-js.umd.cjs",document.baseURI).href));const r=N2();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n)),L2(r,t);const{instance:i,module:o}=await C2(await n,r);return D2(i,o,e)}var U2=Object.freeze({__proto__:null,CompactCiphertextList:Vn,CompactCiphertextListBuilder:Ui,CompactCiphertextListExpander:pi,CompactPkeCrs:Ue,FheBool:sr,FheInt10:or,FheInt1024:ar,FheInt104:cr,FheInt112:ur,FheInt12:_r,FheInt120:fr,FheInt128:lr,FheInt136:hr,FheInt14:pr,FheInt144:dr,FheInt152:wr,FheInt16:gr,FheInt160:yr,FheInt168:br,FheInt176:mr,FheInt184:Ar,FheInt192:Er,FheInt2:vr,FheInt200:xr,FheInt2048:Rr,FheInt208:Sr,FheInt216:zr,FheInt224:Br,FheInt232:kr,FheInt24:Pr,FheInt240:Ir,FheInt248:Fr,FheInt256:Or,FheInt32:Tr,FheInt4:Cr,FheInt40:Nr,FheInt48:Lr,FheInt512:Dr,FheInt56:Ur,FheInt6:Mr,FheInt64:jr,FheInt72:Gr,FheInt8:Hr,FheInt80:Vr,FheInt88:qr,FheInt96:Qr,FheUint10:Kr,FheUint1024:Wr,FheUint104:Jr,FheUint112:$r,FheUint12:Yr,FheUint120:Zr,FheUint128:Xr,FheUint136:tn,FheUint14:en,FheUint144:rn,FheUint152:nn,FheUint16:sn,FheUint160:on,FheUint168:an,FheUint176:cn,FheUint184:un,FheUint192:_n,FheUint2:fn,FheUint200:ln,FheUint2048:hn,FheUint208:pn,FheUint216:dn,FheUint224:wn,FheUint232:gn,FheUint24:yn,FheUint240:bn,FheUint248:mn,FheUint256:An,FheUint32:En,FheUint4:vn,FheUint40:xn,FheUint48:Rn,FheUint512:Sn,FheUint56:zn,FheUint6:Bn,FheUint64:kn,FheUint72:Pn,FheUint8:In,FheUint80:Fn,FheUint88:On,FheUint96:Tn,ProvenCompactCiphertextList:di,ShortintCompactPublicKeyEncryptionParameters:Mi,ShortintNoiseDistribution:ms,TfheClientKey:K,TfheCompactPublicKey:Me,TfheCompressedPublicKey:dt,TfheConfig:wi,TfhePublicKey:ht,ZkComputeLoad:Pd,default:Xs,initThreadPool:Ku,init_panic_hook:Qu,wbg_rayon_PoolBuilder:As,wbg_rayon_start_worker:O2});let tt,ee=0,to=null;function Es(){return(to===null||to.byteLength===0)&&(to=new Uint8Array(tt.memory.buffer)),to}const ia=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},M2=typeof ia.encodeInto=="function"?function(n,t){return ia.encodeInto(n,t)}:function(n,t){const e=ia.encode(n);return t.set(e),{read:n.length,written:e.length}};function ji(n,t,e){if(e===void 0){const u=ia.encode(n),_=t(u.length,1)>>>0;return Es().subarray(_,_+u.length).set(u),ee=u.length,_}let r=n.length,i=t(r,1)>>>0;const o=Es();let a=0;for(;a<r;a++){const u=n.charCodeAt(a);if(u>127)break;o[i+a]=u}if(a!==r){a!==0&&(n=n.slice(a)),i=e(i,r,r=a+n.length*3,1)>>>0;const u=Es().subarray(i+a,i+r),_=M2(n,u);a+=_.written,i=e(i,r,a,1)>>>0}return ee=a,i}let Gi=null;function Ke(){return(Gi===null||Gi.buffer.detached===!0||Gi.buffer.detached===void 0&&Gi.buffer!==tt.memory.buffer)&&(Gi=new DataView(tt.memory.buffer)),Gi}function vs(n){const t=tt.__externref_table_alloc();return tt.__wbindgen_export_4.set(t,n),t}function Hi(n,t){try{return n.apply(this,t)}catch(e){const r=vs(e);tt.__wbindgen_exn_store(r)}}const yg=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&yg.decode();function eo(n,t){return n=n>>>0,yg.decode(Es().subarray(n,n+t))}function gi(n){return n==null}function Ju(n){const t=typeof n;if(t=="number"||t=="boolean"||n==null)return`${n}`;if(t=="string")return`"${n}"`;if(t=="symbol"){const i=n.description;return i==null?"Symbol":`Symbol(${i})`}if(t=="function"){const i=n.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(n)){const i=n.length;let o="[";i>0&&(o+=Ju(n[0]));for(let a=1;a<i;a++)o+=", "+Ju(n[a]);return o+="]",o}const e=/\[object ([^\]]+)\]/.exec(toString.call(n));let r;if(e&&e.length>1)r=e[1];else return toString.call(n);if(r=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}
|
|
22
|
-
${n.stack}`:r}function Vi(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}function We(n,t){return n=n>>>0,Es().subarray(n/1,n/1+t)}function Je(n,t){const e=t(n.length*1,1)>>>0;return Es().set(n,e/1),ee=n.length,e}function qi(n){const t=tt.__wbindgen_export_4.get(n);return tt.__externref_table_dealloc(n),t}function j2(n,t){const e=ji(t,tt.__wbindgen_malloc,tt.__wbindgen_realloc),r=ee,i=tt.new_server_id_addr(n,e,r);if(i[2])throw qi(i[1]);return Rs.__wrap(i[0])}function bg(n,t){const e=t(n.length*4,4)>>>0;for(let r=0;r<n.length;r++){const i=vs(n[r]);Ke().setUint32(e+4*r,i,!0)}return ee=n.length,e}function G2(n,t,e){const r=bg(n,tt.__wbindgen_malloc),i=ee,o=ji(t,tt.__wbindgen_malloc,tt.__wbindgen_realloc),a=ee,u=ji(e,tt.__wbindgen_malloc,tt.__wbindgen_realloc),_=ee,l=tt.new_client(r,i,o,a,u,_);if(l[2])throw qi(l[1]);return sa.__wrap(l[0])}function mg(n,t){n=n>>>0;const e=Ke(),r=[];for(let i=n;i<n+4*t;i+=4)r.push(tt.__wbindgen_export_4.get(e.getUint32(i,!0)));return tt.__externref_drop_slice(n,t),r}function H2(){const n=tt.ml_kem_pke_keygen();return Qi.__wrap(n)}function V2(n){Vi(n,Qi);const t=tt.ml_kem_pke_get_pk(n.__wbg_ptr);return xs.__wrap(t)}function q2(n){Vi(n,xs);const t=tt.ml_kem_pke_pk_to_u8vec(n.__wbg_ptr);if(t[3])throw qi(t[2]);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}function Q2(n){Vi(n,Qi);const t=tt.ml_kem_pke_sk_to_u8vec(n.__wbg_ptr);if(t[3])throw qi(t[2]);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}function K2(n){const t=Je(n,tt.__wbindgen_malloc),e=ee,r=tt.u8vec_to_ml_kem_pke_pk(t,e);if(r[2])throw qi(r[1]);return xs.__wrap(r[0])}function W2(n){const t=Je(n,tt.__wbindgen_malloc),e=ee,r=tt.u8vec_to_ml_kem_pke_sk(t,e);if(r[2])throw qi(r[1]);return Qi.__wrap(r[0])}function J2(n,t,e,r,i,o,a){Vi(n,sa),Vi(i,xs),Vi(o,Qi);const u=tt.process_user_decryption_resp_from_js(n.__wbg_ptr,t,e,r,i.__wbg_ptr,o.__wbg_ptr,a);if(u[3])throw qi(u[2]);var _=mg(u[0],u[1]).slice();return tt.__wbindgen_free(u[0],u[1]*4,4),_}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>tt.__wbg_ciphertexthandle_free(n>>>0,1));const Ag=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_client_free(n>>>0,1));class sa{static __wrap(t){t=t>>>0;const e=Object.create(sa.prototype);return e.__wbg_ptr=t,Ag.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ag.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_client_free(t,0)}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>tt.__wbg_eip712domainmsg_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>tt.__wbg_parseduserdecryptionrequest_free(n>>>0,1));const Eg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_privateenckeymlkem512_free(n>>>0,1));class Qi{static __wrap(t){t=t>>>0;const e=Object.create(Qi.prototype);return e.__wbg_ptr=t,Eg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Eg.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_privateenckeymlkem512_free(t,0)}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>tt.__wbg_privatesigkey_free(n>>>0,1));const vg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_publicenckeymlkem512_free(n>>>0,1));class xs{static __wrap(t){t=t>>>0;const e=Object.create(xs.prototype);return e.__wbg_ptr=t,vg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,vg.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_publicenckeymlkem512_free(t,0)}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>tt.__wbg_publicsigkey_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>tt.__wbg_requestid_free(n>>>0,1));const xg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_serveridaddr_free(n>>>0,1));class Rs{static __wrap(t){t=t>>>0;const e=Object.create(Rs.prototype);return e.__wbg_ptr=t,xg.register(e,e.__wbg_ptr,e),e}static __unwrap(t){return t instanceof Rs?t.__destroy_into_raw():0}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,xg.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_serveridaddr_free(t,0)}}const Rg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_typedciphertext_free(n>>>0,1));class ro{static __wrap(t){t=t>>>0;const e=Object.create(ro.prototype);return e.__wbg_ptr=t,Rg.register(e,e.__wbg_ptr,e),e}static __unwrap(t){return t instanceof ro?t.__destroy_into_raw():0}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Rg.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_typedciphertext_free(t,0)}get ciphertext(){const t=tt.__wbg_get_typedciphertext_ciphertext(this.__wbg_ptr);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set ciphertext(t){const e=Je(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_eip712domainmsg_name(this.__wbg_ptr,e,r)}get fhe_type(){return tt.__wbg_get_typedciphertext_fhe_type(this.__wbg_ptr)}set fhe_type(t){tt.__wbg_set_typedciphertext_fhe_type(this.__wbg_ptr,t)}get external_handle(){const t=tt.__wbg_get_typedciphertext_external_handle(this.__wbg_ptr);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set external_handle(t){const e=Je(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_eip712domainmsg_version(this.__wbg_ptr,e,r)}get ciphertext_format(){return tt.__wbg_get_typedciphertext_ciphertext_format(this.__wbg_ptr)}set ciphertext_format(t){tt.__wbg_set_typedciphertext_ciphertext_format(this.__wbg_ptr,t)}}const Sg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_typedplaintext_free(n>>>0,1));class $u{static __wrap(t){t=t>>>0;const e=Object.create($u.prototype);return e.__wbg_ptr=t,Sg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Sg.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_typedplaintext_free(t,0)}get bytes(){const t=tt.__wbg_get_typedplaintext_bytes(this.__wbg_ptr);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set bytes(t){const e=Je(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_eip712domainmsg_name(this.__wbg_ptr,e,r)}get fhe_type(){return tt.__wbg_get_typedplaintext_fhe_type(this.__wbg_ptr)}set fhe_type(t){tt.__wbg_set_typedplaintext_fhe_type(this.__wbg_ptr,t)}}const zg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_typedsigncryptedciphertext_free(n>>>0,1));class no{static __wrap(t){t=t>>>0;const e=Object.create(no.prototype);return e.__wbg_ptr=t,zg.register(e,e.__wbg_ptr,e),e}static __unwrap(t){return t instanceof no?t.__destroy_into_raw():0}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,zg.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_typedsigncryptedciphertext_free(t,0)}get fhe_type(){return tt.__wbg_get_typedciphertext_fhe_type(this.__wbg_ptr)}set fhe_type(t){tt.__wbg_set_typedciphertext_fhe_type(this.__wbg_ptr,t)}get signcrypted_ciphertext(){const t=tt.__wbg_get_typedsigncryptedciphertext_signcrypted_ciphertext(this.__wbg_ptr);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set signcrypted_ciphertext(t){const e=Je(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_eip712domainmsg_name(this.__wbg_ptr,e,r)}get external_handle(){const t=tt.__wbg_get_typedsigncryptedciphertext_external_handle(this.__wbg_ptr);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set external_handle(t){const e=Je(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_eip712domainmsg_version(this.__wbg_ptr,e,r)}get packing_factor(){return tt.__wbg_get_typedciphertext_ciphertext_format(this.__wbg_ptr)>>>0}set packing_factor(t){tt.__wbg_set_typedciphertext_ciphertext_format(this.__wbg_ptr,t)}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>tt.__wbg_userdecryptionrequest_free(n>>>0,1));const $2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_userdecryptionresponse_free(n>>>0,1));class Yu{static __unwrap(t){return t instanceof Yu?t.__destroy_into_raw():0}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,$2.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_userdecryptionresponse_free(t,0)}get signature(){const t=tt.__wbg_get_userdecryptionresponse_signature(this.__wbg_ptr);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set signature(t){const e=Je(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_eip712domainmsg_name(this.__wbg_ptr,e,r)}get external_signature(){const t=tt.__wbg_get_userdecryptionresponse_external_signature(this.__wbg_ptr);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set external_signature(t){const e=Je(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_eip712domainmsg_version(this.__wbg_ptr,e,r)}get payload(){const t=tt.__wbg_get_userdecryptionresponse_payload(this.__wbg_ptr);return t===0?void 0:oa.__wrap(t)}set payload(t){let e=0;gi(t)||(Vi(t,oa),e=t.__destroy_into_raw()),tt.__wbg_set_userdecryptionresponse_payload(this.__wbg_ptr,e)}get extra_data(){const t=tt.__wbg_get_userdecryptionresponse_extra_data(this.__wbg_ptr);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set extra_data(t){const e=Je(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_eip712domainmsg_chain_id(this.__wbg_ptr,e,r)}}const Bg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_userdecryptionresponsepayload_free(n>>>0,1));class oa{static __wrap(t){t=t>>>0;const e=Object.create(oa.prototype);return e.__wbg_ptr=t,Bg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Bg.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_userdecryptionresponsepayload_free(t,0)}get verification_key(){const t=tt.__wbg_get_userdecryptionresponsepayload_verification_key(this.__wbg_ptr);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set verification_key(t){const e=Je(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_eip712domainmsg_name(this.__wbg_ptr,e,r)}get digest(){const t=tt.__wbg_get_userdecryptionresponsepayload_digest(this.__wbg_ptr);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set digest(t){const e=Je(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_eip712domainmsg_version(this.__wbg_ptr,e,r)}get signcrypted_ciphertexts(){const t=tt.__wbg_get_userdecryptionresponsepayload_signcrypted_ciphertexts(this.__wbg_ptr);var e=mg(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*4,4),e}set signcrypted_ciphertexts(t){const e=bg(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_userdecryptionresponsepayload_signcrypted_ciphertexts(this.__wbg_ptr,e,r)}get party_id(){return tt.__wbg_get_userdecryptionresponsepayload_party_id(this.__wbg_ptr)>>>0}set party_id(t){tt.__wbg_set_userdecryptionresponsepayload_party_id(this.__wbg_ptr,t)}get degree(){return tt.__wbg_get_userdecryptionresponsepayload_degree(this.__wbg_ptr)>>>0}set degree(t){tt.__wbg_set_userdecryptionresponsepayload_degree(this.__wbg_ptr,t)}}async function Y2(n,t){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,t)}catch(r){if(n.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}const e=await n.arrayBuffer();return await WebAssembly.instantiate(e,t)}else{const e=await WebAssembly.instantiate(n,t);return e instanceof WebAssembly.Instance?{instance:e,module:n}:e}}function Z2(){const n={};return n.wbg={},n.wbg.__wbg_String_8f0eb39a4a4c2f66=function(t,e){const r=String(e),i=ji(r,tt.__wbindgen_malloc,tt.__wbindgen_realloc),o=ee;Ke().setInt32(t+4*1,o,!0),Ke().setInt32(t+4*0,i,!0)},n.wbg.__wbg_buffer_609cc3eee51ed158=function(t){return t.buffer},n.wbg.__wbg_call_672a4d21634d4a24=function(){return Hi(function(t,e){return t.call(e)},arguments)},n.wbg.__wbg_call_7cccdd69e0791ae2=function(){return Hi(function(t,e,r){return t.call(e,r)},arguments)},n.wbg.__wbg_crypto_ed58b8e10a292839=function(t){return t.crypto},n.wbg.__wbg_done_769e5ede4b31c67b=function(t){return t.done},n.wbg.__wbg_error_7534b8e9a36f1ab4=function(t,e){let r,i;try{r=t,i=e,console.error(eo(t,e))}finally{tt.__wbindgen_free(r,i,1)}},n.wbg.__wbg_getRandomValues_bcb4912f16000dc4=function(){return Hi(function(t,e){t.getRandomValues(e)},arguments)},n.wbg.__wbg_get_67b2ba62fc30de12=function(){return Hi(function(t,e){return Reflect.get(t,e)},arguments)},n.wbg.__wbg_get_b9b93047fe3cf45b=function(t,e){return t[e>>>0]},n.wbg.__wbg_getwithrefkey_1dc361bd10053bfe=function(t,e){return t[e]},n.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc=function(t){let e;try{e=t instanceof ArrayBuffer}catch{e=!1}return e},n.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9=function(t){let e;try{e=t instanceof Uint8Array}catch{e=!1}return e},n.wbg.__wbg_isArray_a1eab7e0d067391b=function(t){return Array.isArray(t)},n.wbg.__wbg_isSafeInteger_343e2beeeece1bb0=function(t){return Number.isSafeInteger(t)},n.wbg.__wbg_iterator_9a24c88df860dc65=function(){return Symbol.iterator},n.wbg.__wbg_length_a446193dc22c12f8=function(t){return t.length},n.wbg.__wbg_length_e2d2a49132c1b256=function(t){return t.length},n.wbg.__wbg_msCrypto_0a36e2ec3a343d26=function(t){return t.msCrypto},n.wbg.__wbg_new_8a6f238a6ece86ea=function(){return new Error},n.wbg.__wbg_new_a12002a7f91c75be=function(t){return new Uint8Array(t)},n.wbg.__wbg_newnoargs_105ed471475aaf50=function(t,e){return new Function(eo(t,e))},n.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a=function(t,e,r){return new Uint8Array(t,e>>>0,r>>>0)},n.wbg.__wbg_newwithlength_a381634e90c276d4=function(t){return new Uint8Array(t>>>0)},n.wbg.__wbg_next_25feadfc0913fea9=function(t){return t.next},n.wbg.__wbg_next_6574e1a8a62d1055=function(){return Hi(function(t){return t.next()},arguments)},n.wbg.__wbg_node_02999533c4ea02e3=function(t){return t.node},n.wbg.__wbg_process_5c1d670bc53614b8=function(t){return t.process},n.wbg.__wbg_randomFillSync_ab2cfe79ebbf2740=function(){return Hi(function(t,e){t.randomFillSync(e)},arguments)},n.wbg.__wbg_require_79b1e9274cde3c87=function(){return Hi(function(){return module.require},arguments)},n.wbg.__wbg_serveridaddr_new=function(t){return Rs.__wrap(t)},n.wbg.__wbg_serveridaddr_unwrap=function(t){return Rs.__unwrap(t)},n.wbg.__wbg_set_65595bdd868b3009=function(t,e,r){t.set(e,r>>>0)},n.wbg.__wbg_stack_0ed75d68575b0f3c=function(t,e){const r=e.stack,i=ji(r,tt.__wbindgen_malloc,tt.__wbindgen_realloc),o=ee;Ke().setInt32(t+4*1,o,!0),Ke().setInt32(t+4*0,i,!0)},n.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07=function(){const t=typeof ta>"u"?null:ta;return gi(t)?0:vs(t)},n.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0=function(){const t=typeof globalThis>"u"?null:globalThis;return gi(t)?0:vs(t)},n.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819=function(){const t=typeof self>"u"?null:self;return gi(t)?0:vs(t)},n.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40=function(){const t=typeof window>"u"?null:window;return gi(t)?0:vs(t)},n.wbg.__wbg_subarray_aa9065fa9dc5df96=function(t,e,r){return t.subarray(e>>>0,r>>>0)},n.wbg.__wbg_typedciphertext_new=function(t){return ro.__wrap(t)},n.wbg.__wbg_typedciphertext_unwrap=function(t){return ro.__unwrap(t)},n.wbg.__wbg_typedplaintext_new=function(t){return $u.__wrap(t)},n.wbg.__wbg_typedsigncryptedciphertext_new=function(t){return no.__wrap(t)},n.wbg.__wbg_typedsigncryptedciphertext_unwrap=function(t){return no.__unwrap(t)},n.wbg.__wbg_userdecryptionresponse_unwrap=function(t){return Yu.__unwrap(t)},n.wbg.__wbg_value_cd1ffa7b1ab794f1=function(t){return t.value},n.wbg.__wbg_versions_c71aa1626a93e0a1=function(t){return t.versions},n.wbg.__wbindgen_as_number=function(t){return+t},n.wbg.__wbindgen_boolean_get=function(t){const e=t;return typeof e=="boolean"?e?1:0:2},n.wbg.__wbindgen_debug_string=function(t,e){const r=Ju(e),i=ji(r,tt.__wbindgen_malloc,tt.__wbindgen_realloc),o=ee;Ke().setInt32(t+4*1,o,!0),Ke().setInt32(t+4*0,i,!0)},n.wbg.__wbindgen_error_new=function(t,e){return new Error(eo(t,e))},n.wbg.__wbindgen_in=function(t,e){return t in e},n.wbg.__wbindgen_init_externref_table=function(){const t=tt.__wbindgen_export_4,e=t.grow(4);t.set(0,void 0),t.set(e+0,void 0),t.set(e+1,null),t.set(e+2,!0),t.set(e+3,!1)},n.wbg.__wbindgen_is_function=function(t){return typeof t=="function"},n.wbg.__wbindgen_is_null=function(t){return t===null},n.wbg.__wbindgen_is_object=function(t){const e=t;return typeof e=="object"&&e!==null},n.wbg.__wbindgen_is_string=function(t){return typeof t=="string"},n.wbg.__wbindgen_is_undefined=function(t){return t===void 0},n.wbg.__wbindgen_jsval_loose_eq=function(t,e){return t==e},n.wbg.__wbindgen_memory=function(){return tt.memory},n.wbg.__wbindgen_number_get=function(t,e){const r=e,i=typeof r=="number"?r:void 0;Ke().setFloat64(t+8*1,gi(i)?0:i,!0),Ke().setInt32(t+4*0,!gi(i),!0)},n.wbg.__wbindgen_string_get=function(t,e){const r=e,i=typeof r=="string"?r:void 0;var o=gi(i)?0:ji(i,tt.__wbindgen_malloc,tt.__wbindgen_realloc),a=ee;Ke().setInt32(t+4*1,a,!0),Ke().setInt32(t+4*0,o,!0)},n.wbg.__wbindgen_string_new=function(t,e){return eo(t,e)},n.wbg.__wbindgen_throw=function(t,e){throw new Error(eo(t,e))},n}function X2(n,t){return tt=n.exports,Zu.__wbindgen_wasm_module=t,Gi=null,to=null,tt.__wbindgen_start(),tt}async function Zu(n){if(tt!==void 0)return tt;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof n>"u"&&(n=new URL("/kms_lib_bg.wasm",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Ce&&Ce.tagName.toUpperCase()==="SCRIPT"&&Ce.src||new URL("relayer-sdk-js.umd.cjs",document.baseURI).href));const t=Z2();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));const{instance:e,module:r}=await Y2(await n,t);return X2(e,r)}const tA=BigInt(1024*1024*512),Xu=BigInt(1024*1024*512),t_=BigInt(1024*1024*512),io=n=>n?n.endsWith("/")?n.slice(0,-1):n:"",kg=n=>{let t=n.toString(16);return t.length%2?"0"+t:t},$e=n=>{const t=n.replace(/^(0x)/,"").match(/.{1,2}/g);return t?Uint8Array.from(t.map(e=>parseInt(e,16))):new Uint8Array};function qn(n,t=!1){return`${t?"0x":""}${n.reduce((e,r)=>e+r.toString(16).padStart(2,"0"),"")}`}const eA=function(n){if(!n||n?.length===0)return BigInt(0);const t=Array.from(n).map(e=>e.toString(16).padStart(2,"0")).join("");return BigInt(`0x${t}`)};function Pg(n){return n.startsWith("0x")?n:`0x${n}`}function rA(n,t){if(t)switch(t.__type){case"BearerToken":n.headers.Authorization=`Bearer ${t.token}`;break;case"ApiKeyHeader":n.headers[t.header||"x-api-key"]=t.value;break;case"ApiKeyCookie":if(typeof window<"u")document.cookie=`${t.cookie||"x-api-key"}=${t.value}; path=/; SameSite=Lax; Secure; HttpOnly;`,n.credentials="include";else{let e=`${t.cookie||"x-api-key"}=${t.value};`;n.headers.Cookie=e}break}return n}function Ig(n){if(n instanceof Error&&typeof n.cause=="object"&&n.cause!==null)return n.cause}function nA(n){const t=Ig(n);if(!(!t||!("code"in t)||!t.code)&&typeof t.code=="string")return t.code}function iA(n){const t=Ig(n);if(!(!t||!("status"in t)||t.status===void 0)&&typeof t.status=="number")return t.status}async function Fg(n,t){let e;if(t.status===429)e="Relayer rate limit exceeded: Please wait and try again later.";else switch(n){case"PUBLIC_DECRYPT":{e=`Public decrypt failed: relayer respond with HTTP code ${t.status}`;break}case"USER_DECRYPT":{e=`User decrypt failed: relayer respond with HTTP code ${t.status}`;break}case"KEY_URL":{e=`HTTP error! status: ${t.status}`;break}default:{const i=await t.text();e=`Relayer didn't response correctly. Bad status ${t.statusText}. Content: ${i}`;break}}const r={code:"RELAYER_FETCH_ERROR",operation:n,status:t.status,statusText:t.statusText,url:t.url};throw new Error(e,{cause:r})}function Og(n,t){let e;switch(n){case"PUBLIC_DECRYPT":{e="Public decrypt failed: Relayer didn't return a JSON";break}case"USER_DECRYPT":{e="User decrypt failed: Relayer didn't return a JSON";break}default:{e="Relayer didn't return a JSON";break}}const r={code:"RELAYER_NO_JSON_ERROR",operation:n,error:t};throw new Error(e,{cause:r})}function Tg(n,t){let e;switch(n){case"PUBLIC_DECRYPT":{e="Public decrypt failed: Relayer returned an unexpected JSON response";break}case"USER_DECRYPT":{e="User decrypt failed: Relayer returned an unexpected JSON response";break}default:{e="Relayer returned an unexpected JSON response";break}}const r={code:"RELAYER_UNEXPECTED_JSON_ERROR",operation:n,error:t};throw new Error(e,{cause:r})}function sA(n,t){let e;switch(n){case"PUBLIC_DECRYPT":{e="Pulbic decrypt failed: the public decryption didn't succeed for an unknown reason";break}case"USER_DECRYPT":{e="User decrypt failed: the user decryption didn't succeed for an unknown reason";break}default:{e="Relayer didn't response correctly.";break}}const r={code:"RELAYER_INTERNAL_ERROR",operation:n,error:t};throw new Error(e,{cause:r})}function Cg(n,t,e){if(!e)switch(n){case"PUBLIC_DECRYPT":{e="Public decrypt failed: Relayer didn't respond";break}case"USER_DECRYPT":{e="User decrypt failed: Relayer didn't respond";break}default:{e="Relayer didn't response correctly. Bad JSON.";break}}const r={code:"RELAYER_UNKNOWN_ERROR",operation:n,error:t};throw new Error(e??"Relayer didn't response correctly.",{cause:r})}function Ng(n){if(!n||typeof n!="object")throw new Error("Unexpected response JSON.");if(!("response"in n&&n.response!==null&&n.response!==void 0))throw new Error("Unexpected response JSON format: missing 'response' property.")}async function e_(n,t,e,r){const i=rA({method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)},r?.auth);let o,a;try{o=await fetch(t,i)}catch(_){Cg(n,_)}o.ok||await Fg(n,o);let u;try{u=await o.json()}catch(_){Og(n,_)}try{Ng(u),a=u}catch(_){Tg(n,_)}return a}async function oA(n,t){let e,r;try{e=await fetch(t)}catch(o){Cg(n,o)}e.ok||await Fg(n,e);let i;try{i=await e.json()}catch(o){Og(n,o)}try{Ng(i),r=i}catch(o){Tg(n,o)}return r}const r_={},Lg=async(n,t)=>{if(r_[n])return r_[n];const e=await oA("KEY_URL",`${n}/v1/keyurl`);try{let r;if(!t)r=e.response.fhe_key_info[0].fhe_public_key.urls[0],t=e.response.fhe_key_info[0].fhe_public_key.data_id;else{const v=e.response.fhe_key_info.find(I=>I.fhe_public_key.data_id===t);if(!v)throw new Error(`Could not find FHE key info with data_id ${t}`);r=v.fhe_public_key.urls[0]}const i=await fetch(r);if(!i.ok)throw new Error(`HTTP error! status: ${i.status} on ${i.url}`);let o;typeof i.bytes=="function"?o=await i.bytes():o=new Uint8Array(await i.arrayBuffer());const a=e.response.crs[2048].urls[0],u=e.response.crs[2048].data_id,_=await fetch(a);if(!_.ok)throw new Error(`HTTP error! status: ${_.status} on ${_.url}`);let l;typeof _.bytes=="function"?l=await _.bytes():l=new Uint8Array(await _.arrayBuffer());let f;try{f=TFHE.TfheCompactPublicKey.safe_deserialize(o,Xu)}catch(v){throw new Error("Invalid public key (deserialization failed)",{cause:v})}let g;try{g=TFHE.CompactPkeCrs.safe_deserialize(new Uint8Array(l),t_)}catch(v){throw new Error("Invalid crs (deserialization failed)",{cause:v})}const y={publicKey:f,publicKeyId:t,publicParams:{2048:{publicParams:g,publicParamsId:u}}};return r_[n]=y,y}catch(r){throw new Error("Impossible to fetch public key: wrong relayer url.",{cause:r})}},Dg=["function getKmsSigners() view returns (address[])","function getThreshold() view returns (uint256)"],Ug=["function getCoprocessorSigners() view returns (address[])","function getThreshold() view returns (uint256)"],aA=n=>{if(typeof n.network=="string")return new Sm(n.network);if(n.network)return new Ni(n.network);throw new Error("You must provide a network URL or a EIP1193 object (eg: window.ethereum)")},cA=async(n,t)=>{if(t.chainId&&typeof t.chainId=="number")return t.chainId;if(t.chainId&&typeof t.chainId!="number")throw new Error("chainId must be a number.");{const e=(await n.getNetwork()).chainId;return Number(e)}},uA=async n=>{if(n.relayerUrl&&!n.publicKey){const t=await Lg(io(n.relayerUrl));return{publicKey:t.publicKey,publicKeyId:t.publicKeyId}}else if(n.publicKey&&n.publicKey.data&&n.publicKey.id){const t=n.publicKey.data;try{return{publicKey:TFHE.TfheCompactPublicKey.safe_deserialize(t,Xu),publicKeyId:n.publicKey.id}}catch(e){throw new Error("Invalid public key (deserialization failed)",{cause:e})}}else throw new Error("You must provide a public key with its public key ID.")},_A=async n=>{if(n.relayerUrl&&!n.publicParams)return(await Lg(io(n.relayerUrl))).publicParams;if(n.publicParams&&n.publicParams[2048]){const t=n.publicParams[2048].publicParams;try{return{2048:{publicParams:TFHE.CompactPkeCrs.safe_deserialize(t,t_),publicParamsId:n.publicParams[2048].publicParamsId}}}catch(e){throw new Error("Invalid public key (deserialization failed)",{cause:e})}}else throw new Error("You must provide a valid CRS with its CRS ID.")},fA=async(n,t)=>await new ir(t.kmsContractAddress,Dg,n).getKmsSigners(),lA=async(n,t)=>{const r=await new ir(t.kmsContractAddress,Dg,n).getThreshold();return Number(r)},hA=async(n,t)=>await new ir(t.inputVerifierContractAddress,Ug,n).getCoprocessorSigners(),pA=async(n,t)=>{const r=await new ir(t.inputVerifierContractAddress,Ug,n).getThreshold();return Number(r)},n_={0:2,2:8,3:16,4:32,5:64,6:128,7:160,8:256};function dA(n){if(n.length!==66)throw new Error(`Handle ${n} is not of valid length`);const t=n.slice(-4,-2).toLowerCase(),e=parseInt(t,16);if(!(e in n_))throw new Error(`Handle ${n} is not of valid type`);return e}function Mg(n){let t=0;for(const e of n){if(e.length!==66)throw new Error(`Handle ${e} is not of valid length`);const r=e.slice(-4,-2).toLowerCase(),i=parseInt(r,16);if(!(i in n_))throw new Error(`Handle ${e} is not of valid type`);if(t+=n_[i],t>2048)throw new Error("Cannot decrypt more than 2048 encrypted bits in a single request")}return t}const aa=n=>Dt(n),wA=["function persistAllowed(bytes32 handle, address account) view returns (bool)"],jg=10,Gg=BigInt(365);function gA(n,t){if(t===0)return n===BigInt(1);if(t===7)return aa("0x"+n.toString(16).padStart(40,"0"));if(t>8||t==1)throw new Error(`Unsupported handle type ${t}`);return n}function yA(n,t){let e=[];for(const i of n){const o=i.slice(-4,-2).toLowerCase(),a=parseInt(o,16);e.push(a)}const r={};return n.forEach((i,o)=>r[i]=gA(t[o],e[o])),r}function bA(n,t){if(t===BigInt(0))throw Error("durationDays is null");if(t>Gg)throw Error(`durationDays is above max duration of ${Gg}`);const e=BigInt(Math.floor(Date.now()/1e3));if(n>e)throw Error("startTimestamp is set in the future");const r=t*BigInt(86400);if(n+r<e)throw Error("User decrypt request has expired")}const mA=(n,t,e,r,i,o,a,u)=>async(_,l,f,g,y,v,I,k,T)=>{const E="0x00";let R,B;try{R=TKMS.u8vec_to_ml_kem_pke_pk($e(f)),B=TKMS.u8vec_to_ml_kem_pke_sk($e(l))}catch(wt){throw new Error("Invalid public or private key",{cause:wt})}const z=g.replace(/^(0x)/,""),O=f.replace(/^(0x)/,""),C=_.map(wt=>({handle:typeof wt.handle=="string"?qn($e(wt.handle),!0):qn(wt.handle,!0),contractAddress:aa(wt.contractAddress)}));Mg(C.map(wt=>wt.handle)),bA(BigInt(I),BigInt(k));const N=new ir(i,wA,a),D=C.map(async({handle:wt,contractAddress:at})=>{const pt=await N.persistAllowed(wt,v),mt=await N.persistAllowed(wt,at);if(!pt)throw new Error(`User ${v} is not authorized to user decrypt handle ${wt}!`);if(!mt)throw new Error(`dapp contract ${at} is not authorized to user decrypt handle ${wt}!`);if(v===at)throw new Error(`userAddress ${v} should not be equal to contractAddress when requesting user decryption!`)}),$=y.length;if($===0)throw Error("contractAddresses is empty");if($>jg)throw Error(`contractAddresses max length of ${jg} exceeded`);await Promise.all(D).catch(wt=>{throw wt});const et={handleContractPairs:C,requestValidity:{startTimestamp:I.toString(),durationDays:k.toString()},contractsChainId:e.toString(),contractAddresses:y.map(wt=>aa(wt)),userAddress:aa(v),signature:z,publicKey:O,extraData:E},ft=await e_("USER_DECRYPT",`${o}/v1/user-decrypt`,et,u??T);let L=n.map((wt,at)=>TKMS.new_server_id_addr(at+1,wt));const vt=TKMS.new_client(L,v,"default");try{const wt=new ArrayBuffer(32);new DataView(wt).setUint32(28,t,!1);const mt={name:"Decryption",version:"1",chain_id:new Uint8Array(wt),verifying_contract:r,salt:null},Rt={signature:z,client_address:v,enc_key:O,ciphertext_handles:C.map(W=>W.handle.replace(/^0x/,"")),eip712_verifying_contract:r},Pt=TKMS.process_user_decryption_resp_from_js(vt,Rt,mt,ft.response,R,B,!0).map(W=>eA(W.bytes));return yA(C.map(W=>W.handle),Pt)}catch(wt){throw new Error("An error occured during decryption",{cause:wt})}},Ki=(n,t)=>{if(n==null)throw new Error("Missing value");let e;if(t>=8?e=BigInt(`0x${new Array(t/8).fill(null).reduce(r=>`${r}ff`,"")}`):e=BigInt(2**t-1),typeof n!="number"&&typeof n!="bigint")throw new Error("Value must be a number or a bigint.");if(n>e)throw new Error(`The value exceeds the limit for ${t}bits integer (${e.toString()}).`)},AA=({aclContractAddress:n,chainId:t,tfheCompactPublicKey:e,publicParams:r,contractAddress:i,userAddress:o})=>{if(!qe(i))throw new Error("Contract address is not a valid address.");if(!qe(o))throw new Error("User address is not a valid address.");const a=e,u=[],_=TFHE.CompactCiphertextList.builder(a);let l=new Uint8Array;const f=g=>{if(u.reduce((y,v)=>y+Math.max(2,v),0)+g>2048)throw Error("Packing more than 2048 bits in a single input ciphertext is unsupported");if(u.length+1>256)throw Error("Packing more than 256 variables in a single input ciphertext is unsupported")};return{addBool(g){if(g==null)throw new Error("Missing value");if(typeof g!="boolean"&&typeof g!="number"&&typeof g!="bigint")throw new Error("The value must be a boolean, a number or a bigint.");if(Number(g)>1)throw new Error("The value must be 1 or 0.");return Ki(Number(g),1),f(2),_.push_boolean(!!g),u.push(2),this},add8(g){return Ki(g,8),f(8),_.push_u8(Number(g)),u.push(8),this},add16(g){return Ki(g,16),f(16),_.push_u16(Number(g)),u.push(16),this},add32(g){return Ki(g,32),f(32),_.push_u32(Number(g)),u.push(32),this},add64(g){return Ki(g,64),f(64),_.push_u64(BigInt(g)),u.push(64),this},add128(g){return Ki(g,128),f(128),_.push_u128(BigInt(g)),u.push(128),this},addAddress(g){if(!qe(g))throw new Error("The value must be a valid address.");return f(160),_.push_u160(BigInt(g)),u.push(160),this},add256(g){return Ki(g,256),f(256),_.push_u256(BigInt(g)),u.push(256),this},getBits(){return u},encrypt(){const y=(()=>{const z=D=>Object.keys(D),O=u.reduce((D,$)=>D+$,0),C=z(r),N=C.find(D=>Number(D)>=O);if(!N)throw new Error(`Too many bits in provided values. Maximum is ${C[C.length-1]}.`);return N})(),v=r[y].publicParams,I=$e(i),k=$e(o),T=$e(n),E=$e(t.toString(16).padStart(64,"0")),R=new Uint8Array(I.length+k.length+T.length+32);return R.set(I,0),R.set(k,20),R.set(T,40),R.set(E,R.length-E.length),l=_.build_with_proof_packed(v,R,TFHE.ZkComputeLoad.Verify).safe_serialize(tA),l}}},Hg={2:0,8:2,16:3,32:4,64:5,128:6,160:7,256:8},EA=BigInt("18446744073709551615"),vA="ZK-w_rct",xA="ZK-w_hdl",RA=(n,t,e,r,i)=>{const o=zd("keccak256").update(Ne.from(vA)).update(Ne.from(n)).digest(),a=Ne.from($e(e)),u=r.toString(16).padStart(64,"0"),_=Ne.from(u,"hex");return t.map((f,g)=>{const y=Hg[f],v=Ne.from([g]),I=zd("keccak256").update(Ne.from(xA)).update(o).update(v).update(a).update(_).digest(),k=new Uint8Array(32);if(k.set(I,0),BigInt(r)>EA)throw new Error("ChainId exceeds maximum allowed value (8 bytes)");const T=$e(u).slice(24,32);return k[21]=g,k.set(T,22),k[30]=y,k[31]=i,k})},Vg=n=>Dt(n),SA=()=>0;function zA(n,t,e){const r=new Map;t.forEach((i,o)=>{if(r.has(i)){const a=i;throw new Error(`Duplicate coprocessor signer address found: ${a} appears multiple times in recovered addresses`)}r.set(i,o)});for(const i of t)if(!n.includes(i))throw new Error(`Invalid address found: ${i} is not in the list of coprocessor signers`);return t.length>=e}function BA(n){const t=n.response;return typeof t!="object"||t===null||!("handles"in t&&Array.isArray(t.handles))||!("signatures"in t&&Array.isArray(t.signatures))?!1:t.signatures.every(e=>typeof e=="string")&&t.handles.every(e=>typeof e=="string")}const kA=(n,t,e,r,i,o,a,u,_,l)=>(f,g)=>{if(!qe(f))throw new Error("Contract address is not a valid address.");if(!qe(g))throw new Error("User address is not a valid address.");const y=AA({aclContractAddress:n,chainId:e,tfheCompactPublicKey:o,publicParams:a,contractAddress:f,userAddress:g});return{_input:y,addBool(v){return y.addBool(v),this},add8(v){return y.add8(v),this},add16(v){return y.add16(v),this},add32(v){return y.add32(v),this},add64(v){return y.add64(v),this},add128(v){return y.add128(v),this},add256(v){return y.add256(v),this},addAddress(v){return y.addAddress(v),this},getBits(){return y.getBits()},encrypt:async v=>{const I="0x00",k=y.getBits(),T=y.encrypt(),E={contractAddress:Vg(f),userAddress:Vg(g),ciphertextWithInputVerification:qn(T),contractChainId:"0x"+e.toString(16),extraData:I},R=await e_("INPUT_PROOF",`${i}/v1/input-proof`,E,v??l);BA(R)||sA("INPUT_PROOF",R);const B=RA(T,k,n,e,SA());if(R.response.handles&&R.response.handles.length>0){const L=R.response.handles.map($e);if(B.length!=L.length)throw new Error(`Incorrect Handles list sizes: (expected) ${B.length} != ${L.length} (received)`);for(let vt=0;vt<B.length;vt+=1){let wt=B[vt],at=L[vt],pt=qn(wt),mt=qn(at);if(pt!==mt)throw new Error(`Incorrect Handle ${vt}: (expected) ${pt} != ${mt} (received)`)}}const z=R.response.signatures,O={name:"InputVerification",version:"1",chainId:r,verifyingContract:t},C={CiphertextVerification:[{name:"ctHandles",type:"bytes32[]"},{name:"userAddress",type:"address"},{name:"contractAddress",type:"address"},{name:"contractChainId",type:"uint256"},{name:"extraData",type:"bytes"}]},N=z.map(L=>{const vt=L.startsWith("0x")?L:`0x${L}`;return Ol(O,C,{ctHandles:B,userAddress:g,contractAddress:f,contractChainId:e,extraData:I},vt)});if(!zA(u,N,_))throw Error("Coprocessor signers threshold is not reached");let $=kg(B.length);const et=z.length;return $+=kg(et),B.map(L=>qn(L)).map(L=>$+=L),z.map(L=>$+=L.slice(2)),$+=I.slice(2),{handles:B,inputProof:$e($)}}}},PA=["function isAllowedForDecryption(bytes32 handle) view returns (bool)"];function IA(n,t,e){const r=new Map;t.forEach((i,o)=>{if(r.has(i)){const a=i;throw new Error(`Duplicate KMS signer address found: ${a} appears multiple times in recovered addresses`)}r.set(i,o)});for(const i of t)if(!n.includes(i))throw new Error(`Invalid address found: ${i} is not in the list of KMS signers`);return t.length>=e}function FA(n){const t=Object.keys(n),e=[],r=[];for(let a=0;a<t.length;++a){const u=t[a],_=dA(u);let l=n[u];typeof l=="boolean"&&(l=l?"0x01":"0x00");const f=BigInt(l);switch(e.push("uint256"),_){case 7:{r.push(`0x${f.toString(16).padStart(40,"0")}`);break}case 0:{if(f!==BigInt(0)&&f!==BigInt(1))throw new Error(`Invalid ebool clear text value ${f}. Expecting 0 or 1.`);r.push(f);break}case 2:case 3:case 4:case 5:case 6:case 7:{r.push(f);break}default:throw new Error(`Unsupported Fhevm primitive type id: ${_}`)}}const o=li.defaultAbiCoder().encode(e,r);return{abiTypes:e,abiValues:r,abiEncodedClearValues:o}}function OA(n,t){const e=Sl(["uint8"],[n.length]),r=Sl(Array(n.length).fill("bytes"),n);return te([e,r,t])}const TA={0:"bool",2:"uint256",3:"uint256",4:"uint256",5:"uint256",6:"uint256",7:"address",8:"uint256"};function CA(n,t){let e=[];for(const l of n){const f=l.slice(-4,-2).toLowerCase(),g=parseInt(f,16);e.push(g)}const r="0x"+"00".repeat(32)+t.slice(2)+"00".repeat(32),i=e.map(l=>TA[l]),u=new li().decode(["uint256",...i,"bytes[]"],r).slice(1,1+e.length),_={};return n.forEach((l,f)=>_[l]=u[f]),_}const NA=(n,t,e,r,i,o,a,u)=>async(_,l)=>{const f="0x00",g=new ir(i,PA,a);let y;try{y=await Promise.all(_.map(async et=>{const ft=qn(typeof et=="string"?$e(et):et,!0);if(!await g.isAllowedForDecryption(ft))throw new Error(`Handle ${ft} is not allowed for public decryption!`);return ft}))}catch(et){throw et}Mg(y);const v={ciphertextHandles:y,extraData:f},I=await e_("PUBLIC_DECRYPT",`${o}/v1/public-decrypt`,v,l??u),k={name:"Decryption",version:"1",chainId:e,verifyingContract:r},T={PublicDecryptVerification:[{name:"ctHandles",type:"bytes32[]"},{name:"decryptedResult",type:"bytes"},{name:"extraData",type:"bytes"}]},E=I.response[0],R=Pg(E.decrypted_value),B=E.signatures.map(Pg),z="0x",O=B.map(et=>Ol(k,T,{ctHandles:y,decryptedResult:R,extraData:z},et));if(!IA(n,O,t))throw Error("KMS signers threshold is not reached");const N=CA(y,R),D=FA(N),$=OA(B,z);return{clearValues:N,abiEncodedClearValues:D.abiEncodedClearValues,decryptionProof:$}},qg=(n,t)=>(e,r,i,o,a)=>{const u="0x00";if(a&&!qe(a))throw new Error("Invalid delegated account.");if(!qe(n))throw new Error("Invalid verifying contract address.");if(!r.every(v=>qe(v)))throw new Error("Invalid contract address.");const _=typeof e=="string"?e.startsWith("0x")?e:`0x${e}`:e,l=typeof i=="number"?i.toString():i,f=typeof o=="number"?o.toString():o,g=[{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"}],y={name:"Decryption",version:"1",chainId:t,verifyingContract:n};return a?{types:{EIP712Domain:g,DelegatedUserDecryptRequestVerification:[{name:"publicKey",type:"bytes"},{name:"contractAddresses",type:"address[]"},{name:"startTimestamp",type:"uint256"},{name:"durationDays",type:"uint256"},{name:"extraData",type:"bytes"},{name:"delegatedAccount",type:"address"}]},primaryType:"DelegatedUserDecryptRequestVerification",domain:y,message:{publicKey:_,contractAddresses:r,startTimestamp:l,durationDays:f,extraData:u,delegatedAccount:a}}:{types:{EIP712Domain:g,UserDecryptRequestVerification:[{name:"publicKey",type:"bytes"},{name:"contractAddresses",type:"address[]"},{name:"startTimestamp",type:"uint256"},{name:"durationDays",type:"uint256"},{name:"extraData",type:"bytes"}]},primaryType:"UserDecryptRequestVerification",domain:y,message:{publicKey:_,contractAddresses:r,startTimestamp:l,durationDays:f,extraData:u}}},Qg=()=>{const n=TKMS.ml_kem_pke_keygen();return{publicKey:qn(TKMS.ml_kem_pke_pk_to_u8vec(TKMS.ml_kem_pke_get_pk(n))),privateKey:qn(TKMS.ml_kem_pke_sk_to_u8vec(n))}};Ji.fetch=B2(Ji.fetch,{retries:5,retryDelay:500});const LA={aclContractAddress:"0xf0Ffdc93b7E186bC2f8CB3dAA75D86d1930A433D",kmsContractAddress:"0xbE0E383937d564D7FF0BC3b46c51f0bF8d5C311A",inputVerifierContractAddress:"0xBBC1fFCdc7C316aAAd72E807D9b0272BE8F84DA0",verifyingContractAddressDecryption:"0x5D8BD78e2ea6bbE41f26dFe9fdaEAa349e077478",verifyingContractAddressInputVerification:"0x483b9dE06E4E4C7D35CCf5837A1668487406D955",chainId:11155111,gatewayChainId:10901,network:"https://ethereum-sepolia-rpc.publicnode.com",relayerUrl:"https://relayer.testnet.zama.org"},DA=async n=>{const{verifyingContractAddressDecryption:t,verifyingContractAddressInputVerification:e,publicKey:r,kmsContractAddress:i,aclContractAddress:o,gatewayChainId:a,auth:u}=n;if(!i||!qe(i))throw new Error("KMS contract address is not valid or empty");if(!t||!qe(t))throw new Error("Verifying contract for Decryption address is not valid or empty");if(!e||!qe(e))throw new Error("Verifying contract for InputVerification address is not valid or empty");if(!o||!qe(o))throw new Error("ACL contract address is not valid or empty");if(r&&!(r.data instanceof Uint8Array))throw new Error("publicKey must be a Uint8Array");const _=aA(n);if(!_)throw new Error("No network has been provided!");const l=await cA(_,n),f=await uA(n),g=await _A(n),y=await fA(_,n),v=await lA(_,n),I=await hA(_,n),k=await pA(_,n);return{createEncryptedInput:kA(o,e,l,a,io(n.relayerUrl),f.publicKey,g,I,k),generateKeypair:Qg,createEIP712:qg(t,l),publicDecrypt:NA(y,v,a,t,o,io(n.relayerUrl),_,u&&{auth:u}),userDecrypt:mA(y,a,l,t,o,io(n.relayerUrl),_,u&&{auth:u}),getPublicKey:()=>f.publicKey?{publicKey:f.publicKey.safe_serialize(Xu),publicKeyId:f.publicKeyId}:null,getPublicParams:T=>g[T]?{publicParams:g[T].publicParams.safe_serialize(t_),publicParamsId:g[T].publicParamsId}:null}};let Kg=!1;const UA=async({tfheParams:n,kmsParams:t,thread:e}={})=>(e==null&&(e=navigator.hardwareConcurrency),await k2()||(console.warn(`This browser does not support threads. Verify that your server returns correct headers:
|
|
22
|
+
${n.stack}`:r}function Vi(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}function We(n,t){return n=n>>>0,Es().subarray(n/1,n/1+t)}function Je(n,t){const e=t(n.length*1,1)>>>0;return Es().set(n,e/1),ee=n.length,e}function qi(n){const t=tt.__wbindgen_export_4.get(n);return tt.__externref_table_dealloc(n),t}function j2(n,t){const e=ji(t,tt.__wbindgen_malloc,tt.__wbindgen_realloc),r=ee,i=tt.new_server_id_addr(n,e,r);if(i[2])throw qi(i[1]);return Rs.__wrap(i[0])}function bg(n,t){const e=t(n.length*4,4)>>>0;for(let r=0;r<n.length;r++){const i=vs(n[r]);Ke().setUint32(e+4*r,i,!0)}return ee=n.length,e}function G2(n,t,e){const r=bg(n,tt.__wbindgen_malloc),i=ee,o=ji(t,tt.__wbindgen_malloc,tt.__wbindgen_realloc),a=ee,u=ji(e,tt.__wbindgen_malloc,tt.__wbindgen_realloc),_=ee,l=tt.new_client(r,i,o,a,u,_);if(l[2])throw qi(l[1]);return sa.__wrap(l[0])}function mg(n,t){n=n>>>0;const e=Ke(),r=[];for(let i=n;i<n+4*t;i+=4)r.push(tt.__wbindgen_export_4.get(e.getUint32(i,!0)));return tt.__externref_drop_slice(n,t),r}function H2(){const n=tt.ml_kem_pke_keygen();return Qi.__wrap(n)}function V2(n){Vi(n,Qi);const t=tt.ml_kem_pke_get_pk(n.__wbg_ptr);return xs.__wrap(t)}function q2(n){Vi(n,xs);const t=tt.ml_kem_pke_pk_to_u8vec(n.__wbg_ptr);if(t[3])throw qi(t[2]);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}function Q2(n){Vi(n,Qi);const t=tt.ml_kem_pke_sk_to_u8vec(n.__wbg_ptr);if(t[3])throw qi(t[2]);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}function K2(n){const t=Je(n,tt.__wbindgen_malloc),e=ee,r=tt.u8vec_to_ml_kem_pke_pk(t,e);if(r[2])throw qi(r[1]);return xs.__wrap(r[0])}function W2(n){const t=Je(n,tt.__wbindgen_malloc),e=ee,r=tt.u8vec_to_ml_kem_pke_sk(t,e);if(r[2])throw qi(r[1]);return Qi.__wrap(r[0])}function J2(n,t,e,r,i,o,a){Vi(n,sa),Vi(i,xs),Vi(o,Qi);const u=tt.process_user_decryption_resp_from_js(n.__wbg_ptr,t,e,r,i.__wbg_ptr,o.__wbg_ptr,a);if(u[3])throw qi(u[2]);var _=mg(u[0],u[1]).slice();return tt.__wbindgen_free(u[0],u[1]*4,4),_}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>tt.__wbg_ciphertexthandle_free(n>>>0,1));const Ag=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_client_free(n>>>0,1));class sa{static __wrap(t){t=t>>>0;const e=Object.create(sa.prototype);return e.__wbg_ptr=t,Ag.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ag.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_client_free(t,0)}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>tt.__wbg_eip712domainmsg_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>tt.__wbg_parseduserdecryptionrequest_free(n>>>0,1));const Eg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_privateenckeymlkem512_free(n>>>0,1));class Qi{static __wrap(t){t=t>>>0;const e=Object.create(Qi.prototype);return e.__wbg_ptr=t,Eg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Eg.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_privateenckeymlkem512_free(t,0)}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>tt.__wbg_privatesigkey_free(n>>>0,1));const vg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_publicenckeymlkem512_free(n>>>0,1));class xs{static __wrap(t){t=t>>>0;const e=Object.create(xs.prototype);return e.__wbg_ptr=t,vg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,vg.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_publicenckeymlkem512_free(t,0)}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>tt.__wbg_publicsigkey_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>tt.__wbg_requestid_free(n>>>0,1));const xg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_serveridaddr_free(n>>>0,1));class Rs{static __wrap(t){t=t>>>0;const e=Object.create(Rs.prototype);return e.__wbg_ptr=t,xg.register(e,e.__wbg_ptr,e),e}static __unwrap(t){return t instanceof Rs?t.__destroy_into_raw():0}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,xg.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_serveridaddr_free(t,0)}}const Rg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_typedciphertext_free(n>>>0,1));class ro{static __wrap(t){t=t>>>0;const e=Object.create(ro.prototype);return e.__wbg_ptr=t,Rg.register(e,e.__wbg_ptr,e),e}static __unwrap(t){return t instanceof ro?t.__destroy_into_raw():0}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Rg.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_typedciphertext_free(t,0)}get ciphertext(){const t=tt.__wbg_get_typedciphertext_ciphertext(this.__wbg_ptr);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set ciphertext(t){const e=Je(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_eip712domainmsg_name(this.__wbg_ptr,e,r)}get fhe_type(){return tt.__wbg_get_typedciphertext_fhe_type(this.__wbg_ptr)}set fhe_type(t){tt.__wbg_set_typedciphertext_fhe_type(this.__wbg_ptr,t)}get external_handle(){const t=tt.__wbg_get_typedciphertext_external_handle(this.__wbg_ptr);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set external_handle(t){const e=Je(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_eip712domainmsg_version(this.__wbg_ptr,e,r)}get ciphertext_format(){return tt.__wbg_get_typedciphertext_ciphertext_format(this.__wbg_ptr)}set ciphertext_format(t){tt.__wbg_set_typedciphertext_ciphertext_format(this.__wbg_ptr,t)}}const Sg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_typedplaintext_free(n>>>0,1));class $u{static __wrap(t){t=t>>>0;const e=Object.create($u.prototype);return e.__wbg_ptr=t,Sg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Sg.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_typedplaintext_free(t,0)}get bytes(){const t=tt.__wbg_get_typedplaintext_bytes(this.__wbg_ptr);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set bytes(t){const e=Je(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_eip712domainmsg_name(this.__wbg_ptr,e,r)}get fhe_type(){return tt.__wbg_get_typedplaintext_fhe_type(this.__wbg_ptr)}set fhe_type(t){tt.__wbg_set_typedplaintext_fhe_type(this.__wbg_ptr,t)}}const zg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_typedsigncryptedciphertext_free(n>>>0,1));class no{static __wrap(t){t=t>>>0;const e=Object.create(no.prototype);return e.__wbg_ptr=t,zg.register(e,e.__wbg_ptr,e),e}static __unwrap(t){return t instanceof no?t.__destroy_into_raw():0}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,zg.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_typedsigncryptedciphertext_free(t,0)}get fhe_type(){return tt.__wbg_get_typedciphertext_fhe_type(this.__wbg_ptr)}set fhe_type(t){tt.__wbg_set_typedciphertext_fhe_type(this.__wbg_ptr,t)}get signcrypted_ciphertext(){const t=tt.__wbg_get_typedsigncryptedciphertext_signcrypted_ciphertext(this.__wbg_ptr);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set signcrypted_ciphertext(t){const e=Je(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_eip712domainmsg_name(this.__wbg_ptr,e,r)}get external_handle(){const t=tt.__wbg_get_typedsigncryptedciphertext_external_handle(this.__wbg_ptr);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set external_handle(t){const e=Je(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_eip712domainmsg_version(this.__wbg_ptr,e,r)}get packing_factor(){return tt.__wbg_get_typedciphertext_ciphertext_format(this.__wbg_ptr)>>>0}set packing_factor(t){tt.__wbg_set_typedciphertext_ciphertext_format(this.__wbg_ptr,t)}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>tt.__wbg_userdecryptionrequest_free(n>>>0,1));const $2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_userdecryptionresponse_free(n>>>0,1));class Yu{static __unwrap(t){return t instanceof Yu?t.__destroy_into_raw():0}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,$2.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_userdecryptionresponse_free(t,0)}get signature(){const t=tt.__wbg_get_userdecryptionresponse_signature(this.__wbg_ptr);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set signature(t){const e=Je(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_eip712domainmsg_name(this.__wbg_ptr,e,r)}get external_signature(){const t=tt.__wbg_get_userdecryptionresponse_external_signature(this.__wbg_ptr);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set external_signature(t){const e=Je(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_eip712domainmsg_version(this.__wbg_ptr,e,r)}get payload(){const t=tt.__wbg_get_userdecryptionresponse_payload(this.__wbg_ptr);return t===0?void 0:oa.__wrap(t)}set payload(t){let e=0;gi(t)||(Vi(t,oa),e=t.__destroy_into_raw()),tt.__wbg_set_userdecryptionresponse_payload(this.__wbg_ptr,e)}get extra_data(){const t=tt.__wbg_get_userdecryptionresponse_extra_data(this.__wbg_ptr);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set extra_data(t){const e=Je(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_eip712domainmsg_chain_id(this.__wbg_ptr,e,r)}}const Bg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>tt.__wbg_userdecryptionresponsepayload_free(n>>>0,1));class oa{static __wrap(t){t=t>>>0;const e=Object.create(oa.prototype);return e.__wbg_ptr=t,Bg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Bg.unregister(this),t}free(){const t=this.__destroy_into_raw();tt.__wbg_userdecryptionresponsepayload_free(t,0)}get verification_key(){const t=tt.__wbg_get_userdecryptionresponsepayload_verification_key(this.__wbg_ptr);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set verification_key(t){const e=Je(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_eip712domainmsg_name(this.__wbg_ptr,e,r)}get digest(){const t=tt.__wbg_get_userdecryptionresponsepayload_digest(this.__wbg_ptr);var e=We(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*1,1),e}set digest(t){const e=Je(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_eip712domainmsg_version(this.__wbg_ptr,e,r)}get signcrypted_ciphertexts(){const t=tt.__wbg_get_userdecryptionresponsepayload_signcrypted_ciphertexts(this.__wbg_ptr);var e=mg(t[0],t[1]).slice();return tt.__wbindgen_free(t[0],t[1]*4,4),e}set signcrypted_ciphertexts(t){const e=bg(t,tt.__wbindgen_malloc),r=ee;tt.__wbg_set_userdecryptionresponsepayload_signcrypted_ciphertexts(this.__wbg_ptr,e,r)}get party_id(){return tt.__wbg_get_userdecryptionresponsepayload_party_id(this.__wbg_ptr)>>>0}set party_id(t){tt.__wbg_set_userdecryptionresponsepayload_party_id(this.__wbg_ptr,t)}get degree(){return tt.__wbg_get_userdecryptionresponsepayload_degree(this.__wbg_ptr)>>>0}set degree(t){tt.__wbg_set_userdecryptionresponsepayload_degree(this.__wbg_ptr,t)}}async function Y2(n,t){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,t)}catch(r){if(n.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}const e=await n.arrayBuffer();return await WebAssembly.instantiate(e,t)}else{const e=await WebAssembly.instantiate(n,t);return e instanceof WebAssembly.Instance?{instance:e,module:n}:e}}function Z2(){const n={};return n.wbg={},n.wbg.__wbg_String_8f0eb39a4a4c2f66=function(t,e){const r=String(e),i=ji(r,tt.__wbindgen_malloc,tt.__wbindgen_realloc),o=ee;Ke().setInt32(t+4*1,o,!0),Ke().setInt32(t+4*0,i,!0)},n.wbg.__wbg_buffer_609cc3eee51ed158=function(t){return t.buffer},n.wbg.__wbg_call_672a4d21634d4a24=function(){return Hi(function(t,e){return t.call(e)},arguments)},n.wbg.__wbg_call_7cccdd69e0791ae2=function(){return Hi(function(t,e,r){return t.call(e,r)},arguments)},n.wbg.__wbg_crypto_ed58b8e10a292839=function(t){return t.crypto},n.wbg.__wbg_done_769e5ede4b31c67b=function(t){return t.done},n.wbg.__wbg_error_7534b8e9a36f1ab4=function(t,e){let r,i;try{r=t,i=e,console.error(eo(t,e))}finally{tt.__wbindgen_free(r,i,1)}},n.wbg.__wbg_getRandomValues_bcb4912f16000dc4=function(){return Hi(function(t,e){t.getRandomValues(e)},arguments)},n.wbg.__wbg_get_67b2ba62fc30de12=function(){return Hi(function(t,e){return Reflect.get(t,e)},arguments)},n.wbg.__wbg_get_b9b93047fe3cf45b=function(t,e){return t[e>>>0]},n.wbg.__wbg_getwithrefkey_1dc361bd10053bfe=function(t,e){return t[e]},n.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc=function(t){let e;try{e=t instanceof ArrayBuffer}catch{e=!1}return e},n.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9=function(t){let e;try{e=t instanceof Uint8Array}catch{e=!1}return e},n.wbg.__wbg_isArray_a1eab7e0d067391b=function(t){return Array.isArray(t)},n.wbg.__wbg_isSafeInteger_343e2beeeece1bb0=function(t){return Number.isSafeInteger(t)},n.wbg.__wbg_iterator_9a24c88df860dc65=function(){return Symbol.iterator},n.wbg.__wbg_length_a446193dc22c12f8=function(t){return t.length},n.wbg.__wbg_length_e2d2a49132c1b256=function(t){return t.length},n.wbg.__wbg_msCrypto_0a36e2ec3a343d26=function(t){return t.msCrypto},n.wbg.__wbg_new_8a6f238a6ece86ea=function(){return new Error},n.wbg.__wbg_new_a12002a7f91c75be=function(t){return new Uint8Array(t)},n.wbg.__wbg_newnoargs_105ed471475aaf50=function(t,e){return new Function(eo(t,e))},n.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a=function(t,e,r){return new Uint8Array(t,e>>>0,r>>>0)},n.wbg.__wbg_newwithlength_a381634e90c276d4=function(t){return new Uint8Array(t>>>0)},n.wbg.__wbg_next_25feadfc0913fea9=function(t){return t.next},n.wbg.__wbg_next_6574e1a8a62d1055=function(){return Hi(function(t){return t.next()},arguments)},n.wbg.__wbg_node_02999533c4ea02e3=function(t){return t.node},n.wbg.__wbg_process_5c1d670bc53614b8=function(t){return t.process},n.wbg.__wbg_randomFillSync_ab2cfe79ebbf2740=function(){return Hi(function(t,e){t.randomFillSync(e)},arguments)},n.wbg.__wbg_require_79b1e9274cde3c87=function(){return Hi(function(){return module.require},arguments)},n.wbg.__wbg_serveridaddr_new=function(t){return Rs.__wrap(t)},n.wbg.__wbg_serveridaddr_unwrap=function(t){return Rs.__unwrap(t)},n.wbg.__wbg_set_65595bdd868b3009=function(t,e,r){t.set(e,r>>>0)},n.wbg.__wbg_stack_0ed75d68575b0f3c=function(t,e){const r=e.stack,i=ji(r,tt.__wbindgen_malloc,tt.__wbindgen_realloc),o=ee;Ke().setInt32(t+4*1,o,!0),Ke().setInt32(t+4*0,i,!0)},n.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07=function(){const t=typeof ta>"u"?null:ta;return gi(t)?0:vs(t)},n.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0=function(){const t=typeof globalThis>"u"?null:globalThis;return gi(t)?0:vs(t)},n.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819=function(){const t=typeof self>"u"?null:self;return gi(t)?0:vs(t)},n.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40=function(){const t=typeof window>"u"?null:window;return gi(t)?0:vs(t)},n.wbg.__wbg_subarray_aa9065fa9dc5df96=function(t,e,r){return t.subarray(e>>>0,r>>>0)},n.wbg.__wbg_typedciphertext_new=function(t){return ro.__wrap(t)},n.wbg.__wbg_typedciphertext_unwrap=function(t){return ro.__unwrap(t)},n.wbg.__wbg_typedplaintext_new=function(t){return $u.__wrap(t)},n.wbg.__wbg_typedsigncryptedciphertext_new=function(t){return no.__wrap(t)},n.wbg.__wbg_typedsigncryptedciphertext_unwrap=function(t){return no.__unwrap(t)},n.wbg.__wbg_userdecryptionresponse_unwrap=function(t){return Yu.__unwrap(t)},n.wbg.__wbg_value_cd1ffa7b1ab794f1=function(t){return t.value},n.wbg.__wbg_versions_c71aa1626a93e0a1=function(t){return t.versions},n.wbg.__wbindgen_as_number=function(t){return+t},n.wbg.__wbindgen_boolean_get=function(t){const e=t;return typeof e=="boolean"?e?1:0:2},n.wbg.__wbindgen_debug_string=function(t,e){const r=Ju(e),i=ji(r,tt.__wbindgen_malloc,tt.__wbindgen_realloc),o=ee;Ke().setInt32(t+4*1,o,!0),Ke().setInt32(t+4*0,i,!0)},n.wbg.__wbindgen_error_new=function(t,e){return new Error(eo(t,e))},n.wbg.__wbindgen_in=function(t,e){return t in e},n.wbg.__wbindgen_init_externref_table=function(){const t=tt.__wbindgen_export_4,e=t.grow(4);t.set(0,void 0),t.set(e+0,void 0),t.set(e+1,null),t.set(e+2,!0),t.set(e+3,!1)},n.wbg.__wbindgen_is_function=function(t){return typeof t=="function"},n.wbg.__wbindgen_is_null=function(t){return t===null},n.wbg.__wbindgen_is_object=function(t){const e=t;return typeof e=="object"&&e!==null},n.wbg.__wbindgen_is_string=function(t){return typeof t=="string"},n.wbg.__wbindgen_is_undefined=function(t){return t===void 0},n.wbg.__wbindgen_jsval_loose_eq=function(t,e){return t==e},n.wbg.__wbindgen_memory=function(){return tt.memory},n.wbg.__wbindgen_number_get=function(t,e){const r=e,i=typeof r=="number"?r:void 0;Ke().setFloat64(t+8*1,gi(i)?0:i,!0),Ke().setInt32(t+4*0,!gi(i),!0)},n.wbg.__wbindgen_string_get=function(t,e){const r=e,i=typeof r=="string"?r:void 0;var o=gi(i)?0:ji(i,tt.__wbindgen_malloc,tt.__wbindgen_realloc),a=ee;Ke().setInt32(t+4*1,a,!0),Ke().setInt32(t+4*0,o,!0)},n.wbg.__wbindgen_string_new=function(t,e){return eo(t,e)},n.wbg.__wbindgen_throw=function(t,e){throw new Error(eo(t,e))},n}function X2(n,t){return tt=n.exports,Zu.__wbindgen_wasm_module=t,Gi=null,to=null,tt.__wbindgen_start(),tt}async function Zu(n){if(tt!==void 0)return tt;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof n>"u"&&(n=new URL("/kms_lib_bg.wasm",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Ce&&Ce.tagName.toUpperCase()==="SCRIPT"&&Ce.src||new URL("relayer-sdk-js.umd.cjs",document.baseURI).href));const t=Z2();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));const{instance:e,module:r}=await Y2(await n,t);return X2(e,r)}const tA=BigInt(1024*1024*512),Xu=BigInt(1024*1024*512),t_=BigInt(1024*1024*512),io=n=>n?n.endsWith("/")?n.slice(0,-1):n:"",kg=n=>{let t=n.toString(16);return t.length%2?"0"+t:t},$e=n=>{const t=n.replace(/^(0x)/,"").match(/.{1,2}/g);return t?Uint8Array.from(t.map(e=>parseInt(e,16))):new Uint8Array};function qn(n,t=!1){return`${t?"0x":""}${n.reduce((e,r)=>e+r.toString(16).padStart(2,"0"),"")}`}const eA=function(n){if(!n||n?.length===0)return BigInt(0);const t=Array.from(n).map(e=>e.toString(16).padStart(2,"0")).join("");return BigInt(`0x${t}`)};function Pg(n){return n.startsWith("0x")?n:`0x${n}`}function rA(n,t){if(t)switch(t.__type){case"BearerToken":n.headers.Authorization=`Bearer ${t.token}`;break;case"ApiKeyHeader":n.headers[t.header||"x-api-key"]=t.value;break;case"ApiKeyCookie":if(typeof window<"u")document.cookie=`${t.cookie||"x-api-key"}=${t.value}; path=/; SameSite=Lax; Secure; HttpOnly;`,n.credentials="include";else{let e=`${t.cookie||"x-api-key"}=${t.value};`;n.headers.Cookie=e}break}return n}function Ig(n){if(n instanceof Error&&typeof n.cause=="object"&&n.cause!==null)return n.cause}function nA(n){const t=Ig(n);if(!(!t||!("code"in t)||!t.code)&&typeof t.code=="string")return t.code}function iA(n){const t=Ig(n);if(!(!t||!("status"in t)||t.status===void 0)&&typeof t.status=="number")return t.status}async function Fg(n,t){let e;if(t.status===429)e="Relayer rate limit exceeded: Please wait and try again later.";else switch(n){case"PUBLIC_DECRYPT":{e=`Public decrypt failed: relayer respond with HTTP code ${t.status}`;break}case"USER_DECRYPT":{e=`User decrypt failed: relayer respond with HTTP code ${t.status}`;break}case"KEY_URL":{e=`HTTP error! status: ${t.status}`;break}default:{const i=await t.text();e=`Relayer didn't response correctly. Bad status ${t.statusText}. Content: ${i}`;break}}const r={code:"RELAYER_FETCH_ERROR",operation:n,status:t.status,statusText:t.statusText,url:t.url};throw new Error(e,{cause:r})}function Og(n,t){let e;switch(n){case"PUBLIC_DECRYPT":{e="Public decrypt failed: Relayer didn't return a JSON";break}case"USER_DECRYPT":{e="User decrypt failed: Relayer didn't return a JSON";break}default:{e="Relayer didn't return a JSON";break}}const r={code:"RELAYER_NO_JSON_ERROR",operation:n,error:t};throw new Error(e,{cause:r})}function Tg(n,t){let e;switch(n){case"PUBLIC_DECRYPT":{e="Public decrypt failed: Relayer returned an unexpected JSON response";break}case"USER_DECRYPT":{e="User decrypt failed: Relayer returned an unexpected JSON response";break}default:{e="Relayer returned an unexpected JSON response";break}}const r={code:"RELAYER_UNEXPECTED_JSON_ERROR",operation:n,error:t};throw new Error(e,{cause:r})}function sA(n,t){let e;switch(n){case"PUBLIC_DECRYPT":{e="Pulbic decrypt failed: the public decryption didn't succeed for an unknown reason";break}case"USER_DECRYPT":{e="User decrypt failed: the user decryption didn't succeed for an unknown reason";break}default:{e="Relayer didn't response correctly.";break}}const r={code:"RELAYER_INTERNAL_ERROR",operation:n,error:t};throw new Error(e,{cause:r})}function Cg(n,t,e){if(!e)switch(n){case"PUBLIC_DECRYPT":{e="Public decrypt failed: Relayer didn't respond";break}case"USER_DECRYPT":{e="User decrypt failed: Relayer didn't respond";break}default:{e="Relayer didn't response correctly. Bad JSON.";break}}const r={code:"RELAYER_UNKNOWN_ERROR",operation:n,error:t};throw new Error(e??"Relayer didn't response correctly.",{cause:r})}function Ng(n){if(!n||typeof n!="object")throw new Error("Unexpected response JSON.");if(!("response"in n&&n.response!==null&&n.response!==void 0))throw new Error("Unexpected response JSON format: missing 'response' property.")}async function e_(n,t,e,r){const i=rA({method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)},r?.auth);let o,a;try{o=await fetch(t,i)}catch(_){Cg(n,_)}o.ok||await Fg(n,o);let u;try{u=await o.json()}catch(_){Og(n,_)}try{Ng(u),a=u}catch(_){Tg(n,_)}return a}async function oA(n,t){let e,r;try{e=await fetch(t)}catch(o){Cg(n,o)}e.ok||await Fg(n,e);let i;try{i=await e.json()}catch(o){Og(n,o)}try{Ng(i),r=i}catch(o){Tg(n,o)}return r}const r_={},Lg=async(n,t)=>{if(r_[n])return r_[n];const e=await oA("KEY_URL",`${n}/v1/keyurl`);try{let r;if(!t)r=e.response.fhe_key_info[0].fhe_public_key.urls[0],t=e.response.fhe_key_info[0].fhe_public_key.data_id;else{const v=e.response.fhe_key_info.find(I=>I.fhe_public_key.data_id===t);if(!v)throw new Error(`Could not find FHE key info with data_id ${t}`);r=v.fhe_public_key.urls[0]}const i=await fetch(r);if(!i.ok)throw new Error(`HTTP error! status: ${i.status} on ${i.url}`);let o;typeof i.bytes=="function"?o=await i.bytes():o=new Uint8Array(await i.arrayBuffer());const a=e.response.crs[2048].urls[0],u=e.response.crs[2048].data_id,_=await fetch(a);if(!_.ok)throw new Error(`HTTP error! status: ${_.status} on ${_.url}`);let l;typeof _.bytes=="function"?l=await _.bytes():l=new Uint8Array(await _.arrayBuffer());let f;try{f=TFHE.TfheCompactPublicKey.safe_deserialize(o,Xu)}catch(v){throw new Error("Invalid public key (deserialization failed)",{cause:v})}let g;try{g=TFHE.CompactPkeCrs.safe_deserialize(new Uint8Array(l),t_)}catch(v){throw new Error("Invalid crs (deserialization failed)",{cause:v})}const y={publicKey:f,publicKeyId:t,publicParams:{2048:{publicParams:g,publicParamsId:u}}};return r_[n]=y,y}catch(r){throw new Error("Impossible to fetch public key: wrong relayer url.",{cause:r})}},Dg=["function getKmsSigners() view returns (address[])","function getThreshold() view returns (uint256)"],Ug=["function getCoprocessorSigners() view returns (address[])","function getThreshold() view returns (uint256)"],aA=n=>{if(typeof n.network=="string")return new Sm(n.network);if(n.network)return new Ni(n.network);throw new Error("You must provide a network URL or a EIP1193 object (eg: window.ethereum)")},cA=async(n,t)=>{if(t.chainId&&typeof t.chainId=="number")return t.chainId;if(t.chainId&&typeof t.chainId!="number")throw new Error("chainId must be a number.");{const e=(await n.getNetwork()).chainId;return Number(e)}},uA=async n=>{if(n.relayerUrl&&!n.publicKey){const t=await Lg(io(n.relayerUrl));return{publicKey:t.publicKey,publicKeyId:t.publicKeyId}}else if(n.publicKey&&n.publicKey.data&&n.publicKey.id){const t=n.publicKey.data;try{return{publicKey:TFHE.TfheCompactPublicKey.safe_deserialize(t,Xu),publicKeyId:n.publicKey.id}}catch(e){throw new Error("Invalid public key (deserialization failed)",{cause:e})}}else throw new Error("You must provide a public key with its public key ID.")},_A=async n=>{if(n.relayerUrl&&!n.publicParams)return(await Lg(io(n.relayerUrl))).publicParams;if(n.publicParams&&n.publicParams[2048]){const t=n.publicParams[2048].publicParams;try{return{2048:{publicParams:TFHE.CompactPkeCrs.safe_deserialize(t,t_),publicParamsId:n.publicParams[2048].publicParamsId}}}catch(e){throw new Error("Invalid public key (deserialization failed)",{cause:e})}}else throw new Error("You must provide a valid CRS with its CRS ID.")},fA=async(n,t)=>await new ir(t.kmsContractAddress,Dg,n).getKmsSigners(),lA=async(n,t)=>{const r=await new ir(t.kmsContractAddress,Dg,n).getThreshold();return Number(r)},hA=async(n,t)=>await new ir(t.inputVerifierContractAddress,Ug,n).getCoprocessorSigners(),pA=async(n,t)=>{const r=await new ir(t.inputVerifierContractAddress,Ug,n).getThreshold();return Number(r)},n_={0:2,2:8,3:16,4:32,5:64,6:128,7:160,8:256};function dA(n){if(n.length!==66)throw new Error(`Handle ${n} is not of valid length`);const t=n.slice(-4,-2).toLowerCase(),e=parseInt(t,16);if(!(e in n_))throw new Error(`Handle ${n} is not of valid type`);return e}function Mg(n){let t=0;for(const e of n){if(e.length!==66)throw new Error(`Handle ${e} is not of valid length`);const r=e.slice(-4,-2).toLowerCase(),i=parseInt(r,16);if(!(i in n_))throw new Error(`Handle ${e} is not of valid type`);if(t+=n_[i],t>2048)throw new Error("Cannot decrypt more than 2048 encrypted bits in a single request")}return t}const aa=n=>Dt(n),wA=["function persistAllowed(bytes32 handle, address account) view returns (bool)"],jg=10,Gg=BigInt(365);function gA(n,t){if(t===0)return n===BigInt(1);if(t===7)return aa("0x"+n.toString(16).padStart(40,"0"));if(t>8||t==1)throw new Error(`Unsupported handle type ${t}`);return n}function yA(n,t){let e=[];for(const i of n){const o=i.slice(-4,-2).toLowerCase(),a=parseInt(o,16);e.push(a)}const r={};return n.forEach((i,o)=>r[i]=gA(t[o],e[o])),r}function bA(n,t){if(t===BigInt(0))throw Error("durationDays is null");if(t>Gg)throw Error(`durationDays is above max duration of ${Gg}`);const e=BigInt(Math.floor(Date.now()/1e3));if(n>e)throw Error("startTimestamp is set in the future");const r=t*BigInt(86400);if(n+r<e)throw Error("User decrypt request has expired")}const mA=(n,t,e,r,i,o,a,u)=>async(_,l,f,g,y,v,I,k,T)=>{const E="0x00";let R,B;try{R=TKMS.u8vec_to_ml_kem_pke_pk($e(f)),B=TKMS.u8vec_to_ml_kem_pke_sk($e(l))}catch(wt){throw new Error("Invalid public or private key",{cause:wt})}const z=g.replace(/^(0x)/,""),O=f.replace(/^(0x)/,""),C=_.map(wt=>({handle:typeof wt.handle=="string"?qn($e(wt.handle),!0):qn(wt.handle,!0),contractAddress:aa(wt.contractAddress)}));Mg(C.map(wt=>wt.handle)),bA(BigInt(I),BigInt(k));const N=new ir(i,wA,a),D=C.map(async({handle:wt,contractAddress:at})=>{const pt=await N.persistAllowed(wt,v),mt=await N.persistAllowed(wt,at);if(!pt)throw new Error(`User ${v} is not authorized to user decrypt handle ${wt}!`);if(!mt)throw new Error(`dapp contract ${at} is not authorized to user decrypt handle ${wt}!`);if(v===at)throw new Error(`userAddress ${v} should not be equal to contractAddress when requesting user decryption!`)}),$=y.length;if($===0)throw Error("contractAddresses is empty");if($>jg)throw Error(`contractAddresses max length of ${jg} exceeded`);await Promise.all(D).catch(wt=>{throw wt});const et={handleContractPairs:C,requestValidity:{startTimestamp:I.toString(),durationDays:k.toString()},contractsChainId:e.toString(),contractAddresses:y.map(wt=>aa(wt)),userAddress:aa(v),signature:z,publicKey:O,extraData:E},ft=await e_("USER_DECRYPT",`${o}/v1/user-decrypt`,et,u??T);let L=n.map((wt,at)=>TKMS.new_server_id_addr(at+1,wt));const vt=TKMS.new_client(L,v,"default");try{const wt=new ArrayBuffer(32);new DataView(wt).setUint32(28,t,!1);const mt={name:"Decryption",version:"1",chain_id:new Uint8Array(wt),verifying_contract:r,salt:null},Rt={signature:z,client_address:v,enc_key:O,ciphertext_handles:C.map(W=>W.handle.replace(/^0x/,"")),eip712_verifying_contract:r},Pt=TKMS.process_user_decryption_resp_from_js(vt,Rt,mt,ft.response,R,B,!0).map(W=>eA(W.bytes));return yA(C.map(W=>W.handle),Pt)}catch(wt){throw new Error("An error occured during decryption",{cause:wt})}},Ki=(n,t)=>{if(n==null)throw new Error("Missing value");let e;if(t>=8?e=BigInt(`0x${new Array(t/8).fill(null).reduce(r=>`${r}ff`,"")}`):e=BigInt(2**t-1),typeof n!="number"&&typeof n!="bigint")throw new Error("Value must be a number or a bigint.");if(n>e)throw new Error(`The value exceeds the limit for ${t}bits integer (${e.toString()}).`)},AA=({aclContractAddress:n,chainId:t,tfheCompactPublicKey:e,publicParams:r,contractAddress:i,userAddress:o})=>{if(!qe(i))throw new Error("Contract address is not a valid address.");if(!qe(o))throw new Error("User address is not a valid address.");const a=e,u=[],_=TFHE.CompactCiphertextList.builder(a);let l=new Uint8Array;const f=g=>{if(u.reduce((y,v)=>y+Math.max(2,v),0)+g>2048)throw Error("Packing more than 2048 bits in a single input ciphertext is unsupported");if(u.length+1>256)throw Error("Packing more than 256 variables in a single input ciphertext is unsupported")};return{addBool(g){if(g==null)throw new Error("Missing value");if(typeof g!="boolean"&&typeof g!="number"&&typeof g!="bigint")throw new Error("The value must be a boolean, a number or a bigint.");if(Number(g)>1)throw new Error("The value must be 1 or 0.");return Ki(Number(g),1),f(2),_.push_boolean(!!g),u.push(2),this},add8(g){return Ki(g,8),f(8),_.push_u8(Number(g)),u.push(8),this},add16(g){return Ki(g,16),f(16),_.push_u16(Number(g)),u.push(16),this},add32(g){return Ki(g,32),f(32),_.push_u32(Number(g)),u.push(32),this},add64(g){return Ki(g,64),f(64),_.push_u64(BigInt(g)),u.push(64),this},add128(g){return Ki(g,128),f(128),_.push_u128(BigInt(g)),u.push(128),this},addAddress(g){if(!qe(g))throw new Error("The value must be a valid address.");return f(160),_.push_u160(BigInt(g)),u.push(160),this},add256(g){return Ki(g,256),f(256),_.push_u256(BigInt(g)),u.push(256),this},getBits(){return u},encrypt(){const y=(()=>{const z=D=>Object.keys(D),O=u.reduce((D,$)=>D+$,0),C=z(r),N=C.find(D=>Number(D)>=O);if(!N)throw new Error(`Too many bits in provided values. Maximum is ${C[C.length-1]}.`);return N})(),v=r[y].publicParams,I=$e(i),k=$e(o),T=$e(n),E=$e(t.toString(16).padStart(64,"0")),R=new Uint8Array(I.length+k.length+T.length+32);return R.set(I,0),R.set(k,20),R.set(T,40),R.set(E,R.length-E.length),l=_.build_with_proof_packed(v,R,TFHE.ZkComputeLoad.Verify).safe_serialize(tA),l}}},Hg={2:0,8:2,16:3,32:4,64:5,128:6,160:7,256:8},EA=BigInt("18446744073709551615"),vA="ZK-w_rct",xA="ZK-w_hdl",RA=(n,t,e,r,i)=>{const o=zd("keccak256").update(Ne.from(vA)).update(Ne.from(n)).digest(),a=Ne.from($e(e)),u=r.toString(16).padStart(64,"0"),_=Ne.from(u,"hex");return t.map((f,g)=>{const y=Hg[f],v=Ne.from([g]),I=zd("keccak256").update(Ne.from(xA)).update(o).update(v).update(a).update(_).digest(),k=new Uint8Array(32);if(k.set(I,0),BigInt(r)>EA)throw new Error("ChainId exceeds maximum allowed value (8 bytes)");const T=$e(u).slice(24,32);return k[21]=g,k.set(T,22),k[30]=y,k[31]=i,k})},Vg=n=>Dt(n),SA=()=>0;function zA(n,t,e){const r=new Map;t.forEach((i,o)=>{if(r.has(i)){const a=i;throw new Error(`Duplicate coprocessor signer address found: ${a} appears multiple times in recovered addresses`)}r.set(i,o)});for(const i of t)if(!n.includes(i))throw new Error(`Invalid address found: ${i} is not in the list of coprocessor signers`);return t.length>=e}function BA(n){const t=n.response;return typeof t!="object"||t===null||!("handles"in t&&Array.isArray(t.handles))||!("signatures"in t&&Array.isArray(t.signatures))?!1:t.signatures.every(e=>typeof e=="string")&&t.handles.every(e=>typeof e=="string")}const kA=(n,t,e,r,i,o,a,u,_,l)=>(f,g)=>{if(!qe(f))throw new Error("Contract address is not a valid address.");if(!qe(g))throw new Error("User address is not a valid address.");const y=AA({aclContractAddress:n,chainId:e,tfheCompactPublicKey:o,publicParams:a,contractAddress:f,userAddress:g});return{_input:y,addBool(v){return y.addBool(v),this},add8(v){return y.add8(v),this},add16(v){return y.add16(v),this},add32(v){return y.add32(v),this},add64(v){return y.add64(v),this},add128(v){return y.add128(v),this},add256(v){return y.add256(v),this},addAddress(v){return y.addAddress(v),this},getBits(){return y.getBits()},encrypt:async v=>{const I="0x00",k=y.getBits(),T=y.encrypt(),E={contractAddress:Vg(f),userAddress:Vg(g),ciphertextWithInputVerification:qn(T),contractChainId:"0x"+e.toString(16),extraData:I},R=await e_("INPUT_PROOF",`${i}/v1/input-proof`,E,v??l);BA(R)||sA("INPUT_PROOF",R);const B=RA(T,k,n,e,SA());if(R.response.handles&&R.response.handles.length>0){const L=R.response.handles.map($e);if(B.length!=L.length)throw new Error(`Incorrect Handles list sizes: (expected) ${B.length} != ${L.length} (received)`);for(let vt=0;vt<B.length;vt+=1){let wt=B[vt],at=L[vt],pt=qn(wt),mt=qn(at);if(pt!==mt)throw new Error(`Incorrect Handle ${vt}: (expected) ${pt} != ${mt} (received)`)}}const z=R.response.signatures,O={name:"InputVerification",version:"1",chainId:r,verifyingContract:t},C={CiphertextVerification:[{name:"ctHandles",type:"bytes32[]"},{name:"userAddress",type:"address"},{name:"contractAddress",type:"address"},{name:"contractChainId",type:"uint256"},{name:"extraData",type:"bytes"}]},N=z.map(L=>{const vt=L.startsWith("0x")?L:`0x${L}`;return Ol(O,C,{ctHandles:B,userAddress:g,contractAddress:f,contractChainId:e,extraData:I},vt)});if(!zA(u,N,_))throw Error("Coprocessor signers threshold is not reached");let $=kg(B.length);const et=z.length;return $+=kg(et),B.map(L=>qn(L)).map(L=>$+=L),z.map(L=>$+=L.slice(2)),$+=I.slice(2),{handles:B,inputProof:$e($)}}}},PA=["function isAllowedForDecryption(bytes32 handle) view returns (bool)"];function IA(n,t,e){const r=new Map;t.forEach((i,o)=>{if(r.has(i)){const a=i;throw new Error(`Duplicate KMS signer address found: ${a} appears multiple times in recovered addresses`)}r.set(i,o)});for(const i of t)if(!n.includes(i))throw new Error(`Invalid address found: ${i} is not in the list of KMS signers`);return t.length>=e}function FA(n){const t=Object.keys(n),e=[],r=[];for(let a=0;a<t.length;++a){const u=t[a],_=dA(u);let l=n[u];typeof l=="boolean"&&(l=l?"0x01":"0x00");const f=BigInt(l);switch(e.push("uint256"),_){case 7:{r.push(`0x${f.toString(16).padStart(40,"0")}`);break}case 0:{if(f!==BigInt(0)&&f!==BigInt(1))throw new Error(`Invalid ebool clear text value ${f}. Expecting 0 or 1.`);r.push(f);break}case 2:case 3:case 4:case 5:case 6:case 8:{r.push(f);break}default:throw new Error(`Unsupported Fhevm primitive type id: ${_}`)}}const o=li.defaultAbiCoder().encode(e,r);return{abiTypes:e,abiValues:r,abiEncodedClearValues:o}}function OA(n,t){const e=Sl(["uint8"],[n.length]),r=Sl(Array(n.length).fill("bytes"),n);return te([e,r,t])}const TA={0:"bool",2:"uint256",3:"uint256",4:"uint256",5:"uint256",6:"uint256",7:"address",8:"uint256"};function CA(n,t){let e=[];for(const l of n){const f=l.slice(-4,-2).toLowerCase(),g=parseInt(f,16);e.push(g)}const r="0x"+"00".repeat(32)+t.slice(2)+"00".repeat(32),i=e.map(l=>TA[l]),u=new li().decode(["uint256",...i,"bytes[]"],r).slice(1,1+e.length),_={};return n.forEach((l,f)=>_[l]=u[f]),_}const NA=(n,t,e,r,i,o,a,u)=>async(_,l)=>{const f="0x00",g=new ir(i,PA,a);let y;try{y=await Promise.all(_.map(async et=>{const ft=qn(typeof et=="string"?$e(et):et,!0);if(!await g.isAllowedForDecryption(ft))throw new Error(`Handle ${ft} is not allowed for public decryption!`);return ft}))}catch(et){throw et}Mg(y);const v={ciphertextHandles:y,extraData:f},I=await e_("PUBLIC_DECRYPT",`${o}/v1/public-decrypt`,v,l??u),k={name:"Decryption",version:"1",chainId:e,verifyingContract:r},T={PublicDecryptVerification:[{name:"ctHandles",type:"bytes32[]"},{name:"decryptedResult",type:"bytes"},{name:"extraData",type:"bytes"}]},E=I.response[0],R=Pg(E.decrypted_value),B=E.signatures.map(Pg),z="0x",O=B.map(et=>Ol(k,T,{ctHandles:y,decryptedResult:R,extraData:z},et));if(!IA(n,O,t))throw Error("KMS signers threshold is not reached");const N=CA(y,R),D=FA(N),$=OA(B,z);return{clearValues:N,abiEncodedClearValues:D.abiEncodedClearValues,decryptionProof:$}},qg=(n,t)=>(e,r,i,o,a)=>{const u="0x00";if(a&&!qe(a))throw new Error("Invalid delegated account.");if(!qe(n))throw new Error("Invalid verifying contract address.");if(!r.every(v=>qe(v)))throw new Error("Invalid contract address.");const _=typeof e=="string"?e.startsWith("0x")?e:`0x${e}`:e,l=typeof i=="number"?i.toString():i,f=typeof o=="number"?o.toString():o,g=[{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"}],y={name:"Decryption",version:"1",chainId:t,verifyingContract:n};return a?{types:{EIP712Domain:g,DelegatedUserDecryptRequestVerification:[{name:"publicKey",type:"bytes"},{name:"contractAddresses",type:"address[]"},{name:"startTimestamp",type:"uint256"},{name:"durationDays",type:"uint256"},{name:"extraData",type:"bytes"},{name:"delegatedAccount",type:"address"}]},primaryType:"DelegatedUserDecryptRequestVerification",domain:y,message:{publicKey:_,contractAddresses:r,startTimestamp:l,durationDays:f,extraData:u,delegatedAccount:a}}:{types:{EIP712Domain:g,UserDecryptRequestVerification:[{name:"publicKey",type:"bytes"},{name:"contractAddresses",type:"address[]"},{name:"startTimestamp",type:"uint256"},{name:"durationDays",type:"uint256"},{name:"extraData",type:"bytes"}]},primaryType:"UserDecryptRequestVerification",domain:y,message:{publicKey:_,contractAddresses:r,startTimestamp:l,durationDays:f,extraData:u}}},Qg=()=>{const n=TKMS.ml_kem_pke_keygen();return{publicKey:qn(TKMS.ml_kem_pke_pk_to_u8vec(TKMS.ml_kem_pke_get_pk(n))),privateKey:qn(TKMS.ml_kem_pke_sk_to_u8vec(n))}};Ji.fetch=B2(Ji.fetch,{retries:5,retryDelay:500});const LA={aclContractAddress:"0xf0Ffdc93b7E186bC2f8CB3dAA75D86d1930A433D",kmsContractAddress:"0xbE0E383937d564D7FF0BC3b46c51f0bF8d5C311A",inputVerifierContractAddress:"0xBBC1fFCdc7C316aAAd72E807D9b0272BE8F84DA0",verifyingContractAddressDecryption:"0x5D8BD78e2ea6bbE41f26dFe9fdaEAa349e077478",verifyingContractAddressInputVerification:"0x483b9dE06E4E4C7D35CCf5837A1668487406D955",chainId:11155111,gatewayChainId:10901,network:"https://ethereum-sepolia-rpc.publicnode.com",relayerUrl:"https://relayer.testnet.zama.org"},DA=async n=>{const{verifyingContractAddressDecryption:t,verifyingContractAddressInputVerification:e,publicKey:r,kmsContractAddress:i,aclContractAddress:o,gatewayChainId:a,auth:u}=n;if(!i||!qe(i))throw new Error("KMS contract address is not valid or empty");if(!t||!qe(t))throw new Error("Verifying contract for Decryption address is not valid or empty");if(!e||!qe(e))throw new Error("Verifying contract for InputVerification address is not valid or empty");if(!o||!qe(o))throw new Error("ACL contract address is not valid or empty");if(r&&!(r.data instanceof Uint8Array))throw new Error("publicKey must be a Uint8Array");const _=aA(n);if(!_)throw new Error("No network has been provided!");const l=await cA(_,n),f=await uA(n),g=await _A(n),y=await fA(_,n),v=await lA(_,n),I=await hA(_,n),k=await pA(_,n);return{createEncryptedInput:kA(o,e,l,a,io(n.relayerUrl),f.publicKey,g,I,k,u&&{auth:u}),generateKeypair:Qg,createEIP712:qg(t,l),publicDecrypt:NA(y,v,a,t,o,io(n.relayerUrl),_,u&&{auth:u}),userDecrypt:mA(y,a,l,t,o,io(n.relayerUrl),_,u&&{auth:u}),getPublicKey:()=>f.publicKey?{publicKey:f.publicKey.safe_serialize(Xu),publicKeyId:f.publicKeyId}:null,getPublicParams:T=>g[T]?{publicParams:g[T].publicParams.safe_serialize(t_),publicParamsId:g[T].publicParamsId}:null}};let Kg=!1;const UA=async({tfheParams:n,kmsParams:t,thread:e}={})=>(e==null&&(e=navigator.hardwareConcurrency),await k2()||(console.warn(`This browser does not support threads. Verify that your server returns correct headers:
|
|
23
23
|
`,`'Cross-Origin-Opener-Policy': 'same-origin'
|
|
24
24
|
`,"'Cross-Origin-Embedder-Policy': 'require-corp'"),e=void 0),Kg||(await Xs({module_or_path:n}),await Zu({module_or_path:t}),e&&(Qu(),await Ku(e)),Kg=!0),!0);window.TFHE={default:Xs,initThreadPool:Ku,init_panic_hook:Qu,TfheCompactPublicKey:Me,CompactPkeCrs:Ue,CompactCiphertextList:Vn,ZkComputeLoad:Pd},window.TKMS={default:Zu,u8vec_to_ml_kem_pke_pk:K2,u8vec_to_ml_kem_pke_sk:W2,new_client:G2,new_server_id_addr:j2,process_user_decryption_resp_from_js:J2,ml_kem_pke_keygen:H2,ml_kem_pke_pk_to_u8vec:q2,ml_kem_pke_sk_to_u8vec:Q2,ml_kem_pke_get_pk:V2},Te.ENCRYPTION_TYPES=Hg,Te.SepoliaConfig=LA,Te.createEIP712=qg,Te.createInstance=DA,Te.generateKeypair=Qg,Te.getErrorCauseCode=nA,Te.getErrorCauseStatus=iA,Te.initSDK=UA,Object.defineProperty(Te,Symbol.toStringTag,{value:"Module"})});
|
package/lib/node.cjs
CHANGED
|
@@ -1169,7 +1169,7 @@ function abiEncodeClearValues(clearValues) {
|
|
|
1169
1169
|
case 4: //euint32
|
|
1170
1170
|
case 5: //euint64
|
|
1171
1171
|
case 6: //euint128
|
|
1172
|
-
case
|
|
1172
|
+
case 8: {
|
|
1173
1173
|
//euint256
|
|
1174
1174
|
// bigint
|
|
1175
1175
|
abiValues.push(clearTextValueBigInt);
|
|
@@ -1452,7 +1452,7 @@ const createInstance = async (config) => {
|
|
|
1452
1452
|
const coprocessorSigners = await getCoprocessorSigners(provider, config);
|
|
1453
1453
|
const thresholdCoprocessorSigners = await getCoprocessorSignersThreshold(provider, config);
|
|
1454
1454
|
return {
|
|
1455
|
-
createEncryptedInput: createRelayerEncryptedInput(aclContractAddress, verifyingContractAddressInputVerification, chainId, gatewayChainId, cleanURL(config.relayerUrl), publicKeyData.publicKey, publicParamsData, coprocessorSigners, thresholdCoprocessorSigners),
|
|
1455
|
+
createEncryptedInput: createRelayerEncryptedInput(aclContractAddress, verifyingContractAddressInputVerification, chainId, gatewayChainId, cleanURL(config.relayerUrl), publicKeyData.publicKey, publicParamsData, coprocessorSigners, thresholdCoprocessorSigners, auth && { auth }),
|
|
1456
1456
|
generateKeypair,
|
|
1457
1457
|
createEIP712: createEIP712(verifyingContractAddressDecryption, chainId),
|
|
1458
1458
|
publicDecrypt: publicDecryptRequest(kmsSigners, thresholdKMSSigners, gatewayChainId, verifyingContractAddressDecryption, aclContractAddress, cleanURL(config.relayerUrl), provider, auth && { auth }),
|
package/lib/node.js
CHANGED
|
@@ -1148,7 +1148,7 @@ function abiEncodeClearValues(clearValues) {
|
|
|
1148
1148
|
case 4: //euint32
|
|
1149
1149
|
case 5: //euint64
|
|
1150
1150
|
case 6: //euint128
|
|
1151
|
-
case
|
|
1151
|
+
case 8: {
|
|
1152
1152
|
//euint256
|
|
1153
1153
|
// bigint
|
|
1154
1154
|
abiValues.push(clearTextValueBigInt);
|
|
@@ -1431,7 +1431,7 @@ const createInstance = async (config) => {
|
|
|
1431
1431
|
const coprocessorSigners = await getCoprocessorSigners(provider, config);
|
|
1432
1432
|
const thresholdCoprocessorSigners = await getCoprocessorSignersThreshold(provider, config);
|
|
1433
1433
|
return {
|
|
1434
|
-
createEncryptedInput: createRelayerEncryptedInput(aclContractAddress, verifyingContractAddressInputVerification, chainId, gatewayChainId, cleanURL(config.relayerUrl), publicKeyData.publicKey, publicParamsData, coprocessorSigners, thresholdCoprocessorSigners),
|
|
1434
|
+
createEncryptedInput: createRelayerEncryptedInput(aclContractAddress, verifyingContractAddressInputVerification, chainId, gatewayChainId, cleanURL(config.relayerUrl), publicKeyData.publicKey, publicParamsData, coprocessorSigners, thresholdCoprocessorSigners, auth && { auth }),
|
|
1435
1435
|
generateKeypair,
|
|
1436
1436
|
createEIP712: createEIP712(verifyingContractAddressDecryption, chainId),
|
|
1437
1437
|
publicDecrypt: publicDecryptRequest(kmsSigners, thresholdKMSSigners, gatewayChainId, verifyingContractAddressDecryption, aclContractAddress, cleanURL(config.relayerUrl), provider, auth && { auth }),
|
package/lib/web.js
CHANGED
|
@@ -17395,7 +17395,7 @@ function abiEncodeClearValues(clearValues) {
|
|
|
17395
17395
|
case 4: //euint32
|
|
17396
17396
|
case 5: //euint64
|
|
17397
17397
|
case 6: //euint128
|
|
17398
|
-
case
|
|
17398
|
+
case 8: {
|
|
17399
17399
|
//euint256
|
|
17400
17400
|
// bigint
|
|
17401
17401
|
abiValues.push(clearTextValueBigInt);
|
|
@@ -17678,7 +17678,7 @@ const createInstance = async (config) => {
|
|
|
17678
17678
|
const coprocessorSigners = await getCoprocessorSigners(provider, config);
|
|
17679
17679
|
const thresholdCoprocessorSigners = await getCoprocessorSignersThreshold(provider, config);
|
|
17680
17680
|
return {
|
|
17681
|
-
createEncryptedInput: createRelayerEncryptedInput(aclContractAddress, verifyingContractAddressInputVerification, chainId, gatewayChainId, cleanURL(config.relayerUrl), publicKeyData.publicKey, publicParamsData, coprocessorSigners, thresholdCoprocessorSigners),
|
|
17681
|
+
createEncryptedInput: createRelayerEncryptedInput(aclContractAddress, verifyingContractAddressInputVerification, chainId, gatewayChainId, cleanURL(config.relayerUrl), publicKeyData.publicKey, publicParamsData, coprocessorSigners, thresholdCoprocessorSigners, auth && { auth }),
|
|
17682
17682
|
generateKeypair,
|
|
17683
17683
|
createEIP712: createEIP712(verifyingContractAddressDecryption, chainId),
|
|
17684
17684
|
publicDecrypt: publicDecryptRequest(kmsSigners, thresholdKMSSigners, gatewayChainId, verifyingContractAddressDecryption, aclContractAddress, cleanURL(config.relayerUrl), provider, auth && { auth }),
|