@learncard/core 8.5.5 → 9.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/core.cjs.development.js +843 -68975
- package/dist/core.cjs.development.js.map +4 -4
- package/dist/core.cjs.production.min.js +1 -948
- package/dist/core.cjs.production.min.js.map +4 -4
- package/dist/core.esm.js +1059 -69202
- package/dist/core.esm.js.map +4 -4
- package/dist/index.d.ts +0 -1
- package/dist/types/LearnCard.d.ts +0 -57
- package/dist/types/helpers.d.ts +0 -15
- package/dist/types/planes.d.ts +36 -5
- package/dist/types/utilities.d.ts +4 -0
- package/dist/wallet/plugins/index.d.ts +1 -13
- package/package.json +4 -24
- package/dist/didkit/didkit_wasm.d.ts +0 -251
- package/dist/didkit/didkit_wasm.js +0 -1135
- package/dist/didkit/didkit_wasm_bg.wasm +0 -0
- package/dist/didkit/didkit_wasm_bg.wasm.d.ts +0 -43
- package/dist/didkit/index.d.ts +0 -4
- package/dist/didkit_wasm.d.ts +0 -251
- package/dist/didkit_wasm.js +0 -1135
- package/dist/didkit_wasm_bg.wasm +0 -0
- package/dist/didkit_wasm_bg.wasm.d.ts +0 -43
- package/dist/wallet/defaults.d.ts +0 -5
- package/dist/wallet/init.d.ts +0 -29
- package/dist/wallet/initializers/apiLearnCard.d.ts +0 -14
- package/dist/wallet/initializers/customLearnCard.d.ts +0 -7
- package/dist/wallet/initializers/emptyLearnCard.d.ts +0 -7
- package/dist/wallet/initializers/learnCardFromSeed.d.ts +0 -7
- package/dist/wallet/plugins/EthereumPlugin/hardcodedTokens.d.ts +0 -22
- package/dist/wallet/plugins/EthereumPlugin/helpers.d.ts +0 -7
- package/dist/wallet/plugins/EthereumPlugin/index.d.ts +0 -7
- package/dist/wallet/plugins/EthereumPlugin/types.d.ts +0 -32
- package/dist/wallet/plugins/ceramic/ceramic.d.ts +0 -215
- package/dist/wallet/plugins/ceramic/helpers.d.ts +0 -3
- package/dist/wallet/plugins/ceramic/index.d.ts +0 -4
- package/dist/wallet/plugins/ceramic/types.d.ts +0 -43
- package/dist/wallet/plugins/chapi/chapi.d.ts +0 -5
- package/dist/wallet/plugins/chapi/index.d.ts +0 -2
- package/dist/wallet/plugins/chapi/types.d.ts +0 -88
- package/dist/wallet/plugins/didkey/helpers.d.ts +0 -4
- package/dist/wallet/plugins/didkey/index.d.ts +0 -217
- package/dist/wallet/plugins/didkey/types.d.ts +0 -18
- package/dist/wallet/plugins/didkit/index.d.ts +0 -8
- package/dist/wallet/plugins/didkit/types.d.ts +0 -40
- package/dist/wallet/plugins/expiration/index.d.ts +0 -7
- package/dist/wallet/plugins/expiration/types.d.ts +0 -3
- package/dist/wallet/plugins/idx/idx.d.ts +0 -6
- package/dist/wallet/plugins/idx/index.d.ts +0 -4
- package/dist/wallet/plugins/idx/types.d.ts +0 -54
- package/dist/wallet/plugins/learn-card/index.d.ts +0 -7
- package/dist/wallet/plugins/learn-card/types.d.ts +0 -17
- package/dist/wallet/plugins/learn-card/verify.d.ts +0 -215
- package/dist/wallet/plugins/vc/index.d.ts +0 -2
- package/dist/wallet/plugins/vc/issueCredential.d.ts +0 -98
- package/dist/wallet/plugins/vc/issuePresentation.d.ts +0 -220
- package/dist/wallet/plugins/vc/types.d.ts +0 -35
- package/dist/wallet/plugins/vc/vc.d.ts +0 -5
- package/dist/wallet/plugins/vc/verifyCredential.d.ts +0 -8
- package/dist/wallet/plugins/vc/verifyPresentation.d.ts +0 -8
- package/dist/wallet/plugins/vc-api/helpers.d.ts +0 -8
- package/dist/wallet/plugins/vc-api/index.d.ts +0 -8
- package/dist/wallet/plugins/vc-api/types.d.ts +0 -20
- package/dist/wallet/plugins/vc-resolution/index.d.ts +0 -6
- package/dist/wallet/plugins/vc-resolution/types.d.ts +0 -13
- package/dist/wallet/plugins/vc-templates/index.d.ts +0 -2
- package/dist/wallet/plugins/vc-templates/templates.d.ts +0 -6
- package/dist/wallet/plugins/vc-templates/types.d.ts +0 -68
- package/dist/wallet/plugins/vc-templates/vc-templates.d.ts +0 -5
- package/dist/wallet/plugins/vpqr/index.d.ts +0 -7
- package/dist/wallet/plugins/vpqr/types.d.ts +0 -12
@@ -1,949 +1,2 @@
|
|
1
|
-
"use strict";var ZK=Object.create;var ql=Object.defineProperty;var QK=Object.getOwnPropertyDescriptor;var eG=Object.getOwnPropertyNames;var tG=Object.getPrototypeOf,rG=Object.prototype.hasOwnProperty;var o=(t,e)=>ql(t,"name",{value:e,configurable:!0});var Xt=(t,e)=>()=>(t&&(e=t(t=0)),e);var Q=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),tr=(t,e)=>{for(var r in e)ql(t,r,{get:e[r],enumerable:!0})},B7=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of eG(e))!rG.call(t,i)&&i!==r&&ql(t,i,{get:()=>e[i],enumerable:!(n=QK(e,i))||n.enumerable});return t};var Mt=(t,e,r)=>(r=t!=null?ZK(tG(t)):{},B7(e||!t||!t.__esModule?ql(r,"default",{value:t,enumerable:!0}):r,t)),Zp=t=>B7(ql({},"__esModule",{value:!0}),t);var rn=Q((Wme,F7)=>{var Qp=o(function(t){return t&&t.Math==Math&&t},"check");F7.exports=Qp(typeof globalThis=="object"&&globalThis)||Qp(typeof window=="object"&&window)||Qp(typeof self=="object"&&self)||Qp(typeof global=="object"&&global)||function(){return this}()||Function("return this")()});var Bn=Q((Yme,P7)=>{P7.exports=function(t){try{return!!t()}catch{return!0}}});var go=Q((Jme,O7)=>{var nG=Bn();O7.exports=!nG(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var $l=Q((Xme,N7)=>{var iG=Bn();N7.exports=!iG(function(){var t=function(){}.bind();return typeof t!="function"||t.hasOwnProperty("prototype")})});var zn=Q((Zme,L7)=>{var oG=$l(),e1=Function.prototype.call;L7.exports=oG?e1.bind(e1):function(){return e1.apply(e1,arguments)}});var j7=Q($7=>{"use strict";var U7={}.propertyIsEnumerable,q7=Object.getOwnPropertyDescriptor,sG=q7&&!U7.call({1:2},1);$7.f=sG?o(function(e){var r=q7(this,e);return!!r&&r.enumerable},"propertyIsEnumerable"):U7});var $u=Q((ege,H7)=>{H7.exports=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}}});var vn=Q((tge,K7)=>{var V7=$l(),z7=Function.prototype,b3=z7.call,aG=V7&&z7.bind.bind(b3,b3);K7.exports=V7?aG:function(t){return function(){return b3.apply(t,arguments)}}});var jl=Q((rge,W7)=>{var G7=vn(),cG=G7({}.toString),fG=G7("".slice);W7.exports=function(t){return fG(cG(t),8,-1)}});var J7=Q((nge,Y7)=>{var uG=vn(),dG=Bn(),lG=jl(),v3=Object,hG=uG("".split);Y7.exports=dG(function(){return!v3("z").propertyIsEnumerable(0)})?function(t){return lG(t)=="String"?hG(t,""):v3(t)}:v3});var Hl=Q((ige,X7)=>{X7.exports=function(t){return t==null}});var t1=Q((oge,Z7)=>{var pG=Hl(),mG=TypeError;Z7.exports=function(t){if(pG(t))throw mG("Can't call method on "+t);return t}});var ju=Q((sge,Q7)=>{var gG=J7(),bG=t1();Q7.exports=function(t){return gG(bG(t))}});var x3=Q((age,e9)=>{var y3=typeof document=="object"&&document.all,vG=typeof y3>"u"&&y3!==void 0;e9.exports={all:y3,IS_HTMLDDA:vG}});var yr=Q((cge,r9)=>{var t9=x3(),yG=t9.all;r9.exports=t9.IS_HTMLDDA?function(t){return typeof t=="function"||t===yG}:function(t){return typeof t=="function"}});var Jo=Q((fge,o9)=>{var n9=yr(),i9=x3(),xG=i9.all;o9.exports=i9.IS_HTMLDDA?function(t){return typeof t=="object"?t!==null:n9(t)||t===xG}:function(t){return typeof t=="object"?t!==null:n9(t)}});var Xo=Q((uge,s9)=>{var w3=rn(),wG=yr(),_G=o(function(t){return wG(t)?t:void 0},"aFunction");s9.exports=function(t,e){return arguments.length<2?_G(w3[t]):w3[t]&&w3[t][e]}});var Vl=Q((dge,a9)=>{var EG=vn();a9.exports=EG({}.isPrototypeOf)});var zl=Q((lge,c9)=>{c9.exports=typeof navigator<"u"&&String(navigator.userAgent)||""});var E3=Q((hge,p9)=>{var h9=rn(),_3=zl(),f9=h9.process,u9=h9.Deno,d9=f9&&f9.versions||u9&&u9.version,l9=d9&&d9.v8,bo,r1;l9&&(bo=l9.split("."),r1=bo[0]>0&&bo[0]<4?1:+(bo[0]+bo[1]));!r1&&_3&&(bo=_3.match(/Edge\/(\d+)/),(!bo||bo[1]>=74)&&(bo=_3.match(/Chrome\/(\d+)/),bo&&(r1=+bo[1])));p9.exports=r1});var A3=Q((pge,g9)=>{var m9=E3(),AG=Bn();g9.exports=!!Object.getOwnPropertySymbols&&!AG(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&m9&&m9<41})});var C3=Q((mge,b9)=>{var CG=A3();b9.exports=CG&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var I3=Q((gge,v9)=>{var IG=Xo(),DG=yr(),SG=Vl(),TG=C3(),kG=Object;v9.exports=TG?function(t){return typeof t=="symbol"}:function(t){var e=IG("Symbol");return DG(e)&&SG(e.prototype,kG(t))}});var Kl=Q((bge,y9)=>{var MG=String;y9.exports=function(t){try{return MG(t)}catch{return"Object"}}});var vo=Q((vge,x9)=>{var RG=yr(),BG=Kl(),FG=TypeError;x9.exports=function(t){if(RG(t))return t;throw FG(BG(t)+" is not a function")}});var n1=Q((yge,w9)=>{var PG=vo(),OG=Hl();w9.exports=function(t,e){var r=t[e];return OG(r)?void 0:PG(r)}});var E9=Q((xge,_9)=>{var D3=zn(),S3=yr(),T3=Jo(),NG=TypeError;_9.exports=function(t,e){var r,n;if(e==="string"&&S3(r=t.toString)&&!T3(n=D3(r,t))||S3(r=t.valueOf)&&!T3(n=D3(r,t))||e!=="string"&&S3(r=t.toString)&&!T3(n=D3(r,t)))return n;throw NG("Can't convert object to primitive value")}});var Zo=Q((wge,A9)=>{A9.exports=!1});var i1=Q((_ge,I9)=>{var C9=rn(),LG=Object.defineProperty;I9.exports=function(t,e){try{LG(C9,t,{value:e,configurable:!0,writable:!0})}catch{C9[t]=e}return e}});var o1=Q((Ege,S9)=>{var UG=rn(),qG=i1(),D9="__core-js_shared__",$G=UG[D9]||qG(D9,{});S9.exports=$G});var k3=Q((Age,k9)=>{var jG=Zo(),T9=o1();(k9.exports=function(t,e){return T9[t]||(T9[t]=e!==void 0?e:{})})("versions",[]).push({version:"3.28.0",mode:jG?"pure":"global",copyright:"\xA9 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.28.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var M3=Q((Cge,M9)=>{var HG=t1(),VG=Object;M9.exports=function(t){return VG(HG(t))}});var yo=Q((Ige,R9)=>{var zG=vn(),KG=M3(),GG=zG({}.hasOwnProperty);R9.exports=Object.hasOwn||o(function(e,r){return GG(KG(e),r)},"hasOwn")});var R3=Q((Dge,B9)=>{var WG=vn(),YG=0,JG=Math.random(),XG=WG(1 .toString);B9.exports=function(t){return"Symbol("+(t===void 0?"":t)+")_"+XG(++YG+JG,36)}});var yn=Q((Sge,P9)=>{var ZG=rn(),QG=k3(),F9=yo(),eW=R3(),tW=A3(),rW=C3(),Hu=ZG.Symbol,B3=QG("wks"),nW=rW?Hu.for||Hu:Hu&&Hu.withoutSetter||eW;P9.exports=function(t){return F9(B3,t)||(B3[t]=tW&&F9(Hu,t)?Hu[t]:nW("Symbol."+t)),B3[t]}});var U9=Q((Tge,L9)=>{var iW=zn(),O9=Jo(),N9=I3(),oW=n1(),sW=E9(),aW=yn(),cW=TypeError,fW=aW("toPrimitive");L9.exports=function(t,e){if(!O9(t)||N9(t))return t;var r=oW(t,fW),n;if(r){if(e===void 0&&(e="default"),n=iW(r,t,e),!O9(n)||N9(n))return n;throw cW("Can't convert object to primitive value")}return e===void 0&&(e="number"),sW(t,e)}});var F3=Q((kge,q9)=>{var uW=U9(),dW=I3();q9.exports=function(t){var e=uW(t,"string");return dW(e)?e:e+""}});var Gl=Q((Mge,j9)=>{var lW=rn(),$9=Jo(),P3=lW.document,hW=$9(P3)&&$9(P3.createElement);j9.exports=function(t){return hW?P3.createElement(t):{}}});var O3=Q((Rge,H9)=>{var pW=go(),mW=Bn(),gW=Gl();H9.exports=!pW&&!mW(function(){return Object.defineProperty(gW("div"),"a",{get:function(){return 7}}).a!=7})});var s1=Q(z9=>{var bW=go(),vW=zn(),yW=j7(),xW=$u(),wW=ju(),_W=F3(),EW=yo(),AW=O3(),V9=Object.getOwnPropertyDescriptor;z9.f=bW?V9:o(function(e,r){if(e=wW(e),r=_W(r),AW)try{return V9(e,r)}catch{}if(EW(e,r))return xW(!vW(yW.f,e,r),e[r])},"getOwnPropertyDescriptor")});var N3=Q((Fge,K9)=>{var CW=go(),IW=Bn();K9.exports=CW&&IW(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})});var xo=Q((Pge,G9)=>{var DW=Jo(),SW=String,TW=TypeError;G9.exports=function(t){if(DW(t))return t;throw TW(SW(t)+" is not an object")}});var Hs=Q(Y9=>{var kW=go(),MW=O3(),RW=N3(),a1=xo(),W9=F3(),BW=TypeError,L3=Object.defineProperty,FW=Object.getOwnPropertyDescriptor,U3="enumerable",q3="configurable",$3="writable";Y9.f=kW?RW?o(function(e,r,n){if(a1(e),r=W9(r),a1(n),typeof e=="function"&&r==="prototype"&&"value"in n&&$3 in n&&!n[$3]){var i=FW(e,r);i&&i[$3]&&(e[r]=n.value,n={configurable:q3 in n?n[q3]:i[q3],enumerable:U3 in n?n[U3]:i[U3],writable:!1})}return L3(e,r,n)},"defineProperty"):L3:o(function(e,r,n){if(a1(e),r=W9(r),a1(n),MW)try{return L3(e,r,n)}catch{}if("get"in n||"set"in n)throw BW("Accessors not supported");return"value"in n&&(e[r]=n.value),e},"defineProperty")});var Ba=Q((Nge,J9)=>{var PW=go(),OW=Hs(),NW=$u();J9.exports=PW?function(t,e,r){return OW.f(t,e,NW(1,r))}:function(t,e,r){return t[e]=r,t}});var V3=Q((Lge,Z9)=>{var j3=go(),LW=yo(),X9=Function.prototype,UW=j3&&Object.getOwnPropertyDescriptor,H3=LW(X9,"name"),qW=H3&&o(function(){},"something").name==="something",$W=H3&&(!j3||j3&&UW(X9,"name").configurable);Z9.exports={EXISTS:H3,PROPER:qW,CONFIGURABLE:$W}});var c1=Q((Uge,Q9)=>{var jW=vn(),HW=yr(),z3=o1(),VW=jW(Function.toString);HW(z3.inspectSource)||(z3.inspectSource=function(t){return VW(t)});Q9.exports=z3.inspectSource});var r_=Q((qge,t_)=>{var zW=rn(),KW=yr(),e_=zW.WeakMap;t_.exports=KW(e_)&&/native code/.test(String(e_))});var f1=Q(($ge,i_)=>{var GW=k3(),WW=R3(),n_=GW("keys");i_.exports=function(t){return n_[t]||(n_[t]=WW(t))}});var u1=Q((jge,o_)=>{o_.exports={}});var Yl=Q((Hge,c_)=>{var YW=r_(),a_=rn(),JW=Jo(),XW=Ba(),K3=yo(),G3=o1(),ZW=f1(),QW=u1(),s_="Object already initialized",W3=a_.TypeError,eY=a_.WeakMap,d1,Wl,l1,tY=o(function(t){return l1(t)?Wl(t):d1(t,{})},"enforce"),rY=o(function(t){return function(e){var r;if(!JW(e)||(r=Wl(e)).type!==t)throw W3("Incompatible receiver, "+t+" required");return r}},"getterFor");YW||G3.state?(wo=G3.state||(G3.state=new eY),wo.get=wo.get,wo.has=wo.has,wo.set=wo.set,d1=o(function(t,e){if(wo.has(t))throw W3(s_);return e.facade=t,wo.set(t,e),e},"set"),Wl=o(function(t){return wo.get(t)||{}},"get"),l1=o(function(t){return wo.has(t)},"has")):(ef=ZW("state"),QW[ef]=!0,d1=o(function(t,e){if(K3(t,ef))throw W3(s_);return e.facade=t,XW(t,ef,e),e},"set"),Wl=o(function(t){return K3(t,ef)?t[ef]:{}},"get"),l1=o(function(t){return K3(t,ef)},"has"));var wo,ef;c_.exports={set:d1,get:Wl,has:l1,enforce:tY,getterFor:rY}});var X3=Q((Vge,d_)=>{var J3=vn(),nY=Bn(),iY=yr(),h1=yo(),Y3=go(),oY=V3().CONFIGURABLE,sY=c1(),u_=Yl(),aY=u_.enforce,cY=u_.get,f_=String,p1=Object.defineProperty,fY=J3("".slice),uY=J3("".replace),dY=J3([].join),lY=Y3&&!nY(function(){return p1(function(){},"length",{value:8}).length!==8}),hY=String(String).split("String"),pY=d_.exports=function(t,e,r){fY(f_(e),0,7)==="Symbol("&&(e="["+uY(f_(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!h1(t,"name")||oY&&t.name!==e)&&(Y3?p1(t,"name",{value:e,configurable:!0}):t.name=e),lY&&r&&h1(r,"arity")&&t.length!==r.arity&&p1(t,"length",{value:r.arity});try{r&&h1(r,"constructor")&&r.constructor?Y3&&p1(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch{}var n=aY(t);return h1(n,"source")||(n.source=dY(hY,typeof e=="string"?e:"")),t};Function.prototype.toString=pY(o(function(){return iY(this)&&cY(this).source||sY(this)},"toString"),"toString")});var Fa=Q((zge,l_)=>{var mY=yr(),gY=Hs(),bY=X3(),vY=i1();l_.exports=function(t,e,r,n){n||(n={});var i=n.enumerable,s=n.name!==void 0?n.name:e;if(mY(r)&&bY(r,s,n),n.global)i?t[e]=r:vY(e,r);else{try{n.unsafe?t[e]&&(i=!0):delete t[e]}catch{}i?t[e]=r:gY.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t}});var p_=Q((Kge,h_)=>{var yY=Math.ceil,xY=Math.floor;h_.exports=Math.trunc||o(function(e){var r=+e;return(r>0?xY:yY)(r)},"trunc")});var m1=Q((Gge,m_)=>{var wY=p_();m_.exports=function(t){var e=+t;return e!==e||e===0?0:wY(e)}});var b_=Q((Wge,g_)=>{var _Y=m1(),EY=Math.max,AY=Math.min;g_.exports=function(t,e){var r=_Y(t);return r<0?EY(r+e,0):AY(r,e)}});var y_=Q((Yge,v_)=>{var CY=m1(),IY=Math.min;v_.exports=function(t){return t>0?IY(CY(t),9007199254740991):0}});var Z3=Q((Jge,x_)=>{var DY=y_();x_.exports=function(t){return DY(t.length)}});var E_=Q((Xge,__)=>{var SY=ju(),TY=b_(),kY=Z3(),w_=o(function(t){return function(e,r,n){var i=SY(e),s=kY(i),a=TY(n,s),f;if(t&&r!=r){for(;s>a;)if(f=i[a++],f!=f)return!0}else for(;s>a;a++)if((t||a in i)&&i[a]===r)return t||a||0;return!t&&-1}},"createMethod");__.exports={includes:w_(!0),indexOf:w_(!1)}});var e6=Q((Zge,C_)=>{var MY=vn(),Q3=yo(),RY=ju(),BY=E_().indexOf,FY=u1(),A_=MY([].push);C_.exports=function(t,e){var r=RY(t),n=0,i=[],s;for(s in r)!Q3(FY,s)&&Q3(r,s)&&A_(i,s);for(;e.length>n;)Q3(r,s=e[n++])&&(~BY(i,s)||A_(i,s));return i}});var g1=Q((Qge,I_)=>{I_.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var S_=Q(D_=>{var PY=e6(),OY=g1(),NY=OY.concat("length","prototype");D_.f=Object.getOwnPropertyNames||o(function(e){return PY(e,NY)},"getOwnPropertyNames")});var k_=Q(T_=>{T_.f=Object.getOwnPropertySymbols});var R_=Q((rbe,M_)=>{var LY=Xo(),UY=vn(),qY=S_(),$Y=k_(),jY=xo(),HY=UY([].concat);M_.exports=LY("Reflect","ownKeys")||o(function(e){var r=qY.f(jY(e)),n=$Y.f;return n?HY(r,n(e)):r},"ownKeys")});var t6=Q((nbe,F_)=>{var B_=yo(),VY=R_(),zY=s1(),KY=Hs();F_.exports=function(t,e,r){for(var n=VY(e),i=KY.f,s=zY.f,a=0;a<n.length;a++){var f=n[a];!B_(t,f)&&!(r&&B_(r,f))&&i(t,f,s(e,f))}}});var r6=Q((ibe,P_)=>{var GY=Bn(),WY=yr(),YY=/#|\.prototype\./,Jl=o(function(t,e){var r=XY[JY(t)];return r==QY?!0:r==ZY?!1:WY(e)?GY(e):!!e},"isForced"),JY=Jl.normalize=function(t){return String(t).replace(YY,".").toLowerCase()},XY=Jl.data={},ZY=Jl.NATIVE="N",QY=Jl.POLYFILL="P";P_.exports=Jl});var Hi=Q((obe,O_)=>{var n6=rn(),eJ=s1().f,tJ=Ba(),rJ=Fa(),nJ=i1(),iJ=t6(),oJ=r6();O_.exports=function(t,e){var r=t.target,n=t.global,i=t.stat,s,a,f,d,h,p;if(n?a=n6:i?a=n6[r]||nJ(r,{}):a=(n6[r]||{}).prototype,a)for(f in e){if(h=e[f],t.dontCallGetSet?(p=eJ(a,f),d=p&&p.value):d=a[f],s=oJ(n?f:r+(i?".":"#")+f,t.forced),!s&&d!==void 0){if(typeof h==typeof d)continue;iJ(h,d)}(t.sham||d&&d.sham)&&tJ(h,"sham",!0),rJ(a,f,h,t)}}});var L_=Q((sbe,N_)=>{var sJ=Bn();N_.exports=!sJ(function(){function t(){}return o(t,"F"),t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})});var b1=Q((abe,q_)=>{var aJ=yo(),cJ=yr(),fJ=M3(),uJ=f1(),dJ=L_(),U_=uJ("IE_PROTO"),i6=Object,lJ=i6.prototype;q_.exports=dJ?i6.getPrototypeOf:function(t){var e=fJ(t);if(aJ(e,U_))return e[U_];var r=e.constructor;return cJ(r)&&e instanceof r?r.prototype:e instanceof i6?lJ:null}});var j_=Q((cbe,$_)=>{var hJ=vn(),pJ=vo();$_.exports=function(t,e,r){try{return hJ(pJ(Object.getOwnPropertyDescriptor(t,e)[r]))}catch{}}});var V_=Q((fbe,H_)=>{var mJ=yr(),gJ=String,bJ=TypeError;H_.exports=function(t){if(typeof t=="object"||mJ(t))return t;throw bJ("Can't set "+gJ(t)+" as a prototype")}});var v1=Q((ube,z_)=>{var vJ=j_(),yJ=xo(),xJ=V_();z_.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,e={},r;try{r=vJ(Object.prototype,"__proto__","set"),r(e,[]),t=e instanceof Array}catch{}return o(function(i,s){return yJ(i),xJ(s),t?r(i,s):i.__proto__=s,i},"setPrototypeOf")}():void 0)});var G_=Q((dbe,K_)=>{var wJ=e6(),_J=g1();K_.exports=Object.keys||o(function(e){return wJ(e,_J)},"keys")});var Y_=Q(W_=>{var EJ=go(),AJ=N3(),CJ=Hs(),IJ=xo(),DJ=ju(),SJ=G_();W_.f=EJ&&!AJ?Object.defineProperties:o(function(e,r){IJ(e);for(var n=DJ(r),i=SJ(r),s=i.length,a=0,f;s>a;)CJ.f(e,f=i[a++],n[f]);return e},"defineProperties")});var o6=Q((hbe,J_)=>{var TJ=Xo();J_.exports=TJ("document","documentElement")});var Xl=Q((pbe,nE)=>{var kJ=xo(),MJ=Y_(),X_=g1(),RJ=u1(),BJ=o6(),FJ=Gl(),PJ=f1(),Z_=">",Q_="<",a6="prototype",c6="script",tE=PJ("IE_PROTO"),s6=o(function(){},"EmptyConstructor"),rE=o(function(t){return Q_+c6+Z_+t+Q_+"/"+c6+Z_},"scriptTag"),eE=o(function(t){t.write(rE("")),t.close();var e=t.parentWindow.Object;return t=null,e},"NullProtoObjectViaActiveX"),OJ=o(function(){var t=FJ("iframe"),e="java"+c6+":",r;return t.style.display="none",BJ.appendChild(t),t.src=String(e),r=t.contentWindow.document,r.open(),r.write(rE("document.F=Object")),r.close(),r.F},"NullProtoObjectViaIFrame"),y1,x1=o(function(){try{y1=new ActiveXObject("htmlfile")}catch{}x1=typeof document<"u"?document.domain&&y1?eE(y1):OJ():eE(y1);for(var t=X_.length;t--;)delete x1[a6][X_[t]];return x1()},"NullProtoObject");RJ[tE]=!0;nE.exports=Object.create||o(function(e,r){var n;return e!==null?(s6[a6]=kJ(e),n=new s6,s6[a6]=null,n[tE]=e):n=x1(),r===void 0?n:MJ.f(n,r)},"create")});var oE=Q((mbe,iE)=>{var NJ=Jo(),LJ=Ba();iE.exports=function(t,e){NJ(e)&&"cause"in e&&LJ(t,"cause",e.cause)}});var fE=Q((gbe,cE)=>{var UJ=vn(),sE=Error,qJ=UJ("".replace),$J=function(t){return String(sE(t).stack)}("zxcasd"),aE=/\n\s*at [^:]*:[^\n]*/,jJ=aE.test($J);cE.exports=function(t,e){if(jJ&&typeof t=="string"&&!sE.prepareStackTrace)for(;e--;)t=qJ(t,aE,"");return t}});var dE=Q((bbe,uE)=>{var HJ=Bn(),VJ=$u();uE.exports=!HJ(function(){var t=Error("a");return"stack"in t?(Object.defineProperty(t,"stack",VJ(1,7)),t.stack!==7):!0})});var pE=Q((vbe,hE)=>{var zJ=Ba(),KJ=fE(),GJ=dE(),lE=Error.captureStackTrace;hE.exports=function(t,e,r,n){GJ&&(lE?lE(t,e):zJ(t,"stack",KJ(r,n)))}});var gE=Q((ybe,mE)=>{var WJ=jl(),YJ=vn();mE.exports=function(t){if(WJ(t)==="Function")return YJ(t)}});var w1=Q((xbe,vE)=>{var bE=gE(),JJ=vo(),XJ=$l(),ZJ=bE(bE.bind);vE.exports=function(t,e){return JJ(t),e===void 0?t:XJ?ZJ(t,e):function(){return t.apply(e,arguments)}}});var Vu=Q((wbe,yE)=>{yE.exports={}});var wE=Q((_be,xE)=>{var QJ=yn(),eX=Vu(),tX=QJ("iterator"),rX=Array.prototype;xE.exports=function(t){return t!==void 0&&(eX.Array===t||rX[tX]===t)}});var _1=Q((Ebe,EE)=>{var nX=yn(),iX=nX("toStringTag"),_E={};_E[iX]="z";EE.exports=String(_E)==="[object z]"});var Zl=Q((Abe,AE)=>{var oX=_1(),sX=yr(),E1=jl(),aX=yn(),cX=aX("toStringTag"),fX=Object,uX=E1(function(){return arguments}())=="Arguments",dX=o(function(t,e){try{return t[e]}catch{}},"tryGet");AE.exports=oX?E1:function(t){var e,r,n;return t===void 0?"Undefined":t===null?"Null":typeof(r=dX(e=fX(t),cX))=="string"?r:uX?E1(e):(n=E1(e))=="Object"&&sX(e.callee)?"Arguments":n}});var f6=Q((Cbe,IE)=>{var lX=Zl(),CE=n1(),hX=Hl(),pX=Vu(),mX=yn(),gX=mX("iterator");IE.exports=function(t){if(!hX(t))return CE(t,gX)||CE(t,"@@iterator")||pX[lX(t)]}});var SE=Q((Ibe,DE)=>{var bX=zn(),vX=vo(),yX=xo(),xX=Kl(),wX=f6(),_X=TypeError;DE.exports=function(t,e){var r=arguments.length<2?wX(t):e;if(vX(r))return yX(bX(r,t));throw _X(xX(t)+" is not iterable")}});var ME=Q((Dbe,kE)=>{var EX=zn(),TE=xo(),AX=n1();kE.exports=function(t,e,r){var n,i;TE(t);try{if(n=AX(t,"return"),!n){if(e==="throw")throw r;return r}n=EX(n,t)}catch(s){i=!0,n=s}if(e==="throw")throw r;if(i)throw n;return TE(n),r}});var zu=Q((Sbe,PE)=>{var CX=w1(),IX=zn(),DX=xo(),SX=Kl(),TX=wE(),kX=Z3(),RE=Vl(),MX=SE(),RX=f6(),BE=ME(),BX=TypeError,A1=o(function(t,e){this.stopped=t,this.result=e},"Result"),FE=A1.prototype;PE.exports=function(t,e,r){var n=r&&r.that,i=!!(r&&r.AS_ENTRIES),s=!!(r&&r.IS_RECORD),a=!!(r&&r.IS_ITERATOR),f=!!(r&&r.INTERRUPTED),d=CX(e,n),h,p,y,I,T,D,R,H=o(function(V){return h&&BE(h,"normal",V),new A1(!0,V)},"stop"),F=o(function(V){return i?(DX(V),f?d(V[0],V[1],H):d(V[0],V[1])):f?d(V,H):d(V)},"callFn");if(s)h=t.iterator;else if(a)h=t;else{if(p=RX(t),!p)throw BX(SX(t)+" is not iterable");if(TX(p)){for(y=0,I=kX(t);I>y;y++)if(T=F(t[y]),T&&RE(FE,T))return T;return new A1(!1)}h=MX(t,p)}for(D=s?t.next:h.next;!(R=IX(D,h)).done;){try{T=F(R.value)}catch(V){BE(h,"throw",V)}if(typeof T=="object"&&T&&RE(FE,T))return T}return new A1(!1)}});var C1=Q((Tbe,OE)=>{var FX=Zl(),PX=String;OE.exports=function(t){if(FX(t)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return PX(t)}});var LE=Q((kbe,NE)=>{var OX=C1();NE.exports=function(t,e){return t===void 0?arguments.length<2?"":e:OX(t)}});var qE=Q(()=>{"use strict";var NX=Hi(),LX=Vl(),UX=b1(),I1=v1(),qX=t6(),UE=Xl(),u6=Ba(),d6=$u(),$X=oE(),jX=pE(),HX=zu(),VX=LE(),zX=yn(),KX=zX("toStringTag"),D1=Error,GX=[].push,Ku=o(function(e,r){var n=LX(l6,this),i;I1?i=I1(D1(),n?UX(this):l6):(i=n?this:UE(l6),u6(i,KX,"Error")),r!==void 0&&u6(i,"message",VX(r)),jX(i,Ku,i.stack,1),arguments.length>2&&$X(i,arguments[2]);var s=[];return HX(e,GX,{that:s}),u6(i,"errors",s),i},"AggregateError");I1?I1(Ku,D1):qX(Ku,D1,{name:!0});var l6=Ku.prototype=UE(D1.prototype,{constructor:d6(1,Ku),message:d6(1,""),name:d6(1,"AggregateError")});NX({global:!0,constructor:!0,arity:2},{AggregateError:Ku})});var $E=Q(()=>{qE()});var HE=Q((Pbe,jE)=>{var WX=yn(),YX=Xl(),JX=Hs().f,h6=WX("unscopables"),p6=Array.prototype;p6[h6]==null&&JX(p6,h6,{configurable:!0,value:YX(null)});jE.exports=function(t){p6[h6][t]=!0}});var v6=Q((Obe,KE)=>{"use strict";var XX=Bn(),ZX=yr(),QX=Jo(),eZ=Xl(),VE=b1(),tZ=Fa(),rZ=yn(),nZ=Zo(),b6=rZ("iterator"),zE=!1,Vs,m6,g6;[].keys&&(g6=[].keys(),"next"in g6?(m6=VE(VE(g6)),m6!==Object.prototype&&(Vs=m6)):zE=!0);var iZ=!QX(Vs)||XX(function(){var t={};return Vs[b6].call(t)!==t});iZ?Vs={}:nZ&&(Vs=eZ(Vs));ZX(Vs[b6])||tZ(Vs,b6,function(){return this});KE.exports={IteratorPrototype:Vs,BUGGY_SAFARI_ITERATORS:zE}});var S1=Q((Nbe,WE)=>{var oZ=Hs().f,sZ=yo(),aZ=yn(),GE=aZ("toStringTag");WE.exports=function(t,e,r){t&&!r&&(t=t.prototype),t&&!sZ(t,GE)&&oZ(t,GE,{configurable:!0,value:e})}});var JE=Q((Lbe,YE)=>{"use strict";var cZ=v6().IteratorPrototype,fZ=Xl(),uZ=$u(),dZ=S1(),lZ=Vu(),hZ=o(function(){return this},"returnThis");YE.exports=function(t,e,r,n){var i=e+" Iterator";return t.prototype=fZ(cZ,{next:uZ(+!n,r)}),dZ(t,i,!1,!0),lZ[i]=hZ,t}});var x6=Q((Ube,sA)=>{"use strict";var pZ=Hi(),mZ=zn(),T1=Zo(),iA=V3(),gZ=yr(),bZ=JE(),XE=b1(),ZE=v1(),vZ=S1(),yZ=Ba(),y6=Fa(),xZ=yn(),QE=Vu(),oA=v6(),wZ=iA.PROPER,_Z=iA.CONFIGURABLE,eA=oA.IteratorPrototype,k1=oA.BUGGY_SAFARI_ITERATORS,Ql=xZ("iterator"),tA="keys",eh="values",rA="entries",nA=o(function(){return this},"returnThis");sA.exports=function(t,e,r,n,i,s,a){bZ(r,e,n);var f=o(function(F){if(F===i&&I)return I;if(!k1&&F in p)return p[F];switch(F){case tA:return o(function(){return new r(this,F)},"keys");case eh:return o(function(){return new r(this,F)},"values");case rA:return o(function(){return new r(this,F)},"entries")}return function(){return new r(this)}},"getIterationMethod"),d=e+" Iterator",h=!1,p=t.prototype,y=p[Ql]||p["@@iterator"]||i&&p[i],I=!k1&&y||f(i),T=e=="Array"&&p.entries||y,D,R,H;if(T&&(D=XE(T.call(new t)),D!==Object.prototype&&D.next&&(!T1&&XE(D)!==eA&&(ZE?ZE(D,eA):gZ(D[Ql])||y6(D,Ql,nA)),vZ(D,d,!0,!0),T1&&(QE[d]=nA))),wZ&&i==eh&&y&&y.name!==eh&&(!T1&&_Z?yZ(p,"name",eh):(h=!0,I=o(function(){return mZ(y,this)},"values"))),i)if(R={values:f(eh),keys:s?I:f(tA),entries:f(rA)},a)for(H in R)(k1||h||!(H in p))&&y6(p,H,R[H]);else pZ({target:e,proto:!0,forced:k1||h},R);return(!T1||a)&&p[Ql]!==I&&y6(p,Ql,I,{name:i}),QE[e]=I,R}});var w6=Q((qbe,aA)=>{aA.exports=function(t,e){return{value:t,done:e}}});var E6=Q(($be,lA)=>{"use strict";var EZ=ju(),_6=HE(),cA=Vu(),uA=Yl(),AZ=Hs().f,CZ=x6(),M1=w6(),IZ=Zo(),DZ=go(),dA="Array Iterator",SZ=uA.set,TZ=uA.getterFor(dA);lA.exports=CZ(Array,"Array",function(t,e){SZ(this,{type:dA,target:EZ(t),index:0,kind:e})},function(){var t=TZ(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,M1(void 0,!0)):r=="keys"?M1(n,!1):r=="values"?M1(e[n],!1):M1([n,e[n]],!1)},"values");var fA=cA.Arguments=cA.Array;_6("keys");_6("values");_6("entries");if(!IZ&&DZ&&fA.name!=="values")try{AZ(fA,"name",{value:"values"})}catch{}});var pA=Q((jbe,hA)=>{"use strict";var kZ=_1(),MZ=Zl();hA.exports=kZ?{}.toString:o(function(){return"[object "+MZ(this)+"]"},"toString")});var mA=Q(()=>{var RZ=_1(),BZ=Fa(),FZ=pA();RZ||BZ(Object.prototype,"toString",FZ,{unsafe:!0})});var th=Q((zbe,gA)=>{var PZ=jl();gA.exports=typeof process<"u"&&PZ(process)=="process"});var yA=Q((Kbe,vA)=>{var bA=X3(),OZ=Hs();vA.exports=function(t,e,r){return r.get&&bA(r.get,e,{getter:!0}),r.set&&bA(r.set,e,{setter:!0}),OZ.f(t,e,r)}});var _A=Q((Gbe,wA)=>{"use strict";var NZ=Xo(),LZ=yA(),UZ=yn(),qZ=go(),xA=UZ("species");wA.exports=function(t){var e=NZ(t);qZ&&e&&!e[xA]&&LZ(e,xA,{configurable:!0,get:function(){return this}})}});var AA=Q((Wbe,EA)=>{var $Z=Vl(),jZ=TypeError;EA.exports=function(t,e){if($Z(e,t))return t;throw jZ("Incorrect invocation")}});var kA=Q((Ybe,TA)=>{var HZ=vn(),VZ=Bn(),CA=yr(),zZ=Zl(),KZ=Xo(),GZ=c1(),IA=o(function(){},"noop"),WZ=[],DA=KZ("Reflect","construct"),A6=/^\s*(?:class|function)\b/,YZ=HZ(A6.exec),JZ=!A6.exec(IA),rh=o(function(e){if(!CA(e))return!1;try{return DA(IA,WZ,e),!0}catch{return!1}},"isConstructor"),SA=o(function(e){if(!CA(e))return!1;switch(zZ(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return JZ||!!YZ(A6,GZ(e))}catch{return!0}},"isConstructor");SA.sham=!0;TA.exports=!DA||VZ(function(){var t;return rh(rh.call)||!rh(Object)||!rh(function(){t=!0})||t})?SA:rh});var RA=Q((Jbe,MA)=>{var XZ=kA(),ZZ=Kl(),QZ=TypeError;MA.exports=function(t){if(XZ(t))return t;throw QZ(ZZ(t)+" is not a constructor")}});var C6=Q((Xbe,FA)=>{var BA=xo(),eQ=RA(),tQ=Hl(),rQ=yn(),nQ=rQ("species");FA.exports=function(t,e){var r=BA(t).constructor,n;return r===void 0||tQ(n=BA(r)[nQ])?e:eQ(n)}});var UA=Q((Zbe,LA)=>{var iQ=$l(),NA=Function.prototype,PA=NA.apply,OA=NA.call;LA.exports=typeof Reflect=="object"&&Reflect.apply||(iQ?OA.bind(PA):function(){return OA.apply(PA,arguments)})});var $A=Q((Qbe,qA)=>{var oQ=vn();qA.exports=oQ([].slice)});var HA=Q((e2e,jA)=>{var sQ=TypeError;jA.exports=function(t,e){if(t<e)throw sQ("Not enough arguments");return t}});var I6=Q((t2e,VA)=>{var aQ=zl();VA.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(aQ)});var P6=Q((r2e,QA)=>{var li=rn(),cQ=UA(),fQ=w1(),zA=yr(),uQ=yo(),ZA=Bn(),KA=o6(),dQ=$A(),GA=Gl(),lQ=HA(),hQ=I6(),pQ=th(),R6=li.setImmediate,B6=li.clearImmediate,mQ=li.process,D6=li.Dispatch,gQ=li.Function,WA=li.MessageChannel,bQ=li.String,S6=0,nh={},YA="onreadystatechange",ih,tf,T6,k6;ZA(function(){ih=li.location});var F6=o(function(t){if(uQ(nh,t)){var e=nh[t];delete nh[t],e()}},"run"),M6=o(function(t){return function(){F6(t)}},"runner"),JA=o(function(t){F6(t.data)},"eventListener"),XA=o(function(t){li.postMessage(bQ(t),ih.protocol+"//"+ih.host)},"globalPostMessageDefer");(!R6||!B6)&&(R6=o(function(e){lQ(arguments.length,1);var r=zA(e)?e:gQ(e),n=dQ(arguments,1);return nh[++S6]=function(){cQ(r,void 0,n)},tf(S6),S6},"setImmediate"),B6=o(function(e){delete nh[e]},"clearImmediate"),pQ?tf=o(function(t){mQ.nextTick(M6(t))},"defer"):D6&&D6.now?tf=o(function(t){D6.now(M6(t))},"defer"):WA&&!hQ?(T6=new WA,k6=T6.port2,T6.port1.onmessage=JA,tf=fQ(k6.postMessage,k6)):li.addEventListener&&zA(li.postMessage)&&!li.importScripts&&ih&&ih.protocol!=="file:"&&!ZA(XA)?(tf=XA,li.addEventListener("message",JA,!1)):YA in GA("script")?tf=o(function(t){KA.appendChild(GA("script"))[YA]=function(){KA.removeChild(this),F6(t)}},"defer"):tf=o(function(t){setTimeout(M6(t),0)},"defer"));QA.exports={set:R6,clear:B6}});var O6=Q((n2e,tC)=>{var eC=o(function(){this.head=null,this.tail=null},"Queue");eC.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t){var e=this.head=t.next;return e===null&&(this.tail=null),t.item}}};tC.exports=eC});var nC=Q((i2e,rC)=>{var vQ=zl();rC.exports=/ipad|iphone|ipod/i.test(vQ)&&typeof Pebble<"u"});var oC=Q((o2e,iC)=>{var yQ=zl();iC.exports=/web0s(?!.*chrome)/i.test(yQ)});var hC=Q((s2e,lC)=>{var rf=rn(),sC=w1(),xQ=s1().f,N6=P6().set,wQ=O6(),_Q=I6(),EQ=nC(),AQ=oC(),L6=th(),aC=rf.MutationObserver||rf.WebKitMutationObserver,cC=rf.document,fC=rf.process,R1=rf.Promise,uC=xQ(rf,"queueMicrotask"),$6=uC&&uC.value,Gu,U6,q6,B1,dC;$6||(oh=new wQ,sh=o(function(){var t,e;for(L6&&(t=fC.domain)&&t.exit();e=oh.get();)try{e()}catch(r){throw oh.head&&Gu(),r}t&&t.enter()},"flush"),!_Q&&!L6&&!AQ&&aC&&cC?(U6=!0,q6=cC.createTextNode(""),new aC(sh).observe(q6,{characterData:!0}),Gu=o(function(){q6.data=U6=!U6},"notify")):!EQ&&R1&&R1.resolve?(B1=R1.resolve(void 0),B1.constructor=R1,dC=sC(B1.then,B1),Gu=o(function(){dC(sh)},"notify")):L6?Gu=o(function(){fC.nextTick(sh)},"notify"):(N6=sC(N6,rf),Gu=o(function(){N6(sh)},"notify")),$6=o(function(t){oh.head||Gu(),oh.add(t)},"microtask"));var oh,sh;lC.exports=$6});var mC=Q((a2e,pC)=>{pC.exports=function(t,e){try{arguments.length==1?console.error(t):console.error(t,e)}catch{}}});var Wu=Q((c2e,gC)=>{gC.exports=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}}});var nf=Q((f2e,bC)=>{var CQ=rn();bC.exports=CQ.Promise});var j6=Q((u2e,vC)=>{vC.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"});var xC=Q((d2e,yC)=>{var IQ=j6(),DQ=th();yC.exports=!IQ&&!DQ&&typeof window=="object"&&typeof document=="object"});var Yu=Q((l2e,EC)=>{var SQ=rn(),ah=nf(),TQ=yr(),kQ=r6(),MQ=c1(),RQ=yn(),BQ=xC(),FQ=j6(),PQ=Zo(),H6=E3(),wC=ah&&ah.prototype,OQ=RQ("species"),V6=!1,_C=TQ(SQ.PromiseRejectionEvent),NQ=kQ("Promise",function(){var t=MQ(ah),e=t!==String(ah);if(!e&&H6===66||PQ&&!(wC.catch&&wC.finally))return!0;if(!H6||H6<51||!/native code/.test(t)){var r=new ah(function(s){s(1)}),n=o(function(s){s(function(){},function(){})},"FakePromise"),i=r.constructor={};if(i[OQ]=n,V6=r.then(function(){})instanceof n,!V6)return!0}return!e&&(BQ||FQ)&&!_C});EC.exports={CONSTRUCTOR:NQ,REJECTION_EVENT:_C,SUBCLASSING:V6}});var Pa=Q((h2e,CC)=>{"use strict";var AC=vo(),LQ=TypeError,UQ=o(function(t){var e,r;this.promise=new t(function(n,i){if(e!==void 0||r!==void 0)throw LQ("Bad Promise constructor");e=n,r=i}),this.resolve=AC(e),this.reject=AC(r)},"PromiseCapability");CC.exports.f=function(t){return new UQ(t)}});var VC=Q(()=>{"use strict";var qQ=Hi(),$Q=Zo(),N1=th(),Oa=rn(),Qu=zn(),IC=Fa(),DC=v1(),jQ=S1(),HQ=_A(),VQ=vo(),O1=yr(),zQ=Jo(),KQ=AA(),GQ=C6(),RC=P6().set,Y6=hC(),WQ=mC(),YQ=Wu(),JQ=O6(),BC=Yl(),L1=nf(),J6=Yu(),FC=Pa(),U1="Promise",PC=J6.CONSTRUCTOR,XQ=J6.REJECTION_EVENT,ZQ=J6.SUBCLASSING,z6=BC.getterFor(U1),QQ=BC.set,Ju=L1&&L1.prototype,of=L1,F1=Ju,OC=Oa.TypeError,K6=Oa.document,X6=Oa.process,G6=FC.f,eee=G6,tee=!!(K6&&K6.createEvent&&Oa.dispatchEvent),NC="unhandledrejection",ree="rejectionhandled",SC=0,LC=1,nee=2,Z6=1,UC=2,P1,TC,iee,kC,qC=o(function(t){var e;return zQ(t)&&O1(e=t.then)?e:!1},"isThenable"),$C=o(function(t,e){var r=e.value,n=e.state==LC,i=n?t.ok:t.fail,s=t.resolve,a=t.reject,f=t.domain,d,h,p;try{i?(n||(e.rejection===UC&&see(e),e.rejection=Z6),i===!0?d=r:(f&&f.enter(),d=i(r),f&&(f.exit(),p=!0)),d===t.promise?a(OC("Promise-chain cycle")):(h=qC(d))?Qu(h,d,s,a):s(d)):a(r)}catch(y){f&&!p&&f.exit(),a(y)}},"callReaction"),jC=o(function(t,e){t.notified||(t.notified=!0,Y6(function(){for(var r=t.reactions,n;n=r.get();)$C(n,t);t.notified=!1,e&&!t.rejection&&oee(t)}))},"notify"),HC=o(function(t,e,r){var n,i;tee?(n=K6.createEvent("Event"),n.promise=e,n.reason=r,n.initEvent(t,!1,!0),Oa.dispatchEvent(n)):n={promise:e,reason:r},!XQ&&(i=Oa["on"+t])?i(n):t===NC&&WQ("Unhandled promise rejection",r)},"dispatchEvent"),oee=o(function(t){Qu(RC,Oa,function(){var e=t.facade,r=t.value,n=MC(t),i;if(n&&(i=YQ(function(){N1?X6.emit("unhandledRejection",r,e):HC(NC,e,r)}),t.rejection=N1||MC(t)?UC:Z6,i.error))throw i.value})},"onUnhandled"),MC=o(function(t){return t.rejection!==Z6&&!t.parent},"isUnhandled"),see=o(function(t){Qu(RC,Oa,function(){var e=t.facade;N1?X6.emit("rejectionHandled",e):HC(ree,e,t.value)})},"onHandleUnhandled"),Xu=o(function(t,e,r){return function(n){t(e,n,r)}},"bind"),Zu=o(function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=nee,jC(t,!0))},"internalReject"),W6=o(function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw OC("Promise can't be resolved itself");var n=qC(e);n?Y6(function(){var i={done:!1};try{Qu(n,e,Xu(W6,i,t),Xu(Zu,i,t))}catch(s){Zu(i,s,t)}}):(t.value=e,t.state=LC,jC(t,!1))}catch(i){Zu({done:!1},i,t)}}},"internalResolve");if(PC&&(of=o(function(e){KQ(this,F1),VQ(e),Qu(P1,this);var r=z6(this);try{e(Xu(W6,r),Xu(Zu,r))}catch(n){Zu(r,n)}},"Promise"),F1=of.prototype,P1=o(function(e){QQ(this,{type:U1,done:!1,notified:!1,parent:!1,reactions:new JQ,rejection:!1,state:SC,value:void 0})},"Promise"),P1.prototype=IC(F1,"then",o(function(e,r){var n=z6(this),i=G6(GQ(this,of));return n.parent=!0,i.ok=O1(e)?e:!0,i.fail=O1(r)&&r,i.domain=N1?X6.domain:void 0,n.state==SC?n.reactions.add(i):Y6(function(){$C(i,n)}),i.promise},"then")),TC=o(function(){var t=new P1,e=z6(t);this.promise=t,this.resolve=Xu(W6,e),this.reject=Xu(Zu,e)},"OwnPromiseCapability"),FC.f=G6=o(function(t){return t===of||t===iee?new TC(t):eee(t)},"newPromiseCapability"),!$Q&&O1(L1)&&Ju!==Object.prototype)){kC=Ju.then,ZQ||IC(Ju,"then",o(function(e,r){var n=this;return new of(function(i,s){Qu(kC,n,i,s)}).then(e,r)},"then"),{unsafe:!0});try{delete Ju.constructor}catch{}DC&&DC(Ju,F1)}qQ({global:!0,constructor:!0,wrap:!0,forced:PC},{Promise:of});jQ(of,U1,!1,!0);HQ(U1)});var YC=Q((g2e,WC)=>{var aee=yn(),KC=aee("iterator"),GC=!1;try{zC=0,Q6={next:function(){return{done:!!zC++}},return:function(){GC=!0}},Q6[KC]=function(){return this},Array.from(Q6,function(){throw 2})}catch{}var zC,Q6;WC.exports=function(t,e){if(!e&&!GC)return!1;var r=!1;try{var n={};n[KC]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch{}return r}});var ch=Q((b2e,JC)=>{var cee=nf(),fee=YC(),uee=Yu().CONSTRUCTOR;JC.exports=uee||!fee(function(t){cee.all(t).then(void 0,function(){})})});var XC=Q(()=>{"use strict";var dee=Hi(),lee=zn(),hee=vo(),pee=Pa(),mee=Wu(),gee=zu(),bee=ch();dee({target:"Promise",stat:!0,forced:bee},{all:o(function(e){var r=this,n=pee.f(r),i=n.resolve,s=n.reject,a=mee(function(){var f=hee(r.resolve),d=[],h=0,p=1;gee(e,function(y){var I=h++,T=!1;p++,lee(f,r,y).then(function(D){T||(T=!0,d[I]=D,--p||i(d))},s)}),--p||i(d)});return a.error&&s(a.value),n.promise},"all")})});var QC=Q(()=>{"use strict";var vee=Hi(),yee=Zo(),xee=Yu().CONSTRUCTOR,tv=nf(),wee=Xo(),_ee=yr(),Eee=Fa(),ZC=tv&&tv.prototype;vee({target:"Promise",proto:!0,forced:xee,real:!0},{catch:function(t){return this.then(void 0,t)}});!yee&&_ee(tv)&&(ev=wee("Promise").prototype.catch,ZC.catch!==ev&&Eee(ZC,"catch",ev,{unsafe:!0}));var ev});var eI=Q(()=>{"use strict";var Aee=Hi(),Cee=zn(),Iee=vo(),Dee=Pa(),See=Wu(),Tee=zu(),kee=ch();Aee({target:"Promise",stat:!0,forced:kee},{race:o(function(e){var r=this,n=Dee.f(r),i=n.reject,s=See(function(){var a=Iee(r.resolve);Tee(e,function(f){Cee(a,r,f).then(n.resolve,i)})});return s.error&&i(s.value),n.promise},"race")})});var tI=Q(()=>{"use strict";var Mee=Hi(),Ree=zn(),Bee=Pa(),Fee=Yu().CONSTRUCTOR;Mee({target:"Promise",stat:!0,forced:Fee},{reject:o(function(e){var r=Bee.f(this);return Ree(r.reject,void 0,e),r.promise},"reject")})});var rv=Q((I2e,rI)=>{var Pee=xo(),Oee=Jo(),Nee=Pa();rI.exports=function(t,e){if(Pee(t),Oee(e)&&e.constructor===t)return e;var r=Nee.f(t),n=r.resolve;return n(e),r.promise}});var oI=Q(()=>{"use strict";var Lee=Hi(),Uee=Xo(),nI=Zo(),qee=nf(),iI=Yu().CONSTRUCTOR,$ee=rv(),jee=Uee("Promise"),Hee=nI&&!iI;Lee({target:"Promise",stat:!0,forced:nI||iI},{resolve:o(function(e){return $ee(Hee&&this===jee?qee:this,e)},"resolve")})});var sI=Q(()=>{VC();XC();QC();eI();tI();oI()});var aI=Q(()=>{"use strict";var Vee=Hi(),zee=zn(),Kee=vo(),Gee=Pa(),Wee=Wu(),Yee=zu(),Jee=ch();Vee({target:"Promise",stat:!0,forced:Jee},{allSettled:o(function(e){var r=this,n=Gee.f(r),i=n.resolve,s=n.reject,a=Wee(function(){var f=Kee(r.resolve),d=[],h=0,p=1;Yee(e,function(y){var I=h++,T=!1;p++,zee(f,r,y).then(function(D){T||(T=!0,d[I]={status:"fulfilled",value:D},--p||i(d))},function(D){T||(T=!0,d[I]={status:"rejected",reason:D},--p||i(d))})}),--p||i(d)});return a.error&&s(a.value),n.promise},"allSettled")})});var fI=Q(()=>{"use strict";var Xee=Hi(),Zee=zn(),Qee=vo(),ete=Xo(),tte=Pa(),rte=Wu(),nte=zu(),ite=ch(),cI="No one promise resolved";Xee({target:"Promise",stat:!0,forced:ite},{any:o(function(e){var r=this,n=ete("AggregateError"),i=tte.f(r),s=i.resolve,a=i.reject,f=rte(function(){var d=Qee(r.resolve),h=[],p=0,y=1,I=!1;nte(e,function(T){var D=p++,R=!1;y++,Zee(d,r,T).then(function(H){R||I||(I=!0,s(H))},function(H){R||I||(R=!0,h[D]=H,--y||a(new n(h,cI)))})}),--y||a(new n(h,cI))});return f.error&&a(f.value),i.promise},"any")})});var hI=Q(()=>{"use strict";var ote=Hi(),ste=Zo(),q1=nf(),ate=Bn(),dI=Xo(),lI=yr(),cte=C6(),uI=rv(),fte=Fa(),iv=q1&&q1.prototype,ute=!!q1&&ate(function(){iv.finally.call({then:function(){}},function(){})});ote({target:"Promise",proto:!0,real:!0,forced:ute},{finally:function(t){var e=cte(this,dI("Promise")),r=lI(t);return this.then(r?function(n){return uI(e,t()).then(function(){return n})}:t,r?function(n){return uI(e,t()).then(function(){throw n})}:t)}});!ste&&lI(q1)&&(nv=dI("Promise").prototype.finally,iv.finally!==nv&&fte(iv,"finally",nv,{unsafe:!0}));var nv});var bI=Q((N2e,gI)=>{var ov=vn(),dte=m1(),lte=C1(),hte=t1(),pte=ov("".charAt),pI=ov("".charCodeAt),mte=ov("".slice),mI=o(function(t){return function(e,r){var n=lte(hte(e)),i=dte(r),s=n.length,a,f;return i<0||i>=s?t?"":void 0:(a=pI(n,i),a<55296||a>56319||i+1===s||(f=pI(n,i+1))<56320||f>57343?t?pte(n,i):a:t?mte(n,i,i+2):(a-55296<<10)+(f-56320)+65536)}},"createMethod");gI.exports={codeAt:mI(!1),charAt:mI(!0)}});var wI=Q(()=>{"use strict";var gte=bI().charAt,bte=C1(),yI=Yl(),vte=x6(),vI=w6(),xI="String Iterator",yte=yI.set,xte=yI.getterFor(xI);vte(String,"String",function(t){yte(this,{type:xI,string:bte(t),index:0})},o(function(){var e=xte(this),r=e.string,n=e.index,i;return n>=r.length?vI(void 0,!0):(i=gte(r,n),e.index+=i.length,vI(i,!1))},"next"))});var EI=Q((q2e,_I)=>{var wte=rn();_I.exports=wte});var CI=Q(($2e,AI)=>{$E();E6();mA();sI();aI();fI();hI();wI();var _te=EI();AI.exports=_te.Promise});var DI=Q((j2e,II)=>{II.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}});var kI=Q((H2e,TI)=>{var Ete=Gl(),sv=Ete("span").classList,SI=sv&&sv.constructor&&sv.constructor.prototype;TI.exports=SI===Object.prototype?void 0:SI});var OI=Q(()=>{var MI=rn(),BI=DI(),Ate=kI(),fh=E6(),av=Ba(),FI=yn(),cv=FI("iterator"),RI=FI("toStringTag"),fv=fh.values,PI=o(function(t,e){if(t){if(t[cv]!==fv)try{av(t,cv,fv)}catch{t[cv]=fv}if(t[RI]||av(t,RI,e),BI[e]){for(var r in fh)if(t[r]!==fh[r])try{av(t,r,fh[r])}catch{t[r]=fh[r]}}}},"handlePrototype");for($1 in BI)PI(MI[$1]&&MI[$1].prototype,$1);var $1;PI(Ate,"DOMTokenList")});var LI=Q((K2e,NI)=>{var Cte=CI();OI();NI.exports=Cte});var qI=Q((G2e,UI)=>{var Ite=LI();UI.exports=Ite});var rS=Q((cd,Rh)=>{(function(){var t,e="4.17.21",r=200,n="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",i="Expected a function",s="Invalid `variable` option passed into `_.template`",a="__lodash_hash_undefined__",f=500,d="__lodash_placeholder__",h=1,p=2,y=4,I=1,T=2,D=1,R=2,H=4,F=8,V=16,X=32,J=64,re=128,z=256,$=512,G=30,le="...",P=800,g=16,_=1,v=2,l=3,b=1/0,E=9007199254740991,C=17976931348623157e292,A=0/0,x=4294967295,k=x-1,O=x>>>1,w=[["ary",re],["bind",D],["bindKey",R],["curry",F],["curryRight",V],["flip",$],["partial",X],["partialRight",J],["rearg",z]],M="[object Arguments]",he="[object Array]",B="[object AsyncFunction]",ee="[object Boolean]",ae="[object Date]",q="[object DOMException]",U="[object Error]",te="[object Function]",oe="[object GeneratorFunction]",ce="[object Map]",Ce="[object Number]",ve="[object Null]",ie="[object Object]",De="[object Promise]",ue="[object Proxy]",ye="[object RegExp]",W="[object Set]",me="[object String]",ke="[object Symbol]",ze="[object Undefined]",Oe="[object WeakMap]",Je="[object WeakSet]",Dr="[object ArrayBuffer]",de="[object DataView]",se="[object Float32Array]",L="[object Float64Array]",Z="[object Int8Array]",ge="[object Int16Array]",we="[object Int32Array]",Ee="[object Uint8Array]",Me="[object Uint8ClampedArray]",Ot="[object Uint16Array]",$e="[object Uint32Array]",Fe=/\b__p \+= '';/g,qt=/\b(__p \+=) '' \+/g,We=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ze=/&(?:amp|lt|gt|quot|#39);/g,ii=/[&<>"']/g,at=RegExp(Ze.source),ct=RegExp(ii.source),Ti=/<%-([\s\S]+?)%>/g,ft=/<%([\s\S]+?)%>/g,ot=/<%=([\s\S]+?)%>/g,ki=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ut=/^\w*$/,dt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,On=/[\\^$.*+?()[\]{}|]/g,lt=RegExp(On.source),rt=/^\s+/,Mi=/\s/,ht=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,pt=/\{\n\/\* \[wrapped with (.+)\] \*/,Ri=/,? & /,mt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,gt=/[()=,{}\[\]\/\s]/,Bi=/\\(\\)?/g,bt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,st=/\w*$/,oi=/^[-+]0x[0-9a-f]+$/i,Vt=/^0b[01]+$/i,zt=/^\[object .+?Constructor\]$/,Nn=/^0o[0-7]+$/i,Ln=/^(?:0|[1-9]\d*)$/,Un=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,en=/($^)/,qn=/['\n\r\u2028\u2029\\]/g,Fi="\\ud800-\\udfff",Ds="\\u0300-\\u036f",Ss="\\ufe20-\\ufe2f",Ts="\\u20d0-\\u20ff",Vo=Ds+Ss+Ts,zo="\\u2700-\\u27bf",Ko="a-z\\xdf-\\xf6\\xf8-\\xff",ks="\\xac\\xb1\\xd7\\xf7",Ms="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Rs="\\u2000-\\u206f",Bs=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Cu="A-Z\\xc0-\\xd6\\xd8-\\xde",Iu="\\ufe0e\\ufe0f",Du=ks+Ms+Rs+Bs,a2="['\u2019]",ZU="["+Fi+"]",p5="["+Du+"]",lp="["+Vo+"]",m5="\\d+",QU="["+zo+"]",g5="["+Ko+"]",b5="[^"+Fi+Du+m5+zo+Ko+Cu+"]",c2="\\ud83c[\\udffb-\\udfff]",eq="(?:"+lp+"|"+c2+")",v5="[^"+Fi+"]",f2="(?:\\ud83c[\\udde6-\\uddff]){2}",u2="[\\ud800-\\udbff][\\udc00-\\udfff]",Su="["+Cu+"]",y5="\\u200d",x5="(?:"+g5+"|"+b5+")",tq="(?:"+Su+"|"+b5+")",w5="(?:"+a2+"(?:d|ll|m|re|s|t|ve))?",_5="(?:"+a2+"(?:D|LL|M|RE|S|T|VE))?",E5=eq+"?",A5="["+Iu+"]?",rq="(?:"+y5+"(?:"+[v5,f2,u2].join("|")+")"+A5+E5+")*",nq="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",iq="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",C5=A5+E5+rq,oq="(?:"+[QU,f2,u2].join("|")+")"+C5,sq="(?:"+[v5+lp+"?",lp,f2,u2,ZU].join("|")+")",aq=RegExp(a2,"g"),cq=RegExp(lp,"g"),d2=RegExp(c2+"(?="+c2+")|"+sq+C5,"g"),fq=RegExp([Su+"?"+g5+"+"+w5+"(?="+[p5,Su,"$"].join("|")+")",tq+"+"+_5+"(?="+[p5,Su+x5,"$"].join("|")+")",Su+"?"+x5+"+"+w5,Su+"+"+_5,iq,nq,m5,oq].join("|"),"g"),uq=RegExp("["+y5+Fi+Vo+Iu+"]"),dq=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,lq=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],hq=-1,dr={};dr[se]=dr[L]=dr[Z]=dr[ge]=dr[we]=dr[Ee]=dr[Me]=dr[Ot]=dr[$e]=!0,dr[M]=dr[he]=dr[Dr]=dr[ee]=dr[de]=dr[ae]=dr[U]=dr[te]=dr[ce]=dr[Ce]=dr[ie]=dr[ye]=dr[W]=dr[me]=dr[Oe]=!1;var ar={};ar[M]=ar[he]=ar[Dr]=ar[de]=ar[ee]=ar[ae]=ar[se]=ar[L]=ar[Z]=ar[ge]=ar[we]=ar[ce]=ar[Ce]=ar[ie]=ar[ye]=ar[W]=ar[me]=ar[ke]=ar[Ee]=ar[Me]=ar[Ot]=ar[$e]=!0,ar[U]=ar[te]=ar[Oe]=!1;var pq={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},mq={"&":"&","<":"<",">":">",'"':""","'":"'"},gq={"&":"&","<":"<",">":">",""":'"',"'":"'"},bq={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},vq=parseFloat,yq=parseInt,I5=typeof global=="object"&&global&&global.Object===Object&&global,xq=typeof self=="object"&&self&&self.Object===Object&&self,$r=I5||xq||Function("return this")(),l2=typeof cd=="object"&&cd&&!cd.nodeType&&cd,zc=l2&&typeof Rh=="object"&&Rh&&!Rh.nodeType&&Rh,D5=zc&&zc.exports===l2,h2=D5&&I5.process,Pi=function(){try{var pe=zc&&zc.require&&zc.require("util").types;return pe||h2&&h2.binding&&h2.binding("util")}catch{}}(),S5=Pi&&Pi.isArrayBuffer,T5=Pi&&Pi.isDate,k5=Pi&&Pi.isMap,M5=Pi&&Pi.isRegExp,R5=Pi&&Pi.isSet,B5=Pi&&Pi.isTypedArray;function si(pe,Ae,_e){switch(_e.length){case 0:return pe.call(Ae);case 1:return pe.call(Ae,_e[0]);case 2:return pe.call(Ae,_e[0],_e[1]);case 3:return pe.call(Ae,_e[0],_e[1],_e[2])}return pe.apply(Ae,_e)}o(si,"apply");function wq(pe,Ae,_e,He){for(var xt=-1,Kt=pe==null?0:pe.length;++xt<Kt;){var Or=pe[xt];Ae(He,Or,_e(Or),pe)}return He}o(wq,"arrayAggregator");function Oi(pe,Ae){for(var _e=-1,He=pe==null?0:pe.length;++_e<He&&Ae(pe[_e],_e,pe)!==!1;);return pe}o(Oi,"arrayEach");function _q(pe,Ae){for(var _e=pe==null?0:pe.length;_e--&&Ae(pe[_e],_e,pe)!==!1;);return pe}o(_q,"arrayEachRight");function F5(pe,Ae){for(var _e=-1,He=pe==null?0:pe.length;++_e<He;)if(!Ae(pe[_e],_e,pe))return!1;return!0}o(F5,"arrayEvery");function Ea(pe,Ae){for(var _e=-1,He=pe==null?0:pe.length,xt=0,Kt=[];++_e<He;){var Or=pe[_e];Ae(Or,_e,pe)&&(Kt[xt++]=Or)}return Kt}o(Ea,"arrayFilter");function hp(pe,Ae){var _e=pe==null?0:pe.length;return!!_e&&Tu(pe,Ae,0)>-1}o(hp,"arrayIncludes");function p2(pe,Ae,_e){for(var He=-1,xt=pe==null?0:pe.length;++He<xt;)if(_e(Ae,pe[He]))return!0;return!1}o(p2,"arrayIncludesWith");function hr(pe,Ae){for(var _e=-1,He=pe==null?0:pe.length,xt=Array(He);++_e<He;)xt[_e]=Ae(pe[_e],_e,pe);return xt}o(hr,"arrayMap");function Aa(pe,Ae){for(var _e=-1,He=Ae.length,xt=pe.length;++_e<He;)pe[xt+_e]=Ae[_e];return pe}o(Aa,"arrayPush");function m2(pe,Ae,_e,He){var xt=-1,Kt=pe==null?0:pe.length;for(He&&Kt&&(_e=pe[++xt]);++xt<Kt;)_e=Ae(_e,pe[xt],xt,pe);return _e}o(m2,"arrayReduce");function Eq(pe,Ae,_e,He){var xt=pe==null?0:pe.length;for(He&&xt&&(_e=pe[--xt]);xt--;)_e=Ae(_e,pe[xt],xt,pe);return _e}o(Eq,"arrayReduceRight");function g2(pe,Ae){for(var _e=-1,He=pe==null?0:pe.length;++_e<He;)if(Ae(pe[_e],_e,pe))return!0;return!1}o(g2,"arraySome");var Aq=b2("length");function Cq(pe){return pe.split("")}o(Cq,"asciiToArray");function Iq(pe){return pe.match(mt)||[]}o(Iq,"asciiWords");function P5(pe,Ae,_e){var He;return _e(pe,function(xt,Kt,Or){if(Ae(xt,Kt,Or))return He=Kt,!1}),He}o(P5,"baseFindKey");function pp(pe,Ae,_e,He){for(var xt=pe.length,Kt=_e+(He?1:-1);He?Kt--:++Kt<xt;)if(Ae(pe[Kt],Kt,pe))return Kt;return-1}o(pp,"baseFindIndex");function Tu(pe,Ae,_e){return Ae===Ae?Lq(pe,Ae,_e):pp(pe,O5,_e)}o(Tu,"baseIndexOf");function Dq(pe,Ae,_e,He){for(var xt=_e-1,Kt=pe.length;++xt<Kt;)if(He(pe[xt],Ae))return xt;return-1}o(Dq,"baseIndexOfWith");function O5(pe){return pe!==pe}o(O5,"baseIsNaN");function N5(pe,Ae){var _e=pe==null?0:pe.length;return _e?y2(pe,Ae)/_e:A}o(N5,"baseMean");function b2(pe){return function(Ae){return Ae==null?t:Ae[pe]}}o(b2,"baseProperty");function v2(pe){return function(Ae){return pe==null?t:pe[Ae]}}o(v2,"basePropertyOf");function L5(pe,Ae,_e,He,xt){return xt(pe,function(Kt,Or,or){_e=He?(He=!1,Kt):Ae(_e,Kt,Or,or)}),_e}o(L5,"baseReduce");function Sq(pe,Ae){var _e=pe.length;for(pe.sort(Ae);_e--;)pe[_e]=pe[_e].value;return pe}o(Sq,"baseSortBy");function y2(pe,Ae){for(var _e,He=-1,xt=pe.length;++He<xt;){var Kt=Ae(pe[He]);Kt!==t&&(_e=_e===t?Kt:_e+Kt)}return _e}o(y2,"baseSum");function x2(pe,Ae){for(var _e=-1,He=Array(pe);++_e<pe;)He[_e]=Ae(_e);return He}o(x2,"baseTimes");function Tq(pe,Ae){return hr(Ae,function(_e){return[_e,pe[_e]]})}o(Tq,"baseToPairs");function U5(pe){return pe&&pe.slice(0,H5(pe)+1).replace(rt,"")}o(U5,"baseTrim");function ai(pe){return function(Ae){return pe(Ae)}}o(ai,"baseUnary");function w2(pe,Ae){return hr(Ae,function(_e){return pe[_e]})}o(w2,"baseValues");function Cl(pe,Ae){return pe.has(Ae)}o(Cl,"cacheHas");function q5(pe,Ae){for(var _e=-1,He=pe.length;++_e<He&&Tu(Ae,pe[_e],0)>-1;);return _e}o(q5,"charsStartIndex");function $5(pe,Ae){for(var _e=pe.length;_e--&&Tu(Ae,pe[_e],0)>-1;);return _e}o($5,"charsEndIndex");function kq(pe,Ae){for(var _e=pe.length,He=0;_e--;)pe[_e]===Ae&&++He;return He}o(kq,"countHolders");var Mq=v2(pq),Rq=v2(mq);function Bq(pe){return"\\"+bq[pe]}o(Bq,"escapeStringChar");function Fq(pe,Ae){return pe==null?t:pe[Ae]}o(Fq,"getValue");function ku(pe){return uq.test(pe)}o(ku,"hasUnicode");function Pq(pe){return dq.test(pe)}o(Pq,"hasUnicodeWord");function Oq(pe){for(var Ae,_e=[];!(Ae=pe.next()).done;)_e.push(Ae.value);return _e}o(Oq,"iteratorToArray");function _2(pe){var Ae=-1,_e=Array(pe.size);return pe.forEach(function(He,xt){_e[++Ae]=[xt,He]}),_e}o(_2,"mapToArray");function j5(pe,Ae){return function(_e){return pe(Ae(_e))}}o(j5,"overArg");function Ca(pe,Ae){for(var _e=-1,He=pe.length,xt=0,Kt=[];++_e<He;){var Or=pe[_e];(Or===Ae||Or===d)&&(pe[_e]=d,Kt[xt++]=_e)}return Kt}o(Ca,"replaceHolders");function mp(pe){var Ae=-1,_e=Array(pe.size);return pe.forEach(function(He){_e[++Ae]=He}),_e}o(mp,"setToArray");function Nq(pe){var Ae=-1,_e=Array(pe.size);return pe.forEach(function(He){_e[++Ae]=[He,He]}),_e}o(Nq,"setToPairs");function Lq(pe,Ae,_e){for(var He=_e-1,xt=pe.length;++He<xt;)if(pe[He]===Ae)return He;return-1}o(Lq,"strictIndexOf");function Uq(pe,Ae,_e){for(var He=_e+1;He--;)if(pe[He]===Ae)return He;return He}o(Uq,"strictLastIndexOf");function Mu(pe){return ku(pe)?$q(pe):Aq(pe)}o(Mu,"stringSize");function lo(pe){return ku(pe)?jq(pe):Cq(pe)}o(lo,"stringToArray");function H5(pe){for(var Ae=pe.length;Ae--&&Mi.test(pe.charAt(Ae)););return Ae}o(H5,"trimmedEndIndex");var qq=v2(gq);function $q(pe){for(var Ae=d2.lastIndex=0;d2.test(pe);)++Ae;return Ae}o($q,"unicodeSize");function jq(pe){return pe.match(d2)||[]}o(jq,"unicodeToArray");function Hq(pe){return pe.match(fq)||[]}o(Hq,"unicodeWords");var Vq=o(function pe(Ae){Ae=Ae==null?$r:Ia.defaults($r.Object(),Ae,Ia.pick($r,lq));var _e=Ae.Array,He=Ae.Date,xt=Ae.Error,Kt=Ae.Function,Or=Ae.Math,or=Ae.Object,E2=Ae.RegExp,zq=Ae.String,Ni=Ae.TypeError,gp=_e.prototype,Kq=Kt.prototype,Ru=or.prototype,bp=Ae["__core-js_shared__"],vp=Kq.toString,Qt=Ru.hasOwnProperty,Gq=0,V5=function(){var c=/[^.]+$/.exec(bp&&bp.keys&&bp.keys.IE_PROTO||"");return c?"Symbol(src)_1."+c:""}(),yp=Ru.toString,Wq=vp.call(or),Yq=$r._,Jq=E2("^"+vp.call(Qt).replace(On,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),xp=D5?Ae.Buffer:t,Da=Ae.Symbol,wp=Ae.Uint8Array,z5=xp?xp.allocUnsafe:t,_p=j5(or.getPrototypeOf,or),K5=or.create,G5=Ru.propertyIsEnumerable,Ep=gp.splice,W5=Da?Da.isConcatSpreadable:t,Il=Da?Da.iterator:t,Kc=Da?Da.toStringTag:t,Ap=function(){try{var c=Xc(or,"defineProperty");return c({},"",{}),c}catch{}}(),Xq=Ae.clearTimeout!==$r.clearTimeout&&Ae.clearTimeout,Zq=He&&He.now!==$r.Date.now&&He.now,Qq=Ae.setTimeout!==$r.setTimeout&&Ae.setTimeout,Cp=Or.ceil,Ip=Or.floor,A2=or.getOwnPropertySymbols,e$=xp?xp.isBuffer:t,Y5=Ae.isFinite,t$=gp.join,r$=j5(or.keys,or),Nr=Or.max,gn=Or.min,n$=He.now,i$=Ae.parseInt,J5=Or.random,o$=gp.reverse,C2=Xc(Ae,"DataView"),Dl=Xc(Ae,"Map"),I2=Xc(Ae,"Promise"),Bu=Xc(Ae,"Set"),Sl=Xc(Ae,"WeakMap"),Tl=Xc(or,"create"),Dp=Sl&&new Sl,Fu={},s$=Zc(C2),a$=Zc(Dl),c$=Zc(I2),f$=Zc(Bu),u$=Zc(Sl),Sp=Da?Da.prototype:t,kl=Sp?Sp.valueOf:t,X5=Sp?Sp.toString:t;function j(c){if(vr(c)&&!_t(c)&&!(c instanceof Nt)){if(c instanceof Li)return c;if(Qt.call(c,"__wrapped__"))return Zw(c)}return new Li(c)}o(j,"lodash");var Pu=function(){function c(){}return o(c,"object"),function(u){if(!mr(u))return{};if(K5)return K5(u);c.prototype=u;var m=new c;return c.prototype=t,m}}();function Tp(){}o(Tp,"baseLodash");function Li(c,u){this.__wrapped__=c,this.__actions__=[],this.__chain__=!!u,this.__index__=0,this.__values__=t}o(Li,"LodashWrapper"),j.templateSettings={escape:Ti,evaluate:ft,interpolate:ot,variable:"",imports:{_:j}},j.prototype=Tp.prototype,j.prototype.constructor=j,Li.prototype=Pu(Tp.prototype),Li.prototype.constructor=Li;function Nt(c){this.__wrapped__=c,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=x,this.__views__=[]}o(Nt,"LazyWrapper");function d$(){var c=new Nt(this.__wrapped__);return c.__actions__=$n(this.__actions__),c.__dir__=this.__dir__,c.__filtered__=this.__filtered__,c.__iteratees__=$n(this.__iteratees__),c.__takeCount__=this.__takeCount__,c.__views__=$n(this.__views__),c}o(d$,"lazyClone");function l$(){if(this.__filtered__){var c=new Nt(this);c.__dir__=-1,c.__filtered__=!0}else c=this.clone(),c.__dir__*=-1;return c}o(l$,"lazyReverse");function h$(){var c=this.__wrapped__.value(),u=this.__dir__,m=_t(c),S=u<0,N=m?c.length:0,K=Cj(0,N,this.__views__),ne=K.start,fe=K.end,be=fe-ne,Se=S?fe:ne-1,Te=this.__iteratees__,Re=Te.length,Ue=0,Ke=gn(be,this.__takeCount__);if(!m||!S&&N==be&&Ke==be)return ww(c,this.__actions__);var nt=[];e:for(;be--&&Ue<Ke;){Se+=u;for(var Dt=-1,it=c[Se];++Dt<Re;){var Bt=Te[Dt],Lt=Bt.iteratee,ui=Bt.type,Rn=Lt(it);if(ui==v)it=Rn;else if(!Rn){if(ui==_)continue e;break e}}nt[Ue++]=it}return nt}o(h$,"lazyValue"),Nt.prototype=Pu(Tp.prototype),Nt.prototype.constructor=Nt;function Gc(c){var u=-1,m=c==null?0:c.length;for(this.clear();++u<m;){var S=c[u];this.set(S[0],S[1])}}o(Gc,"Hash");function p$(){this.__data__=Tl?Tl(null):{},this.size=0}o(p$,"hashClear");function m$(c){var u=this.has(c)&&delete this.__data__[c];return this.size-=u?1:0,u}o(m$,"hashDelete");function g$(c){var u=this.__data__;if(Tl){var m=u[c];return m===a?t:m}return Qt.call(u,c)?u[c]:t}o(g$,"hashGet");function b$(c){var u=this.__data__;return Tl?u[c]!==t:Qt.call(u,c)}o(b$,"hashHas");function v$(c,u){var m=this.__data__;return this.size+=this.has(c)?0:1,m[c]=Tl&&u===t?a:u,this}o(v$,"hashSet"),Gc.prototype.clear=p$,Gc.prototype.delete=m$,Gc.prototype.get=g$,Gc.prototype.has=b$,Gc.prototype.set=v$;function Fs(c){var u=-1,m=c==null?0:c.length;for(this.clear();++u<m;){var S=c[u];this.set(S[0],S[1])}}o(Fs,"ListCache");function y$(){this.__data__=[],this.size=0}o(y$,"listCacheClear");function x$(c){var u=this.__data__,m=kp(u,c);if(m<0)return!1;var S=u.length-1;return m==S?u.pop():Ep.call(u,m,1),--this.size,!0}o(x$,"listCacheDelete");function w$(c){var u=this.__data__,m=kp(u,c);return m<0?t:u[m][1]}o(w$,"listCacheGet");function _$(c){return kp(this.__data__,c)>-1}o(_$,"listCacheHas");function E$(c,u){var m=this.__data__,S=kp(m,c);return S<0?(++this.size,m.push([c,u])):m[S][1]=u,this}o(E$,"listCacheSet"),Fs.prototype.clear=y$,Fs.prototype.delete=x$,Fs.prototype.get=w$,Fs.prototype.has=_$,Fs.prototype.set=E$;function Ps(c){var u=-1,m=c==null?0:c.length;for(this.clear();++u<m;){var S=c[u];this.set(S[0],S[1])}}o(Ps,"MapCache");function A$(){this.size=0,this.__data__={hash:new Gc,map:new(Dl||Fs),string:new Gc}}o(A$,"mapCacheClear");function C$(c){var u=jp(this,c).delete(c);return this.size-=u?1:0,u}o(C$,"mapCacheDelete");function I$(c){return jp(this,c).get(c)}o(I$,"mapCacheGet");function D$(c){return jp(this,c).has(c)}o(D$,"mapCacheHas");function S$(c,u){var m=jp(this,c),S=m.size;return m.set(c,u),this.size+=m.size==S?0:1,this}o(S$,"mapCacheSet"),Ps.prototype.clear=A$,Ps.prototype.delete=C$,Ps.prototype.get=I$,Ps.prototype.has=D$,Ps.prototype.set=S$;function Wc(c){var u=-1,m=c==null?0:c.length;for(this.__data__=new Ps;++u<m;)this.add(c[u])}o(Wc,"SetCache");function T$(c){return this.__data__.set(c,a),this}o(T$,"setCacheAdd");function k$(c){return this.__data__.has(c)}o(k$,"setCacheHas"),Wc.prototype.add=Wc.prototype.push=T$,Wc.prototype.has=k$;function ho(c){var u=this.__data__=new Fs(c);this.size=u.size}o(ho,"Stack");function M$(){this.__data__=new Fs,this.size=0}o(M$,"stackClear");function R$(c){var u=this.__data__,m=u.delete(c);return this.size=u.size,m}o(R$,"stackDelete");function B$(c){return this.__data__.get(c)}o(B$,"stackGet");function F$(c){return this.__data__.has(c)}o(F$,"stackHas");function P$(c,u){var m=this.__data__;if(m instanceof Fs){var S=m.__data__;if(!Dl||S.length<r-1)return S.push([c,u]),this.size=++m.size,this;m=this.__data__=new Ps(S)}return m.set(c,u),this.size=m.size,this}o(P$,"stackSet"),ho.prototype.clear=M$,ho.prototype.delete=R$,ho.prototype.get=B$,ho.prototype.has=F$,ho.prototype.set=P$;function Z5(c,u){var m=_t(c),S=!m&&Qc(c),N=!m&&!S&&Ra(c),K=!m&&!S&&!N&&Uu(c),ne=m||S||N||K,fe=ne?x2(c.length,zq):[],be=fe.length;for(var Se in c)(u||Qt.call(c,Se))&&!(ne&&(Se=="length"||N&&(Se=="offset"||Se=="parent")||K&&(Se=="buffer"||Se=="byteLength"||Se=="byteOffset")||Us(Se,be)))&&fe.push(Se);return fe}o(Z5,"arrayLikeKeys");function Q5(c){var u=c.length;return u?c[N2(0,u-1)]:t}o(Q5,"arraySample");function O$(c,u){return Hp($n(c),Yc(u,0,c.length))}o(O$,"arraySampleSize");function N$(c){return Hp($n(c))}o(N$,"arrayShuffle");function D2(c,u,m){(m!==t&&!po(c[u],m)||m===t&&!(u in c))&&Os(c,u,m)}o(D2,"assignMergeValue");function Ml(c,u,m){var S=c[u];(!(Qt.call(c,u)&&po(S,m))||m===t&&!(u in c))&&Os(c,u,m)}o(Ml,"assignValue");function kp(c,u){for(var m=c.length;m--;)if(po(c[m][0],u))return m;return-1}o(kp,"assocIndexOf");function L$(c,u,m,S){return Sa(c,function(N,K,ne){u(S,N,m(N),ne)}),S}o(L$,"baseAggregator");function ew(c,u){return c&&Wo(u,jr(u),c)}o(ew,"baseAssign");function U$(c,u){return c&&Wo(u,Hn(u),c)}o(U$,"baseAssignIn");function Os(c,u,m){u=="__proto__"&&Ap?Ap(c,u,{configurable:!0,enumerable:!0,value:m,writable:!0}):c[u]=m}o(Os,"baseAssignValue");function S2(c,u){for(var m=-1,S=u.length,N=_e(S),K=c==null;++m<S;)N[m]=K?t:c3(c,u[m]);return N}o(S2,"baseAt");function Yc(c,u,m){return c===c&&(m!==t&&(c=c<=m?c:m),u!==t&&(c=c>=u?c:u)),c}o(Yc,"baseClamp");function Ui(c,u,m,S,N,K){var ne,fe=u&h,be=u&p,Se=u&y;if(m&&(ne=N?m(c,S,N,K):m(c)),ne!==t)return ne;if(!mr(c))return c;var Te=_t(c);if(Te){if(ne=Dj(c),!fe)return $n(c,ne)}else{var Re=bn(c),Ue=Re==te||Re==oe;if(Ra(c))return Aw(c,fe);if(Re==ie||Re==M||Ue&&!N){if(ne=be||Ue?{}:Hw(c),!fe)return be?gj(c,U$(ne,c)):mj(c,ew(ne,c))}else{if(!ar[Re])return N?c:{};ne=Sj(c,Re,fe)}}K||(K=new ho);var Ke=K.get(c);if(Ke)return Ke;K.set(c,ne),v7(c)?c.forEach(function(it){ne.add(Ui(it,u,m,it,c,K))}):g7(c)&&c.forEach(function(it,Bt){ne.set(Bt,Ui(it,u,m,Bt,c,K))});var nt=Se?be?W2:G2:be?Hn:jr,Dt=Te?t:nt(c);return Oi(Dt||c,function(it,Bt){Dt&&(Bt=it,it=c[Bt]),Ml(ne,Bt,Ui(it,u,m,Bt,c,K))}),ne}o(Ui,"baseClone");function q$(c){var u=jr(c);return function(m){return tw(m,c,u)}}o(q$,"baseConforms");function tw(c,u,m){var S=m.length;if(c==null)return!S;for(c=or(c);S--;){var N=m[S],K=u[N],ne=c[N];if(ne===t&&!(N in c)||!K(ne))return!1}return!0}o(tw,"baseConformsTo");function rw(c,u,m){if(typeof c!="function")throw new Ni(i);return Ll(function(){c.apply(t,m)},u)}o(rw,"baseDelay");function Rl(c,u,m,S){var N=-1,K=hp,ne=!0,fe=c.length,be=[],Se=u.length;if(!fe)return be;m&&(u=hr(u,ai(m))),S?(K=p2,ne=!1):u.length>=r&&(K=Cl,ne=!1,u=new Wc(u));e:for(;++N<fe;){var Te=c[N],Re=m==null?Te:m(Te);if(Te=S||Te!==0?Te:0,ne&&Re===Re){for(var Ue=Se;Ue--;)if(u[Ue]===Re)continue e;be.push(Te)}else K(u,Re,S)||be.push(Te)}return be}o(Rl,"baseDifference");var Sa=Tw(Go),nw=Tw(k2,!0);function $$(c,u){var m=!0;return Sa(c,function(S,N,K){return m=!!u(S,N,K),m}),m}o($$,"baseEvery");function Mp(c,u,m){for(var S=-1,N=c.length;++S<N;){var K=c[S],ne=u(K);if(ne!=null&&(fe===t?ne===ne&&!fi(ne):m(ne,fe)))var fe=ne,be=K}return be}o(Mp,"baseExtremum");function j$(c,u,m,S){var N=c.length;for(m=Ct(m),m<0&&(m=-m>N?0:N+m),S=S===t||S>N?N:Ct(S),S<0&&(S+=N),S=m>S?0:x7(S);m<S;)c[m++]=u;return c}o(j$,"baseFill");function iw(c,u){var m=[];return Sa(c,function(S,N,K){u(S,N,K)&&m.push(S)}),m}o(iw,"baseFilter");function tn(c,u,m,S,N){var K=-1,ne=c.length;for(m||(m=kj),N||(N=[]);++K<ne;){var fe=c[K];u>0&&m(fe)?u>1?tn(fe,u-1,m,S,N):Aa(N,fe):S||(N[N.length]=fe)}return N}o(tn,"baseFlatten");var T2=kw(),ow=kw(!0);function Go(c,u){return c&&T2(c,u,jr)}o(Go,"baseForOwn");function k2(c,u){return c&&ow(c,u,jr)}o(k2,"baseForOwnRight");function Rp(c,u){return Ea(u,function(m){return qs(c[m])})}o(Rp,"baseFunctions");function Jc(c,u){u=ka(u,c);for(var m=0,S=u.length;c!=null&&m<S;)c=c[Yo(u[m++])];return m&&m==S?c:t}o(Jc,"baseGet");function sw(c,u,m){var S=u(c);return _t(c)?S:Aa(S,m(c))}o(sw,"baseGetAllKeys");function kn(c){return c==null?c===t?ze:ve:Kc&&Kc in or(c)?Aj(c):Nj(c)}o(kn,"baseGetTag");function M2(c,u){return c>u}o(M2,"baseGt");function H$(c,u){return c!=null&&Qt.call(c,u)}o(H$,"baseHas");function V$(c,u){return c!=null&&u in or(c)}o(V$,"baseHasIn");function z$(c,u,m){return c>=gn(u,m)&&c<Nr(u,m)}o(z$,"baseInRange");function R2(c,u,m){for(var S=m?p2:hp,N=c[0].length,K=c.length,ne=K,fe=_e(K),be=1/0,Se=[];ne--;){var Te=c[ne];ne&&u&&(Te=hr(Te,ai(u))),be=gn(Te.length,be),fe[ne]=!m&&(u||N>=120&&Te.length>=120)?new Wc(ne&&Te):t}Te=c[0];var Re=-1,Ue=fe[0];e:for(;++Re<N&&Se.length<be;){var Ke=Te[Re],nt=u?u(Ke):Ke;if(Ke=m||Ke!==0?Ke:0,!(Ue?Cl(Ue,nt):S(Se,nt,m))){for(ne=K;--ne;){var Dt=fe[ne];if(!(Dt?Cl(Dt,nt):S(c[ne],nt,m)))continue e}Ue&&Ue.push(nt),Se.push(Ke)}}return Se}o(R2,"baseIntersection");function K$(c,u,m,S){return Go(c,function(N,K,ne){u(S,m(N),K,ne)}),S}o(K$,"baseInverter");function Bl(c,u,m){u=ka(u,c),c=Gw(c,u);var S=c==null?c:c[Yo($i(u))];return S==null?t:si(S,c,m)}o(Bl,"baseInvoke");function aw(c){return vr(c)&&kn(c)==M}o(aw,"baseIsArguments");function G$(c){return vr(c)&&kn(c)==Dr}o(G$,"baseIsArrayBuffer");function W$(c){return vr(c)&&kn(c)==ae}o(W$,"baseIsDate");function Fl(c,u,m,S,N){return c===u?!0:c==null||u==null||!vr(c)&&!vr(u)?c!==c&&u!==u:Y$(c,u,m,S,Fl,N)}o(Fl,"baseIsEqual");function Y$(c,u,m,S,N,K){var ne=_t(c),fe=_t(u),be=ne?he:bn(c),Se=fe?he:bn(u);be=be==M?ie:be,Se=Se==M?ie:Se;var Te=be==ie,Re=Se==ie,Ue=be==Se;if(Ue&&Ra(c)){if(!Ra(u))return!1;ne=!0,Te=!1}if(Ue&&!Te)return K||(K=new ho),ne||Uu(c)?qw(c,u,m,S,N,K):_j(c,u,be,m,S,N,K);if(!(m&I)){var Ke=Te&&Qt.call(c,"__wrapped__"),nt=Re&&Qt.call(u,"__wrapped__");if(Ke||nt){var Dt=Ke?c.value():c,it=nt?u.value():u;return K||(K=new ho),N(Dt,it,m,S,K)}}return Ue?(K||(K=new ho),Ej(c,u,m,S,N,K)):!1}o(Y$,"baseIsEqualDeep");function J$(c){return vr(c)&&bn(c)==ce}o(J$,"baseIsMap");function B2(c,u,m,S){var N=m.length,K=N,ne=!S;if(c==null)return!K;for(c=or(c);N--;){var fe=m[N];if(ne&&fe[2]?fe[1]!==c[fe[0]]:!(fe[0]in c))return!1}for(;++N<K;){fe=m[N];var be=fe[0],Se=c[be],Te=fe[1];if(ne&&fe[2]){if(Se===t&&!(be in c))return!1}else{var Re=new ho;if(S)var Ue=S(Se,Te,be,c,u,Re);if(!(Ue===t?Fl(Te,Se,I|T,S,Re):Ue))return!1}}return!0}o(B2,"baseIsMatch");function cw(c){if(!mr(c)||Rj(c))return!1;var u=qs(c)?Jq:zt;return u.test(Zc(c))}o(cw,"baseIsNative");function X$(c){return vr(c)&&kn(c)==ye}o(X$,"baseIsRegExp");function Z$(c){return vr(c)&&bn(c)==W}o(Z$,"baseIsSet");function Q$(c){return vr(c)&&Yp(c.length)&&!!dr[kn(c)]}o(Q$,"baseIsTypedArray");function fw(c){return typeof c=="function"?c:c==null?Vn:typeof c=="object"?_t(c)?lw(c[0],c[1]):dw(c):M7(c)}o(fw,"baseIteratee");function F2(c){if(!Nl(c))return r$(c);var u=[];for(var m in or(c))Qt.call(c,m)&&m!="constructor"&&u.push(m);return u}o(F2,"baseKeys");function ej(c){if(!mr(c))return Oj(c);var u=Nl(c),m=[];for(var S in c)S=="constructor"&&(u||!Qt.call(c,S))||m.push(S);return m}o(ej,"baseKeysIn");function P2(c,u){return c<u}o(P2,"baseLt");function uw(c,u){var m=-1,S=jn(c)?_e(c.length):[];return Sa(c,function(N,K,ne){S[++m]=u(N,K,ne)}),S}o(uw,"baseMap");function dw(c){var u=J2(c);return u.length==1&&u[0][2]?zw(u[0][0],u[0][1]):function(m){return m===c||B2(m,c,u)}}o(dw,"baseMatches");function lw(c,u){return Z2(c)&&Vw(u)?zw(Yo(c),u):function(m){var S=c3(m,c);return S===t&&S===u?f3(m,c):Fl(u,S,I|T)}}o(lw,"baseMatchesProperty");function Bp(c,u,m,S,N){c!==u&&T2(u,function(K,ne){if(N||(N=new ho),mr(K))tj(c,u,ne,m,Bp,S,N);else{var fe=S?S(e3(c,ne),K,ne+"",c,u,N):t;fe===t&&(fe=K),D2(c,ne,fe)}},Hn)}o(Bp,"baseMerge");function tj(c,u,m,S,N,K,ne){var fe=e3(c,m),be=e3(u,m),Se=ne.get(be);if(Se){D2(c,m,Se);return}var Te=K?K(fe,be,m+"",c,u,ne):t,Re=Te===t;if(Re){var Ue=_t(be),Ke=!Ue&&Ra(be),nt=!Ue&&!Ke&&Uu(be);Te=be,Ue||Ke||nt?_t(fe)?Te=fe:Sr(fe)?Te=$n(fe):Ke?(Re=!1,Te=Aw(be,!0)):nt?(Re=!1,Te=Cw(be,!0)):Te=[]:Ul(be)||Qc(be)?(Te=fe,Qc(fe)?Te=w7(fe):(!mr(fe)||qs(fe))&&(Te=Hw(be))):Re=!1}Re&&(ne.set(be,Te),N(Te,be,S,K,ne),ne.delete(be)),D2(c,m,Te)}o(tj,"baseMergeDeep");function hw(c,u){var m=c.length;if(!!m)return u+=u<0?m:0,Us(u,m)?c[u]:t}o(hw,"baseNth");function pw(c,u,m){u.length?u=hr(u,function(K){return _t(K)?function(ne){return Jc(ne,K.length===1?K[0]:K)}:K}):u=[Vn];var S=-1;u=hr(u,ai(Qe()));var N=uw(c,function(K,ne,fe){var be=hr(u,function(Se){return Se(K)});return{criteria:be,index:++S,value:K}});return Sq(N,function(K,ne){return pj(K,ne,m)})}o(pw,"baseOrderBy");function rj(c,u){return mw(c,u,function(m,S){return f3(c,S)})}o(rj,"basePick");function mw(c,u,m){for(var S=-1,N=u.length,K={};++S<N;){var ne=u[S],fe=Jc(c,ne);m(fe,ne)&&Pl(K,ka(ne,c),fe)}return K}o(mw,"basePickBy");function nj(c){return function(u){return Jc(u,c)}}o(nj,"basePropertyDeep");function O2(c,u,m,S){var N=S?Dq:Tu,K=-1,ne=u.length,fe=c;for(c===u&&(u=$n(u)),m&&(fe=hr(c,ai(m)));++K<ne;)for(var be=0,Se=u[K],Te=m?m(Se):Se;(be=N(fe,Te,be,S))>-1;)fe!==c&&Ep.call(fe,be,1),Ep.call(c,be,1);return c}o(O2,"basePullAll");function gw(c,u){for(var m=c?u.length:0,S=m-1;m--;){var N=u[m];if(m==S||N!==K){var K=N;Us(N)?Ep.call(c,N,1):q2(c,N)}}return c}o(gw,"basePullAt");function N2(c,u){return c+Ip(J5()*(u-c+1))}o(N2,"baseRandom");function ij(c,u,m,S){for(var N=-1,K=Nr(Cp((u-c)/(m||1)),0),ne=_e(K);K--;)ne[S?K:++N]=c,c+=m;return ne}o(ij,"baseRange");function L2(c,u){var m="";if(!c||u<1||u>E)return m;do u%2&&(m+=c),u=Ip(u/2),u&&(c+=c);while(u);return m}o(L2,"baseRepeat");function kt(c,u){return t3(Kw(c,u,Vn),c+"")}o(kt,"baseRest");function oj(c){return Q5(qu(c))}o(oj,"baseSample");function sj(c,u){var m=qu(c);return Hp(m,Yc(u,0,m.length))}o(sj,"baseSampleSize");function Pl(c,u,m,S){if(!mr(c))return c;u=ka(u,c);for(var N=-1,K=u.length,ne=K-1,fe=c;fe!=null&&++N<K;){var be=Yo(u[N]),Se=m;if(be==="__proto__"||be==="constructor"||be==="prototype")return c;if(N!=ne){var Te=fe[be];Se=S?S(Te,be,fe):t,Se===t&&(Se=mr(Te)?Te:Us(u[N+1])?[]:{})}Ml(fe,be,Se),fe=fe[be]}return c}o(Pl,"baseSet");var bw=Dp?function(c,u){return Dp.set(c,u),c}:Vn,aj=Ap?function(c,u){return Ap(c,"toString",{configurable:!0,enumerable:!1,value:d3(u),writable:!0})}:Vn;function cj(c){return Hp(qu(c))}o(cj,"baseShuffle");function qi(c,u,m){var S=-1,N=c.length;u<0&&(u=-u>N?0:N+u),m=m>N?N:m,m<0&&(m+=N),N=u>m?0:m-u>>>0,u>>>=0;for(var K=_e(N);++S<N;)K[S]=c[S+u];return K}o(qi,"baseSlice");function fj(c,u){var m;return Sa(c,function(S,N,K){return m=u(S,N,K),!m}),!!m}o(fj,"baseSome");function Fp(c,u,m){var S=0,N=c==null?S:c.length;if(typeof u=="number"&&u===u&&N<=O){for(;S<N;){var K=S+N>>>1,ne=c[K];ne!==null&&!fi(ne)&&(m?ne<=u:ne<u)?S=K+1:N=K}return N}return U2(c,u,Vn,m)}o(Fp,"baseSortedIndex");function U2(c,u,m,S){var N=0,K=c==null?0:c.length;if(K===0)return 0;u=m(u);for(var ne=u!==u,fe=u===null,be=fi(u),Se=u===t;N<K;){var Te=Ip((N+K)/2),Re=m(c[Te]),Ue=Re!==t,Ke=Re===null,nt=Re===Re,Dt=fi(Re);if(ne)var it=S||nt;else Se?it=nt&&(S||Ue):fe?it=nt&&Ue&&(S||!Ke):be?it=nt&&Ue&&!Ke&&(S||!Dt):Ke||Dt?it=!1:it=S?Re<=u:Re<u;it?N=Te+1:K=Te}return gn(K,k)}o(U2,"baseSortedIndexBy");function vw(c,u){for(var m=-1,S=c.length,N=0,K=[];++m<S;){var ne=c[m],fe=u?u(ne):ne;if(!m||!po(fe,be)){var be=fe;K[N++]=ne===0?0:ne}}return K}o(vw,"baseSortedUniq");function yw(c){return typeof c=="number"?c:fi(c)?A:+c}o(yw,"baseToNumber");function ci(c){if(typeof c=="string")return c;if(_t(c))return hr(c,ci)+"";if(fi(c))return X5?X5.call(c):"";var u=c+"";return u=="0"&&1/c==-b?"-0":u}o(ci,"baseToString");function Ta(c,u,m){var S=-1,N=hp,K=c.length,ne=!0,fe=[],be=fe;if(m)ne=!1,N=p2;else if(K>=r){var Se=u?null:xj(c);if(Se)return mp(Se);ne=!1,N=Cl,be=new Wc}else be=u?[]:fe;e:for(;++S<K;){var Te=c[S],Re=u?u(Te):Te;if(Te=m||Te!==0?Te:0,ne&&Re===Re){for(var Ue=be.length;Ue--;)if(be[Ue]===Re)continue e;u&&be.push(Re),fe.push(Te)}else N(be,Re,m)||(be!==fe&&be.push(Re),fe.push(Te))}return fe}o(Ta,"baseUniq");function q2(c,u){return u=ka(u,c),c=Gw(c,u),c==null||delete c[Yo($i(u))]}o(q2,"baseUnset");function xw(c,u,m,S){return Pl(c,u,m(Jc(c,u)),S)}o(xw,"baseUpdate");function Pp(c,u,m,S){for(var N=c.length,K=S?N:-1;(S?K--:++K<N)&&u(c[K],K,c););return m?qi(c,S?0:K,S?K+1:N):qi(c,S?K+1:0,S?N:K)}o(Pp,"baseWhile");function ww(c,u){var m=c;return m instanceof Nt&&(m=m.value()),m2(u,function(S,N){return N.func.apply(N.thisArg,Aa([S],N.args))},m)}o(ww,"baseWrapperValue");function $2(c,u,m){var S=c.length;if(S<2)return S?Ta(c[0]):[];for(var N=-1,K=_e(S);++N<S;)for(var ne=c[N],fe=-1;++fe<S;)fe!=N&&(K[N]=Rl(K[N]||ne,c[fe],u,m));return Ta(tn(K,1),u,m)}o($2,"baseXor");function _w(c,u,m){for(var S=-1,N=c.length,K=u.length,ne={};++S<N;){var fe=S<K?u[S]:t;m(ne,c[S],fe)}return ne}o(_w,"baseZipObject");function j2(c){return Sr(c)?c:[]}o(j2,"castArrayLikeObject");function H2(c){return typeof c=="function"?c:Vn}o(H2,"castFunction");function ka(c,u){return _t(c)?c:Z2(c,u)?[c]:Xw(Jt(c))}o(ka,"castPath");var uj=kt;function Ma(c,u,m){var S=c.length;return m=m===t?S:m,!u&&m>=S?c:qi(c,u,m)}o(Ma,"castSlice");var Ew=Xq||function(c){return $r.clearTimeout(c)};function Aw(c,u){if(u)return c.slice();var m=c.length,S=z5?z5(m):new c.constructor(m);return c.copy(S),S}o(Aw,"cloneBuffer");function V2(c){var u=new c.constructor(c.byteLength);return new wp(u).set(new wp(c)),u}o(V2,"cloneArrayBuffer");function dj(c,u){var m=u?V2(c.buffer):c.buffer;return new c.constructor(m,c.byteOffset,c.byteLength)}o(dj,"cloneDataView");function lj(c){var u=new c.constructor(c.source,st.exec(c));return u.lastIndex=c.lastIndex,u}o(lj,"cloneRegExp");function hj(c){return kl?or(kl.call(c)):{}}o(hj,"cloneSymbol");function Cw(c,u){var m=u?V2(c.buffer):c.buffer;return new c.constructor(m,c.byteOffset,c.length)}o(Cw,"cloneTypedArray");function Iw(c,u){if(c!==u){var m=c!==t,S=c===null,N=c===c,K=fi(c),ne=u!==t,fe=u===null,be=u===u,Se=fi(u);if(!fe&&!Se&&!K&&c>u||K&&ne&&be&&!fe&&!Se||S&&ne&&be||!m&&be||!N)return 1;if(!S&&!K&&!Se&&c<u||Se&&m&&N&&!S&&!K||fe&&m&&N||!ne&&N||!be)return-1}return 0}o(Iw,"compareAscending");function pj(c,u,m){for(var S=-1,N=c.criteria,K=u.criteria,ne=N.length,fe=m.length;++S<ne;){var be=Iw(N[S],K[S]);if(be){if(S>=fe)return be;var Se=m[S];return be*(Se=="desc"?-1:1)}}return c.index-u.index}o(pj,"compareMultiple");function Dw(c,u,m,S){for(var N=-1,K=c.length,ne=m.length,fe=-1,be=u.length,Se=Nr(K-ne,0),Te=_e(be+Se),Re=!S;++fe<be;)Te[fe]=u[fe];for(;++N<ne;)(Re||N<K)&&(Te[m[N]]=c[N]);for(;Se--;)Te[fe++]=c[N++];return Te}o(Dw,"composeArgs");function Sw(c,u,m,S){for(var N=-1,K=c.length,ne=-1,fe=m.length,be=-1,Se=u.length,Te=Nr(K-fe,0),Re=_e(Te+Se),Ue=!S;++N<Te;)Re[N]=c[N];for(var Ke=N;++be<Se;)Re[Ke+be]=u[be];for(;++ne<fe;)(Ue||N<K)&&(Re[Ke+m[ne]]=c[N++]);return Re}o(Sw,"composeArgsRight");function $n(c,u){var m=-1,S=c.length;for(u||(u=_e(S));++m<S;)u[m]=c[m];return u}o($n,"copyArray");function Wo(c,u,m,S){var N=!m;m||(m={});for(var K=-1,ne=u.length;++K<ne;){var fe=u[K],be=S?S(m[fe],c[fe],fe,m,c):t;be===t&&(be=c[fe]),N?Os(m,fe,be):Ml(m,fe,be)}return m}o(Wo,"copyObject");function mj(c,u){return Wo(c,X2(c),u)}o(mj,"copySymbols");function gj(c,u){return Wo(c,$w(c),u)}o(gj,"copySymbolsIn");function Op(c,u){return function(m,S){var N=_t(m)?wq:L$,K=u?u():{};return N(m,c,Qe(S,2),K)}}o(Op,"createAggregator");function Ou(c){return kt(function(u,m){var S=-1,N=m.length,K=N>1?m[N-1]:t,ne=N>2?m[2]:t;for(K=c.length>3&&typeof K=="function"?(N--,K):t,ne&&Mn(m[0],m[1],ne)&&(K=N<3?t:K,N=1),u=or(u);++S<N;){var fe=m[S];fe&&c(u,fe,S,K)}return u})}o(Ou,"createAssigner");function Tw(c,u){return function(m,S){if(m==null)return m;if(!jn(m))return c(m,S);for(var N=m.length,K=u?N:-1,ne=or(m);(u?K--:++K<N)&&S(ne[K],K,ne)!==!1;);return m}}o(Tw,"createBaseEach");function kw(c){return function(u,m,S){for(var N=-1,K=or(u),ne=S(u),fe=ne.length;fe--;){var be=ne[c?fe:++N];if(m(K[be],be,K)===!1)break}return u}}o(kw,"createBaseFor");function bj(c,u,m){var S=u&D,N=Ol(c);function K(){var ne=this&&this!==$r&&this instanceof K?N:c;return ne.apply(S?m:this,arguments)}return o(K,"wrapper"),K}o(bj,"createBind");function Mw(c){return function(u){u=Jt(u);var m=ku(u)?lo(u):t,S=m?m[0]:u.charAt(0),N=m?Ma(m,1).join(""):u.slice(1);return S[c]()+N}}o(Mw,"createCaseFirst");function Nu(c){return function(u){return m2(T7(S7(u).replace(aq,"")),c,"")}}o(Nu,"createCompounder");function Ol(c){return function(){var u=arguments;switch(u.length){case 0:return new c;case 1:return new c(u[0]);case 2:return new c(u[0],u[1]);case 3:return new c(u[0],u[1],u[2]);case 4:return new c(u[0],u[1],u[2],u[3]);case 5:return new c(u[0],u[1],u[2],u[3],u[4]);case 6:return new c(u[0],u[1],u[2],u[3],u[4],u[5]);case 7:return new c(u[0],u[1],u[2],u[3],u[4],u[5],u[6])}var m=Pu(c.prototype),S=c.apply(m,u);return mr(S)?S:m}}o(Ol,"createCtor");function vj(c,u,m){var S=Ol(c);function N(){for(var K=arguments.length,ne=_e(K),fe=K,be=Lu(N);fe--;)ne[fe]=arguments[fe];var Se=K<3&&ne[0]!==be&&ne[K-1]!==be?[]:Ca(ne,be);if(K-=Se.length,K<m)return Ow(c,u,Np,N.placeholder,t,ne,Se,t,t,m-K);var Te=this&&this!==$r&&this instanceof N?S:c;return si(Te,this,ne)}return o(N,"wrapper"),N}o(vj,"createCurry");function Rw(c){return function(u,m,S){var N=or(u);if(!jn(u)){var K=Qe(m,3);u=jr(u),m=o(function(fe){return K(N[fe],fe,N)},"predicate")}var ne=c(u,m,S);return ne>-1?N[K?u[ne]:ne]:t}}o(Rw,"createFind");function Bw(c){return Ls(function(u){var m=u.length,S=m,N=Li.prototype.thru;for(c&&u.reverse();S--;){var K=u[S];if(typeof K!="function")throw new Ni(i);if(N&&!ne&&$p(K)=="wrapper")var ne=new Li([],!0)}for(S=ne?S:m;++S<m;){K=u[S];var fe=$p(K),be=fe=="wrapper"?Y2(K):t;be&&Q2(be[0])&&be[1]==(re|F|X|z)&&!be[4].length&&be[9]==1?ne=ne[$p(be[0])].apply(ne,be[3]):ne=K.length==1&&Q2(K)?ne[fe]():ne.thru(K)}return function(){var Se=arguments,Te=Se[0];if(ne&&Se.length==1&&_t(Te))return ne.plant(Te).value();for(var Re=0,Ue=m?u[Re].apply(this,Se):Te;++Re<m;)Ue=u[Re].call(this,Ue);return Ue}})}o(Bw,"createFlow");function Np(c,u,m,S,N,K,ne,fe,be,Se){var Te=u&re,Re=u&D,Ue=u&R,Ke=u&(F|V),nt=u&$,Dt=Ue?t:Ol(c);function it(){for(var Bt=arguments.length,Lt=_e(Bt),ui=Bt;ui--;)Lt[ui]=arguments[ui];if(Ke)var Rn=Lu(it),di=kq(Lt,Rn);if(S&&(Lt=Dw(Lt,S,N,Ke)),K&&(Lt=Sw(Lt,K,ne,Ke)),Bt-=di,Ke&&Bt<Se){var Tr=Ca(Lt,Rn);return Ow(c,u,Np,it.placeholder,m,Lt,Tr,fe,be,Se-Bt)}var mo=Re?m:this,js=Ue?mo[c]:c;return Bt=Lt.length,fe?Lt=Lj(Lt,fe):nt&&Bt>1&&Lt.reverse(),Te&&be<Bt&&(Lt.length=be),this&&this!==$r&&this instanceof it&&(js=Dt||Ol(js)),js.apply(mo,Lt)}return o(it,"wrapper"),it}o(Np,"createHybrid");function Fw(c,u){return function(m,S){return K$(m,c,u(S),{})}}o(Fw,"createInverter");function Lp(c,u){return function(m,S){var N;if(m===t&&S===t)return u;if(m!==t&&(N=m),S!==t){if(N===t)return S;typeof m=="string"||typeof S=="string"?(m=ci(m),S=ci(S)):(m=yw(m),S=yw(S)),N=c(m,S)}return N}}o(Lp,"createMathOperation");function z2(c){return Ls(function(u){return u=hr(u,ai(Qe())),kt(function(m){var S=this;return c(u,function(N){return si(N,S,m)})})})}o(z2,"createOver");function Up(c,u){u=u===t?" ":ci(u);var m=u.length;if(m<2)return m?L2(u,c):u;var S=L2(u,Cp(c/Mu(u)));return ku(u)?Ma(lo(S),0,c).join(""):S.slice(0,c)}o(Up,"createPadding");function yj(c,u,m,S){var N=u&D,K=Ol(c);function ne(){for(var fe=-1,be=arguments.length,Se=-1,Te=S.length,Re=_e(Te+be),Ue=this&&this!==$r&&this instanceof ne?K:c;++Se<Te;)Re[Se]=S[Se];for(;be--;)Re[Se++]=arguments[++fe];return si(Ue,N?m:this,Re)}return o(ne,"wrapper"),ne}o(yj,"createPartial");function Pw(c){return function(u,m,S){return S&&typeof S!="number"&&Mn(u,m,S)&&(m=S=t),u=$s(u),m===t?(m=u,u=0):m=$s(m),S=S===t?u<m?1:-1:$s(S),ij(u,m,S,c)}}o(Pw,"createRange");function qp(c){return function(u,m){return typeof u=="string"&&typeof m=="string"||(u=ji(u),m=ji(m)),c(u,m)}}o(qp,"createRelationalOperation");function Ow(c,u,m,S,N,K,ne,fe,be,Se){var Te=u&F,Re=Te?ne:t,Ue=Te?t:ne,Ke=Te?K:t,nt=Te?t:K;u|=Te?X:J,u&=~(Te?J:X),u&H||(u&=~(D|R));var Dt=[c,u,N,Ke,Re,nt,Ue,fe,be,Se],it=m.apply(t,Dt);return Q2(c)&&Ww(it,Dt),it.placeholder=S,Yw(it,c,u)}o(Ow,"createRecurry");function K2(c){var u=Or[c];return function(m,S){if(m=ji(m),S=S==null?0:gn(Ct(S),292),S&&Y5(m)){var N=(Jt(m)+"e").split("e"),K=u(N[0]+"e"+(+N[1]+S));return N=(Jt(K)+"e").split("e"),+(N[0]+"e"+(+N[1]-S))}return u(m)}}o(K2,"createRound");var xj=Bu&&1/mp(new Bu([,-0]))[1]==b?function(c){return new Bu(c)}:p3;function Nw(c){return function(u){var m=bn(u);return m==ce?_2(u):m==W?Nq(u):Tq(u,c(u))}}o(Nw,"createToPairs");function Ns(c,u,m,S,N,K,ne,fe){var be=u&R;if(!be&&typeof c!="function")throw new Ni(i);var Se=S?S.length:0;if(Se||(u&=~(X|J),S=N=t),ne=ne===t?ne:Nr(Ct(ne),0),fe=fe===t?fe:Ct(fe),Se-=N?N.length:0,u&J){var Te=S,Re=N;S=N=t}var Ue=be?t:Y2(c),Ke=[c,u,m,S,N,Te,Re,K,ne,fe];if(Ue&&Pj(Ke,Ue),c=Ke[0],u=Ke[1],m=Ke[2],S=Ke[3],N=Ke[4],fe=Ke[9]=Ke[9]===t?be?0:c.length:Nr(Ke[9]-Se,0),!fe&&u&(F|V)&&(u&=~(F|V)),!u||u==D)var nt=bj(c,u,m);else u==F||u==V?nt=vj(c,u,fe):(u==X||u==(D|X))&&!N.length?nt=yj(c,u,m,S):nt=Np.apply(t,Ke);var Dt=Ue?bw:Ww;return Yw(Dt(nt,Ke),c,u)}o(Ns,"createWrap");function Lw(c,u,m,S){return c===t||po(c,Ru[m])&&!Qt.call(S,m)?u:c}o(Lw,"customDefaultsAssignIn");function Uw(c,u,m,S,N,K){return mr(c)&&mr(u)&&(K.set(u,c),Bp(c,u,t,Uw,K),K.delete(u)),c}o(Uw,"customDefaultsMerge");function wj(c){return Ul(c)?t:c}o(wj,"customOmitClone");function qw(c,u,m,S,N,K){var ne=m&I,fe=c.length,be=u.length;if(fe!=be&&!(ne&&be>fe))return!1;var Se=K.get(c),Te=K.get(u);if(Se&&Te)return Se==u&&Te==c;var Re=-1,Ue=!0,Ke=m&T?new Wc:t;for(K.set(c,u),K.set(u,c);++Re<fe;){var nt=c[Re],Dt=u[Re];if(S)var it=ne?S(Dt,nt,Re,u,c,K):S(nt,Dt,Re,c,u,K);if(it!==t){if(it)continue;Ue=!1;break}if(Ke){if(!g2(u,function(Bt,Lt){if(!Cl(Ke,Lt)&&(nt===Bt||N(nt,Bt,m,S,K)))return Ke.push(Lt)})){Ue=!1;break}}else if(!(nt===Dt||N(nt,Dt,m,S,K))){Ue=!1;break}}return K.delete(c),K.delete(u),Ue}o(qw,"equalArrays");function _j(c,u,m,S,N,K,ne){switch(m){case de:if(c.byteLength!=u.byteLength||c.byteOffset!=u.byteOffset)return!1;c=c.buffer,u=u.buffer;case Dr:return!(c.byteLength!=u.byteLength||!K(new wp(c),new wp(u)));case ee:case ae:case Ce:return po(+c,+u);case U:return c.name==u.name&&c.message==u.message;case ye:case me:return c==u+"";case ce:var fe=_2;case W:var be=S&I;if(fe||(fe=mp),c.size!=u.size&&!be)return!1;var Se=ne.get(c);if(Se)return Se==u;S|=T,ne.set(c,u);var Te=qw(fe(c),fe(u),S,N,K,ne);return ne.delete(c),Te;case ke:if(kl)return kl.call(c)==kl.call(u)}return!1}o(_j,"equalByTag");function Ej(c,u,m,S,N,K){var ne=m&I,fe=G2(c),be=fe.length,Se=G2(u),Te=Se.length;if(be!=Te&&!ne)return!1;for(var Re=be;Re--;){var Ue=fe[Re];if(!(ne?Ue in u:Qt.call(u,Ue)))return!1}var Ke=K.get(c),nt=K.get(u);if(Ke&&nt)return Ke==u&&nt==c;var Dt=!0;K.set(c,u),K.set(u,c);for(var it=ne;++Re<be;){Ue=fe[Re];var Bt=c[Ue],Lt=u[Ue];if(S)var ui=ne?S(Lt,Bt,Ue,u,c,K):S(Bt,Lt,Ue,c,u,K);if(!(ui===t?Bt===Lt||N(Bt,Lt,m,S,K):ui)){Dt=!1;break}it||(it=Ue=="constructor")}if(Dt&&!it){var Rn=c.constructor,di=u.constructor;Rn!=di&&"constructor"in c&&"constructor"in u&&!(typeof Rn=="function"&&Rn instanceof Rn&&typeof di=="function"&&di instanceof di)&&(Dt=!1)}return K.delete(c),K.delete(u),Dt}o(Ej,"equalObjects");function Ls(c){return t3(Kw(c,t,t7),c+"")}o(Ls,"flatRest");function G2(c){return sw(c,jr,X2)}o(G2,"getAllKeys");function W2(c){return sw(c,Hn,$w)}o(W2,"getAllKeysIn");var Y2=Dp?function(c){return Dp.get(c)}:p3;function $p(c){for(var u=c.name+"",m=Fu[u],S=Qt.call(Fu,u)?m.length:0;S--;){var N=m[S],K=N.func;if(K==null||K==c)return N.name}return u}o($p,"getFuncName");function Lu(c){var u=Qt.call(j,"placeholder")?j:c;return u.placeholder}o(Lu,"getHolder");function Qe(){var c=j.iteratee||l3;return c=c===l3?fw:c,arguments.length?c(arguments[0],arguments[1]):c}o(Qe,"getIteratee");function jp(c,u){var m=c.__data__;return Mj(u)?m[typeof u=="string"?"string":"hash"]:m.map}o(jp,"getMapData");function J2(c){for(var u=jr(c),m=u.length;m--;){var S=u[m],N=c[S];u[m]=[S,N,Vw(N)]}return u}o(J2,"getMatchData");function Xc(c,u){var m=Fq(c,u);return cw(m)?m:t}o(Xc,"getNative");function Aj(c){var u=Qt.call(c,Kc),m=c[Kc];try{c[Kc]=t;var S=!0}catch{}var N=yp.call(c);return S&&(u?c[Kc]=m:delete c[Kc]),N}o(Aj,"getRawTag");var X2=A2?function(c){return c==null?[]:(c=or(c),Ea(A2(c),function(u){return G5.call(c,u)}))}:m3,$w=A2?function(c){for(var u=[];c;)Aa(u,X2(c)),c=_p(c);return u}:m3,bn=kn;(C2&&bn(new C2(new ArrayBuffer(1)))!=de||Dl&&bn(new Dl)!=ce||I2&&bn(I2.resolve())!=De||Bu&&bn(new Bu)!=W||Sl&&bn(new Sl)!=Oe)&&(bn=o(function(c){var u=kn(c),m=u==ie?c.constructor:t,S=m?Zc(m):"";if(S)switch(S){case s$:return de;case a$:return ce;case c$:return De;case f$:return W;case u$:return Oe}return u},"getTag"));function Cj(c,u,m){for(var S=-1,N=m.length;++S<N;){var K=m[S],ne=K.size;switch(K.type){case"drop":c+=ne;break;case"dropRight":u-=ne;break;case"take":u=gn(u,c+ne);break;case"takeRight":c=Nr(c,u-ne);break}}return{start:c,end:u}}o(Cj,"getView");function Ij(c){var u=c.match(pt);return u?u[1].split(Ri):[]}o(Ij,"getWrapDetails");function jw(c,u,m){u=ka(u,c);for(var S=-1,N=u.length,K=!1;++S<N;){var ne=Yo(u[S]);if(!(K=c!=null&&m(c,ne)))break;c=c[ne]}return K||++S!=N?K:(N=c==null?0:c.length,!!N&&Yp(N)&&Us(ne,N)&&(_t(c)||Qc(c)))}o(jw,"hasPath");function Dj(c){var u=c.length,m=new c.constructor(u);return u&&typeof c[0]=="string"&&Qt.call(c,"index")&&(m.index=c.index,m.input=c.input),m}o(Dj,"initCloneArray");function Hw(c){return typeof c.constructor=="function"&&!Nl(c)?Pu(_p(c)):{}}o(Hw,"initCloneObject");function Sj(c,u,m){var S=c.constructor;switch(u){case Dr:return V2(c);case ee:case ae:return new S(+c);case de:return dj(c,m);case se:case L:case Z:case ge:case we:case Ee:case Me:case Ot:case $e:return Cw(c,m);case ce:return new S;case Ce:case me:return new S(c);case ye:return lj(c);case W:return new S;case ke:return hj(c)}}o(Sj,"initCloneByTag");function Tj(c,u){var m=u.length;if(!m)return c;var S=m-1;return u[S]=(m>1?"& ":"")+u[S],u=u.join(m>2?", ":" "),c.replace(ht,`{
|
2
|
-
/* [wrapped with `+u+`] */
|
3
|
-
`)}o(Tj,"insertWrapDetails");function kj(c){return _t(c)||Qc(c)||!!(W5&&c&&c[W5])}o(kj,"isFlattenable");function Us(c,u){var m=typeof c;return u=u??E,!!u&&(m=="number"||m!="symbol"&&Ln.test(c))&&c>-1&&c%1==0&&c<u}o(Us,"isIndex");function Mn(c,u,m){if(!mr(m))return!1;var S=typeof u;return(S=="number"?jn(m)&&Us(u,m.length):S=="string"&&u in m)?po(m[u],c):!1}o(Mn,"isIterateeCall");function Z2(c,u){if(_t(c))return!1;var m=typeof c;return m=="number"||m=="symbol"||m=="boolean"||c==null||fi(c)?!0:ut.test(c)||!ki.test(c)||u!=null&&c in or(u)}o(Z2,"isKey");function Mj(c){var u=typeof c;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?c!=="__proto__":c===null}o(Mj,"isKeyable");function Q2(c){var u=$p(c),m=j[u];if(typeof m!="function"||!(u in Nt.prototype))return!1;if(c===m)return!0;var S=Y2(m);return!!S&&c===S[0]}o(Q2,"isLaziable");function Rj(c){return!!V5&&V5 in c}o(Rj,"isMasked");var Bj=bp?qs:g3;function Nl(c){var u=c&&c.constructor,m=typeof u=="function"&&u.prototype||Ru;return c===m}o(Nl,"isPrototype");function Vw(c){return c===c&&!mr(c)}o(Vw,"isStrictComparable");function zw(c,u){return function(m){return m==null?!1:m[c]===u&&(u!==t||c in or(m))}}o(zw,"matchesStrictComparable");function Fj(c){var u=Gp(c,function(S){return m.size===f&&m.clear(),S}),m=u.cache;return u}o(Fj,"memoizeCapped");function Pj(c,u){var m=c[1],S=u[1],N=m|S,K=N<(D|R|re),ne=S==re&&m==F||S==re&&m==z&&c[7].length<=u[8]||S==(re|z)&&u[7].length<=u[8]&&m==F;if(!(K||ne))return c;S&D&&(c[2]=u[2],N|=m&D?0:H);var fe=u[3];if(fe){var be=c[3];c[3]=be?Dw(be,fe,u[4]):fe,c[4]=be?Ca(c[3],d):u[4]}return fe=u[5],fe&&(be=c[5],c[5]=be?Sw(be,fe,u[6]):fe,c[6]=be?Ca(c[5],d):u[6]),fe=u[7],fe&&(c[7]=fe),S&re&&(c[8]=c[8]==null?u[8]:gn(c[8],u[8])),c[9]==null&&(c[9]=u[9]),c[0]=u[0],c[1]=N,c}o(Pj,"mergeData");function Oj(c){var u=[];if(c!=null)for(var m in or(c))u.push(m);return u}o(Oj,"nativeKeysIn");function Nj(c){return yp.call(c)}o(Nj,"objectToString");function Kw(c,u,m){return u=Nr(u===t?c.length-1:u,0),function(){for(var S=arguments,N=-1,K=Nr(S.length-u,0),ne=_e(K);++N<K;)ne[N]=S[u+N];N=-1;for(var fe=_e(u+1);++N<u;)fe[N]=S[N];return fe[u]=m(ne),si(c,this,fe)}}o(Kw,"overRest");function Gw(c,u){return u.length<2?c:Jc(c,qi(u,0,-1))}o(Gw,"parent");function Lj(c,u){for(var m=c.length,S=gn(u.length,m),N=$n(c);S--;){var K=u[S];c[S]=Us(K,m)?N[K]:t}return c}o(Lj,"reorder");function e3(c,u){if(!(u==="constructor"&&typeof c[u]=="function")&&u!="__proto__")return c[u]}o(e3,"safeGet");var Ww=Jw(bw),Ll=Qq||function(c,u){return $r.setTimeout(c,u)},t3=Jw(aj);function Yw(c,u,m){var S=u+"";return t3(c,Tj(S,Uj(Ij(S),m)))}o(Yw,"setWrapToString");function Jw(c){var u=0,m=0;return function(){var S=n$(),N=g-(S-m);if(m=S,N>0){if(++u>=P)return arguments[0]}else u=0;return c.apply(t,arguments)}}o(Jw,"shortOut");function Hp(c,u){var m=-1,S=c.length,N=S-1;for(u=u===t?S:u;++m<u;){var K=N2(m,N),ne=c[K];c[K]=c[m],c[m]=ne}return c.length=u,c}o(Hp,"shuffleSelf");var Xw=Fj(function(c){var u=[];return c.charCodeAt(0)===46&&u.push(""),c.replace(dt,function(m,S,N,K){u.push(N?K.replace(Bi,"$1"):S||m)}),u});function Yo(c){if(typeof c=="string"||fi(c))return c;var u=c+"";return u=="0"&&1/c==-b?"-0":u}o(Yo,"toKey");function Zc(c){if(c!=null){try{return vp.call(c)}catch{}try{return c+""}catch{}}return""}o(Zc,"toSource");function Uj(c,u){return Oi(w,function(m){var S="_."+m[0];u&m[1]&&!hp(c,S)&&c.push(S)}),c.sort()}o(Uj,"updateWrapDetails");function Zw(c){if(c instanceof Nt)return c.clone();var u=new Li(c.__wrapped__,c.__chain__);return u.__actions__=$n(c.__actions__),u.__index__=c.__index__,u.__values__=c.__values__,u}o(Zw,"wrapperClone");function qj(c,u,m){(m?Mn(c,u,m):u===t)?u=1:u=Nr(Ct(u),0);var S=c==null?0:c.length;if(!S||u<1)return[];for(var N=0,K=0,ne=_e(Cp(S/u));N<S;)ne[K++]=qi(c,N,N+=u);return ne}o(qj,"chunk");function $j(c){for(var u=-1,m=c==null?0:c.length,S=0,N=[];++u<m;){var K=c[u];K&&(N[S++]=K)}return N}o($j,"compact");function jj(){var c=arguments.length;if(!c)return[];for(var u=_e(c-1),m=arguments[0],S=c;S--;)u[S-1]=arguments[S];return Aa(_t(m)?$n(m):[m],tn(u,1))}o(jj,"concat");var Hj=kt(function(c,u){return Sr(c)?Rl(c,tn(u,1,Sr,!0)):[]}),Vj=kt(function(c,u){var m=$i(u);return Sr(m)&&(m=t),Sr(c)?Rl(c,tn(u,1,Sr,!0),Qe(m,2)):[]}),zj=kt(function(c,u){var m=$i(u);return Sr(m)&&(m=t),Sr(c)?Rl(c,tn(u,1,Sr,!0),t,m):[]});function Kj(c,u,m){var S=c==null?0:c.length;return S?(u=m||u===t?1:Ct(u),qi(c,u<0?0:u,S)):[]}o(Kj,"drop");function Gj(c,u,m){var S=c==null?0:c.length;return S?(u=m||u===t?1:Ct(u),u=S-u,qi(c,0,u<0?0:u)):[]}o(Gj,"dropRight");function Wj(c,u){return c&&c.length?Pp(c,Qe(u,3),!0,!0):[]}o(Wj,"dropRightWhile");function Yj(c,u){return c&&c.length?Pp(c,Qe(u,3),!0):[]}o(Yj,"dropWhile");function Jj(c,u,m,S){var N=c==null?0:c.length;return N?(m&&typeof m!="number"&&Mn(c,u,m)&&(m=0,S=N),j$(c,u,m,S)):[]}o(Jj,"fill");function Qw(c,u,m){var S=c==null?0:c.length;if(!S)return-1;var N=m==null?0:Ct(m);return N<0&&(N=Nr(S+N,0)),pp(c,Qe(u,3),N)}o(Qw,"findIndex");function e7(c,u,m){var S=c==null?0:c.length;if(!S)return-1;var N=S-1;return m!==t&&(N=Ct(m),N=m<0?Nr(S+N,0):gn(N,S-1)),pp(c,Qe(u,3),N,!0)}o(e7,"findLastIndex");function t7(c){var u=c==null?0:c.length;return u?tn(c,1):[]}o(t7,"flatten");function Xj(c){var u=c==null?0:c.length;return u?tn(c,b):[]}o(Xj,"flattenDeep");function Zj(c,u){var m=c==null?0:c.length;return m?(u=u===t?1:Ct(u),tn(c,u)):[]}o(Zj,"flattenDepth");function Qj(c){for(var u=-1,m=c==null?0:c.length,S={};++u<m;){var N=c[u];S[N[0]]=N[1]}return S}o(Qj,"fromPairs");function r7(c){return c&&c.length?c[0]:t}o(r7,"head");function eH(c,u,m){var S=c==null?0:c.length;if(!S)return-1;var N=m==null?0:Ct(m);return N<0&&(N=Nr(S+N,0)),Tu(c,u,N)}o(eH,"indexOf");function tH(c){var u=c==null?0:c.length;return u?qi(c,0,-1):[]}o(tH,"initial");var rH=kt(function(c){var u=hr(c,j2);return u.length&&u[0]===c[0]?R2(u):[]}),nH=kt(function(c){var u=$i(c),m=hr(c,j2);return u===$i(m)?u=t:m.pop(),m.length&&m[0]===c[0]?R2(m,Qe(u,2)):[]}),iH=kt(function(c){var u=$i(c),m=hr(c,j2);return u=typeof u=="function"?u:t,u&&m.pop(),m.length&&m[0]===c[0]?R2(m,t,u):[]});function oH(c,u){return c==null?"":t$.call(c,u)}o(oH,"join");function $i(c){var u=c==null?0:c.length;return u?c[u-1]:t}o($i,"last");function sH(c,u,m){var S=c==null?0:c.length;if(!S)return-1;var N=S;return m!==t&&(N=Ct(m),N=N<0?Nr(S+N,0):gn(N,S-1)),u===u?Uq(c,u,N):pp(c,O5,N,!0)}o(sH,"lastIndexOf");function aH(c,u){return c&&c.length?hw(c,Ct(u)):t}o(aH,"nth");var cH=kt(n7);function n7(c,u){return c&&c.length&&u&&u.length?O2(c,u):c}o(n7,"pullAll");function fH(c,u,m){return c&&c.length&&u&&u.length?O2(c,u,Qe(m,2)):c}o(fH,"pullAllBy");function uH(c,u,m){return c&&c.length&&u&&u.length?O2(c,u,t,m):c}o(uH,"pullAllWith");var dH=Ls(function(c,u){var m=c==null?0:c.length,S=S2(c,u);return gw(c,hr(u,function(N){return Us(N,m)?+N:N}).sort(Iw)),S});function lH(c,u){var m=[];if(!(c&&c.length))return m;var S=-1,N=[],K=c.length;for(u=Qe(u,3);++S<K;){var ne=c[S];u(ne,S,c)&&(m.push(ne),N.push(S))}return gw(c,N),m}o(lH,"remove");function r3(c){return c==null?c:o$.call(c)}o(r3,"reverse");function hH(c,u,m){var S=c==null?0:c.length;return S?(m&&typeof m!="number"&&Mn(c,u,m)?(u=0,m=S):(u=u==null?0:Ct(u),m=m===t?S:Ct(m)),qi(c,u,m)):[]}o(hH,"slice");function pH(c,u){return Fp(c,u)}o(pH,"sortedIndex");function mH(c,u,m){return U2(c,u,Qe(m,2))}o(mH,"sortedIndexBy");function gH(c,u){var m=c==null?0:c.length;if(m){var S=Fp(c,u);if(S<m&&po(c[S],u))return S}return-1}o(gH,"sortedIndexOf");function bH(c,u){return Fp(c,u,!0)}o(bH,"sortedLastIndex");function vH(c,u,m){return U2(c,u,Qe(m,2),!0)}o(vH,"sortedLastIndexBy");function yH(c,u){var m=c==null?0:c.length;if(m){var S=Fp(c,u,!0)-1;if(po(c[S],u))return S}return-1}o(yH,"sortedLastIndexOf");function xH(c){return c&&c.length?vw(c):[]}o(xH,"sortedUniq");function wH(c,u){return c&&c.length?vw(c,Qe(u,2)):[]}o(wH,"sortedUniqBy");function _H(c){var u=c==null?0:c.length;return u?qi(c,1,u):[]}o(_H,"tail");function EH(c,u,m){return c&&c.length?(u=m||u===t?1:Ct(u),qi(c,0,u<0?0:u)):[]}o(EH,"take");function AH(c,u,m){var S=c==null?0:c.length;return S?(u=m||u===t?1:Ct(u),u=S-u,qi(c,u<0?0:u,S)):[]}o(AH,"takeRight");function CH(c,u){return c&&c.length?Pp(c,Qe(u,3),!1,!0):[]}o(CH,"takeRightWhile");function IH(c,u){return c&&c.length?Pp(c,Qe(u,3)):[]}o(IH,"takeWhile");var DH=kt(function(c){return Ta(tn(c,1,Sr,!0))}),SH=kt(function(c){var u=$i(c);return Sr(u)&&(u=t),Ta(tn(c,1,Sr,!0),Qe(u,2))}),TH=kt(function(c){var u=$i(c);return u=typeof u=="function"?u:t,Ta(tn(c,1,Sr,!0),t,u)});function kH(c){return c&&c.length?Ta(c):[]}o(kH,"uniq");function MH(c,u){return c&&c.length?Ta(c,Qe(u,2)):[]}o(MH,"uniqBy");function RH(c,u){return u=typeof u=="function"?u:t,c&&c.length?Ta(c,t,u):[]}o(RH,"uniqWith");function n3(c){if(!(c&&c.length))return[];var u=0;return c=Ea(c,function(m){if(Sr(m))return u=Nr(m.length,u),!0}),x2(u,function(m){return hr(c,b2(m))})}o(n3,"unzip");function i7(c,u){if(!(c&&c.length))return[];var m=n3(c);return u==null?m:hr(m,function(S){return si(u,t,S)})}o(i7,"unzipWith");var BH=kt(function(c,u){return Sr(c)?Rl(c,u):[]}),FH=kt(function(c){return $2(Ea(c,Sr))}),PH=kt(function(c){var u=$i(c);return Sr(u)&&(u=t),$2(Ea(c,Sr),Qe(u,2))}),OH=kt(function(c){var u=$i(c);return u=typeof u=="function"?u:t,$2(Ea(c,Sr),t,u)}),NH=kt(n3);function LH(c,u){return _w(c||[],u||[],Ml)}o(LH,"zipObject");function UH(c,u){return _w(c||[],u||[],Pl)}o(UH,"zipObjectDeep");var qH=kt(function(c){var u=c.length,m=u>1?c[u-1]:t;return m=typeof m=="function"?(c.pop(),m):t,i7(c,m)});function o7(c){var u=j(c);return u.__chain__=!0,u}o(o7,"chain");function $H(c,u){return u(c),c}o($H,"tap");function Vp(c,u){return u(c)}o(Vp,"thru");var jH=Ls(function(c){var u=c.length,m=u?c[0]:0,S=this.__wrapped__,N=o(function(K){return S2(K,c)},"interceptor");return u>1||this.__actions__.length||!(S instanceof Nt)||!Us(m)?this.thru(N):(S=S.slice(m,+m+(u?1:0)),S.__actions__.push({func:Vp,args:[N],thisArg:t}),new Li(S,this.__chain__).thru(function(K){return u&&!K.length&&K.push(t),K}))});function HH(){return o7(this)}o(HH,"wrapperChain");function VH(){return new Li(this.value(),this.__chain__)}o(VH,"wrapperCommit");function zH(){this.__values__===t&&(this.__values__=y7(this.value()));var c=this.__index__>=this.__values__.length,u=c?t:this.__values__[this.__index__++];return{done:c,value:u}}o(zH,"wrapperNext");function KH(){return this}o(KH,"wrapperToIterator");function GH(c){for(var u,m=this;m instanceof Tp;){var S=Zw(m);S.__index__=0,S.__values__=t,u?N.__wrapped__=S:u=S;var N=S;m=m.__wrapped__}return N.__wrapped__=c,u}o(GH,"wrapperPlant");function WH(){var c=this.__wrapped__;if(c instanceof Nt){var u=c;return this.__actions__.length&&(u=new Nt(this)),u=u.reverse(),u.__actions__.push({func:Vp,args:[r3],thisArg:t}),new Li(u,this.__chain__)}return this.thru(r3)}o(WH,"wrapperReverse");function YH(){return ww(this.__wrapped__,this.__actions__)}o(YH,"wrapperValue");var JH=Op(function(c,u,m){Qt.call(c,m)?++c[m]:Os(c,m,1)});function XH(c,u,m){var S=_t(c)?F5:$$;return m&&Mn(c,u,m)&&(u=t),S(c,Qe(u,3))}o(XH,"every");function ZH(c,u){var m=_t(c)?Ea:iw;return m(c,Qe(u,3))}o(ZH,"filter");var QH=Rw(Qw),eV=Rw(e7);function tV(c,u){return tn(zp(c,u),1)}o(tV,"flatMap");function rV(c,u){return tn(zp(c,u),b)}o(rV,"flatMapDeep");function nV(c,u,m){return m=m===t?1:Ct(m),tn(zp(c,u),m)}o(nV,"flatMapDepth");function s7(c,u){var m=_t(c)?Oi:Sa;return m(c,Qe(u,3))}o(s7,"forEach");function a7(c,u){var m=_t(c)?_q:nw;return m(c,Qe(u,3))}o(a7,"forEachRight");var iV=Op(function(c,u,m){Qt.call(c,m)?c[m].push(u):Os(c,m,[u])});function oV(c,u,m,S){c=jn(c)?c:qu(c),m=m&&!S?Ct(m):0;var N=c.length;return m<0&&(m=Nr(N+m,0)),Jp(c)?m<=N&&c.indexOf(u,m)>-1:!!N&&Tu(c,u,m)>-1}o(oV,"includes");var sV=kt(function(c,u,m){var S=-1,N=typeof u=="function",K=jn(c)?_e(c.length):[];return Sa(c,function(ne){K[++S]=N?si(u,ne,m):Bl(ne,u,m)}),K}),aV=Op(function(c,u,m){Os(c,m,u)});function zp(c,u){var m=_t(c)?hr:uw;return m(c,Qe(u,3))}o(zp,"map");function cV(c,u,m,S){return c==null?[]:(_t(u)||(u=u==null?[]:[u]),m=S?t:m,_t(m)||(m=m==null?[]:[m]),pw(c,u,m))}o(cV,"orderBy");var fV=Op(function(c,u,m){c[m?0:1].push(u)},function(){return[[],[]]});function uV(c,u,m){var S=_t(c)?m2:L5,N=arguments.length<3;return S(c,Qe(u,4),m,N,Sa)}o(uV,"reduce");function dV(c,u,m){var S=_t(c)?Eq:L5,N=arguments.length<3;return S(c,Qe(u,4),m,N,nw)}o(dV,"reduceRight");function lV(c,u){var m=_t(c)?Ea:iw;return m(c,Wp(Qe(u,3)))}o(lV,"reject");function hV(c){var u=_t(c)?Q5:oj;return u(c)}o(hV,"sample");function pV(c,u,m){(m?Mn(c,u,m):u===t)?u=1:u=Ct(u);var S=_t(c)?O$:sj;return S(c,u)}o(pV,"sampleSize");function mV(c){var u=_t(c)?N$:cj;return u(c)}o(mV,"shuffle");function gV(c){if(c==null)return 0;if(jn(c))return Jp(c)?Mu(c):c.length;var u=bn(c);return u==ce||u==W?c.size:F2(c).length}o(gV,"size");function bV(c,u,m){var S=_t(c)?g2:fj;return m&&Mn(c,u,m)&&(u=t),S(c,Qe(u,3))}o(bV,"some");var vV=kt(function(c,u){if(c==null)return[];var m=u.length;return m>1&&Mn(c,u[0],u[1])?u=[]:m>2&&Mn(u[0],u[1],u[2])&&(u=[u[0]]),pw(c,tn(u,1),[])}),Kp=Zq||function(){return $r.Date.now()};function yV(c,u){if(typeof u!="function")throw new Ni(i);return c=Ct(c),function(){if(--c<1)return u.apply(this,arguments)}}o(yV,"after");function c7(c,u,m){return u=m?t:u,u=c&&u==null?c.length:u,Ns(c,re,t,t,t,t,u)}o(c7,"ary");function f7(c,u){var m;if(typeof u!="function")throw new Ni(i);return c=Ct(c),function(){return--c>0&&(m=u.apply(this,arguments)),c<=1&&(u=t),m}}o(f7,"before");var i3=kt(function(c,u,m){var S=D;if(m.length){var N=Ca(m,Lu(i3));S|=X}return Ns(c,S,u,m,N)}),u7=kt(function(c,u,m){var S=D|R;if(m.length){var N=Ca(m,Lu(u7));S|=X}return Ns(u,S,c,m,N)});function d7(c,u,m){u=m?t:u;var S=Ns(c,F,t,t,t,t,t,u);return S.placeholder=d7.placeholder,S}o(d7,"curry");function l7(c,u,m){u=m?t:u;var S=Ns(c,V,t,t,t,t,t,u);return S.placeholder=l7.placeholder,S}o(l7,"curryRight");function h7(c,u,m){var S,N,K,ne,fe,be,Se=0,Te=!1,Re=!1,Ue=!0;if(typeof c!="function")throw new Ni(i);u=ji(u)||0,mr(m)&&(Te=!!m.leading,Re="maxWait"in m,K=Re?Nr(ji(m.maxWait)||0,u):K,Ue="trailing"in m?!!m.trailing:Ue);function Ke(Tr){var mo=S,js=N;return S=N=t,Se=Tr,ne=c.apply(js,mo),ne}o(Ke,"invokeFunc");function nt(Tr){return Se=Tr,fe=Ll(Bt,u),Te?Ke(Tr):ne}o(nt,"leadingEdge");function Dt(Tr){var mo=Tr-be,js=Tr-Se,R7=u-mo;return Re?gn(R7,K-js):R7}o(Dt,"remainingWait");function it(Tr){var mo=Tr-be,js=Tr-Se;return be===t||mo>=u||mo<0||Re&&js>=K}o(it,"shouldInvoke");function Bt(){var Tr=Kp();if(it(Tr))return Lt(Tr);fe=Ll(Bt,Dt(Tr))}o(Bt,"timerExpired");function Lt(Tr){return fe=t,Ue&&S?Ke(Tr):(S=N=t,ne)}o(Lt,"trailingEdge");function ui(){fe!==t&&Ew(fe),Se=0,S=be=N=fe=t}o(ui,"cancel");function Rn(){return fe===t?ne:Lt(Kp())}o(Rn,"flush");function di(){var Tr=Kp(),mo=it(Tr);if(S=arguments,N=this,be=Tr,mo){if(fe===t)return nt(be);if(Re)return Ew(fe),fe=Ll(Bt,u),Ke(be)}return fe===t&&(fe=Ll(Bt,u)),ne}return o(di,"debounced"),di.cancel=ui,di.flush=Rn,di}o(h7,"debounce");var xV=kt(function(c,u){return rw(c,1,u)}),wV=kt(function(c,u,m){return rw(c,ji(u)||0,m)});function _V(c){return Ns(c,$)}o(_V,"flip");function Gp(c,u){if(typeof c!="function"||u!=null&&typeof u!="function")throw new Ni(i);var m=o(function(){var S=arguments,N=u?u.apply(this,S):S[0],K=m.cache;if(K.has(N))return K.get(N);var ne=c.apply(this,S);return m.cache=K.set(N,ne)||K,ne},"memoized");return m.cache=new(Gp.Cache||Ps),m}o(Gp,"memoize"),Gp.Cache=Ps;function Wp(c){if(typeof c!="function")throw new Ni(i);return function(){var u=arguments;switch(u.length){case 0:return!c.call(this);case 1:return!c.call(this,u[0]);case 2:return!c.call(this,u[0],u[1]);case 3:return!c.call(this,u[0],u[1],u[2])}return!c.apply(this,u)}}o(Wp,"negate");function EV(c){return f7(2,c)}o(EV,"once");var AV=uj(function(c,u){u=u.length==1&&_t(u[0])?hr(u[0],ai(Qe())):hr(tn(u,1),ai(Qe()));var m=u.length;return kt(function(S){for(var N=-1,K=gn(S.length,m);++N<K;)S[N]=u[N].call(this,S[N]);return si(c,this,S)})}),o3=kt(function(c,u){var m=Ca(u,Lu(o3));return Ns(c,X,t,u,m)}),p7=kt(function(c,u){var m=Ca(u,Lu(p7));return Ns(c,J,t,u,m)}),CV=Ls(function(c,u){return Ns(c,z,t,t,t,u)});function IV(c,u){if(typeof c!="function")throw new Ni(i);return u=u===t?u:Ct(u),kt(c,u)}o(IV,"rest");function DV(c,u){if(typeof c!="function")throw new Ni(i);return u=u==null?0:Nr(Ct(u),0),kt(function(m){var S=m[u],N=Ma(m,0,u);return S&&Aa(N,S),si(c,this,N)})}o(DV,"spread");function SV(c,u,m){var S=!0,N=!0;if(typeof c!="function")throw new Ni(i);return mr(m)&&(S="leading"in m?!!m.leading:S,N="trailing"in m?!!m.trailing:N),h7(c,u,{leading:S,maxWait:u,trailing:N})}o(SV,"throttle");function TV(c){return c7(c,1)}o(TV,"unary");function kV(c,u){return o3(H2(u),c)}o(kV,"wrap");function MV(){if(!arguments.length)return[];var c=arguments[0];return _t(c)?c:[c]}o(MV,"castArray");function RV(c){return Ui(c,y)}o(RV,"clone");function BV(c,u){return u=typeof u=="function"?u:t,Ui(c,y,u)}o(BV,"cloneWith");function FV(c){return Ui(c,h|y)}o(FV,"cloneDeep");function PV(c,u){return u=typeof u=="function"?u:t,Ui(c,h|y,u)}o(PV,"cloneDeepWith");function OV(c,u){return u==null||tw(c,u,jr(u))}o(OV,"conformsTo");function po(c,u){return c===u||c!==c&&u!==u}o(po,"eq");var NV=qp(M2),LV=qp(function(c,u){return c>=u}),Qc=aw(function(){return arguments}())?aw:function(c){return vr(c)&&Qt.call(c,"callee")&&!G5.call(c,"callee")},_t=_e.isArray,UV=S5?ai(S5):G$;function jn(c){return c!=null&&Yp(c.length)&&!qs(c)}o(jn,"isArrayLike");function Sr(c){return vr(c)&&jn(c)}o(Sr,"isArrayLikeObject");function qV(c){return c===!0||c===!1||vr(c)&&kn(c)==ee}o(qV,"isBoolean");var Ra=e$||g3,$V=T5?ai(T5):W$;function jV(c){return vr(c)&&c.nodeType===1&&!Ul(c)}o(jV,"isElement");function HV(c){if(c==null)return!0;if(jn(c)&&(_t(c)||typeof c=="string"||typeof c.splice=="function"||Ra(c)||Uu(c)||Qc(c)))return!c.length;var u=bn(c);if(u==ce||u==W)return!c.size;if(Nl(c))return!F2(c).length;for(var m in c)if(Qt.call(c,m))return!1;return!0}o(HV,"isEmpty");function VV(c,u){return Fl(c,u)}o(VV,"isEqual");function zV(c,u,m){m=typeof m=="function"?m:t;var S=m?m(c,u):t;return S===t?Fl(c,u,t,m):!!S}o(zV,"isEqualWith");function s3(c){if(!vr(c))return!1;var u=kn(c);return u==U||u==q||typeof c.message=="string"&&typeof c.name=="string"&&!Ul(c)}o(s3,"isError");function KV(c){return typeof c=="number"&&Y5(c)}o(KV,"isFinite");function qs(c){if(!mr(c))return!1;var u=kn(c);return u==te||u==oe||u==B||u==ue}o(qs,"isFunction");function m7(c){return typeof c=="number"&&c==Ct(c)}o(m7,"isInteger");function Yp(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=E}o(Yp,"isLength");function mr(c){var u=typeof c;return c!=null&&(u=="object"||u=="function")}o(mr,"isObject");function vr(c){return c!=null&&typeof c=="object"}o(vr,"isObjectLike");var g7=k5?ai(k5):J$;function GV(c,u){return c===u||B2(c,u,J2(u))}o(GV,"isMatch");function WV(c,u,m){return m=typeof m=="function"?m:t,B2(c,u,J2(u),m)}o(WV,"isMatchWith");function YV(c){return b7(c)&&c!=+c}o(YV,"isNaN");function JV(c){if(Bj(c))throw new xt(n);return cw(c)}o(JV,"isNative");function XV(c){return c===null}o(XV,"isNull");function ZV(c){return c==null}o(ZV,"isNil");function b7(c){return typeof c=="number"||vr(c)&&kn(c)==Ce}o(b7,"isNumber");function Ul(c){if(!vr(c)||kn(c)!=ie)return!1;var u=_p(c);if(u===null)return!0;var m=Qt.call(u,"constructor")&&u.constructor;return typeof m=="function"&&m instanceof m&&vp.call(m)==Wq}o(Ul,"isPlainObject");var a3=M5?ai(M5):X$;function QV(c){return m7(c)&&c>=-E&&c<=E}o(QV,"isSafeInteger");var v7=R5?ai(R5):Z$;function Jp(c){return typeof c=="string"||!_t(c)&&vr(c)&&kn(c)==me}o(Jp,"isString");function fi(c){return typeof c=="symbol"||vr(c)&&kn(c)==ke}o(fi,"isSymbol");var Uu=B5?ai(B5):Q$;function ez(c){return c===t}o(ez,"isUndefined");function tz(c){return vr(c)&&bn(c)==Oe}o(tz,"isWeakMap");function rz(c){return vr(c)&&kn(c)==Je}o(rz,"isWeakSet");var nz=qp(P2),iz=qp(function(c,u){return c<=u});function y7(c){if(!c)return[];if(jn(c))return Jp(c)?lo(c):$n(c);if(Il&&c[Il])return Oq(c[Il]());var u=bn(c),m=u==ce?_2:u==W?mp:qu;return m(c)}o(y7,"toArray");function $s(c){if(!c)return c===0?c:0;if(c=ji(c),c===b||c===-b){var u=c<0?-1:1;return u*C}return c===c?c:0}o($s,"toFinite");function Ct(c){var u=$s(c),m=u%1;return u===u?m?u-m:u:0}o(Ct,"toInteger");function x7(c){return c?Yc(Ct(c),0,x):0}o(x7,"toLength");function ji(c){if(typeof c=="number")return c;if(fi(c))return A;if(mr(c)){var u=typeof c.valueOf=="function"?c.valueOf():c;c=mr(u)?u+"":u}if(typeof c!="string")return c===0?c:+c;c=U5(c);var m=Vt.test(c);return m||Nn.test(c)?yq(c.slice(2),m?2:8):oi.test(c)?A:+c}o(ji,"toNumber");function w7(c){return Wo(c,Hn(c))}o(w7,"toPlainObject");function oz(c){return c?Yc(Ct(c),-E,E):c===0?c:0}o(oz,"toSafeInteger");function Jt(c){return c==null?"":ci(c)}o(Jt,"toString");var sz=Ou(function(c,u){if(Nl(u)||jn(u)){Wo(u,jr(u),c);return}for(var m in u)Qt.call(u,m)&&Ml(c,m,u[m])}),_7=Ou(function(c,u){Wo(u,Hn(u),c)}),Xp=Ou(function(c,u,m,S){Wo(u,Hn(u),c,S)}),az=Ou(function(c,u,m,S){Wo(u,jr(u),c,S)}),cz=Ls(S2);function fz(c,u){var m=Pu(c);return u==null?m:ew(m,u)}o(fz,"create");var uz=kt(function(c,u){c=or(c);var m=-1,S=u.length,N=S>2?u[2]:t;for(N&&Mn(u[0],u[1],N)&&(S=1);++m<S;)for(var K=u[m],ne=Hn(K),fe=-1,be=ne.length;++fe<be;){var Se=ne[fe],Te=c[Se];(Te===t||po(Te,Ru[Se])&&!Qt.call(c,Se))&&(c[Se]=K[Se])}return c}),dz=kt(function(c){return c.push(t,Uw),si(E7,t,c)});function lz(c,u){return P5(c,Qe(u,3),Go)}o(lz,"findKey");function hz(c,u){return P5(c,Qe(u,3),k2)}o(hz,"findLastKey");function pz(c,u){return c==null?c:T2(c,Qe(u,3),Hn)}o(pz,"forIn");function mz(c,u){return c==null?c:ow(c,Qe(u,3),Hn)}o(mz,"forInRight");function gz(c,u){return c&&Go(c,Qe(u,3))}o(gz,"forOwn");function bz(c,u){return c&&k2(c,Qe(u,3))}o(bz,"forOwnRight");function vz(c){return c==null?[]:Rp(c,jr(c))}o(vz,"functions");function yz(c){return c==null?[]:Rp(c,Hn(c))}o(yz,"functionsIn");function c3(c,u,m){var S=c==null?t:Jc(c,u);return S===t?m:S}o(c3,"get");function xz(c,u){return c!=null&&jw(c,u,H$)}o(xz,"has");function f3(c,u){return c!=null&&jw(c,u,V$)}o(f3,"hasIn");var wz=Fw(function(c,u,m){u!=null&&typeof u.toString!="function"&&(u=yp.call(u)),c[u]=m},d3(Vn)),_z=Fw(function(c,u,m){u!=null&&typeof u.toString!="function"&&(u=yp.call(u)),Qt.call(c,u)?c[u].push(m):c[u]=[m]},Qe),Ez=kt(Bl);function jr(c){return jn(c)?Z5(c):F2(c)}o(jr,"keys");function Hn(c){return jn(c)?Z5(c,!0):ej(c)}o(Hn,"keysIn");function Az(c,u){var m={};return u=Qe(u,3),Go(c,function(S,N,K){Os(m,u(S,N,K),S)}),m}o(Az,"mapKeys");function Cz(c,u){var m={};return u=Qe(u,3),Go(c,function(S,N,K){Os(m,N,u(S,N,K))}),m}o(Cz,"mapValues");var Iz=Ou(function(c,u,m){Bp(c,u,m)}),E7=Ou(function(c,u,m,S){Bp(c,u,m,S)}),Dz=Ls(function(c,u){var m={};if(c==null)return m;var S=!1;u=hr(u,function(K){return K=ka(K,c),S||(S=K.length>1),K}),Wo(c,W2(c),m),S&&(m=Ui(m,h|p|y,wj));for(var N=u.length;N--;)q2(m,u[N]);return m});function Sz(c,u){return A7(c,Wp(Qe(u)))}o(Sz,"omitBy");var Tz=Ls(function(c,u){return c==null?{}:rj(c,u)});function A7(c,u){if(c==null)return{};var m=hr(W2(c),function(S){return[S]});return u=Qe(u),mw(c,m,function(S,N){return u(S,N[0])})}o(A7,"pickBy");function kz(c,u,m){u=ka(u,c);var S=-1,N=u.length;for(N||(N=1,c=t);++S<N;){var K=c==null?t:c[Yo(u[S])];K===t&&(S=N,K=m),c=qs(K)?K.call(c):K}return c}o(kz,"result");function Mz(c,u,m){return c==null?c:Pl(c,u,m)}o(Mz,"set");function Rz(c,u,m,S){return S=typeof S=="function"?S:t,c==null?c:Pl(c,u,m,S)}o(Rz,"setWith");var C7=Nw(jr),I7=Nw(Hn);function Bz(c,u,m){var S=_t(c),N=S||Ra(c)||Uu(c);if(u=Qe(u,4),m==null){var K=c&&c.constructor;N?m=S?new K:[]:mr(c)?m=qs(K)?Pu(_p(c)):{}:m={}}return(N?Oi:Go)(c,function(ne,fe,be){return u(m,ne,fe,be)}),m}o(Bz,"transform");function Fz(c,u){return c==null?!0:q2(c,u)}o(Fz,"unset");function Pz(c,u,m){return c==null?c:xw(c,u,H2(m))}o(Pz,"update");function Oz(c,u,m,S){return S=typeof S=="function"?S:t,c==null?c:xw(c,u,H2(m),S)}o(Oz,"updateWith");function qu(c){return c==null?[]:w2(c,jr(c))}o(qu,"values");function Nz(c){return c==null?[]:w2(c,Hn(c))}o(Nz,"valuesIn");function Lz(c,u,m){return m===t&&(m=u,u=t),m!==t&&(m=ji(m),m=m===m?m:0),u!==t&&(u=ji(u),u=u===u?u:0),Yc(ji(c),u,m)}o(Lz,"clamp");function Uz(c,u,m){return u=$s(u),m===t?(m=u,u=0):m=$s(m),c=ji(c),z$(c,u,m)}o(Uz,"inRange");function qz(c,u,m){if(m&&typeof m!="boolean"&&Mn(c,u,m)&&(u=m=t),m===t&&(typeof u=="boolean"?(m=u,u=t):typeof c=="boolean"&&(m=c,c=t)),c===t&&u===t?(c=0,u=1):(c=$s(c),u===t?(u=c,c=0):u=$s(u)),c>u){var S=c;c=u,u=S}if(m||c%1||u%1){var N=J5();return gn(c+N*(u-c+vq("1e-"+((N+"").length-1))),u)}return N2(c,u)}o(qz,"random");var $z=Nu(function(c,u,m){return u=u.toLowerCase(),c+(m?D7(u):u)});function D7(c){return u3(Jt(c).toLowerCase())}o(D7,"capitalize");function S7(c){return c=Jt(c),c&&c.replace(Un,Mq).replace(cq,"")}o(S7,"deburr");function jz(c,u,m){c=Jt(c),u=ci(u);var S=c.length;m=m===t?S:Yc(Ct(m),0,S);var N=m;return m-=u.length,m>=0&&c.slice(m,N)==u}o(jz,"endsWith");function Hz(c){return c=Jt(c),c&&ct.test(c)?c.replace(ii,Rq):c}o(Hz,"escape");function Vz(c){return c=Jt(c),c&<.test(c)?c.replace(On,"\\$&"):c}o(Vz,"escapeRegExp");var zz=Nu(function(c,u,m){return c+(m?"-":"")+u.toLowerCase()}),Kz=Nu(function(c,u,m){return c+(m?" ":"")+u.toLowerCase()}),Gz=Mw("toLowerCase");function Wz(c,u,m){c=Jt(c),u=Ct(u);var S=u?Mu(c):0;if(!u||S>=u)return c;var N=(u-S)/2;return Up(Ip(N),m)+c+Up(Cp(N),m)}o(Wz,"pad");function Yz(c,u,m){c=Jt(c),u=Ct(u);var S=u?Mu(c):0;return u&&S<u?c+Up(u-S,m):c}o(Yz,"padEnd");function Jz(c,u,m){c=Jt(c),u=Ct(u);var S=u?Mu(c):0;return u&&S<u?Up(u-S,m)+c:c}o(Jz,"padStart");function Xz(c,u,m){return m||u==null?u=0:u&&(u=+u),i$(Jt(c).replace(rt,""),u||0)}o(Xz,"parseInt");function Zz(c,u,m){return(m?Mn(c,u,m):u===t)?u=1:u=Ct(u),L2(Jt(c),u)}o(Zz,"repeat");function Qz(){var c=arguments,u=Jt(c[0]);return c.length<3?u:u.replace(c[1],c[2])}o(Qz,"replace");var eK=Nu(function(c,u,m){return c+(m?"_":"")+u.toLowerCase()});function tK(c,u,m){return m&&typeof m!="number"&&Mn(c,u,m)&&(u=m=t),m=m===t?x:m>>>0,m?(c=Jt(c),c&&(typeof u=="string"||u!=null&&!a3(u))&&(u=ci(u),!u&&ku(c))?Ma(lo(c),0,m):c.split(u,m)):[]}o(tK,"split");var rK=Nu(function(c,u,m){return c+(m?" ":"")+u3(u)});function nK(c,u,m){return c=Jt(c),m=m==null?0:Yc(Ct(m),0,c.length),u=ci(u),c.slice(m,m+u.length)==u}o(nK,"startsWith");function iK(c,u,m){var S=j.templateSettings;m&&Mn(c,u,m)&&(u=t),c=Jt(c),u=Xp({},u,S,Lw);var N=Xp({},u.imports,S.imports,Lw),K=jr(N),ne=w2(N,K),fe,be,Se=0,Te=u.interpolate||en,Re="__p += '",Ue=E2((u.escape||en).source+"|"+Te.source+"|"+(Te===ot?bt:en).source+"|"+(u.evaluate||en).source+"|$","g"),Ke="//# sourceURL="+(Qt.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++hq+"]")+`
|
4
|
-
`;c.replace(Ue,function(it,Bt,Lt,ui,Rn,di){return Lt||(Lt=ui),Re+=c.slice(Se,di).replace(qn,Bq),Bt&&(fe=!0,Re+=`' +
|
5
|
-
__e(`+Bt+`) +
|
6
|
-
'`),Rn&&(be=!0,Re+=`';
|
7
|
-
`+Rn+`;
|
8
|
-
__p += '`),Lt&&(Re+=`' +
|
9
|
-
((__t = (`+Lt+`)) == null ? '' : __t) +
|
10
|
-
'`),Se=di+it.length,it}),Re+=`';
|
11
|
-
`;var nt=Qt.call(u,"variable")&&u.variable;if(!nt)Re=`with (obj) {
|
12
|
-
`+Re+`
|
13
|
-
}
|
14
|
-
`;else if(gt.test(nt))throw new xt(s);Re=(be?Re.replace(Fe,""):Re).replace(qt,"$1").replace(We,"$1;"),Re="function("+(nt||"obj")+`) {
|
15
|
-
`+(nt?"":`obj || (obj = {});
|
16
|
-
`)+"var __t, __p = ''"+(fe?", __e = _.escape":"")+(be?`, __j = Array.prototype.join;
|
17
|
-
function print() { __p += __j.call(arguments, '') }
|
18
|
-
`:`;
|
19
|
-
`)+Re+`return __p
|
20
|
-
}`;var Dt=k7(function(){return Kt(K,Ke+"return "+Re).apply(t,ne)});if(Dt.source=Re,s3(Dt))throw Dt;return Dt}o(iK,"template");function oK(c){return Jt(c).toLowerCase()}o(oK,"toLower");function sK(c){return Jt(c).toUpperCase()}o(sK,"toUpper");function aK(c,u,m){if(c=Jt(c),c&&(m||u===t))return U5(c);if(!c||!(u=ci(u)))return c;var S=lo(c),N=lo(u),K=q5(S,N),ne=$5(S,N)+1;return Ma(S,K,ne).join("")}o(aK,"trim");function cK(c,u,m){if(c=Jt(c),c&&(m||u===t))return c.slice(0,H5(c)+1);if(!c||!(u=ci(u)))return c;var S=lo(c),N=$5(S,lo(u))+1;return Ma(S,0,N).join("")}o(cK,"trimEnd");function fK(c,u,m){if(c=Jt(c),c&&(m||u===t))return c.replace(rt,"");if(!c||!(u=ci(u)))return c;var S=lo(c),N=q5(S,lo(u));return Ma(S,N).join("")}o(fK,"trimStart");function uK(c,u){var m=G,S=le;if(mr(u)){var N="separator"in u?u.separator:N;m="length"in u?Ct(u.length):m,S="omission"in u?ci(u.omission):S}c=Jt(c);var K=c.length;if(ku(c)){var ne=lo(c);K=ne.length}if(m>=K)return c;var fe=m-Mu(S);if(fe<1)return S;var be=ne?Ma(ne,0,fe).join(""):c.slice(0,fe);if(N===t)return be+S;if(ne&&(fe+=be.length-fe),a3(N)){if(c.slice(fe).search(N)){var Se,Te=be;for(N.global||(N=E2(N.source,Jt(st.exec(N))+"g")),N.lastIndex=0;Se=N.exec(Te);)var Re=Se.index;be=be.slice(0,Re===t?fe:Re)}}else if(c.indexOf(ci(N),fe)!=fe){var Ue=be.lastIndexOf(N);Ue>-1&&(be=be.slice(0,Ue))}return be+S}o(uK,"truncate");function dK(c){return c=Jt(c),c&&at.test(c)?c.replace(Ze,qq):c}o(dK,"unescape");var lK=Nu(function(c,u,m){return c+(m?" ":"")+u.toUpperCase()}),u3=Mw("toUpperCase");function T7(c,u,m){return c=Jt(c),u=m?t:u,u===t?Pq(c)?Hq(c):Iq(c):c.match(u)||[]}o(T7,"words");var k7=kt(function(c,u){try{return si(c,t,u)}catch(m){return s3(m)?m:new xt(m)}}),hK=Ls(function(c,u){return Oi(u,function(m){m=Yo(m),Os(c,m,i3(c[m],c))}),c});function pK(c){var u=c==null?0:c.length,m=Qe();return c=u?hr(c,function(S){if(typeof S[1]!="function")throw new Ni(i);return[m(S[0]),S[1]]}):[],kt(function(S){for(var N=-1;++N<u;){var K=c[N];if(si(K[0],this,S))return si(K[1],this,S)}})}o(pK,"cond");function mK(c){return q$(Ui(c,h))}o(mK,"conforms");function d3(c){return function(){return c}}o(d3,"constant");function gK(c,u){return c==null||c!==c?u:c}o(gK,"defaultTo");var bK=Bw(),vK=Bw(!0);function Vn(c){return c}o(Vn,"identity");function l3(c){return fw(typeof c=="function"?c:Ui(c,h))}o(l3,"iteratee");function yK(c){return dw(Ui(c,h))}o(yK,"matches");function xK(c,u){return lw(c,Ui(u,h))}o(xK,"matchesProperty");var wK=kt(function(c,u){return function(m){return Bl(m,c,u)}}),_K=kt(function(c,u){return function(m){return Bl(c,m,u)}});function h3(c,u,m){var S=jr(u),N=Rp(u,S);m==null&&!(mr(u)&&(N.length||!S.length))&&(m=u,u=c,c=this,N=Rp(u,jr(u)));var K=!(mr(m)&&"chain"in m)||!!m.chain,ne=qs(c);return Oi(N,function(fe){var be=u[fe];c[fe]=be,ne&&(c.prototype[fe]=function(){var Se=this.__chain__;if(K||Se){var Te=c(this.__wrapped__),Re=Te.__actions__=$n(this.__actions__);return Re.push({func:be,args:arguments,thisArg:c}),Te.__chain__=Se,Te}return be.apply(c,Aa([this.value()],arguments))})}),c}o(h3,"mixin");function EK(){return $r._===this&&($r._=Yq),this}o(EK,"noConflict");function p3(){}o(p3,"noop");function AK(c){return c=Ct(c),kt(function(u){return hw(u,c)})}o(AK,"nthArg");var CK=z2(hr),IK=z2(F5),DK=z2(g2);function M7(c){return Z2(c)?b2(Yo(c)):nj(c)}o(M7,"property");function SK(c){return function(u){return c==null?t:Jc(c,u)}}o(SK,"propertyOf");var TK=Pw(),kK=Pw(!0);function m3(){return[]}o(m3,"stubArray");function g3(){return!1}o(g3,"stubFalse");function MK(){return{}}o(MK,"stubObject");function RK(){return""}o(RK,"stubString");function BK(){return!0}o(BK,"stubTrue");function FK(c,u){if(c=Ct(c),c<1||c>E)return[];var m=x,S=gn(c,x);u=Qe(u),c-=x;for(var N=x2(S,u);++m<c;)u(m);return N}o(FK,"times");function PK(c){return _t(c)?hr(c,Yo):fi(c)?[c]:$n(Xw(Jt(c)))}o(PK,"toPath");function OK(c){var u=++Gq;return Jt(c)+u}o(OK,"uniqueId");var NK=Lp(function(c,u){return c+u},0),LK=K2("ceil"),UK=Lp(function(c,u){return c/u},1),qK=K2("floor");function $K(c){return c&&c.length?Mp(c,Vn,M2):t}o($K,"max");function jK(c,u){return c&&c.length?Mp(c,Qe(u,2),M2):t}o(jK,"maxBy");function HK(c){return N5(c,Vn)}o(HK,"mean");function VK(c,u){return N5(c,Qe(u,2))}o(VK,"meanBy");function zK(c){return c&&c.length?Mp(c,Vn,P2):t}o(zK,"min");function KK(c,u){return c&&c.length?Mp(c,Qe(u,2),P2):t}o(KK,"minBy");var GK=Lp(function(c,u){return c*u},1),WK=K2("round"),YK=Lp(function(c,u){return c-u},0);function JK(c){return c&&c.length?y2(c,Vn):0}o(JK,"sum");function XK(c,u){return c&&c.length?y2(c,Qe(u,2)):0}return o(XK,"sumBy"),j.after=yV,j.ary=c7,j.assign=sz,j.assignIn=_7,j.assignInWith=Xp,j.assignWith=az,j.at=cz,j.before=f7,j.bind=i3,j.bindAll=hK,j.bindKey=u7,j.castArray=MV,j.chain=o7,j.chunk=qj,j.compact=$j,j.concat=jj,j.cond=pK,j.conforms=mK,j.constant=d3,j.countBy=JH,j.create=fz,j.curry=d7,j.curryRight=l7,j.debounce=h7,j.defaults=uz,j.defaultsDeep=dz,j.defer=xV,j.delay=wV,j.difference=Hj,j.differenceBy=Vj,j.differenceWith=zj,j.drop=Kj,j.dropRight=Gj,j.dropRightWhile=Wj,j.dropWhile=Yj,j.fill=Jj,j.filter=ZH,j.flatMap=tV,j.flatMapDeep=rV,j.flatMapDepth=nV,j.flatten=t7,j.flattenDeep=Xj,j.flattenDepth=Zj,j.flip=_V,j.flow=bK,j.flowRight=vK,j.fromPairs=Qj,j.functions=vz,j.functionsIn=yz,j.groupBy=iV,j.initial=tH,j.intersection=rH,j.intersectionBy=nH,j.intersectionWith=iH,j.invert=wz,j.invertBy=_z,j.invokeMap=sV,j.iteratee=l3,j.keyBy=aV,j.keys=jr,j.keysIn=Hn,j.map=zp,j.mapKeys=Az,j.mapValues=Cz,j.matches=yK,j.matchesProperty=xK,j.memoize=Gp,j.merge=Iz,j.mergeWith=E7,j.method=wK,j.methodOf=_K,j.mixin=h3,j.negate=Wp,j.nthArg=AK,j.omit=Dz,j.omitBy=Sz,j.once=EV,j.orderBy=cV,j.over=CK,j.overArgs=AV,j.overEvery=IK,j.overSome=DK,j.partial=o3,j.partialRight=p7,j.partition=fV,j.pick=Tz,j.pickBy=A7,j.property=M7,j.propertyOf=SK,j.pull=cH,j.pullAll=n7,j.pullAllBy=fH,j.pullAllWith=uH,j.pullAt=dH,j.range=TK,j.rangeRight=kK,j.rearg=CV,j.reject=lV,j.remove=lH,j.rest=IV,j.reverse=r3,j.sampleSize=pV,j.set=Mz,j.setWith=Rz,j.shuffle=mV,j.slice=hH,j.sortBy=vV,j.sortedUniq=xH,j.sortedUniqBy=wH,j.split=tK,j.spread=DV,j.tail=_H,j.take=EH,j.takeRight=AH,j.takeRightWhile=CH,j.takeWhile=IH,j.tap=$H,j.throttle=SV,j.thru=Vp,j.toArray=y7,j.toPairs=C7,j.toPairsIn=I7,j.toPath=PK,j.toPlainObject=w7,j.transform=Bz,j.unary=TV,j.union=DH,j.unionBy=SH,j.unionWith=TH,j.uniq=kH,j.uniqBy=MH,j.uniqWith=RH,j.unset=Fz,j.unzip=n3,j.unzipWith=i7,j.update=Pz,j.updateWith=Oz,j.values=qu,j.valuesIn=Nz,j.without=BH,j.words=T7,j.wrap=kV,j.xor=FH,j.xorBy=PH,j.xorWith=OH,j.zip=NH,j.zipObject=LH,j.zipObjectDeep=UH,j.zipWith=qH,j.entries=C7,j.entriesIn=I7,j.extend=_7,j.extendWith=Xp,h3(j,j),j.add=NK,j.attempt=k7,j.camelCase=$z,j.capitalize=D7,j.ceil=LK,j.clamp=Lz,j.clone=RV,j.cloneDeep=FV,j.cloneDeepWith=PV,j.cloneWith=BV,j.conformsTo=OV,j.deburr=S7,j.defaultTo=gK,j.divide=UK,j.endsWith=jz,j.eq=po,j.escape=Hz,j.escapeRegExp=Vz,j.every=XH,j.find=QH,j.findIndex=Qw,j.findKey=lz,j.findLast=eV,j.findLastIndex=e7,j.findLastKey=hz,j.floor=qK,j.forEach=s7,j.forEachRight=a7,j.forIn=pz,j.forInRight=mz,j.forOwn=gz,j.forOwnRight=bz,j.get=c3,j.gt=NV,j.gte=LV,j.has=xz,j.hasIn=f3,j.head=r7,j.identity=Vn,j.includes=oV,j.indexOf=eH,j.inRange=Uz,j.invoke=Ez,j.isArguments=Qc,j.isArray=_t,j.isArrayBuffer=UV,j.isArrayLike=jn,j.isArrayLikeObject=Sr,j.isBoolean=qV,j.isBuffer=Ra,j.isDate=$V,j.isElement=jV,j.isEmpty=HV,j.isEqual=VV,j.isEqualWith=zV,j.isError=s3,j.isFinite=KV,j.isFunction=qs,j.isInteger=m7,j.isLength=Yp,j.isMap=g7,j.isMatch=GV,j.isMatchWith=WV,j.isNaN=YV,j.isNative=JV,j.isNil=ZV,j.isNull=XV,j.isNumber=b7,j.isObject=mr,j.isObjectLike=vr,j.isPlainObject=Ul,j.isRegExp=a3,j.isSafeInteger=QV,j.isSet=v7,j.isString=Jp,j.isSymbol=fi,j.isTypedArray=Uu,j.isUndefined=ez,j.isWeakMap=tz,j.isWeakSet=rz,j.join=oH,j.kebabCase=zz,j.last=$i,j.lastIndexOf=sH,j.lowerCase=Kz,j.lowerFirst=Gz,j.lt=nz,j.lte=iz,j.max=$K,j.maxBy=jK,j.mean=HK,j.meanBy=VK,j.min=zK,j.minBy=KK,j.stubArray=m3,j.stubFalse=g3,j.stubObject=MK,j.stubString=RK,j.stubTrue=BK,j.multiply=GK,j.nth=aH,j.noConflict=EK,j.noop=p3,j.now=Kp,j.pad=Wz,j.padEnd=Yz,j.padStart=Jz,j.parseInt=Xz,j.random=qz,j.reduce=uV,j.reduceRight=dV,j.repeat=Zz,j.replace=Qz,j.result=kz,j.round=WK,j.runInContext=pe,j.sample=hV,j.size=gV,j.snakeCase=eK,j.some=bV,j.sortedIndex=pH,j.sortedIndexBy=mH,j.sortedIndexOf=gH,j.sortedLastIndex=bH,j.sortedLastIndexBy=vH,j.sortedLastIndexOf=yH,j.startCase=rK,j.startsWith=nK,j.subtract=YK,j.sum=JK,j.sumBy=XK,j.template=iK,j.times=FK,j.toFinite=$s,j.toInteger=Ct,j.toLength=x7,j.toLower=oK,j.toNumber=ji,j.toSafeInteger=oz,j.toString=Jt,j.toUpper=sK,j.trim=aK,j.trimEnd=cK,j.trimStart=fK,j.truncate=uK,j.unescape=dK,j.uniqueId=OK,j.upperCase=lK,j.upperFirst=u3,j.each=s7,j.eachRight=a7,j.first=r7,h3(j,function(){var c={};return Go(j,function(u,m){Qt.call(j.prototype,m)||(c[m]=u)}),c}(),{chain:!1}),j.VERSION=e,Oi(["bind","bindKey","curry","curryRight","partial","partialRight"],function(c){j[c].placeholder=j}),Oi(["drop","take"],function(c,u){Nt.prototype[c]=function(m){m=m===t?1:Nr(Ct(m),0);var S=this.__filtered__&&!u?new Nt(this):this.clone();return S.__filtered__?S.__takeCount__=gn(m,S.__takeCount__):S.__views__.push({size:gn(m,x),type:c+(S.__dir__<0?"Right":"")}),S},Nt.prototype[c+"Right"]=function(m){return this.reverse()[c](m).reverse()}}),Oi(["filter","map","takeWhile"],function(c,u){var m=u+1,S=m==_||m==l;Nt.prototype[c]=function(N){var K=this.clone();return K.__iteratees__.push({iteratee:Qe(N,3),type:m}),K.__filtered__=K.__filtered__||S,K}}),Oi(["head","last"],function(c,u){var m="take"+(u?"Right":"");Nt.prototype[c]=function(){return this[m](1).value()[0]}}),Oi(["initial","tail"],function(c,u){var m="drop"+(u?"":"Right");Nt.prototype[c]=function(){return this.__filtered__?new Nt(this):this[m](1)}}),Nt.prototype.compact=function(){return this.filter(Vn)},Nt.prototype.find=function(c){return this.filter(c).head()},Nt.prototype.findLast=function(c){return this.reverse().find(c)},Nt.prototype.invokeMap=kt(function(c,u){return typeof c=="function"?new Nt(this):this.map(function(m){return Bl(m,c,u)})}),Nt.prototype.reject=function(c){return this.filter(Wp(Qe(c)))},Nt.prototype.slice=function(c,u){c=Ct(c);var m=this;return m.__filtered__&&(c>0||u<0)?new Nt(m):(c<0?m=m.takeRight(-c):c&&(m=m.drop(c)),u!==t&&(u=Ct(u),m=u<0?m.dropRight(-u):m.take(u-c)),m)},Nt.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Nt.prototype.toArray=function(){return this.take(x)},Go(Nt.prototype,function(c,u){var m=/^(?:filter|find|map|reject)|While$/.test(u),S=/^(?:head|last)$/.test(u),N=j[S?"take"+(u=="last"?"Right":""):u],K=S||/^find/.test(u);!N||(j.prototype[u]=function(){var ne=this.__wrapped__,fe=S?[1]:arguments,be=ne instanceof Nt,Se=fe[0],Te=be||_t(ne),Re=o(function(Bt){var Lt=N.apply(j,Aa([Bt],fe));return S&&Ue?Lt[0]:Lt},"interceptor");Te&&m&&typeof Se=="function"&&Se.length!=1&&(be=Te=!1);var Ue=this.__chain__,Ke=!!this.__actions__.length,nt=K&&!Ue,Dt=be&&!Ke;if(!K&&Te){ne=Dt?ne:new Nt(this);var it=c.apply(ne,fe);return it.__actions__.push({func:Vp,args:[Re],thisArg:t}),new Li(it,Ue)}return nt&&Dt?c.apply(this,fe):(it=this.thru(Re),nt?S?it.value()[0]:it.value():it)})}),Oi(["pop","push","shift","sort","splice","unshift"],function(c){var u=gp[c],m=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",S=/^(?:pop|shift)$/.test(c);j.prototype[c]=function(){var N=arguments;if(S&&!this.__chain__){var K=this.value();return u.apply(_t(K)?K:[],N)}return this[m](function(ne){return u.apply(_t(ne)?ne:[],N)})}}),Go(Nt.prototype,function(c,u){var m=j[u];if(m){var S=m.name+"";Qt.call(Fu,S)||(Fu[S]=[]),Fu[S].push({name:u,func:m})}}),Fu[Np(t,R).name]=[{name:"wrapper",func:t}],Nt.prototype.clone=d$,Nt.prototype.reverse=l$,Nt.prototype.value=h$,j.prototype.at=jH,j.prototype.chain=HH,j.prototype.commit=VH,j.prototype.next=zH,j.prototype.plant=GH,j.prototype.reverse=WH,j.prototype.toJSON=j.prototype.valueOf=j.prototype.value=YH,j.prototype.first=j.prototype.head,Il&&(j.prototype[Il]=KH),j},"runInContext"),Ia=Vq();typeof define=="function"&&typeof define.amd=="object"&&define.amd?($r._=Ia,define(function(){return Ia})):zc?((zc.exports=Ia)._=Ia,l2._=Ia):$r._=Ia}).call(cd)});function yf(t){return globalThis.Buffer!=null?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}var Fh=Xt(()=>{o(yf,"asUint8Array")});function Ph(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?yf(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}var fm=Xt(()=>{Fh();o(Ph,"allocUnsafe")});var oS={};tr(oS,{concat:()=>Co});function Co(t,e){e||(e=t.reduce((i,s)=>i+s.length,0));let r=Ph(e),n=0;for(let i of t)r.set(i,n),n+=i.length;return yf(r)}var jv=Xt(()=>{fm();Fh();o(Co,"concat")});function Vie(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<t.length;i++){var s=t.charAt(i),a=s.charCodeAt(0);if(r[a]!==255)throw new TypeError(s+" is ambiguous");r[a]=i}var f=t.length,d=t.charAt(0),h=Math.log(f)/Math.log(256),p=Math.log(256)/Math.log(f);function y(D){if(D instanceof Uint8Array||(ArrayBuffer.isView(D)?D=new Uint8Array(D.buffer,D.byteOffset,D.byteLength):Array.isArray(D)&&(D=Uint8Array.from(D))),!(D instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(D.length===0)return"";for(var R=0,H=0,F=0,V=D.length;F!==V&&D[F]===0;)F++,R++;for(var X=(V-F)*p+1>>>0,J=new Uint8Array(X);F!==V;){for(var re=D[F],z=0,$=X-1;(re!==0||z<H)&&$!==-1;$--,z++)re+=256*J[$]>>>0,J[$]=re%f>>>0,re=re/f>>>0;if(re!==0)throw new Error("Non-zero carry");H=z,F++}for(var G=X-H;G!==X&&J[G]===0;)G++;for(var le=d.repeat(R);G<X;++G)le+=t.charAt(J[G]);return le}o(y,"encode");function I(D){if(typeof D!="string")throw new TypeError("Expected String");if(D.length===0)return new Uint8Array;var R=0;if(D[R]!==" "){for(var H=0,F=0;D[R]===d;)H++,R++;for(var V=(D.length-R)*h+1>>>0,X=new Uint8Array(V);D[R];){var J=r[D.charCodeAt(R)];if(J===255)return;for(var re=0,z=V-1;(J!==0||re<F)&&z!==-1;z--,re++)J+=f*X[z]>>>0,X[z]=J%256>>>0,J=J/256>>>0;if(J!==0)throw new Error("Non-zero carry");F=re,R++}if(D[R]!==" "){for(var $=V-F;$!==V&&X[$]===0;)$++;for(var G=new Uint8Array(H+(V-$)),le=H;$!==V;)G[le++]=X[$++];return G}}}o(I,"decodeUnsafe");function T(D){var R=I(D);if(R)return R;throw new Error(`Non-${e} character`)}return o(T,"decode"),{encode:y,decodeUnsafe:I,decode:T}}var zie,Kie,sS,aS=Xt(()=>{o(Vie,"base");zie=Vie,Kie=zie,sS=Kie});var Wxe,cS,Js,fS,uS,cc=Xt(()=>{Wxe=new Uint8Array(0),cS=o((t,e)=>{if(t===e)return!0;if(t.byteLength!==e.byteLength)return!1;for(let r=0;r<t.byteLength;r++)if(t[r]!==e[r])return!1;return!0},"equals"),Js=o(t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},"coerce"),fS=o(t=>new TextEncoder().encode(t),"fromString"),uS=o(t=>new TextDecoder().decode(t),"toString")});var um,dm,lm,dS,hm,fd,fc,Gie,Wie,xr,Io=Xt(()=>{aS();cc();um=class{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}};o(um,"Encoder");dm=class{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return dS(this,e)}};o(dm,"Decoder");lm=class{constructor(e){this.decoders=e}or(e){return dS(this,e)}decode(e){let r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}};o(lm,"ComposedDecoder");dS=o((t,e)=>new lm({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}}),"or"),hm=class{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new um(e,r,n),this.decoder=new dm(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}};o(hm,"Codec");fd=o(({name:t,prefix:e,encode:r,decode:n})=>new hm(t,e,r,n),"from"),fc=o(({prefix:t,name:e,alphabet:r})=>{let{encode:n,decode:i}=sS(r,e);return fd({prefix:t,name:e,encode:n,decode:s=>Js(i(s))})},"baseX"),Gie=o((t,e,r,n)=>{let i={};for(let p=0;p<e.length;++p)i[e[p]]=p;let s=t.length;for(;t[s-1]==="=";)--s;let a=new Uint8Array(s*r/8|0),f=0,d=0,h=0;for(let p=0;p<s;++p){let y=i[t[p]];if(y===void 0)throw new SyntaxError(`Non-${n} character`);d=d<<r|y,f+=r,f>=8&&(f-=8,a[h++]=255&d>>f)}if(f>=r||255&d<<8-f)throw new SyntaxError("Unexpected end of data");return a},"decode"),Wie=o((t,e,r)=>{let n=e[e.length-1]==="=",i=(1<<r)-1,s="",a=0,f=0;for(let d=0;d<t.length;++d)for(f=f<<8|t[d],a+=8;a>r;)a-=r,s+=e[i&f>>a];if(a&&(s+=e[i&f<<r-a]),n)for(;s.length*r&7;)s+="=";return s},"encode"),xr=o(({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>fd({prefix:e,name:t,encode(i){return Wie(i,n,r)},decode(i){return Gie(i,n,r,t)}}),"rfc4648")});var Vv={};tr(Vv,{identity:()=>Yie});var Yie,lS=Xt(()=>{Io();cc();Yie=fd({prefix:"\0",name:"identity",encode:t=>uS(t),decode:t=>fS(t)})});var zv={};tr(zv,{base2:()=>Jie});var Jie,hS=Xt(()=>{Io();Jie=xr({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1})});var Kv={};tr(Kv,{base8:()=>Xie});var Xie,pS=Xt(()=>{Io();Xie=xr({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3})});var Gv={};tr(Gv,{base10:()=>Zie});var Zie,mS=Xt(()=>{Io();Zie=fc({prefix:"9",name:"base10",alphabet:"0123456789"})});var Wv={};tr(Wv,{base16:()=>Qie,base16upper:()=>eoe});var Qie,eoe,gS=Xt(()=>{Io();Qie=xr({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),eoe=xr({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4})});var Yv={};tr(Yv,{base32:()=>ud,base32hex:()=>ioe,base32hexpad:()=>soe,base32hexpadupper:()=>aoe,base32hexupper:()=>ooe,base32pad:()=>roe,base32padupper:()=>noe,base32upper:()=>toe,base32z:()=>coe});var ud,toe,roe,noe,ioe,ooe,soe,aoe,coe,Jv=Xt(()=>{Io();ud=xr({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),toe=xr({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),roe=xr({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),noe=xr({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),ioe=xr({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),ooe=xr({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),soe=xr({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),aoe=xr({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),coe=xr({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5})});var Xv={};tr(Xv,{base36:()=>Do,base36upper:()=>foe});var Do,foe,dd=Xt(()=>{Io();Do=fc({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),foe=fc({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"})});var Zv={};tr(Zv,{base58btc:()=>Yi,base58flickr:()=>uoe});var Yi,uoe,pm=Xt(()=>{Io();Yi=fc({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),uoe=fc({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"})});var Qv={};tr(Qv,{base64:()=>doe,base64pad:()=>loe,base64url:()=>xf,base64urlpad:()=>hoe});var doe,loe,xf,hoe,mm=Xt(()=>{Io();doe=xr({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),loe=xr({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),xf=xr({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),hoe=xr({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6})});var ey={};tr(ey,{base256emoji:()=>voe});function goe(t){return t.reduce((e,r)=>(e+=poe[r],e),"")}function boe(t){let e=[];for(let r of t){let n=moe[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}var bS,poe,moe,voe,vS=Xt(()=>{Io();bS=Array.from("\u{1F680}\u{1FA90}\u2604\u{1F6F0}\u{1F30C}\u{1F311}\u{1F312}\u{1F313}\u{1F314}\u{1F315}\u{1F316}\u{1F317}\u{1F318}\u{1F30D}\u{1F30F}\u{1F30E}\u{1F409}\u2600\u{1F4BB}\u{1F5A5}\u{1F4BE}\u{1F4BF}\u{1F602}\u2764\u{1F60D}\u{1F923}\u{1F60A}\u{1F64F}\u{1F495}\u{1F62D}\u{1F618}\u{1F44D}\u{1F605}\u{1F44F}\u{1F601}\u{1F525}\u{1F970}\u{1F494}\u{1F496}\u{1F499}\u{1F622}\u{1F914}\u{1F606}\u{1F644}\u{1F4AA}\u{1F609}\u263A\u{1F44C}\u{1F917}\u{1F49C}\u{1F614}\u{1F60E}\u{1F607}\u{1F339}\u{1F926}\u{1F389}\u{1F49E}\u270C\u2728\u{1F937}\u{1F631}\u{1F60C}\u{1F338}\u{1F64C}\u{1F60B}\u{1F497}\u{1F49A}\u{1F60F}\u{1F49B}\u{1F642}\u{1F493}\u{1F929}\u{1F604}\u{1F600}\u{1F5A4}\u{1F603}\u{1F4AF}\u{1F648}\u{1F447}\u{1F3B6}\u{1F612}\u{1F92D}\u2763\u{1F61C}\u{1F48B}\u{1F440}\u{1F62A}\u{1F611}\u{1F4A5}\u{1F64B}\u{1F61E}\u{1F629}\u{1F621}\u{1F92A}\u{1F44A}\u{1F973}\u{1F625}\u{1F924}\u{1F449}\u{1F483}\u{1F633}\u270B\u{1F61A}\u{1F61D}\u{1F634}\u{1F31F}\u{1F62C}\u{1F643}\u{1F340}\u{1F337}\u{1F63B}\u{1F613}\u2B50\u2705\u{1F97A}\u{1F308}\u{1F608}\u{1F918}\u{1F4A6}\u2714\u{1F623}\u{1F3C3}\u{1F490}\u2639\u{1F38A}\u{1F498}\u{1F620}\u261D\u{1F615}\u{1F33A}\u{1F382}\u{1F33B}\u{1F610}\u{1F595}\u{1F49D}\u{1F64A}\u{1F639}\u{1F5E3}\u{1F4AB}\u{1F480}\u{1F451}\u{1F3B5}\u{1F91E}\u{1F61B}\u{1F534}\u{1F624}\u{1F33C}\u{1F62B}\u26BD\u{1F919}\u2615\u{1F3C6}\u{1F92B}\u{1F448}\u{1F62E}\u{1F646}\u{1F37B}\u{1F343}\u{1F436}\u{1F481}\u{1F632}\u{1F33F}\u{1F9E1}\u{1F381}\u26A1\u{1F31E}\u{1F388}\u274C\u270A\u{1F44B}\u{1F630}\u{1F928}\u{1F636}\u{1F91D}\u{1F6B6}\u{1F4B0}\u{1F353}\u{1F4A2}\u{1F91F}\u{1F641}\u{1F6A8}\u{1F4A8}\u{1F92C}\u2708\u{1F380}\u{1F37A}\u{1F913}\u{1F619}\u{1F49F}\u{1F331}\u{1F616}\u{1F476}\u{1F974}\u25B6\u27A1\u2753\u{1F48E}\u{1F4B8}\u2B07\u{1F628}\u{1F31A}\u{1F98B}\u{1F637}\u{1F57A}\u26A0\u{1F645}\u{1F61F}\u{1F635}\u{1F44E}\u{1F932}\u{1F920}\u{1F927}\u{1F4CC}\u{1F535}\u{1F485}\u{1F9D0}\u{1F43E}\u{1F352}\u{1F617}\u{1F911}\u{1F30A}\u{1F92F}\u{1F437}\u260E\u{1F4A7}\u{1F62F}\u{1F486}\u{1F446}\u{1F3A4}\u{1F647}\u{1F351}\u2744\u{1F334}\u{1F4A3}\u{1F438}\u{1F48C}\u{1F4CD}\u{1F940}\u{1F922}\u{1F445}\u{1F4A1}\u{1F4A9}\u{1F450}\u{1F4F8}\u{1F47B}\u{1F910}\u{1F92E}\u{1F3BC}\u{1F975}\u{1F6A9}\u{1F34E}\u{1F34A}\u{1F47C}\u{1F48D}\u{1F4E3}\u{1F942}"),poe=bS.reduce((t,e,r)=>(t[r]=e,t),[]),moe=bS.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);o(goe,"encode");o(boe,"decode");voe=fd({prefix:"\u{1F680}",name:"base256emoji",encode:goe,decode:boe})});function wS(t,e,r){e=e||[],r=r||0;for(var n=r;t>=_oe;)e[r++]=t&255|yS,t/=128;for(;t&woe;)e[r++]=t&255|yS,t>>>=7;return e[r]=t|0,wS.bytes=r-n+1,e}function ty(t,n){var r=0,n=n||0,i=0,s=n,a,f=t.length;do{if(s>=f)throw ty.bytes=0,new RangeError("Could not decode varint");a=t[s++],r+=i<28?(a&xS)<<i:(a&xS)*Math.pow(2,i),i+=7}while(a>=Aoe);return ty.bytes=s-n,r}var yoe,yS,xoe,woe,_oe,Eoe,Aoe,xS,Coe,Ioe,Doe,Soe,Toe,koe,Moe,Roe,Boe,Foe,Poe,Ooe,Oh,_S=Xt(()=>{yoe=wS,yS=128,xoe=127,woe=~xoe,_oe=Math.pow(2,31);o(wS,"encode");Eoe=ty,Aoe=128,xS=127;o(ty,"read");Coe=Math.pow(2,7),Ioe=Math.pow(2,14),Doe=Math.pow(2,21),Soe=Math.pow(2,28),Toe=Math.pow(2,35),koe=Math.pow(2,42),Moe=Math.pow(2,49),Roe=Math.pow(2,56),Boe=Math.pow(2,63),Foe=o(function(t){return t<Coe?1:t<Ioe?2:t<Doe?3:t<Soe?4:t<Toe?5:t<koe?6:t<Moe?7:t<Roe?8:t<Boe?9:10},"length"),Poe={encode:yoe,decode:Eoe,encodingLength:Foe},Ooe=Poe,Oh=Ooe});var Nh,ld,hd,bm=Xt(()=>{_S();Nh=o((t,e=0)=>[Oh.decode(t,e),Oh.decode.bytes],"decode"),ld=o((t,e,r=0)=>(Oh.encode(t,e,r),e),"encodeTo"),hd=o(t=>Oh.encodingLength(t),"encodingLength")});var Xs,vm,ES,wf,_f=Xt(()=>{cc();bm();Xs=o((t,e)=>{let r=e.byteLength,n=hd(t),i=n+hd(r),s=new Uint8Array(i+r);return ld(t,s,0),ld(r,s,n),s.set(e,i),new wf(t,r,e,s)},"create"),vm=o(t=>{let e=Js(t),[r,n]=Nh(e),[i,s]=Nh(e.subarray(n)),a=e.subarray(n+s);if(a.byteLength!==i)throw new Error("Incorrect length");return new wf(r,i,a,e)},"decode"),ES=o((t,e)=>t===e?!0:t.code===e.code&&t.size===e.size&&cS(t.bytes,e.bytes),"equals"),wf=class{constructor(e,r,n,i){this.code=e,this.size=r,this.digest=n,this.bytes=i}};o(wf,"Digest")});var ry,ym,ny=Xt(()=>{_f();ry=o(({name:t,code:e,encode:r})=>new ym(t,e,r),"from"),ym=class{constructor(e,r,n){this.name=e,this.code=r,this.encode=n}digest(e){if(e instanceof Uint8Array){let r=this.encode(e);return r instanceof Uint8Array?Xs(this.code,r):r.then(n=>Xs(this.code,n))}else throw Error("Unknown type, must be binary type")}};o(ym,"Hasher")});var iy={};tr(iy,{sha256:()=>uc,sha512:()=>Noe});var CS,uc,Noe,Uh=Xt(()=>{ny();CS=o(t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),"sha"),uc=ry({name:"sha2-256",code:18,encode:CS("SHA-256")}),Noe=ry({name:"sha2-512",code:19,encode:CS("SHA-512")})});var oy={};tr(oy,{identity:()=>xm});var IS,Loe,DS,Uoe,xm,sy=Xt(()=>{cc();_f();IS=0,Loe="identity",DS=Js,Uoe=o(t=>Xs(IS,DS(t)),"digest"),xm={code:IS,name:Loe,encode:DS,digest:Uoe}});var SS=Xt(()=>{cc()});var m4e,g4e,TS=Xt(()=>{m4e=new TextEncoder,g4e=new TextDecoder});var Xe,joe,Hoe,Voe,qh,zoe,kS,MS,wm,_m,Koe,Goe,Woe,So=Xt(()=>{bm();_f();pm();Jv();cc();Xe=class{constructor(e,r,n,i){this.code=r,this.version=e,this.multihash=n,this.bytes=i,this.byteOffset=i.byteOffset,this.byteLength=i.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:_m,byteLength:_m,code:wm,version:wm,multihash:wm,bytes:wm,_baseCache:_m,asCID:_m})}toV0(){switch(this.version){case 0:return this;default:{let{code:e,multihash:r}=this;if(e!==qh)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(r.code!==zoe)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return Xe.createV0(r)}}}toV1(){switch(this.version){case 0:{let{code:e,digest:r}=this.multihash,n=Xs(e,r);return Xe.createV1(this.code,n)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(e){return e&&this.code===e.code&&this.version===e.version&&ES(this.multihash,e.multihash)}toString(e){let{bytes:r,version:n,_baseCache:i}=this;switch(n){case 0:return Hoe(r,i,e||Yi.encoder);default:return Voe(r,i,e||ud.encoder)}}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(e){return Goe(/^0\.0/,Woe),!!(e&&(e[MS]||e.asCID===e))}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(e){if(e instanceof Xe)return e;if(e!=null&&e.asCID===e){let{version:r,code:n,multihash:i,bytes:s}=e;return new Xe(r,n,i,s||kS(r,n,i.bytes))}else if(e!=null&&e[MS]===!0){let{version:r,multihash:n,code:i}=e,s=vm(n);return Xe.create(r,i,s)}else return null}static create(e,r,n){if(typeof r!="number")throw new Error("String codecs are no longer supported");switch(e){case 0:{if(r!==qh)throw new Error(`Version 0 CID must use dag-pb (code: ${qh}) block encoding`);return new Xe(e,r,n,n.bytes)}case 1:{let i=kS(e,r,n.bytes);return new Xe(e,r,n,i)}default:throw new Error("Invalid version")}}static createV0(e){return Xe.create(0,qh,e)}static createV1(e,r){return Xe.create(1,e,r)}static decode(e){let[r,n]=Xe.decodeFirst(e);if(n.length)throw new Error("Incorrect length");return r}static decodeFirst(e){let r=Xe.inspectBytes(e),n=r.size-r.multihashSize,i=Js(e.subarray(n,n+r.multihashSize));if(i.byteLength!==r.multihashSize)throw new Error("Incorrect length");let s=i.subarray(r.multihashSize-r.digestSize),a=new wf(r.multihashCode,r.digestSize,s,i);return[r.version===0?Xe.createV0(a):Xe.createV1(r.codec,a),e.subarray(r.size)]}static inspectBytes(e){let r=0,n=o(()=>{let[y,I]=Nh(e.subarray(r));return r+=I,y},"next"),i=n(),s=qh;if(i===18?(i=0,r=0):i===1&&(s=n()),i!==0&&i!==1)throw new RangeError(`Invalid CID version ${i}`);let a=r,f=n(),d=n(),h=r+d,p=h-a;return{version:i,codec:s,multihashCode:f,digestSize:d,multihashSize:p,size:h}}static parse(e,r){let[n,i]=joe(e,r),s=Xe.decode(i);return s._baseCache.set(n,e),s}};o(Xe,"CID");joe=o((t,e)=>{switch(t[0]){case"Q":{let r=e||Yi;return[Yi.prefix,r.decode(`${Yi.prefix}${t}`)]}case Yi.prefix:{let r=e||Yi;return[Yi.prefix,r.decode(t)]}case ud.prefix:{let r=e||ud;return[ud.prefix,r.decode(t)]}default:{if(e==null)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[t[0],e.decode(t)]}}},"parseCIDtoBytes"),Hoe=o((t,e,r)=>{let{prefix:n}=r;if(n!==Yi.prefix)throw Error(`Cannot string encode V0 in ${r.name} encoding`);let i=e.get(n);if(i==null){let s=r.encode(t).slice(1);return e.set(n,s),s}else return i},"toStringV0"),Voe=o((t,e,r)=>{let{prefix:n}=r,i=e.get(n);if(i==null){let s=r.encode(t);return e.set(n,s),s}else return i},"toStringV1"),qh=112,zoe=18,kS=o((t,e,r)=>{let n=hd(t),i=n+hd(e),s=new Uint8Array(i+r.byteLength);return ld(t,s,0),ld(e,s,n),s.set(r,i),s},"encodeCID"),MS=Symbol.for("@ipld/js-cid/CID"),wm={writable:!1,configurable:!1,enumerable:!0},_m={writable:!1,enumerable:!1,configurable:!1},Koe="0.0.0-dev",Goe=o((t,e)=>{if(t.test(Koe))console.warn(e);else throw new Error(e)},"deprecate"),Woe=`CID.isCID(v) is deprecated and will be removed in the next major release.
|
21
|
-
Following code pattern:
|
22
|
-
|
23
|
-
if (CID.isCID(value)) {
|
24
|
-
doSomethingWithCID(value)
|
25
|
-
}
|
26
|
-
|
27
|
-
Is replaced with:
|
28
|
-
|
29
|
-
const cid = CID.asCID(value)
|
30
|
-
if (cid) {
|
31
|
-
// Make sure to use cid instead of value
|
32
|
-
doSomethingWithCID(cid)
|
33
|
-
}
|
34
|
-
`});var ay=Xt(()=>{So();bm();cc();ny();_f()});var $h,A4e,cy=Xt(()=>{lS();hS();pS();mS();gS();Jv();dd();pm();mm();vS();Uh();sy();SS();TS();ay();$h={...Vv,...zv,...Kv,...Gv,...Wv,...Yv,...Xv,...Zv,...Qv,...ey},A4e={...iy,...oy}});function BS(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}var RS,fy,Yoe,Em,uy=Xt(()=>{cy();fm();o(BS,"createCodec");RS=BS("utf8","u",t=>{let e=new TextDecoder("utf8");return"u"+e.decode(t)},t=>new TextEncoder().encode(t.substring(1))),fy=BS("ascii","a",t=>{let e="a";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},t=>{t=t.substring(1);let e=Ph(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),Yoe={utf8:RS,"utf-8":RS,hex:$h.base16,latin1:fy,ascii:fy,binary:fy,...$h},Em=Yoe});var FS={};tr(FS,{fromString:()=>$t});function $t(t,e="utf8"){let r=Em[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?yf(globalThis.Buffer.from(t,"utf-8")):r.decoder.decode(`${r.prefix}${t}`)}var Am=Xt(()=>{uy();Fh();o($t,"fromString")});var PS={};tr(PS,{toString:()=>Pt});function Pt(t,e="utf8"){let r=Em[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString("utf8"):r.encoder.encode(t).substring(1)}var pd=Xt(()=>{uy();o(Pt,"toString")});var OS=Q(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});function Joe(t,e){var r=t>>>16&65535,n=t&65535,i=e>>>16&65535,s=e&65535;return n*s+(r*s+n*i<<16>>>0)|0}o(Joe,"imulShim");gi.mul=Math.imul||Joe;function Xoe(t,e){return t+e|0}o(Xoe,"add");gi.add=Xoe;function Zoe(t,e){return t-e|0}o(Zoe,"sub");gi.sub=Zoe;function Qoe(t,e){return t<<e|t>>>32-e}o(Qoe,"rotl");gi.rotl=Qoe;function ese(t,e){return t<<32-e|t>>>e}o(ese,"rotr");gi.rotr=ese;function tse(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}o(tse,"isIntegerShim");gi.isInteger=Number.isInteger||tse;gi.MAX_SAFE_INTEGER=9007199254740991;gi.isSafeInteger=function(t){return gi.isInteger(t)&&t>=-gi.MAX_SAFE_INTEGER&&t<=gi.MAX_SAFE_INTEGER}});var Ef=Q(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});var NS=OS();function rse(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])<<16>>16}o(rse,"readInt16BE");Rt.readInt16BE=rse;function nse(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])>>>0}o(nse,"readUint16BE");Rt.readUint16BE=nse;function ise(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])<<16>>16}o(ise,"readInt16LE");Rt.readInt16LE=ise;function ose(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])>>>0}o(ose,"readUint16LE");Rt.readUint16LE=ose;function LS(t,e,r){return e===void 0&&(e=new Uint8Array(2)),r===void 0&&(r=0),e[r+0]=t>>>8,e[r+1]=t>>>0,e}o(LS,"writeUint16BE");Rt.writeUint16BE=LS;Rt.writeInt16BE=LS;function US(t,e,r){return e===void 0&&(e=new Uint8Array(2)),r===void 0&&(r=0),e[r+0]=t>>>0,e[r+1]=t>>>8,e}o(US,"writeUint16LE");Rt.writeUint16LE=US;Rt.writeInt16LE=US;function dy(t,e){return e===void 0&&(e=0),t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]}o(dy,"readInt32BE");Rt.readInt32BE=dy;function ly(t,e){return e===void 0&&(e=0),(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}o(ly,"readUint32BE");Rt.readUint32BE=ly;function hy(t,e){return e===void 0&&(e=0),t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e]}o(hy,"readInt32LE");Rt.readInt32LE=hy;function py(t,e){return e===void 0&&(e=0),(t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e])>>>0}o(py,"readUint32LE");Rt.readUint32LE=py;function Cm(t,e,r){return e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0),e[r+0]=t>>>24,e[r+1]=t>>>16,e[r+2]=t>>>8,e[r+3]=t>>>0,e}o(Cm,"writeUint32BE");Rt.writeUint32BE=Cm;Rt.writeInt32BE=Cm;function Im(t,e,r){return e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0),e[r+0]=t>>>0,e[r+1]=t>>>8,e[r+2]=t>>>16,e[r+3]=t>>>24,e}o(Im,"writeUint32LE");Rt.writeUint32LE=Im;Rt.writeInt32LE=Im;function sse(t,e){e===void 0&&(e=0);var r=dy(t,e),n=dy(t,e+4);return r*4294967296+n-(n>>31)*4294967296}o(sse,"readInt64BE");Rt.readInt64BE=sse;function ase(t,e){e===void 0&&(e=0);var r=ly(t,e),n=ly(t,e+4);return r*4294967296+n}o(ase,"readUint64BE");Rt.readUint64BE=ase;function cse(t,e){e===void 0&&(e=0);var r=hy(t,e),n=hy(t,e+4);return n*4294967296+r-(r>>31)*4294967296}o(cse,"readInt64LE");Rt.readInt64LE=cse;function fse(t,e){e===void 0&&(e=0);var r=py(t,e),n=py(t,e+4);return n*4294967296+r}o(fse,"readUint64LE");Rt.readUint64LE=fse;function qS(t,e,r){return e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0),Cm(t/4294967296>>>0,e,r),Cm(t>>>0,e,r+4),e}o(qS,"writeUint64BE");Rt.writeUint64BE=qS;Rt.writeInt64BE=qS;function $S(t,e,r){return e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0),Im(t>>>0,e,r),Im(t/4294967296>>>0,e,r+4),e}o($S,"writeUint64LE");Rt.writeUint64LE=$S;Rt.writeInt64LE=$S;function use(t,e,r){if(r===void 0&&(r=0),t%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(t/8>e.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var n=0,i=1,s=t/8+r-1;s>=r;s--)n+=e[s]*i,i*=256;return n}o(use,"readUintBE");Rt.readUintBE=use;function dse(t,e,r){if(r===void 0&&(r=0),t%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(t/8>e.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,i=1,s=r;s<r+t/8;s++)n+=e[s]*i,i*=256;return n}o(dse,"readUintLE");Rt.readUintLE=dse;function lse(t,e,r,n){if(r===void 0&&(r=new Uint8Array(t/8)),n===void 0&&(n=0),t%8!==0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!NS.isSafeInteger(e))throw new Error("writeUintBE value must be an integer");for(var i=1,s=t/8+n-1;s>=n;s--)r[s]=e/i&255,i*=256;return r}o(lse,"writeUintBE");Rt.writeUintBE=lse;function hse(t,e,r,n){if(r===void 0&&(r=new Uint8Array(t/8)),n===void 0&&(n=0),t%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!NS.isSafeInteger(e))throw new Error("writeUintLE value must be an integer");for(var i=1,s=n;s<n+t/8;s++)r[s]=e/i&255,i*=256;return r}o(hse,"writeUintLE");Rt.writeUintLE=hse;function pse(t,e){e===void 0&&(e=0);var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getFloat32(e)}o(pse,"readFloat32BE");Rt.readFloat32BE=pse;function mse(t,e){e===void 0&&(e=0);var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getFloat32(e,!0)}o(mse,"readFloat32LE");Rt.readFloat32LE=mse;function gse(t,e){e===void 0&&(e=0);var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getFloat64(e)}o(gse,"readFloat64BE");Rt.readFloat64BE=gse;function bse(t,e){e===void 0&&(e=0);var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getFloat64(e,!0)}o(bse,"readFloat64LE");Rt.readFloat64LE=bse;function vse(t,e,r){e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0);var n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.setFloat32(r,t),e}o(vse,"writeFloat32BE");Rt.writeFloat32BE=vse;function yse(t,e,r){e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0);var n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.setFloat32(r,t,!0),e}o(yse,"writeFloat32LE");Rt.writeFloat32LE=yse;function xse(t,e,r){e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0);var n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.setFloat64(r,t),e}o(xse,"writeFloat64BE");Rt.writeFloat64BE=xse;function wse(t,e,r){e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0);var n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.setFloat64(r,t,!0),e}o(wse,"writeFloat64LE");Rt.writeFloat64LE=wse});var Xi=Q(my=>{"use strict";Object.defineProperty(my,"__esModule",{value:!0});function _se(t){for(var e=0;e<t.length;e++)t[e]=0;return t}o(_se,"wipe");my.wipe=_se});var HS=Q(dc=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});var Sm=Ef(),Dm=Xi();dc.DIGEST_LENGTH=32;dc.BLOCK_SIZE=64;var jS=function(){function t(){this.digestLength=dc.DIGEST_LENGTH,this.blockSize=dc.BLOCK_SIZE,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return o(t,"SHA256"),t.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},t.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},t.prototype.clean=function(){Dm.wipe(this._buffer),Dm.wipe(this._temp),this.reset()},t.prototype.update=function(e,r){if(r===void 0&&(r=e.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var n=0;if(this._bytesHashed+=r,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&r>0;)this._buffer[this._bufferLength++]=e[n++],r--;this._bufferLength===this.blockSize&&(gy(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(r>=this.blockSize&&(n=gy(this._temp,this._state,e,n,r),r%=this.blockSize);r>0;)this._buffer[this._bufferLength++]=e[n++],r--;return this},t.prototype.finish=function(e){if(!this._finished){var r=this._bytesHashed,n=this._bufferLength,i=r/536870912|0,s=r<<3,a=r%64<56?64:128;this._buffer[n]=128;for(var f=n+1;f<a-8;f++)this._buffer[f]=0;Sm.writeUint32BE(i,this._buffer,a-8),Sm.writeUint32BE(s,this._buffer,a-4),gy(this._temp,this._state,this._buffer,0,a),this._finished=!0}for(var f=0;f<this.digestLength/4;f++)Sm.writeUint32BE(this._state[f],e,f*4);return this},t.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},t.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},t.prototype.restoreState=function(e){return this._state.set(e.state),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},t.prototype.cleanSavedState=function(e){Dm.wipe(e.state),e.buffer&&Dm.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},t}();dc.SHA256=jS;var Ese=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function gy(t,e,r,n,i){for(;i>=64;){for(var s=e[0],a=e[1],f=e[2],d=e[3],h=e[4],p=e[5],y=e[6],I=e[7],T=0;T<16;T++){var D=n+T*4;t[T]=Sm.readUint32BE(r,D)}for(var T=16;T<64;T++){var R=t[T-2],H=(R>>>17|R<<32-17)^(R>>>19|R<<32-19)^R>>>10;R=t[T-15];var F=(R>>>7|R<<32-7)^(R>>>18|R<<32-18)^R>>>3;t[T]=(H+t[T-7]|0)+(F+t[T-16]|0)}for(var T=0;T<64;T++){var H=(((h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7))+(h&p^~h&y)|0)+(I+(Ese[T]+t[T]|0)|0)|0,F=((s>>>2|s<<32-2)^(s>>>13|s<<32-13)^(s>>>22|s<<32-22))+(s&a^s&f^a&f)|0;I=y,y=p,p=h,h=d+H|0,d=f,f=a,a=s,s=H+F|0}e[0]+=s,e[1]+=a,e[2]+=f,e[3]+=d,e[4]+=h,e[5]+=p,e[6]+=y,e[7]+=I,n+=64,i-=64}return n}o(gy,"hashBlocks");function Ase(t){var e=new jS;e.update(t);var r=e.digest();return e.clean(),r}o(Ase,"hash");dc.hash=Ase});var by=Q((W4e,Tm)=>{(function(){"use strict";var t="input is invalid type",e="finalize already called",r=typeof window=="object",n=r?window:{};n.JS_SHA3_NO_WINDOW&&(r=!1);var i=!r&&typeof self=="object",s=!n.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;s?n=global:i&&(n=self);var a=!n.JS_SHA3_NO_COMMON_JS&&typeof Tm=="object"&&Tm.exports,f=typeof define=="function"&&define.amd,d=!n.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",h="0123456789abcdef".split(""),p=[31,7936,2031616,520093696],y=[4,1024,262144,67108864],I=[1,256,65536,16777216],T=[6,1536,393216,100663296],D=[0,8,16,24],R=[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],H=[224,256,384,512],F=[128,256],V=["hex","buffer","arrayBuffer","array","digest"],X={128:168,256:136};(n.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(B){return Object.prototype.toString.call(B)==="[object Array]"}),d&&(n.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(B){return typeof B=="object"&&B.buffer&&B.buffer.constructor===ArrayBuffer});for(var J=o(function(B,ee,ae){return function(q){return new w(B,ee,B).update(q)[ae]()}},"createOutputMethod"),re=o(function(B,ee,ae){return function(q,U){return new w(B,ee,U).update(q)[ae]()}},"createShakeOutputMethod"),z=o(function(B,ee,ae){return function(q,U,te,oe){return l["cshake"+B].update(q,U,te,oe)[ae]()}},"createCshakeOutputMethod"),$=o(function(B,ee,ae){return function(q,U,te,oe){return l["kmac"+B].update(q,U,te,oe)[ae]()}},"createKmacOutputMethod"),G=o(function(B,ee,ae,q){for(var U=0;U<V.length;++U){var te=V[U];B[te]=ee(ae,q,te)}return B},"createOutputMethods"),le=o(function(B,ee){var ae=J(B,ee,"hex");return ae.create=function(){return new w(B,ee,B)},ae.update=function(q){return ae.create().update(q)},G(ae,J,B,ee)},"createMethod"),P=o(function(B,ee){var ae=re(B,ee,"hex");return ae.create=function(q){return new w(B,ee,q)},ae.update=function(q,U){return ae.create(U).update(q)},G(ae,re,B,ee)},"createShakeMethod"),g=o(function(B,ee){var ae=X[B],q=z(B,ee,"hex");return q.create=function(U,te,oe){return!te&&!oe?l["shake"+B].create(U):new w(B,ee,U).bytepad([te,oe],ae)},q.update=function(U,te,oe,ce){return q.create(te,oe,ce).update(U)},G(q,z,B,ee)},"createCshakeMethod"),_=o(function(B,ee){var ae=X[B],q=$(B,ee,"hex");return q.create=function(U,te,oe){return new M(B,ee,te).bytepad(["KMAC",oe],ae).bytepad([U],ae)},q.update=function(U,te,oe,ce){return q.create(U,oe,ce).update(te)},G(q,$,B,ee)},"createKmacMethod"),v=[{name:"keccak",padding:I,bits:H,createMethod:le},{name:"sha3",padding:T,bits:H,createMethod:le},{name:"shake",padding:p,bits:F,createMethod:P},{name:"cshake",padding:y,bits:F,createMethod:g},{name:"kmac",padding:y,bits:F,createMethod:_}],l={},b=[],E=0;E<v.length;++E)for(var C=v[E],A=C.bits,x=0;x<A.length;++x){var k=C.name+"_"+A[x];if(b.push(k),l[k]=C.createMethod(A[x],C.padding),C.name!=="sha3"){var O=C.name+A[x];b.push(O),l[O]=l[k]}}function w(B,ee,ae){this.blocks=[],this.s=[],this.padding=ee,this.outputBits=ae,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(B<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=ae>>5,this.extraBytes=(ae&31)>>3;for(var q=0;q<50;++q)this.s[q]=0}o(w,"Keccak"),w.prototype.update=function(B){if(this.finalized)throw new Error(e);var ee,ae=typeof B;if(ae!=="string"){if(ae==="object"){if(B===null)throw new Error(t);if(d&&B.constructor===ArrayBuffer)B=new Uint8Array(B);else if(!Array.isArray(B)&&(!d||!ArrayBuffer.isView(B)))throw new Error(t)}else throw new Error(t);ee=!0}for(var q=this.blocks,U=this.byteCount,te=B.length,oe=this.blockCount,ce=0,Ce=this.s,ve,ie;ce<te;){if(this.reset)for(this.reset=!1,q[0]=this.block,ve=1;ve<oe+1;++ve)q[ve]=0;if(ee)for(ve=this.start;ce<te&&ve<U;++ce)q[ve>>2]|=B[ce]<<D[ve++&3];else for(ve=this.start;ce<te&&ve<U;++ce)ie=B.charCodeAt(ce),ie<128?q[ve>>2]|=ie<<D[ve++&3]:ie<2048?(q[ve>>2]|=(192|ie>>6)<<D[ve++&3],q[ve>>2]|=(128|ie&63)<<D[ve++&3]):ie<55296||ie>=57344?(q[ve>>2]|=(224|ie>>12)<<D[ve++&3],q[ve>>2]|=(128|ie>>6&63)<<D[ve++&3],q[ve>>2]|=(128|ie&63)<<D[ve++&3]):(ie=65536+((ie&1023)<<10|B.charCodeAt(++ce)&1023),q[ve>>2]|=(240|ie>>18)<<D[ve++&3],q[ve>>2]|=(128|ie>>12&63)<<D[ve++&3],q[ve>>2]|=(128|ie>>6&63)<<D[ve++&3],q[ve>>2]|=(128|ie&63)<<D[ve++&3]);if(this.lastByteIndex=ve,ve>=U){for(this.start=ve-U,this.block=q[oe],ve=0;ve<oe;++ve)Ce[ve]^=q[ve];he(Ce),this.reset=!0}else this.start=ve}return this},w.prototype.encode=function(B,ee){var ae=B&255,q=1,U=[ae];for(B=B>>8,ae=B&255;ae>0;)U.unshift(ae),B=B>>8,ae=B&255,++q;return ee?U.push(q):U.unshift(q),this.update(U),U.length},w.prototype.encodeString=function(B){var ee,ae=typeof B;if(ae!=="string"){if(ae==="object"){if(B===null)throw new Error(t);if(d&&B.constructor===ArrayBuffer)B=new Uint8Array(B);else if(!Array.isArray(B)&&(!d||!ArrayBuffer.isView(B)))throw new Error(t)}else throw new Error(t);ee=!0}var q=0,U=B.length;if(ee)q=U;else for(var te=0;te<B.length;++te){var oe=B.charCodeAt(te);oe<128?q+=1:oe<2048?q+=2:oe<55296||oe>=57344?q+=3:(oe=65536+((oe&1023)<<10|B.charCodeAt(++te)&1023),q+=4)}return q+=this.encode(q*8),this.update(B),q},w.prototype.bytepad=function(B,ee){for(var ae=this.encode(ee),q=0;q<B.length;++q)ae+=this.encodeString(B[q]);var U=ee-ae%ee,te=[];return te.length=U,this.update(te),this},w.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var B=this.blocks,ee=this.lastByteIndex,ae=this.blockCount,q=this.s;if(B[ee>>2]|=this.padding[ee&3],this.lastByteIndex===this.byteCount)for(B[0]=B[ae],ee=1;ee<ae+1;++ee)B[ee]=0;for(B[ae-1]|=2147483648,ee=0;ee<ae;++ee)q[ee]^=B[ee];he(q)}},w.prototype.toString=w.prototype.hex=function(){this.finalize();for(var B=this.blockCount,ee=this.s,ae=this.outputBlocks,q=this.extraBytes,U=0,te=0,oe="",ce;te<ae;){for(U=0;U<B&&te<ae;++U,++te)ce=ee[U],oe+=h[ce>>4&15]+h[ce&15]+h[ce>>12&15]+h[ce>>8&15]+h[ce>>20&15]+h[ce>>16&15]+h[ce>>28&15]+h[ce>>24&15];te%B===0&&(he(ee),U=0)}return q&&(ce=ee[U],oe+=h[ce>>4&15]+h[ce&15],q>1&&(oe+=h[ce>>12&15]+h[ce>>8&15]),q>2&&(oe+=h[ce>>20&15]+h[ce>>16&15])),oe},w.prototype.arrayBuffer=function(){this.finalize();var B=this.blockCount,ee=this.s,ae=this.outputBlocks,q=this.extraBytes,U=0,te=0,oe=this.outputBits>>3,ce;q?ce=new ArrayBuffer(ae+1<<2):ce=new ArrayBuffer(oe);for(var Ce=new Uint32Array(ce);te<ae;){for(U=0;U<B&&te<ae;++U,++te)Ce[te]=ee[U];te%B===0&&he(ee)}return q&&(Ce[U]=ee[U],ce=ce.slice(0,oe)),ce},w.prototype.buffer=w.prototype.arrayBuffer,w.prototype.digest=w.prototype.array=function(){this.finalize();for(var B=this.blockCount,ee=this.s,ae=this.outputBlocks,q=this.extraBytes,U=0,te=0,oe=[],ce,Ce;te<ae;){for(U=0;U<B&&te<ae;++U,++te)ce=te<<2,Ce=ee[U],oe[ce]=Ce&255,oe[ce+1]=Ce>>8&255,oe[ce+2]=Ce>>16&255,oe[ce+3]=Ce>>24&255;te%B===0&&he(ee)}return q&&(ce=te<<2,Ce=ee[U],oe[ce]=Ce&255,q>1&&(oe[ce+1]=Ce>>8&255),q>2&&(oe[ce+2]=Ce>>16&255)),oe};function M(B,ee,ae){w.call(this,B,ee,ae)}o(M,"Kmac"),M.prototype=new w,M.prototype.finalize=function(){return this.encode(this.outputBits,!0),w.prototype.finalize.call(this)};var he=o(function(B){var ee,ae,q,U,te,oe,ce,Ce,ve,ie,De,ue,ye,W,me,ke,ze,Oe,Je,Dr,de,se,L,Z,ge,we,Ee,Me,Ot,$e,Fe,qt,We,Ze,ii,at,ct,Ti,ft,ot,ki,ut,dt,On,lt,rt,Mi,ht,pt,Ri,mt,gt,Bi,bt,st,oi,Vt,zt,Nn,Ln,Un,en,qn;for(q=0;q<48;q+=2)U=B[0]^B[10]^B[20]^B[30]^B[40],te=B[1]^B[11]^B[21]^B[31]^B[41],oe=B[2]^B[12]^B[22]^B[32]^B[42],ce=B[3]^B[13]^B[23]^B[33]^B[43],Ce=B[4]^B[14]^B[24]^B[34]^B[44],ve=B[5]^B[15]^B[25]^B[35]^B[45],ie=B[6]^B[16]^B[26]^B[36]^B[46],De=B[7]^B[17]^B[27]^B[37]^B[47],ue=B[8]^B[18]^B[28]^B[38]^B[48],ye=B[9]^B[19]^B[29]^B[39]^B[49],ee=ue^(oe<<1|ce>>>31),ae=ye^(ce<<1|oe>>>31),B[0]^=ee,B[1]^=ae,B[10]^=ee,B[11]^=ae,B[20]^=ee,B[21]^=ae,B[30]^=ee,B[31]^=ae,B[40]^=ee,B[41]^=ae,ee=U^(Ce<<1|ve>>>31),ae=te^(ve<<1|Ce>>>31),B[2]^=ee,B[3]^=ae,B[12]^=ee,B[13]^=ae,B[22]^=ee,B[23]^=ae,B[32]^=ee,B[33]^=ae,B[42]^=ee,B[43]^=ae,ee=oe^(ie<<1|De>>>31),ae=ce^(De<<1|ie>>>31),B[4]^=ee,B[5]^=ae,B[14]^=ee,B[15]^=ae,B[24]^=ee,B[25]^=ae,B[34]^=ee,B[35]^=ae,B[44]^=ee,B[45]^=ae,ee=Ce^(ue<<1|ye>>>31),ae=ve^(ye<<1|ue>>>31),B[6]^=ee,B[7]^=ae,B[16]^=ee,B[17]^=ae,B[26]^=ee,B[27]^=ae,B[36]^=ee,B[37]^=ae,B[46]^=ee,B[47]^=ae,ee=ie^(U<<1|te>>>31),ae=De^(te<<1|U>>>31),B[8]^=ee,B[9]^=ae,B[18]^=ee,B[19]^=ae,B[28]^=ee,B[29]^=ae,B[38]^=ee,B[39]^=ae,B[48]^=ee,B[49]^=ae,W=B[0],me=B[1],rt=B[11]<<4|B[10]>>>28,Mi=B[10]<<4|B[11]>>>28,Me=B[20]<<3|B[21]>>>29,Ot=B[21]<<3|B[20]>>>29,Ln=B[31]<<9|B[30]>>>23,Un=B[30]<<9|B[31]>>>23,ut=B[40]<<18|B[41]>>>14,dt=B[41]<<18|B[40]>>>14,Ze=B[2]<<1|B[3]>>>31,ii=B[3]<<1|B[2]>>>31,ke=B[13]<<12|B[12]>>>20,ze=B[12]<<12|B[13]>>>20,ht=B[22]<<10|B[23]>>>22,pt=B[23]<<10|B[22]>>>22,$e=B[33]<<13|B[32]>>>19,Fe=B[32]<<13|B[33]>>>19,en=B[42]<<2|B[43]>>>30,qn=B[43]<<2|B[42]>>>30,bt=B[5]<<30|B[4]>>>2,st=B[4]<<30|B[5]>>>2,at=B[14]<<6|B[15]>>>26,ct=B[15]<<6|B[14]>>>26,Oe=B[25]<<11|B[24]>>>21,Je=B[24]<<11|B[25]>>>21,Ri=B[34]<<15|B[35]>>>17,mt=B[35]<<15|B[34]>>>17,qt=B[45]<<29|B[44]>>>3,We=B[44]<<29|B[45]>>>3,Z=B[6]<<28|B[7]>>>4,ge=B[7]<<28|B[6]>>>4,oi=B[17]<<23|B[16]>>>9,Vt=B[16]<<23|B[17]>>>9,Ti=B[26]<<25|B[27]>>>7,ft=B[27]<<25|B[26]>>>7,Dr=B[36]<<21|B[37]>>>11,de=B[37]<<21|B[36]>>>11,gt=B[47]<<24|B[46]>>>8,Bi=B[46]<<24|B[47]>>>8,On=B[8]<<27|B[9]>>>5,lt=B[9]<<27|B[8]>>>5,we=B[18]<<20|B[19]>>>12,Ee=B[19]<<20|B[18]>>>12,zt=B[29]<<7|B[28]>>>25,Nn=B[28]<<7|B[29]>>>25,ot=B[38]<<8|B[39]>>>24,ki=B[39]<<8|B[38]>>>24,se=B[48]<<14|B[49]>>>18,L=B[49]<<14|B[48]>>>18,B[0]=W^~ke&Oe,B[1]=me^~ze&Je,B[10]=Z^~we&Me,B[11]=ge^~Ee&Ot,B[20]=Ze^~at&Ti,B[21]=ii^~ct&ft,B[30]=On^~rt&ht,B[31]=lt^~Mi&pt,B[40]=bt^~oi&zt,B[41]=st^~Vt&Nn,B[2]=ke^~Oe&Dr,B[3]=ze^~Je&de,B[12]=we^~Me&$e,B[13]=Ee^~Ot&Fe,B[22]=at^~Ti&ot,B[23]=ct^~ft&ki,B[32]=rt^~ht&Ri,B[33]=Mi^~pt&mt,B[42]=oi^~zt&Ln,B[43]=Vt^~Nn&Un,B[4]=Oe^~Dr&se,B[5]=Je^~de&L,B[14]=Me^~$e&qt,B[15]=Ot^~Fe&We,B[24]=Ti^~ot&ut,B[25]=ft^~ki&dt,B[34]=ht^~Ri>,B[35]=pt^~mt&Bi,B[44]=zt^~Ln&en,B[45]=Nn^~Un&qn,B[6]=Dr^~se&W,B[7]=de^~L&me,B[16]=$e^~qt&Z,B[17]=Fe^~We&ge,B[26]=ot^~ut&Ze,B[27]=ki^~dt&ii,B[36]=Ri^~gt&On,B[37]=mt^~Bi<,B[46]=Ln^~en&bt,B[47]=Un^~qn&st,B[8]=se^~W&ke,B[9]=L^~me&ze,B[18]=qt^~Z&we,B[19]=We^~ge&Ee,B[28]=ut^~Ze&at,B[29]=dt^~ii&ct,B[38]=gt^~On&rt,B[39]=Bi^~lt&Mi,B[48]=en^~bt&oi,B[49]=qn^~st&Vt,B[0]^=R[q],B[1]^=R[q+1]},"f");if(a)Tm.exports=l;else{for(E=0;E<b.length;++E)n[b[E]]=l[b[E]];f&&define(function(){return l})}})()});var VS=Q((Y4e,Cse)=>{Cse.exports={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}});var vy=Q(()=>{});var ss=Q((zS,yy)=>{(function(t,e){"use strict";function r(P,g){if(!P)throw new Error(g||"Assertion failed")}o(r,"assert");function n(P,g){P.super_=g;var _=o(function(){},"TempCtor");_.prototype=g.prototype,P.prototype=new _,P.prototype.constructor=P}o(n,"inherits");function i(P,g,_){if(i.isBN(P))return P;this.negative=0,this.words=null,this.length=0,this.red=null,P!==null&&((g==="le"||g==="be")&&(_=g,g=10),this._init(P||0,g||10,_||"be"))}o(i,"BN"),typeof t=="object"?t.exports=i:e.BN=i,i.BN=i,i.wordSize=26;var s;try{typeof window<"u"&&typeof window.Buffer<"u"?s=window.Buffer:s=vy().Buffer}catch{}i.isBN=o(function(g){return g instanceof i?!0:g!==null&&typeof g=="object"&&g.constructor.wordSize===i.wordSize&&Array.isArray(g.words)},"isBN"),i.max=o(function(g,_){return g.cmp(_)>0?g:_},"max"),i.min=o(function(g,_){return g.cmp(_)<0?g:_},"min"),i.prototype._init=o(function(g,_,v){if(typeof g=="number")return this._initNumber(g,_,v);if(typeof g=="object")return this._initArray(g,_,v);_==="hex"&&(_=16),r(_===(_|0)&&_>=2&&_<=36),g=g.toString().replace(/\s+/g,"");var l=0;g[0]==="-"&&(l++,this.negative=1),l<g.length&&(_===16?this._parseHex(g,l,v):(this._parseBase(g,_,l),v==="le"&&this._initArray(this.toArray(),_,v)))},"init"),i.prototype._initNumber=o(function(g,_,v){g<0&&(this.negative=1,g=-g),g<67108864?(this.words=[g&67108863],this.length=1):g<4503599627370496?(this.words=[g&67108863,g/67108864&67108863],this.length=2):(r(g<9007199254740992),this.words=[g&67108863,g/67108864&67108863,1],this.length=3),v==="le"&&this._initArray(this.toArray(),_,v)},"_initNumber"),i.prototype._initArray=o(function(g,_,v){if(r(typeof g.length=="number"),g.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(g.length/3),this.words=new Array(this.length);for(var l=0;l<this.length;l++)this.words[l]=0;var b,E,C=0;if(v==="be")for(l=g.length-1,b=0;l>=0;l-=3)E=g[l]|g[l-1]<<8|g[l-2]<<16,this.words[b]|=E<<C&67108863,this.words[b+1]=E>>>26-C&67108863,C+=24,C>=26&&(C-=26,b++);else if(v==="le")for(l=0,b=0;l<g.length;l+=3)E=g[l]|g[l+1]<<8|g[l+2]<<16,this.words[b]|=E<<C&67108863,this.words[b+1]=E>>>26-C&67108863,C+=24,C>=26&&(C-=26,b++);return this.strip()},"_initArray");function a(P,g){var _=P.charCodeAt(g);return _>=65&&_<=70?_-55:_>=97&&_<=102?_-87:_-48&15}o(a,"parseHex4Bits");function f(P,g,_){var v=a(P,_);return _-1>=g&&(v|=a(P,_-1)<<4),v}o(f,"parseHexByte"),i.prototype._parseHex=o(function(g,_,v){this.length=Math.ceil((g.length-_)/6),this.words=new Array(this.length);for(var l=0;l<this.length;l++)this.words[l]=0;var b=0,E=0,C;if(v==="be")for(l=g.length-1;l>=_;l-=2)C=f(g,_,l)<<b,this.words[E]|=C&67108863,b>=18?(b-=18,E+=1,this.words[E]|=C>>>26):b+=8;else{var A=g.length-_;for(l=A%2===0?_+1:_;l<g.length;l+=2)C=f(g,_,l)<<b,this.words[E]|=C&67108863,b>=18?(b-=18,E+=1,this.words[E]|=C>>>26):b+=8}this.strip()},"_parseHex");function d(P,g,_,v){for(var l=0,b=Math.min(P.length,_),E=g;E<b;E++){var C=P.charCodeAt(E)-48;l*=v,C>=49?l+=C-49+10:C>=17?l+=C-17+10:l+=C}return l}o(d,"parseBase"),i.prototype._parseBase=o(function(g,_,v){this.words=[0],this.length=1;for(var l=0,b=1;b<=67108863;b*=_)l++;l--,b=b/_|0;for(var E=g.length-v,C=E%l,A=Math.min(E,E-C)+v,x=0,k=v;k<A;k+=l)x=d(g,k,k+l,_),this.imuln(b),this.words[0]+x<67108864?this.words[0]+=x:this._iaddn(x);if(C!==0){var O=1;for(x=d(g,k,g.length,_),k=0;k<C;k++)O*=_;this.imuln(O),this.words[0]+x<67108864?this.words[0]+=x:this._iaddn(x)}this.strip()},"_parseBase"),i.prototype.copy=o(function(g){g.words=new Array(this.length);for(var _=0;_<this.length;_++)g.words[_]=this.words[_];g.length=this.length,g.negative=this.negative,g.red=this.red},"copy"),i.prototype.clone=o(function(){var g=new i(null);return this.copy(g),g},"clone"),i.prototype._expand=o(function(g){for(;this.length<g;)this.words[this.length++]=0;return this},"_expand"),i.prototype.strip=o(function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},"strip"),i.prototype._normSign=o(function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},"_normSign"),i.prototype.inspect=o(function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"},"inspect");var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],y=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=o(function(g,_){g=g||10,_=_|0||1;var v;if(g===16||g==="hex"){v="";for(var l=0,b=0,E=0;E<this.length;E++){var C=this.words[E],A=((C<<l|b)&16777215).toString(16);b=C>>>24-l&16777215,b!==0||E!==this.length-1?v=h[6-A.length]+A+v:v=A+v,l+=2,l>=26&&(l-=26,E--)}for(b!==0&&(v=b.toString(16)+v);v.length%_!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}if(g===(g|0)&&g>=2&&g<=36){var x=p[g],k=y[g];v="";var O=this.clone();for(O.negative=0;!O.isZero();){var w=O.modn(k).toString(g);O=O.idivn(k),O.isZero()?v=w+v:v=h[x-w.length]+w+v}for(this.isZero()&&(v="0"+v);v.length%_!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}r(!1,"Base should be between 2 and 36")},"toString"),i.prototype.toNumber=o(function(){var g=this.words[0];return this.length===2?g+=this.words[1]*67108864:this.length===3&&this.words[2]===1?g+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-g:g},"toNumber"),i.prototype.toJSON=o(function(){return this.toString(16)},"toJSON"),i.prototype.toBuffer=o(function(g,_){return r(typeof s<"u"),this.toArrayLike(s,g,_)},"toBuffer"),i.prototype.toArray=o(function(g,_){return this.toArrayLike(Array,g,_)},"toArray"),i.prototype.toArrayLike=o(function(g,_,v){var l=this.byteLength(),b=v||Math.max(1,l);r(l<=b,"byte array longer than desired length"),r(b>0,"Requested array length <= 0"),this.strip();var E=_==="le",C=new g(b),A,x,k=this.clone();if(E){for(x=0;!k.isZero();x++)A=k.andln(255),k.iushrn(8),C[x]=A;for(;x<b;x++)C[x]=0}else{for(x=0;x<b-l;x++)C[x]=0;for(x=0;!k.isZero();x++)A=k.andln(255),k.iushrn(8),C[b-x-1]=A}return C},"toArrayLike"),Math.clz32?i.prototype._countBits=o(function(g){return 32-Math.clz32(g)},"_countBits"):i.prototype._countBits=o(function(g){var _=g,v=0;return _>=4096&&(v+=13,_>>>=13),_>=64&&(v+=7,_>>>=7),_>=8&&(v+=4,_>>>=4),_>=2&&(v+=2,_>>>=2),v+_},"_countBits"),i.prototype._zeroBits=o(function(g){if(g===0)return 26;var _=g,v=0;return(_&8191)===0&&(v+=13,_>>>=13),(_&127)===0&&(v+=7,_>>>=7),(_&15)===0&&(v+=4,_>>>=4),(_&3)===0&&(v+=2,_>>>=2),(_&1)===0&&v++,v},"_zeroBits"),i.prototype.bitLength=o(function(){var g=this.words[this.length-1],_=this._countBits(g);return(this.length-1)*26+_},"bitLength");function I(P){for(var g=new Array(P.bitLength()),_=0;_<g.length;_++){var v=_/26|0,l=_%26;g[_]=(P.words[v]&1<<l)>>>l}return g}o(I,"toBitArray"),i.prototype.zeroBits=o(function(){if(this.isZero())return 0;for(var g=0,_=0;_<this.length;_++){var v=this._zeroBits(this.words[_]);if(g+=v,v!==26)break}return g},"zeroBits"),i.prototype.byteLength=o(function(){return Math.ceil(this.bitLength()/8)},"byteLength"),i.prototype.toTwos=o(function(g){return this.negative!==0?this.abs().inotn(g).iaddn(1):this.clone()},"toTwos"),i.prototype.fromTwos=o(function(g){return this.testn(g-1)?this.notn(g).iaddn(1).ineg():this.clone()},"fromTwos"),i.prototype.isNeg=o(function(){return this.negative!==0},"isNeg"),i.prototype.neg=o(function(){return this.clone().ineg()},"neg"),i.prototype.ineg=o(function(){return this.isZero()||(this.negative^=1),this},"ineg"),i.prototype.iuor=o(function(g){for(;this.length<g.length;)this.words[this.length++]=0;for(var _=0;_<g.length;_++)this.words[_]=this.words[_]|g.words[_];return this.strip()},"iuor"),i.prototype.ior=o(function(g){return r((this.negative|g.negative)===0),this.iuor(g)},"ior"),i.prototype.or=o(function(g){return this.length>g.length?this.clone().ior(g):g.clone().ior(this)},"or"),i.prototype.uor=o(function(g){return this.length>g.length?this.clone().iuor(g):g.clone().iuor(this)},"uor"),i.prototype.iuand=o(function(g){var _;this.length>g.length?_=g:_=this;for(var v=0;v<_.length;v++)this.words[v]=this.words[v]&g.words[v];return this.length=_.length,this.strip()},"iuand"),i.prototype.iand=o(function(g){return r((this.negative|g.negative)===0),this.iuand(g)},"iand"),i.prototype.and=o(function(g){return this.length>g.length?this.clone().iand(g):g.clone().iand(this)},"and"),i.prototype.uand=o(function(g){return this.length>g.length?this.clone().iuand(g):g.clone().iuand(this)},"uand"),i.prototype.iuxor=o(function(g){var _,v;this.length>g.length?(_=this,v=g):(_=g,v=this);for(var l=0;l<v.length;l++)this.words[l]=_.words[l]^v.words[l];if(this!==_)for(;l<_.length;l++)this.words[l]=_.words[l];return this.length=_.length,this.strip()},"iuxor"),i.prototype.ixor=o(function(g){return r((this.negative|g.negative)===0),this.iuxor(g)},"ixor"),i.prototype.xor=o(function(g){return this.length>g.length?this.clone().ixor(g):g.clone().ixor(this)},"xor"),i.prototype.uxor=o(function(g){return this.length>g.length?this.clone().iuxor(g):g.clone().iuxor(this)},"uxor"),i.prototype.inotn=o(function(g){r(typeof g=="number"&&g>=0);var _=Math.ceil(g/26)|0,v=g%26;this._expand(_),v>0&&_--;for(var l=0;l<_;l++)this.words[l]=~this.words[l]&67108863;return v>0&&(this.words[l]=~this.words[l]&67108863>>26-v),this.strip()},"inotn"),i.prototype.notn=o(function(g){return this.clone().inotn(g)},"notn"),i.prototype.setn=o(function(g,_){r(typeof g=="number"&&g>=0);var v=g/26|0,l=g%26;return this._expand(v+1),_?this.words[v]=this.words[v]|1<<l:this.words[v]=this.words[v]&~(1<<l),this.strip()},"setn"),i.prototype.iadd=o(function(g){var _;if(this.negative!==0&&g.negative===0)return this.negative=0,_=this.isub(g),this.negative^=1,this._normSign();if(this.negative===0&&g.negative!==0)return g.negative=0,_=this.isub(g),g.negative=1,_._normSign();var v,l;this.length>g.length?(v=this,l=g):(v=g,l=this);for(var b=0,E=0;E<l.length;E++)_=(v.words[E]|0)+(l.words[E]|0)+b,this.words[E]=_&67108863,b=_>>>26;for(;b!==0&&E<v.length;E++)_=(v.words[E]|0)+b,this.words[E]=_&67108863,b=_>>>26;if(this.length=v.length,b!==0)this.words[this.length]=b,this.length++;else if(v!==this)for(;E<v.length;E++)this.words[E]=v.words[E];return this},"iadd"),i.prototype.add=o(function(g){var _;return g.negative!==0&&this.negative===0?(g.negative=0,_=this.sub(g),g.negative^=1,_):g.negative===0&&this.negative!==0?(this.negative=0,_=g.sub(this),this.negative=1,_):this.length>g.length?this.clone().iadd(g):g.clone().iadd(this)},"add"),i.prototype.isub=o(function(g){if(g.negative!==0){g.negative=0;var _=this.iadd(g);return g.negative=1,_._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(g),this.negative=1,this._normSign();var v=this.cmp(g);if(v===0)return this.negative=0,this.length=1,this.words[0]=0,this;var l,b;v>0?(l=this,b=g):(l=g,b=this);for(var E=0,C=0;C<b.length;C++)_=(l.words[C]|0)-(b.words[C]|0)+E,E=_>>26,this.words[C]=_&67108863;for(;E!==0&&C<l.length;C++)_=(l.words[C]|0)+E,E=_>>26,this.words[C]=_&67108863;if(E===0&&C<l.length&&l!==this)for(;C<l.length;C++)this.words[C]=l.words[C];return this.length=Math.max(this.length,C),l!==this&&(this.negative=1),this.strip()},"isub"),i.prototype.sub=o(function(g){return this.clone().isub(g)},"sub");function T(P,g,_){_.negative=g.negative^P.negative;var v=P.length+g.length|0;_.length=v,v=v-1|0;var l=P.words[0]|0,b=g.words[0]|0,E=l*b,C=E&67108863,A=E/67108864|0;_.words[0]=C;for(var x=1;x<v;x++){for(var k=A>>>26,O=A&67108863,w=Math.min(x,g.length-1),M=Math.max(0,x-P.length+1);M<=w;M++){var he=x-M|0;l=P.words[he]|0,b=g.words[M]|0,E=l*b+O,k+=E/67108864|0,O=E&67108863}_.words[x]=O|0,A=k|0}return A!==0?_.words[x]=A|0:_.length--,_.strip()}o(T,"smallMulTo");var D=o(function(g,_,v){var l=g.words,b=_.words,E=v.words,C=0,A,x,k,O=l[0]|0,w=O&8191,M=O>>>13,he=l[1]|0,B=he&8191,ee=he>>>13,ae=l[2]|0,q=ae&8191,U=ae>>>13,te=l[3]|0,oe=te&8191,ce=te>>>13,Ce=l[4]|0,ve=Ce&8191,ie=Ce>>>13,De=l[5]|0,ue=De&8191,ye=De>>>13,W=l[6]|0,me=W&8191,ke=W>>>13,ze=l[7]|0,Oe=ze&8191,Je=ze>>>13,Dr=l[8]|0,de=Dr&8191,se=Dr>>>13,L=l[9]|0,Z=L&8191,ge=L>>>13,we=b[0]|0,Ee=we&8191,Me=we>>>13,Ot=b[1]|0,$e=Ot&8191,Fe=Ot>>>13,qt=b[2]|0,We=qt&8191,Ze=qt>>>13,ii=b[3]|0,at=ii&8191,ct=ii>>>13,Ti=b[4]|0,ft=Ti&8191,ot=Ti>>>13,ki=b[5]|0,ut=ki&8191,dt=ki>>>13,On=b[6]|0,lt=On&8191,rt=On>>>13,Mi=b[7]|0,ht=Mi&8191,pt=Mi>>>13,Ri=b[8]|0,mt=Ri&8191,gt=Ri>>>13,Bi=b[9]|0,bt=Bi&8191,st=Bi>>>13;v.negative=g.negative^_.negative,v.length=19,A=Math.imul(w,Ee),x=Math.imul(w,Me),x=x+Math.imul(M,Ee)|0,k=Math.imul(M,Me);var oi=(C+A|0)+((x&8191)<<13)|0;C=(k+(x>>>13)|0)+(oi>>>26)|0,oi&=67108863,A=Math.imul(B,Ee),x=Math.imul(B,Me),x=x+Math.imul(ee,Ee)|0,k=Math.imul(ee,Me),A=A+Math.imul(w,$e)|0,x=x+Math.imul(w,Fe)|0,x=x+Math.imul(M,$e)|0,k=k+Math.imul(M,Fe)|0;var Vt=(C+A|0)+((x&8191)<<13)|0;C=(k+(x>>>13)|0)+(Vt>>>26)|0,Vt&=67108863,A=Math.imul(q,Ee),x=Math.imul(q,Me),x=x+Math.imul(U,Ee)|0,k=Math.imul(U,Me),A=A+Math.imul(B,$e)|0,x=x+Math.imul(B,Fe)|0,x=x+Math.imul(ee,$e)|0,k=k+Math.imul(ee,Fe)|0,A=A+Math.imul(w,We)|0,x=x+Math.imul(w,Ze)|0,x=x+Math.imul(M,We)|0,k=k+Math.imul(M,Ze)|0;var zt=(C+A|0)+((x&8191)<<13)|0;C=(k+(x>>>13)|0)+(zt>>>26)|0,zt&=67108863,A=Math.imul(oe,Ee),x=Math.imul(oe,Me),x=x+Math.imul(ce,Ee)|0,k=Math.imul(ce,Me),A=A+Math.imul(q,$e)|0,x=x+Math.imul(q,Fe)|0,x=x+Math.imul(U,$e)|0,k=k+Math.imul(U,Fe)|0,A=A+Math.imul(B,We)|0,x=x+Math.imul(B,Ze)|0,x=x+Math.imul(ee,We)|0,k=k+Math.imul(ee,Ze)|0,A=A+Math.imul(w,at)|0,x=x+Math.imul(w,ct)|0,x=x+Math.imul(M,at)|0,k=k+Math.imul(M,ct)|0;var Nn=(C+A|0)+((x&8191)<<13)|0;C=(k+(x>>>13)|0)+(Nn>>>26)|0,Nn&=67108863,A=Math.imul(ve,Ee),x=Math.imul(ve,Me),x=x+Math.imul(ie,Ee)|0,k=Math.imul(ie,Me),A=A+Math.imul(oe,$e)|0,x=x+Math.imul(oe,Fe)|0,x=x+Math.imul(ce,$e)|0,k=k+Math.imul(ce,Fe)|0,A=A+Math.imul(q,We)|0,x=x+Math.imul(q,Ze)|0,x=x+Math.imul(U,We)|0,k=k+Math.imul(U,Ze)|0,A=A+Math.imul(B,at)|0,x=x+Math.imul(B,ct)|0,x=x+Math.imul(ee,at)|0,k=k+Math.imul(ee,ct)|0,A=A+Math.imul(w,ft)|0,x=x+Math.imul(w,ot)|0,x=x+Math.imul(M,ft)|0,k=k+Math.imul(M,ot)|0;var Ln=(C+A|0)+((x&8191)<<13)|0;C=(k+(x>>>13)|0)+(Ln>>>26)|0,Ln&=67108863,A=Math.imul(ue,Ee),x=Math.imul(ue,Me),x=x+Math.imul(ye,Ee)|0,k=Math.imul(ye,Me),A=A+Math.imul(ve,$e)|0,x=x+Math.imul(ve,Fe)|0,x=x+Math.imul(ie,$e)|0,k=k+Math.imul(ie,Fe)|0,A=A+Math.imul(oe,We)|0,x=x+Math.imul(oe,Ze)|0,x=x+Math.imul(ce,We)|0,k=k+Math.imul(ce,Ze)|0,A=A+Math.imul(q,at)|0,x=x+Math.imul(q,ct)|0,x=x+Math.imul(U,at)|0,k=k+Math.imul(U,ct)|0,A=A+Math.imul(B,ft)|0,x=x+Math.imul(B,ot)|0,x=x+Math.imul(ee,ft)|0,k=k+Math.imul(ee,ot)|0,A=A+Math.imul(w,ut)|0,x=x+Math.imul(w,dt)|0,x=x+Math.imul(M,ut)|0,k=k+Math.imul(M,dt)|0;var Un=(C+A|0)+((x&8191)<<13)|0;C=(k+(x>>>13)|0)+(Un>>>26)|0,Un&=67108863,A=Math.imul(me,Ee),x=Math.imul(me,Me),x=x+Math.imul(ke,Ee)|0,k=Math.imul(ke,Me),A=A+Math.imul(ue,$e)|0,x=x+Math.imul(ue,Fe)|0,x=x+Math.imul(ye,$e)|0,k=k+Math.imul(ye,Fe)|0,A=A+Math.imul(ve,We)|0,x=x+Math.imul(ve,Ze)|0,x=x+Math.imul(ie,We)|0,k=k+Math.imul(ie,Ze)|0,A=A+Math.imul(oe,at)|0,x=x+Math.imul(oe,ct)|0,x=x+Math.imul(ce,at)|0,k=k+Math.imul(ce,ct)|0,A=A+Math.imul(q,ft)|0,x=x+Math.imul(q,ot)|0,x=x+Math.imul(U,ft)|0,k=k+Math.imul(U,ot)|0,A=A+Math.imul(B,ut)|0,x=x+Math.imul(B,dt)|0,x=x+Math.imul(ee,ut)|0,k=k+Math.imul(ee,dt)|0,A=A+Math.imul(w,lt)|0,x=x+Math.imul(w,rt)|0,x=x+Math.imul(M,lt)|0,k=k+Math.imul(M,rt)|0;var en=(C+A|0)+((x&8191)<<13)|0;C=(k+(x>>>13)|0)+(en>>>26)|0,en&=67108863,A=Math.imul(Oe,Ee),x=Math.imul(Oe,Me),x=x+Math.imul(Je,Ee)|0,k=Math.imul(Je,Me),A=A+Math.imul(me,$e)|0,x=x+Math.imul(me,Fe)|0,x=x+Math.imul(ke,$e)|0,k=k+Math.imul(ke,Fe)|0,A=A+Math.imul(ue,We)|0,x=x+Math.imul(ue,Ze)|0,x=x+Math.imul(ye,We)|0,k=k+Math.imul(ye,Ze)|0,A=A+Math.imul(ve,at)|0,x=x+Math.imul(ve,ct)|0,x=x+Math.imul(ie,at)|0,k=k+Math.imul(ie,ct)|0,A=A+Math.imul(oe,ft)|0,x=x+Math.imul(oe,ot)|0,x=x+Math.imul(ce,ft)|0,k=k+Math.imul(ce,ot)|0,A=A+Math.imul(q,ut)|0,x=x+Math.imul(q,dt)|0,x=x+Math.imul(U,ut)|0,k=k+Math.imul(U,dt)|0,A=A+Math.imul(B,lt)|0,x=x+Math.imul(B,rt)|0,x=x+Math.imul(ee,lt)|0,k=k+Math.imul(ee,rt)|0,A=A+Math.imul(w,ht)|0,x=x+Math.imul(w,pt)|0,x=x+Math.imul(M,ht)|0,k=k+Math.imul(M,pt)|0;var qn=(C+A|0)+((x&8191)<<13)|0;C=(k+(x>>>13)|0)+(qn>>>26)|0,qn&=67108863,A=Math.imul(de,Ee),x=Math.imul(de,Me),x=x+Math.imul(se,Ee)|0,k=Math.imul(se,Me),A=A+Math.imul(Oe,$e)|0,x=x+Math.imul(Oe,Fe)|0,x=x+Math.imul(Je,$e)|0,k=k+Math.imul(Je,Fe)|0,A=A+Math.imul(me,We)|0,x=x+Math.imul(me,Ze)|0,x=x+Math.imul(ke,We)|0,k=k+Math.imul(ke,Ze)|0,A=A+Math.imul(ue,at)|0,x=x+Math.imul(ue,ct)|0,x=x+Math.imul(ye,at)|0,k=k+Math.imul(ye,ct)|0,A=A+Math.imul(ve,ft)|0,x=x+Math.imul(ve,ot)|0,x=x+Math.imul(ie,ft)|0,k=k+Math.imul(ie,ot)|0,A=A+Math.imul(oe,ut)|0,x=x+Math.imul(oe,dt)|0,x=x+Math.imul(ce,ut)|0,k=k+Math.imul(ce,dt)|0,A=A+Math.imul(q,lt)|0,x=x+Math.imul(q,rt)|0,x=x+Math.imul(U,lt)|0,k=k+Math.imul(U,rt)|0,A=A+Math.imul(B,ht)|0,x=x+Math.imul(B,pt)|0,x=x+Math.imul(ee,ht)|0,k=k+Math.imul(ee,pt)|0,A=A+Math.imul(w,mt)|0,x=x+Math.imul(w,gt)|0,x=x+Math.imul(M,mt)|0,k=k+Math.imul(M,gt)|0;var Fi=(C+A|0)+((x&8191)<<13)|0;C=(k+(x>>>13)|0)+(Fi>>>26)|0,Fi&=67108863,A=Math.imul(Z,Ee),x=Math.imul(Z,Me),x=x+Math.imul(ge,Ee)|0,k=Math.imul(ge,Me),A=A+Math.imul(de,$e)|0,x=x+Math.imul(de,Fe)|0,x=x+Math.imul(se,$e)|0,k=k+Math.imul(se,Fe)|0,A=A+Math.imul(Oe,We)|0,x=x+Math.imul(Oe,Ze)|0,x=x+Math.imul(Je,We)|0,k=k+Math.imul(Je,Ze)|0,A=A+Math.imul(me,at)|0,x=x+Math.imul(me,ct)|0,x=x+Math.imul(ke,at)|0,k=k+Math.imul(ke,ct)|0,A=A+Math.imul(ue,ft)|0,x=x+Math.imul(ue,ot)|0,x=x+Math.imul(ye,ft)|0,k=k+Math.imul(ye,ot)|0,A=A+Math.imul(ve,ut)|0,x=x+Math.imul(ve,dt)|0,x=x+Math.imul(ie,ut)|0,k=k+Math.imul(ie,dt)|0,A=A+Math.imul(oe,lt)|0,x=x+Math.imul(oe,rt)|0,x=x+Math.imul(ce,lt)|0,k=k+Math.imul(ce,rt)|0,A=A+Math.imul(q,ht)|0,x=x+Math.imul(q,pt)|0,x=x+Math.imul(U,ht)|0,k=k+Math.imul(U,pt)|0,A=A+Math.imul(B,mt)|0,x=x+Math.imul(B,gt)|0,x=x+Math.imul(ee,mt)|0,k=k+Math.imul(ee,gt)|0,A=A+Math.imul(w,bt)|0,x=x+Math.imul(w,st)|0,x=x+Math.imul(M,bt)|0,k=k+Math.imul(M,st)|0;var Ds=(C+A|0)+((x&8191)<<13)|0;C=(k+(x>>>13)|0)+(Ds>>>26)|0,Ds&=67108863,A=Math.imul(Z,$e),x=Math.imul(Z,Fe),x=x+Math.imul(ge,$e)|0,k=Math.imul(ge,Fe),A=A+Math.imul(de,We)|0,x=x+Math.imul(de,Ze)|0,x=x+Math.imul(se,We)|0,k=k+Math.imul(se,Ze)|0,A=A+Math.imul(Oe,at)|0,x=x+Math.imul(Oe,ct)|0,x=x+Math.imul(Je,at)|0,k=k+Math.imul(Je,ct)|0,A=A+Math.imul(me,ft)|0,x=x+Math.imul(me,ot)|0,x=x+Math.imul(ke,ft)|0,k=k+Math.imul(ke,ot)|0,A=A+Math.imul(ue,ut)|0,x=x+Math.imul(ue,dt)|0,x=x+Math.imul(ye,ut)|0,k=k+Math.imul(ye,dt)|0,A=A+Math.imul(ve,lt)|0,x=x+Math.imul(ve,rt)|0,x=x+Math.imul(ie,lt)|0,k=k+Math.imul(ie,rt)|0,A=A+Math.imul(oe,ht)|0,x=x+Math.imul(oe,pt)|0,x=x+Math.imul(ce,ht)|0,k=k+Math.imul(ce,pt)|0,A=A+Math.imul(q,mt)|0,x=x+Math.imul(q,gt)|0,x=x+Math.imul(U,mt)|0,k=k+Math.imul(U,gt)|0,A=A+Math.imul(B,bt)|0,x=x+Math.imul(B,st)|0,x=x+Math.imul(ee,bt)|0,k=k+Math.imul(ee,st)|0;var Ss=(C+A|0)+((x&8191)<<13)|0;C=(k+(x>>>13)|0)+(Ss>>>26)|0,Ss&=67108863,A=Math.imul(Z,We),x=Math.imul(Z,Ze),x=x+Math.imul(ge,We)|0,k=Math.imul(ge,Ze),A=A+Math.imul(de,at)|0,x=x+Math.imul(de,ct)|0,x=x+Math.imul(se,at)|0,k=k+Math.imul(se,ct)|0,A=A+Math.imul(Oe,ft)|0,x=x+Math.imul(Oe,ot)|0,x=x+Math.imul(Je,ft)|0,k=k+Math.imul(Je,ot)|0,A=A+Math.imul(me,ut)|0,x=x+Math.imul(me,dt)|0,x=x+Math.imul(ke,ut)|0,k=k+Math.imul(ke,dt)|0,A=A+Math.imul(ue,lt)|0,x=x+Math.imul(ue,rt)|0,x=x+Math.imul(ye,lt)|0,k=k+Math.imul(ye,rt)|0,A=A+Math.imul(ve,ht)|0,x=x+Math.imul(ve,pt)|0,x=x+Math.imul(ie,ht)|0,k=k+Math.imul(ie,pt)|0,A=A+Math.imul(oe,mt)|0,x=x+Math.imul(oe,gt)|0,x=x+Math.imul(ce,mt)|0,k=k+Math.imul(ce,gt)|0,A=A+Math.imul(q,bt)|0,x=x+Math.imul(q,st)|0,x=x+Math.imul(U,bt)|0,k=k+Math.imul(U,st)|0;var Ts=(C+A|0)+((x&8191)<<13)|0;C=(k+(x>>>13)|0)+(Ts>>>26)|0,Ts&=67108863,A=Math.imul(Z,at),x=Math.imul(Z,ct),x=x+Math.imul(ge,at)|0,k=Math.imul(ge,ct),A=A+Math.imul(de,ft)|0,x=x+Math.imul(de,ot)|0,x=x+Math.imul(se,ft)|0,k=k+Math.imul(se,ot)|0,A=A+Math.imul(Oe,ut)|0,x=x+Math.imul(Oe,dt)|0,x=x+Math.imul(Je,ut)|0,k=k+Math.imul(Je,dt)|0,A=A+Math.imul(me,lt)|0,x=x+Math.imul(me,rt)|0,x=x+Math.imul(ke,lt)|0,k=k+Math.imul(ke,rt)|0,A=A+Math.imul(ue,ht)|0,x=x+Math.imul(ue,pt)|0,x=x+Math.imul(ye,ht)|0,k=k+Math.imul(ye,pt)|0,A=A+Math.imul(ve,mt)|0,x=x+Math.imul(ve,gt)|0,x=x+Math.imul(ie,mt)|0,k=k+Math.imul(ie,gt)|0,A=A+Math.imul(oe,bt)|0,x=x+Math.imul(oe,st)|0,x=x+Math.imul(ce,bt)|0,k=k+Math.imul(ce,st)|0;var Vo=(C+A|0)+((x&8191)<<13)|0;C=(k+(x>>>13)|0)+(Vo>>>26)|0,Vo&=67108863,A=Math.imul(Z,ft),x=Math.imul(Z,ot),x=x+Math.imul(ge,ft)|0,k=Math.imul(ge,ot),A=A+Math.imul(de,ut)|0,x=x+Math.imul(de,dt)|0,x=x+Math.imul(se,ut)|0,k=k+Math.imul(se,dt)|0,A=A+Math.imul(Oe,lt)|0,x=x+Math.imul(Oe,rt)|0,x=x+Math.imul(Je,lt)|0,k=k+Math.imul(Je,rt)|0,A=A+Math.imul(me,ht)|0,x=x+Math.imul(me,pt)|0,x=x+Math.imul(ke,ht)|0,k=k+Math.imul(ke,pt)|0,A=A+Math.imul(ue,mt)|0,x=x+Math.imul(ue,gt)|0,x=x+Math.imul(ye,mt)|0,k=k+Math.imul(ye,gt)|0,A=A+Math.imul(ve,bt)|0,x=x+Math.imul(ve,st)|0,x=x+Math.imul(ie,bt)|0,k=k+Math.imul(ie,st)|0;var zo=(C+A|0)+((x&8191)<<13)|0;C=(k+(x>>>13)|0)+(zo>>>26)|0,zo&=67108863,A=Math.imul(Z,ut),x=Math.imul(Z,dt),x=x+Math.imul(ge,ut)|0,k=Math.imul(ge,dt),A=A+Math.imul(de,lt)|0,x=x+Math.imul(de,rt)|0,x=x+Math.imul(se,lt)|0,k=k+Math.imul(se,rt)|0,A=A+Math.imul(Oe,ht)|0,x=x+Math.imul(Oe,pt)|0,x=x+Math.imul(Je,ht)|0,k=k+Math.imul(Je,pt)|0,A=A+Math.imul(me,mt)|0,x=x+Math.imul(me,gt)|0,x=x+Math.imul(ke,mt)|0,k=k+Math.imul(ke,gt)|0,A=A+Math.imul(ue,bt)|0,x=x+Math.imul(ue,st)|0,x=x+Math.imul(ye,bt)|0,k=k+Math.imul(ye,st)|0;var Ko=(C+A|0)+((x&8191)<<13)|0;C=(k+(x>>>13)|0)+(Ko>>>26)|0,Ko&=67108863,A=Math.imul(Z,lt),x=Math.imul(Z,rt),x=x+Math.imul(ge,lt)|0,k=Math.imul(ge,rt),A=A+Math.imul(de,ht)|0,x=x+Math.imul(de,pt)|0,x=x+Math.imul(se,ht)|0,k=k+Math.imul(se,pt)|0,A=A+Math.imul(Oe,mt)|0,x=x+Math.imul(Oe,gt)|0,x=x+Math.imul(Je,mt)|0,k=k+Math.imul(Je,gt)|0,A=A+Math.imul(me,bt)|0,x=x+Math.imul(me,st)|0,x=x+Math.imul(ke,bt)|0,k=k+Math.imul(ke,st)|0;var ks=(C+A|0)+((x&8191)<<13)|0;C=(k+(x>>>13)|0)+(ks>>>26)|0,ks&=67108863,A=Math.imul(Z,ht),x=Math.imul(Z,pt),x=x+Math.imul(ge,ht)|0,k=Math.imul(ge,pt),A=A+Math.imul(de,mt)|0,x=x+Math.imul(de,gt)|0,x=x+Math.imul(se,mt)|0,k=k+Math.imul(se,gt)|0,A=A+Math.imul(Oe,bt)|0,x=x+Math.imul(Oe,st)|0,x=x+Math.imul(Je,bt)|0,k=k+Math.imul(Je,st)|0;var Ms=(C+A|0)+((x&8191)<<13)|0;C=(k+(x>>>13)|0)+(Ms>>>26)|0,Ms&=67108863,A=Math.imul(Z,mt),x=Math.imul(Z,gt),x=x+Math.imul(ge,mt)|0,k=Math.imul(ge,gt),A=A+Math.imul(de,bt)|0,x=x+Math.imul(de,st)|0,x=x+Math.imul(se,bt)|0,k=k+Math.imul(se,st)|0;var Rs=(C+A|0)+((x&8191)<<13)|0;C=(k+(x>>>13)|0)+(Rs>>>26)|0,Rs&=67108863,A=Math.imul(Z,bt),x=Math.imul(Z,st),x=x+Math.imul(ge,bt)|0,k=Math.imul(ge,st);var Bs=(C+A|0)+((x&8191)<<13)|0;return C=(k+(x>>>13)|0)+(Bs>>>26)|0,Bs&=67108863,E[0]=oi,E[1]=Vt,E[2]=zt,E[3]=Nn,E[4]=Ln,E[5]=Un,E[6]=en,E[7]=qn,E[8]=Fi,E[9]=Ds,E[10]=Ss,E[11]=Ts,E[12]=Vo,E[13]=zo,E[14]=Ko,E[15]=ks,E[16]=Ms,E[17]=Rs,E[18]=Bs,C!==0&&(E[19]=C,v.length++),v},"comb10MulTo");Math.imul||(D=T);function R(P,g,_){_.negative=g.negative^P.negative,_.length=P.length+g.length;for(var v=0,l=0,b=0;b<_.length-1;b++){var E=l;l=0;for(var C=v&67108863,A=Math.min(b,g.length-1),x=Math.max(0,b-P.length+1);x<=A;x++){var k=b-x,O=P.words[k]|0,w=g.words[x]|0,M=O*w,he=M&67108863;E=E+(M/67108864|0)|0,he=he+C|0,C=he&67108863,E=E+(he>>>26)|0,l+=E>>>26,E&=67108863}_.words[b]=C,v=E,E=l}return v!==0?_.words[b]=v:_.length--,_.strip()}o(R,"bigMulTo");function H(P,g,_){var v=new F;return v.mulp(P,g,_)}o(H,"jumboMulTo"),i.prototype.mulTo=o(function(g,_){var v,l=this.length+g.length;return this.length===10&&g.length===10?v=D(this,g,_):l<63?v=T(this,g,_):l<1024?v=R(this,g,_):v=H(this,g,_),v},"mulTo");function F(P,g){this.x=P,this.y=g}o(F,"FFTM"),F.prototype.makeRBT=o(function(g){for(var _=new Array(g),v=i.prototype._countBits(g)-1,l=0;l<g;l++)_[l]=this.revBin(l,v,g);return _},"makeRBT"),F.prototype.revBin=o(function(g,_,v){if(g===0||g===v-1)return g;for(var l=0,b=0;b<_;b++)l|=(g&1)<<_-b-1,g>>=1;return l},"revBin"),F.prototype.permute=o(function(g,_,v,l,b,E){for(var C=0;C<E;C++)l[C]=_[g[C]],b[C]=v[g[C]]},"permute"),F.prototype.transform=o(function(g,_,v,l,b,E){this.permute(E,g,_,v,l,b);for(var C=1;C<b;C<<=1)for(var A=C<<1,x=Math.cos(2*Math.PI/A),k=Math.sin(2*Math.PI/A),O=0;O<b;O+=A)for(var w=x,M=k,he=0;he<C;he++){var B=v[O+he],ee=l[O+he],ae=v[O+he+C],q=l[O+he+C],U=w*ae-M*q;q=w*q+M*ae,ae=U,v[O+he]=B+ae,l[O+he]=ee+q,v[O+he+C]=B-ae,l[O+he+C]=ee-q,he!==A&&(U=x*w-k*M,M=x*M+k*w,w=U)}},"transform"),F.prototype.guessLen13b=o(function(g,_){var v=Math.max(_,g)|1,l=v&1,b=0;for(v=v/2|0;v;v=v>>>1)b++;return 1<<b+1+l},"guessLen13b"),F.prototype.conjugate=o(function(g,_,v){if(!(v<=1))for(var l=0;l<v/2;l++){var b=g[l];g[l]=g[v-l-1],g[v-l-1]=b,b=_[l],_[l]=-_[v-l-1],_[v-l-1]=-b}},"conjugate"),F.prototype.normalize13b=o(function(g,_){for(var v=0,l=0;l<_/2;l++){var b=Math.round(g[2*l+1]/_)*8192+Math.round(g[2*l]/_)+v;g[l]=b&67108863,b<67108864?v=0:v=b/67108864|0}return g},"normalize13b"),F.prototype.convert13b=o(function(g,_,v,l){for(var b=0,E=0;E<_;E++)b=b+(g[E]|0),v[2*E]=b&8191,b=b>>>13,v[2*E+1]=b&8191,b=b>>>13;for(E=2*_;E<l;++E)v[E]=0;r(b===0),r((b&-8192)===0)},"convert13b"),F.prototype.stub=o(function(g){for(var _=new Array(g),v=0;v<g;v++)_[v]=0;return _},"stub"),F.prototype.mulp=o(function(g,_,v){var l=2*this.guessLen13b(g.length,_.length),b=this.makeRBT(l),E=this.stub(l),C=new Array(l),A=new Array(l),x=new Array(l),k=new Array(l),O=new Array(l),w=new Array(l),M=v.words;M.length=l,this.convert13b(g.words,g.length,C,l),this.convert13b(_.words,_.length,k,l),this.transform(C,E,A,x,l,b),this.transform(k,E,O,w,l,b);for(var he=0;he<l;he++){var B=A[he]*O[he]-x[he]*w[he];x[he]=A[he]*w[he]+x[he]*O[he],A[he]=B}return this.conjugate(A,x,l),this.transform(A,x,M,E,l,b),this.conjugate(M,E,l),this.normalize13b(M,l),v.negative=g.negative^_.negative,v.length=g.length+_.length,v.strip()},"mulp"),i.prototype.mul=o(function(g){var _=new i(null);return _.words=new Array(this.length+g.length),this.mulTo(g,_)},"mul"),i.prototype.mulf=o(function(g){var _=new i(null);return _.words=new Array(this.length+g.length),H(this,g,_)},"mulf"),i.prototype.imul=o(function(g){return this.clone().mulTo(g,this)},"imul"),i.prototype.imuln=o(function(g){r(typeof g=="number"),r(g<67108864);for(var _=0,v=0;v<this.length;v++){var l=(this.words[v]|0)*g,b=(l&67108863)+(_&67108863);_>>=26,_+=l/67108864|0,_+=b>>>26,this.words[v]=b&67108863}return _!==0&&(this.words[v]=_,this.length++),this},"imuln"),i.prototype.muln=o(function(g){return this.clone().imuln(g)},"muln"),i.prototype.sqr=o(function(){return this.mul(this)},"sqr"),i.prototype.isqr=o(function(){return this.imul(this.clone())},"isqr"),i.prototype.pow=o(function(g){var _=I(g);if(_.length===0)return new i(1);for(var v=this,l=0;l<_.length&&_[l]===0;l++,v=v.sqr());if(++l<_.length)for(var b=v.sqr();l<_.length;l++,b=b.sqr())_[l]!==0&&(v=v.mul(b));return v},"pow"),i.prototype.iushln=o(function(g){r(typeof g=="number"&&g>=0);var _=g%26,v=(g-_)/26,l=67108863>>>26-_<<26-_,b;if(_!==0){var E=0;for(b=0;b<this.length;b++){var C=this.words[b]&l,A=(this.words[b]|0)-C<<_;this.words[b]=A|E,E=C>>>26-_}E&&(this.words[b]=E,this.length++)}if(v!==0){for(b=this.length-1;b>=0;b--)this.words[b+v]=this.words[b];for(b=0;b<v;b++)this.words[b]=0;this.length+=v}return this.strip()},"iushln"),i.prototype.ishln=o(function(g){return r(this.negative===0),this.iushln(g)},"ishln"),i.prototype.iushrn=o(function(g,_,v){r(typeof g=="number"&&g>=0);var l;_?l=(_-_%26)/26:l=0;var b=g%26,E=Math.min((g-b)/26,this.length),C=67108863^67108863>>>b<<b,A=v;if(l-=E,l=Math.max(0,l),A){for(var x=0;x<E;x++)A.words[x]=this.words[x];A.length=E}if(E!==0)if(this.length>E)for(this.length-=E,x=0;x<this.length;x++)this.words[x]=this.words[x+E];else this.words[0]=0,this.length=1;var k=0;for(x=this.length-1;x>=0&&(k!==0||x>=l);x--){var O=this.words[x]|0;this.words[x]=k<<26-b|O>>>b,k=O&C}return A&&k!==0&&(A.words[A.length++]=k),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},"iushrn"),i.prototype.ishrn=o(function(g,_,v){return r(this.negative===0),this.iushrn(g,_,v)},"ishrn"),i.prototype.shln=o(function(g){return this.clone().ishln(g)},"shln"),i.prototype.ushln=o(function(g){return this.clone().iushln(g)},"ushln"),i.prototype.shrn=o(function(g){return this.clone().ishrn(g)},"shrn"),i.prototype.ushrn=o(function(g){return this.clone().iushrn(g)},"ushrn"),i.prototype.testn=o(function(g){r(typeof g=="number"&&g>=0);var _=g%26,v=(g-_)/26,l=1<<_;if(this.length<=v)return!1;var b=this.words[v];return!!(b&l)},"testn"),i.prototype.imaskn=o(function(g){r(typeof g=="number"&&g>=0);var _=g%26,v=(g-_)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=v)return this;if(_!==0&&v++,this.length=Math.min(v,this.length),_!==0){var l=67108863^67108863>>>_<<_;this.words[this.length-1]&=l}return this.strip()},"imaskn"),i.prototype.maskn=o(function(g){return this.clone().imaskn(g)},"maskn"),i.prototype.iaddn=o(function(g){return r(typeof g=="number"),r(g<67108864),g<0?this.isubn(-g):this.negative!==0?this.length===1&&(this.words[0]|0)<g?(this.words[0]=g-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(g),this.negative=1,this):this._iaddn(g)},"iaddn"),i.prototype._iaddn=o(function(g){this.words[0]+=g;for(var _=0;_<this.length&&this.words[_]>=67108864;_++)this.words[_]-=67108864,_===this.length-1?this.words[_+1]=1:this.words[_+1]++;return this.length=Math.max(this.length,_+1),this},"_iaddn"),i.prototype.isubn=o(function(g){if(r(typeof g=="number"),r(g<67108864),g<0)return this.iaddn(-g);if(this.negative!==0)return this.negative=0,this.iaddn(g),this.negative=1,this;if(this.words[0]-=g,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var _=0;_<this.length&&this.words[_]<0;_++)this.words[_]+=67108864,this.words[_+1]-=1;return this.strip()},"isubn"),i.prototype.addn=o(function(g){return this.clone().iaddn(g)},"addn"),i.prototype.subn=o(function(g){return this.clone().isubn(g)},"subn"),i.prototype.iabs=o(function(){return this.negative=0,this},"iabs"),i.prototype.abs=o(function(){return this.clone().iabs()},"abs"),i.prototype._ishlnsubmul=o(function(g,_,v){var l=g.length+v,b;this._expand(l);var E,C=0;for(b=0;b<g.length;b++){E=(this.words[b+v]|0)+C;var A=(g.words[b]|0)*_;E-=A&67108863,C=(E>>26)-(A/67108864|0),this.words[b+v]=E&67108863}for(;b<this.length-v;b++)E=(this.words[b+v]|0)+C,C=E>>26,this.words[b+v]=E&67108863;if(C===0)return this.strip();for(r(C===-1),C=0,b=0;b<this.length;b++)E=-(this.words[b]|0)+C,C=E>>26,this.words[b]=E&67108863;return this.negative=1,this.strip()},"_ishlnsubmul"),i.prototype._wordDiv=o(function(g,_){var v=this.length-g.length,l=this.clone(),b=g,E=b.words[b.length-1]|0,C=this._countBits(E);v=26-C,v!==0&&(b=b.ushln(v),l.iushln(v),E=b.words[b.length-1]|0);var A=l.length-b.length,x;if(_!=="mod"){x=new i(null),x.length=A+1,x.words=new Array(x.length);for(var k=0;k<x.length;k++)x.words[k]=0}var O=l.clone()._ishlnsubmul(b,1,A);O.negative===0&&(l=O,x&&(x.words[A]=1));for(var w=A-1;w>=0;w--){var M=(l.words[b.length+w]|0)*67108864+(l.words[b.length+w-1]|0);for(M=Math.min(M/E|0,67108863),l._ishlnsubmul(b,M,w);l.negative!==0;)M--,l.negative=0,l._ishlnsubmul(b,1,w),l.isZero()||(l.negative^=1);x&&(x.words[w]=M)}return x&&x.strip(),l.strip(),_!=="div"&&v!==0&&l.iushrn(v),{div:x||null,mod:l}},"_wordDiv"),i.prototype.divmod=o(function(g,_,v){if(r(!g.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var l,b,E;return this.negative!==0&&g.negative===0?(E=this.neg().divmod(g,_),_!=="mod"&&(l=E.div.neg()),_!=="div"&&(b=E.mod.neg(),v&&b.negative!==0&&b.iadd(g)),{div:l,mod:b}):this.negative===0&&g.negative!==0?(E=this.divmod(g.neg(),_),_!=="mod"&&(l=E.div.neg()),{div:l,mod:E.mod}):(this.negative&g.negative)!==0?(E=this.neg().divmod(g.neg(),_),_!=="div"&&(b=E.mod.neg(),v&&b.negative!==0&&b.isub(g)),{div:E.div,mod:b}):g.length>this.length||this.cmp(g)<0?{div:new i(0),mod:this}:g.length===1?_==="div"?{div:this.divn(g.words[0]),mod:null}:_==="mod"?{div:null,mod:new i(this.modn(g.words[0]))}:{div:this.divn(g.words[0]),mod:new i(this.modn(g.words[0]))}:this._wordDiv(g,_)},"divmod"),i.prototype.div=o(function(g){return this.divmod(g,"div",!1).div},"div"),i.prototype.mod=o(function(g){return this.divmod(g,"mod",!1).mod},"mod"),i.prototype.umod=o(function(g){return this.divmod(g,"mod",!0).mod},"umod"),i.prototype.divRound=o(function(g){var _=this.divmod(g);if(_.mod.isZero())return _.div;var v=_.div.negative!==0?_.mod.isub(g):_.mod,l=g.ushrn(1),b=g.andln(1),E=v.cmp(l);return E<0||b===1&&E===0?_.div:_.div.negative!==0?_.div.isubn(1):_.div.iaddn(1)},"divRound"),i.prototype.modn=o(function(g){r(g<=67108863);for(var _=(1<<26)%g,v=0,l=this.length-1;l>=0;l--)v=(_*v+(this.words[l]|0))%g;return v},"modn"),i.prototype.idivn=o(function(g){r(g<=67108863);for(var _=0,v=this.length-1;v>=0;v--){var l=(this.words[v]|0)+_*67108864;this.words[v]=l/g|0,_=l%g}return this.strip()},"idivn"),i.prototype.divn=o(function(g){return this.clone().idivn(g)},"divn"),i.prototype.egcd=o(function(g){r(g.negative===0),r(!g.isZero());var _=this,v=g.clone();_.negative!==0?_=_.umod(g):_=_.clone();for(var l=new i(1),b=new i(0),E=new i(0),C=new i(1),A=0;_.isEven()&&v.isEven();)_.iushrn(1),v.iushrn(1),++A;for(var x=v.clone(),k=_.clone();!_.isZero();){for(var O=0,w=1;(_.words[0]&w)===0&&O<26;++O,w<<=1);if(O>0)for(_.iushrn(O);O-- >0;)(l.isOdd()||b.isOdd())&&(l.iadd(x),b.isub(k)),l.iushrn(1),b.iushrn(1);for(var M=0,he=1;(v.words[0]&he)===0&&M<26;++M,he<<=1);if(M>0)for(v.iushrn(M);M-- >0;)(E.isOdd()||C.isOdd())&&(E.iadd(x),C.isub(k)),E.iushrn(1),C.iushrn(1);_.cmp(v)>=0?(_.isub(v),l.isub(E),b.isub(C)):(v.isub(_),E.isub(l),C.isub(b))}return{a:E,b:C,gcd:v.iushln(A)}},"egcd"),i.prototype._invmp=o(function(g){r(g.negative===0),r(!g.isZero());var _=this,v=g.clone();_.negative!==0?_=_.umod(g):_=_.clone();for(var l=new i(1),b=new i(0),E=v.clone();_.cmpn(1)>0&&v.cmpn(1)>0;){for(var C=0,A=1;(_.words[0]&A)===0&&C<26;++C,A<<=1);if(C>0)for(_.iushrn(C);C-- >0;)l.isOdd()&&l.iadd(E),l.iushrn(1);for(var x=0,k=1;(v.words[0]&k)===0&&x<26;++x,k<<=1);if(x>0)for(v.iushrn(x);x-- >0;)b.isOdd()&&b.iadd(E),b.iushrn(1);_.cmp(v)>=0?(_.isub(v),l.isub(b)):(v.isub(_),b.isub(l))}var O;return _.cmpn(1)===0?O=l:O=b,O.cmpn(0)<0&&O.iadd(g),O},"_invmp"),i.prototype.gcd=o(function(g){if(this.isZero())return g.abs();if(g.isZero())return this.abs();var _=this.clone(),v=g.clone();_.negative=0,v.negative=0;for(var l=0;_.isEven()&&v.isEven();l++)_.iushrn(1),v.iushrn(1);do{for(;_.isEven();)_.iushrn(1);for(;v.isEven();)v.iushrn(1);var b=_.cmp(v);if(b<0){var E=_;_=v,v=E}else if(b===0||v.cmpn(1)===0)break;_.isub(v)}while(!0);return v.iushln(l)},"gcd"),i.prototype.invm=o(function(g){return this.egcd(g).a.umod(g)},"invm"),i.prototype.isEven=o(function(){return(this.words[0]&1)===0},"isEven"),i.prototype.isOdd=o(function(){return(this.words[0]&1)===1},"isOdd"),i.prototype.andln=o(function(g){return this.words[0]&g},"andln"),i.prototype.bincn=o(function(g){r(typeof g=="number");var _=g%26,v=(g-_)/26,l=1<<_;if(this.length<=v)return this._expand(v+1),this.words[v]|=l,this;for(var b=l,E=v;b!==0&&E<this.length;E++){var C=this.words[E]|0;C+=b,b=C>>>26,C&=67108863,this.words[E]=C}return b!==0&&(this.words[E]=b,this.length++),this},"bincn"),i.prototype.isZero=o(function(){return this.length===1&&this.words[0]===0},"isZero"),i.prototype.cmpn=o(function(g){var _=g<0;if(this.negative!==0&&!_)return-1;if(this.negative===0&&_)return 1;this.strip();var v;if(this.length>1)v=1;else{_&&(g=-g),r(g<=67108863,"Number is too big");var l=this.words[0]|0;v=l===g?0:l<g?-1:1}return this.negative!==0?-v|0:v},"cmpn"),i.prototype.cmp=o(function(g){if(this.negative!==0&&g.negative===0)return-1;if(this.negative===0&&g.negative!==0)return 1;var _=this.ucmp(g);return this.negative!==0?-_|0:_},"cmp"),i.prototype.ucmp=o(function(g){if(this.length>g.length)return 1;if(this.length<g.length)return-1;for(var _=0,v=this.length-1;v>=0;v--){var l=this.words[v]|0,b=g.words[v]|0;if(l!==b){l<b?_=-1:l>b&&(_=1);break}}return _},"ucmp"),i.prototype.gtn=o(function(g){return this.cmpn(g)===1},"gtn"),i.prototype.gt=o(function(g){return this.cmp(g)===1},"gt"),i.prototype.gten=o(function(g){return this.cmpn(g)>=0},"gten"),i.prototype.gte=o(function(g){return this.cmp(g)>=0},"gte"),i.prototype.ltn=o(function(g){return this.cmpn(g)===-1},"ltn"),i.prototype.lt=o(function(g){return this.cmp(g)===-1},"lt"),i.prototype.lten=o(function(g){return this.cmpn(g)<=0},"lten"),i.prototype.lte=o(function(g){return this.cmp(g)<=0},"lte"),i.prototype.eqn=o(function(g){return this.cmpn(g)===0},"eqn"),i.prototype.eq=o(function(g){return this.cmp(g)===0},"eq"),i.red=o(function(g){return new G(g)},"red"),i.prototype.toRed=o(function(g){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),g.convertTo(this)._forceRed(g)},"toRed"),i.prototype.fromRed=o(function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},"fromRed"),i.prototype._forceRed=o(function(g){return this.red=g,this},"_forceRed"),i.prototype.forceRed=o(function(g){return r(!this.red,"Already a number in reduction context"),this._forceRed(g)},"forceRed"),i.prototype.redAdd=o(function(g){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,g)},"redAdd"),i.prototype.redIAdd=o(function(g){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,g)},"redIAdd"),i.prototype.redSub=o(function(g){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,g)},"redSub"),i.prototype.redISub=o(function(g){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,g)},"redISub"),i.prototype.redShl=o(function(g){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,g)},"redShl"),i.prototype.redMul=o(function(g){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,g),this.red.mul(this,g)},"redMul"),i.prototype.redIMul=o(function(g){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,g),this.red.imul(this,g)},"redIMul"),i.prototype.redSqr=o(function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},"redSqr"),i.prototype.redISqr=o(function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},"redISqr"),i.prototype.redSqrt=o(function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},"redSqrt"),i.prototype.redInvm=o(function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},"redInvm"),i.prototype.redNeg=o(function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},"redNeg"),i.prototype.redPow=o(function(g){return r(this.red&&!g.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,g)},"redPow");var V={k256:null,p224:null,p192:null,p25519:null};function X(P,g){this.name=P,this.p=new i(g,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}o(X,"MPrime"),X.prototype._tmp=o(function(){var g=new i(null);return g.words=new Array(Math.ceil(this.n/13)),g},"_tmp"),X.prototype.ireduce=o(function(g){var _=g,v;do this.split(_,this.tmp),_=this.imulK(_),_=_.iadd(this.tmp),v=_.bitLength();while(v>this.n);var l=v<this.n?-1:_.ucmp(this.p);return l===0?(_.words[0]=0,_.length=1):l>0?_.isub(this.p):_.strip!==void 0?_.strip():_._strip(),_},"ireduce"),X.prototype.split=o(function(g,_){g.iushrn(this.n,0,_)},"split"),X.prototype.imulK=o(function(g){return g.imul(this.k)},"imulK");function J(){X.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(J,"K256"),n(J,X),J.prototype.split=o(function(g,_){for(var v=4194303,l=Math.min(g.length,9),b=0;b<l;b++)_.words[b]=g.words[b];if(_.length=l,g.length<=9){g.words[0]=0,g.length=1;return}var E=g.words[9];for(_.words[_.length++]=E&v,b=10;b<g.length;b++){var C=g.words[b]|0;g.words[b-10]=(C&v)<<4|E>>>22,E=C}E>>>=22,g.words[b-10]=E,E===0&&g.length>10?g.length-=10:g.length-=9},"split"),J.prototype.imulK=o(function(g){g.words[g.length]=0,g.words[g.length+1]=0,g.length+=2;for(var _=0,v=0;v<g.length;v++){var l=g.words[v]|0;_+=l*977,g.words[v]=_&67108863,_=l*64+(_/67108864|0)}return g.words[g.length-1]===0&&(g.length--,g.words[g.length-1]===0&&g.length--),g},"imulK");function re(){X.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}o(re,"P224"),n(re,X);function z(){X.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}o(z,"P192"),n(z,X);function $(){X.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}o($,"P25519"),n($,X),$.prototype.imulK=o(function(g){for(var _=0,v=0;v<g.length;v++){var l=(g.words[v]|0)*19+_,b=l&67108863;l>>>=26,g.words[v]=b,_=l}return _!==0&&(g.words[g.length++]=_),g},"imulK"),i._prime=o(function(g){if(V[g])return V[g];var _;if(g==="k256")_=new J;else if(g==="p224")_=new re;else if(g==="p192")_=new z;else if(g==="p25519")_=new $;else throw new Error("Unknown prime "+g);return V[g]=_,_},"prime");function G(P){if(typeof P=="string"){var g=i._prime(P);this.m=g.p,this.prime=g}else r(P.gtn(1),"modulus must be greater than 1"),this.m=P,this.prime=null}o(G,"Red"),G.prototype._verify1=o(function(g){r(g.negative===0,"red works only with positives"),r(g.red,"red works only with red numbers")},"_verify1"),G.prototype._verify2=o(function(g,_){r((g.negative|_.negative)===0,"red works only with positives"),r(g.red&&g.red===_.red,"red works only with red numbers")},"_verify2"),G.prototype.imod=o(function(g){return this.prime?this.prime.ireduce(g)._forceRed(this):g.umod(this.m)._forceRed(this)},"imod"),G.prototype.neg=o(function(g){return g.isZero()?g.clone():this.m.sub(g)._forceRed(this)},"neg"),G.prototype.add=o(function(g,_){this._verify2(g,_);var v=g.add(_);return v.cmp(this.m)>=0&&v.isub(this.m),v._forceRed(this)},"add"),G.prototype.iadd=o(function(g,_){this._verify2(g,_);var v=g.iadd(_);return v.cmp(this.m)>=0&&v.isub(this.m),v},"iadd"),G.prototype.sub=o(function(g,_){this._verify2(g,_);var v=g.sub(_);return v.cmpn(0)<0&&v.iadd(this.m),v._forceRed(this)},"sub"),G.prototype.isub=o(function(g,_){this._verify2(g,_);var v=g.isub(_);return v.cmpn(0)<0&&v.iadd(this.m),v},"isub"),G.prototype.shl=o(function(g,_){return this._verify1(g),this.imod(g.ushln(_))},"shl"),G.prototype.imul=o(function(g,_){return this._verify2(g,_),this.imod(g.imul(_))},"imul"),G.prototype.mul=o(function(g,_){return this._verify2(g,_),this.imod(g.mul(_))},"mul"),G.prototype.isqr=o(function(g){return this.imul(g,g.clone())},"isqr"),G.prototype.sqr=o(function(g){return this.mul(g,g)},"sqr"),G.prototype.sqrt=o(function(g){if(g.isZero())return g.clone();var _=this.m.andln(3);if(r(_%2===1),_===3){var v=this.m.add(new i(1)).iushrn(2);return this.pow(g,v)}for(var l=this.m.subn(1),b=0;!l.isZero()&&l.andln(1)===0;)b++,l.iushrn(1);r(!l.isZero());var E=new i(1).toRed(this),C=E.redNeg(),A=this.m.subn(1).iushrn(1),x=this.m.bitLength();for(x=new i(2*x*x).toRed(this);this.pow(x,A).cmp(C)!==0;)x.redIAdd(C);for(var k=this.pow(x,l),O=this.pow(g,l.addn(1).iushrn(1)),w=this.pow(g,l),M=b;w.cmp(E)!==0;){for(var he=w,B=0;he.cmp(E)!==0;B++)he=he.redSqr();r(B<M);var ee=this.pow(k,new i(1).iushln(M-B-1));O=O.redMul(ee),k=ee.redSqr(),w=w.redMul(k),M=B}return O},"sqrt"),G.prototype.invm=o(function(g){var _=g._invmp(this.m);return _.negative!==0?(_.negative=0,this.imod(_).redNeg()):this.imod(_)},"invm"),G.prototype.pow=o(function(g,_){if(_.isZero())return new i(1).toRed(this);if(_.cmpn(1)===0)return g.clone();var v=4,l=new Array(1<<v);l[0]=new i(1).toRed(this),l[1]=g;for(var b=2;b<l.length;b++)l[b]=this.mul(l[b-1],g);var E=l[0],C=0,A=0,x=_.bitLength()%26;for(x===0&&(x=26),b=_.length-1;b>=0;b--){for(var k=_.words[b],O=x-1;O>=0;O--){var w=k>>O&1;if(E!==l[0]&&(E=this.sqr(E)),w===0&&C===0){A=0;continue}C<<=1,C|=w,A++,!(A!==v&&(b!==0||O!==0))&&(E=this.mul(E,l[C]),A=0,C=0)}x=26}return E},"pow"),G.prototype.convertTo=o(function(g){var _=g.umod(this.m);return _===g?_.clone():_},"convertTo"),G.prototype.convertFrom=o(function(g){var _=g.clone();return _.red=null,_},"convertFrom"),i.mont=o(function(g){return new le(g)},"mont");function le(P){G.call(this,P),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}o(le,"Mont"),n(le,G),le.prototype.convertTo=o(function(g){return this.imod(g.ushln(this.shift))},"convertTo"),le.prototype.convertFrom=o(function(g){var _=this.imod(g.mul(this.rinv));return _.red=null,_},"convertFrom"),le.prototype.imul=o(function(g,_){if(g.isZero()||_.isZero())return g.words[0]=0,g.length=1,g;var v=g.imul(_),l=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),b=v.isub(l).iushrn(this.shift),E=b;return b.cmp(this.m)>=0?E=b.isub(this.m):b.cmpn(0)<0&&(E=b.iadd(this.m)),E._forceRed(this)},"imul"),le.prototype.mul=o(function(g,_){if(g.isZero()||_.isZero())return new i(0)._forceRed(this);var v=g.mul(_),l=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),b=v.isub(l).iushrn(this.shift),E=b;return b.cmp(this.m)>=0?E=b.isub(this.m):b.cmpn(0)<0&&(E=b.iadd(this.m)),E._forceRed(this)},"mul"),le.prototype.invm=o(function(g){var _=this.imod(g._invmp(this.m).mul(this.r2));return _._forceRed(this)},"invm")})(typeof yy>"u"||yy,zS)});var lc=Q((Z4e,GS)=>{GS.exports=KS;function KS(t,e){if(!t)throw new Error(e||"Assertion failed")}o(KS,"assert");KS.equal=o(function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)},"assertEqual")});var xy=Q(JS=>{"use strict";var km=JS;function Ise(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t!="string"){for(var n=0;n<t.length;n++)r[n]=t[n]|0;return r}if(e==="hex"){t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t);for(var n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}else for(var n=0;n<t.length;n++){var i=t.charCodeAt(n),s=i>>8,a=i&255;s?r.push(s,a):r.push(a)}return r}o(Ise,"toArray");km.toArray=Ise;function WS(t){return t.length===1?"0"+t:t}o(WS,"zero2");km.zero2=WS;function YS(t){for(var e="",r=0;r<t.length;r++)e+=WS(t[r].toString(16));return e}o(YS,"toHex");km.toHex=YS;km.encode=o(function(e,r){return r==="hex"?YS(e):e},"encode")});var bi=Q(XS=>{"use strict";var To=XS,Dse=ss(),Sse=lc(),Mm=xy();To.assert=Sse;To.toArray=Mm.toArray;To.zero2=Mm.zero2;To.toHex=Mm.toHex;To.encode=Mm.encode;function Tse(t,e,r){var n=new Array(Math.max(t.bitLength(),r)+1);n.fill(0);for(var i=1<<e+1,s=t.clone(),a=0;a<n.length;a++){var f,d=s.andln(i-1);s.isOdd()?(d>(i>>1)-1?f=(i>>1)-d:f=d,s.isubn(f)):f=0,n[a]=f,s.iushrn(1)}return n}o(Tse,"getNAF");To.getNAF=Tse;function kse(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n=0,i=0,s;t.cmpn(-n)>0||e.cmpn(-i)>0;){var a=t.andln(3)+n&3,f=e.andln(3)+i&3;a===3&&(a=-1),f===3&&(f=-1);var d;(a&1)===0?d=0:(s=t.andln(7)+n&7,(s===3||s===5)&&f===2?d=-a:d=a),r[0].push(d);var h;(f&1)===0?h=0:(s=e.andln(7)+i&7,(s===3||s===5)&&a===2?h=-f:h=f),r[1].push(h),2*n===d+1&&(n=1-n),2*i===h+1&&(i=1-i),t.iushrn(1),e.iushrn(1)}return r}o(kse,"getJSF");To.getJSF=kse;function Mse(t,e,r){var n="_"+e;t.prototype[e]=o(function(){return this[n]!==void 0?this[n]:this[n]=r.call(this)},"cachedProperty")}o(Mse,"cachedProperty");To.cachedProperty=Mse;function Rse(t){return typeof t=="string"?To.toArray(t,"hex"):t}o(Rse,"parseBytes");To.parseBytes=Rse;function Bse(t){return new Dse(t,"hex","le")}o(Bse,"intFromLE");To.intFromLE=Bse});var Ay=Q((t8e,Ey)=>{var wy;Ey.exports=o(function(e){return wy||(wy=new hc(null)),wy.generate(e)},"rand");function hc(t){this.rand=t}o(hc,"Rand");Ey.exports.Rand=hc;hc.prototype.generate=o(function(e){return this._rand(e)},"generate");hc.prototype._rand=o(function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var r=new Uint8Array(e),n=0;n<r.length;n++)r[n]=this.rand.getByte();return r},"_rand");if(typeof self=="object")self.crypto&&self.crypto.getRandomValues?hc.prototype._rand=o(function(e){var r=new Uint8Array(e);return self.crypto.getRandomValues(r),r},"_rand"):self.msCrypto&&self.msCrypto.getRandomValues?hc.prototype._rand=o(function(e){var r=new Uint8Array(e);return self.msCrypto.getRandomValues(r),r},"_rand"):typeof window=="object"&&(hc.prototype._rand=function(){throw new Error("Not implemented yet")});else try{if(_y=require("crypto"),typeof _y.randomBytes!="function")throw new Error("Not supported");hc.prototype._rand=o(function(e){return _y.randomBytes(e)},"_rand")}catch{}var _y});var Hh=Q((r8e,ZS)=>{"use strict";var Af=ss(),jh=bi(),Rm=jh.getNAF,Fse=jh.getJSF,Bm=jh.assert;function pc(t,e){this.type=t,this.p=new Af(e.p,16),this.red=e.prime?Af.red(e.prime):Af.mont(this.p),this.zero=new Af(0).toRed(this.red),this.one=new Af(1).toRed(this.red),this.two=new Af(2).toRed(this.red),this.n=e.n&&new Af(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}o(pc,"BaseCurve");ZS.exports=pc;pc.prototype.point=o(function(){throw new Error("Not implemented")},"point");pc.prototype.validate=o(function(){throw new Error("Not implemented")},"validate");pc.prototype._fixedNafMul=o(function(e,r){Bm(e.precomputed);var n=e._getDoubles(),i=Rm(r,1,this._bitLength),s=(1<<n.step+1)-(n.step%2===0?2:1);s/=3;var a=[],f,d;for(f=0;f<i.length;f+=n.step){d=0;for(var h=f+n.step-1;h>=f;h--)d=(d<<1)+i[h];a.push(d)}for(var p=this.jpoint(null,null,null),y=this.jpoint(null,null,null),I=s;I>0;I--){for(f=0;f<a.length;f++)d=a[f],d===I?y=y.mixedAdd(n.points[f]):d===-I&&(y=y.mixedAdd(n.points[f].neg()));p=p.add(y)}return p.toP()},"_fixedNafMul");pc.prototype._wnafMul=o(function(e,r){var n=4,i=e._getNAFPoints(n);n=i.wnd;for(var s=i.points,a=Rm(r,n,this._bitLength),f=this.jpoint(null,null,null),d=a.length-1;d>=0;d--){for(var h=0;d>=0&&a[d]===0;d--)h++;if(d>=0&&h++,f=f.dblp(h),d<0)break;var p=a[d];Bm(p!==0),e.type==="affine"?p>0?f=f.mixedAdd(s[p-1>>1]):f=f.mixedAdd(s[-p-1>>1].neg()):p>0?f=f.add(s[p-1>>1]):f=f.add(s[-p-1>>1].neg())}return e.type==="affine"?f.toP():f},"_wnafMul");pc.prototype._wnafMulAdd=o(function(e,r,n,i,s){var a=this._wnafT1,f=this._wnafT2,d=this._wnafT3,h=0,p,y,I;for(p=0;p<i;p++){I=r[p];var T=I._getNAFPoints(e);a[p]=T.wnd,f[p]=T.points}for(p=i-1;p>=1;p-=2){var D=p-1,R=p;if(a[D]!==1||a[R]!==1){d[D]=Rm(n[D],a[D],this._bitLength),d[R]=Rm(n[R],a[R],this._bitLength),h=Math.max(d[D].length,h),h=Math.max(d[R].length,h);continue}var H=[r[D],null,null,r[R]];r[D].y.cmp(r[R].y)===0?(H[1]=r[D].add(r[R]),H[2]=r[D].toJ().mixedAdd(r[R].neg())):r[D].y.cmp(r[R].y.redNeg())===0?(H[1]=r[D].toJ().mixedAdd(r[R]),H[2]=r[D].add(r[R].neg())):(H[1]=r[D].toJ().mixedAdd(r[R]),H[2]=r[D].toJ().mixedAdd(r[R].neg()));var F=[-3,-1,-5,-7,0,7,5,1,3],V=Fse(n[D],n[R]);for(h=Math.max(V[0].length,h),d[D]=new Array(h),d[R]=new Array(h),y=0;y<h;y++){var X=V[0][y]|0,J=V[1][y]|0;d[D][y]=F[(X+1)*3+(J+1)],d[R][y]=0,f[D]=H}}var re=this.jpoint(null,null,null),z=this._wnafT4;for(p=h;p>=0;p--){for(var $=0;p>=0;){var G=!0;for(y=0;y<i;y++)z[y]=d[y][p]|0,z[y]!==0&&(G=!1);if(!G)break;$++,p--}if(p>=0&&$++,re=re.dblp($),p<0)break;for(y=0;y<i;y++){var le=z[y];le!==0&&(le>0?I=f[y][le-1>>1]:le<0&&(I=f[y][-le-1>>1].neg()),I.type==="affine"?re=re.mixedAdd(I):re=re.add(I))}}for(p=0;p<i;p++)f[p]=null;return s?re:re.toP()},"_wnafMulAdd");function Zi(t,e){this.curve=t,this.type=e,this.precomputed=null}o(Zi,"BasePoint");pc.BasePoint=Zi;Zi.prototype.eq=o(function(){throw new Error("Not implemented")},"eq");Zi.prototype.validate=o(function(){return this.curve.validate(this)},"validate");pc.prototype.decodePoint=o(function(e,r){e=jh.toArray(e,r);var n=this.p.byteLength();if((e[0]===4||e[0]===6||e[0]===7)&&e.length-1===2*n){e[0]===6?Bm(e[e.length-1]%2===0):e[0]===7&&Bm(e[e.length-1]%2===1);var i=this.point(e.slice(1,1+n),e.slice(1+n,1+2*n));return i}else if((e[0]===2||e[0]===3)&&e.length-1===n)return this.pointFromX(e.slice(1,1+n),e[0]===3);throw new Error("Unknown point format")},"decodePoint");Zi.prototype.encodeCompressed=o(function(e){return this.encode(e,!0)},"encodeCompressed");Zi.prototype._encode=o(function(e){var r=this.curve.p.byteLength(),n=this.getX().toArray("be",r);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",r))},"_encode");Zi.prototype.encode=o(function(e,r){return jh.encode(this._encode(r),e)},"encode");Zi.prototype.precompute=o(function(e){if(this.precomputed)return this;var r={doubles:null,naf:null,beta:null};return r.naf=this._getNAFPoints(8),r.doubles=this._getDoubles(4,e),r.beta=this._getBeta(),this.precomputed=r,this},"precompute");Zi.prototype._hasDoubles=o(function(e){if(!this.precomputed)return!1;var r=this.precomputed.doubles;return r?r.points.length>=Math.ceil((e.bitLength()+1)/r.step):!1},"_hasDoubles");Zi.prototype._getDoubles=o(function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,s=0;s<r;s+=e){for(var a=0;a<e;a++)i=i.dbl();n.push(i)}return{step:e,points:n}},"_getDoubles");Zi.prototype._getNAFPoints=o(function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var r=[this],n=(1<<e)-1,i=n===1?null:this.dbl(),s=1;s<n;s++)r[s]=r[s-1].add(i);return{wnd:e,points:r}},"_getNAFPoints");Zi.prototype._getBeta=o(function(){return null},"_getBeta");Zi.prototype.dblp=o(function(e){for(var r=this,n=0;n<e;n++)r=r.dbl();return r},"dblp")});var Vh=Q((n8e,Cy)=>{typeof Object.create=="function"?Cy.exports=o(function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))},"inherits"):Cy.exports=o(function(e,r){if(r){e.super_=r;var n=o(function(){},"TempCtor");n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}},"inherits")});var eT=Q((i8e,QS)=>{"use strict";var Pse=bi(),wr=ss(),Iy=Vh(),md=Hh(),Ose=Pse.assert;function Qi(t){md.call(this,"short",t),this.a=new wr(t.a,16).toRed(this.red),this.b=new wr(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}o(Qi,"ShortCurve");Iy(Qi,md);QS.exports=Qi;Qi.prototype._getEndomorphism=o(function(e){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var r,n;if(e.beta)r=new wr(e.beta,16).toRed(this.red);else{var i=this._getEndoRoots(this.p);r=i[0].cmp(i[1])<0?i[0]:i[1],r=r.toRed(this.red)}if(e.lambda)n=new wr(e.lambda,16);else{var s=this._getEndoRoots(this.n);this.g.mul(s[0]).x.cmp(this.g.x.redMul(r))===0?n=s[0]:(n=s[1],Ose(this.g.mul(n).x.cmp(this.g.x.redMul(r))===0))}var a;return e.basis?a=e.basis.map(function(f){return{a:new wr(f.a,16),b:new wr(f.b,16)}}):a=this._getEndoBasis(n),{beta:r,lambda:n,basis:a}}},"_getEndomorphism");Qi.prototype._getEndoRoots=o(function(e){var r=e===this.p?this.red:wr.mont(e),n=new wr(2).toRed(r).redInvm(),i=n.redNeg(),s=new wr(3).toRed(r).redNeg().redSqrt().redMul(n),a=i.redAdd(s).fromRed(),f=i.redSub(s).fromRed();return[a,f]},"_getEndoRoots");Qi.prototype._getEndoBasis=o(function(e){for(var r=this.n.ushrn(Math.floor(this.n.bitLength()/2)),n=e,i=this.n.clone(),s=new wr(1),a=new wr(0),f=new wr(0),d=new wr(1),h,p,y,I,T,D,R,H=0,F,V;n.cmpn(0)!==0;){var X=i.div(n);F=i.sub(X.mul(n)),V=f.sub(X.mul(s));var J=d.sub(X.mul(a));if(!y&&F.cmp(r)<0)h=R.neg(),p=s,y=F.neg(),I=V;else if(y&&++H===2)break;R=F,i=n,n=F,f=s,s=V,d=a,a=J}T=F.neg(),D=V;var re=y.sqr().add(I.sqr()),z=T.sqr().add(D.sqr());return z.cmp(re)>=0&&(T=h,D=p),y.negative&&(y=y.neg(),I=I.neg()),T.negative&&(T=T.neg(),D=D.neg()),[{a:y,b:I},{a:T,b:D}]},"_getEndoBasis");Qi.prototype._endoSplit=o(function(e){var r=this.endo.basis,n=r[0],i=r[1],s=i.b.mul(e).divRound(this.n),a=n.b.neg().mul(e).divRound(this.n),f=s.mul(n.a),d=a.mul(i.a),h=s.mul(n.b),p=a.mul(i.b),y=e.sub(f).sub(d),I=h.add(p).neg();return{k1:y,k2:I}},"_endoSplit");Qi.prototype.pointFromX=o(function(e,r){e=new wr(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var s=i.fromRed().isOdd();return(r&&!s||!r&&s)&&(i=i.redNeg()),this.point(e,i)},"pointFromX");Qi.prototype.validate=o(function(e){if(e.inf)return!0;var r=e.x,n=e.y,i=this.a.redMul(r),s=r.redSqr().redMul(r).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(s).cmpn(0)===0},"validate");Qi.prototype._endoWnafMulAdd=o(function(e,r,n){for(var i=this._endoWnafT1,s=this._endoWnafT2,a=0;a<e.length;a++){var f=this._endoSplit(r[a]),d=e[a],h=d._getBeta();f.k1.negative&&(f.k1.ineg(),d=d.neg(!0)),f.k2.negative&&(f.k2.ineg(),h=h.neg(!0)),i[a*2]=d,i[a*2+1]=h,s[a*2]=f.k1,s[a*2+1]=f.k2}for(var p=this._wnafMulAdd(1,i,s,a*2,n),y=0;y<a*2;y++)i[y]=null,s[y]=null;return p},"_endoWnafMulAdd");function zr(t,e,r,n){md.BasePoint.call(this,t,"affine"),e===null&&r===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new wr(e,16),this.y=new wr(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}o(zr,"Point");Iy(zr,md.BasePoint);Qi.prototype.point=o(function(e,r,n){return new zr(this,e,r,n)},"point");Qi.prototype.pointFromJSON=o(function(e,r){return zr.fromJSON(this,e,r)},"pointFromJSON");zr.prototype._getBeta=o(function(){if(!!this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var r=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var n=this.curve,i=o(function(s){return n.point(s.x.redMul(n.endo.beta),s.y)},"endoMul");e.beta=r,r.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(i)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(i)}}}return r}},"_getBeta");zr.prototype.toJSON=o(function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},"toJSON");zr.fromJSON=o(function(e,r,n){typeof r=="string"&&(r=JSON.parse(r));var i=e.point(r[0],r[1],n);if(!r[2])return i;function s(f){return e.point(f[0],f[1],n)}o(s,"obj2point");var a=r[2];return i.precomputed={beta:null,doubles:a.doubles&&{step:a.doubles.step,points:[i].concat(a.doubles.points.map(s))},naf:a.naf&&{wnd:a.naf.wnd,points:[i].concat(a.naf.points.map(s))}},i},"fromJSON");zr.prototype.inspect=o(function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},"inspect");zr.prototype.isInfinity=o(function(){return this.inf},"isInfinity");zr.prototype.add=o(function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(e.x),i=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)},"add");zr.prototype.dbl=o(function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),s=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(i),a=s.redSqr().redISub(this.x.redAdd(this.x)),f=s.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,f)},"dbl");zr.prototype.getX=o(function(){return this.x.fromRed()},"getX");zr.prototype.getY=o(function(){return this.y.fromRed()},"getY");zr.prototype.mul=o(function(e){return e=new wr(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},"mul");zr.prototype.mulAdd=o(function(e,r,n){var i=[this,r],s=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,s):this.curve._wnafMulAdd(1,i,s,2)},"mulAdd");zr.prototype.jmulAdd=o(function(e,r,n){var i=[this,r],s=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,s,!0):this.curve._wnafMulAdd(1,i,s,2,!0)},"jmulAdd");zr.prototype.eq=o(function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)},"eq");zr.prototype.neg=o(function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=o(function(s){return s.neg()},"negate");r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return r},"neg");zr.prototype.toJ=o(function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e},"toJ");function nn(t,e,r,n){md.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new wr(0)):(this.x=new wr(e,16),this.y=new wr(r,16),this.z=new wr(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(nn,"JPoint");Iy(nn,md.BasePoint);Qi.prototype.jpoint=o(function(e,r,n){return new nn(this,e,r,n)},"jpoint");nn.prototype.toP=o(function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),n=this.x.redMul(r),i=this.y.redMul(r).redMul(e);return this.curve.point(n,i)},"toP");nn.prototype.neg=o(function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},"neg");nn.prototype.add=o(function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(r),s=e.x.redMul(n),a=this.y.redMul(r.redMul(e.z)),f=e.y.redMul(n.redMul(this.z)),d=i.redSub(s),h=a.redSub(f);if(d.cmpn(0)===0)return h.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var p=d.redSqr(),y=p.redMul(d),I=i.redMul(p),T=h.redSqr().redIAdd(y).redISub(I).redISub(I),D=h.redMul(I.redISub(T)).redISub(a.redMul(y)),R=this.z.redMul(e.z).redMul(d);return this.curve.jpoint(T,D,R)},"add");nn.prototype.mixedAdd=o(function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,i=e.x.redMul(r),s=this.y,a=e.y.redMul(r).redMul(this.z),f=n.redSub(i),d=s.redSub(a);if(f.cmpn(0)===0)return d.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var h=f.redSqr(),p=h.redMul(f),y=n.redMul(h),I=d.redSqr().redIAdd(p).redISub(y).redISub(y),T=d.redMul(y.redISub(I)).redISub(s.redMul(p)),D=this.z.redMul(f);return this.curve.jpoint(I,T,D)},"mixedAdd");nn.prototype.dblp=o(function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var n=this;for(r=0;r<e;r++)n=n.dbl();return n}var i=this.curve.a,s=this.curve.tinv,a=this.x,f=this.y,d=this.z,h=d.redSqr().redSqr(),p=f.redAdd(f);for(r=0;r<e;r++){var y=a.redSqr(),I=p.redSqr(),T=I.redSqr(),D=y.redAdd(y).redIAdd(y).redIAdd(i.redMul(h)),R=a.redMul(I),H=D.redSqr().redISub(R.redAdd(R)),F=R.redISub(H),V=D.redMul(F);V=V.redIAdd(V).redISub(T);var X=p.redMul(d);r+1<e&&(h=h.redMul(T)),a=H,d=X,p=V}return this.curve.jpoint(a,p.redMul(s),d)},"dblp");nn.prototype.dbl=o(function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},"dbl");nn.prototype._zeroDbl=o(function(){var e,r,n;if(this.zOne){var i=this.x.redSqr(),s=this.y.redSqr(),a=s.redSqr(),f=this.x.redAdd(s).redSqr().redISub(i).redISub(a);f=f.redIAdd(f);var d=i.redAdd(i).redIAdd(i),h=d.redSqr().redISub(f).redISub(f),p=a.redIAdd(a);p=p.redIAdd(p),p=p.redIAdd(p),e=h,r=d.redMul(f.redISub(h)).redISub(p),n=this.y.redAdd(this.y)}else{var y=this.x.redSqr(),I=this.y.redSqr(),T=I.redSqr(),D=this.x.redAdd(I).redSqr().redISub(y).redISub(T);D=D.redIAdd(D);var R=y.redAdd(y).redIAdd(y),H=R.redSqr(),F=T.redIAdd(T);F=F.redIAdd(F),F=F.redIAdd(F),e=H.redISub(D).redISub(D),r=R.redMul(D.redISub(e)).redISub(F),n=this.y.redMul(this.z),n=n.redIAdd(n)}return this.curve.jpoint(e,r,n)},"_zeroDbl");nn.prototype._threeDbl=o(function(){var e,r,n;if(this.zOne){var i=this.x.redSqr(),s=this.y.redSqr(),a=s.redSqr(),f=this.x.redAdd(s).redSqr().redISub(i).redISub(a);f=f.redIAdd(f);var d=i.redAdd(i).redIAdd(i).redIAdd(this.curve.a),h=d.redSqr().redISub(f).redISub(f);e=h;var p=a.redIAdd(a);p=p.redIAdd(p),p=p.redIAdd(p),r=d.redMul(f.redISub(h)).redISub(p),n=this.y.redAdd(this.y)}else{var y=this.z.redSqr(),I=this.y.redSqr(),T=this.x.redMul(I),D=this.x.redSub(y).redMul(this.x.redAdd(y));D=D.redAdd(D).redIAdd(D);var R=T.redIAdd(T);R=R.redIAdd(R);var H=R.redAdd(R);e=D.redSqr().redISub(H),n=this.y.redAdd(this.z).redSqr().redISub(I).redISub(y);var F=I.redSqr();F=F.redIAdd(F),F=F.redIAdd(F),F=F.redIAdd(F),r=D.redMul(R.redISub(e)).redISub(F)}return this.curve.jpoint(e,r,n)},"_threeDbl");nn.prototype._dbl=o(function(){var e=this.curve.a,r=this.x,n=this.y,i=this.z,s=i.redSqr().redSqr(),a=r.redSqr(),f=n.redSqr(),d=a.redAdd(a).redIAdd(a).redIAdd(e.redMul(s)),h=r.redAdd(r);h=h.redIAdd(h);var p=h.redMul(f),y=d.redSqr().redISub(p.redAdd(p)),I=p.redISub(y),T=f.redSqr();T=T.redIAdd(T),T=T.redIAdd(T),T=T.redIAdd(T);var D=d.redMul(I).redISub(T),R=n.redAdd(n).redMul(i);return this.curve.jpoint(y,D,R)},"_dbl");nn.prototype.trpl=o(function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),r=this.y.redSqr(),n=this.z.redSqr(),i=r.redSqr(),s=e.redAdd(e).redIAdd(e),a=s.redSqr(),f=this.x.redAdd(r).redSqr().redISub(e).redISub(i);f=f.redIAdd(f),f=f.redAdd(f).redIAdd(f),f=f.redISub(a);var d=f.redSqr(),h=i.redIAdd(i);h=h.redIAdd(h),h=h.redIAdd(h),h=h.redIAdd(h);var p=s.redIAdd(f).redSqr().redISub(a).redISub(d).redISub(h),y=r.redMul(p);y=y.redIAdd(y),y=y.redIAdd(y);var I=this.x.redMul(d).redISub(y);I=I.redIAdd(I),I=I.redIAdd(I);var T=this.y.redMul(p.redMul(h.redISub(p)).redISub(f.redMul(d)));T=T.redIAdd(T),T=T.redIAdd(T),T=T.redIAdd(T);var D=this.z.redAdd(f).redSqr().redISub(n).redISub(d);return this.curve.jpoint(I,T,D)},"trpl");nn.prototype.mul=o(function(e,r){return e=new wr(e,r),this.curve._wnafMul(this,e)},"mul");nn.prototype.eq=o(function(e){if(e.type==="affine")return this.eq(e.toJ());if(this===e)return!0;var r=this.z.redSqr(),n=e.z.redSqr();if(this.x.redMul(n).redISub(e.x.redMul(r)).cmpn(0)!==0)return!1;var i=r.redMul(this.z),s=n.redMul(e.z);return this.y.redMul(s).redISub(e.y.redMul(i)).cmpn(0)===0},"eq");nn.prototype.eqXToP=o(function(e){var r=this.z.redSqr(),n=e.toRed(this.curve.red).redMul(r);if(this.x.cmp(n)===0)return!0;for(var i=e.clone(),s=this.curve.redN.redMul(r);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(s),this.x.cmp(n)===0)return!0}},"eqXToP");nn.prototype.inspect=o(function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},"inspect");nn.prototype.isInfinity=o(function(){return this.z.cmpn(0)===0},"isInfinity")});var nT=Q((o8e,rT)=>{"use strict";var gd=ss(),tT=Vh(),Fm=Hh(),Nse=bi();function bd(t){Fm.call(this,"mont",t),this.a=new gd(t.a,16).toRed(this.red),this.b=new gd(t.b,16).toRed(this.red),this.i4=new gd(4).toRed(this.red).redInvm(),this.two=new gd(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}o(bd,"MontCurve");tT(bd,Fm);rT.exports=bd;bd.prototype.validate=o(function(e){var r=e.normalize().x,n=r.redSqr(),i=n.redMul(r).redAdd(n.redMul(this.a)).redAdd(r),s=i.redSqrt();return s.redSqr().cmp(i)===0},"validate");function Kr(t,e,r){Fm.BasePoint.call(this,t,"projective"),e===null&&r===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new gd(e,16),this.z=new gd(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}o(Kr,"Point");tT(Kr,Fm.BasePoint);bd.prototype.decodePoint=o(function(e,r){return this.point(Nse.toArray(e,r),1)},"decodePoint");bd.prototype.point=o(function(e,r){return new Kr(this,e,r)},"point");bd.prototype.pointFromJSON=o(function(e){return Kr.fromJSON(this,e)},"pointFromJSON");Kr.prototype.precompute=o(function(){},"precompute");Kr.prototype._encode=o(function(){return this.getX().toArray("be",this.curve.p.byteLength())},"_encode");Kr.fromJSON=o(function(e,r){return new Kr(e,r[0],r[1]||e.one)},"fromJSON");Kr.prototype.inspect=o(function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},"inspect");Kr.prototype.isInfinity=o(function(){return this.z.cmpn(0)===0},"isInfinity");Kr.prototype.dbl=o(function(){var e=this.x.redAdd(this.z),r=e.redSqr(),n=this.x.redSub(this.z),i=n.redSqr(),s=r.redSub(i),a=r.redMul(i),f=s.redMul(i.redAdd(this.curve.a24.redMul(s)));return this.curve.point(a,f)},"dbl");Kr.prototype.add=o(function(){throw new Error("Not supported on Montgomery curve")},"add");Kr.prototype.diffAdd=o(function(e,r){var n=this.x.redAdd(this.z),i=this.x.redSub(this.z),s=e.x.redAdd(e.z),a=e.x.redSub(e.z),f=a.redMul(n),d=s.redMul(i),h=r.z.redMul(f.redAdd(d).redSqr()),p=r.x.redMul(f.redISub(d).redSqr());return this.curve.point(h,p)},"diffAdd");Kr.prototype.mul=o(function(e){for(var r=e.clone(),n=this,i=this.curve.point(null,null),s=this,a=[];r.cmpn(0)!==0;r.iushrn(1))a.push(r.andln(1));for(var f=a.length-1;f>=0;f--)a[f]===0?(n=n.diffAdd(i,s),i=i.dbl()):(i=n.diffAdd(i,s),n=n.dbl());return i},"mul");Kr.prototype.mulAdd=o(function(){throw new Error("Not supported on Montgomery curve")},"mulAdd");Kr.prototype.jumlAdd=o(function(){throw new Error("Not supported on Montgomery curve")},"jumlAdd");Kr.prototype.eq=o(function(e){return this.getX().cmp(e.getX())===0},"eq");Kr.prototype.normalize=o(function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},"normalize");Kr.prototype.getX=o(function(){return this.normalize(),this.x.fromRed()},"getX")});var sT=Q((s8e,oT)=>{"use strict";var Lse=bi(),Zs=ss(),iT=Vh(),Pm=Hh(),Use=Lse.assert;function as(t){this.twisted=(t.a|0)!==1,this.mOneA=this.twisted&&(t.a|0)===-1,this.extended=this.mOneA,Pm.call(this,"edwards",t),this.a=new Zs(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new Zs(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new Zs(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),Use(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(t.c|0)===1}o(as,"EdwardsCurve");iT(as,Pm);oT.exports=as;as.prototype._mulA=o(function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},"_mulA");as.prototype._mulC=o(function(e){return this.oneC?e:this.c.redMul(e)},"_mulC");as.prototype.jpoint=o(function(e,r,n,i){return this.point(e,r,n,i)},"jpoint");as.prototype.pointFromX=o(function(e,r){e=new Zs(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr(),i=this.c2.redSub(this.a.redMul(n)),s=this.one.redSub(this.c2.redMul(this.d).redMul(n)),a=i.redMul(s.redInvm()),f=a.redSqrt();if(f.redSqr().redSub(a).cmp(this.zero)!==0)throw new Error("invalid point");var d=f.fromRed().isOdd();return(r&&!d||!r&&d)&&(f=f.redNeg()),this.point(e,f)},"pointFromX");as.prototype.pointFromY=o(function(e,r){e=new Zs(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr(),i=n.redSub(this.c2),s=n.redMul(this.d).redMul(this.c2).redSub(this.a),a=i.redMul(s.redInvm());if(a.cmp(this.zero)===0){if(r)throw new Error("invalid point");return this.point(this.zero,e)}var f=a.redSqrt();if(f.redSqr().redSub(a).cmp(this.zero)!==0)throw new Error("invalid point");return f.fromRed().isOdd()!==r&&(f=f.redNeg()),this.point(f,e)},"pointFromY");as.prototype.validate=o(function(e){if(e.isInfinity())return!0;e.normalize();var r=e.x.redSqr(),n=e.y.redSqr(),i=r.redMul(this.a).redAdd(n),s=this.c2.redMul(this.one.redAdd(this.d.redMul(r).redMul(n)));return i.cmp(s)===0},"validate");function fr(t,e,r,n,i){Pm.BasePoint.call(this,t,"projective"),e===null&&r===null&&n===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new Zs(e,16),this.y=new Zs(r,16),this.z=n?new Zs(n,16):this.curve.one,this.t=i&&new Zs(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(fr,"Point");iT(fr,Pm.BasePoint);as.prototype.pointFromJSON=o(function(e){return fr.fromJSON(this,e)},"pointFromJSON");as.prototype.point=o(function(e,r,n,i){return new fr(this,e,r,n,i)},"point");fr.fromJSON=o(function(e,r){return new fr(e,r[0],r[1],r[2])},"fromJSON");fr.prototype.inspect=o(function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},"inspect");fr.prototype.isInfinity=o(function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},"isInfinity");fr.prototype._extDbl=o(function(){var e=this.x.redSqr(),r=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var i=this.curve._mulA(e),s=this.x.redAdd(this.y).redSqr().redISub(e).redISub(r),a=i.redAdd(r),f=a.redSub(n),d=i.redSub(r),h=s.redMul(f),p=a.redMul(d),y=s.redMul(d),I=f.redMul(a);return this.curve.point(h,p,I,y)},"_extDbl");fr.prototype._projDbl=o(function(){var e=this.x.redAdd(this.y).redSqr(),r=this.x.redSqr(),n=this.y.redSqr(),i,s,a,f,d,h;if(this.curve.twisted){f=this.curve._mulA(r);var p=f.redAdd(n);this.zOne?(i=e.redSub(r).redSub(n).redMul(p.redSub(this.curve.two)),s=p.redMul(f.redSub(n)),a=p.redSqr().redSub(p).redSub(p)):(d=this.z.redSqr(),h=p.redSub(d).redISub(d),i=e.redSub(r).redISub(n).redMul(h),s=p.redMul(f.redSub(n)),a=p.redMul(h))}else f=r.redAdd(n),d=this.curve._mulC(this.z).redSqr(),h=f.redSub(d).redSub(d),i=this.curve._mulC(e.redISub(f)).redMul(h),s=this.curve._mulC(f).redMul(r.redISub(n)),a=f.redMul(h);return this.curve.point(i,s,a)},"_projDbl");fr.prototype.dbl=o(function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},"dbl");fr.prototype._extAdd=o(function(e){var r=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),i=this.t.redMul(this.curve.dd).redMul(e.t),s=this.z.redMul(e.z.redAdd(e.z)),a=n.redSub(r),f=s.redSub(i),d=s.redAdd(i),h=n.redAdd(r),p=a.redMul(f),y=d.redMul(h),I=a.redMul(h),T=f.redMul(d);return this.curve.point(p,y,T,I)},"_extAdd");fr.prototype._projAdd=o(function(e){var r=this.z.redMul(e.z),n=r.redSqr(),i=this.x.redMul(e.x),s=this.y.redMul(e.y),a=this.curve.d.redMul(i).redMul(s),f=n.redSub(a),d=n.redAdd(a),h=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(i).redISub(s),p=r.redMul(f).redMul(h),y,I;return this.curve.twisted?(y=r.redMul(d).redMul(s.redSub(this.curve._mulA(i))),I=f.redMul(d)):(y=r.redMul(d).redMul(s.redSub(i)),I=this.curve._mulC(f).redMul(d)),this.curve.point(p,y,I)},"_projAdd");fr.prototype.add=o(function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},"add");fr.prototype.mul=o(function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},"mul");fr.prototype.mulAdd=o(function(e,r,n){return this.curve._wnafMulAdd(1,[this,r],[e,n],2,!1)},"mulAdd");fr.prototype.jmulAdd=o(function(e,r,n){return this.curve._wnafMulAdd(1,[this,r],[e,n],2,!0)},"jmulAdd");fr.prototype.normalize=o(function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},"normalize");fr.prototype.neg=o(function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},"neg");fr.prototype.getX=o(function(){return this.normalize(),this.x.fromRed()},"getX");fr.prototype.getY=o(function(){return this.normalize(),this.y.fromRed()},"getY");fr.prototype.eq=o(function(e){return this===e||this.getX().cmp(e.getX())===0&&this.getY().cmp(e.getY())===0},"eq");fr.prototype.eqXToP=o(function(e){var r=e.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(r)===0)return!0;for(var n=e.clone(),i=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),this.x.cmp(r)===0)return!0}},"eqXToP");fr.prototype.toP=fr.prototype.normalize;fr.prototype.mixedAdd=fr.prototype.add});var Dy=Q(aT=>{"use strict";var Om=aT;Om.base=Hh();Om.short=eT();Om.mont=nT();Om.edwards=sT()});var ko=Q(sr=>{"use strict";var qse=lc(),$se=Vh();sr.inherits=$se;function jse(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}o(jse,"isSurrogatePair");function Hse(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),i=0;i<t.length;i+=2)r.push(parseInt(t[i]+t[i+1],16))}else for(var n=0,i=0;i<t.length;i++){var s=t.charCodeAt(i);s<128?r[n++]=s:s<2048?(r[n++]=s>>6|192,r[n++]=s&63|128):jse(t,i)?(s=65536+((s&1023)<<10)+(t.charCodeAt(++i)&1023),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=s&63|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=s&63|128)}else for(i=0;i<t.length;i++)r[i]=t[i]|0;return r}o(Hse,"toArray");sr.toArray=Hse;function Vse(t){for(var e="",r=0;r<t.length;r++)e+=fT(t[r].toString(16));return e}o(Vse,"toHex");sr.toHex=Vse;function cT(t){var e=t>>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}o(cT,"htonl");sr.htonl=cT;function zse(t,e){for(var r="",n=0;n<t.length;n++){var i=t[n];e==="little"&&(i=cT(i)),r+=uT(i.toString(16))}return r}o(zse,"toHex32");sr.toHex32=zse;function fT(t){return t.length===1?"0"+t:t}o(fT,"zero2");sr.zero2=fT;function uT(t){return t.length===7?"0"+t:t.length===6?"00"+t:t.length===5?"000"+t:t.length===4?"0000"+t:t.length===3?"00000"+t:t.length===2?"000000"+t:t.length===1?"0000000"+t:t}o(uT,"zero8");sr.zero8=uT;function Kse(t,e,r,n){var i=r-e;qse(i%4===0);for(var s=new Array(i/4),a=0,f=e;a<s.length;a++,f+=4){var d;n==="big"?d=t[f]<<24|t[f+1]<<16|t[f+2]<<8|t[f+3]:d=t[f+3]<<24|t[f+2]<<16|t[f+1]<<8|t[f],s[a]=d>>>0}return s}o(Kse,"join32");sr.join32=Kse;function Gse(t,e){for(var r=new Array(t.length*4),n=0,i=0;n<t.length;n++,i+=4){var s=t[n];e==="big"?(r[i]=s>>>24,r[i+1]=s>>>16&255,r[i+2]=s>>>8&255,r[i+3]=s&255):(r[i+3]=s>>>24,r[i+2]=s>>>16&255,r[i+1]=s>>>8&255,r[i]=s&255)}return r}o(Gse,"split32");sr.split32=Gse;function Wse(t,e){return t>>>e|t<<32-e}o(Wse,"rotr32");sr.rotr32=Wse;function Yse(t,e){return t<<e|t>>>32-e}o(Yse,"rotl32");sr.rotl32=Yse;function Jse(t,e){return t+e>>>0}o(Jse,"sum32");sr.sum32=Jse;function Xse(t,e,r){return t+e+r>>>0}o(Xse,"sum32_3");sr.sum32_3=Xse;function Zse(t,e,r,n){return t+e+r+n>>>0}o(Zse,"sum32_4");sr.sum32_4=Zse;function Qse(t,e,r,n,i){return t+e+r+n+i>>>0}o(Qse,"sum32_5");sr.sum32_5=Qse;function eae(t,e,r,n){var i=t[e],s=t[e+1],a=n+s>>>0,f=(a<n?1:0)+r+i;t[e]=f>>>0,t[e+1]=a}o(eae,"sum64");sr.sum64=eae;function tae(t,e,r,n){var i=e+n>>>0,s=(i<e?1:0)+t+r;return s>>>0}o(tae,"sum64_hi");sr.sum64_hi=tae;function rae(t,e,r,n){var i=e+n;return i>>>0}o(rae,"sum64_lo");sr.sum64_lo=rae;function nae(t,e,r,n,i,s,a,f){var d=0,h=e;h=h+n>>>0,d+=h<e?1:0,h=h+s>>>0,d+=h<s?1:0,h=h+f>>>0,d+=h<f?1:0;var p=t+r+i+a+d;return p>>>0}o(nae,"sum64_4_hi");sr.sum64_4_hi=nae;function iae(t,e,r,n,i,s,a,f){var d=e+n+s+f;return d>>>0}o(iae,"sum64_4_lo");sr.sum64_4_lo=iae;function oae(t,e,r,n,i,s,a,f,d,h){var p=0,y=e;y=y+n>>>0,p+=y<e?1:0,y=y+s>>>0,p+=y<s?1:0,y=y+f>>>0,p+=y<f?1:0,y=y+h>>>0,p+=y<h?1:0;var I=t+r+i+a+d+p;return I>>>0}o(oae,"sum64_5_hi");sr.sum64_5_hi=oae;function sae(t,e,r,n,i,s,a,f,d,h){var p=e+n+s+f+h;return p>>>0}o(sae,"sum64_5_lo");sr.sum64_5_lo=sae;function aae(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}o(aae,"rotr64_hi");sr.rotr64_hi=aae;function cae(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}o(cae,"rotr64_lo");sr.rotr64_lo=cae;function fae(t,e,r){return t>>>r}o(fae,"shr64_hi");sr.shr64_hi=fae;function uae(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}o(uae,"shr64_lo");sr.shr64_lo=uae});var vd=Q(lT=>{"use strict";var dT=ko(),dae=lc();function Nm(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}o(Nm,"BlockHash");lT.BlockHash=Nm;Nm.prototype.update=o(function(e,r){if(e=dT.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=dT.join32(e,0,e.length-n,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},"update");Nm.prototype.digest=o(function(e){return this.update(this._pad()),dae(this.pending===null),this._digest(e)},"digest");Nm.prototype._pad=o(function(){var e=this.pendingTotal,r=this._delta8,n=r-(e+this.padLength)%r,i=new Array(n+this.padLength);i[0]=128;for(var s=1;s<n;s++)i[s]=0;if(e<<=3,this.endian==="big"){for(var a=8;a<this.padLength;a++)i[s++]=0;i[s++]=0,i[s++]=0,i[s++]=0,i[s++]=0,i[s++]=e>>>24&255,i[s++]=e>>>16&255,i[s++]=e>>>8&255,i[s++]=e&255}else for(i[s++]=e&255,i[s++]=e>>>8&255,i[s++]=e>>>16&255,i[s++]=e>>>24&255,i[s++]=0,i[s++]=0,i[s++]=0,i[s++]=0,a=8;a<this.padLength;a++)i[s++]=0;return i},"pad")});var Sy=Q(Qs=>{"use strict";var lae=ko(),cs=lae.rotr32;function hae(t,e,r,n){if(t===0)return hT(e,r,n);if(t===1||t===3)return mT(e,r,n);if(t===2)return pT(e,r,n)}o(hae,"ft_1");Qs.ft_1=hae;function hT(t,e,r){return t&e^~t&r}o(hT,"ch32");Qs.ch32=hT;function pT(t,e,r){return t&e^t&r^e&r}o(pT,"maj32");Qs.maj32=pT;function mT(t,e,r){return t^e^r}o(mT,"p32");Qs.p32=mT;function pae(t){return cs(t,2)^cs(t,13)^cs(t,22)}o(pae,"s0_256");Qs.s0_256=pae;function mae(t){return cs(t,6)^cs(t,11)^cs(t,25)}o(mae,"s1_256");Qs.s1_256=mae;function gae(t){return cs(t,7)^cs(t,18)^t>>>3}o(gae,"g0_256");Qs.g0_256=gae;function bae(t){return cs(t,17)^cs(t,19)^t>>>10}o(bae,"g1_256");Qs.g1_256=bae});var vT=Q((d8e,bT)=>{"use strict";var yd=ko(),vae=vd(),yae=Sy(),Ty=yd.rotl32,zh=yd.sum32,xae=yd.sum32_5,wae=yae.ft_1,gT=vae.BlockHash,_ae=[1518500249,1859775393,2400959708,3395469782];function fs(){if(!(this instanceof fs))return new fs;gT.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}o(fs,"SHA1");yd.inherits(fs,gT);bT.exports=fs;fs.blockSize=512;fs.outSize=160;fs.hmacStrength=80;fs.padLength=64;fs.prototype._update=o(function(e,r){for(var n=this.W,i=0;i<16;i++)n[i]=e[r+i];for(;i<n.length;i++)n[i]=Ty(n[i-3]^n[i-8]^n[i-14]^n[i-16],1);var s=this.h[0],a=this.h[1],f=this.h[2],d=this.h[3],h=this.h[4];for(i=0;i<n.length;i++){var p=~~(i/20),y=xae(Ty(s,5),wae(p,a,f,d),h,n[i],_ae[p]);h=d,d=f,f=Ty(a,30),a=s,s=y}this.h[0]=zh(this.h[0],s),this.h[1]=zh(this.h[1],a),this.h[2]=zh(this.h[2],f),this.h[3]=zh(this.h[3],d),this.h[4]=zh(this.h[4],h)},"_update");fs.prototype._digest=o(function(e){return e==="hex"?yd.toHex32(this.h,"big"):yd.split32(this.h,"big")},"digest")});var ky=Q((l8e,xT)=>{"use strict";var xd=ko(),Eae=vd(),wd=Sy(),Aae=lc(),Mo=xd.sum32,Cae=xd.sum32_4,Iae=xd.sum32_5,Dae=wd.ch32,Sae=wd.maj32,Tae=wd.s0_256,kae=wd.s1_256,Mae=wd.g0_256,Rae=wd.g1_256,yT=Eae.BlockHash,Bae=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function us(){if(!(this instanceof us))return new us;yT.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Bae,this.W=new Array(64)}o(us,"SHA256");xd.inherits(us,yT);xT.exports=us;us.blockSize=512;us.outSize=256;us.hmacStrength=192;us.padLength=64;us.prototype._update=o(function(e,r){for(var n=this.W,i=0;i<16;i++)n[i]=e[r+i];for(;i<n.length;i++)n[i]=Cae(Rae(n[i-2]),n[i-7],Mae(n[i-15]),n[i-16]);var s=this.h[0],a=this.h[1],f=this.h[2],d=this.h[3],h=this.h[4],p=this.h[5],y=this.h[6],I=this.h[7];for(Aae(this.k.length===n.length),i=0;i<n.length;i++){var T=Iae(I,kae(h),Dae(h,p,y),this.k[i],n[i]),D=Mo(Tae(s),Sae(s,a,f));I=y,y=p,p=h,h=Mo(d,T),d=f,f=a,a=s,s=Mo(T,D)}this.h[0]=Mo(this.h[0],s),this.h[1]=Mo(this.h[1],a),this.h[2]=Mo(this.h[2],f),this.h[3]=Mo(this.h[3],d),this.h[4]=Mo(this.h[4],h),this.h[5]=Mo(this.h[5],p),this.h[6]=Mo(this.h[6],y),this.h[7]=Mo(this.h[7],I)},"_update");us.prototype._digest=o(function(e){return e==="hex"?xd.toHex32(this.h,"big"):xd.split32(this.h,"big")},"digest")});var ET=Q((h8e,_T)=>{"use strict";var My=ko(),wT=ky();function ea(){if(!(this instanceof ea))return new ea;wT.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}o(ea,"SHA224");My.inherits(ea,wT);_T.exports=ea;ea.blockSize=512;ea.outSize=224;ea.hmacStrength=192;ea.padLength=64;ea.prototype._digest=o(function(e){return e==="hex"?My.toHex32(this.h.slice(0,7),"big"):My.split32(this.h.slice(0,7),"big")},"digest")});var Fy=Q((p8e,DT)=>{"use strict";var Jn=ko(),Fae=vd(),Pae=lc(),ds=Jn.rotr64_hi,ls=Jn.rotr64_lo,AT=Jn.shr64_hi,CT=Jn.shr64_lo,mc=Jn.sum64,Ry=Jn.sum64_hi,By=Jn.sum64_lo,Oae=Jn.sum64_4_hi,Nae=Jn.sum64_4_lo,Lae=Jn.sum64_5_hi,Uae=Jn.sum64_5_lo,IT=Fae.BlockHash,qae=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Ro(){if(!(this instanceof Ro))return new Ro;IT.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=qae,this.W=new Array(160)}o(Ro,"SHA512");Jn.inherits(Ro,IT);DT.exports=Ro;Ro.blockSize=1024;Ro.outSize=512;Ro.hmacStrength=192;Ro.padLength=128;Ro.prototype._prepareBlock=o(function(e,r){for(var n=this.W,i=0;i<32;i++)n[i]=e[r+i];for(;i<n.length;i+=2){var s=Xae(n[i-4],n[i-3]),a=Zae(n[i-4],n[i-3]),f=n[i-14],d=n[i-13],h=Yae(n[i-30],n[i-29]),p=Jae(n[i-30],n[i-29]),y=n[i-32],I=n[i-31];n[i]=Oae(s,a,f,d,h,p,y,I),n[i+1]=Nae(s,a,f,d,h,p,y,I)}},"_prepareBlock");Ro.prototype._update=o(function(e,r){this._prepareBlock(e,r);var n=this.W,i=this.h[0],s=this.h[1],a=this.h[2],f=this.h[3],d=this.h[4],h=this.h[5],p=this.h[6],y=this.h[7],I=this.h[8],T=this.h[9],D=this.h[10],R=this.h[11],H=this.h[12],F=this.h[13],V=this.h[14],X=this.h[15];Pae(this.k.length===n.length);for(var J=0;J<n.length;J+=2){var re=V,z=X,$=Gae(I,T),G=Wae(I,T),le=$ae(I,T,D,R,H,F),P=jae(I,T,D,R,H,F),g=this.k[J],_=this.k[J+1],v=n[J],l=n[J+1],b=Lae(re,z,$,G,le,P,g,_,v,l),E=Uae(re,z,$,G,le,P,g,_,v,l);re=zae(i,s),z=Kae(i,s),$=Hae(i,s,a,f,d,h),G=Vae(i,s,a,f,d,h);var C=Ry(re,z,$,G),A=By(re,z,$,G);V=H,X=F,H=D,F=R,D=I,R=T,I=Ry(p,y,b,E),T=By(y,y,b,E),p=d,y=h,d=a,h=f,a=i,f=s,i=Ry(b,E,C,A),s=By(b,E,C,A)}mc(this.h,0,i,s),mc(this.h,2,a,f),mc(this.h,4,d,h),mc(this.h,6,p,y),mc(this.h,8,I,T),mc(this.h,10,D,R),mc(this.h,12,H,F),mc(this.h,14,V,X)},"_update");Ro.prototype._digest=o(function(e){return e==="hex"?Jn.toHex32(this.h,"big"):Jn.split32(this.h,"big")},"digest");function $ae(t,e,r,n,i){var s=t&r^~t&i;return s<0&&(s+=4294967296),s}o($ae,"ch64_hi");function jae(t,e,r,n,i,s){var a=e&n^~e&s;return a<0&&(a+=4294967296),a}o(jae,"ch64_lo");function Hae(t,e,r,n,i){var s=t&r^t&i^r&i;return s<0&&(s+=4294967296),s}o(Hae,"maj64_hi");function Vae(t,e,r,n,i,s){var a=e&n^e&s^n&s;return a<0&&(a+=4294967296),a}o(Vae,"maj64_lo");function zae(t,e){var r=ds(t,e,28),n=ds(e,t,2),i=ds(e,t,7),s=r^n^i;return s<0&&(s+=4294967296),s}o(zae,"s0_512_hi");function Kae(t,e){var r=ls(t,e,28),n=ls(e,t,2),i=ls(e,t,7),s=r^n^i;return s<0&&(s+=4294967296),s}o(Kae,"s0_512_lo");function Gae(t,e){var r=ds(t,e,14),n=ds(t,e,18),i=ds(e,t,9),s=r^n^i;return s<0&&(s+=4294967296),s}o(Gae,"s1_512_hi");function Wae(t,e){var r=ls(t,e,14),n=ls(t,e,18),i=ls(e,t,9),s=r^n^i;return s<0&&(s+=4294967296),s}o(Wae,"s1_512_lo");function Yae(t,e){var r=ds(t,e,1),n=ds(t,e,8),i=AT(t,e,7),s=r^n^i;return s<0&&(s+=4294967296),s}o(Yae,"g0_512_hi");function Jae(t,e){var r=ls(t,e,1),n=ls(t,e,8),i=CT(t,e,7),s=r^n^i;return s<0&&(s+=4294967296),s}o(Jae,"g0_512_lo");function Xae(t,e){var r=ds(t,e,19),n=ds(e,t,29),i=AT(t,e,6),s=r^n^i;return s<0&&(s+=4294967296),s}o(Xae,"g1_512_hi");function Zae(t,e){var r=ls(t,e,19),n=ls(e,t,29),i=CT(t,e,6),s=r^n^i;return s<0&&(s+=4294967296),s}o(Zae,"g1_512_lo")});var kT=Q((m8e,TT)=>{"use strict";var Py=ko(),ST=Fy();function ta(){if(!(this instanceof ta))return new ta;ST.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}o(ta,"SHA384");Py.inherits(ta,ST);TT.exports=ta;ta.blockSize=1024;ta.outSize=384;ta.hmacStrength=192;ta.padLength=128;ta.prototype._digest=o(function(e){return e==="hex"?Py.toHex32(this.h.slice(0,12),"big"):Py.split32(this.h.slice(0,12),"big")},"digest")});var MT=Q(_d=>{"use strict";_d.sha1=vT();_d.sha224=ET();_d.sha256=ky();_d.sha384=kT();_d.sha512=Fy()});var NT=Q(OT=>{"use strict";var Cf=ko(),Qae=vd(),Lm=Cf.rotl32,RT=Cf.sum32,Kh=Cf.sum32_3,BT=Cf.sum32_4,PT=Qae.BlockHash;function hs(){if(!(this instanceof hs))return new hs;PT.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}o(hs,"RIPEMD160");Cf.inherits(hs,PT);OT.ripemd160=hs;hs.blockSize=512;hs.outSize=160;hs.hmacStrength=192;hs.padLength=64;hs.prototype._update=o(function(e,r){for(var n=this.h[0],i=this.h[1],s=this.h[2],a=this.h[3],f=this.h[4],d=n,h=i,p=s,y=a,I=f,T=0;T<80;T++){var D=RT(Lm(BT(n,FT(T,i,s,a),e[rce[T]+r],ece(T)),ice[T]),f);n=f,f=a,a=Lm(s,10),s=i,i=D,D=RT(Lm(BT(d,FT(79-T,h,p,y),e[nce[T]+r],tce(T)),oce[T]),I),d=I,I=y,y=Lm(p,10),p=h,h=D}D=Kh(this.h[1],s,y),this.h[1]=Kh(this.h[2],a,I),this.h[2]=Kh(this.h[3],f,d),this.h[3]=Kh(this.h[4],n,h),this.h[4]=Kh(this.h[0],i,p),this.h[0]=D},"update");hs.prototype._digest=o(function(e){return e==="hex"?Cf.toHex32(this.h,"little"):Cf.split32(this.h,"little")},"digest");function FT(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}o(FT,"f");function ece(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}o(ece,"K");function tce(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}o(tce,"Kh");var rce=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],nce=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],ice=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],oce=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]});var UT=Q((v8e,LT)=>{"use strict";var sce=ko(),ace=lc();function Ed(t,e,r){if(!(this instanceof Ed))return new Ed(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(sce.toArray(e,r))}o(Ed,"Hmac");LT.exports=Ed;Ed.prototype._init=o(function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),ace(e.length<=this.blockSize);for(var r=e.length;r<this.blockSize;r++)e.push(0);for(r=0;r<e.length;r++)e[r]^=54;for(this.inner=new this.Hash().update(e),r=0;r<e.length;r++)e[r]^=106;this.outer=new this.Hash().update(e)},"init");Ed.prototype.update=o(function(e,r){return this.inner.update(e,r),this},"update");Ed.prototype.digest=o(function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)},"digest")});var Gh=Q(qT=>{var on=qT;on.utils=ko();on.common=vd();on.sha=MT();on.ripemd=NT();on.hmac=UT();on.sha1=on.sha.sha1;on.sha256=on.sha.sha256;on.sha224=on.sha.sha224;on.sha384=on.sha.sha384;on.sha512=on.sha.sha512;on.ripemd160=on.ripemd.ripemd160});var jT=Q((x8e,$T)=>{$T.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}});var Um=Q(zT=>{"use strict";var Ny=zT,gc=Gh(),Oy=Dy(),cce=bi(),HT=cce.assert;function VT(t){t.type==="short"?this.curve=new Oy.short(t):t.type==="edwards"?this.curve=new Oy.edwards(t):this.curve=new Oy.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,HT(this.g.validate(),"Invalid curve"),HT(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}o(VT,"PresetCurve");Ny.PresetCurve=VT;function bc(t,e){Object.defineProperty(Ny,t,{configurable:!0,enumerable:!0,get:function(){var r=new VT(e);return Object.defineProperty(Ny,t,{configurable:!0,enumerable:!0,value:r}),r}})}o(bc,"defineCurve");bc("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:gc.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]});bc("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:gc.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]});bc("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:gc.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]});bc("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:gc.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]});bc("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:gc.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]});bc("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:gc.sha256,gRed:!1,g:["9"]});bc("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:gc.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var Ly;try{Ly=jT()}catch{Ly=void 0}bc("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:gc.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",Ly]})});var WT=Q((_8e,GT)=>{"use strict";var fce=Gh(),If=xy(),KT=lc();function vc(t){if(!(this instanceof vc))return new vc(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=If.toArray(t.entropy,t.entropyEnc||"hex"),r=If.toArray(t.nonce,t.nonceEnc||"hex"),n=If.toArray(t.pers,t.persEnc||"hex");KT(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}o(vc,"HmacDRBG");GT.exports=vc;vc.prototype._init=o(function(e,r,n){var i=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var s=0;s<this.V.length;s++)this.K[s]=0,this.V[s]=1;this._update(i),this._reseed=1,this.reseedInterval=281474976710656},"init");vc.prototype._hmac=o(function(){return new fce.hmac(this.hash,this.K)},"hmac");vc.prototype._update=o(function(e){var r=this._hmac().update(this.V).update([0]);e&&(r=r.update(e)),this.K=r.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},"update");vc.prototype.reseed=o(function(e,r,n,i){typeof r!="string"&&(i=n,n=r,r=null),e=If.toArray(e,r),n=If.toArray(n,i),KT(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},"reseed");vc.prototype.generate=o(function(e,r,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(i=n,n=r,r=null),n&&(n=If.toArray(n,i||"hex"),this._update(n));for(var s=[];s.length<e;)this.V=this._hmac().update(this.V).digest(),s=s.concat(this.V);var a=s.slice(0,e);return this._update(n),this._reseed++,If.encode(a,r)},"generate")});var JT=Q((E8e,YT)=>{"use strict";var uce=ss(),dce=bi(),Uy=dce.assert;function wn(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}o(wn,"KeyPair");YT.exports=wn;wn.fromPublic=o(function(e,r,n){return r instanceof wn?r:new wn(e,{pub:r,pubEnc:n})},"fromPublic");wn.fromPrivate=o(function(e,r,n){return r instanceof wn?r:new wn(e,{priv:r,privEnc:n})},"fromPrivate");wn.prototype.validate=o(function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},"validate");wn.prototype.getPublic=o(function(e,r){return typeof e=="string"&&(r=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),r?this.pub.encode(r,e):this.pub},"getPublic");wn.prototype.getPrivate=o(function(e){return e==="hex"?this.priv.toString(16,2):this.priv},"getPrivate");wn.prototype._importPrivate=o(function(e,r){this.priv=new uce(e,r||16),this.priv=this.priv.umod(this.ec.curve.n)},"_importPrivate");wn.prototype._importPublic=o(function(e,r){if(e.x||e.y){this.ec.curve.type==="mont"?Uy(e.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&Uy(e.x&&e.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(e.x,e.y);return}this.pub=this.ec.curve.decodePoint(e,r)},"_importPublic");wn.prototype.derive=o(function(e){return e.validate()||Uy(e.validate(),"public point not validated"),e.mul(this.priv).getX()},"derive");wn.prototype.sign=o(function(e,r,n){return this.ec.sign(e,this,r,n)},"sign");wn.prototype.verify=o(function(e,r){return this.ec.verify(e,r,this)},"verify");wn.prototype.inspect=o(function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"},"inspect")});var QT=Q((A8e,ZT)=>{"use strict";var qm=ss(),jy=bi(),lce=jy.assert;function $m(t,e){if(t instanceof $m)return t;this._importDER(t,e)||(lce(t.r&&t.s,"Signature without r or s"),this.r=new qm(t.r,16),this.s=new qm(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}o($m,"Signature");ZT.exports=$m;function hce(){this.place=0}o(hce,"Position");function qy(t,e){var r=t[e.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4)return!1;for(var i=0,s=0,a=e.place;s<n;s++,a++)i<<=8,i|=t[a],i>>>=0;return i<=127?!1:(e.place=a,i)}o(qy,"getLength");function XT(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e<r;)e++;return e===0?t:t.slice(e)}o(XT,"rmPadding");$m.prototype._importDER=o(function(e,r){e=jy.toArray(e,r);var n=new hce;if(e[n.place++]!==48)return!1;var i=qy(e,n);if(i===!1||i+n.place!==e.length||e[n.place++]!==2)return!1;var s=qy(e,n);if(s===!1)return!1;var a=e.slice(n.place,s+n.place);if(n.place+=s,e[n.place++]!==2)return!1;var f=qy(e,n);if(f===!1||e.length!==f+n.place)return!1;var d=e.slice(n.place,f+n.place);if(a[0]===0)if(a[1]&128)a=a.slice(1);else return!1;if(d[0]===0)if(d[1]&128)d=d.slice(1);else return!1;return this.r=new qm(a),this.s=new qm(d),this.recoveryParam=null,!0},"_importDER");function $y(t,e){if(e<128){t.push(e);return}var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}o($y,"constructLength");$m.prototype.toDER=o(function(e){var r=this.r.toArray(),n=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),n[0]&128&&(n=[0].concat(n)),r=XT(r),n=XT(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];$y(i,r.length),i=i.concat(r),i.push(2),$y(i,n.length);var s=i.concat(n),a=[48];return $y(a,s.length),a=a.concat(s),jy.encode(a,e)},"toDER")});var nk=Q((C8e,rk)=>{"use strict";var Df=ss(),ek=WT(),pce=bi(),Hy=Um(),mce=Ay(),tk=pce.assert,Vy=JT(),jm=QT();function eo(t){if(!(this instanceof eo))return new eo(t);typeof t=="string"&&(tk(Object.prototype.hasOwnProperty.call(Hy,t),"Unknown curve "+t),t=Hy[t]),t instanceof Hy.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}o(eo,"EC");rk.exports=eo;eo.prototype.keyPair=o(function(e){return new Vy(this,e)},"keyPair");eo.prototype.keyFromPrivate=o(function(e,r){return Vy.fromPrivate(this,e,r)},"keyFromPrivate");eo.prototype.keyFromPublic=o(function(e,r){return Vy.fromPublic(this,e,r)},"keyFromPublic");eo.prototype.genKeyPair=o(function(e){e||(e={});for(var r=new ek({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||mce(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new Df(2));;){var s=new Df(r.generate(n));if(!(s.cmp(i)>0))return s.iaddn(1),this.keyFromPrivate(s)}},"genKeyPair");eo.prototype._truncateToN=o(function(e,r){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e},"_truncateToN");eo.prototype.sign=o(function(e,r,n,i){typeof n=="object"&&(i=n,n=null),i||(i={}),r=this.keyFromPrivate(r,n),e=this._truncateToN(new Df(e,16));for(var s=this.n.byteLength(),a=r.getPrivate().toArray("be",s),f=e.toArray("be",s),d=new ek({hash:this.hash,entropy:a,nonce:f,pers:i.pers,persEnc:i.persEnc||"utf8"}),h=this.n.sub(new Df(1)),p=0;;p++){var y=i.k?i.k(p):new Df(d.generate(this.n.byteLength()));if(y=this._truncateToN(y,!0),!(y.cmpn(1)<=0||y.cmp(h)>=0)){var I=this.g.mul(y);if(!I.isInfinity()){var T=I.getX(),D=T.umod(this.n);if(D.cmpn(0)!==0){var R=y.invm(this.n).mul(D.mul(r.getPrivate()).iadd(e));if(R=R.umod(this.n),R.cmpn(0)!==0){var H=(I.getY().isOdd()?1:0)|(T.cmp(D)!==0?2:0);return i.canonical&&R.cmp(this.nh)>0&&(R=this.n.sub(R),H^=1),new jm({r:D,s:R,recoveryParam:H})}}}}}},"sign");eo.prototype.verify=o(function(e,r,n,i){e=this._truncateToN(new Df(e,16)),n=this.keyFromPublic(n,i),r=new jm(r,"hex");var s=r.r,a=r.s;if(s.cmpn(1)<0||s.cmp(this.n)>=0||a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var f=a.invm(this.n),d=f.mul(e).umod(this.n),h=f.mul(s).umod(this.n),p;return this.curve._maxwellTrick?(p=this.g.jmulAdd(d,n.getPublic(),h),p.isInfinity()?!1:p.eqXToP(s)):(p=this.g.mulAdd(d,n.getPublic(),h),p.isInfinity()?!1:p.getX().umod(this.n).cmp(s)===0)},"verify");eo.prototype.recoverPubKey=function(t,e,r,n){tk((3&r)===r,"The recovery param is more than two bits"),e=new jm(e,n);var i=this.n,s=new Df(t),a=e.r,f=e.s,d=r&1,h=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw new Error("Unable to find sencond key candinate");h?a=this.curve.pointFromX(a.add(this.curve.n),d):a=this.curve.pointFromX(a,d);var p=e.r.invm(i),y=i.sub(s).mul(p).umod(i),I=f.mul(p).umod(i);return this.g.mulAdd(y,a,I)};eo.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new jm(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var s;try{s=this.recoverPubKey(t,e,i)}catch{continue}if(s.eq(r))return i}throw new Error("Unable to find valid recovery factor")}});var ak=Q((I8e,sk)=>{"use strict";var Wh=bi(),ok=Wh.assert,ik=Wh.parseBytes,Ad=Wh.cachedProperty;function Gr(t,e){this.eddsa=t,this._secret=ik(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=ik(e.pub)}o(Gr,"KeyPair");Gr.fromPublic=o(function(e,r){return r instanceof Gr?r:new Gr(e,{pub:r})},"fromPublic");Gr.fromSecret=o(function(e,r){return r instanceof Gr?r:new Gr(e,{secret:r})},"fromSecret");Gr.prototype.secret=o(function(){return this._secret},"secret");Ad(Gr,"pubBytes",o(function(){return this.eddsa.encodePoint(this.pub())},"pubBytes"));Ad(Gr,"pub",o(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())},"pub"));Ad(Gr,"privBytes",o(function(){var e=this.eddsa,r=this.hash(),n=e.encodingLength-1,i=r.slice(0,e.encodingLength);return i[0]&=248,i[n]&=127,i[n]|=64,i},"privBytes"));Ad(Gr,"priv",o(function(){return this.eddsa.decodeInt(this.privBytes())},"priv"));Ad(Gr,"hash",o(function(){return this.eddsa.hash().update(this.secret()).digest()},"hash"));Ad(Gr,"messagePrefix",o(function(){return this.hash().slice(this.eddsa.encodingLength)},"messagePrefix"));Gr.prototype.sign=o(function(e){return ok(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},"sign");Gr.prototype.verify=o(function(e,r){return this.eddsa.verify(e,r,this)},"verify");Gr.prototype.getSecret=o(function(e){return ok(this._secret,"KeyPair is public only"),Wh.encode(this.secret(),e)},"getSecret");Gr.prototype.getPublic=o(function(e){return Wh.encode(this.pubBytes(),e)},"getPublic");sk.exports=Gr});var fk=Q((D8e,ck)=>{"use strict";var gce=ss(),Hm=bi(),bce=Hm.assert,Vm=Hm.cachedProperty,vce=Hm.parseBytes;function Sf(t,e){this.eddsa=t,typeof e!="object"&&(e=vce(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),bce(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof gce&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}o(Sf,"Signature");Vm(Sf,"S",o(function(){return this.eddsa.decodeInt(this.Sencoded())},"S"));Vm(Sf,"R",o(function(){return this.eddsa.decodePoint(this.Rencoded())},"R"));Vm(Sf,"Rencoded",o(function(){return this.eddsa.encodePoint(this.R())},"Rencoded"));Vm(Sf,"Sencoded",o(function(){return this.eddsa.encodeInt(this.S())},"Sencoded"));Sf.prototype.toBytes=o(function(){return this.Rencoded().concat(this.Sencoded())},"toBytes");Sf.prototype.toHex=o(function(){return Hm.encode(this.toBytes(),"hex").toUpperCase()},"toHex");ck.exports=Sf});var pk=Q((S8e,hk)=>{"use strict";var yce=Gh(),xce=Um(),Cd=bi(),wce=Cd.assert,dk=Cd.parseBytes,lk=ak(),uk=fk();function Xn(t){if(wce(t==="ed25519","only tested with ed25519 so far"),!(this instanceof Xn))return new Xn(t);t=xce[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=yce.sha512}o(Xn,"EDDSA");hk.exports=Xn;Xn.prototype.sign=o(function(e,r){e=dk(e);var n=this.keyFromSecret(r),i=this.hashInt(n.messagePrefix(),e),s=this.g.mul(i),a=this.encodePoint(s),f=this.hashInt(a,n.pubBytes(),e).mul(n.priv()),d=i.add(f).umod(this.curve.n);return this.makeSignature({R:s,S:d,Rencoded:a})},"sign");Xn.prototype.verify=o(function(e,r,n){e=dk(e),r=this.makeSignature(r);var i=this.keyFromPublic(n),s=this.hashInt(r.Rencoded(),i.pubBytes(),e),a=this.g.mul(r.S()),f=r.R().add(i.pub().mul(s));return f.eq(a)},"verify");Xn.prototype.hashInt=o(function(){for(var e=this.hash(),r=0;r<arguments.length;r++)e.update(arguments[r]);return Cd.intFromLE(e.digest()).umod(this.curve.n)},"hashInt");Xn.prototype.keyFromPublic=o(function(e){return lk.fromPublic(this,e)},"keyFromPublic");Xn.prototype.keyFromSecret=o(function(e){return lk.fromSecret(this,e)},"keyFromSecret");Xn.prototype.makeSignature=o(function(e){return e instanceof uk?e:new uk(this,e)},"makeSignature");Xn.prototype.encodePoint=o(function(e){var r=e.getY().toArray("le",this.encodingLength);return r[this.encodingLength-1]|=e.getX().isOdd()?128:0,r},"encodePoint");Xn.prototype.decodePoint=o(function(e){e=Cd.parseBytes(e);var r=e.length-1,n=e.slice(0,r).concat(e[r]&-129),i=(e[r]&128)!==0,s=Cd.intFromLE(n);return this.curve.pointFromY(s,i)},"decodePoint");Xn.prototype.encodeInt=o(function(e){return e.toArray("le",this.encodingLength)},"encodeInt");Xn.prototype.decodeInt=o(function(e){return Cd.intFromLE(e)},"decodeInt");Xn.prototype.isPoint=o(function(e){return e instanceof this.pointClass},"isPoint")});var gk=Q(mk=>{"use strict";var Tf=mk;Tf.version=VS().version;Tf.utils=bi();Tf.rand=Ay();Tf.curve=Dy();Tf.curves=Um();Tf.ec=nk();Tf.eddsa=pk()});var vk=Q(Km=>{"use strict";Object.defineProperty(Km,"__esModule",{value:!0});Km.BrowserRandomSource=void 0;var bk=65536,zm=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;let e=typeof self<"u"?self.crypto||self.msCrypto:null;e&&e.getRandomValues!==void 0&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");let r=new Uint8Array(e);for(let n=0;n<r.length;n+=bk)this._crypto.getRandomValues(r.subarray(n,n+Math.min(r.length-n,bk)));return r}};o(zm,"BrowserRandomSource");Km.BrowserRandomSource=zm});var yk=Q(Wm=>{"use strict";Object.defineProperty(Wm,"__esModule",{value:!0});Wm.NodeRandomSource=void 0;var _ce=Xi(),Gm=class{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,typeof require<"u"){let e=require("crypto");e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let r=this._crypto.randomBytes(e);if(r.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");let n=new Uint8Array(e);for(let i=0;i<n.length;i++)n[i]=r[i];return(0,_ce.wipe)(r),n}};o(Gm,"NodeRandomSource");Wm.NodeRandomSource=Gm});var xk=Q(Jm=>{"use strict";Object.defineProperty(Jm,"__esModule",{value:!0});Jm.SystemRandomSource=void 0;var Ece=vk(),Ace=yk(),Ym=class{constructor(){if(this.isAvailable=!1,this.name="",this._source=new Ece.BrowserRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Browser";return}if(this._source=new Ace.NodeRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Node";return}}randomBytes(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}};o(Ym,"SystemRandomSource");Jm.SystemRandomSource=Ym});var kf=Q(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.randomStringForEntropy=_n.randomString=_n.randomUint32=_n.randomBytes=_n.defaultRandomSource=void 0;var Cce=xk(),Ice=Ef(),wk=Xi();_n.defaultRandomSource=new Cce.SystemRandomSource;function zy(t,e=_n.defaultRandomSource){return e.randomBytes(t)}o(zy,"randomBytes");_n.randomBytes=zy;function Dce(t=_n.defaultRandomSource){let e=zy(4,t),r=(0,Ice.readUint32LE)(e);return(0,wk.wipe)(e),r}o(Dce,"randomUint32");_n.randomUint32=Dce;var _k="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function Ek(t,e=_k,r=_n.defaultRandomSource){if(e.length<2)throw new Error("randomString charset is too short");if(e.length>256)throw new Error("randomString charset is too long");let n="",i=e.length,s=256-256%i;for(;t>0;){let a=zy(Math.ceil(t*256/s),r);for(let f=0;f<a.length&&t>0;f++){let d=a[f];d<s&&(n+=e.charAt(d%i),t--)}(0,wk.wipe)(a)}return n}o(Ek,"randomString");_n.randomString=Ek;function Sce(t,e=_k,r=_n.defaultRandomSource){let n=Math.ceil(t/(Math.log(e.length)/Math.LN2));return Ek(n,e,r)}o(Sce,"randomStringForEntropy");_n.randomStringForEntropy=Sce});var Ik=Q(ra=>{"use strict";Object.defineProperty(ra,"__esModule",{value:!0});var Dd=Ef(),Id=Xi();ra.DIGEST_LENGTH=64;ra.BLOCK_SIZE=128;var Ck=function(){function t(){this.digestLength=ra.DIGEST_LENGTH,this.blockSize=ra.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return o(t,"SHA512"),t.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},t.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},t.prototype.clean=function(){Id.wipe(this._buffer),Id.wipe(this._tempHi),Id.wipe(this._tempLo),this.reset()},t.prototype.update=function(e,r){if(r===void 0&&(r=e.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var n=0;if(this._bytesHashed+=r,this._bufferLength>0){for(;this._bufferLength<ra.BLOCK_SIZE&&r>0;)this._buffer[this._bufferLength++]=e[n++],r--;this._bufferLength===this.blockSize&&(Ky(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(r>=this.blockSize&&(n=Ky(this._tempHi,this._tempLo,this._stateHi,this._stateLo,e,n,r),r%=this.blockSize);r>0;)this._buffer[this._bufferLength++]=e[n++],r--;return this},t.prototype.finish=function(e){if(!this._finished){var r=this._bytesHashed,n=this._bufferLength,i=r/536870912|0,s=r<<3,a=r%128<112?128:256;this._buffer[n]=128;for(var f=n+1;f<a-8;f++)this._buffer[f]=0;Dd.writeUint32BE(i,this._buffer,a-8),Dd.writeUint32BE(s,this._buffer,a-4),Ky(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,a),this._finished=!0}for(var f=0;f<this.digestLength/8;f++)Dd.writeUint32BE(this._stateHi[f],e,f*8),Dd.writeUint32BE(this._stateLo[f],e,f*8+4);return this},t.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},t.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{stateHi:new Int32Array(this._stateHi),stateLo:new Int32Array(this._stateLo),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},t.prototype.restoreState=function(e){return this._stateHi.set(e.stateHi),this._stateLo.set(e.stateLo),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},t.prototype.cleanSavedState=function(e){Id.wipe(e.stateHi),Id.wipe(e.stateLo),e.buffer&&Id.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},t}();ra.SHA512=Ck;var Ak=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function Ky(t,e,r,n,i,s,a){for(var f=r[0],d=r[1],h=r[2],p=r[3],y=r[4],I=r[5],T=r[6],D=r[7],R=n[0],H=n[1],F=n[2],V=n[3],X=n[4],J=n[5],re=n[6],z=n[7],$,G,le,P,g,_,v,l;a>=128;){for(var b=0;b<16;b++){var E=8*b+s;t[b]=Dd.readUint32BE(i,E),e[b]=Dd.readUint32BE(i,E+4)}for(var b=0;b<80;b++){var C=f,A=d,x=h,k=p,O=y,w=I,M=T,he=D,B=R,ee=H,ae=F,q=V,U=X,te=J,oe=re,ce=z;if($=D,G=z,g=G&65535,_=G>>>16,v=$&65535,l=$>>>16,$=(y>>>14|X<<32-14)^(y>>>18|X<<32-18)^(X>>>41-32|y<<32-(41-32)),G=(X>>>14|y<<32-14)^(X>>>18|y<<32-18)^(y>>>41-32|X<<32-(41-32)),g+=G&65535,_+=G>>>16,v+=$&65535,l+=$>>>16,$=y&I^~y&T,G=X&J^~X&re,g+=G&65535,_+=G>>>16,v+=$&65535,l+=$>>>16,$=Ak[b*2],G=Ak[b*2+1],g+=G&65535,_+=G>>>16,v+=$&65535,l+=$>>>16,$=t[b%16],G=e[b%16],g+=G&65535,_+=G>>>16,v+=$&65535,l+=$>>>16,_+=g>>>16,v+=_>>>16,l+=v>>>16,le=v&65535|l<<16,P=g&65535|_<<16,$=le,G=P,g=G&65535,_=G>>>16,v=$&65535,l=$>>>16,$=(f>>>28|R<<32-28)^(R>>>34-32|f<<32-(34-32))^(R>>>39-32|f<<32-(39-32)),G=(R>>>28|f<<32-28)^(f>>>34-32|R<<32-(34-32))^(f>>>39-32|R<<32-(39-32)),g+=G&65535,_+=G>>>16,v+=$&65535,l+=$>>>16,$=f&d^f&h^d&h,G=R&H^R&F^H&F,g+=G&65535,_+=G>>>16,v+=$&65535,l+=$>>>16,_+=g>>>16,v+=_>>>16,l+=v>>>16,he=v&65535|l<<16,ce=g&65535|_<<16,$=k,G=q,g=G&65535,_=G>>>16,v=$&65535,l=$>>>16,$=le,G=P,g+=G&65535,_+=G>>>16,v+=$&65535,l+=$>>>16,_+=g>>>16,v+=_>>>16,l+=v>>>16,k=v&65535|l<<16,q=g&65535|_<<16,d=C,h=A,p=x,y=k,I=O,T=w,D=M,f=he,H=B,F=ee,V=ae,X=q,J=U,re=te,z=oe,R=ce,b%16===15)for(var E=0;E<16;E++)$=t[E],G=e[E],g=G&65535,_=G>>>16,v=$&65535,l=$>>>16,$=t[(E+9)%16],G=e[(E+9)%16],g+=G&65535,_+=G>>>16,v+=$&65535,l+=$>>>16,le=t[(E+1)%16],P=e[(E+1)%16],$=(le>>>1|P<<32-1)^(le>>>8|P<<32-8)^le>>>7,G=(P>>>1|le<<32-1)^(P>>>8|le<<32-8)^(P>>>7|le<<32-7),g+=G&65535,_+=G>>>16,v+=$&65535,l+=$>>>16,le=t[(E+14)%16],P=e[(E+14)%16],$=(le>>>19|P<<32-19)^(P>>>61-32|le<<32-(61-32))^le>>>6,G=(P>>>19|le<<32-19)^(le>>>61-32|P<<32-(61-32))^(P>>>6|le<<32-6),g+=G&65535,_+=G>>>16,v+=$&65535,l+=$>>>16,_+=g>>>16,v+=_>>>16,l+=v>>>16,t[E]=v&65535|l<<16,e[E]=g&65535|_<<16}$=f,G=R,g=G&65535,_=G>>>16,v=$&65535,l=$>>>16,$=r[0],G=n[0],g+=G&65535,_+=G>>>16,v+=$&65535,l+=$>>>16,_+=g>>>16,v+=_>>>16,l+=v>>>16,r[0]=f=v&65535|l<<16,n[0]=R=g&65535|_<<16,$=d,G=H,g=G&65535,_=G>>>16,v=$&65535,l=$>>>16,$=r[1],G=n[1],g+=G&65535,_+=G>>>16,v+=$&65535,l+=$>>>16,_+=g>>>16,v+=_>>>16,l+=v>>>16,r[1]=d=v&65535|l<<16,n[1]=H=g&65535|_<<16,$=h,G=F,g=G&65535,_=G>>>16,v=$&65535,l=$>>>16,$=r[2],G=n[2],g+=G&65535,_+=G>>>16,v+=$&65535,l+=$>>>16,_+=g>>>16,v+=_>>>16,l+=v>>>16,r[2]=h=v&65535|l<<16,n[2]=F=g&65535|_<<16,$=p,G=V,g=G&65535,_=G>>>16,v=$&65535,l=$>>>16,$=r[3],G=n[3],g+=G&65535,_+=G>>>16,v+=$&65535,l+=$>>>16,_+=g>>>16,v+=_>>>16,l+=v>>>16,r[3]=p=v&65535|l<<16,n[3]=V=g&65535|_<<16,$=y,G=X,g=G&65535,_=G>>>16,v=$&65535,l=$>>>16,$=r[4],G=n[4],g+=G&65535,_+=G>>>16,v+=$&65535,l+=$>>>16,_+=g>>>16,v+=_>>>16,l+=v>>>16,r[4]=y=v&65535|l<<16,n[4]=X=g&65535|_<<16,$=I,G=J,g=G&65535,_=G>>>16,v=$&65535,l=$>>>16,$=r[5],G=n[5],g+=G&65535,_+=G>>>16,v+=$&65535,l+=$>>>16,_+=g>>>16,v+=_>>>16,l+=v>>>16,r[5]=I=v&65535|l<<16,n[5]=J=g&65535|_<<16,$=T,G=re,g=G&65535,_=G>>>16,v=$&65535,l=$>>>16,$=r[6],G=n[6],g+=G&65535,_+=G>>>16,v+=$&65535,l+=$>>>16,_+=g>>>16,v+=_>>>16,l+=v>>>16,r[6]=T=v&65535|l<<16,n[6]=re=g&65535|_<<16,$=D,G=z,g=G&65535,_=G>>>16,v=$&65535,l=$>>>16,$=r[7],G=n[7],g+=G&65535,_+=G>>>16,v+=$&65535,l+=$>>>16,_+=g>>>16,v+=_>>>16,l+=v>>>16,r[7]=D=v&65535|l<<16,n[7]=z=g&65535|_<<16,s+=128,a-=128}return s}o(Ky,"hashBlocks");function Tce(t){var e=new Ck;e.update(t);var r=e.digest();return e.clean(),r}o(Tce,"hash");ra.hash=Tce});var Xm=Q(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.convertSecretKeyToX25519=Zt.convertPublicKeyToX25519=Zt.verify=Zt.sign=Zt.extractPublicKeyFromSecretKey=Zt.generateKeyPair=Zt.generateKeyPairFromSeed=Zt.SEED_LENGTH=Zt.SECRET_KEY_LENGTH=Zt.PUBLIC_KEY_LENGTH=Zt.SIGNATURE_LENGTH=void 0;var kce=kf(),Yh=Ik(),Mk=Xi();Zt.SIGNATURE_LENGTH=64;Zt.PUBLIC_KEY_LENGTH=32;Zt.SECRET_KEY_LENGTH=64;Zt.SEED_LENGTH=32;function Ye(t){let e=new Float64Array(16);if(t)for(let r=0;r<t.length;r++)e[r]=t[r];return e}o(Ye,"gf");var Mce=new Uint8Array(32);Mce[0]=9;var Yy=Ye(),Sd=Ye([1]),Rce=Ye([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),Bce=Ye([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),Dk=Ye([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),Sk=Ye([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),Fce=Ye([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function yc(t,e){for(let r=0;r<16;r++)t[r]=e[r]|0}o(yc,"set25519");function Gy(t){let e=1;for(let r=0;r<16;r++){let n=t[r]+e+65535;e=Math.floor(n/65536),t[r]=n-e*65536}t[0]+=e-1+37*(e-1)}o(Gy,"car25519");function Rk(t,e,r){let n=~(r-1);for(let i=0;i<16;i++){let s=n&(t[i]^e[i]);t[i]^=s,e[i]^=s}}o(Rk,"sel25519");function Jh(t,e){let r=Ye(),n=Ye();for(let i=0;i<16;i++)n[i]=e[i];Gy(n),Gy(n),Gy(n);for(let i=0;i<2;i++){r[0]=n[0]-65517;for(let a=1;a<15;a++)r[a]=n[a]-65535-(r[a-1]>>16&1),r[a-1]&=65535;r[15]=n[15]-32767-(r[14]>>16&1);let s=r[15]>>16&1;r[14]&=65535,Rk(n,r,1-s)}for(let i=0;i<16;i++)t[2*i]=n[i]&255,t[2*i+1]=n[i]>>8}o(Jh,"pack25519");function Bk(t,e){let r=0;for(let n=0;n<32;n++)r|=t[n]^e[n];return(1&r-1>>>8)-1}o(Bk,"verify32");function Tk(t,e){let r=new Uint8Array(32),n=new Uint8Array(32);return Jh(r,t),Jh(n,e),Bk(r,n)}o(Tk,"neq25519");function Fk(t){let e=new Uint8Array(32);return Jh(e,t),e[0]&1}o(Fk,"par25519");function Pce(t,e){for(let r=0;r<16;r++)t[r]=e[2*r]+(e[2*r+1]<<8);t[15]&=32767}o(Pce,"unpack25519");function Mf(t,e,r){for(let n=0;n<16;n++)t[n]=e[n]+r[n]}o(Mf,"add");function Bf(t,e,r){for(let n=0;n<16;n++)t[n]=e[n]-r[n]}o(Bf,"sub");function nr(t,e,r){let n,i,s=0,a=0,f=0,d=0,h=0,p=0,y=0,I=0,T=0,D=0,R=0,H=0,F=0,V=0,X=0,J=0,re=0,z=0,$=0,G=0,le=0,P=0,g=0,_=0,v=0,l=0,b=0,E=0,C=0,A=0,x=0,k=r[0],O=r[1],w=r[2],M=r[3],he=r[4],B=r[5],ee=r[6],ae=r[7],q=r[8],U=r[9],te=r[10],oe=r[11],ce=r[12],Ce=r[13],ve=r[14],ie=r[15];n=e[0],s+=n*k,a+=n*O,f+=n*w,d+=n*M,h+=n*he,p+=n*B,y+=n*ee,I+=n*ae,T+=n*q,D+=n*U,R+=n*te,H+=n*oe,F+=n*ce,V+=n*Ce,X+=n*ve,J+=n*ie,n=e[1],a+=n*k,f+=n*O,d+=n*w,h+=n*M,p+=n*he,y+=n*B,I+=n*ee,T+=n*ae,D+=n*q,R+=n*U,H+=n*te,F+=n*oe,V+=n*ce,X+=n*Ce,J+=n*ve,re+=n*ie,n=e[2],f+=n*k,d+=n*O,h+=n*w,p+=n*M,y+=n*he,I+=n*B,T+=n*ee,D+=n*ae,R+=n*q,H+=n*U,F+=n*te,V+=n*oe,X+=n*ce,J+=n*Ce,re+=n*ve,z+=n*ie,n=e[3],d+=n*k,h+=n*O,p+=n*w,y+=n*M,I+=n*he,T+=n*B,D+=n*ee,R+=n*ae,H+=n*q,F+=n*U,V+=n*te,X+=n*oe,J+=n*ce,re+=n*Ce,z+=n*ve,$+=n*ie,n=e[4],h+=n*k,p+=n*O,y+=n*w,I+=n*M,T+=n*he,D+=n*B,R+=n*ee,H+=n*ae,F+=n*q,V+=n*U,X+=n*te,J+=n*oe,re+=n*ce,z+=n*Ce,$+=n*ve,G+=n*ie,n=e[5],p+=n*k,y+=n*O,I+=n*w,T+=n*M,D+=n*he,R+=n*B,H+=n*ee,F+=n*ae,V+=n*q,X+=n*U,J+=n*te,re+=n*oe,z+=n*ce,$+=n*Ce,G+=n*ve,le+=n*ie,n=e[6],y+=n*k,I+=n*O,T+=n*w,D+=n*M,R+=n*he,H+=n*B,F+=n*ee,V+=n*ae,X+=n*q,J+=n*U,re+=n*te,z+=n*oe,$+=n*ce,G+=n*Ce,le+=n*ve,P+=n*ie,n=e[7],I+=n*k,T+=n*O,D+=n*w,R+=n*M,H+=n*he,F+=n*B,V+=n*ee,X+=n*ae,J+=n*q,re+=n*U,z+=n*te,$+=n*oe,G+=n*ce,le+=n*Ce,P+=n*ve,g+=n*ie,n=e[8],T+=n*k,D+=n*O,R+=n*w,H+=n*M,F+=n*he,V+=n*B,X+=n*ee,J+=n*ae,re+=n*q,z+=n*U,$+=n*te,G+=n*oe,le+=n*ce,P+=n*Ce,g+=n*ve,_+=n*ie,n=e[9],D+=n*k,R+=n*O,H+=n*w,F+=n*M,V+=n*he,X+=n*B,J+=n*ee,re+=n*ae,z+=n*q,$+=n*U,G+=n*te,le+=n*oe,P+=n*ce,g+=n*Ce,_+=n*ve,v+=n*ie,n=e[10],R+=n*k,H+=n*O,F+=n*w,V+=n*M,X+=n*he,J+=n*B,re+=n*ee,z+=n*ae,$+=n*q,G+=n*U,le+=n*te,P+=n*oe,g+=n*ce,_+=n*Ce,v+=n*ve,l+=n*ie,n=e[11],H+=n*k,F+=n*O,V+=n*w,X+=n*M,J+=n*he,re+=n*B,z+=n*ee,$+=n*ae,G+=n*q,le+=n*U,P+=n*te,g+=n*oe,_+=n*ce,v+=n*Ce,l+=n*ve,b+=n*ie,n=e[12],F+=n*k,V+=n*O,X+=n*w,J+=n*M,re+=n*he,z+=n*B,$+=n*ee,G+=n*ae,le+=n*q,P+=n*U,g+=n*te,_+=n*oe,v+=n*ce,l+=n*Ce,b+=n*ve,E+=n*ie,n=e[13],V+=n*k,X+=n*O,J+=n*w,re+=n*M,z+=n*he,$+=n*B,G+=n*ee,le+=n*ae,P+=n*q,g+=n*U,_+=n*te,v+=n*oe,l+=n*ce,b+=n*Ce,E+=n*ve,C+=n*ie,n=e[14],X+=n*k,J+=n*O,re+=n*w,z+=n*M,$+=n*he,G+=n*B,le+=n*ee,P+=n*ae,g+=n*q,_+=n*U,v+=n*te,l+=n*oe,b+=n*ce,E+=n*Ce,C+=n*ve,A+=n*ie,n=e[15],J+=n*k,re+=n*O,z+=n*w,$+=n*M,G+=n*he,le+=n*B,P+=n*ee,g+=n*ae,_+=n*q,v+=n*U,l+=n*te,b+=n*oe,E+=n*ce,C+=n*Ce,A+=n*ve,x+=n*ie,s+=38*re,a+=38*z,f+=38*$,d+=38*G,h+=38*le,p+=38*P,y+=38*g,I+=38*_,T+=38*v,D+=38*l,R+=38*b,H+=38*E,F+=38*C,V+=38*A,X+=38*x,i=1,n=s+i+65535,i=Math.floor(n/65536),s=n-i*65536,n=a+i+65535,i=Math.floor(n/65536),a=n-i*65536,n=f+i+65535,i=Math.floor(n/65536),f=n-i*65536,n=d+i+65535,i=Math.floor(n/65536),d=n-i*65536,n=h+i+65535,i=Math.floor(n/65536),h=n-i*65536,n=p+i+65535,i=Math.floor(n/65536),p=n-i*65536,n=y+i+65535,i=Math.floor(n/65536),y=n-i*65536,n=I+i+65535,i=Math.floor(n/65536),I=n-i*65536,n=T+i+65535,i=Math.floor(n/65536),T=n-i*65536,n=D+i+65535,i=Math.floor(n/65536),D=n-i*65536,n=R+i+65535,i=Math.floor(n/65536),R=n-i*65536,n=H+i+65535,i=Math.floor(n/65536),H=n-i*65536,n=F+i+65535,i=Math.floor(n/65536),F=n-i*65536,n=V+i+65535,i=Math.floor(n/65536),V=n-i*65536,n=X+i+65535,i=Math.floor(n/65536),X=n-i*65536,n=J+i+65535,i=Math.floor(n/65536),J=n-i*65536,s+=i-1+37*(i-1),i=1,n=s+i+65535,i=Math.floor(n/65536),s=n-i*65536,n=a+i+65535,i=Math.floor(n/65536),a=n-i*65536,n=f+i+65535,i=Math.floor(n/65536),f=n-i*65536,n=d+i+65535,i=Math.floor(n/65536),d=n-i*65536,n=h+i+65535,i=Math.floor(n/65536),h=n-i*65536,n=p+i+65535,i=Math.floor(n/65536),p=n-i*65536,n=y+i+65535,i=Math.floor(n/65536),y=n-i*65536,n=I+i+65535,i=Math.floor(n/65536),I=n-i*65536,n=T+i+65535,i=Math.floor(n/65536),T=n-i*65536,n=D+i+65535,i=Math.floor(n/65536),D=n-i*65536,n=R+i+65535,i=Math.floor(n/65536),R=n-i*65536,n=H+i+65535,i=Math.floor(n/65536),H=n-i*65536,n=F+i+65535,i=Math.floor(n/65536),F=n-i*65536,n=V+i+65535,i=Math.floor(n/65536),V=n-i*65536,n=X+i+65535,i=Math.floor(n/65536),X=n-i*65536,n=J+i+65535,i=Math.floor(n/65536),J=n-i*65536,s+=i-1+37*(i-1),t[0]=s,t[1]=a,t[2]=f,t[3]=d,t[4]=h,t[5]=p,t[6]=y,t[7]=I,t[8]=T,t[9]=D,t[10]=R,t[11]=H,t[12]=F,t[13]=V,t[14]=X,t[15]=J}o(nr,"mul");function Rf(t,e){nr(t,e,e)}o(Rf,"square");function Pk(t,e){let r=Ye(),n;for(n=0;n<16;n++)r[n]=e[n];for(n=253;n>=0;n--)Rf(r,r),n!==2&&n!==4&&nr(r,r,e);for(n=0;n<16;n++)t[n]=r[n]}o(Pk,"inv25519");function Oce(t,e){let r=Ye(),n;for(n=0;n<16;n++)r[n]=e[n];for(n=250;n>=0;n--)Rf(r,r),n!==1&&nr(r,r,e);for(n=0;n<16;n++)t[n]=r[n]}o(Oce,"pow2523");function Jy(t,e){let r=Ye(),n=Ye(),i=Ye(),s=Ye(),a=Ye(),f=Ye(),d=Ye(),h=Ye(),p=Ye();Bf(r,t[1],t[0]),Bf(p,e[1],e[0]),nr(r,r,p),Mf(n,t[0],t[1]),Mf(p,e[0],e[1]),nr(n,n,p),nr(i,t[3],e[3]),nr(i,i,Bce),nr(s,t[2],e[2]),Mf(s,s,s),Bf(a,n,r),Bf(f,s,i),Mf(d,s,i),Mf(h,n,r),nr(t[0],a,f),nr(t[1],h,d),nr(t[2],d,f),nr(t[3],a,h)}o(Jy,"edadd");function kk(t,e,r){for(let n=0;n<4;n++)Rk(t[n],e[n],r)}o(kk,"cswap");function Zy(t,e){let r=Ye(),n=Ye(),i=Ye();Pk(i,e[2]),nr(r,e[0],i),nr(n,e[1],i),Jh(t,n),t[31]^=Fk(r)<<7}o(Zy,"pack");function Ok(t,e,r){yc(t[0],Yy),yc(t[1],Sd),yc(t[2],Sd),yc(t[3],Yy);for(let n=255;n>=0;--n){let i=r[n/8|0]>>(n&7)&1;kk(t,e,i),Jy(e,t),Jy(t,t),kk(t,e,i)}}o(Ok,"scalarmult");function Qy(t,e){let r=[Ye(),Ye(),Ye(),Ye()];yc(r[0],Dk),yc(r[1],Sk),yc(r[2],Sd),nr(r[3],Dk,Sk),Ok(t,r,e)}o(Qy,"scalarbase");function Nk(t){if(t.length!==Zt.SEED_LENGTH)throw new Error(`ed25519: seed must be ${Zt.SEED_LENGTH} bytes`);let e=(0,Yh.hash)(t);e[0]&=248,e[31]&=127,e[31]|=64;let r=new Uint8Array(32),n=[Ye(),Ye(),Ye(),Ye()];Qy(n,e),Zy(r,n);let i=new Uint8Array(64);return i.set(t),i.set(r,32),{publicKey:r,secretKey:i}}o(Nk,"generateKeyPairFromSeed");Zt.generateKeyPairFromSeed=Nk;function Nce(t){let e=(0,kce.randomBytes)(32,t),r=Nk(e);return(0,Mk.wipe)(e),r}o(Nce,"generateKeyPair");Zt.generateKeyPair=Nce;function Lce(t){if(t.length!==Zt.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${Zt.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(t.subarray(32))}o(Lce,"extractPublicKeyFromSecretKey");Zt.extractPublicKeyFromSecretKey=Lce;var Wy=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function Lk(t,e){let r,n,i,s;for(n=63;n>=32;--n){for(r=0,i=n-32,s=n-12;i<s;++i)e[i]+=r-16*e[n]*Wy[i-(n-32)],r=Math.floor((e[i]+128)/256),e[i]-=r*256;e[i]+=r,e[n]=0}for(r=0,i=0;i<32;i++)e[i]+=r-(e[31]>>4)*Wy[i],r=e[i]>>8,e[i]&=255;for(i=0;i<32;i++)e[i]-=r*Wy[i];for(n=0;n<32;n++)e[n+1]+=e[n]>>8,t[n]=e[n]&255}o(Lk,"modL");function Xy(t){let e=new Float64Array(64);for(let r=0;r<64;r++)e[r]=t[r];for(let r=0;r<64;r++)t[r]=0;Lk(t,e)}o(Xy,"reduce");function Uce(t,e){let r=new Float64Array(64),n=[Ye(),Ye(),Ye(),Ye()],i=(0,Yh.hash)(t.subarray(0,32));i[0]&=248,i[31]&=127,i[31]|=64;let s=new Uint8Array(64);s.set(i.subarray(32),32);let a=new Yh.SHA512;a.update(s.subarray(32)),a.update(e);let f=a.digest();a.clean(),Xy(f),Qy(n,f),Zy(s,n),a.reset(),a.update(s.subarray(0,32)),a.update(t.subarray(32)),a.update(e);let d=a.digest();Xy(d);for(let h=0;h<32;h++)r[h]=f[h];for(let h=0;h<32;h++)for(let p=0;p<32;p++)r[h+p]+=d[h]*i[p];return Lk(s.subarray(32),r),s}o(Uce,"sign");Zt.sign=Uce;function Uk(t,e){let r=Ye(),n=Ye(),i=Ye(),s=Ye(),a=Ye(),f=Ye(),d=Ye();return yc(t[2],Sd),Pce(t[1],e),Rf(i,t[1]),nr(s,i,Rce),Bf(i,i,t[2]),Mf(s,t[2],s),Rf(a,s),Rf(f,a),nr(d,f,a),nr(r,d,i),nr(r,r,s),Oce(r,r),nr(r,r,i),nr(r,r,s),nr(r,r,s),nr(t[0],r,s),Rf(n,t[0]),nr(n,n,s),Tk(n,i)&&nr(t[0],t[0],Fce),Rf(n,t[0]),nr(n,n,s),Tk(n,i)?-1:(Fk(t[0])===e[31]>>7&&Bf(t[0],Yy,t[0]),nr(t[3],t[0],t[1]),0)}o(Uk,"unpackneg");function qce(t,e,r){let n=new Uint8Array(32),i=[Ye(),Ye(),Ye(),Ye()],s=[Ye(),Ye(),Ye(),Ye()];if(r.length!==Zt.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${Zt.SIGNATURE_LENGTH} bytes`);if(Uk(s,t))return!1;let a=new Yh.SHA512;a.update(r.subarray(0,32)),a.update(t),a.update(e);let f=a.digest();return Xy(f),Ok(i,s,f),Qy(s,r.subarray(32)),Jy(i,s),Zy(n,i),!Bk(r,n)}o(qce,"verify");Zt.verify=qce;function $ce(t){let e=[Ye(),Ye(),Ye(),Ye()];if(Uk(e,t))throw new Error("Ed25519: invalid public key");let r=Ye(),n=Ye(),i=e[1];Mf(r,Sd,i),Bf(n,Sd,i),Pk(n,n),nr(r,r,n);let s=new Uint8Array(32);return Jh(s,r),s}o($ce,"convertPublicKeyToX25519");Zt.convertPublicKeyToX25519=$ce;function jce(t){let e=(0,Yh.hash)(t.subarray(0,32));e[0]&=248,e[31]&=127,e[31]|=64;let r=new Uint8Array(e.subarray(0,32));return(0,Mk.wipe)(e),r}o(jce,"convertSecretKeyToX25519");Zt.convertSecretKeyToX25519=jce});var $k=Q((O8e,qk)=>{"use strict";qk.exports=o(function t(e){return e===null||typeof e!="object"||e.toJSON!=null?JSON.stringify(e):Array.isArray(e)?"["+e.reduce((r,n,i)=>{let s=i===0?"":",",a=n===void 0||typeof n=="symbol"?null:n;return r+s+t(a)},"")+"]":"{"+Object.keys(e).sort().reduce((r,n,i)=>{if(e[n]===void 0||typeof e[n]=="symbol")return r;let s=r.length===0?"":",";return r+s+t(n)+":"+t(e[n])},"")+"}"},"serialize")});var zk=Q(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.sharedKey=_r.generateKeyPair=_r.generateKeyPairFromSeed=_r.scalarMultBase=_r.scalarMult=_r.SHARED_KEY_LENGTH=_r.SECRET_KEY_LENGTH=_r.PUBLIC_KEY_LENGTH=void 0;var Hce=kf(),Vce=Xi();_r.PUBLIC_KEY_LENGTH=32;_r.SECRET_KEY_LENGTH=32;_r.SHARED_KEY_LENGTH=32;function ps(t){let e=new Float64Array(16);if(t)for(let r=0;r<t.length;r++)e[r]=t[r];return e}o(ps,"gf");var jk=new Uint8Array(32);jk[0]=9;var zce=ps([56129,1]);function ex(t){let e=1;for(let r=0;r<16;r++){let n=t[r]+e+65535;e=Math.floor(n/65536),t[r]=n-e*65536}t[0]+=e-1+37*(e-1)}o(ex,"car25519");function Xh(t,e,r){let n=~(r-1);for(let i=0;i<16;i++){let s=n&(t[i]^e[i]);t[i]^=s,e[i]^=s}}o(Xh,"sel25519");function Kce(t,e){let r=ps(),n=ps();for(let i=0;i<16;i++)n[i]=e[i];ex(n),ex(n),ex(n);for(let i=0;i<2;i++){r[0]=n[0]-65517;for(let a=1;a<15;a++)r[a]=n[a]-65535-(r[a-1]>>16&1),r[a-1]&=65535;r[15]=n[15]-32767-(r[14]>>16&1);let s=r[15]>>16&1;r[14]&=65535,Xh(n,r,1-s)}for(let i=0;i<16;i++)t[2*i]=n[i]&255,t[2*i+1]=n[i]>>8}o(Kce,"pack25519");function Gce(t,e){for(let r=0;r<16;r++)t[r]=e[2*r]+(e[2*r+1]<<8);t[15]&=32767}o(Gce,"unpack25519");function Zm(t,e,r){for(let n=0;n<16;n++)t[n]=e[n]+r[n]}o(Zm,"add");function Qm(t,e,r){for(let n=0;n<16;n++)t[n]=e[n]-r[n]}o(Qm,"sub");function na(t,e,r){let n,i,s=0,a=0,f=0,d=0,h=0,p=0,y=0,I=0,T=0,D=0,R=0,H=0,F=0,V=0,X=0,J=0,re=0,z=0,$=0,G=0,le=0,P=0,g=0,_=0,v=0,l=0,b=0,E=0,C=0,A=0,x=0,k=r[0],O=r[1],w=r[2],M=r[3],he=r[4],B=r[5],ee=r[6],ae=r[7],q=r[8],U=r[9],te=r[10],oe=r[11],ce=r[12],Ce=r[13],ve=r[14],ie=r[15];n=e[0],s+=n*k,a+=n*O,f+=n*w,d+=n*M,h+=n*he,p+=n*B,y+=n*ee,I+=n*ae,T+=n*q,D+=n*U,R+=n*te,H+=n*oe,F+=n*ce,V+=n*Ce,X+=n*ve,J+=n*ie,n=e[1],a+=n*k,f+=n*O,d+=n*w,h+=n*M,p+=n*he,y+=n*B,I+=n*ee,T+=n*ae,D+=n*q,R+=n*U,H+=n*te,F+=n*oe,V+=n*ce,X+=n*Ce,J+=n*ve,re+=n*ie,n=e[2],f+=n*k,d+=n*O,h+=n*w,p+=n*M,y+=n*he,I+=n*B,T+=n*ee,D+=n*ae,R+=n*q,H+=n*U,F+=n*te,V+=n*oe,X+=n*ce,J+=n*Ce,re+=n*ve,z+=n*ie,n=e[3],d+=n*k,h+=n*O,p+=n*w,y+=n*M,I+=n*he,T+=n*B,D+=n*ee,R+=n*ae,H+=n*q,F+=n*U,V+=n*te,X+=n*oe,J+=n*ce,re+=n*Ce,z+=n*ve,$+=n*ie,n=e[4],h+=n*k,p+=n*O,y+=n*w,I+=n*M,T+=n*he,D+=n*B,R+=n*ee,H+=n*ae,F+=n*q,V+=n*U,X+=n*te,J+=n*oe,re+=n*ce,z+=n*Ce,$+=n*ve,G+=n*ie,n=e[5],p+=n*k,y+=n*O,I+=n*w,T+=n*M,D+=n*he,R+=n*B,H+=n*ee,F+=n*ae,V+=n*q,X+=n*U,J+=n*te,re+=n*oe,z+=n*ce,$+=n*Ce,G+=n*ve,le+=n*ie,n=e[6],y+=n*k,I+=n*O,T+=n*w,D+=n*M,R+=n*he,H+=n*B,F+=n*ee,V+=n*ae,X+=n*q,J+=n*U,re+=n*te,z+=n*oe,$+=n*ce,G+=n*Ce,le+=n*ve,P+=n*ie,n=e[7],I+=n*k,T+=n*O,D+=n*w,R+=n*M,H+=n*he,F+=n*B,V+=n*ee,X+=n*ae,J+=n*q,re+=n*U,z+=n*te,$+=n*oe,G+=n*ce,le+=n*Ce,P+=n*ve,g+=n*ie,n=e[8],T+=n*k,D+=n*O,R+=n*w,H+=n*M,F+=n*he,V+=n*B,X+=n*ee,J+=n*ae,re+=n*q,z+=n*U,$+=n*te,G+=n*oe,le+=n*ce,P+=n*Ce,g+=n*ve,_+=n*ie,n=e[9],D+=n*k,R+=n*O,H+=n*w,F+=n*M,V+=n*he,X+=n*B,J+=n*ee,re+=n*ae,z+=n*q,$+=n*U,G+=n*te,le+=n*oe,P+=n*ce,g+=n*Ce,_+=n*ve,v+=n*ie,n=e[10],R+=n*k,H+=n*O,F+=n*w,V+=n*M,X+=n*he,J+=n*B,re+=n*ee,z+=n*ae,$+=n*q,G+=n*U,le+=n*te,P+=n*oe,g+=n*ce,_+=n*Ce,v+=n*ve,l+=n*ie,n=e[11],H+=n*k,F+=n*O,V+=n*w,X+=n*M,J+=n*he,re+=n*B,z+=n*ee,$+=n*ae,G+=n*q,le+=n*U,P+=n*te,g+=n*oe,_+=n*ce,v+=n*Ce,l+=n*ve,b+=n*ie,n=e[12],F+=n*k,V+=n*O,X+=n*w,J+=n*M,re+=n*he,z+=n*B,$+=n*ee,G+=n*ae,le+=n*q,P+=n*U,g+=n*te,_+=n*oe,v+=n*ce,l+=n*Ce,b+=n*ve,E+=n*ie,n=e[13],V+=n*k,X+=n*O,J+=n*w,re+=n*M,z+=n*he,$+=n*B,G+=n*ee,le+=n*ae,P+=n*q,g+=n*U,_+=n*te,v+=n*oe,l+=n*ce,b+=n*Ce,E+=n*ve,C+=n*ie,n=e[14],X+=n*k,J+=n*O,re+=n*w,z+=n*M,$+=n*he,G+=n*B,le+=n*ee,P+=n*ae,g+=n*q,_+=n*U,v+=n*te,l+=n*oe,b+=n*ce,E+=n*Ce,C+=n*ve,A+=n*ie,n=e[15],J+=n*k,re+=n*O,z+=n*w,$+=n*M,G+=n*he,le+=n*B,P+=n*ee,g+=n*ae,_+=n*q,v+=n*U,l+=n*te,b+=n*oe,E+=n*ce,C+=n*Ce,A+=n*ve,x+=n*ie,s+=38*re,a+=38*z,f+=38*$,d+=38*G,h+=38*le,p+=38*P,y+=38*g,I+=38*_,T+=38*v,D+=38*l,R+=38*b,H+=38*E,F+=38*C,V+=38*A,X+=38*x,i=1,n=s+i+65535,i=Math.floor(n/65536),s=n-i*65536,n=a+i+65535,i=Math.floor(n/65536),a=n-i*65536,n=f+i+65535,i=Math.floor(n/65536),f=n-i*65536,n=d+i+65535,i=Math.floor(n/65536),d=n-i*65536,n=h+i+65535,i=Math.floor(n/65536),h=n-i*65536,n=p+i+65535,i=Math.floor(n/65536),p=n-i*65536,n=y+i+65535,i=Math.floor(n/65536),y=n-i*65536,n=I+i+65535,i=Math.floor(n/65536),I=n-i*65536,n=T+i+65535,i=Math.floor(n/65536),T=n-i*65536,n=D+i+65535,i=Math.floor(n/65536),D=n-i*65536,n=R+i+65535,i=Math.floor(n/65536),R=n-i*65536,n=H+i+65535,i=Math.floor(n/65536),H=n-i*65536,n=F+i+65535,i=Math.floor(n/65536),F=n-i*65536,n=V+i+65535,i=Math.floor(n/65536),V=n-i*65536,n=X+i+65535,i=Math.floor(n/65536),X=n-i*65536,n=J+i+65535,i=Math.floor(n/65536),J=n-i*65536,s+=i-1+37*(i-1),i=1,n=s+i+65535,i=Math.floor(n/65536),s=n-i*65536,n=a+i+65535,i=Math.floor(n/65536),a=n-i*65536,n=f+i+65535,i=Math.floor(n/65536),f=n-i*65536,n=d+i+65535,i=Math.floor(n/65536),d=n-i*65536,n=h+i+65535,i=Math.floor(n/65536),h=n-i*65536,n=p+i+65535,i=Math.floor(n/65536),p=n-i*65536,n=y+i+65535,i=Math.floor(n/65536),y=n-i*65536,n=I+i+65535,i=Math.floor(n/65536),I=n-i*65536,n=T+i+65535,i=Math.floor(n/65536),T=n-i*65536,n=D+i+65535,i=Math.floor(n/65536),D=n-i*65536,n=R+i+65535,i=Math.floor(n/65536),R=n-i*65536,n=H+i+65535,i=Math.floor(n/65536),H=n-i*65536,n=F+i+65535,i=Math.floor(n/65536),F=n-i*65536,n=V+i+65535,i=Math.floor(n/65536),V=n-i*65536,n=X+i+65535,i=Math.floor(n/65536),X=n-i*65536,n=J+i+65535,i=Math.floor(n/65536),J=n-i*65536,s+=i-1+37*(i-1),t[0]=s,t[1]=a,t[2]=f,t[3]=d,t[4]=h,t[5]=p,t[6]=y,t[7]=I,t[8]=T,t[9]=D,t[10]=R,t[11]=H,t[12]=F,t[13]=V,t[14]=X,t[15]=J}o(na,"mul");function Zh(t,e){na(t,e,e)}o(Zh,"square");function Wce(t,e){let r=ps();for(let n=0;n<16;n++)r[n]=e[n];for(let n=253;n>=0;n--)Zh(r,r),n!==2&&n!==4&&na(r,r,e);for(let n=0;n<16;n++)t[n]=r[n]}o(Wce,"inv25519");function tx(t,e){let r=new Uint8Array(32),n=new Float64Array(80),i=ps(),s=ps(),a=ps(),f=ps(),d=ps(),h=ps();for(let T=0;T<31;T++)r[T]=t[T];r[31]=t[31]&127|64,r[0]&=248,Gce(n,e);for(let T=0;T<16;T++)s[T]=n[T];i[0]=f[0]=1;for(let T=254;T>=0;--T){let D=r[T>>>3]>>>(T&7)&1;Xh(i,s,D),Xh(a,f,D),Zm(d,i,a),Qm(i,i,a),Zm(a,s,f),Qm(s,s,f),Zh(f,d),Zh(h,i),na(i,a,i),na(a,s,d),Zm(d,i,a),Qm(i,i,a),Zh(s,i),Qm(a,f,h),na(i,a,zce),Zm(i,i,f),na(a,a,i),na(i,f,h),na(f,s,n),Zh(s,d),Xh(i,s,D),Xh(a,f,D)}for(let T=0;T<16;T++)n[T+16]=i[T],n[T+32]=a[T],n[T+48]=s[T],n[T+64]=f[T];let p=n.subarray(32),y=n.subarray(16);Wce(p,p),na(y,y,p);let I=new Uint8Array(32);return Kce(I,y),I}o(tx,"scalarMult");_r.scalarMult=tx;function Hk(t){return tx(t,jk)}o(Hk,"scalarMultBase");_r.scalarMultBase=Hk;function Vk(t){if(t.length!==_r.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${_r.SECRET_KEY_LENGTH} bytes`);let e=new Uint8Array(t);return{publicKey:Hk(e),secretKey:e}}o(Vk,"generateKeyPairFromSeed");_r.generateKeyPairFromSeed=Vk;function Yce(t){let e=(0,Hce.randomBytes)(32,t),r=Vk(e);return(0,Vce.wipe)(e),r}o(Yce,"generateKeyPair");_r.generateKeyPair=Yce;function Jce(t,e,r=!1){if(t.length!==_r.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(e.length!==_r.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");let n=tx(t,e);if(r){let i=0;for(let s=0;s<n.length;s++)i|=n[s];if(i===0)throw new Error("X25519: invalid shared key")}return n}o(Jce,"sharedKey");_r.sharedKey=Jce});var nx=Q(eg=>{"use strict";Object.defineProperty(eg,"__esModule",{value:!0});var En=Ef(),rx=Xi(),Xce=20;function Zce(t,e,r){for(var n=1634760805,i=857760878,s=2036477234,a=1797285236,f=r[3]<<24|r[2]<<16|r[1]<<8|r[0],d=r[7]<<24|r[6]<<16|r[5]<<8|r[4],h=r[11]<<24|r[10]<<16|r[9]<<8|r[8],p=r[15]<<24|r[14]<<16|r[13]<<8|r[12],y=r[19]<<24|r[18]<<16|r[17]<<8|r[16],I=r[23]<<24|r[22]<<16|r[21]<<8|r[20],T=r[27]<<24|r[26]<<16|r[25]<<8|r[24],D=r[31]<<24|r[30]<<16|r[29]<<8|r[28],R=e[3]<<24|e[2]<<16|e[1]<<8|e[0],H=e[7]<<24|e[6]<<16|e[5]<<8|e[4],F=e[11]<<24|e[10]<<16|e[9]<<8|e[8],V=e[15]<<24|e[14]<<16|e[13]<<8|e[12],X=n,J=i,re=s,z=a,$=f,G=d,le=h,P=p,g=y,_=I,v=T,l=D,b=R,E=H,C=F,A=V,x=0;x<Xce;x+=2)X=X+$|0,b^=X,b=b>>>32-16|b<<16,g=g+b|0,$^=g,$=$>>>32-12|$<<12,J=J+G|0,E^=J,E=E>>>32-16|E<<16,_=_+E|0,G^=_,G=G>>>32-12|G<<12,re=re+le|0,C^=re,C=C>>>32-16|C<<16,v=v+C|0,le^=v,le=le>>>32-12|le<<12,z=z+P|0,A^=z,A=A>>>32-16|A<<16,l=l+A|0,P^=l,P=P>>>32-12|P<<12,re=re+le|0,C^=re,C=C>>>32-8|C<<8,v=v+C|0,le^=v,le=le>>>32-7|le<<7,z=z+P|0,A^=z,A=A>>>32-8|A<<8,l=l+A|0,P^=l,P=P>>>32-7|P<<7,J=J+G|0,E^=J,E=E>>>32-8|E<<8,_=_+E|0,G^=_,G=G>>>32-7|G<<7,X=X+$|0,b^=X,b=b>>>32-8|b<<8,g=g+b|0,$^=g,$=$>>>32-7|$<<7,X=X+G|0,A^=X,A=A>>>32-16|A<<16,v=v+A|0,G^=v,G=G>>>32-12|G<<12,J=J+le|0,b^=J,b=b>>>32-16|b<<16,l=l+b|0,le^=l,le=le>>>32-12|le<<12,re=re+P|0,E^=re,E=E>>>32-16|E<<16,g=g+E|0,P^=g,P=P>>>32-12|P<<12,z=z+$|0,C^=z,C=C>>>32-16|C<<16,_=_+C|0,$^=_,$=$>>>32-12|$<<12,re=re+P|0,E^=re,E=E>>>32-8|E<<8,g=g+E|0,P^=g,P=P>>>32-7|P<<7,z=z+$|0,C^=z,C=C>>>32-8|C<<8,_=_+C|0,$^=_,$=$>>>32-7|$<<7,J=J+le|0,b^=J,b=b>>>32-8|b<<8,l=l+b|0,le^=l,le=le>>>32-7|le<<7,X=X+G|0,A^=X,A=A>>>32-8|A<<8,v=v+A|0,G^=v,G=G>>>32-7|G<<7;En.writeUint32LE(X+n|0,t,0),En.writeUint32LE(J+i|0,t,4),En.writeUint32LE(re+s|0,t,8),En.writeUint32LE(z+a|0,t,12),En.writeUint32LE($+f|0,t,16),En.writeUint32LE(G+d|0,t,20),En.writeUint32LE(le+h|0,t,24),En.writeUint32LE(P+p|0,t,28),En.writeUint32LE(g+y|0,t,32),En.writeUint32LE(_+I|0,t,36),En.writeUint32LE(v+T|0,t,40),En.writeUint32LE(l+D|0,t,44),En.writeUint32LE(b+R|0,t,48),En.writeUint32LE(E+H|0,t,52),En.writeUint32LE(C+F|0,t,56),En.writeUint32LE(A+V|0,t,60)}o(Zce,"core");function Kk(t,e,r,n,i){if(i===void 0&&(i=0),t.length!==32)throw new Error("ChaCha: key size must be 32 bytes");if(n.length<r.length)throw new Error("ChaCha: destination is shorter than source");var s,a;if(i===0){if(e.length!==8&&e.length!==12)throw new Error("ChaCha nonce must be 8 or 12 bytes");s=new Uint8Array(16),a=s.length-e.length,s.set(e,a)}else{if(e.length!==16)throw new Error("ChaCha nonce with counter must be 16 bytes");s=e,a=i}for(var f=new Uint8Array(64),d=0;d<r.length;d+=64){Zce(f,s,t);for(var h=d;h<d+64&&h<r.length;h++)n[h]=r[h]^f[h-d];efe(s,0,a)}return rx.wipe(f),i===0&&rx.wipe(s),n}o(Kk,"streamXOR");eg.streamXOR=Kk;function Qce(t,e,r,n){return n===void 0&&(n=0),rx.wipe(r),Kk(t,e,r,r,n)}o(Qce,"stream");eg.stream=Qce;function efe(t,e,r){for(var n=1;r--;)n=n+(t[e]&255)|0,t[e]=n&255,n>>>=8,e++;if(n>0)throw new Error("ChaCha: counter overflow")}o(efe,"incrementCounter")});var Jk=Q(Qh=>{"use strict";Object.defineProperty(Qh,"__esModule",{value:!0});var xc=Ef(),Gk=Xi(),tfe=nx(),rfe=20;function Wk(t,e,r,n){if(e.length!==24)throw new Error("XChaCha20 nonce must be 24 bytes");var i=Yk(t,e.subarray(0,16),new Uint8Array(32)),s=new Uint8Array(12);s.set(e.subarray(16),4);var a=tfe.streamXOR(i,s,r,n);return Gk.wipe(i),a}o(Wk,"streamXOR");Qh.streamXOR=Wk;function nfe(t,e,r){return Gk.wipe(r),Wk(t,e,r,r)}o(nfe,"stream");Qh.stream=nfe;function Yk(t,e,r){for(var n=1634760805,i=857760878,s=2036477234,a=1797285236,f=t[3]<<24|t[2]<<16|t[1]<<8|t[0],d=t[7]<<24|t[6]<<16|t[5]<<8|t[4],h=t[11]<<24|t[10]<<16|t[9]<<8|t[8],p=t[15]<<24|t[14]<<16|t[13]<<8|t[12],y=t[19]<<24|t[18]<<16|t[17]<<8|t[16],I=t[23]<<24|t[22]<<16|t[21]<<8|t[20],T=t[27]<<24|t[26]<<16|t[25]<<8|t[24],D=t[31]<<24|t[30]<<16|t[29]<<8|t[28],R=e[3]<<24|e[2]<<16|e[1]<<8|e[0],H=e[7]<<24|e[6]<<16|e[5]<<8|e[4],F=e[11]<<24|e[10]<<16|e[9]<<8|e[8],V=e[15]<<24|e[14]<<16|e[13]<<8|e[12],X=n,J=i,re=s,z=a,$=f,G=d,le=h,P=p,g=y,_=I,v=T,l=D,b=R,E=H,C=F,A=V,x=0;x<rfe;x+=2)X=X+$|0,b^=X,b=b>>>32-16|b<<16,g=g+b|0,$^=g,$=$>>>32-12|$<<12,J=J+G|0,E^=J,E=E>>>32-16|E<<16,_=_+E|0,G^=_,G=G>>>32-12|G<<12,re=re+le|0,C^=re,C=C>>>32-16|C<<16,v=v+C|0,le^=v,le=le>>>32-12|le<<12,z=z+P|0,A^=z,A=A>>>32-16|A<<16,l=l+A|0,P^=l,P=P>>>32-12|P<<12,re=re+le|0,C^=re,C=C>>>32-8|C<<8,v=v+C|0,le^=v,le=le>>>32-7|le<<7,z=z+P|0,A^=z,A=A>>>32-8|A<<8,l=l+A|0,P^=l,P=P>>>32-7|P<<7,J=J+G|0,E^=J,E=E>>>32-8|E<<8,_=_+E|0,G^=_,G=G>>>32-7|G<<7,X=X+$|0,b^=X,b=b>>>32-8|b<<8,g=g+b|0,$^=g,$=$>>>32-7|$<<7,X=X+G|0,A^=X,A=A>>>32-16|A<<16,v=v+A|0,G^=v,G=G>>>32-12|G<<12,J=J+le|0,b^=J,b=b>>>32-16|b<<16,l=l+b|0,le^=l,le=le>>>32-12|le<<12,re=re+P|0,E^=re,E=E>>>32-16|E<<16,g=g+E|0,P^=g,P=P>>>32-12|P<<12,z=z+$|0,C^=z,C=C>>>32-16|C<<16,_=_+C|0,$^=_,$=$>>>32-12|$<<12,re=re+P|0,E^=re,E=E>>>32-8|E<<8,g=g+E|0,P^=g,P=P>>>32-7|P<<7,z=z+$|0,C^=z,C=C>>>32-8|C<<8,_=_+C|0,$^=_,$=$>>>32-7|$<<7,J=J+le|0,b^=J,b=b>>>32-8|b<<8,l=l+b|0,le^=l,le=le>>>32-7|le<<7,X=X+G|0,A^=X,A=A>>>32-8|A<<8,v=v+A|0,G^=v,G=G>>>32-7|G<<7;return xc.writeUint32LE(X,r,0),xc.writeUint32LE(J,r,4),xc.writeUint32LE(re,r,8),xc.writeUint32LE(z,r,12),xc.writeUint32LE(b,r,16),xc.writeUint32LE(E,r,20),xc.writeUint32LE(C,r,24),xc.writeUint32LE(A,r,28),r}o(Yk,"hchacha");Qh.hchacha=Yk});var ix=Q(Td=>{"use strict";Object.defineProperty(Td,"__esModule",{value:!0});function ife(t,e,r){return~(t-1)&e|t-1&r}o(ife,"select");Td.select=ife;function ofe(t,e){return(t|0)-(e|0)-1>>>31&1}o(ofe,"lessOrEqual");Td.lessOrEqual=ofe;function Xk(t,e){if(t.length!==e.length)return 0;for(var r=0,n=0;n<t.length;n++)r|=t[n]^e[n];return 1&r-1>>>8}o(Xk,"compare");Td.compare=Xk;function sfe(t,e){return t.length===0||e.length===0?!1:Xk(t,e)!==0}o(sfe,"equal");Td.equal=sfe});var Qk=Q(ia=>{"use strict";Object.defineProperty(ia,"__esModule",{value:!0});var afe=ix(),tg=Xi();ia.DIGEST_LENGTH=16;var Zk=function(){function t(e){this.digestLength=ia.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var r=e[0]|e[1]<<8;this._r[0]=r&8191;var n=e[2]|e[3]<<8;this._r[1]=(r>>>13|n<<3)&8191;var i=e[4]|e[5]<<8;this._r[2]=(n>>>10|i<<6)&7939;var s=e[6]|e[7]<<8;this._r[3]=(i>>>7|s<<9)&8191;var a=e[8]|e[9]<<8;this._r[4]=(s>>>4|a<<12)&255,this._r[5]=a>>>1&8190;var f=e[10]|e[11]<<8;this._r[6]=(a>>>14|f<<2)&8191;var d=e[12]|e[13]<<8;this._r[7]=(f>>>11|d<<5)&8065;var h=e[14]|e[15]<<8;this._r[8]=(d>>>8|h<<8)&8191,this._r[9]=h>>>5&127,this._pad[0]=e[16]|e[17]<<8,this._pad[1]=e[18]|e[19]<<8,this._pad[2]=e[20]|e[21]<<8,this._pad[3]=e[22]|e[23]<<8,this._pad[4]=e[24]|e[25]<<8,this._pad[5]=e[26]|e[27]<<8,this._pad[6]=e[28]|e[29]<<8,this._pad[7]=e[30]|e[31]<<8}return o(t,"Poly1305"),t.prototype._blocks=function(e,r,n){for(var i=this._fin?0:2048,s=this._h[0],a=this._h[1],f=this._h[2],d=this._h[3],h=this._h[4],p=this._h[5],y=this._h[6],I=this._h[7],T=this._h[8],D=this._h[9],R=this._r[0],H=this._r[1],F=this._r[2],V=this._r[3],X=this._r[4],J=this._r[5],re=this._r[6],z=this._r[7],$=this._r[8],G=this._r[9];n>=16;){var le=e[r+0]|e[r+1]<<8;s+=le&8191;var P=e[r+2]|e[r+3]<<8;a+=(le>>>13|P<<3)&8191;var g=e[r+4]|e[r+5]<<8;f+=(P>>>10|g<<6)&8191;var _=e[r+6]|e[r+7]<<8;d+=(g>>>7|_<<9)&8191;var v=e[r+8]|e[r+9]<<8;h+=(_>>>4|v<<12)&8191,p+=v>>>1&8191;var l=e[r+10]|e[r+11]<<8;y+=(v>>>14|l<<2)&8191;var b=e[r+12]|e[r+13]<<8;I+=(l>>>11|b<<5)&8191;var E=e[r+14]|e[r+15]<<8;T+=(b>>>8|E<<8)&8191,D+=E>>>5|i;var C=0,A=C;A+=s*R,A+=a*(5*G),A+=f*(5*$),A+=d*(5*z),A+=h*(5*re),C=A>>>13,A&=8191,A+=p*(5*J),A+=y*(5*X),A+=I*(5*V),A+=T*(5*F),A+=D*(5*H),C+=A>>>13,A&=8191;var x=C;x+=s*H,x+=a*R,x+=f*(5*G),x+=d*(5*$),x+=h*(5*z),C=x>>>13,x&=8191,x+=p*(5*re),x+=y*(5*J),x+=I*(5*X),x+=T*(5*V),x+=D*(5*F),C+=x>>>13,x&=8191;var k=C;k+=s*F,k+=a*H,k+=f*R,k+=d*(5*G),k+=h*(5*$),C=k>>>13,k&=8191,k+=p*(5*z),k+=y*(5*re),k+=I*(5*J),k+=T*(5*X),k+=D*(5*V),C+=k>>>13,k&=8191;var O=C;O+=s*V,O+=a*F,O+=f*H,O+=d*R,O+=h*(5*G),C=O>>>13,O&=8191,O+=p*(5*$),O+=y*(5*z),O+=I*(5*re),O+=T*(5*J),O+=D*(5*X),C+=O>>>13,O&=8191;var w=C;w+=s*X,w+=a*V,w+=f*F,w+=d*H,w+=h*R,C=w>>>13,w&=8191,w+=p*(5*G),w+=y*(5*$),w+=I*(5*z),w+=T*(5*re),w+=D*(5*J),C+=w>>>13,w&=8191;var M=C;M+=s*J,M+=a*X,M+=f*V,M+=d*F,M+=h*H,C=M>>>13,M&=8191,M+=p*R,M+=y*(5*G),M+=I*(5*$),M+=T*(5*z),M+=D*(5*re),C+=M>>>13,M&=8191;var he=C;he+=s*re,he+=a*J,he+=f*X,he+=d*V,he+=h*F,C=he>>>13,he&=8191,he+=p*H,he+=y*R,he+=I*(5*G),he+=T*(5*$),he+=D*(5*z),C+=he>>>13,he&=8191;var B=C;B+=s*z,B+=a*re,B+=f*J,B+=d*X,B+=h*V,C=B>>>13,B&=8191,B+=p*F,B+=y*H,B+=I*R,B+=T*(5*G),B+=D*(5*$),C+=B>>>13,B&=8191;var ee=C;ee+=s*$,ee+=a*z,ee+=f*re,ee+=d*J,ee+=h*X,C=ee>>>13,ee&=8191,ee+=p*V,ee+=y*F,ee+=I*H,ee+=T*R,ee+=D*(5*G),C+=ee>>>13,ee&=8191;var ae=C;ae+=s*G,ae+=a*$,ae+=f*z,ae+=d*re,ae+=h*J,C=ae>>>13,ae&=8191,ae+=p*X,ae+=y*V,ae+=I*F,ae+=T*H,ae+=D*R,C+=ae>>>13,ae&=8191,C=(C<<2)+C|0,C=C+A|0,A=C&8191,C=C>>>13,x+=C,s=A,a=x,f=k,d=O,h=w,p=M,y=he,I=B,T=ee,D=ae,r+=16,n-=16}this._h[0]=s,this._h[1]=a,this._h[2]=f,this._h[3]=d,this._h[4]=h,this._h[5]=p,this._h[6]=y,this._h[7]=I,this._h[8]=T,this._h[9]=D},t.prototype.finish=function(e,r){r===void 0&&(r=0);var n=new Uint16Array(10),i,s,a,f;if(this._leftover){for(f=this._leftover,this._buffer[f++]=1;f<16;f++)this._buffer[f]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(i=this._h[1]>>>13,this._h[1]&=8191,f=2;f<10;f++)this._h[f]+=i,i=this._h[f]>>>13,this._h[f]&=8191;for(this._h[0]+=i*5,i=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=i,i=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=i,n[0]=this._h[0]+5,i=n[0]>>>13,n[0]&=8191,f=1;f<10;f++)n[f]=this._h[f]+i,i=n[f]>>>13,n[f]&=8191;for(n[9]-=1<<13,s=(i^1)-1,f=0;f<10;f++)n[f]&=s;for(s=~s,f=0;f<10;f++)this._h[f]=this._h[f]&s|n[f];for(this._h[0]=(this._h[0]|this._h[1]<<13)&65535,this._h[1]=(this._h[1]>>>3|this._h[2]<<10)&65535,this._h[2]=(this._h[2]>>>6|this._h[3]<<7)&65535,this._h[3]=(this._h[3]>>>9|this._h[4]<<4)&65535,this._h[4]=(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14)&65535,this._h[5]=(this._h[6]>>>2|this._h[7]<<11)&65535,this._h[6]=(this._h[7]>>>5|this._h[8]<<8)&65535,this._h[7]=(this._h[8]>>>8|this._h[9]<<5)&65535,a=this._h[0]+this._pad[0],this._h[0]=a&65535,f=1;f<8;f++)a=(this._h[f]+this._pad[f]|0)+(a>>>16)|0,this._h[f]=a&65535;return e[r+0]=this._h[0]>>>0,e[r+1]=this._h[0]>>>8,e[r+2]=this._h[1]>>>0,e[r+3]=this._h[1]>>>8,e[r+4]=this._h[2]>>>0,e[r+5]=this._h[2]>>>8,e[r+6]=this._h[3]>>>0,e[r+7]=this._h[3]>>>8,e[r+8]=this._h[4]>>>0,e[r+9]=this._h[4]>>>8,e[r+10]=this._h[5]>>>0,e[r+11]=this._h[5]>>>8,e[r+12]=this._h[6]>>>0,e[r+13]=this._h[6]>>>8,e[r+14]=this._h[7]>>>0,e[r+15]=this._h[7]>>>8,this._finished=!0,this},t.prototype.update=function(e){var r=0,n=e.length,i;if(this._leftover){i=16-this._leftover,i>n&&(i=n);for(var s=0;s<i;s++)this._buffer[this._leftover+s]=e[r+s];if(n-=i,r+=i,this._leftover+=i,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(n>=16&&(i=n-n%16,this._blocks(e,r,i),r+=i,n-=i),n){for(var s=0;s<n;s++)this._buffer[this._leftover+s]=e[r+s];this._leftover+=n}return this},t.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var e=new Uint8Array(16);return this.finish(e),e},t.prototype.clean=function(){return tg.wipe(this._buffer),tg.wipe(this._r),tg.wipe(this._h),tg.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},t}();ia.Poly1305=Zk;function cfe(t,e){var r=new Zk(t);r.update(e);var n=r.digest();return r.clean(),n}o(cfe,"oneTimeAuth");ia.oneTimeAuth=cfe;function ffe(t,e){return t.length!==ia.DIGEST_LENGTH||e.length!==ia.DIGEST_LENGTH?!1:afe.equal(t,e)}o(ffe,"equal");ia.equal=ffe});var rM=Q(oa=>{"use strict";Object.defineProperty(oa,"__esModule",{value:!0});var rg=nx(),ufe=Qk(),e0=Xi(),eM=Ef(),dfe=ix();oa.KEY_LENGTH=32;oa.NONCE_LENGTH=12;oa.TAG_LENGTH=16;var tM=new Uint8Array(16),lfe=function(){function t(e){if(this.nonceLength=oa.NONCE_LENGTH,this.tagLength=oa.TAG_LENGTH,e.length!==oa.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(e)}return o(t,"ChaCha20Poly1305"),t.prototype.seal=function(e,r,n,i){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var s=new Uint8Array(16);s.set(e,s.length-e.length);var a=new Uint8Array(32);rg.stream(this._key,s,a,4);var f=r.length+this.tagLength,d;if(i){if(i.length!==f)throw new Error("ChaCha20Poly1305: incorrect destination length");d=i}else d=new Uint8Array(f);return rg.streamXOR(this._key,s,r,d,4),this._authenticate(d.subarray(d.length-this.tagLength,d.length),a,d.subarray(0,d.length-this.tagLength),n),e0.wipe(s),d},t.prototype.open=function(e,r,n,i){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(r.length<this.tagLength)return null;var s=new Uint8Array(16);s.set(e,s.length-e.length);var a=new Uint8Array(32);rg.stream(this._key,s,a,4);var f=new Uint8Array(this.tagLength);if(this._authenticate(f,a,r.subarray(0,r.length-this.tagLength),n),!dfe.equal(f,r.subarray(r.length-this.tagLength,r.length)))return null;var d=r.length-this.tagLength,h;if(i){if(i.length!==d)throw new Error("ChaCha20Poly1305: incorrect destination length");h=i}else h=new Uint8Array(d);return rg.streamXOR(this._key,s,r.subarray(0,r.length-this.tagLength),h,4),e0.wipe(s),h},t.prototype.clean=function(){return e0.wipe(this._key),this},t.prototype._authenticate=function(e,r,n,i){var s=new ufe.Poly1305(r);i&&(s.update(i),i.length%16>0&&s.update(tM.subarray(i.length%16))),s.update(n),n.length%16>0&&s.update(tM.subarray(n.length%16));var a=new Uint8Array(8);i&&eM.writeUint64LE(i.length,a),s.update(a),eM.writeUint64LE(n.length,a),s.update(a);for(var f=s.digest(),d=0;d<f.length;d++)e[d]=f[d];s.clean(),e0.wipe(f),e0.wipe(a)},t}();oa.ChaCha20Poly1305=lfe});var oM=Q(sa=>{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});var nM=Jk(),iM=rM(),t0=Xi();sa.KEY_LENGTH=32;sa.NONCE_LENGTH=24;sa.TAG_LENGTH=16;var hfe=function(){function t(e){if(this.nonceLength=sa.NONCE_LENGTH,this.tagLength=sa.TAG_LENGTH,e.length!==sa.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(e)}return o(t,"XChaCha20Poly1305"),t.prototype.seal=function(e,r,n,i){if(e.length!==24)throw new Error("XChaCha20Poly1305: incorrect nonce length");var s=nM.hchacha(this._key,e.subarray(0,16),new Uint8Array(32)),a=new Uint8Array(12);a.set(e.subarray(16),4);var f=new iM.ChaCha20Poly1305(s),d=f.seal(a,r,n,i);return t0.wipe(s),t0.wipe(a),f.clean(),d},t.prototype.open=function(e,r,n,i){if(e.length!==24)throw new Error("XChaCha20Poly1305: incorrect nonce length");if(r.length<this.tagLength)return null;var s=nM.hchacha(this._key,e.subarray(0,16),new Uint8Array(32)),a=new Uint8Array(12);a.set(e.subarray(16),4);var f=new iM.ChaCha20Poly1305(s),d=f.open(a,r,n,i);return t0.wipe(s),t0.wipe(a),f.clean(),d},t.prototype.clean=function(){return t0.wipe(this._key),this},t}();sa.XChaCha20Poly1305=hfe});var Oo=Q((bwe,WR)=>{WR.exports={ALT:1,CAT:2,REP:3,RNM:4,TRG:5,TBS:6,TLS:7,UDT:11,AND:12,NOT:13,BKR:14,BKA:15,BKN:16,ABG:17,AEN:18,ACTIVE:100,MATCH:101,EMPTY:102,NOMATCH:103,SEM_PRE:200,SEM_POST:201,SEM_OK:300,SEM_SKIP:301,ATTR_N:400,ATTR_R:401,ATTR_MR:402,LOOKAROUND_NONE:500,LOOKAROUND_AHEAD:501,LOOKAROUND_BEHIND:502,BKR_MODE_UM:601,BKR_MODE_PM:602,BKR_MODE_CS:603,BKR_MODE_CI:604}});var l0=Q((vwe,YR)=>{YR.exports={CLASS_MONOSPACE:"apg-mono",CLASS_ACTIVE:"apg-active",CLASS_EMPTY:"apg-empty",CLASS_MATCH:"apg-match",CLASS_NOMATCH:"apg-nomatch",CLASS_LOOKAHEAD:"apg-lh-match",CLASS_LOOKBEHIND:"apg-lb-match",CLASS_REMAINDER:"apg-remainder",CLASS_CTRLCHAR:"apg-ctrl-char",CLASS_LINEEND:"apg-line-end",CLASS_ERROR:"apg-error",CLASS_PHRASE:"apg-phrase",CLASS_EMPTYPHRASE:"apg-empty-phrase",CLASS_STATE:"apg-state",CLASS_STATS:"apg-stats",CLASS_TRACE:"apg-trace",CLASS_GRAMMAR:"apg-grammar",CLASS_RULES:"apg-rules",CLASS_RULESLINK:"apg-rules-link",CLASS_ATTRIBUTES:"apg-attrs"}});var ZR=Q(an=>{var JR=an,xg=4294967292,wg=4294967293,Sx=4294967294,XR=4294967295,qe=[0,1,3,7,15,31,63,127,255,511,1023],Ac=["00","01","02","03","04","05","06","07","08","09","0A","0B","0C","0D","0E","0F","10","11","12","13","14","15","16","17","18","19","1A","1B","1C","1D","1E","1F","20","21","22","23","24","25","26","27","28","29","2A","2B","2C","2D","2E","2F","30","31","32","33","34","35","36","37","38","39","3A","3B","3C","3D","3E","3F","40","41","42","43","44","45","46","47","48","49","4A","4B","4C","4D","4E","4F","50","51","52","53","54","55","56","57","58","59","5A","5B","5C","5D","5E","5F","60","61","62","63","64","65","66","67","68","69","6A","6B","6C","6D","6E","6F","70","71","72","73","74","75","76","77","78","79","7A","7B","7C","7D","7E","7F","80","81","82","83","84","85","86","87","88","89","8A","8B","8C","8D","8E","8F","90","91","92","93","94","95","96","97","98","99","9A","9B","9C","9D","9E","9F","A0","A1","A2","A3","A4","A5","A6","A7","A8","A9","AA","AB","AC","AD","AE","AF","B0","B1","B2","B3","B4","B5","B6","B7","B8","B9","BA","BB","BC","BD","BE","BF","C0","C1","C2","C3","C4","C5","C6","C7","C8","C9","CA","CB","CC","CD","CE","CF","D0","D1","D2","D3","D4","D5","D6","D7","D8","D9","DA","DB","DC","DD","DE","DF","E0","E1","E2","E3","E4","E5","E6","E7","E8","E9","EA","EB","EC","ED","EE","EF","F0","F1","F2","F3","F4","F5","F6","F7","F8","F9","FA","FB","FC","FD","FE","FF"],Rue="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split(""),_i=[];Rue.forEach(t=>{_i.push(t.charCodeAt(0))});an.utf8={encode(t){let e=[];return t.forEach(r=>{if(r>=0&&r<=127)e.push(r);else if(r<=2047)e.push(192+(r>>6&qe[5])),e.push(128+(r&qe[6]));else if(r<55296||r>57343&&r<=65535)e.push(224+(r>>12&qe[4])),e.push(128+(r>>6&qe[6])),e.push(128+(r&qe[6]));else if(r>=65536&&r<=1114111){let n=r>>16&qe[5];e.push(240+(n>>2)),e.push(128+((n&qe[2])<<4)+(r>>12&qe[4])),e.push(128+(r>>6&qe[6])),e.push(128+(r&qe[6]))}else throw new RangeError(`utf8.encode: character out of range: char: ${r}`)}),Buffer.from(e)},decode(t,e){function r(D,R){if((R&192)!==128)return wg;let H=((D&qe[5])<<6)+(R&qe[6]);return H<128?xg:H}o(r,"bytes2");function n(D,R,H){if((H&192)!==128||(R&192)!==128)return wg;let F=((D&qe[4])<<12)+((R&qe[6])<<6)+(H&qe[6]);return F<2048?xg:F>=55296&&F<=57343?Sx:F}o(n,"bytes3");function i(D,R,H,F){if((F&192)!==128||(H&192)!==128||(R&192)!==128)return wg;let V=(((D&qe[3])<<2)+(R>>4&qe[2])<<16)+((R&qe[4])<<12)+((H&qe[6])<<6)+(F&qe[6]);return V<65536?xg:V>1114111?Sx:V}o(i,"bytes4");let s,a,f,d,h,p,y=t.length,I=e?3:0,T=[];for(;I<y;){a=t[I],s=XR;let D=!0;for(;D;){if(a>=0&&a<=127){s=a,p=1;break}if(f=I+1,f<y&&a>=194&&a<=223){s=r(a,t[f]),p=2;break}if(d=I+2,d<y&&a>=224&&a<=239){s=n(a,t[f],t[d]),p=3;break}if(h=I+3,h<y&&a>=240&&a<=244){s=i(a,t[f],t[d],t[h]),p=4;break}break}if(s>1114111){let R=`byte[${I}]`;throw s===XR?new RangeError(`utf8.decode: ill-formed UTF8 byte sequence found at: ${R}`):s===wg?new RangeError(`utf8.decode: illegal trailing byte found at: ${R}`):s===Sx?new RangeError(`utf8.decode: code point out of range found at: ${R}`):s===xg?new RangeError(`utf8.decode: non-shortest form found at: ${R}`):new RangeError(`utf8.decode: unrecognized error found at: ${R}`)}T.push(s),I+=p}return T}};an.utf16be={encode(t){let e=[],r,n,i;for(let s=0;s<t.length;s+=1)if(r=t[s],r>=0&&r<=55295||r>=57344&&r<=65535)e.push(r>>8&qe[8]),e.push(r&qe[8]);else if(r>=65536&&r<=1114111)i=r-65536,n=55296+(i>>10),i=56320+(i&qe[10]),e.push(n>>8&qe[8]),e.push(n&qe[8]),e.push(i>>8&qe[8]),e.push(i&qe[8]);else throw new RangeError(`utf16be.encode: UTF16BE value out of range: char[${s}]: ${r}`);return Buffer.from(e)},decode(t,e){if(t.length%2>0)throw new RangeError(`utf16be.decode: data length must be even multiple of 2: length: ${t.length}`);let r=[],n=t.length,i=e?2:0,s=0,a,f,d,h,p,y;for(;i<n;){for(;;){if(d=i+1,d<n){if(p=(t[i]<<8)+t[d],p<55296||p>57343){a=p,f=2;break}if(h=i+3,h<n&&(y=(t[i+2]<<8)+t[h],p<=56319&&y>=56320&&y<=57343)){a=65536+(p-55296<<10)+(y-56320),f=4;break}}throw new RangeError(`utf16be.decode: ill-formed UTF16BE byte sequence found: byte[${i}]`)}r[s++]=a,i+=f}return r}};an.utf16le={encode(t){let e=[],r,n,i;for(let s=0;s<t.length;s+=1)if(r=t[s],r>=0&&r<=55295||r>=57344&&r<=65535)e.push(r&qe[8]),e.push(r>>8&qe[8]);else if(r>=65536&&r<=1114111)i=r-65536,n=55296+(i>>10),i=56320+(i&qe[10]),e.push(n&qe[8]),e.push(n>>8&qe[8]),e.push(i&qe[8]),e.push(i>>8&qe[8]);else throw new RangeError(`utf16le.encode: UTF16LE value out of range: char[${s}]: ${r}`);return Buffer.from(e)},decode(t,e){if(t.length%2>0)throw new RangeError(`utf16le.decode: data length must be even multiple of 2: length: ${t.length}`);let r=[],n=t.length,i=e?2:0,s=0,a,f,d,h,p,y;for(;i<n;){for(;;){if(d=i+1,d<n){if(p=(t[d]<<8)+t[i],p<55296||p>57343){a=p,f=2;break}if(h=i+3,h<n&&(y=(t[h]<<8)+t[i+2],p<=56319&&y>=56320&&y<=57343)){a=65536+(p-55296<<10)+(y-56320),f=4;break}}throw new RangeError(`utf16le.decode: ill-formed UTF16LE byte sequence found: byte[${i}]`)}r[s++]=a,i+=f}return r}};an.utf32be={encode(t){let e=Buffer.alloc(t.length*4),r=0;return t.forEach(n=>{if(n>=55296&&n<=57343||n>1114111)throw new RangeError(`utf32be.encode: UTF32BE character code out of range: char[${r/4}]: ${n}`);e[r++]=n>>24&qe[8],e[r++]=n>>16&qe[8],e[r++]=n>>8&qe[8],e[r++]=n&qe[8]}),e},decode(t,e){if(t.length%4>0)throw new RangeError(`utf32be.decode: UTF32BE byte length must be even multiple of 4: length: ${t.length}`);let r=[],n=e?4:0;for(;n<t.length;n+=4){let i=(t[n]<<24)+(t[n+1]<<16)+(t[n+2]<<8)+t[n+3];if(i>=55296&&i<=57343||i>1114111)throw new RangeError(`utf32be.decode: UTF32BE character code out of range: char[${n/4}]: ${i}`);r.push(i)}return r}};an.utf32le={encode(t){let e=Buffer.alloc(t.length*4),r=0;return t.forEach(n=>{if(n>=55296&&n<=57343||n>1114111)throw new RangeError(`utf32le.encode: UTF32LE character code out of range: char[${r/4}]: ${n}`);e[r++]=n&qe[8],e[r++]=n>>8&qe[8],e[r++]=n>>16&qe[8],e[r++]=n>>24&qe[8]}),e},decode(t,e){if(t.length%4>0)throw new RangeError(`utf32be.decode: UTF32LE byte length must be even multiple of 4: length: ${t.length}`);let r=[],n=e?4:0;for(;n<t.length;n+=4){let i=(t[n+3]<<24)+(t[n+2]<<16)+(t[n+1]<<8)+t[n];if(i>=55296&&i<=57343||i>1114111)throw new RangeError(`utf32le.encode: UTF32LE character code out of range: char[${n/4}]: ${i}`);r.push(i)}return r}};an.uint7={encode(t){let e=Buffer.alloc(t.length);for(let r=0;r<t.length;r+=1){if(t[r]>127)throw new RangeError(`uint7.encode: UINT7 character code out of range: char[${r}]: ${t[r]}`);e[r]=t[r]}return e},decode(t){let e=[];for(let r=0;r<t.length;r+=1){if(t[r]>127)throw new RangeError(`uint7.decode: UINT7 character code out of range: byte[${r}]: ${t[r]}`);e[r]=t[r]}return e}};an.uint8={encode(t){let e=Buffer.alloc(t.length);for(let r=0;r<t.length;r+=1){if(t[r]>255)throw new RangeError(`uint8.encode: UINT8 character code out of range: char[${r}]: ${t[r]}`);e[r]=t[r]}return e},decode(t){let e=[];for(let r=0;r<t.length;r+=1)e[r]=t[r];return e}};an.uint16be={encode(t){let e=Buffer.alloc(t.length*2),r=0;return t.forEach(n=>{if(n>65535)throw new RangeError(`uint16be.encode: UINT16BE character code out of range: char[${r/2}]: ${n}`);e[r++]=n>>8&qe[8],e[r++]=n&qe[8]}),e},decode(t){if(t.length%2>0)throw new RangeError(`uint16be.decode: UINT16BE byte length must be even multiple of 2: length: ${t.length}`);let e=[];for(let r=0;r<t.length;r+=2)e.push((t[r]<<8)+t[r+1]);return e}};an.uint16le={encode(t){let e=Buffer.alloc(t.length*2),r=0;return t.forEach(n=>{if(n>65535)throw new RangeError(`uint16le.encode: UINT16LE character code out of range: char[${r/2}]: ${n}`);e[r++]=n&qe[8],e[r++]=n>>8&qe[8]}),e},decode(t){if(t.length%2>0)throw new RangeError(`uint16le.decode: UINT16LE byte length must be even multiple of 2: length: ${t.length}`);let e=[];for(let r=0;r<t.length;r+=2)e.push((t[r+1]<<8)+t[r]);return e}};an.uint32be={encode(t){let e=Buffer.alloc(t.length*4),r=0;return t.forEach(n=>{e[r++]=n>>24&qe[8],e[r++]=n>>16&qe[8],e[r++]=n>>8&qe[8],e[r++]=n&qe[8]}),e},decode(t){if(t.length%4>0)throw new RangeError(`uint32be.decode: UINT32BE byte length must be even multiple of 4: length: ${t.length}`);let e=[];for(let r=0;r<t.length;r+=4)e.push((t[r]<<24)+(t[r+1]<<16)+(t[r+2]<<8)+t[r+3]);return e}};an.uint32le={encode(t){let e=Buffer.alloc(t.length*4),r=0;return t.forEach(n=>{e[r++]=n&qe[8],e[r++]=n>>8&qe[8],e[r++]=n>>16&qe[8],e[r++]=n>>24&qe[8]}),e},decode(t){if(t.length%4>0)throw new RangeError(`uint32le.decode: UINT32LE byte length must be even multiple of 4: length: ${t.length}`);let e=[];for(let r=0;r<t.length;r+=4)e.push((t[r+3]<<24)+(t[r+2]<<16)+(t[r+1]<<8)+t[r]);return e}};an.string={encode(t){return JR.utf16le.encode(t).toString("utf16le")},decode(t){return JR.utf16le.decode(Buffer.from(t,"utf16le"),0)}};an.escaped={encode(t){let e=[];for(let r=0;r<t.length;r+=1){let n=t[r];if(n===96)e.push(n),e.push(n);else if(n===10)e.push(n);else if(n>=32&&n<=126)e.push(n);else{let i="";if(n>=0&&n<=31)i+=`\`x${Ac[n]}`;else if(n>=127&&n<=255)i+=`\`x${Ac[n]}`;else if(n>=256&&n<=65535)i+=`\`u${Ac[n>>8&qe[8]]}${Ac[n&qe[8]]}`;else if(n>=65536&&n<=4294967295){i+="`u{";let a=n>>24&qe[8];a>0&&(i+=Ac[a]),i+=`${Ac[n>>16&qe[8]]+Ac[n>>8&qe[8]]+Ac[n&qe[8]]}}`}else throw new Error("escape.encode(char): char > 0xffffffff not allowed");Buffer.from(i).forEach(a=>{e.push(a)})}}return Buffer.from(e)},decode(t){function e(y){return y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102}o(e,"isHex");function r(y,I,T){let D={char:null,nexti:y+2,error:!0};if(y+1<I&&e(T[y])&&e(T[y+1])){let R=String.fromCodePoint(T[y],T[y+1]);D.char=parseInt(R,16),Number.isNaN(D.char)||(D.error=!1)}return D}o(r,"getx");function n(y,I,T){let D={char:null,nexti:y+4,error:!0};if(y+3<I&&e(T[y])&&e(T[y+1])&&e(T[y+2])&&e(T[y+3])){let R=String.fromCodePoint(T[y],T[y+1],T[y+2],T[y+3]);D.char=parseInt(R,16),Number.isNaN(D.char)||(D.error=!1)}return D}o(n,"getu");function i(y,I,T){let D={char:null,nexti:y+4,error:!0},R="";for(;y<I&&e(T[y]);)R+=String.fromCodePoint(T[y]),y+=1;return D.char=parseInt(R,16),T[y]===125&&!Number.isNaN(D.char)&&(D.error=!1),D.nexti=y+1,D}o(i,"getU");let s=[],a=t.length,f,d,h,p=0;for(;p<a;){for(;;){if(h=!0,t[p]!==96){s.push(t[p]),p+=1,h=!1;break}if(f=p+1,f>=a)break;if(t[f]===96){s.push(96),p+=2,h=!1;break}if(t[f]===120){if(d=r(f+1,a,t),d.error)break;s.push(d.char),p=d.nexti,h=!1;break}if(t[f]===117){if(t[f+1]===123){if(d=i(f+2,a,t),d.error)break;s.push(d.char),p=d.nexti,h=!1;break}if(d=n(f+1,a,t),d.error)break;s.push(d.char),p=d.nexti,h=!1;break}break}if(h)throw new Error(`escaped.decode: ill-formed escape sequence at buf[${p}]`)}return s}};var h0=13,io=10;an.lineEnds={crlf(t){let e=[],r=0;for(;r<t.length;)switch(t[r]){case h0:r+1<t.length&&t[r+1]===io?r+=2:r+=1,e.push(h0),e.push(io);break;case io:e.push(h0),e.push(io),r+=1;break;default:e.push(t[r]),r+=1;break}return e.length>0&&e[e.length-1]!==io&&(e.push(h0),e.push(io)),e},lf(t){let e=[],r=0;for(;r<t.length;)switch(t[r]){case h0:r+1<t.length&&t[r+1]===io?r+=2:r+=1,e.push(io);break;case io:e.push(io),r+=1;break;default:e.push(t[r]),r+=1;break}return e.length>0&&e[e.length-1]!==io&&e.push(io),e}};an.base64={encode(t){if(t.length===0)return Buffer.alloc(0);let e,r,n,i=t.length%3;i=i>0?3-i:0;let s=(t.length+i)/3,a=Buffer.alloc(s*4);i>0&&(s-=1),e=0,r=0;for(let f=0;f<s;f+=1)n=t[e++]<<16,n+=t[e++]<<8,n+=t[e++],a[r++]=_i[n>>18&qe[6]],a[r++]=_i[n>>12&qe[6]],a[r++]=_i[n>>6&qe[6]],a[r++]=_i[n&qe[6]];if(i===0)return a;if(i===1)return n=t[e++]<<16,n+=t[e]<<8,a[r++]=_i[n>>18&qe[6]],a[r++]=_i[n>>12&qe[6]],a[r++]=_i[n>>6&qe[6]],a[r]=_i[64],a;if(i===2)return n=t[e]<<16,a[r++]=_i[n>>18&qe[6]],a[r++]=_i[n>>12&qe[6]],a[r++]=_i[64],a[r]=_i[64],a},decode(t){function e(p){let y=[],I=0;for(let T=0;T<p.length;T+=1){let D=p[T],R=!0;for(;R&&!(D===32||D===9||D===10||D===13);){if(D>=65&&D<=90){y.push(D-65);break}if(D>=97&&D<=122){y.push(D-71);break}if(D>=48&&D<=57){y.push(D+4);break}if(D===43){y.push(62);break}if(D===47){y.push(63);break}if(D===61){y.push(64),I+=1;break}throw new RangeError(`base64.decode: invalid character buf[${T}]: ${D}`)}}if(y.length%4>0)throw new RangeError(`base64.decode: string length not integral multiple of 4: ${y.length}`);switch(I){case 0:break;case 1:if(y[y.length-1]!==64)throw new RangeError("base64.decode: one tail character found: not last character");break;case 2:if(y[y.length-1]!==64||y[y.length-2]!==64)throw new RangeError("base64.decode: two tail characters found: not last characters");break;default:throw new RangeError(`base64.decode: more than two tail characters found: ${I}`)}return{tail:I,buf:Buffer.from(y)}}if(o(e,"validate"),t.length===0)return Buffer.alloc(0);let r=e(t),{tail:n}=r,i=r.buf,s,a,f,d=i.length/4,h=Buffer.alloc(d*3-n);n>0&&(d-=1),a=0,s=0;for(let p=0;p<d;p+=1)f=i[s++]<<18,f+=i[s++]<<12,f+=i[s++]<<6,f+=i[s++],h[a++]=f>>16&qe[8],h[a++]=f>>8&qe[8],h[a++]=f&qe[8];return n===1&&(f=i[s++]<<18,f+=i[s++]<<12,f+=i[s]<<6,h[a++]=f>>16&qe[8],h[a]=f>>8&qe[8]),n===2&&(f=i[s++]<<18,f+=i[s++]<<12,h[a]=f>>16&qe[8]),h},toString(t){if(t.length%4>0)throw new RangeError(`base64.toString: input buffer length not multiple of 4: ${t.length}`);let e="",r=0;function n(s,a,f,d){switch(r){case 76:e+=`\r
|
35
|
-
${s}${a}${f}${d}`,r=4;break;case 75:e+=`${s}\r
|
36
|
-
${a}${f}${d}`,r=3;break;case 74:e+=`${s+a}\r
|
37
|
-
${f}${d}`,r=2;break;case 73:e+=`${s+a+f}\r
|
38
|
-
${d}`,r=1;break;default:e+=s+a+f+d,r+=4;break}}o(n,"buildLine");function i(s){return s>=65&&s<=90||s>=97&&s<=122||s>=48&&s<=57||s===43||s===47||s===61}o(i,"validate");for(let s=0;s<t.length;s+=4){for(let a=s;a<s+4;a+=1)if(!i(t[a]))throw new RangeError(`base64.toString: buf[${a}]: ${t[a]} : not valid base64 character code`);n(String.fromCharCode(t[s]),String.fromCharCode(t[s+1]),String.fromCharCode(t[s+2]),String.fromCharCode(t[s+3]))}return e}}});var Rx=Q(m0=>{var QR=m0,Yt=ZR(),p0="UTF8",kx="UTF16",gs="UTF16BE",ca="UTF16LE",Mx="UTF32",bs="UTF32BE",fa="UTF32LE",Ld="UINT7",eB="ASCII",tB="BINARY",Ud="UINT8",rB="UINT16",_g="UINT16LE",qd="UINT16BE",nB="UINT32",Eg="UINT32LE",$d="UINT32BE",Ag="ESCAPED",Cc="STRING",Bue=o(function(e){e.type=p0;let r=e.data;e.bom=0,r.length>=3&&r[0]===239&&r[1]===187&&r[2]===191&&(e.bom=3)},"bom8"),Fue=o(function(e){let r=e.data;switch(e.bom=0,e.type){case kx:e.type=gs,r.length>=2&&(r[0]===254&&r[1]===255?e.bom=2:r[0]===255&&r[1]===254&&(e.type=ca,e.bom=2));break;case gs:if(e.type=gs,r.length>=2){if(r[0]===254&&r[1]===255)e.bom=2;else if(r[0]===255&&r[1]===254)throw new TypeError(`src type: "${gs}" specified but BOM is for "${ca}"`)}break;case ca:if(e.type=ca,r.length>=0){if(r[0]===254&&r[1]===255)throw new TypeError(`src type: "${ca}" specified but BOM is for "${gs}"`);r[0]===255&&r[1]===254&&(e.bom=2)}break;default:throw new TypeError(`UTF16 BOM: src type "${e.type}" unrecognized`)}},"bom16"),Pue=o(function(e){let r=e.data;switch(e.bom=0,e.type){case Mx:e.type=bs,r.length>=4&&(r[0]===0&&r[1]===0&&r[2]===254&&r[3]===255&&(e.bom=4),r[0]===255&&r[1]===254&&r[2]===0&&r[3]===0&&(e.type=fa,e.bom=4));break;case bs:if(e.type=bs,r.length>=4&&(r[0]===0&&r[1]===0&&r[2]===254&&r[3]===255&&(e.bom=4),r[0]===255&&r[1]===254&&r[2]===0&&r[3]===0))throw new TypeError(`src type: ${bs} specified but BOM is for ${fa}"`);break;case fa:if(e.type=fa,r.length>=4){if(r[0]===0&&r[1]===0&&r[2]===254&&r[3]===255)throw new TypeError(`src type: "${fa}" specified but BOM is for "${bs}"`);r[0]===255&&r[1]===254&&r[2]===0&&r[3]===0&&(e.bom=4)}break;default:throw new TypeError(`UTF32 BOM: src type "${e.type}" unrecognized`)}},"bom32"),Oue=o(function(e,r){function n(s){let a={type:"",base64:!1},d=/^(base64:)?([a-zA-Z0-9]+)$/i.exec(s);return d&&(d[2]&&(a.type=d[2].toUpperCase()),d[1]&&(a.base64=!0)),a}if(o(n,"getType"),typeof e!="string"||e==="")throw new TypeError(`type: "${e}" not recognized`);let i=n(e.toUpperCase());if(i.base64){if(i.type===Cc)throw new TypeError(`type: "${e} "BASE64:" prefix not allowed with type ${Cc}`);if(Buffer.isBuffer(r))i.data=Yt.base64.decode(r);else if(typeof r=="string"){let s=Buffer.from(r,"ascii");i.data=Yt.base64.decode(s)}else throw new TypeError(`type: "${e} unrecognized data type: typeof(data): ${typeof r}`)}else i.data=r;switch(i.type){case p0:Bue(i);break;case kx:case gs:case ca:Fue(i);break;case Mx:case bs:case fa:Pue(i);break;case rB:i.type=qd;break;case nB:i.type=$d;break;case eB:i.type=Ld;break;case tB:i.type=Ud;break;case Ld:case Ud:case _g:case qd:case Eg:case $d:case Cc:case Ag:break;default:throw new TypeError(`type: "${e}" not recognized`)}if(i.type===Cc){if(typeof i.data!="string")throw new TypeError(`type: "${e}" but data is not a string`)}else if(!Buffer.isBuffer(i.data))throw new TypeError(`type: "${e}" but data is not a Buffer`);return i},"validateSrc"),Nue=o(function(e,r){function n(s){let a,f,d={crlf:!1,lf:!1,base64:!1,type:""},h=!0;for(;h;){if(f=s,a=s.slice(0,5),a==="CRLF:"){d.crlf=!0,f=s.slice(5);break}if(a=s.slice(0,3),a==="LF:"){d.lf=!0,f=s.slice(3);break}break}return a=f.split(":"),a.length===1?d.type=a[0]:a.length===2&&a[1]==="BASE64"&&(d.base64=!0,d.type=a[0]),d}if(o(n,"getType"),!Array.isArray(r))throw new TypeError(`dst chars: not array: "${typeof r}`);if(typeof e!="string")throw new TypeError(`dst type: not string: "${typeof e}`);let i=n(e.toUpperCase());switch(i.type){case p0:case gs:case ca:case bs:case fa:case Ld:case Ud:case _g:case qd:case Eg:case $d:case Ag:break;case Cc:if(i.base64)throw new TypeError(`":BASE64" suffix not allowed with type ${Cc}`);break;case eB:i.type=Ld;break;case tB:i.type=Ud;break;case kx:i.type=gs;break;case Mx:i.type=bs;break;case rB:i.type=qd;break;case nB:i.type=$d;break;default:throw new TypeError(`dst type unrecognized: "${e}" : must have form [crlf:|lf:]type[:base64]`)}return i},"validateDst"),Tx=o(function(e,r){switch(e){case p0:return Yt.utf8.encode(r);case gs:return Yt.utf16be.encode(r);case ca:return Yt.utf16le.encode(r);case bs:return Yt.utf32be.encode(r);case fa:return Yt.utf32le.encode(r);case Ld:return Yt.uint7.encode(r);case Ud:return Yt.uint8.encode(r);case qd:return Yt.uint16be.encode(r);case _g:return Yt.uint16le.encode(r);case $d:return Yt.uint32be.encode(r);case Eg:return Yt.uint32le.encode(r);case Cc:return Yt.string.encode(r);case Ag:return Yt.escaped.encode(r);default:throw new TypeError(`encode type "${e}" not recognized`)}},"encode"),Lue=o(function(e){switch(e.type){case p0:return Yt.utf8.decode(e.data,e.bom);case ca:return Yt.utf16le.decode(e.data,e.bom);case gs:return Yt.utf16be.decode(e.data,e.bom);case bs:return Yt.utf32be.decode(e.data,e.bom);case fa:return Yt.utf32le.decode(e.data,e.bom);case Ld:return Yt.uint7.decode(e.data);case Ud:return Yt.uint8.decode(e.data);case qd:return Yt.uint16be.decode(e.data);case _g:return Yt.uint16le.decode(e.data);case $d:return Yt.uint32be.decode(e.data);case Eg:return Yt.uint32le.decode(e.data);case Cc:return Yt.string.decode(e.data);case Ag:return Yt.escaped.decode(e.data);default:throw new TypeError(`decode type "${e.type}" not recognized`)}},"decode");m0.decode=o(function(e,r){let n=Oue(e,r);return Lue(n)},"exportsDecode");m0.encode=o(function(e,r){let n,i,s=Nue(e,r);return s.crlf?(n=Yt.lineEnds.crlf(r),i=Tx(s.type,n)):s.lf?(n=Yt.lineEnds.lf(r),i=Tx(s.type,n)):i=Tx(s.type,r),s.base64&&(i=Yt.base64.encode(i)),i},"exportsEncode");m0.convert=o(function(e,r,n){return QR.encode(n,QR.decode(e,r))},"convert")});var Bx=Q((wwe,iB)=>{iB.exports=o(function(){return`/* This file automatically generated by jsonToless() and LESS. */
|
39
|
-
.apg-mono {
|
40
|
-
font-family: monospace;
|
41
|
-
}
|
42
|
-
.apg-active {
|
43
|
-
font-weight: bold;
|
44
|
-
color: #000000;
|
45
|
-
}
|
46
|
-
.apg-match {
|
47
|
-
font-weight: bold;
|
48
|
-
color: #264BFF;
|
49
|
-
}
|
50
|
-
.apg-empty {
|
51
|
-
font-weight: bold;
|
52
|
-
color: #0fbd0f;
|
53
|
-
}
|
54
|
-
.apg-nomatch {
|
55
|
-
font-weight: bold;
|
56
|
-
color: #FF4000;
|
57
|
-
}
|
58
|
-
.apg-lh-match {
|
59
|
-
font-weight: bold;
|
60
|
-
color: #1A97BA;
|
61
|
-
}
|
62
|
-
.apg-lb-match {
|
63
|
-
font-weight: bold;
|
64
|
-
color: #5F1687;
|
65
|
-
}
|
66
|
-
.apg-remainder {
|
67
|
-
font-weight: bold;
|
68
|
-
color: #999999;
|
69
|
-
}
|
70
|
-
.apg-ctrl-char {
|
71
|
-
font-weight: bolder;
|
72
|
-
font-style: italic;
|
73
|
-
font-size: 0.6em;
|
74
|
-
}
|
75
|
-
.apg-line-end {
|
76
|
-
font-weight: bold;
|
77
|
-
color: #000000;
|
78
|
-
}
|
79
|
-
.apg-error {
|
80
|
-
font-weight: bold;
|
81
|
-
color: #FF4000;
|
82
|
-
}
|
83
|
-
.apg-phrase {
|
84
|
-
color: #000000;
|
85
|
-
background-color: #8caae6;
|
86
|
-
}
|
87
|
-
.apg-empty-phrase {
|
88
|
-
color: #0fbd0f;
|
89
|
-
}
|
90
|
-
table.apg-state {
|
91
|
-
font-family: monospace;
|
92
|
-
margin-top: 5px;
|
93
|
-
font-size: 11px;
|
94
|
-
line-height: 130%;
|
95
|
-
text-align: left;
|
96
|
-
border: 1px solid black;
|
97
|
-
border-collapse: collapse;
|
98
|
-
}
|
99
|
-
table.apg-state th,
|
100
|
-
table.apg-state td {
|
101
|
-
text-align: left;
|
102
|
-
border: 1px solid black;
|
103
|
-
border-collapse: collapse;
|
104
|
-
}
|
105
|
-
table.apg-state th:nth-last-child(2),
|
106
|
-
table.apg-state td:nth-last-child(2) {
|
107
|
-
text-align: right;
|
108
|
-
}
|
109
|
-
table.apg-state caption {
|
110
|
-
font-size: 125%;
|
111
|
-
line-height: 130%;
|
112
|
-
font-weight: bold;
|
113
|
-
text-align: left;
|
114
|
-
}
|
115
|
-
table.apg-stats {
|
116
|
-
font-family: monospace;
|
117
|
-
margin-top: 5px;
|
118
|
-
font-size: 11px;
|
119
|
-
line-height: 130%;
|
120
|
-
text-align: right;
|
121
|
-
border: 1px solid black;
|
122
|
-
border-collapse: collapse;
|
123
|
-
}
|
124
|
-
table.apg-stats th,
|
125
|
-
table.apg-stats td {
|
126
|
-
text-align: right;
|
127
|
-
border: 1px solid black;
|
128
|
-
border-collapse: collapse;
|
129
|
-
}
|
130
|
-
table.apg-stats caption {
|
131
|
-
font-size: 125%;
|
132
|
-
line-height: 130%;
|
133
|
-
font-weight: bold;
|
134
|
-
text-align: left;
|
135
|
-
}
|
136
|
-
table.apg-trace {
|
137
|
-
font-family: monospace;
|
138
|
-
margin-top: 5px;
|
139
|
-
font-size: 11px;
|
140
|
-
line-height: 130%;
|
141
|
-
text-align: right;
|
142
|
-
border: 1px solid black;
|
143
|
-
border-collapse: collapse;
|
144
|
-
}
|
145
|
-
table.apg-trace caption {
|
146
|
-
font-size: 125%;
|
147
|
-
line-height: 130%;
|
148
|
-
font-weight: bold;
|
149
|
-
text-align: left;
|
150
|
-
}
|
151
|
-
table.apg-trace th,
|
152
|
-
table.apg-trace td {
|
153
|
-
text-align: right;
|
154
|
-
border: 1px solid black;
|
155
|
-
border-collapse: collapse;
|
156
|
-
}
|
157
|
-
table.apg-trace th:last-child,
|
158
|
-
table.apg-trace th:nth-last-child(2),
|
159
|
-
table.apg-trace td:last-child,
|
160
|
-
table.apg-trace td:nth-last-child(2) {
|
161
|
-
text-align: left;
|
162
|
-
}
|
163
|
-
table.apg-grammar {
|
164
|
-
font-family: monospace;
|
165
|
-
margin-top: 5px;
|
166
|
-
font-size: 11px;
|
167
|
-
line-height: 130%;
|
168
|
-
text-align: right;
|
169
|
-
border: 1px solid black;
|
170
|
-
border-collapse: collapse;
|
171
|
-
}
|
172
|
-
table.apg-grammar caption {
|
173
|
-
font-size: 125%;
|
174
|
-
line-height: 130%;
|
175
|
-
font-weight: bold;
|
176
|
-
text-align: left;
|
177
|
-
}
|
178
|
-
table.apg-grammar th,
|
179
|
-
table.apg-grammar td {
|
180
|
-
text-align: right;
|
181
|
-
border: 1px solid black;
|
182
|
-
border-collapse: collapse;
|
183
|
-
}
|
184
|
-
table.apg-grammar th:last-child,
|
185
|
-
table.apg-grammar td:last-child {
|
186
|
-
text-align: left;
|
187
|
-
}
|
188
|
-
table.apg-rules {
|
189
|
-
font-family: monospace;
|
190
|
-
margin-top: 5px;
|
191
|
-
font-size: 11px;
|
192
|
-
line-height: 130%;
|
193
|
-
text-align: right;
|
194
|
-
border: 1px solid black;
|
195
|
-
border-collapse: collapse;
|
196
|
-
}
|
197
|
-
table.apg-rules caption {
|
198
|
-
font-size: 125%;
|
199
|
-
line-height: 130%;
|
200
|
-
font-weight: bold;
|
201
|
-
text-align: left;
|
202
|
-
}
|
203
|
-
table.apg-rules th,
|
204
|
-
table.apg-rules td {
|
205
|
-
text-align: right;
|
206
|
-
border: 1px solid black;
|
207
|
-
border-collapse: collapse;
|
208
|
-
}
|
209
|
-
table.apg-rules a {
|
210
|
-
color: #003399 !important;
|
211
|
-
}
|
212
|
-
table.apg-rules a:hover {
|
213
|
-
color: #8caae6 !important;
|
214
|
-
}
|
215
|
-
table.apg-attrs {
|
216
|
-
font-family: monospace;
|
217
|
-
margin-top: 5px;
|
218
|
-
font-size: 11px;
|
219
|
-
line-height: 130%;
|
220
|
-
text-align: center;
|
221
|
-
border: 1px solid black;
|
222
|
-
border-collapse: collapse;
|
223
|
-
}
|
224
|
-
table.apg-attrs caption {
|
225
|
-
font-size: 125%;
|
226
|
-
line-height: 130%;
|
227
|
-
font-weight: bold;
|
228
|
-
text-align: left;
|
229
|
-
}
|
230
|
-
table.apg-attrs th,
|
231
|
-
table.apg-attrs td {
|
232
|
-
text-align: center;
|
233
|
-
border: 1px solid black;
|
234
|
-
border-collapse: collapse;
|
235
|
-
}
|
236
|
-
table.apg-attrs th:nth-child(1),
|
237
|
-
table.apg-attrs th:nth-child(2),
|
238
|
-
table.apg-attrs th:nth-child(3) {
|
239
|
-
text-align: right;
|
240
|
-
}
|
241
|
-
table.apg-attrs td:nth-child(1),
|
242
|
-
table.apg-attrs td:nth-child(2),
|
243
|
-
table.apg-attrs td:nth-child(3) {
|
244
|
-
text-align: right;
|
245
|
-
}
|
246
|
-
table.apg-attrs a {
|
247
|
-
color: #003399 !important;
|
248
|
-
}
|
249
|
-
table.apg-attrs a:hover {
|
250
|
-
color: #8caae6 !important;
|
251
|
-
}
|
252
|
-
`},"emittcss")});var Hf=Q(Yr=>{var ei=l0(),Fx=Rx(),Uue=Bx(),Er=Oo(),Ic="utilities.js: ",ua=Yr,jf=o(function(t,e,r){let n,i=e,s=!0;for(;s;){if(t<=0){i=0,n=0;break}if(typeof i!="number"){i=0,n=t;break}if(i>=t){i=t,n=t;break}if(typeof r!="number"){n=t;break}if(n=i+r,n>t){n=t;break}break}return{beg:i,end:n}},"getBounds");Yr.htmlToPage=function(t,e){let r;if(typeof t!="string")throw new Error(`${Ic}htmlToPage: input HTML is not a string`);typeof e!="string"?r="htmlToPage":r=e;let n="";return n+=`<!DOCTYPE html>
|
253
|
-
`,n+=`<html lang="en">
|
254
|
-
`,n+=`<head>
|
255
|
-
`,n+=`<meta charset="utf-8">
|
256
|
-
`,n+=`<title>${r}</title>
|
257
|
-
`,n+=`<style>
|
258
|
-
`,n+=Uue(),n+=`</style>
|
259
|
-
`,n+=`</head>
|
260
|
-
<body>
|
261
|
-
`,n+=`<p>${new Date}</p>
|
262
|
-
`,n+=t,n+=`</body>
|
263
|
-
</html>
|
264
|
-
`,n};Yr.parserResultToHtml=function(t,e){let r=null;typeof e=="string"&&e!==""&&(r=e);let n,i;t.success===!0?n=`<span class="${ei.CLASS_MATCH}">true</span>`:n=`<span class="${ei.CLASS_NOMATCH}">false</span>`,t.state===Er.EMPTY?i=`<span class="${ei.CLASS_EMPTY}">EMPTY</span>`:t.state===Er.MATCH?i=`<span class="${ei.CLASS_MATCH}">MATCH</span>`:t.state===Er.NOMATCH?i=`<span class="${ei.CLASS_NOMATCH}">NOMATCH</span>`:i=`<span class="${ei.CLASS_NOMATCH}">unrecognized</span>`;let s="";return s+=`<table class="${ei.CLASS_STATE}">
|
265
|
-
`,r&&(s+=`<caption>${r}</caption>
|
266
|
-
`),s+=`<tr><th>state item</th><th>value</th><th>description</th></tr>
|
267
|
-
`,s+=`<tr><td>parser success</td><td>${n}</td>
|
268
|
-
`,s+=`<td><span class="${ei.CLASS_MATCH}">true</span> if the parse succeeded,
|
269
|
-
`,s+=` <span class="${ei.CLASS_NOMATCH}">false</span> otherwise`,s+=`<br><i>NOTE: for success, entire string must be matched</i></td></tr>
|
270
|
-
`,s+=`<tr><td>parser state</td><td>${i}</td>
|
271
|
-
`,s+=`<td><span class="${ei.CLASS_EMPTY}">EMPTY</span>, `,s+=`<span class="${ei.CLASS_MATCH}">MATCH</span> or
|
272
|
-
`,s+=`<span class="${ei.CLASS_NOMATCH}">NOMATCH</span></td></tr>
|
273
|
-
`,s+=`<tr><td>string length</td><td>${t.length}</td><td>length of the input (sub)string</td></tr>
|
274
|
-
`,s+=`<tr><td>matched length</td><td>${t.matched}</td><td>number of input string characters matched</td></tr>
|
275
|
-
`,s+=`<tr><td>max matched</td><td>${t.maxMatched}</td><td>maximum number of input string characters matched</td></tr>
|
276
|
-
`,s+=`<tr><td>max tree depth</td><td>${t.maxTreeDepth}</td><td>maximum depth of the parse tree reached</td></tr>
|
277
|
-
`,s+=`<tr><td>node hits</td><td>${t.nodeHits}</td><td>number of parse tree node hits (opcode function calls)</td></tr>
|
278
|
-
`,s+=`<tr><td>input length</td><td>${t.inputLength}</td><td>length of full input string</td></tr>
|
279
|
-
`,s+=`<tr><td>sub-string begin</td><td>${t.subBegin}</td><td>sub-string first character index</td></tr>
|
280
|
-
`,s+=`<tr><td>sub-string end</td><td>${t.subEnd}</td><td>sub-string end-of-string index</td></tr>
|
281
|
-
`,s+=`<tr><td>sub-string length</td><td>${t.subLength}</td><td>sub-string length</td></tr>
|
282
|
-
`,s+=`</table>
|
283
|
-
`,s};Yr.charsToString=function(t,e,r){let n,i;if(typeof e=="number"){if(e>=t.length)return"";n=e<0?0:e}else n=0;if(typeof r=="number"){if(r<=0)return"";i=r>t.length-n?t.length:n+r}else i=t.length;return n<i?Fx.encode("UTF16LE",t.slice(n,i)).toString("utf16le"):""};Yr.stringToChars=function(t){return Fx.decode("STRING",t)};Yr.opcodeToString=function(t){let e="unknown";switch(t){case Er.ALT:e="ALT";break;case Er.CAT:e="CAT";break;case Er.RNM:e="RNM";break;case Er.UDT:e="UDT";break;case Er.AND:e="AND";break;case Er.NOT:e="NOT";break;case Er.REP:e="REP";break;case Er.TRG:e="TRG";break;case Er.TBS:e="TBS";break;case Er.TLS:e="TLS";break;case Er.BKR:e="BKR";break;case Er.BKA:e="BKA";break;case Er.BKN:e="BKN";break;case Er.ABG:e="ABG";break;case Er.AEN:e="AEN";break;default:throw new Error("unrecognized opcode")}return e};Yr.stateToString=function(t){let e="unknown";switch(t){case Er.ACTIVE:e="ACTIVE";break;case Er.MATCH:e="MATCH";break;case Er.EMPTY:e="EMPTY";break;case Er.NOMATCH:e="NOMATCH";break;default:throw new Error("unrecognized state")}return e};Yr.asciiChars=["NUL","SOH","STX","ETX","EOT","ENQ","ACK","BEL","BS","TAB","LF","VT","FF","CR","SO","SI","DLE","DC1","DC2","DC3","DC4","NAK","SYN","ETB","CAN","EM","SUB","ESC","FS","GS","RS","US"," ","!",""","#","$","%","&","'","(",")","*","+",",","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","\","]","^","_","`","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}","~","DEL"];Yr.charToHex=function(t){let e=t.toString(16).toUpperCase();switch(e.length){case 1:case 3:case 7:e=`0${e}`;break;case 2:case 6:e=`00${e}`;break;case 4:break;case 5:e=`000${e}`;break;default:throw new Error("unrecognized option")}return e};Yr.charsToDec=function(t,e,r){let n="";if(!Array.isArray(t))throw new Error(`${Ic}charsToDec: input must be an array of integers`);let i=jf(t.length,e,r);if(i.end>i.beg){n+=t[i.beg];for(let s=i.beg+1;s<i.end;s+=1)n+=`,${t[s]}`}return n};Yr.charsToHex=function(t,e,r){let n="";if(!Array.isArray(t))throw new Error(`${Ic}charsToHex: input must be an array of integers`);let i=jf(t.length,e,r);if(i.end>i.beg){n+=`\\x${ua.charToHex(t[i.beg])}`;for(let s=i.beg+1;s<i.end;s+=1)n+=`,\\x${ua.charToHex(t[s])}`}return n};Yr.charsToHtmlEntities=function(t,e,r){let n="";if(!Array.isArray(t))throw new Error(`${Ic}charsToHex: input must be an array of integers`);let i=jf(t.length,e,r);if(i.end>i.beg)for(let s=i.beg;s<i.end;s+=1)n+=`&#x${t[s].toString(16)};`;return n};function que(t){return!(t>=55296&&t<=57343||t>1114111)}o(que,"isUnicode");Yr.charsToUnicode=function(t,e,r){let n="";if(!Array.isArray(t))throw new Error(`${Ic}charsToUnicode: input must be an array of integers`);let i=jf(t.length,e,r);if(i.end>i.beg)for(let s=i.beg;s<i.end;s+=1)que(t[s])?n+=`&#${t[s]};`:n+=` U+${ua.charToHex(t[s])}`;return n};Yr.charsToJsUnicode=function(t,e,r){let n="";if(!Array.isArray(t))throw new Error(`${Ic}charsToJsUnicode: input must be an array of integers`);let i=jf(t.length,e,r);if(i.end>i.beg){n+=`\\u${ua.charToHex(t[i.beg])}`;for(let s=i.beg+1;s<i.end;s+=1)n+=`,\\u${ua.charToHex(t[s])}`}return n};Yr.charsToAscii=function(t,e,r){let n="";if(!Array.isArray(t))throw new Error(`${Ic}charsToAscii: input must be an array of integers`);let i=jf(t.length,e,r);for(let s=i.beg;s<i.end;s+=1){let a=t[s];a>=32&&a<=126?n+=String.fromCharCode(a):n+=`\\x${ua.charToHex(a)}`}return n};Yr.charsToAsciiHtml=function(t,e,r){if(!Array.isArray(t))throw new Error(`${Ic}charsToAsciiHtml: input must be an array of integers`);let n="",i,s=jf(t.length,e,r);for(let a=s.beg;a<s.end;a+=1)i=t[a],i<32||i===127?n+=`<span class="${ei.CLASS_CTRLCHAR}">${ua.asciiChars[i]}</span>`:i>127?n+=`<span class="${ei.CLASS_CTRLCHAR}">U+${ua.charToHex(i)}</span>`:n+=ua.asciiChars[i];return n};Yr.stringToAsciiHtml=function(t){let e=Fx.decode("STRING",t);return this.charsToAsciiHtml(e)}});var sB=Q((Ewe,oB)=>{oB.exports=o(function(){let e=Oo(),r=Hf(),n="ast.js: ",i=this,s=null,a=null,f=null,d=0,h=[],p=[],y=[],I=[];this.callbacks=[],this.astObject="astObject",this.init=o(function(R,H,F){y.length=0,I.length=0,h.length=0,d=0,s=R,a=H,f=F;let V,X=[];for(V=0;V<s.length;V+=1)X.push(s[V].lower);for(V=0;V<a.length;V+=1)X.push(a[V].lower);for(d=s.length+a.length,V=0;V<d;V+=1)h[V]=!1,p[V]=null;for(let J in i.callbacks){let re=J.toLowerCase();if(V=X.indexOf(re),V<0)throw new Error(`${n}init: node '${J}' not a rule or udt name`);typeof i.callbacks[J]=="function"&&(h[V]=!0,p[V]=i.callbacks[J]),i.callbacks[J]===!0&&(h[V]=!0)}},"init"),this.ruleDefined=o(function(R){return h[R]!==!1},"ruleDefined"),this.udtDefined=o(function(R){return h[s.length+R]!==!1},"udtDefined"),this.down=o(function(R,H){let F=I.length;return y.push(F),I.push({name:H,thisIndex:F,thatIndex:null,state:e.SEM_PRE,callbackIndex:R,phraseIndex:null,phraseLength:null,stack:y.length}),F},"down"),this.up=o(function(R,H,F,V){let X=I.length,J=y.pop();return I.push({name:H,thisIndex:X,thatIndex:J,state:e.SEM_POST,callbackIndex:R,phraseIndex:F,phraseLength:V,stack:y.length}),I[J].thatIndex=X,I[J].phraseIndex=F,I[J].phraseLength=V,X},"up"),this.translate=o(function(R){let H,F,V;for(let X=0;X<I.length;X+=1)V=I[X],F=p[V.callbackIndex],V.state===e.SEM_PRE?F!==null&&(H=F(e.SEM_PRE,f,V.phraseIndex,V.phraseLength,R),H===e.SEM_SKIP&&(X=V.thatIndex)):F!==null&&F(e.SEM_POST,f,V.phraseIndex,V.phraseLength,R)},"translate"),this.setLength=o(function(R){I.length=R,R>0?y.length=I[R-1].stack:y.length=0},"setLength"),this.getLength=o(function(){return I.length},"getLength");function T(D){let R="";for(let H=0;H<D;H+=1)R+=" ";return R}o(T,"indent"),this.toXml=o(function(R){let H=r.charsToDec,F="decimal integer character codes";if(typeof R=="string"&&R.length>=3){let J=R.slice(0,3).toLowerCase();J==="asc"?(H=r.charsToAscii,F="ASCII for printing characters, hex for non-printing"):J==="hex"?(H=r.charsToHex,F="hexadecimal integer character codes"):J==="uni"&&(H=r.charsToUnicode,F="Unicode UTF-32 integer character codes")}let V="",X=0;return V+=`<?xml version="1.0" encoding="utf-8"?>
|
284
|
-
`,V+=`<root nodes="${I.length/2}" characters="${f.length}">
|
285
|
-
`,V+=`<!-- input string, ${F} -->
|
286
|
-
`,V+=T(X+2),V+=H(f),V+=`
|
287
|
-
`,I.forEach(J=>{J.state===e.SEM_PRE?(X+=1,V+=T(X),V+=`<node name="${J.name}" index="${J.phraseIndex}" length="${J.phraseLength}">
|
288
|
-
`,V+=T(X+2),V+=H(f,J.phraseIndex,J.phraseLength),V+=`
|
289
|
-
`):(V+=T(X),V+=`</node><!-- name="${J.name}" -->
|
290
|
-
`,X-=1)}),V+=`</root>
|
291
|
-
`,V},"toSml"),this.phrases=o(function(){let R={},H,F;for(H=0;H<I.length;H+=1)F=I[H],F.state===e.SEM_PRE&&(Array.isArray(R[F.name])||(R[F.name]=[]),R[F.name].push({index:F.phraseIndex,length:F.phraseLength}));return R},"phrases")},"exportsAst")});var Px=Q((Awe,aB)=>{aB.exports=o(function(){let e="circular-buffer.js: ",r=-1,n=0;this.init=o(function(s){if(typeof s!="number"||s<=0)throw new Error(`${e}init: circular buffer size must an integer > 0`);n=Math.ceil(s),r=-1},"init"),this.increment=o(function(){return r+=1,(r+n)%n},"increment"),this.maxSize=o(function(){return n},"maxSize"),this.items=o(function(){return r+1},"items"),this.getListIndex=o(function(s){return r===-1||s<0||s>r||r-s>=n?-1:(s+n)%n},"getListIndex"),this.forEach=o(function(s){if(r!==-1){if(r<n){for(let a=0;a<=r;a+=1)s(a,a);return}for(let a=r-n+1;a<=r;a+=1){let f=(a+n)%n;s(f,a)}}},"forEach")},"exportsCircularBuffer")});var fB=Q((Cwe,cB)=>{cB.exports=o(function(){let e=Oo(),r=Hf(),n="parser.js: ",i=this,s;this.ast=null,this.stats=null,this.trace=null,this.callbacks=[];let a=null,f=null,d,h,p,y,I=0,T=0,D=0,R=null,H=null,F=null,V=null,X=null,J=0,re=1/0,z=1/0,$=o(function(se,L,Z){let ge=`${n}evaluateRule(): `;if(se>=F.length)throw new Error(`${ge}rule index: ${se} out of range`);if(L>=p)throw new Error(`${ge}phrase index: ${L} out of range`);let{length:we}=a;a.push({type:e.RNM,index:se}),s(we,L,Z),a.pop()},"evaluateRule"),G=o(function(de,se,L){let Z=`${n}evaluateUdt(): `;if(de>=V.length)throw new Error(`${Z}udt index: ${de} out of range`);if(se>=p)throw new Error(`${Z}phrase index: ${se} out of range`);let{length:ge}=a;a.push({type:e.UDT,empty:V[de].empty,index:de}),s(ge,se,L),a.pop()},"evaluateUdt"),le=o(function(){I=0,T=0,D=0,J=0,y=[{lookAround:e.LOOKAROUND_NONE,anchor:0,charsEnd:0,charsLength:0}],F=null,V=null,f=null,d=0,h=0,p=0,R=null,H=null,X=null,a=null},"clear"),P=o(function(){let de=[],se=o(function(){let Z={};F.forEach(ge=>{ge.isBkr&&(Z[ge.lower]=null)}),V.length>0&&V.forEach(ge=>{ge.isBkr&&(Z[ge.lower]=null)}),de.push(Z)},"init"),L=o(function(){let Z=de[de.length-1],ge={};for(let we in Z)ge[we]=Z[we];return ge},"copy");this.push=o(function(){de.push(L())},"push"),this.pop=o(function(ge){let we=ge;if(we||(we=de.length-1),we<1||we>de.length)throw new Error(`${n}backRef.pop(): bad length: ${we}`);return de.length=we,de[de.length-1]},"pop"),this.length=o(function(){return de.length},"length"),this.savePhrase=o(function(ge,we,Ee){de[de.length-1][ge]={phraseIndex:we,phraseLength:Ee}},"savePhrase"),this.getPhrase=function(Z){return de[de.length-1][Z]},se()},"backRef"),g=o(function(){let se=this;this.state=e.ACTIVE,this.phraseLength=0,this.ruleIndex=0,this.udtIndex=0,this.lookAround=y[y.length-1],this.uFrame=new P,this.pFrame=new P,this.evaluateRule=$,this.evaluateUdt=G,this.refresh=o(function(){se.state=e.ACTIVE,se.phraseLength=0,se.lookAround=y[y.length-1]},"refresh")},"systemData"),_=o(function(){return y[y.length-1]},"lookAroundValue"),v=o(function(){return y.length>1},"inLookAround"),l=o(function(){return y[y.length-1].lookAround===e.LOOKAROUND_BEHIND},"inLookBehind"),b=o(function(){let de=`${n}initializeAst(): `,se=!0;for(;se;){if(i.ast===void 0){i.ast=null;break}if(i.ast===null)break;if(i.ast.astObject!=="astObject")throw new Error(`${de}ast object not recognized`);break}i.ast!==null&&i.ast.init(F,V,f)},"initializeAst"),E=o(function(){let de=`${n}initializeTrace(): `,se=!0;for(;se;){if(i.trace===void 0){i.trace=null;break}if(i.trace===null)break;if(i.trace.traceObject!=="traceObject")throw new Error(`${de}trace object not recognized`);break}i.trace!==null&&i.trace.init(F,V,f)},"initializeTrace"),C=o(function(){let de=`${n}initializeStats(): `,se=!0;for(;se;){if(i.stats===void 0){i.stats=null;break}if(i.stats===null)break;if(i.stats.statsObject!=="statsObject")throw new Error(`${de}stats object not recognized`);break}i.stats!==null&&i.stats.init(F,V)},"initializeStats"),A=o(function(de){let se=`${n}initializeGrammar(): `;if(!de)throw new Error(`${se}grammar object undefined`);if(de.grammarObject!=="grammarObject")throw new Error(`${se}bad grammar object`);F=de.rules,V=de.udts},"initializeGrammar"),x=o(function(de){let se=`${n}initializeStartRule(): `,L=null;if(typeof de=="number"){if(de>=F.length)throw new Error(`${se}start rule index too large: max: ${F.length}: index: ${de}`);L=de}else if(typeof de=="string"){let Z=de.toLowerCase();for(let ge=0;ge<F.length;ge+=1)if(Z===F[ge].lower){L=F[ge].index;break}if(L===null)throw new Error(`${se}start rule name '${de}' not recognized`)}else throw new Error(`${se}type of start rule '${typeof de}' not recognized`);return L},"initializeStartRule"),k=o(function(se,L,Z){let ge=`${n}initializeInputChars(): `,we=se,Ee=L,Me=Z;if(we===void 0)throw new Error(`${ge}input string is undefined`);if(we===null)throw new Error(`${ge}input string is null`);if(typeof we=="string")we=r.stringToChars(we);else if(!Array.isArray(we))throw new Error(`${ge}input string is not a string or array`);if(we.length>0&&typeof we[0]!="number")throw new Error(`${ge}input string not an array of integers`);if(typeof Ee!="number")Ee=0;else if(Ee=Math.floor(Ee),Ee<0||Ee>we.length)throw new Error(`${ge}input beginning index out of range: ${Ee}`);if(typeof Me!="number")Me=we.length-Ee;else if(Me=Math.floor(Me),Me<0||Me>we.length-Ee)throw new Error(`${ge}input length out of range: ${Me}`);f=we,d=Ee,h=Me,p=d+h},"initializeInputChars"),O=o(function(){let de=`${n}initializeCallbacks(): `,se;for(R=[],H=[],se=0;se<F.length;se+=1)R[se]=null;for(se=0;se<V.length;se+=1)H[se]=null;let L,Z=[];for(se=0;se<F.length;se+=1)Z.push(F[se].lower);for(se=0;se<V.length;se+=1)Z.push(V[se].lower);for(let ge in i.callbacks){if(se=Z.indexOf(ge.toLowerCase()),se<0)throw new Error(`${de}syntax callback '${ge}' not a rule or udt name`);if(L=i.callbacks[ge],L||(L=null),typeof L=="function"||L===null)se<F.length?R[se]=L:H[se-F.length]=L;else throw new Error(`${de}syntax callback[${ge}] must be function reference or 'false' (false/null/undefined/etc.)`)}for(se=0;se<V.length;se+=1)if(H[se]===null)throw new Error(`${de}all UDT callbacks must be defined. UDT callback[${V[se].lower}] not a function reference`)},"initializeCallbacks");this.setMaxTreeDepth=function(de){if(typeof de!="number")throw new Error(`parser: max tree depth must be integer > 0: ${de}`);if(re=Math.floor(de),re<=0)throw new Error(`parser: max tree depth must be integer > 0: ${de}`)},this.setMaxNodeHits=function(de){if(typeof de!="number")throw new Error(`parser: max node hits must be integer > 0: ${de}`);if(z=Math.floor(de),z<=0)throw new Error(`parser: max node hits must be integer > 0: ${de}`)};let w=o(function(de,se,L){let Z,ge=`${n}parse(): `;A(de);let we=x(se);O(),E(),C(),b();let Ee=new g;switch(L!=null&&(X=L),a=[{type:e.RNM,index:we}],s(0,d,Ee),a=null,Ee.state){case e.ACTIVE:throw new Error(`${ge}final state should never be 'ACTIVE'`);case e.NOMATCH:Z=!1;break;case e.EMPTY:case e.MATCH:Ee.phraseLength===h?Z=!0:Z=!1;break;default:throw new Error("unrecognized state")}return{success:Z,state:Ee.state,length:h,matched:Ee.phraseLength,maxMatched:J,maxTreeDepth:T,nodeHits:D,inputLength:f.length,subBegin:d,subEnd:p,subLength:h}},"privateParse");this.parseSubstring=o(function(se,L,Z,ge,we,Ee){return le(),k(Z,ge,we),w(se,L,Ee)},"parseSubstring"),this.parse=o(function(se,L,Z,ge){return le(),k(Z,0,Z.length),w(se,L,ge)},"parse");let M=o(function(de,se,L){let Z=a[de];for(let ge=0;ge<Z.children.length&&(s(Z.children[ge],se,L),L.state===e.NOMATCH);ge+=1);},"opALT"),he=o(function(de,se,L){let Z,ge,we,Ee,Me=a[de],Ot=L.uFrame.length(),$e=L.pFrame.length();i.ast&&(ge=i.ast.getLength()),Z=!0,we=se,Ee=0;for(let Fe=0;Fe<Me.children.length;Fe+=1)if(s(Me.children[Fe],we,L),L.state===e.NOMATCH){Z=!1;break}else we+=L.phraseLength,Ee+=L.phraseLength;Z?(L.state=Ee===0?e.EMPTY:e.MATCH,L.phraseLength=Ee):(L.state=e.NOMATCH,L.phraseLength=0,L.uFrame.pop(Ot),L.pFrame.pop($e),i.ast&&i.ast.setLength(ge))},"opCAT"),B=o(function(de,se,L){let Z,ge,we,Ee,Me=a[de];ge=se,we=0,Ee=0;let Ot=L.uFrame.length(),$e=L.pFrame.length();i.ast&&(Z=i.ast.getLength());let Fe=!0;for(;Fe&&!(ge>=p||(s(de+1,ge,L),L.state===e.NOMATCH)||L.state===e.EMPTY||(Ee+=1,we+=L.phraseLength,ge+=L.phraseLength,Ee===Me.max)););L.state===e.EMPTY||Ee>=Me.min?(L.state=we===0?e.EMPTY:e.MATCH,L.phraseLength=we):(L.state=e.NOMATCH,L.phraseLength=0,L.uFrame.pop(Ot),L.pFrame.pop($e),i.ast&&i.ast.setLength(Z))},"opREP"),ee=o(function(de,se,L,Z){if(se.phraseLength>L){let ge=`${n}opRNM(${de.name}): callback function error: `;throw ge+=`sysData.phraseLength: ${se.phraseLength}`,ge+=` must be <= remaining chars: ${L}`,new Error(ge)}switch(se.state){case e.ACTIVE:if(Z!==!0)throw new Error(`${n}opRNM(${de.name}): callback function return error. ACTIVE state not allowed.`);break;case e.EMPTY:se.phraseLength=0;break;case e.MATCH:se.phraseLength===0&&(se.state=e.EMPTY);break;case e.NOMATCH:se.phraseLength=0;break;default:throw new Error(`${n}opRNM(${de.name}): callback function return error. Unrecognized return state: ${se.state}`)}},"validateRnmCallbackResult"),ae=o(function(de,se,L){let Z,ge,we,Ee,Me,Ot,$e=a[de],Fe=F[$e.index],qt=R[Fe.index],We=!v();if(We&&(ge=i.ast&&i.ast.ruleDefined($e.index),ge&&(Z=i.ast.getLength(),i.ast.down($e.index,F[$e.index].name)),Ee=L.uFrame.length(),Me=L.pFrame.length(),L.uFrame.push(),L.pFrame.push(),Ot=L.pFrame,L.pFrame=new P),qt===null)we=a,a=Fe.opcodes,s(0,se,L),a=we;else{let Ze=p-se;L.ruleIndex=Fe.index,qt(L,f,se,X),ee(Fe,L,Ze,!0),L.state===e.ACTIVE&&(we=a,a=Fe.opcodes,s(0,se,L),a=we,L.ruleIndex=Fe.index,qt(L,f,se,X),ee(Fe,L,Ze,!1))}We&&(ge&&(L.state===e.NOMATCH?i.ast.setLength(Z):i.ast.up($e.index,Fe.name,se,L.phraseLength)),L.pFrame=Ot,L.state===e.NOMATCH?(L.uFrame.pop(Ee),L.pFrame.pop(Me)):Fe.isBkr&&(L.pFrame.savePhrase(Fe.lower,se,L.phraseLength),L.uFrame.savePhrase(Fe.lower,se,L.phraseLength)))},"opRNM"),q=o(function(de,se,L){if(se.phraseLength>L){let Z=`${n}opUDT(${de.name}): callback function error: `;throw Z+=`sysData.phraseLength: ${se.phraseLength}`,Z+=` must be <= remaining chars: ${L}`,new Error(Z)}switch(se.state){case e.ACTIVE:throw new Error(`${n}opUDT(${de.name}): callback function return error. ACTIVE state not allowed.`);case e.EMPTY:if(de.empty===!1)throw new Error(`${n}opUDT(${de.name}): callback function return error. May not return EMPTY.`);se.phraseLength=0;break;case e.MATCH:if(se.phraseLength===0){if(de.empty===!1)throw new Error(`${n}opUDT(${de.name}): callback function return error. May not return EMPTY.`);se.state=e.EMPTY}break;case e.NOMATCH:se.phraseLength=0;break;default:throw new Error(`${n}opUDT(${de.name}): callback function return error. Unrecognized return state: ${se.state}`)}},"validateUdtCallbackResult"),U=o(function(de,se,L){let Z,ge,we,Ee,Me,Ot,$e=a[de],Fe=V[$e.index];L.UdtIndex=Fe.index;let qt=!v();qt&&(we=i.ast&&i.ast.udtDefined($e.index),we&&(ge=F.length+$e.index,Z=i.ast.getLength(),i.ast.down(ge,Fe.name)),Ee=L.uFrame.length(),Me=L.pFrame.length(),L.uFrame.push(),L.pFrame.push(),Ot=L.pFrame,L.pFrame=new P);let We=p-se;H[$e.index](L,f,se,X),q(Fe,L,We),qt&&(we&&(L.state===e.NOMATCH?i.ast.setLength(Z):i.ast.up(ge,Fe.name,se,L.phraseLength)),L.pFrame=Ot,L.state===e.NOMATCH?(L.uFrame.pop(Ee),L.pFrame.pop(Me)):Fe.isBkr&&(L.pFrame.savePhrase(Fe.lower,se,L.phraseLength),L.uFrame.savePhrase(Fe.lower,se,L.phraseLength)))},"opUDT"),te=o(function(de,se,L){y.push({lookAround:e.LOOKAROUND_AHEAD,anchor:se,charsEnd:p,charsLength:h}),p=f.length,h=f.length-d,s(de+1,se,L);let Z=y.pop();switch(p=Z.charsEnd,h=Z.charsLength,L.phraseLength=0,L.state){case e.EMPTY:L.state=e.EMPTY;break;case e.MATCH:L.state=e.EMPTY;break;case e.NOMATCH:L.state=e.NOMATCH;break;default:throw new Error(`opAND: invalid state ${L.state}`)}},"opAND"),oe=o(function(de,se,L){y.push({lookAround:e.LOOKAROUND_AHEAD,anchor:se,charsEnd:p,charsLength:h}),p=f.length,h=f.length-d,s(de+1,se,L);let Z=y.pop();switch(p=Z.charsEnd,h=Z.charsLength,L.phraseLength=0,L.state){case e.EMPTY:case e.MATCH:L.state=e.NOMATCH;break;case e.NOMATCH:L.state=e.EMPTY;break;default:throw new Error(`opNOT: invalid state ${L.state}`)}},"opNOT"),ce=o(function(de,se,L){let Z=a[de];L.state=e.NOMATCH,se<p&&Z.min<=f[se]&&f[se]<=Z.max&&(L.state=e.MATCH,L.phraseLength=1)},"opTRG"),Ce=o(function(de,se,L){let Z,ge=a[de],we=ge.string.length;if(L.state=e.NOMATCH,se+we<=p){for(Z=0;Z<we;Z+=1)if(f[se+Z]!==ge.string[Z])return;L.state=e.MATCH,L.phraseLength=we}},"opTBS"),ve=o(function(de,se,L){let Z,ge,we=a[de];L.state=e.NOMATCH;let Ee=we.string.length;if(Ee===0){L.state=e.EMPTY;return}if(se+Ee<=p){for(Z=0;Z<Ee;Z+=1)if(ge=f[se+Z],ge>=65&&ge<=90&&(ge+=32),ge!==we.string[Z])return;L.state=e.MATCH,L.phraseLength=Ee}},"opTLS"),ie=o(function(de,se,L){L.state=e.NOMATCH,L.phraseLength=0,L.state=se===0?e.EMPTY:e.NOMATCH},"opABG"),De=o(function(de,se,L){L.state=e.NOMATCH,L.phraseLength=0,L.state=se===f.length?e.EMPTY:e.NOMATCH},"opAEN"),ue=o(function(de,se,L){let Z,ge,we,Ee,Me=a[de];L.state=e.NOMATCH,Me.index<F.length?Ee=F[Me.index].lower:Ee=V[Me.index-F.length].lower;let Ot=Me.bkrMode===e.BKR_MODE_PM?L.pFrame.getPhrase(Ee):L.uFrame.getPhrase(Ee),$e=Me.bkrCase===e.BKR_MODE_CI;if(Ot===null)return;let Fe=Ot.phraseIndex,qt=Ot.phraseLength;if(qt===0){L.state=e.EMPTY;return}if(se+qt<=p){if($e){for(Z=0;Z<qt;Z+=1)if(ge=f[se+Z],we=f[Fe+Z],ge>=65&&ge<=90&&(ge+=32),we>=65&&we<=90&&(we+=32),ge!==we)return;L.state=e.MATCH,L.phraseLength=qt}else for(Z=0;Z<qt;Z+=1)if(ge=f[se+Z],we=f[Fe+Z],ge!==we)return;L.state=e.MATCH,L.phraseLength=qt}},"opBKR"),ye=o(function(de,se,L){switch(y.push({lookAround:e.LOOKAROUND_BEHIND,anchor:se}),s(de+1,se,L),y.pop(),L.phraseLength=0,L.state){case e.EMPTY:L.state=e.EMPTY;break;case e.MATCH:L.state=e.EMPTY;break;case e.NOMATCH:L.state=e.NOMATCH;break;default:throw new Error(`opBKA: invalid state ${L.state}`)}},"opBKA"),W=o(function(de,se,L){switch(y.push({lookAround:e.LOOKAROUND_BEHIND,anchor:se}),s(de+1,se,L),y.pop(),L.phraseLength=0,L.state){case e.EMPTY:case e.MATCH:L.state=e.NOMATCH;break;case e.NOMATCH:L.state=e.EMPTY;break;default:throw new Error(`opBKN: invalid state ${L.state}`)}},"opBKN"),me=o(function(de,se,L){let Z,ge,we,Ee,Me=a[de],Ot=L.uFrame.length(),$e=L.pFrame.length();i.ast&&(ge=i.ast.getLength()),Z=!0,we=se,Ee=0;for(let Fe=Me.children.length-1;Fe>=0;Fe-=1)if(s(Me.children[Fe],we,L),we-=L.phraseLength,Ee+=L.phraseLength,L.state===e.NOMATCH){Z=!1;break}Z?(L.state=Ee===0?e.EMPTY:e.MATCH,L.phraseLength=Ee):(L.state=e.NOMATCH,L.phraseLength=0,L.uFrame.pop(Ot),L.pFrame.pop($e),i.ast&&i.ast.setLength(ge))},"opCATBehind"),ke=o(function(de,se,L){let Z,ge,we,Ee,Me=a[de];ge=se,we=0,Ee=0;let Ot=L.uFrame.length(),$e=L.pFrame.length();i.ast&&(Z=i.ast.getLength());let Fe=!0;for(;Fe&&!(ge<=0||(s(de+1,ge,L),L.state===e.NOMATCH)||L.state===e.EMPTY||(Ee+=1,we+=L.phraseLength,ge-=L.phraseLength,Ee===Me.max)););L.state===e.EMPTY||Ee>=Me.min?(L.state=we===0?e.EMPTY:e.MATCH,L.phraseLength=we):(L.state=e.NOMATCH,L.phraseLength=0,L.uFrame.pop(Ot),L.pFrame.pop($e),i.ast&&i.ast.setLength(Z))},"opREPBehind"),ze=o(function(de,se,L){let Z=a[de];if(L.state=e.NOMATCH,L.phraseLength=0,se>0){let ge=f[se-1];Z.min<=ge&&ge<=Z.max&&(L.state=e.MATCH,L.phraseLength=1)}},"opTRGBehind"),Oe=o(function(de,se,L){let Z,ge=a[de];L.state=e.NOMATCH;let we=ge.string.length,Ee=se-we;if(Ee>=0){for(Z=0;Z<we;Z+=1)if(f[Ee+Z]!==ge.string[Z])return;L.state=e.MATCH,L.phraseLength=we}},"opTBSBehind"),Je=o(function(de,se,L){let Z,ge=a[de];L.state=e.NOMATCH;let we=ge.string.length;if(we===0){L.state=e.EMPTY;return}let Ee=se-we;if(Ee>=0){for(let Me=0;Me<we;Me+=1)if(Z=f[Ee+Me],Z>=65&&Z<=90&&(Z+=32),Z!==ge.string[Me])return;L.state=e.MATCH,L.phraseLength=we}},"opTLSBehind"),Dr=o(function(de,se,L){let Z,ge,we,Ee,Me=a[de];L.state=e.NOMATCH,L.phraseLength=0,Me.index<F.length?Ee=F[Me.index].lower:Ee=V[Me.index-F.length].lower;let Ot=Me.bkrMode===e.BKR_MODE_PM?L.pFrame.getPhrase(Ee):L.uFrame.getPhrase(Ee),$e=Me.bkrCase===e.BKR_MODE_CI;if(Ot===null)return;let Fe=Ot.phraseIndex,qt=Ot.phraseLength;if(qt===0){L.state=e.EMPTY,L.phraseLength=0;return}let We=se-qt;if(We>=0){if($e){for(Z=0;Z<qt;Z+=1)if(ge=f[We+Z],we=f[Fe+Z],ge>=65&&ge<=90&&(ge+=32),we>=65&&we<=90&&(we+=32),ge!==we)return;L.state=e.MATCH,L.phraseLength=qt}else for(Z=0;Z<qt;Z+=1)if(ge=f[We+Z],we=f[Fe+Z],ge!==we)return;L.state=e.MATCH,L.phraseLength=qt}},"opBKRBehind");s=o(function(se,L,Z){let ge=!0,we=a[se];if(D+=1,D>z)throw new Error(`parser: maximum number of node hits exceeded: ${z}`);if(I+=1,I>T&&(T=I,T>re))throw new Error(`parser: maximum parse tree depth exceeded: ${re}`);if(Z.refresh(),i.trace!==null){let Ee=_();i.trace.down(we,Z.state,L,Z.phraseLength,Ee.anchor,Ee.lookAround)}if(l())switch(we.type){case e.ALT:M(se,L,Z);break;case e.CAT:me(se,L,Z);break;case e.REP:ke(se,L,Z);break;case e.RNM:ae(se,L,Z);break;case e.UDT:U(se,L,Z);break;case e.AND:te(se,L,Z);break;case e.NOT:oe(se,L,Z);break;case e.TRG:ze(se,L,Z);break;case e.TBS:Oe(se,L,Z);break;case e.TLS:Je(se,L,Z);break;case e.BKR:Dr(se,L,Z);break;case e.BKA:ye(se,L,Z);break;case e.BKN:W(se,L,Z);break;case e.ABG:ie(se,L,Z);break;case e.AEN:De(se,L,Z);break;default:ge=!1;break}else switch(we.type){case e.ALT:M(se,L,Z);break;case e.CAT:he(se,L,Z);break;case e.REP:B(se,L,Z);break;case e.RNM:ae(se,L,Z);break;case e.UDT:U(se,L,Z);break;case e.AND:te(se,L,Z);break;case e.NOT:oe(se,L,Z);break;case e.TRG:ce(se,L,Z);break;case e.TBS:Ce(se,L,Z);break;case e.TLS:ve(se,L,Z);break;case e.BKR:ue(se,L,Z);break;case e.BKA:ye(se,L,Z);break;case e.BKN:W(se,L,Z);break;case e.ABG:ie(se,L,Z);break;case e.AEN:De(se,L,Z);break;default:ge=!1;break}if(!v()&&L+Z.phraseLength>J&&(J=L+Z.phraseLength),i.stats!==null&&i.stats.collect(we,Z),i.trace!==null){let Ee=_();i.trace.up(we,Z.state,L,Z.phraseLength,Ee.anchor,Ee.lookAround)}return I-=1,ge},"opExecuteFunc")},"parser")});var dB=Q((Iwe,uB)=>{uB.exports=o(function(){let e=Oo(),r=Hf(),n=l0(),i="stats.js: ",s=[],a=[],f=[],d,h=[],p=[];this.statsObject="statsObject";let y="stats",I=o(function(z,$){return z.lower<$.lower?-1:z.lower>$.lower?1:0},"sortAlpha"),T=o(function(z,$){return z.total<$.total?1:z.total>$.total?-1:I(z,$)},"sortHits"),D=o(function(z,$){return z.index<$.index?-1:z.index>$.index?1:0},"sortIndex"),R=o(function(){this.empty=0,this.match=0,this.nomatch=0,this.total=0},"EmptyStat"),H=o(function(){f.length=0,d=new R,f[e.ALT]=new R,f[e.CAT]=new R,f[e.REP]=new R,f[e.RNM]=new R,f[e.TRG]=new R,f[e.TBS]=new R,f[e.TLS]=new R,f[e.UDT]=new R,f[e.AND]=new R,f[e.NOT]=new R,f[e.BKR]=new R,f[e.BKA]=new R,f[e.BKN]=new R,f[e.ABG]=new R,f[e.AEN]=new R,h.length=0;for(let z=0;z<s.length;z+=1)h.push({empty:0,match:0,nomatch:0,total:0,name:s[z].name,lower:s[z].lower,index:s[z].index});if(a.length>0){p.length=0;for(let z=0;z<a.length;z+=1)p.push({empty:0,match:0,nomatch:0,total:0,name:a[z].name,lower:a[z].lower,index:a[z].index})}},"clear"),F=o(function(z,$){switch(z.total+=1,$){case e.EMPTY:z.empty+=1;break;case e.MATCH:z.match+=1;break;case e.NOMATCH:z.nomatch+=1;break;default:throw new Error(`${i}collect(): incStat(): unrecognized state: ${$}`)}},"incStat"),V=o(function(z,$){let G="";return G+="<tr>",G+=`<td class="${n.CLASS_ACTIVE}">${z}</td>`,G+=`<td class="${n.CLASS_EMPTY}">${$.empty}</td>`,G+=`<td class="${n.CLASS_MATCH}">${$.match}</td>`,G+=`<td class="${n.CLASS_NOMATCH}">${$.nomatch}</td>`,G+=`<td class="${n.CLASS_ACTIVE}">${$.total}</td>`,G+=`</tr>
|
292
|
-
`,G},"displayRow"),X=o(function(){let z="";return z+=V("ALT",f[e.ALT]),z+=V("CAT",f[e.CAT]),z+=V("REP",f[e.REP]),z+=V("RNM",f[e.RNM]),z+=V("TRG",f[e.TRG]),z+=V("TBS",f[e.TBS]),z+=V("TLS",f[e.TLS]),z+=V("UDT",f[e.UDT]),z+=V("AND",f[e.AND]),z+=V("NOT",f[e.NOT]),z+=V("BKR",f[e.BKR]),z+=V("BKA",f[e.BKA]),z+=V("BKN",f[e.BKN]),z+=V("ABG",f[e.ABG]),z+=V("AEN",f[e.AEN]),z+=V("totals",d),z},"displayOpsOnly"),J=o(function(){let z="";z+=`<tr><th></th><th></th><th></th><th></th><th></th></tr>
|
293
|
-
`,z+=`<tr><th>rules</th><th></th><th></th><th></th><th></th></tr>
|
294
|
-
`;for(let $=0;$<s.length;$+=1)h[$].total>0&&(z+="<tr>",z+=`<td class="${n.CLASS_ACTIVE}">${h[$].name}</td>`,z+=`<td class="${n.CLASS_EMPTY}">${h[$].empty}</td>`,z+=`<td class="${n.CLASS_MATCH}">${h[$].match}</td>`,z+=`<td class="${n.CLASS_NOMATCH}">${h[$].nomatch}</td>`,z+=`<td class="${n.CLASS_ACTIVE}">${h[$].total}</td>`,z+=`</tr>
|
295
|
-
`);if(a.length>0){z+=`<tr><th></th><th></th><th></th><th></th><th></th></tr>
|
296
|
-
`,z+=`<tr><th>udts</th><th></th><th></th><th></th><th></th></tr>
|
297
|
-
`;for(let $=0;$<a.length;$+=1)p[$].total>0&&(z+="<tr>",z+=`<td class="${n.CLASS_ACTIVE}">${p[$].name}</td>`,z+=`<td class="${n.CLASS_EMPTY}">${p[$].empty}</td>`,z+=`<td class="${n.CLASS_MATCH}">${p[$].match}</td>`,z+=`<td class="${n.CLASS_NOMATCH}">${p[$].nomatch}</td>`,z+=`<td class="${n.CLASS_ACTIVE}">${p[$].total}</td>`,z+=`</tr>
|
298
|
-
`)}return z},"displayRules");this.validate=o(function(z){let $=!1;return typeof z=="string"&&y===z&&($=!0),$},"validate"),this.init=o(function(z,$){s=z,a=$,H()},"init"),this.collect=o(function(z,$){F(d,$.state,$.phraseLength),F(f[z.type],$.state,$.phraseLength),z.type===e.RNM&&F(h[z.index],$.state,$.phraseLength),z.type===e.UDT&&F(p[z.index],$.state,$.phraseLength)},"collect"),this.toHtml=o(function(z,$){let G="";G+=`<table class="${n.CLASS_STATS}">
|
299
|
-
`,typeof $=="string"&&(G+=`<caption>${$}</caption>
|
300
|
-
`),G+=`<tr><th class="${n.CLASS_ACTIVE}">ops</th>
|
301
|
-
`,G+=`<th class="${n.CLASS_EMPTY}">EMPTY</th>
|
302
|
-
`,G+=`<th class="${n.CLASS_MATCH}">MATCH</th>
|
303
|
-
`,G+=`<th class="${n.CLASS_NOMATCH}">NOMATCH</th>
|
304
|
-
`,G+=`<th class="${n.CLASS_ACTIVE}">totals</th></tr>
|
305
|
-
`;let le=!0;for(;le;){if(z===void 0){G+=X();break}if(z===null){G+=X();break}if(z==="ops"){G+=X();break}if(z==="index"){h.sort(D),p.length>0&&p.sort(D),G+=X(),G+=J();break}if(z==="hits"){h.sort(T),p.length>0&&p.sort(D),G+=X(),G+=J();break}if(z==="alpha"){h.sort(I),p.length>0&&p.sort(I),G+=X(),G+=J();break}break}return G+=`</table>
|
306
|
-
`,G},"toHtml"),this.toHtmlPage=o(function(z,$,G){return r.htmlToPage(this.toHtml(z,$),G)},"toHtmlPage")},"statsFunc")});var hB=Q((Dwe,lB)=>{lB.exports=o(function(){let e=Hf(),r=l0(),n=new(Px()),i=Oo(),s="trace.js: ",a=this,f=16,d=10,h=8,p=32,y=80,I=5,T=[],D=5e3,R=-1,H=0,F=0,V=[],X=null,J=null,re=null,z=[],$=[],G=`<span class="${r.CLASS_LINEEND}">•</span>`,le=`<span class="${r.CLASS_LINEEND}">…</span>`,P=`<span class="${r.CLASS_EMPTY}">𝜺</span>`,g=o(function(){let q=o(function(te){z[i.ALT]=te,z[i.CAT]=te,z[i.REP]=te,z[i.TLS]=te,z[i.TBS]=te,z[i.TRG]=te,z[i.AND]=te,z[i.NOT]=te,z[i.BKR]=te,z[i.BKA]=te,z[i.BKN]=te,z[i.ABG]=te,z[i.AEN]=te},"setOperators"),U=0;for(let te in a.filter.operators)U+=1;if(U===0){q(!1);return}for(let te in a.filter.operators){let oe=te.toUpperCase();if(oe==="<ALL>"){q(!0);return}if(oe==="<NONE>"){q(!1);return}}q(!1);for(let te in a.filter.operators){let oe=te.toUpperCase();if(oe==="ALT")z[i.ALT]=a.filter.operators[te]===!0;else if(oe==="CAT")z[i.CAT]=a.filter.operators[te]===!0;else if(oe==="REP")z[i.REP]=a.filter.operators[te]===!0;else if(oe==="AND")z[i.AND]=a.filter.operators[te]===!0;else if(oe==="NOT")z[i.NOT]=a.filter.operators[te]===!0;else if(oe==="TLS")z[i.TLS]=a.filter.operators[te]===!0;else if(oe==="TBS")z[i.TBS]=a.filter.operators[te]===!0;else if(oe==="TRG")z[i.TRG]=a.filter.operators[te]===!0;else if(oe==="BKR")z[i.BKR]=a.filter.operators[te]===!0;else if(oe==="BKA")z[i.BKA]=a.filter.operators[te]===!0;else if(oe==="BKN")z[i.BKN]=a.filter.operators[te]===!0;else if(oe==="ABG")z[i.ABG]=a.filter.operators[te]===!0;else if(oe==="AEN")z[i.AEN]=a.filter.operators[te]===!0;else throw new Error(`${s}initOpratorFilter: '${te}' not a valid operator name. Must be <all>, <none>, alt, cat, rep, tls, tbs, trg, and, not, bkr, bka or bkn`)}},"initOperatorFilter"),_=o(function(){let q=o(function(ce){z[i.RNM]=ce,z[i.UDT]=ce;let Ce=J.length+re.length;$.length=0;for(let ve=0;ve<Ce;ve+=1)$.push(ce)},"setRules"),U,te,oe=[];for(te=0;te<J.length;te+=1)oe.push(J[te].lower);for(te=0;te<re.length;te+=1)oe.push(re[te].lower);$.length=0,U=0;for(let ce in a.filter.rules)U+=1;if(U===0){q(!0);return}for(let ce in a.filter.rules){let Ce=ce.toLowerCase();if(Ce==="<all>"){q(!0);return}if(Ce==="<none>"){q(!1);return}}q(!1),z[i.RNM]=!0,z[i.UDT]=!0;for(let ce in a.filter.rules){let Ce=ce.toLowerCase();if(te=oe.indexOf(Ce),te<0)throw new Error(`${s}initRuleFilter: '${ce}' not a valid rule or udt name`);$[te]=a.filter.rules[ce]===!0}},"initRuleFilter");this.traceObject="traceObject",this.filter={operators:[],rules:[]},this.setMaxRecords=function(q,U){if(R=-1,typeof q=="number"&&q>0)D=Math.ceil(q);else{D=0;return}typeof U=="number"&&(R=Math.floor(U),R<0&&(R=-1))},this.getMaxRecords=function(){return D},this.getLastRecord=function(){return R},this.init=function(q,U,te){T.length=0,V.length=0,H=0,F=0,X=te,J=q,re=U,g(),_(),n.init(D)};let v=o(function(q){let U=!1;return q.type===i.RNM?z[q.type]&&$[q.index]?U=!0:U=!1:q.type===i.UDT?z[q.type]&&$[J.length+q.index]?U=!0:U=!1:U=z[q.type],U},"filterOps"),l=o(function(q){return R===-1||q<=R},"filterRecords");this.down=function(q,U,te,oe,ce,Ce){l(H)&&v(q)&&(V.push(H),T[n.increment()]={dirUp:!1,depth:F,thisLine:H,thatLine:void 0,opcode:q,state:U,phraseIndex:te,phraseLength:oe,lookAnchor:ce,lookAround:Ce},H+=1,F+=1)},this.up=function(q,U,te,oe,ce,Ce){if(l(H)&&v(q)){let ve=H,ie=V.pop(),De=n.getListIndex(ie);De!==-1&&(T[De].thatLine=ve),F-=1,T[n.increment()]={dirUp:!0,depth:F,thisLine:ve,thatLine:ie,opcode:q,state:U,phraseIndex:te,phraseLength:oe,lookAnchor:ce,lookAround:Ce},H+=1}};let b=o(function(){function q(L,Z){let ge,we,Ee;if(Z)switch(L.op={id:Z.type,name:e.opcodeToString(Z.type)},L.opData=void 0,Z.type){case i.RNM:L.opData=J[Z.index].name;break;case i.UDT:L.opData=re[Z.index].name;break;case i.BKR:Z.index<J.length?ge=J[Z.index].name:ge=re[Z.index-J.length].name,we=Z.bkrCase===i.BKR_MODE_CI?"%i":"%s",Ee=Z.bkrMode===i.BKR_MODE_UM?"%u":"%p",L.opData=`\\\\${we}${Ee}${ge}`;break;case i.TLS:L.opData=[];for(let Me=0;Me<Z.string.length;Me+=1)L.opData.push(Z.string[Me]);break;case i.TBS:L.opData=[];for(let Me=0;Me<Z.string.length;Me+=1)L.opData.push(Z.string[Me]);break;case i.TRG:L.opData=[Z.min,Z.max];break;case i.REP:L.opData=[Z.min,Z.max];break;default:throw new Error("unrecognized opcode")}else L.op={id:void 0,name:void 0},L.opData=void 0}o(q,"nodeOpcode");function U(L,Z,ge){return L===i.MATCH?{index:Z,length:ge}:L===i.NOMATCH?{index:Z,length:0}:L===i.EMPTY?{index:Z,length:0}:null}o(U,"nodePhrase");let te=-1;function oe(L,Z,ge){let we={id:te++,branch:-1,parent:L,up:!1,down:!1,depth:ge,children:[]};return Z?(we.down=!0,we.state={id:Z.state,name:e.stateToString(Z.state)},we.phrase=null,q(we,Z.opcode)):(we.state={id:void 0,name:void 0},we.phrase=U(),q(we,void 0)),we}o(oe,"nodeDown");function ce(L,Z){Z&&(L.up=!0,L.state={id:Z.state,name:e.stateToString(Z.state)},L.phrase=U(Z.state,Z.phraseIndex,Z.phraseLength),L.down||q(L,Z.opcode))}o(ce,"nodeUp");let Ce=0,ve=-1,ie=1;function De(L){if(ve+=1,L.branch=ie,ve>F&&(F=ve),L.children.length===0)Ce+=1;else for(let Z=0;Z<L.children.length;Z+=1)Z>0&&(ie+=1),L.children[Z].leftMost=!1,L.children[Z].rightMost=!1,L.leftMost&&(L.children[Z].leftMost=Z===0),L.rightMost&&(L.children[Z].rightMost=Z===L.children.length-1),De(L.children[Z]);ve-=1}o(De,"walk");function ue(L,Z){let ge,we={};if(we.id=L.id,we.branch=L.branch,we.leftMost=L.leftMost,we.rightMost=L.rightMost,ge=L.state.name?L.state.name:"ACTIVE",we.state={id:L.state.id,name:ge},ge=L.op.name?L.op.name:"?",we.op={id:L.op.id,name:ge},typeof L.opData=="string")we.opData=L.opData;else if(Array.isArray(L.opData)){we.opData=[];for(let Ee=0;Ee<L.opData.length;Ee+=1)we.opData[Ee]=L.opData[Ee]}else we.opData=void 0;L.phrase?we.phrase={index:L.phrase.index,length:L.phrase.length}:we.phrase=null,we.depth=L.depth,we.children=[];for(let Ee=0;Ee<L.children.length;Ee+=1){let Me=Ee!==L.children.length-1;we.children[Ee]=ue(L.children[Ee],Z,Me)}return we}o(ue,"display");let ye=[],W,me,ke,ze,Oe=!0,Je=oe(null,null,-1);for(ye.push(Je),me=Je,n.forEach(L=>{if(ze=T[L],Oe&&(Oe=!1,ze.depth>0)){let Z=ze.dirUp?ze.depth+1:ze.depth;for(let ge=0;ge<Z;ge+=1)ke=me,me=oe(me,null,ge),ye.push(me),ke.children.push(me)}ze.dirUp?(me=ye.pop(),ce(me,ze),me=ye[ye.length-1]):(ke=me,me=oe(me,ze,ze.depth),ye.push(me),ke.children.push(me))});ye.length>1;)me=ye.pop(),ce(me,null);if(Je.children.length===0)throw new Error("trace.toTree(): parse tree has no nodes");if(ye.length===0)throw new Error("trace.toTree(): integrity check: dummy root node disappeared?");W=Je.children[0];let Dr=W;for(;W&&!W.down&&!W.up;)Dr=W,W=W.children[0];W=Dr,W.leftMost=!0,W.rightMost=!0,De(W),W.branch=0;let de={};de.string=[];for(let L=0;L<X.length;L+=1)de.string[L]=X[L];de.rules=[];for(let L=0;L<J.length;L+=1)de.rules[L]=J[L].name;de.udts=[];for(let L=0;L<re.length;L+=1)de.udts[L]=re[L].name;de.id={},de.id.ALT={id:i.ALT,name:"ALT"},de.id.CAT={id:i.CAT,name:"CAT"},de.id.REP={id:i.REP,name:"REP"},de.id.RNM={id:i.RNM,name:"RNM"},de.id.TLS={id:i.TLS,name:"TLS"},de.id.TBS={id:i.TBS,name:"TBS"},de.id.TRG={id:i.TRG,name:"TRG"},de.id.UDT={id:i.UDT,name:"UDT"},de.id.AND={id:i.AND,name:"AND"},de.id.NOT={id:i.NOT,name:"NOT"},de.id.BKR={id:i.BKR,name:"BKR"},de.id.BKA={id:i.BKA,name:"BKA"},de.id.BKN={id:i.BKN,name:"BKN"},de.id.ABG={id:i.ABG,name:"ABG"},de.id.AEN={id:i.AEN,name:"AEN"},de.id.ACTIVE={id:i.ACTIVE,name:"ACTIVE"},de.id.MATCH={id:i.MATCH,name:"MATCH"},de.id.EMPTY={id:i.EMPTY,name:"EMPTY"},de.id.NOMATCH={id:i.NOMATCH,name:"NOMATCH"},de.treeDepth=F,de.leafNodes=Ce;let se;return W.down?W.up?se="none":se="right":W.up?se="left":se="both",de.branchesIncomplete=se,de.tree=ue(W,W.depth,!1),de},"toTreeObj");this.toTree=function(q){let U=b();return q?JSON.stringify(U):U},this.toHtmlPage=function(q,U,te){return e.htmlToPage(this.toHtml(q,U),te)};let E=o(function(q,U){let te;switch(q){case f:te="hexadecimal";break;case d:te="decimal";break;case h:te="ASCII";break;case p:te="UNICODE";break;default:throw new Error(`${s}htmlHeader: unrecognized mode: ${q}`)}let oe="";return oe+=`<p>display mode: ${te}</p>
|
307
|
-
`,oe+=`<table class="${r.CLASS_TRACE}">
|
308
|
-
`,typeof U=="string"&&(oe+=`<caption>${U}</caption>`),oe},"htmlHeader"),C=o(function(){let q="";return q+=`</table>
|
309
|
-
`,q+=`<p class="${r.CLASS_MONOSPACE}">legend:<br>
|
310
|
-
`,q+=`(a) - line number<br>
|
311
|
-
`,q+=`(b) - matching line number<br>
|
312
|
-
`,q+=`(c) - phrase offset<br>
|
313
|
-
`,q+=`(d) - phrase length<br>
|
314
|
-
`,q+=`(e) - tree depth<br>
|
315
|
-
`,q+=`(f) - operator state<br>
|
316
|
-
`,q+=` - <span class="${r.CLASS_ACTIVE}">↓</span> phrase opened<br>
|
317
|
-
`,q+=` - <span class="${r.CLASS_MATCH}">↑M</span> phrase matched<br>
|
318
|
-
`,q+=` - <span class="${r.CLASS_EMPTY}">↑E</span> empty phrase matched<br>
|
319
|
-
`,q+=` - <span class="${r.CLASS_NOMATCH}">↑N</span> phrase not matched<br>
|
320
|
-
`,q+=`operator - ALT, CAT, REP, RNM, TRG, TLS, TBS<sup>†</sup>, UDT, AND, NOT, BKA, BKN, BKR, ABG, AEN<sup>‡</sup><br>
|
321
|
-
`,q+=`phrase - up to ${y} characters of the phrase being matched<br>
|
322
|
-
`,q+=` - <span class="${r.CLASS_MATCH}">matched characters</span><br>
|
323
|
-
`,q+=` - <span class="${r.CLASS_LOOKAHEAD}">matched characters in look ahead mode</span><br>
|
324
|
-
`,q+=` - <span class="${r.CLASS_LOOKBEHIND}">matched characters in look behind mode</span><br>
|
325
|
-
`,q+=` - <span class="${r.CLASS_REMAINDER}">remainder characters(not yet examined by parser)</span><br>
|
326
|
-
`,q+=` - <span class="${r.CLASS_CTRLCHAR}">control characters, TAB, LF, CR, etc. (ASCII mode only)</span><br>
|
327
|
-
`,q+=` - ${P} empty string<br>
|
328
|
-
`,q+=` - ${G} end of input string<br>
|
329
|
-
`,q+=` - ${le} input string display truncated<br>
|
330
|
-
`,q+=`</p>
|
331
|
-
`,q+=`<p class="${r.CLASS_MONOSPACE}">
|
332
|
-
`,q+=`<sup>†</sup>original ABNF operators:<br>
|
333
|
-
`,q+=`ALT - alternation<br>
|
334
|
-
`,q+=`CAT - concatenation<br>
|
335
|
-
`,q+=`REP - repetition<br>
|
336
|
-
`,q+=`RNM - rule name<br>
|
337
|
-
`,q+=`TRG - terminal range<br>
|
338
|
-
`,q+=`TLS - terminal literal string (case insensitive)<br>
|
339
|
-
`,q+=`TBS - terminal binary string (case sensitive)<br>
|
340
|
-
`,q+=`<br>
|
341
|
-
`,q+=`<sup>‡</sup>super set SABNF operators:<br>
|
342
|
-
`,q+=`UDT - user-defined terminal<br>
|
343
|
-
`,q+=`AND - positive look ahead<br>
|
344
|
-
`,q+=`NOT - negative look ahead<br>
|
345
|
-
`,q+=`BKA - positive look behind<br>
|
346
|
-
`,q+=`BKN - negative look behind<br>
|
347
|
-
`,q+=`BKR - back reference<br>
|
348
|
-
`,q+=`ABG - anchor - begin of input string<br>
|
349
|
-
`,q+=`AEN - anchor - end of input string<br>
|
350
|
-
`,q+=`</p>
|
351
|
-
`,q},"htmlFooter");this.indent=function(q){let U="";for(let te=0;te<q;te+=1)U+=".";return U};let A=o(function(q,U){let te="";if(U.type===i.TRG)if(q===f||q===p){let oe=U.min.toString(16).toUpperCase();oe.length%2!==0&&(oe=`0${oe}`),te+=q===f?"%x":"U+",te+=oe,oe=U.max.toString(16).toUpperCase(),oe.length%2!==0&&(oe=`0${oe}`),te+=`–${oe}`}else te=`%d${U.min.toString(10)}–${U.max.toString(10)}`;return te},"displayTrg"),x=o(function(q,U){let te="";if(U.type===i.REP)if(q===f){let oe=U.min.toString(16).toUpperCase();oe.length%2!==0&&(oe=`0${oe}`),te=`x${oe}`,U.max<1/0?(oe=U.max.toString(16).toUpperCase(),oe.length%2!==0&&(oe=`0${oe}`)):oe="inf",te+=`–${oe}`}else U.max<1/0?te=`${U.min.toString(10)}–${U.max.toString(10)}`:te=`${U.min.toString(10)}–inf`;return te},"displayRep"),k=o(function(q,U){let te="";if(U.type===i.TBS){let oe=Math.min(U.string.length,I*2);if(q===f||q===p){te+=q===f?"%x":"U+";for(let ce=0;ce<oe;ce+=1){let Ce;ce>0&&(te+="."),Ce=U.string[ce].toString(16).toUpperCase(),Ce.length%2!==0&&(Ce=`0${Ce}`),te+=Ce}}else{te="%d";for(let ce=0;ce<oe;ce+=1)ce>0&&(te+="."),te+=U.string[ce].toString(10)}oe<U.string.length&&(te+=le)}return te},"displayTbs"),O=o(function(q,U){let te="";if(U.type===i.TLS){let oe=Math.min(U.string.length,I);if(q===f||q===d){let ce,Ce,ve;q===f?(te="%x",ve=16):(te="%d",ve=10);for(let ie=0;ie<oe;ie+=1)ie>0&&(te+="."),Ce=U.string[ie],Ce>=97&&Ce<=122?(ce=Ce-32,te+=`${ce.toString(ve)}/${Ce.toString(ve)}`.toUpperCase()):Ce>=65&&Ce<=90?(ce=Ce,Ce+=32,te+=`${ce.toString(ve)}/${Ce.toString(ve)}`.toUpperCase()):te+=Ce.toString(ve).toUpperCase();oe<U.string.length&&(te+=le)}else{te='"';for(let ce=0;ce<oe;ce+=1)te+=e.asciiChars[U.string[ce]];oe<U.string.length&&(te+=le),te+='"'}}return te},"displayTls"),w=o(function(q,U,te,oe,ce){if(oe===0)return"";let Ce="",ve=ce?",":"";switch(q){case f:Ce=ve+e.charsToHex(U,te,oe);break;case d:if(ce)return`,${e.charsToDec(U,te,oe)}`;Ce=ve+e.charsToDec(U,te,oe);break;case p:Ce=e.charsToUnicode(U,te,oe);break;case h:default:Ce=e.charsToAsciiHtml(U,te,oe);break}return Ce},"subPhrase"),M=o(function(q,U,te,oe,ce,Ce){let ve="",ie,De,ue,ye,W=G,me=`<span class="${r.CLASS_LOOKBEHIND}">`,ke=`<span class="${r.CLASS_REMAINDER}">`,ze="</span>",Oe=!1;switch(te){case i.EMPTY:ve+=P;case i.NOMATCH:case i.MATCH:case i.ACTIVE:ie=oe-ce,De=Ce-ie,ue=Ce,ye=U.length-ue;break;default:throw new Error("unrecognized state")}return W=G,De>y?(De=y,W=le,ye=0):De+ye>y&&(W=le,ye=y-De),De>0&&(ve+=me,ve+=w(q,U,ie,De,Oe),ve+=ze,Oe=!0),ye>0&&(ve+=ke,ve+=w(q,U,ue,ye,Oe),ve+=ze),ve+W},"displayBehind"),he=o(function(q,U,te,oe,ce,Ce){let ve="",ie,De,ue,ye,W=G,me=`<span class="${r.CLASS_REMAINDER}">`,ke="</span>",ze=!1;switch(te){case i.EMPTY:ve+=P;case i.NOMATCH:case i.ACTIVE:ie=oe,De=0,ue=oe,ye=U.length-ue;break;case i.MATCH:ie=oe,De=ce,ue=oe+De,ye=U.length-ue;break;default:throw new Error("unrecognized state")}return W=G,De>y?(De=y,W=le,ye=0):De+ye>y&&(W=le,ye=y-De),De>0&&(ve+=Ce,ve+=w(q,U,ie,De,ze),ve+=ke,ze=!0),ye>0&&(ve+=me,ve+=w(q,U,ue,ye,ze),ve+=ke),ve+W},"displayForward"),B=o(function(q,U,te,oe,ce){let Ce=`<span class="${r.CLASS_LOOKAHEAD}">`;return he(q,U,te,oe,ce,Ce)},"displayAhead"),ee=o(function(q,U,te,oe,ce){let Ce=`<span class="${r.CLASS_MATCH}">`;return he(q,U,te,oe,ce,Ce)},"displayNone"),ae=o(function(q){if(J===null)return"";let U="",te,oe,ce,Ce,ve,ie;return U+="<tr><th>(a)</th><th>(b)</th><th>(c)</th><th>(d)</th><th>(e)</th><th>(f)</th>",U+=`<th>operator</th><th>phrase</th></tr>
|
352
|
-
`,n.forEach(De=>{let ue=T[De];switch(te=ue.thisLine,oe=ue.thatLine!==void 0?ue.thatLine:"--",ce=!1,Ce=!1,ve=!1,ue.lookAround===i.LOOKAROUND_AHEAD&&(ce=!0,ve=!0,ie=ue.lookAnchor),(ue.opcode.type===i.AND||ue.opcode.type===i.NOT)&&(ce=!0,ve=!0,ie=ue.phraseIndex),ue.lookAround===i.LOOKAROUND_BEHIND&&(Ce=!0,ve=!0,ie=ue.lookAnchor),(ue.opcode.type===i.BKA||ue.opcode.type===i.BKN)&&(Ce=!0,ve=!0,ie=ue.phraseIndex),U+="<tr>",U+=`<td>${te}</td><td>${oe}</td>`,U+=`<td>${ue.phraseIndex}</td>`,U+=`<td>${ue.phraseLength}</td>`,U+=`<td>${ue.depth}</td>`,U+="<td>",ue.state){case i.ACTIVE:U+=`<span class="${r.CLASS_ACTIVE}">↓ </span>`;break;case i.MATCH:U+=`<span class="${r.CLASS_MATCH}">↑M</span>`;break;case i.NOMATCH:U+=`<span class="${r.CLASS_NOMATCH}">↑N</span>`;break;case i.EMPTY:U+=`<span class="${r.CLASS_EMPTY}">↑E</span>`;break;default:U+=`<span class="${r.CLASS_ACTIVE}">--</span>`;break}if(U+="</td>",U+="<td>",U+=a.indent(ue.depth),ce?U+=`<span class="${r.CLASS_LOOKAHEAD}">`:Ce&&(U+=`<span class="${r.CLASS_LOOKBEHIND}">`),U+=e.opcodeToString(ue.opcode.type),ue.opcode.type===i.RNM&&(U+=`(${J[ue.opcode.index].name}) `),ue.opcode.type===i.BKR){let ye=ue.opcode.bkrCase===i.BKR_MODE_CI?"%i":"%s",W=ue.opcode.bkrMode===i.BKR_MODE_UM?"%u":"%p";U+=`(\\${ye}${W}${J[ue.opcode.index].name}) `}ue.opcode.type===i.UDT&&(U+=`(${re[ue.opcode.index].name}) `),ue.opcode.type===i.TRG&&(U+=`(${A(q,ue.opcode)}) `),ue.opcode.type===i.TBS&&(U+=`(${k(q,ue.opcode)}) `),ue.opcode.type===i.TLS&&(U+=`(${O(q,ue.opcode)}) `),ue.opcode.type===i.REP&&(U+=`(${x(q,ue.opcode)}) `),ve&&(U+="</span>"),U+="</td>",U+="<td>",Ce?U+=M(q,X,ue.state,ue.phraseIndex,ue.phraseLength,ie):ce?U+=B(q,X,ue.state,ue.phraseIndex,ue.phraseLength):U+=ee(q,X,ue.state,ue.phraseIndex,ue.phraseLength),U+=`</td></tr>
|
353
|
-
`}),U+="<tr><th>(a)</th><th>(b)</th><th>(c)</th><th>(d)</th><th>(e)</th><th>(f)</th>",U+=`<th>operator</th><th>phrase</th></tr>
|
354
|
-
`,U+=`</table>
|
355
|
-
`,U},"htmlTable");this.toHtml=function(q,U){let te=h;if(typeof q=="string"&&q.length>=3){let ce=q.toLowerCase().slice(0,3);ce==="hex"?te=f:ce==="dec"?te=d:ce==="uni"&&(te=p)}let oe="";return oe+=E(te,U),oe+=ae(te),oe+=C(),oe}},"exportTrace")});var Vf=Q((Swe,pB)=>{pB.exports={ast:sB(),circular:Px(),ids:Oo(),parser:fB(),stats:dB(),trace:hB(),utils:Hf(),emitcss:Bx(),style:l0()}});var gB=Q((Twe,mB)=>{mB.exports=o(function(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"file",lower:"file",index:0,isBkr:!1},this.rules[1]={name:"line",lower:"line",index:1,isBkr:!1},this.rules[2]={name:"line-text",lower:"line-text",index:2,isBkr:!1},this.rules[3]={name:"last-line",lower:"last-line",index:3,isBkr:!1},this.rules[4]={name:"valid",lower:"valid",index:4,isBkr:!1},this.rules[5]={name:"invalid",lower:"invalid",index:5,isBkr:!1},this.rules[6]={name:"end",lower:"end",index:6,isBkr:!1},this.rules[7]={name:"CRLF",lower:"crlf",index:7,isBkr:!1},this.rules[8]={name:"LF",lower:"lf",index:8,isBkr:!1},this.rules[9]={name:"CR",lower:"cr",index:9,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:2,children:[1,3]},this.rules[0].opcodes[1]={type:3,min:0,max:1/0},this.rules[0].opcodes[2]={type:4,index:1},this.rules[0].opcodes[3]={type:3,min:0,max:1},this.rules[0].opcodes[4]={type:4,index:3},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:2,children:[1,2]},this.rules[1].opcodes[1]={type:4,index:2},this.rules[1].opcodes[2]={type:4,index:6},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:3,min:0,max:1/0},this.rules[2].opcodes[1]={type:1,children:[2,3]},this.rules[2].opcodes[2]={type:4,index:4},this.rules[2].opcodes[3]={type:4,index:5},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:3,min:1,max:1/0},this.rules[3].opcodes[1]={type:1,children:[2,3]},this.rules[3].opcodes[2]={type:4,index:4},this.rules[3].opcodes[3]={type:4,index:5},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:1,children:[1,2]},this.rules[4].opcodes[1]={type:5,min:32,max:126},this.rules[4].opcodes[2]={type:6,string:[9]},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[5].opcodes[1]={type:5,min:0,max:8},this.rules[5].opcodes[2]={type:5,min:11,max:12},this.rules[5].opcodes[3]={type:5,min:14,max:31},this.rules[5].opcodes[4]={type:5,min:127,max:4294967295},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:1,children:[1,2,3]},this.rules[6].opcodes[1]={type:4,index:7},this.rules[6].opcodes[2]={type:4,index:8},this.rules[6].opcodes[3]={type:4,index:9},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:6,string:[13,10]},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:6,string:[10]},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:6,string:[13]},this.toString=o(function(){let r="";return r+=`file = *line [last-line]
|
356
|
-
`,r+=`line = line-text end
|
357
|
-
`,r+=`line-text = *(valid/invalid)
|
358
|
-
`,r+=`last-line = 1*(valid/invalid)
|
359
|
-
`,r+=`valid = %d32-126 / %d9
|
360
|
-
`,r+=`invalid = %d0-8 / %d11-12 /%d14-31 / %x7f-ffffffff
|
361
|
-
`,r+=`end = CRLF / LF / CR
|
362
|
-
`,r+=`CRLF = %d13.10
|
363
|
-
`,r+=`LF = %d10
|
364
|
-
`,r+=`CR = %d13
|
365
|
-
`,r},"toString")},"grammar")});var vB=Q(bB=>{var An=Oo(),$ue=Hf();function jue(t,e,r,n,i){return t===An.SEM_PRE?(i.endLength=0,i.textLength=0,i.invalidCount=0):i.lines.push({lineNo:i.lines.length,beginChar:r,length:n,textLength:i.textLength,endType:i.endType,invalidChars:i.invalidCount}),An.SEM_OK}o(jue,"semLine");function Hue(t,e,r,n,i){return t===An.SEM_PRE&&(i.textLength=n),An.SEM_OK}o(Hue,"semLineText");function Vue(t,e,r,n,i){return t===An.SEM_PRE?(i.endLength=0,i.textLength=0,i.invalidCount=0):i.strict?(i.lines.push({lineNo:i.lines.length,beginChar:r,length:n,textLength:n,endType:"none",invalidChars:i.invalidCount}),i.errors.push({line:i.lineNo,char:r+n,msg:"no line end on last line - strict ABNF specifies CRLF(\\r\\n, \\x0D\\x0A)"})):(e.push(10),i.lines.push({lineNo:i.lines.length,beginChar:r,length:n+1,textLength:n,endType:"LF",invalidChars:i.invalidCount})),An.SEM_OK}o(Vue,"semLastLine");function zue(t,e,r,n,i){return t===An.SEM_PRE&&i.errors.push({line:i.lineNo,char:r,msg:`invalid character found '\\x${$ue.charToHex(e[r])}'`}),An.SEM_OK}o(zue,"semInvalid");function Kue(t,e,r,n,i){return t===An.SEM_POST&&(i.lineNo+=1),An.SEM_OK}o(Kue,"semEnd");function Gue(t,e,r,n,i){return t===An.SEM_PRE&&(i.endType="LF",i.strict&&i.errors.push({line:i.lineNo,char:r,msg:"line end character LF(\\n, \\x0A) - strict ABNF specifies CRLF(\\r\\n, \\x0D\\x0A)"})),An.SEM_OK}o(Gue,"semLF");function Wue(t,e,r,n,i){return t===An.SEM_PRE&&(i.endType="CR",i.strict&&i.errors.push({line:i.lineNo,char:r,msg:"line end character CR(\\r, \\x0D) - strict ABNF specifies CRLF(\\r\\n, \\x0D\\x0A)"})),An.SEM_OK}o(Wue,"semCR");function Yue(t,e,r,n,i){return t===An.SEM_PRE&&(i.endType="CRLF"),An.SEM_OK}o(Yue,"semCRLF");var da=[];da.line=jue;da["line-text"]=Hue;da["last-line"]=Vue;da.invalid=zue;da.end=Kue;da.lf=Gue;da.cr=Wue;da.crlf=Yue;bB.callbacks=da});var xB=Q((Mwe,yB)=>{yB.exports=o(function(e,r,n,i){let s="scanner.js: ",a=Vf(),f=new(gB()),{callbacks:d}=vB(),h=[],p=new a.parser;if(p.ast=new a.ast,p.ast.callbacks=d,i){if(i.traceObject!=="traceObject")throw new TypeError(`${s}trace argument is not a trace object`);p.trace=i}if(p.parse(f,"file",e).success!==!0){r.push({line:0,char:0,msg:"syntax analysis error analyzing input SABNF grammar"});return}let I={lines:h,lineNo:0,errors:r,strict:!!n};return p.ast.translate(I),h},"exfn")});var _B=Q((Rwe,wB)=>{wB.exports=o(function(){let e="syntax-callbacks.js: ",r=Vf(),n=r.ids,i,s=o(function(O,w,M,he){switch(O.state){case n.ACTIVE:he.altStack=[],he.repCount=0;break;case n.EMPTY:he.errors.push({line:0,char:0,msg:"grammar file is empty"});break;case n.MATCH:he.ruleCount===0&&he.errors.push({line:0,char:0,msg:"no rules defined"});break;case n.NOMATCH:throw new Error(`${e}synFile: grammar file NOMATCH: design error: should never happen.`);default:throw new Error(`${e}synFile: unrecognized case.`)}},"synFile"),a=o(function(k,O,w,M){switch(k.state){case n.ACTIVE:M.altStack.length=0,i={groupOpen:null,groupError:!1,optionOpen:null,optionError:!1,tlsOpen:null,clsOpen:null,prosValOpen:null,basicError:!1},M.altStack.push(i);break;case n.EMPTY:throw new Error(`${e}synRule: EMPTY: rule cannot be empty`);case n.NOMATCH:break;case n.MATCH:M.ruleCount+=1;break;default:throw new Error(`${e}synFile: unrecognized case.`)}},"synRule"),f=o(function(k,O,w,M){switch(k.state){case n.ACTIVE:break;case n.EMPTY:break;case n.NOMATCH:break;case n.MATCH:M.errors.push({line:M.findLine(M.lines,w,M.charsLength),char:w,msg:"Unrecognized SABNF line. Invalid rule, comment or blank line."});break;default:throw new Error(`${e}synFile: unrecognized case.`)}},"synRuleError"),d=o(function(k,O,w,M){switch(k.state){case n.ACTIVE:break;case n.EMPTY:break;case n.NOMATCH:break;case n.MATCH:M.errors.push({line:M.findLine(M.lines,w,M.charsLength),char:w,msg:"Rule names must be alphanum and begin with alphabetic character."});break;default:throw new Error(`${e}synFile: unrecognized case.`)}},"synRuleNameError"),h=o(function(k,O,w,M){switch(k.state){case n.ACTIVE:break;case n.EMPTY:break;case n.NOMATCH:break;case n.MATCH:M.errors.push({line:M.findLine(M.lines,w,M.charsLength),char:w,msg:"Expected '=' or '=/'. Not found."});break;default:throw new Error(`${e}synFile: unrecognized case.`)}},"synDefinedAsError"),p=o(function(k,O,w,M){switch(k.state){case n.ACTIVE:break;case n.EMPTY:break;case n.NOMATCH:break;case n.MATCH:M.strict&&M.errors.push({line:M.findLine(M.lines,w,M.charsLength),char:w,msg:"AND operator(&) found - strict ABNF specified."});break;default:throw new Error(`${e}synFile: unrecognized case.`)}},"synAndOp"),y=o(function(k,O,w,M){switch(k.state){case n.ACTIVE:break;case n.EMPTY:break;case n.NOMATCH:break;case n.MATCH:M.strict&&M.errors.push({line:M.findLine(M.lines,w,M.charsLength),char:w,msg:"NOT operator(!) found - strict ABNF specified."});break;default:throw new Error(`${e}synFile: unrecognized case.`)}},"synNotOp"),I=o(function(k,O,w,M){switch(k.state){case n.ACTIVE:break;case n.EMPTY:break;case n.NOMATCH:break;case n.MATCH:M.strict&&M.errors.push({line:M.findLine(M.lines,w,M.charsLength),char:w,msg:"Positive look-behind operator(&&) found - strict ABNF specified."});break;default:throw new Error(`${e}synFile: unrecognized case.`)}},"synBkaOp"),T=o(function(k,O,w,M){switch(k.state){case n.ACTIVE:break;case n.EMPTY:break;case n.NOMATCH:break;case n.MATCH:M.strict&&M.errors.push({line:M.findLine(M.lines,w,M.charsLength),char:w,msg:"Negative look-behind operator(!!) found - strict ABNF specified."});break;default:throw new Error(`${e}synFile: unrecognized case.`)}},"synBknOp"),D=o(function(k,O,w,M){switch(k.state){case n.ACTIVE:break;case n.EMPTY:break;case n.NOMATCH:break;case n.MATCH:M.strict&&M.errors.push({line:M.findLine(M.lines,w,M.charsLength),char:w,msg:"Beginning of string anchor(%^) found - strict ABNF specified."});break;default:throw new Error(`${e}synFile: unrecognized case.`)}},"synAbgOp"),R=o(function(k,O,w,M){switch(k.state){case n.ACTIVE:break;case n.EMPTY:break;case n.NOMATCH:break;case n.MATCH:M.strict&&M.errors.push({line:M.findLine(M.lines,w,M.charsLength),char:w,msg:"End of string anchor(%$) found - strict ABNF specified."});break;default:throw new Error(`${e}synFile: unrecognized case.`)}},"synAenOp"),H=o(function(k,O,w,M){switch(k.state){case n.ACTIVE:break;case n.EMPTY:break;case n.NOMATCH:break;case n.MATCH:if(M.strict){let he=r.utils.charsToString(O,w,k.phraseLength);M.errors.push({line:M.findLine(M.lines,w,M.charsLength),char:w,msg:`Back reference operator(${he}) found - strict ABNF specified.`})}break;default:throw new Error(`${e}synFile: unrecognized case.`)}},"synBkrOp"),F=o(function(k,O,w,M){switch(k.state){case n.ACTIVE:break;case n.EMPTY:break;case n.NOMATCH:break;case n.MATCH:if(M.strict){let he=r.utils.charsToString(O,w,k.phraseLength);M.errors.push({line:M.findLine(M.lines,w,M.charsLength),char:w,msg:`UDT operator found(${he}) - strict ABNF specified.`})}break;default:throw new Error(`${e}synFile: unrecognized case.`)}},"synUdtOp"),V=o(function(k,O,w){switch(k.state){case n.ACTIVE:break;case n.EMPTY:break;case n.NOMATCH:break;case n.MATCH:i.tlsOpen=w;break;default:throw new Error(`${e}synFile: unrecognized case.`)}},"synTlsOpen"),X=o(function(k,O,w,M){switch(k.state){case n.ACTIVE:M.stringTabChar=!1;break;case n.EMPTY:break;case n.NOMATCH:break;case n.MATCH:M.stringTabChar!==!1&&M.errors.push({line:M.findLine(M.lines,M.stringTabChar),char:M.stringTabChar,msg:"Tab character (\\t, x09) not allowed in literal string (see 'quoted-string' definition, RFC 7405.)"});break;default:throw new Error(`${e}synFile: unrecognized case.`)}},"synTlsString"),J=o(function(k,O,w,M){switch(k.state){case n.ACTIVE:break;case n.EMPTY:break;case n.NOMATCH:break;case n.MATCH:M.stringTabChar=w;break;default:throw new Error(`${e}synFile: unrecognized case.`)}},"synStringTab"),re=o(function(k,O,w,M){switch(k.state){case n.ACTIVE:break;case n.EMPTY:break;case n.NOMATCH:M.errors.push({line:M.findLine(M.lines,i.tlsOpen),char:i.tlsOpen,msg:'Case-insensitive literal string("...") opened but not closed.'}),i.basicError=!0,i.tlsOpen=null;break;case n.MATCH:i.tlsOpen=null;break;default:throw new Error(`${e}synFile: unrecognized case.`)}},"synTlsClose"),z=o(function(k,O,w){switch(k.state){case n.ACTIVE:break;case n.EMPTY:break;case n.NOMATCH:break;case n.MATCH:i.clsOpen=w;break;default:throw new Error(`${e}synFile: unrecognized case.`)}},"synClsOpen"),$=o(function(k,O,w,M){switch(k.state){case n.ACTIVE:M.stringTabChar=!1;break;case n.EMPTY:break;case n.NOMATCH:break;case n.MATCH:M.stringTabChar!==!1&&M.errors.push({line:M.findLine(M.lines,M.stringTabChar),char:M.stringTabChar,msg:"Tab character (\\t, x09) not allowed in literal string."});break;default:throw new Error(`${e}synFile: unrecognized case.`)}},"synClsString"),G=o(function(k,O,w,M){switch(k.state){case n.ACTIVE:break;case n.EMPTY:break;case n.NOMATCH:M.errors.push({line:M.findLine(M.lines,i.clsOpen),char:i.clsOpen,msg:"Case-sensitive literal string('...') opened but not closed."}),i.clsOpen=null,i.basicError=!0;break;case n.MATCH:M.strict&&M.errors.push({line:M.findLine(M.lines,i.clsOpen),char:i.clsOpen,msg:"Case-sensitive string operator('...') found - strict ABNF specified."}),i.clsOpen=null;break;default:throw new Error(`${e}synFile: unrecognized case.`)}},"synClsClose"),le=o(function(k,O,w){switch(k.state){case n.ACTIVE:break;case n.EMPTY:break;case n.NOMATCH:break;case n.MATCH:i.prosValOpen=w;break;default:throw new Error(`${e}synFile: unrecognized case.`)}},"synProsValOpen"),P=o(function(k,O,w,M){switch(k.state){case n.ACTIVE:M.stringTabChar=!1;break;case n.EMPTY:break;case n.NOMATCH:break;case n.MATCH:M.stringTabChar!==!1&&M.errors.push({line:M.findLine(M.lines,M.stringTabChar),char:M.stringTabChar,msg:"Tab character (\\t, x09) not allowed in prose value string."});break;default:throw new Error(`${e}synFile: unrecognized case.`)}},"synProsValString"),g=o(function(k,O,w,M){switch(k.state){case n.ACTIVE:break;case n.EMPTY:break;case n.NOMATCH:M.errors.push({line:M.findLine(M.lines,i.prosValOpen),char:i.prosValOpen,msg:"Prose value operator(<...>) opened but not closed."}),i.basicError=!0,i.prosValOpen=null;break;case n.MATCH:M.errors.push({line:M.findLine(M.lines,i.prosValOpen),char:i.prosValOpen,msg:"Prose value operator(<...>) found. The ABNF syntax is valid, but a parser cannot be generated from this grammar."}),i.prosValOpen=null;break;default:throw new Error(`${e}synFile: unrecognized case.`)}},"synProsValClose"),_=o(function(k,O,w,M){switch(k.state){case n.ACTIVE:break;case n.EMPTY:break;case n.NOMATCH:break;case n.MATCH:i={groupOpen:w,groupError:!1,optionOpen:null,optionError:!1,tlsOpen:null,clsOpen:null,prosValOpen:null,basicError:!1},M.altStack.push(i);break;default:throw new Error(`${e}synFile: unrecognized case.`)}},"synGroupOpen"),v=o(function(k,O,w,M){switch(k.state){case n.ACTIVE:break;case n.EMPTY:break;case n.NOMATCH:M.errors.push({line:M.findLine(M.lines,i.groupOpen),char:i.groupOpen,msg:'Group "(...)" opened but not closed.'}),i=M.altStack.pop(),i.groupError=!0;break;case n.MATCH:i=M.altStack.pop();break;default:throw new Error(`${e}synFile: unrecognized case.`)}},"synGroupClose"),l=o(function(k,O,w,M){switch(k.state){case n.ACTIVE:break;case n.EMPTY:break;case n.NOMATCH:break;case n.MATCH:i={groupOpen:null,groupError:!1,optionOpen:w,optionError:!1,tlsOpen:null,clsOpen:null,prosValOpen:null,basicError:!1},M.altStack.push(i);break;default:throw new Error(`${e}synFile: unrecognized case.`)}},"synOptionOpen"),b=o(function(k,O,w,M){switch(k.state){case n.ACTIVE:break;case n.EMPTY:break;case n.NOMATCH:M.errors.push({line:M.findLine(M.lines,i.optionOpen),char:i.optionOpen,msg:'Option "[...]" opened but not closed.'}),i=M.altStack.pop(),i.optionError=!0;break;case n.MATCH:i=M.altStack.pop();break;default:throw new Error(`${e}synFile: unrecognized case.`)}},"synOptionClose"),E=o(function(k,O,w,M){switch(k.state){case n.ACTIVE:break;case n.EMPTY:break;case n.NOMATCH:break;case n.MATCH:i.basicError===!1&&M.errors.push({line:M.findLine(M.lines,w,M.charsLength),char:w,msg:"Unrecognized SABNF element."});break;default:throw new Error(`${e}synFile: unrecognized case.`)}},"synBasicElementError"),C=o(function(k,O,w,M){switch(k.state){case n.ACTIVE:break;case n.EMPTY:break;case n.NOMATCH:break;case n.MATCH:if(k.phraseLength===1&&M.strict){let he=O[w]===13?"CR":"LF";M.errors.push({line:M.findLine(M.lines,w,M.charsLength),char:w,msg:`Line end '${he}' found - strict ABNF specified, only CRLF allowed.`})}break;default:throw new Error(`${e}synFile: unrecognized case.`)}},"synLineEnd"),A=o(function(k,O,w,M){switch(k.state){case n.ACTIVE:break;case n.EMPTY:break;case n.NOMATCH:break;case n.MATCH:M.errors.push({line:M.findLine(M.lines,w,M.charsLength),char:w,msg:"Unrecognized grammar element or characters."});break;default:throw new Error(`${e}synFile: unrecognized case.`)}},"synLineEndError"),x=o(function(k,O,w,M){switch(k.state){case n.ACTIVE:break;case n.EMPTY:break;case n.NOMATCH:M.repCount+=1;break;case n.MATCH:M.repCount+=1;break;default:throw new Error(`${e}synFile: unrecognized case.`)}},"synRepetition");this.callbacks=[],this.callbacks.andop=p,this.callbacks.basicelementerr=E,this.callbacks.clsclose=G,this.callbacks.clsopen=z,this.callbacks.clsstring=$,this.callbacks.definedaserror=h,this.callbacks.file=s,this.callbacks.groupclose=v,this.callbacks.groupopen=_,this.callbacks.lineenderror=A,this.callbacks.lineend=C,this.callbacks.notop=y,this.callbacks.optionclose=b,this.callbacks.optionopen=l,this.callbacks.prosvalclose=g,this.callbacks.prosvalopen=le,this.callbacks.prosvalstring=P,this.callbacks.repetition=x,this.callbacks.rule=a,this.callbacks.ruleerror=f,this.callbacks.rulenameerror=d,this.callbacks.stringtab=J,this.callbacks.tlsclose=re,this.callbacks.tlsopen=V,this.callbacks.tlsstring=X,this.callbacks.udtop=F,this.callbacks.bkaop=I,this.callbacks.bknop=T,this.callbacks.bkrop=H,this.callbacks.abgop=D,this.callbacks.aenop=R},"exfn")});var AB=Q((Bwe,EB)=>{EB.exports=o(function(){let e=Vf(),r=e.ids,n=o(function(){this.names=[],this.add=o(function(ue){let ye=-1;return this.get(ue)===-1&&(ye={name:ue,lower:ue.toLowerCase(),index:this.names.length},this.names.push(ye)),ye},"add"),this.get=o(function(ue){let ye=-1,W=ue.toLowerCase();for(let me=0;me<this.names.length;me+=1)if(this.names[me].lower===W){ye=this.names[me];break}return ye},"get")},"NameList"),i=o(function(De,ue,ye){let W=0;for(let me=ue;me<ue+ye;me+=1)W=10*W+De[me]-48;return W},"decnum"),s=o(function(De,ue,ye){let W=0;for(let me=ue;me<ue+ye;me+=1)W=2*W+De[me]-48;return W},"binnum"),a=o(function(De,ue,ye){let W=0;for(let me=ue;me<ue+ye;me+=1){let ke=De[me];if(ke>=48&&ke<=57)ke-=48;else if(ke>=65&&ke<=70)ke-=55;else if(ke>=97&&ke<=102)ke-=87;else throw new Error("hexnum out of range");W=16*W+ke}return W},"hexnum");function f(ie,De,ue,ye,W){let me=r.SEM_OK;if(ie===r.SEM_PRE)W.ruleNames=new n,W.udtNames=new n,W.rules=[],W.udts=[],W.rulesLineMap=[],W.opcodes=[],W.altStack=[],W.topStack=null,W.topRule=null;else if(ie===r.SEM_POST){let ke;W.rules.forEach(ze=>{ze.isBkr=!1,ze.opcodes.forEach(Oe=>{Oe.type===r.RNM&&(ke=W.ruleNames.get(Oe.index.name),ke===-1?(W.errors.push({line:W.findLine(W.lines,Oe.index.phraseIndex,W.charsLength),char:Oe.index.phraseIndex,msg:`Rule name '${Oe.index.name}' used but not defined.`}),Oe.index=-1):Oe.index=ke.index)})}),W.udts.forEach(ze=>{ze.isBkr=!1}),W.rules.forEach(ze=>{ze.opcodes.forEach(Oe=>{Oe.type===r.BKR&&(ze.hasBkr=!0,ke=W.ruleNames.get(Oe.index.name),ke!==-1?(W.rules[ke.index].isBkr=!0,Oe.index=ke.index):(ke=W.udtNames.get(Oe.index.name),ke!==-1?(W.udts[ke.index].isBkr=!0,Oe.index=W.rules.length+ke.index):(W.errors.push({line:W.findLine(W.lines,Oe.index.phraseIndex,W.charsLength),char:Oe.index.phraseIndex,msg:`Back reference name '${Oe.index.name}' refers to undefined rule or unamed UDT.`}),Oe.index=-1)))})})}return me}o(f,"semFile");function d(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_PRE&&(W.altStack.length=0,W.topStack=null,W.rulesLineMap.push({line:W.findLine(W.lines,ue,W.charsLength),char:ue})),me}o(d,"semRule");function h(ie,De,ue,ye,W){let me=r.SEM_OK;if(ie===r.SEM_PRE)W.ruleName="",W.definedas="";else if(ie===r.SEM_POST){let ke;W.definedas==="="?(ke=W.ruleNames.add(W.ruleName),ke===-1?(W.definedas=null,W.errors.push({line:W.findLine(W.lines,ue,W.charsLength),char:ue,msg:`Rule name '${W.ruleName}' previously defined.`})):(W.topRule={name:ke.name,lower:ke.lower,opcodes:[],index:ke.index},W.rules.push(W.topRule),W.opcodes=W.topRule.opcodes)):(ke=W.ruleNames.get(W.ruleName),ke===-1?(W.definedas=null,W.errors.push({line:W.findLine(W.lines,ue,W.charsLength),char:ue,msg:`Rule name '${W.ruleName}' for incremental alternate not previously defined.`})):(W.topRule=W.rules[ke.index],W.opcodes=W.topRule.opcodes))}return me}o(h,"semRuleLookup");function p(ie,De,ue,ye,W){let me=r.SEM_OK;if(ie===r.SEM_PRE)for(;;){if(W.definedas===null){me=r.SEM_SKIP;break}if(W.topStack===null){if(W.definedas==="="){W.topStack={alt:{type:r.ALT,children:[]},cat:null},W.altStack.push(W.topStack),W.opcodes.push(W.topStack.alt);break}W.topStack={alt:W.opcodes[0],cat:null},W.altStack.push(W.topStack);break}W.topStack={alt:{type:r.ALT,children:[]},cat:null},W.altStack.push(W.topStack),W.opcodes.push(W.topStack.alt);break}else ie===r.SEM_POST&&(W.altStack.pop(),W.altStack.length>0?W.topStack=W.altStack[W.altStack.length-1]:W.topStack=null);return me}o(p,"semAlternation");function y(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_PRE?(W.topStack.alt.children.push(W.opcodes.length),W.topStack.cat={type:r.CAT,children:[]},W.opcodes.push(W.topStack.cat)):ie===r.SEM_POST&&(W.topStack.cat=null),me}o(y,"semConcatenation");function I(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_PRE&&W.topStack.cat.children.push(W.opcodes.length),me}o(I,"semRepetition");function T(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_POST&&W.opcodes.push({type:r.REP,min:0,max:1,char:ue}),me}o(T,"semOptionOpen");function D(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_PRE&&(W.ruleName=e.utils.charsToString(De,ue,ye)),me}o(D,"semRuleName");function R(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_POST&&(W.definedas="="),me}o(R,"semDefined");function H(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_POST&&(W.definedas="=/"),me}o(H,"semIncAlt");function F(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_PRE?(W.min=0,W.max=1/0,W.topRep={type:r.REP,min:0,max:1/0},W.opcodes.push(W.topRep)):ie===r.SEM_POST&&(W.min>W.max&&W.errors.push({line:W.findLine(W.lines,ue,W.charsLength),char:ue,msg:`repetition min cannot be greater than max: min: ${W.min}: max: ${W.max}`}),W.topRep.min=W.min,W.topRep.max=W.max),me}o(F,"semRepOp");function V(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_POST&&(W.min=i(De,ue,ye)),me}o(V,"semRepMin");function X(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_POST&&(W.max=i(De,ue,ye)),me}o(X,"semRepMax");function J(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_POST&&(W.max=i(De,ue,ye),W.min=W.max),me}o(J,"semRepMinMax");function re(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_POST&&W.opcodes.push({type:r.AND}),me}o(re,"semAndOp");function z(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_POST&&W.opcodes.push({type:r.NOT}),me}o(z,"semNotOp");function $(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_POST&&W.opcodes.push({type:r.RNM,index:{phraseIndex:ue,name:e.utils.charsToString(De,ue,ye)}}),me}o($,"semRnmOp");function G(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_POST&&W.opcodes.push({type:r.ABG}),me}o(G,"semAbgOp");function le(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_POST&&W.opcodes.push({type:r.AEN}),me}o(le,"semAenOp");function P(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_POST&&W.opcodes.push({type:r.BKA}),me}o(P,"semBkaOp");function g(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_POST&&W.opcodes.push({type:r.BKN}),me}o(g,"semBknOp");function _(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_PRE?(W.ci=!0,W.cs=!1,W.um=!0,W.pm=!1):ie===r.SEM_POST&&W.opcodes.push({type:r.BKR,bkrCase:W.cs===!0?r.BKR_MODE_CS:r.BKR_MODE_CI,bkrMode:W.pm===!0?r.BKR_MODE_PM:r.BKR_MODE_UM,index:{phraseIndex:W.bkrname.phraseIndex,name:e.utils.charsToString(De,W.bkrname.phraseIndex,W.bkrname.phraseLength)}}),me}o(_,"semBkrOp");function v(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_POST&&(W.ci=!0),me}o(v,"semBkrCi");function l(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_POST&&(W.cs=!0),me}o(l,"semBkrCs");function b(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_POST&&(W.um=!0),me}o(b,"semBkrUm");function E(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_POST&&(W.pm=!0),me}o(E,"semBkrPm");function C(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_POST&&(W.bkrname={phraseIndex:ue,phraseLength:ye}),me}o(C,"semBkrName");function A(ie,De,ue,ye,W){let me=r.SEM_OK;if(ie===r.SEM_POST){let ke=e.utils.charsToString(De,ue,ye),ze=W.udtNames.add(ke);if(ze===-1){if(ze=W.udtNames.get(ke),ze===-1)throw new Error("semUdtEmpty: name look up error")}else W.udts.push({name:ze.name,lower:ze.lower,index:ze.index,empty:!0});W.opcodes.push({type:r.UDT,empty:!0,index:ze.index})}return me}o(A,"semUdtEmpty");function x(ie,De,ue,ye,W){let me=r.SEM_OK;if(ie===r.SEM_POST){let ke=e.utils.charsToString(De,ue,ye),ze=W.udtNames.add(ke);if(ze===-1){if(ze=W.udtNames.get(ke),ze===-1)throw new Error("semUdtNonEmpty: name look up error")}else W.udts.push({name:ze.name,lower:ze.lower,index:ze.index,empty:!1});W.opcodes.push({type:r.UDT,empty:!1,index:ze.index,syntax:null,semantic:null})}return me}o(x,"semUdtNonEmpty");function k(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_PRE&&(W.tlscase=!0),me}o(k,"semTlsOp");function O(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_POST&&ye>0&&(De[ue+1]===83||De[ue+1]===115)&&(W.tlscase=!1),me}o(O,"semTlsCase");function w(ie,De,ue,ye,W){let me=r.SEM_OK;if(ie===r.SEM_POST)if(W.tlscase){let ke=De.slice(ue,ue+ye);for(let ze=0;ze<ke.length;ze+=1)ke[ze]>=65&&ke[ze]<=90&&(ke[ze]+=32);W.opcodes.push({type:r.TLS,string:ke})}else W.opcodes.push({type:r.TBS,string:De.slice(ue,ue+ye)});return me}o(w,"semTlsString");function M(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_POST&&(ye<=2?W.opcodes.push({type:r.TLS,string:[]}):W.opcodes.push({type:r.TBS,string:De.slice(ue+1,ue+ye-1)})),me}o(M,"semClsOp");function he(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_PRE?W.tbsstr=[]:ie===r.SEM_POST&&W.opcodes.push({type:r.TBS,string:W.tbsstr}),me}o(he,"semTbsOp");function B(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_PRE?(W.min=0,W.max=0):ie===r.SEM_POST&&(W.min>W.max&&W.errors.push({line:W.findLine(W.lines,ue,W.charsLength),char:ue,msg:`TRG, (%dmin-max), min cannot be greater than max: min: ${W.min}: max: ${W.max}`}),W.opcodes.push({type:r.TRG,min:W.min,max:W.max})),me}o(B,"semTrgOp");function ee(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_POST&&(W.min=i(De,ue,ye)),me}o(ee,"semDmin");function ae(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_POST&&(W.max=i(De,ue,ye)),me}o(ae,"semDmax");function q(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_POST&&(W.min=s(De,ue,ye)),me}o(q,"semBmin");function U(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_POST&&(W.max=s(De,ue,ye)),me}o(U,"semBmax");function te(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_POST&&(W.min=a(De,ue,ye)),me}o(te,"semXmin");function oe(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_POST&&(W.max=a(De,ue,ye)),me}o(oe,"semXmax");function ce(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_POST&&W.tbsstr.push(i(De,ue,ye)),me}o(ce,"semDstring");function Ce(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_POST&&W.tbsstr.push(s(De,ue,ye)),me}o(Ce,"semBstring");function ve(ie,De,ue,ye,W){let me=r.SEM_OK;return ie===r.SEM_POST&&W.tbsstr.push(a(De,ue,ye)),me}o(ve,"semXstring"),this.callbacks=[],this.callbacks.abgop=G,this.callbacks.aenop=le,this.callbacks.alternation=p,this.callbacks.andop=re,this.callbacks.bmax=U,this.callbacks.bmin=q,this.callbacks.bkaop=P,this.callbacks.bknop=g,this.callbacks.bkrop=_,this.callbacks["bkr-name"]=C,this.callbacks.bstring=Ce,this.callbacks.clsop=M,this.callbacks.ci=v,this.callbacks.cs=l,this.callbacks.um=b,this.callbacks.pm=E,this.callbacks.concatenation=y,this.callbacks.defined=R,this.callbacks.dmax=ae,this.callbacks.dmin=ee,this.callbacks.dstring=ce,this.callbacks.file=f,this.callbacks.incalt=H,this.callbacks.notop=z,this.callbacks.optionopen=T,this.callbacks["rep-max"]=X,this.callbacks["rep-min"]=V,this.callbacks["rep-min-max"]=J,this.callbacks.repetition=I,this.callbacks.repop=F,this.callbacks.rnmop=$,this.callbacks.rule=d,this.callbacks.rulelookup=h,this.callbacks.rulename=D,this.callbacks.tbsop=he,this.callbacks.tlscase=O,this.callbacks.tlsstring=w,this.callbacks.tlsop=k,this.callbacks.trgop=B,this.callbacks["udt-empty"]=A,this.callbacks["udt-non-empty"]=x,this.callbacks.xmax=oe,this.callbacks.xmin=te,this.callbacks.xstring=ve},"exfn")});var IB=Q((Fwe,CB)=>{CB.exports=o(function(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"File",lower:"file",index:0,isBkr:!1},this.rules[1]={name:"BlankLine",lower:"blankline",index:1,isBkr:!1},this.rules[2]={name:"Rule",lower:"rule",index:2,isBkr:!1},this.rules[3]={name:"RuleLookup",lower:"rulelookup",index:3,isBkr:!1},this.rules[4]={name:"RuleNameTest",lower:"rulenametest",index:4,isBkr:!1},this.rules[5]={name:"RuleName",lower:"rulename",index:5,isBkr:!1},this.rules[6]={name:"RuleNameError",lower:"rulenameerror",index:6,isBkr:!1},this.rules[7]={name:"DefinedAsTest",lower:"definedastest",index:7,isBkr:!1},this.rules[8]={name:"DefinedAsError",lower:"definedaserror",index:8,isBkr:!1},this.rules[9]={name:"DefinedAs",lower:"definedas",index:9,isBkr:!1},this.rules[10]={name:"Defined",lower:"defined",index:10,isBkr:!1},this.rules[11]={name:"IncAlt",lower:"incalt",index:11,isBkr:!1},this.rules[12]={name:"RuleError",lower:"ruleerror",index:12,isBkr:!1},this.rules[13]={name:"LineEndError",lower:"lineenderror",index:13,isBkr:!1},this.rules[14]={name:"Alternation",lower:"alternation",index:14,isBkr:!1},this.rules[15]={name:"Concatenation",lower:"concatenation",index:15,isBkr:!1},this.rules[16]={name:"Repetition",lower:"repetition",index:16,isBkr:!1},this.rules[17]={name:"Modifier",lower:"modifier",index:17,isBkr:!1},this.rules[18]={name:"Predicate",lower:"predicate",index:18,isBkr:!1},this.rules[19]={name:"BasicElement",lower:"basicelement",index:19,isBkr:!1},this.rules[20]={name:"BasicElementErr",lower:"basicelementerr",index:20,isBkr:!1},this.rules[21]={name:"Group",lower:"group",index:21,isBkr:!1},this.rules[22]={name:"GroupError",lower:"grouperror",index:22,isBkr:!1},this.rules[23]={name:"GroupOpen",lower:"groupopen",index:23,isBkr:!1},this.rules[24]={name:"GroupClose",lower:"groupclose",index:24,isBkr:!1},this.rules[25]={name:"Option",lower:"option",index:25,isBkr:!1},this.rules[26]={name:"OptionError",lower:"optionerror",index:26,isBkr:!1},this.rules[27]={name:"OptionOpen",lower:"optionopen",index:27,isBkr:!1},this.rules[28]={name:"OptionClose",lower:"optionclose",index:28,isBkr:!1},this.rules[29]={name:"RnmOp",lower:"rnmop",index:29,isBkr:!1},this.rules[30]={name:"BkrOp",lower:"bkrop",index:30,isBkr:!1},this.rules[31]={name:"bkrModifier",lower:"bkrmodifier",index:31,isBkr:!1},this.rules[32]={name:"cs",lower:"cs",index:32,isBkr:!1},this.rules[33]={name:"ci",lower:"ci",index:33,isBkr:!1},this.rules[34]={name:"um",lower:"um",index:34,isBkr:!1},this.rules[35]={name:"pm",lower:"pm",index:35,isBkr:!1},this.rules[36]={name:"bkr-name",lower:"bkr-name",index:36,isBkr:!1},this.rules[37]={name:"rname",lower:"rname",index:37,isBkr:!1},this.rules[38]={name:"uname",lower:"uname",index:38,isBkr:!1},this.rules[39]={name:"ename",lower:"ename",index:39,isBkr:!1},this.rules[40]={name:"UdtOp",lower:"udtop",index:40,isBkr:!1},this.rules[41]={name:"udt-non-empty",lower:"udt-non-empty",index:41,isBkr:!1},this.rules[42]={name:"udt-empty",lower:"udt-empty",index:42,isBkr:!1},this.rules[43]={name:"RepOp",lower:"repop",index:43,isBkr:!1},this.rules[44]={name:"AltOp",lower:"altop",index:44,isBkr:!1},this.rules[45]={name:"CatOp",lower:"catop",index:45,isBkr:!1},this.rules[46]={name:"StarOp",lower:"starop",index:46,isBkr:!1},this.rules[47]={name:"AndOp",lower:"andop",index:47,isBkr:!1},this.rules[48]={name:"NotOp",lower:"notop",index:48,isBkr:!1},this.rules[49]={name:"BkaOp",lower:"bkaop",index:49,isBkr:!1},this.rules[50]={name:"BknOp",lower:"bknop",index:50,isBkr:!1},this.rules[51]={name:"AbgOp",lower:"abgop",index:51,isBkr:!1},this.rules[52]={name:"AenOp",lower:"aenop",index:52,isBkr:!1},this.rules[53]={name:"TrgOp",lower:"trgop",index:53,isBkr:!1},this.rules[54]={name:"TbsOp",lower:"tbsop",index:54,isBkr:!1},this.rules[55]={name:"TlsOp",lower:"tlsop",index:55,isBkr:!1},this.rules[56]={name:"TlsCase",lower:"tlscase",index:56,isBkr:!1},this.rules[57]={name:"TlsOpen",lower:"tlsopen",index:57,isBkr:!1},this.rules[58]={name:"TlsClose",lower:"tlsclose",index:58,isBkr:!1},this.rules[59]={name:"TlsString",lower:"tlsstring",index:59,isBkr:!1},this.rules[60]={name:"StringTab",lower:"stringtab",index:60,isBkr:!1},this.rules[61]={name:"ClsOp",lower:"clsop",index:61,isBkr:!1},this.rules[62]={name:"ClsOpen",lower:"clsopen",index:62,isBkr:!1},this.rules[63]={name:"ClsClose",lower:"clsclose",index:63,isBkr:!1},this.rules[64]={name:"ClsString",lower:"clsstring",index:64,isBkr:!1},this.rules[65]={name:"ProsVal",lower:"prosval",index:65,isBkr:!1},this.rules[66]={name:"ProsValOpen",lower:"prosvalopen",index:66,isBkr:!1},this.rules[67]={name:"ProsValString",lower:"prosvalstring",index:67,isBkr:!1},this.rules[68]={name:"ProsValClose",lower:"prosvalclose",index:68,isBkr:!1},this.rules[69]={name:"rep-min",lower:"rep-min",index:69,isBkr:!1},this.rules[70]={name:"rep-min-max",lower:"rep-min-max",index:70,isBkr:!1},this.rules[71]={name:"rep-max",lower:"rep-max",index:71,isBkr:!1},this.rules[72]={name:"rep-num",lower:"rep-num",index:72,isBkr:!1},this.rules[73]={name:"dString",lower:"dstring",index:73,isBkr:!1},this.rules[74]={name:"xString",lower:"xstring",index:74,isBkr:!1},this.rules[75]={name:"bString",lower:"bstring",index:75,isBkr:!1},this.rules[76]={name:"Dec",lower:"dec",index:76,isBkr:!1},this.rules[77]={name:"Hex",lower:"hex",index:77,isBkr:!1},this.rules[78]={name:"Bin",lower:"bin",index:78,isBkr:!1},this.rules[79]={name:"dmin",lower:"dmin",index:79,isBkr:!1},this.rules[80]={name:"dmax",lower:"dmax",index:80,isBkr:!1},this.rules[81]={name:"bmin",lower:"bmin",index:81,isBkr:!1},this.rules[82]={name:"bmax",lower:"bmax",index:82,isBkr:!1},this.rules[83]={name:"xmin",lower:"xmin",index:83,isBkr:!1},this.rules[84]={name:"xmax",lower:"xmax",index:84,isBkr:!1},this.rules[85]={name:"dnum",lower:"dnum",index:85,isBkr:!1},this.rules[86]={name:"bnum",lower:"bnum",index:86,isBkr:!1},this.rules[87]={name:"xnum",lower:"xnum",index:87,isBkr:!1},this.rules[88]={name:"alphanum",lower:"alphanum",index:88,isBkr:!1},this.rules[89]={name:"owsp",lower:"owsp",index:89,isBkr:!1},this.rules[90]={name:"wsp",lower:"wsp",index:90,isBkr:!1},this.rules[91]={name:"space",lower:"space",index:91,isBkr:!1},this.rules[92]={name:"comment",lower:"comment",index:92,isBkr:!1},this.rules[93]={name:"LineEnd",lower:"lineend",index:93,isBkr:!1},this.rules[94]={name:"LineContinue",lower:"linecontinue",index:94,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:3,min:0,max:1/0},this.rules[0].opcodes[1]={type:1,children:[2,3,4]},this.rules[0].opcodes[2]={type:4,index:1},this.rules[0].opcodes[3]={type:4,index:2},this.rules[0].opcodes[4]={type:4,index:12},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:2,children:[1,5,7]},this.rules[1].opcodes[1]={type:3,min:0,max:1/0},this.rules[1].opcodes[2]={type:1,children:[3,4]},this.rules[1].opcodes[3]={type:6,string:[32]},this.rules[1].opcodes[4]={type:6,string:[9]},this.rules[1].opcodes[5]={type:3,min:0,max:1},this.rules[1].opcodes[6]={type:4,index:92},this.rules[1].opcodes[7]={type:4,index:93},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:2,children:[1,2,3,4]},this.rules[2].opcodes[1]={type:4,index:3},this.rules[2].opcodes[2]={type:4,index:89},this.rules[2].opcodes[3]={type:4,index:14},this.rules[2].opcodes[4]={type:1,children:[5,8]},this.rules[2].opcodes[5]={type:2,children:[6,7]},this.rules[2].opcodes[6]={type:4,index:89},this.rules[2].opcodes[7]={type:4,index:93},this.rules[2].opcodes[8]={type:2,children:[9,10]},this.rules[2].opcodes[9]={type:4,index:13},this.rules[2].opcodes[10]={type:4,index:93},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:2,children:[1,2,3]},this.rules[3].opcodes[1]={type:4,index:4},this.rules[3].opcodes[2]={type:4,index:89},this.rules[3].opcodes[3]={type:4,index:7},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:1,children:[1,2]},this.rules[4].opcodes[1]={type:4,index:5},this.rules[4].opcodes[2]={type:4,index:6},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:4,index:88},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:3,min:1,max:1/0},this.rules[6].opcodes[1]={type:1,children:[2,3]},this.rules[6].opcodes[2]={type:5,min:33,max:60},this.rules[6].opcodes[3]={type:5,min:62,max:126},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:1,children:[1,2]},this.rules[7].opcodes[1]={type:4,index:9},this.rules[7].opcodes[2]={type:4,index:8},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:3,min:1,max:2},this.rules[8].opcodes[1]={type:5,min:33,max:126},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:1,children:[1,2]},this.rules[9].opcodes[1]={type:4,index:11},this.rules[9].opcodes[2]={type:4,index:10},this.rules[10].opcodes=[],this.rules[10].opcodes[0]={type:6,string:[61]},this.rules[11].opcodes=[],this.rules[11].opcodes[0]={type:6,string:[61,47]},this.rules[12].opcodes=[],this.rules[12].opcodes[0]={type:2,children:[1,6]},this.rules[12].opcodes[1]={type:3,min:1,max:1/0},this.rules[12].opcodes[2]={type:1,children:[3,4,5]},this.rules[12].opcodes[3]={type:5,min:32,max:126},this.rules[12].opcodes[4]={type:6,string:[9]},this.rules[12].opcodes[5]={type:4,index:94},this.rules[12].opcodes[6]={type:4,index:93},this.rules[13].opcodes=[],this.rules[13].opcodes[0]={type:3,min:1,max:1/0},this.rules[13].opcodes[1]={type:1,children:[2,3,4]},this.rules[13].opcodes[2]={type:5,min:32,max:126},this.rules[13].opcodes[3]={type:6,string:[9]},this.rules[13].opcodes[4]={type:4,index:94},this.rules[14].opcodes=[],this.rules[14].opcodes[0]={type:2,children:[1,2]},this.rules[14].opcodes[1]={type:4,index:15},this.rules[14].opcodes[2]={type:3,min:0,max:1/0},this.rules[14].opcodes[3]={type:2,children:[4,5,6]},this.rules[14].opcodes[4]={type:4,index:89},this.rules[14].opcodes[5]={type:4,index:44},this.rules[14].opcodes[6]={type:4,index:15},this.rules[15].opcodes=[],this.rules[15].opcodes[0]={type:2,children:[1,2]},this.rules[15].opcodes[1]={type:4,index:16},this.rules[15].opcodes[2]={type:3,min:0,max:1/0},this.rules[15].opcodes[3]={type:2,children:[4,5]},this.rules[15].opcodes[4]={type:4,index:45},this.rules[15].opcodes[5]={type:4,index:16},this.rules[16].opcodes=[],this.rules[16].opcodes[0]={type:2,children:[1,3]},this.rules[16].opcodes[1]={type:3,min:0,max:1},this.rules[16].opcodes[2]={type:4,index:17},this.rules[16].opcodes[3]={type:1,children:[4,5,6,7]},this.rules[16].opcodes[4]={type:4,index:21},this.rules[16].opcodes[5]={type:4,index:25},this.rules[16].opcodes[6]={type:4,index:19},this.rules[16].opcodes[7]={type:4,index:20},this.rules[17].opcodes=[],this.rules[17].opcodes[0]={type:1,children:[1,5]},this.rules[17].opcodes[1]={type:2,children:[2,3]},this.rules[17].opcodes[2]={type:4,index:18},this.rules[17].opcodes[3]={type:3,min:0,max:1},this.rules[17].opcodes[4]={type:4,index:43},this.rules[17].opcodes[5]={type:4,index:43},this.rules[18].opcodes=[],this.rules[18].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[18].opcodes[1]={type:4,index:49},this.rules[18].opcodes[2]={type:4,index:50},this.rules[18].opcodes[3]={type:4,index:47},this.rules[18].opcodes[4]={type:4,index:48},this.rules[19].opcodes=[],this.rules[19].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10]},this.rules[19].opcodes[1]={type:4,index:40},this.rules[19].opcodes[2]={type:4,index:29},this.rules[19].opcodes[3]={type:4,index:53},this.rules[19].opcodes[4]={type:4,index:54},this.rules[19].opcodes[5]={type:4,index:55},this.rules[19].opcodes[6]={type:4,index:61},this.rules[19].opcodes[7]={type:4,index:30},this.rules[19].opcodes[8]={type:4,index:51},this.rules[19].opcodes[9]={type:4,index:52},this.rules[19].opcodes[10]={type:4,index:65},this.rules[20].opcodes=[],this.rules[20].opcodes[0]={type:3,min:1,max:1/0},this.rules[20].opcodes[1]={type:1,children:[2,3,4,5]},this.rules[20].opcodes[2]={type:5,min:33,max:40},this.rules[20].opcodes[3]={type:5,min:42,max:46},this.rules[20].opcodes[4]={type:5,min:48,max:92},this.rules[20].opcodes[5]={type:5,min:94,max:126},this.rules[21].opcodes=[],this.rules[21].opcodes[0]={type:2,children:[1,2,3]},this.rules[21].opcodes[1]={type:4,index:23},this.rules[21].opcodes[2]={type:4,index:14},this.rules[21].opcodes[3]={type:1,children:[4,5]},this.rules[21].opcodes[4]={type:4,index:24},this.rules[21].opcodes[5]={type:4,index:22},this.rules[22].opcodes=[],this.rules[22].opcodes[0]={type:3,min:1,max:1/0},this.rules[22].opcodes[1]={type:1,children:[2,3,4,5]},this.rules[22].opcodes[2]={type:5,min:33,max:40},this.rules[22].opcodes[3]={type:5,min:42,max:46},this.rules[22].opcodes[4]={type:5,min:48,max:92},this.rules[22].opcodes[5]={type:5,min:94,max:126},this.rules[23].opcodes=[],this.rules[23].opcodes[0]={type:2,children:[1,2]},this.rules[23].opcodes[1]={type:6,string:[40]},this.rules[23].opcodes[2]={type:4,index:89},this.rules[24].opcodes=[],this.rules[24].opcodes[0]={type:2,children:[1,2]},this.rules[24].opcodes[1]={type:4,index:89},this.rules[24].opcodes[2]={type:6,string:[41]},this.rules[25].opcodes=[],this.rules[25].opcodes[0]={type:2,children:[1,2,3]},this.rules[25].opcodes[1]={type:4,index:27},this.rules[25].opcodes[2]={type:4,index:14},this.rules[25].opcodes[3]={type:1,children:[4,5]},this.rules[25].opcodes[4]={type:4,index:28},this.rules[25].opcodes[5]={type:4,index:26},this.rules[26].opcodes=[],this.rules[26].opcodes[0]={type:3,min:1,max:1/0},this.rules[26].opcodes[1]={type:1,children:[2,3,4,5]},this.rules[26].opcodes[2]={type:5,min:33,max:40},this.rules[26].opcodes[3]={type:5,min:42,max:46},this.rules[26].opcodes[4]={type:5,min:48,max:92},this.rules[26].opcodes[5]={type:5,min:94,max:126},this.rules[27].opcodes=[],this.rules[27].opcodes[0]={type:2,children:[1,2]},this.rules[27].opcodes[1]={type:6,string:[91]},this.rules[27].opcodes[2]={type:4,index:89},this.rules[28].opcodes=[],this.rules[28].opcodes[0]={type:2,children:[1,2]},this.rules[28].opcodes[1]={type:4,index:89},this.rules[28].opcodes[2]={type:6,string:[93]},this.rules[29].opcodes=[],this.rules[29].opcodes[0]={type:4,index:88},this.rules[30].opcodes=[],this.rules[30].opcodes[0]={type:2,children:[1,2,4]},this.rules[30].opcodes[1]={type:6,string:[92]},this.rules[30].opcodes[2]={type:3,min:0,max:1},this.rules[30].opcodes[3]={type:4,index:31},this.rules[30].opcodes[4]={type:4,index:36},this.rules[31].opcodes=[],this.rules[31].opcodes[0]={type:1,children:[1,7,13,19]},this.rules[31].opcodes[1]={type:2,children:[2,3]},this.rules[31].opcodes[2]={type:4,index:32},this.rules[31].opcodes[3]={type:3,min:0,max:1},this.rules[31].opcodes[4]={type:1,children:[5,6]},this.rules[31].opcodes[5]={type:4,index:34},this.rules[31].opcodes[6]={type:4,index:35},this.rules[31].opcodes[7]={type:2,children:[8,9]},this.rules[31].opcodes[8]={type:4,index:33},this.rules[31].opcodes[9]={type:3,min:0,max:1},this.rules[31].opcodes[10]={type:1,children:[11,12]},this.rules[31].opcodes[11]={type:4,index:34},this.rules[31].opcodes[12]={type:4,index:35},this.rules[31].opcodes[13]={type:2,children:[14,15]},this.rules[31].opcodes[14]={type:4,index:34},this.rules[31].opcodes[15]={type:3,min:0,max:1},this.rules[31].opcodes[16]={type:1,children:[17,18]},this.rules[31].opcodes[17]={type:4,index:32},this.rules[31].opcodes[18]={type:4,index:33},this.rules[31].opcodes[19]={type:2,children:[20,21]},this.rules[31].opcodes[20]={type:4,index:35},this.rules[31].opcodes[21]={type:3,min:0,max:1},this.rules[31].opcodes[22]={type:1,children:[23,24]},this.rules[31].opcodes[23]={type:4,index:32},this.rules[31].opcodes[24]={type:4,index:33},this.rules[32].opcodes=[],this.rules[32].opcodes[0]={type:6,string:[37,115]},this.rules[33].opcodes=[],this.rules[33].opcodes[0]={type:6,string:[37,105]},this.rules[34].opcodes=[],this.rules[34].opcodes[0]={type:6,string:[37,117]},this.rules[35].opcodes=[],this.rules[35].opcodes[0]={type:6,string:[37,112]},this.rules[36].opcodes=[],this.rules[36].opcodes[0]={type:1,children:[1,2,3]},this.rules[36].opcodes[1]={type:4,index:38},this.rules[36].opcodes[2]={type:4,index:39},this.rules[36].opcodes[3]={type:4,index:37},this.rules[37].opcodes=[],this.rules[37].opcodes[0]={type:4,index:88},this.rules[38].opcodes=[],this.rules[38].opcodes[0]={type:2,children:[1,2]},this.rules[38].opcodes[1]={type:6,string:[117,95]},this.rules[38].opcodes[2]={type:4,index:88},this.rules[39].opcodes=[],this.rules[39].opcodes[0]={type:2,children:[1,2]},this.rules[39].opcodes[1]={type:6,string:[101,95]},this.rules[39].opcodes[2]={type:4,index:88},this.rules[40].opcodes=[],this.rules[40].opcodes[0]={type:1,children:[1,2]},this.rules[40].opcodes[1]={type:4,index:42},this.rules[40].opcodes[2]={type:4,index:41},this.rules[41].opcodes=[],this.rules[41].opcodes[0]={type:2,children:[1,2]},this.rules[41].opcodes[1]={type:6,string:[117,95]},this.rules[41].opcodes[2]={type:4,index:88},this.rules[42].opcodes=[],this.rules[42].opcodes[0]={type:2,children:[1,2]},this.rules[42].opcodes[1]={type:6,string:[101,95]},this.rules[42].opcodes[2]={type:4,index:88},this.rules[43].opcodes=[],this.rules[43].opcodes[0]={type:1,children:[1,5,8,11,12]},this.rules[43].opcodes[1]={type:2,children:[2,3,4]},this.rules[43].opcodes[2]={type:4,index:69},this.rules[43].opcodes[3]={type:4,index:46},this.rules[43].opcodes[4]={type:4,index:71},this.rules[43].opcodes[5]={type:2,children:[6,7]},this.rules[43].opcodes[6]={type:4,index:69},this.rules[43].opcodes[7]={type:4,index:46},this.rules[43].opcodes[8]={type:2,children:[9,10]},this.rules[43].opcodes[9]={type:4,index:46},this.rules[43].opcodes[10]={type:4,index:71},this.rules[43].opcodes[11]={type:4,index:46},this.rules[43].opcodes[12]={type:4,index:70},this.rules[44].opcodes=[],this.rules[44].opcodes[0]={type:2,children:[1,2]},this.rules[44].opcodes[1]={type:6,string:[47]},this.rules[44].opcodes[2]={type:4,index:89},this.rules[45].opcodes=[],this.rules[45].opcodes[0]={type:4,index:90},this.rules[46].opcodes=[],this.rules[46].opcodes[0]={type:6,string:[42]},this.rules[47].opcodes=[],this.rules[47].opcodes[0]={type:6,string:[38]},this.rules[48].opcodes=[],this.rules[48].opcodes[0]={type:6,string:[33]},this.rules[49].opcodes=[],this.rules[49].opcodes[0]={type:6,string:[38,38]},this.rules[50].opcodes=[],this.rules[50].opcodes[0]={type:6,string:[33,33]},this.rules[51].opcodes=[],this.rules[51].opcodes[0]={type:6,string:[37,94]},this.rules[52].opcodes=[],this.rules[52].opcodes[0]={type:6,string:[37,36]},this.rules[53].opcodes=[],this.rules[53].opcodes[0]={type:2,children:[1,2]},this.rules[53].opcodes[1]={type:6,string:[37]},this.rules[53].opcodes[2]={type:1,children:[3,8,13]},this.rules[53].opcodes[3]={type:2,children:[4,5,6,7]},this.rules[53].opcodes[4]={type:4,index:76},this.rules[53].opcodes[5]={type:4,index:79},this.rules[53].opcodes[6]={type:6,string:[45]},this.rules[53].opcodes[7]={type:4,index:80},this.rules[53].opcodes[8]={type:2,children:[9,10,11,12]},this.rules[53].opcodes[9]={type:4,index:77},this.rules[53].opcodes[10]={type:4,index:83},this.rules[53].opcodes[11]={type:6,string:[45]},this.rules[53].opcodes[12]={type:4,index:84},this.rules[53].opcodes[13]={type:2,children:[14,15,16,17]},this.rules[53].opcodes[14]={type:4,index:78},this.rules[53].opcodes[15]={type:4,index:81},this.rules[53].opcodes[16]={type:6,string:[45]},this.rules[53].opcodes[17]={type:4,index:82},this.rules[54].opcodes=[],this.rules[54].opcodes[0]={type:2,children:[1,2]},this.rules[54].opcodes[1]={type:6,string:[37]},this.rules[54].opcodes[2]={type:1,children:[3,10,17]},this.rules[54].opcodes[3]={type:2,children:[4,5,6]},this.rules[54].opcodes[4]={type:4,index:76},this.rules[54].opcodes[5]={type:4,index:73},this.rules[54].opcodes[6]={type:3,min:0,max:1/0},this.rules[54].opcodes[7]={type:2,children:[8,9]},this.rules[54].opcodes[8]={type:6,string:[46]},this.rules[54].opcodes[9]={type:4,index:73},this.rules[54].opcodes[10]={type:2,children:[11,12,13]},this.rules[54].opcodes[11]={type:4,index:77},this.rules[54].opcodes[12]={type:4,index:74},this.rules[54].opcodes[13]={type:3,min:0,max:1/0},this.rules[54].opcodes[14]={type:2,children:[15,16]},this.rules[54].opcodes[15]={type:6,string:[46]},this.rules[54].opcodes[16]={type:4,index:74},this.rules[54].opcodes[17]={type:2,children:[18,19,20]},this.rules[54].opcodes[18]={type:4,index:78},this.rules[54].opcodes[19]={type:4,index:75},this.rules[54].opcodes[20]={type:3,min:0,max:1/0},this.rules[54].opcodes[21]={type:2,children:[22,23]},this.rules[54].opcodes[22]={type:6,string:[46]},this.rules[54].opcodes[23]={type:4,index:75},this.rules[55].opcodes=[],this.rules[55].opcodes[0]={type:2,children:[1,2,3,4]},this.rules[55].opcodes[1]={type:4,index:56},this.rules[55].opcodes[2]={type:4,index:57},this.rules[55].opcodes[3]={type:4,index:59},this.rules[55].opcodes[4]={type:4,index:58},this.rules[56].opcodes=[],this.rules[56].opcodes[0]={type:3,min:0,max:1},this.rules[56].opcodes[1]={type:1,children:[2,3]},this.rules[56].opcodes[2]={type:7,string:[37,105]},this.rules[56].opcodes[3]={type:7,string:[37,115]},this.rules[57].opcodes=[],this.rules[57].opcodes[0]={type:6,string:[34]},this.rules[58].opcodes=[],this.rules[58].opcodes[0]={type:6,string:[34]},this.rules[59].opcodes=[],this.rules[59].opcodes[0]={type:3,min:0,max:1/0},this.rules[59].opcodes[1]={type:1,children:[2,3,4]},this.rules[59].opcodes[2]={type:5,min:32,max:33},this.rules[59].opcodes[3]={type:5,min:35,max:126},this.rules[59].opcodes[4]={type:4,index:60},this.rules[60].opcodes=[],this.rules[60].opcodes[0]={type:6,string:[9]},this.rules[61].opcodes=[],this.rules[61].opcodes[0]={type:2,children:[1,2,3]},this.rules[61].opcodes[1]={type:4,index:62},this.rules[61].opcodes[2]={type:4,index:64},this.rules[61].opcodes[3]={type:4,index:63},this.rules[62].opcodes=[],this.rules[62].opcodes[0]={type:6,string:[39]},this.rules[63].opcodes=[],this.rules[63].opcodes[0]={type:6,string:[39]},this.rules[64].opcodes=[],this.rules[64].opcodes[0]={type:3,min:0,max:1/0},this.rules[64].opcodes[1]={type:1,children:[2,3,4]},this.rules[64].opcodes[2]={type:5,min:32,max:38},this.rules[64].opcodes[3]={type:5,min:40,max:126},this.rules[64].opcodes[4]={type:4,index:60},this.rules[65].opcodes=[],this.rules[65].opcodes[0]={type:2,children:[1,2,3]},this.rules[65].opcodes[1]={type:4,index:66},this.rules[65].opcodes[2]={type:4,index:67},this.rules[65].opcodes[3]={type:4,index:68},this.rules[66].opcodes=[],this.rules[66].opcodes[0]={type:6,string:[60]},this.rules[67].opcodes=[],this.rules[67].opcodes[0]={type:3,min:0,max:1/0},this.rules[67].opcodes[1]={type:1,children:[2,3,4]},this.rules[67].opcodes[2]={type:5,min:32,max:61},this.rules[67].opcodes[3]={type:5,min:63,max:126},this.rules[67].opcodes[4]={type:4,index:60},this.rules[68].opcodes=[],this.rules[68].opcodes[0]={type:6,string:[62]},this.rules[69].opcodes=[],this.rules[69].opcodes[0]={type:4,index:72},this.rules[70].opcodes=[],this.rules[70].opcodes[0]={type:4,index:72},this.rules[71].opcodes=[],this.rules[71].opcodes[0]={type:4,index:72},this.rules[72].opcodes=[],this.rules[72].opcodes[0]={type:3,min:1,max:1/0},this.rules[72].opcodes[1]={type:5,min:48,max:57},this.rules[73].opcodes=[],this.rules[73].opcodes[0]={type:4,index:85},this.rules[74].opcodes=[],this.rules[74].opcodes[0]={type:4,index:87},this.rules[75].opcodes=[],this.rules[75].opcodes[0]={type:4,index:86},this.rules[76].opcodes=[],this.rules[76].opcodes[0]={type:1,children:[1,2]},this.rules[76].opcodes[1]={type:6,string:[68]},this.rules[76].opcodes[2]={type:6,string:[100]},this.rules[77].opcodes=[],this.rules[77].opcodes[0]={type:1,children:[1,2]},this.rules[77].opcodes[1]={type:6,string:[88]},this.rules[77].opcodes[2]={type:6,string:[120]},this.rules[78].opcodes=[],this.rules[78].opcodes[0]={type:1,children:[1,2]},this.rules[78].opcodes[1]={type:6,string:[66]},this.rules[78].opcodes[2]={type:6,string:[98]},this.rules[79].opcodes=[],this.rules[79].opcodes[0]={type:4,index:85},this.rules[80].opcodes=[],this.rules[80].opcodes[0]={type:4,index:85},this.rules[81].opcodes=[],this.rules[81].opcodes[0]={type:4,index:86},this.rules[82].opcodes=[],this.rules[82].opcodes[0]={type:4,index:86},this.rules[83].opcodes=[],this.rules[83].opcodes[0]={type:4,index:87},this.rules[84].opcodes=[],this.rules[84].opcodes[0]={type:4,index:87},this.rules[85].opcodes=[],this.rules[85].opcodes[0]={type:3,min:1,max:1/0},this.rules[85].opcodes[1]={type:5,min:48,max:57},this.rules[86].opcodes=[],this.rules[86].opcodes[0]={type:3,min:1,max:1/0},this.rules[86].opcodes[1]={type:5,min:48,max:49},this.rules[87].opcodes=[],this.rules[87].opcodes[0]={type:3,min:1,max:1/0},this.rules[87].opcodes[1]={type:1,children:[2,3,4]},this.rules[87].opcodes[2]={type:5,min:48,max:57},this.rules[87].opcodes[3]={type:5,min:65,max:70},this.rules[87].opcodes[4]={type:5,min:97,max:102},this.rules[88].opcodes=[],this.rules[88].opcodes[0]={type:2,children:[1,4]},this.rules[88].opcodes[1]={type:1,children:[2,3]},this.rules[88].opcodes[2]={type:5,min:97,max:122},this.rules[88].opcodes[3]={type:5,min:65,max:90},this.rules[88].opcodes[4]={type:3,min:0,max:1/0},this.rules[88].opcodes[5]={type:1,children:[6,7,8,9]},this.rules[88].opcodes[6]={type:5,min:97,max:122},this.rules[88].opcodes[7]={type:5,min:65,max:90},this.rules[88].opcodes[8]={type:5,min:48,max:57},this.rules[88].opcodes[9]={type:6,string:[45]},this.rules[89].opcodes=[],this.rules[89].opcodes[0]={type:3,min:0,max:1/0},this.rules[89].opcodes[1]={type:4,index:91},this.rules[90].opcodes=[],this.rules[90].opcodes[0]={type:3,min:1,max:1/0},this.rules[90].opcodes[1]={type:4,index:91},this.rules[91].opcodes=[],this.rules[91].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[91].opcodes[1]={type:6,string:[32]},this.rules[91].opcodes[2]={type:6,string:[9]},this.rules[91].opcodes[3]={type:4,index:92},this.rules[91].opcodes[4]={type:4,index:94},this.rules[92].opcodes=[],this.rules[92].opcodes[0]={type:2,children:[1,2]},this.rules[92].opcodes[1]={type:6,string:[59]},this.rules[92].opcodes[2]={type:3,min:0,max:1/0},this.rules[92].opcodes[3]={type:1,children:[4,5]},this.rules[92].opcodes[4]={type:5,min:32,max:126},this.rules[92].opcodes[5]={type:6,string:[9]},this.rules[93].opcodes=[],this.rules[93].opcodes[0]={type:1,children:[1,2,3]},this.rules[93].opcodes[1]={type:6,string:[13,10]},this.rules[93].opcodes[2]={type:6,string:[10]},this.rules[93].opcodes[3]={type:6,string:[13]},this.rules[94].opcodes=[],this.rules[94].opcodes[0]={type:2,children:[1,5]},this.rules[94].opcodes[1]={type:1,children:[2,3,4]},this.rules[94].opcodes[2]={type:6,string:[13,10]},this.rules[94].opcodes[3]={type:6,string:[10]},this.rules[94].opcodes[4]={type:6,string:[13]},this.rules[94].opcodes[5]={type:1,children:[6,7]},this.rules[94].opcodes[6]={type:6,string:[32]},this.rules[94].opcodes[7]={type:6,string:[9]},this.toString=o(function(){let r="";return r+=`;
|
366
|
-
`,r+=`; ABNF for JavaScript APG 2.0 SABNF
|
367
|
-
`,r+=`; RFC 5234 with some restrictions and additions.
|
368
|
-
`,r+=`; Updated 11/24/2015 for RFC 7405 case-sensitive literal string notation
|
369
|
-
`,r+=`; - accepts %s"string" as a case-sensitive string
|
370
|
-
`,r+=`; - accepts %i"string" as a case-insensitive string
|
371
|
-
`,r+=`; - accepts "string" as a case-insensitive string
|
372
|
-
`,r+=`;
|
373
|
-
`,r+=`; Some restrictions:
|
374
|
-
`,r+=`; 1. Rules must begin at first character of each line.
|
375
|
-
`,r+=`; Indentations on first rule and rules thereafter are not allowed.
|
376
|
-
`,r+=`; 2. Relaxed line endings. CRLF, LF or CR are accepted as valid line ending.
|
377
|
-
`,r+=`; 3. Prose values, i.e. <prose value>, are accepted as valid grammar syntax.
|
378
|
-
`,r+=`; However, a working parser cannot be generated from them.
|
379
|
-
`,r+=`;
|
380
|
-
`,r+=`; Super set (SABNF) additions:
|
381
|
-
`,r+=`; 1. Look-ahead (syntactic predicate) operators are accepted as element prefixes.
|
382
|
-
`,r+=`; & is the positive look-ahead operator, succeeds and backtracks if the look-ahead phrase is found
|
383
|
-
`,r+=`; ! is the negative look-ahead operator, succeeds and backtracks if the look-ahead phrase is NOT found
|
384
|
-
`,r+=`; e.g. &%d13 or &rule or !(A / B)
|
385
|
-
`,r+=`; 2. User-Defined Terminals (UDT) of the form, u_name and e_name are accepted.
|
386
|
-
`,r+=`; 'name' is alpha followed by alpha/num/hyphen just like a rule name.
|
387
|
-
`,r+=`; u_name may be used as an element but no rule definition is given.
|
388
|
-
`,r+=`; e.g. rule = A / u_myUdt
|
389
|
-
`,r+=`; A = "a"
|
390
|
-
`,r+=`; would be a valid grammar.
|
391
|
-
`,r+=`; 3. Case-sensitive, single-quoted strings are accepted.
|
392
|
-
`,r+=`; e.g. 'abc' would be equivalent to %d97.98.99
|
393
|
-
`,r+=`; (kept for backward compatibility, but superseded by %s"abc")
|
394
|
-
`,r+=`; New 12/26/2015
|
395
|
-
`,r+=`; 4. Look-behind operators are accepted as element prefixes.
|
396
|
-
`,r+=`; && is the positive look-behind operator, succeeds and backtracks if the look-behind phrase is found
|
397
|
-
`,r+=`; !! is the negative look-behind operator, succeeds and backtracks if the look-behind phrase is NOT found
|
398
|
-
`,r+=`; e.g. &&%d13 or &&rule or !!(A / B)
|
399
|
-
`,r+=`; 5. Back reference operators, i.e. \\rulename, are accepted.
|
400
|
-
`,r+=`; A back reference operator acts like a TLS or TBS terminal except that the phrase it attempts
|
401
|
-
`,r+=`; to match is a phrase previously matched by the rule 'rulename'.
|
402
|
-
`,r+=`; There are two modes of previous phrase matching - the parent-frame mode and the universal mode.
|
403
|
-
`,r+=`; In universal mode, \\rulename matches the last match to 'rulename' regardless of where it was found.
|
404
|
-
`,r+=`; In parent-frame mode, \\rulename matches only the last match found on the parent's frame or parse tree level.
|
405
|
-
`,r+=`; Back reference modifiers can be used to specify case and mode.
|
406
|
-
`,r+=`; \\A defaults to case-insensitive and universal mode, e.g. \\A === \\%i%uA
|
407
|
-
`,r+=`; Modifiers %i and %s determine case-insensitive and case-sensitive mode, respectively.
|
408
|
-
`,r+=`; Modifiers %u and %p determine universal mode and parent frame mode, respectively.
|
409
|
-
`,r+=`; Case and mode modifiers can appear in any order, e.g. \\%s%pA === \\%p%sA.
|
410
|
-
`,r+=`; 7. String begin anchor, ABG(%^) matches the beginning of the input string location.
|
411
|
-
`,r+=`; Returns EMPTY or NOMATCH. Never consumes any characters.
|
412
|
-
`,r+=`; 8. String end anchor, AEN(%$) matches the end of the input string location.
|
413
|
-
`,r+=`; Returns EMPTY or NOMATCH. Never consumes any characters.
|
414
|
-
`,r+=`;
|
415
|
-
`,r+=`File = *(BlankLine / Rule / RuleError)
|
416
|
-
`,r+=`BlankLine = *(%d32/%d9) [comment] LineEnd
|
417
|
-
`,r+=`Rule = RuleLookup owsp Alternation ((owsp LineEnd)
|
418
|
-
`,r+=` / (LineEndError LineEnd))
|
419
|
-
`,r+=`RuleLookup = RuleNameTest owsp DefinedAsTest
|
420
|
-
`,r+=`RuleNameTest = RuleName/RuleNameError
|
421
|
-
`,r+=`RuleName = alphanum
|
422
|
-
`,r+=`RuleNameError = 1*(%d33-60/%d62-126)
|
423
|
-
`,r+=`DefinedAsTest = DefinedAs / DefinedAsError
|
424
|
-
`,r+=`DefinedAsError = 1*2%d33-126
|
425
|
-
`,r+=`DefinedAs = IncAlt / Defined
|
426
|
-
`,r+=`Defined = %d61
|
427
|
-
`,r+=`IncAlt = %d61.47
|
428
|
-
`,r+=`RuleError = 1*(%d32-126 / %d9 / LineContinue) LineEnd
|
429
|
-
`,r+=`LineEndError = 1*(%d32-126 / %d9 / LineContinue)
|
430
|
-
`,r+=`Alternation = Concatenation *(owsp AltOp Concatenation)
|
431
|
-
`,r+=`Concatenation = Repetition *(CatOp Repetition)
|
432
|
-
`,r+=`Repetition = [Modifier] (Group / Option / BasicElement / BasicElementErr)
|
433
|
-
`,r+=`Modifier = (Predicate [RepOp])
|
434
|
-
`,r+=` / RepOp
|
435
|
-
`,r+=`Predicate = BkaOp
|
436
|
-
`,r+=` / BknOp
|
437
|
-
`,r+=` / AndOp
|
438
|
-
`,r+=` / NotOp
|
439
|
-
`,r+=`BasicElement = UdtOp
|
440
|
-
`,r+=` / RnmOp
|
441
|
-
`,r+=` / TrgOp
|
442
|
-
`,r+=` / TbsOp
|
443
|
-
`,r+=` / TlsOp
|
444
|
-
`,r+=` / ClsOp
|
445
|
-
`,r+=` / BkrOp
|
446
|
-
`,r+=` / AbgOp
|
447
|
-
`,r+=` / AenOp
|
448
|
-
`,r+=` / ProsVal
|
449
|
-
`,r+=`BasicElementErr = 1*(%d33-40/%d42-46/%d48-92/%d94-126)
|
450
|
-
`,r+=`Group = GroupOpen Alternation (GroupClose / GroupError)
|
451
|
-
`,r+=`GroupError = 1*(%d33-40/%d42-46/%d48-92/%d94-126) ; same as BasicElementErr
|
452
|
-
`,r+=`GroupOpen = %d40 owsp
|
453
|
-
`,r+=`GroupClose = owsp %d41
|
454
|
-
`,r+=`Option = OptionOpen Alternation (OptionClose / OptionError)
|
455
|
-
`,r+=`OptionError = 1*(%d33-40/%d42-46/%d48-92/%d94-126) ; same as BasicElementErr
|
456
|
-
`,r+=`OptionOpen = %d91 owsp
|
457
|
-
`,r+=`OptionClose = owsp %d93
|
458
|
-
`,r+=`RnmOp = alphanum
|
459
|
-
`,r+=`BkrOp = %d92 [bkrModifier] bkr-name
|
460
|
-
`,r+=`bkrModifier = (cs [um / pm]) / (ci [um / pm]) / (um [cs /ci]) / (pm [cs / ci])
|
461
|
-
`,r+=`cs = '%s'
|
462
|
-
`,r+=`ci = '%i'
|
463
|
-
`,r+=`um = '%u'
|
464
|
-
`,r+=`pm = '%p'
|
465
|
-
`,r+=`bkr-name = uname / ename / rname
|
466
|
-
`,r+=`rname = alphanum
|
467
|
-
`,r+=`uname = %d117.95 alphanum
|
468
|
-
`,r+=`ename = %d101.95 alphanum
|
469
|
-
`,r+=`UdtOp = udt-empty
|
470
|
-
`,r+=` / udt-non-empty
|
471
|
-
`,r+=`udt-non-empty = %d117.95 alphanum
|
472
|
-
`,r+=`udt-empty = %d101.95 alphanum
|
473
|
-
`,r+=`RepOp = (rep-min StarOp rep-max)
|
474
|
-
`,r+=` / (rep-min StarOp)
|
475
|
-
`,r+=` / (StarOp rep-max)
|
476
|
-
`,r+=` / StarOp
|
477
|
-
`,r+=` / rep-min-max
|
478
|
-
`,r+=`AltOp = %d47 owsp
|
479
|
-
`,r+=`CatOp = wsp
|
480
|
-
`,r+=`StarOp = %d42
|
481
|
-
`,r+=`AndOp = %d38
|
482
|
-
`,r+=`NotOp = %d33
|
483
|
-
`,r+=`BkaOp = %d38.38
|
484
|
-
`,r+=`BknOp = %d33.33
|
485
|
-
`,r+=`AbgOp = %d37.94
|
486
|
-
`,r+=`AenOp = %d37.36
|
487
|
-
`,r+=`TrgOp = %d37 ((Dec dmin %d45 dmax) / (Hex xmin %d45 xmax) / (Bin bmin %d45 bmax))
|
488
|
-
`,r+=`TbsOp = %d37 ((Dec dString *(%d46 dString)) / (Hex xString *(%d46 xString)) / (Bin bString *(%d46 bString)))
|
489
|
-
`,r+=`TlsOp = TlsCase TlsOpen TlsString TlsClose
|
490
|
-
`,r+=`TlsCase = ["%i" / "%s"]
|
491
|
-
`,r+=`TlsOpen = %d34
|
492
|
-
`,r+=`TlsClose = %d34
|
493
|
-
`,r+=`TlsString = *(%d32-33/%d35-126/StringTab)
|
494
|
-
`,r+=`StringTab = %d9
|
495
|
-
`,r+=`ClsOp = ClsOpen ClsString ClsClose
|
496
|
-
`,r+=`ClsOpen = %d39
|
497
|
-
`,r+=`ClsClose = %d39
|
498
|
-
`,r+=`ClsString = *(%d32-38/%d40-126/StringTab)
|
499
|
-
`,r+=`ProsVal = ProsValOpen ProsValString ProsValClose
|
500
|
-
`,r+=`ProsValOpen = %d60
|
501
|
-
`,r+=`ProsValString = *(%d32-61/%d63-126/StringTab)
|
502
|
-
`,r+=`ProsValClose = %d62
|
503
|
-
`,r+=`rep-min = rep-num
|
504
|
-
`,r+=`rep-min-max = rep-num
|
505
|
-
`,r+=`rep-max = rep-num
|
506
|
-
`,r+=`rep-num = 1*(%d48-57)
|
507
|
-
`,r+=`dString = dnum
|
508
|
-
`,r+=`xString = xnum
|
509
|
-
`,r+=`bString = bnum
|
510
|
-
`,r+=`Dec = (%d68/%d100)
|
511
|
-
`,r+=`Hex = (%d88/%d120)
|
512
|
-
`,r+=`Bin = (%d66/%d98)
|
513
|
-
`,r+=`dmin = dnum
|
514
|
-
`,r+=`dmax = dnum
|
515
|
-
`,r+=`bmin = bnum
|
516
|
-
`,r+=`bmax = bnum
|
517
|
-
`,r+=`xmin = xnum
|
518
|
-
`,r+=`xmax = xnum
|
519
|
-
`,r+=`dnum = 1*(%d48-57)
|
520
|
-
`,r+=`bnum = 1*%d48-49
|
521
|
-
`,r+=`xnum = 1*(%d48-57 / %d65-70 / %d97-102)
|
522
|
-
`,r+=`;
|
523
|
-
`,r+=`; Basics
|
524
|
-
`,r+=`alphanum = (%d97-122/%d65-90) *(%d97-122/%d65-90/%d48-57/%d45)
|
525
|
-
`,r+=`owsp = *space
|
526
|
-
`,r+=`wsp = 1*space
|
527
|
-
`,r+=`space = %d32
|
528
|
-
`,r+=` / %d9
|
529
|
-
`,r+=` / comment
|
530
|
-
`,r+=` / LineContinue
|
531
|
-
`,r+=`comment = %d59 *(%d32-126 / %d9)
|
532
|
-
`,r+=`LineEnd = %d13.10
|
533
|
-
`,r+=` / %d10
|
534
|
-
`,r+=` / %d13
|
535
|
-
`,r+=`LineContinue = (%d13.10 / %d10 / %d13) (%d32 / %d9)
|
536
|
-
`,r},"toString")},"grammar")});var SB=Q((Pwe,DB)=>{DB.exports=o(function(){let e="parser: ",r=Vf(),n=r.ids,i=new(_B()),s=new(AB()),a=new(IB()),f=new r.parser;f.ast=new r.ast,f.callbacks=i.callbacks,f.ast.callbacks=s.callbacks;let d=o(function(I,T,D){if(T<0||T>=D)return-1;for(let R=0;R<I.length;R+=1)if(T>=I[R].beginChar&&T<I[R].beginChar+I[R].length)return R;return-1},"findLine"),h=o(function(I,T){let D=-1;if(T<I.length){for(let R=T;R<I.length;R+=1)if(I[R]!==null){D=I[R];break}}return D},"translateIndex"),p=o(function(I){I.forEach(T=>{let D=[],R=[],H=0;T.opcodes.forEach(F=>{F.type===n.ALT&&F.children.length===1||F.type===n.CAT&&F.children.length===1||F.type===n.REP&&F.min===1&&F.max===1?R.push(null):(R.push(H),D.push(F),H+=1)}),R.push(H),D.forEach(F=>{if(F.type===n.ALT||F.type===n.CAT)for(let V=0;V<F.children.length;V+=1)F.children[V]=h(R,F.children[V])}),T.opcodes=D})},"reduceOpcodes");this.syntax=o(function(I,T,D,R,H){if(H){if(H.traceObject!=="traceObject")throw new TypeError(`${e}trace argument is not a trace object`);f.trace=H}let F={};F.errors=D,F.strict=!!R,F.lines=T,F.findLine=d,F.charsLength=I.length,F.ruleCount=0,f.parse(a,"file",I,F).success||D.push({line:0,char:0,msg:"syntax analysis of input grammar failed"})},"syntax"),this.semantic=o(function(I,T,D){let R={};return R.errors=D,R.lines=T,R.findLine=d,R.charsLength=I.length,f.ast.translate(R),D.length?null:(p(R.rules),{rules:R.rules,udts:R.udts,lineMap:R.rulesLineMap})},"semantic"),this.generateSource=o(function(I,T,D,R,H){let F="",V,X,J,re=0,z=1/0,$=0,G=[],le=[],P=0,g=0,_=0,v=0,l=0,b=0,E=0,C=0,A=0,x=0,k=0,O=0,w=0,M=0,he=0;D.forEach(ae=>{G.push(ae.lower),re+=ae.opcodes.length,ae.opcodes.forEach(q=>{switch(q.type){case n.ALT:P+=1;break;case n.CAT:g+=1;break;case n.RNM:_+=1;break;case n.UDT:v+=1;break;case n.REP:l+=1;break;case n.AND:b+=1;break;case n.NOT:E+=1;break;case n.BKA:O+=1;break;case n.BKN:w+=1;break;case n.BKR:k+=1;break;case n.ABG:M+=1;break;case n.AEN:he+=1;break;case n.TLS:for(C+=1,V=0;V<q.string.length;V+=1)q.string[V]<z&&(z=q.string[V]),q.string[V]>$&&($=q.string[V]);break;case n.TBS:for(A+=1,V=0;V<q.string.length;V+=1)q.string[V]<z&&(z=q.string[V]),q.string[V]>$&&($=q.string[V]);break;case n.TRG:x+=1,q.min<z&&(z=q.min),q.max>$&&($=q.max);break;default:throw new Error("generateSource: unrecognized opcode")}})}),G.sort(),R.length>0&&(R.forEach(ae=>{le.push(ae.lower)}),le.sort());let B="module.exports";H&&typeof H=="string"&&(B=`let ${H}`),F+=`// copyright: Copyright (c) 2021 Lowell D. Thomas, all rights reserved<br>
|
537
|
-
`,F+=`// license: BSD-2-Clause (https://opensource.org/licenses/BSD-2-Clause)<br>
|
538
|
-
`,F+=`//
|
539
|
-
`,F+=`// Generated by apg-js, Version 4.0.0 [apg-js](https://github.com/ldthomas/apg-js)
|
540
|
-
`,F+=`${B} = function grammar(){
|
541
|
-
`,F+=" // ```\n",F+=` // SUMMARY
|
542
|
-
`,F+=` // rules = ${D.length}
|
543
|
-
`,F+=` // udts = ${R.length}
|
544
|
-
`,F+=` // opcodes = ${re}
|
545
|
-
`,F+=` // --- ABNF original opcodes
|
546
|
-
`,F+=` // ALT = ${P}
|
547
|
-
`,F+=` // CAT = ${g}
|
548
|
-
`,F+=` // REP = ${l}
|
549
|
-
`,F+=` // RNM = ${_}
|
550
|
-
`,F+=` // TLS = ${C}
|
551
|
-
`,F+=` // TBS = ${A}
|
552
|
-
`,F+=` // TRG = ${x}
|
553
|
-
`,F+=` // --- SABNF superset opcodes
|
554
|
-
`,F+=` // UDT = ${v}
|
555
|
-
`,F+=` // AND = ${b}
|
556
|
-
`,F+=` // NOT = ${E}
|
557
|
-
`,F+=` // BKA = ${O}
|
558
|
-
`,F+=` // BKN = ${w}
|
559
|
-
`,F+=` // BKR = ${k}
|
560
|
-
`,F+=` // ABG = ${M}
|
561
|
-
`,F+=` // AEN = ${he}
|
562
|
-
`,F+=" // characters = [",C+A+x===0?F+=" none defined ]":F+=`${z} - ${$}]`,v>0&&(F+=" + user defined"),F+=`
|
563
|
-
`,F+=" // ```\n",F+=` /* OBJECT IDENTIFIER (for internal parser use) */
|
564
|
-
`,F+=` this.grammarObject = 'grammarObject';
|
565
|
-
`,F+=`
|
566
|
-
`,F+=` /* RULES */
|
567
|
-
`,F+=` this.rules = [];
|
568
|
-
`,D.forEach((ae,q)=>{let U=" this.rules[";U+=q,U+="] = {name: '",U+=ae.name,U+="', lower: '",U+=ae.lower,U+="', index: ",U+=ae.index,U+=", isBkr: ",U+=ae.isBkr,U+=`};
|
569
|
-
`,F+=U}),F+=`
|
570
|
-
`,F+=` /* UDTS */
|
571
|
-
`,F+=` this.udts = [];
|
572
|
-
`,R.length>0&&R.forEach((ae,q)=>{let U=" this.udts[";U+=q,U+="] = {name: '",U+=ae.name,U+="', lower: '",U+=ae.lower,U+="', index: ",U+=ae.index,U+=", empty: ",U+=ae.empty,U+=", isBkr: ",U+=ae.isBkr,U+=`};
|
573
|
-
`,F+=U}),F+=`
|
574
|
-
`,F+=` /* OPCODES */
|
575
|
-
`,D.forEach((ae,q)=>{q>0&&(F+=`
|
576
|
-
`),F+=` /* ${ae.name} */
|
577
|
-
`,F+=` this.rules[${q}].opcodes = [];
|
578
|
-
`,ae.opcodes.forEach((U,te)=>{let oe;switch(U.type){case n.ALT:F+=` this.rules[${q}].opcodes[${te}] = {type: ${U.type}, children: [${U.children.toString()}]};// ALT
|
579
|
-
`;break;case n.CAT:F+=` this.rules[${q}].opcodes[${te}] = {type: ${U.type}, children: [${U.children.toString()}]};// CAT
|
580
|
-
`;break;case n.RNM:F+=` this.rules[${q}].opcodes[${te}] = {type: ${U.type}, index: ${U.index}};// RNM(${D[U.index].name})
|
581
|
-
`;break;case n.BKR:U.index>=D.length?(X=R[U.index-D.length].name,J=R[U.index-D.length].lower):(X=D[U.index].name,J=D[U.index].lower),oe="%i",U.bkrCase===n.BKR_MODE_CS&&(oe="%s"),U.bkrMode===n.BKR_MODE_UM?oe+="%u":oe+="%p",X=oe+X,F+=` this.rules[${q}].opcodes[${te}] = {type: ${U.type}, index: ${U.index}, lower: '${J}', bkrCase: ${U.bkrCase}, bkrMode: ${U.bkrMode}};// BKR(\\${X})
|
582
|
-
`;break;case n.UDT:F+=` this.rules[${q}].opcodes[${te}] = {type: ${U.type}, empty: ${U.empty}, index: ${U.index}};// UDT(${R[U.index].name})
|
583
|
-
`;break;case n.REP:F+=` this.rules[${q}].opcodes[${te}] = {type: ${U.type}, min: ${U.min}, max: ${U.max}};// REP
|
584
|
-
`;break;case n.AND:F+=` this.rules[${q}].opcodes[${te}] = {type: ${U.type}};// AND
|
585
|
-
`;break;case n.NOT:F+=` this.rules[${q}].opcodes[${te}] = {type: ${U.type}};// NOT
|
586
|
-
`;break;case n.ABG:F+=` this.rules[${q}].opcodes[${te}] = {type: ${U.type}};// ABG(%^)
|
587
|
-
`;break;case n.AEN:F+=` this.rules[${q}].opcodes[${te}] = {type: ${U.type}};// AEN(%$)
|
588
|
-
`;break;case n.BKA:F+=` this.rules[${q}].opcodes[${te}] = {type: ${U.type}};// BKA
|
589
|
-
`;break;case n.BKN:F+=` this.rules[${q}].opcodes[${te}] = {type: ${U.type}};// BKN
|
590
|
-
`;break;case n.TLS:F+=` this.rules[${q}].opcodes[${te}] = {type: ${U.type}, string: [${U.string.toString()}]};// TLS
|
591
|
-
`;break;case n.TBS:F+=` this.rules[${q}].opcodes[${te}] = {type: ${U.type}, string: [${U.string.toString()}]};// TBS
|
592
|
-
`;break;case n.TRG:F+=` this.rules[${q}].opcodes[${te}] = {type: ${U.type}, min: ${U.min}, max: ${U.max}};// TRG
|
593
|
-
`;break;default:throw new Error("parser.js: ~143: unrecognized opcode")}})}),F+=`
|
594
|
-
`,F+=" // The `toString()` function will display the original grammar file(s) that produced these opcodes.\n",F+=` this.toString = function toString(){
|
595
|
-
`,F+=` let str = "";
|
596
|
-
`;let ee;return T.forEach(ae=>{let q=ae.beginChar+ae.length;ee="",F+=' str += "';for(let U=ae.beginChar;U<q;U+=1){switch(I[U]){case 9:ee=" ";break;case 10:ee="\\n";break;case 13:ee="\\r";break;case 34:ee='\\"';break;case 92:ee="\\\\";break;default:ee=String.fromCharCode(I[U]);break}F+=ee}F+=`";
|
597
|
-
`}),F+=` return str;
|
598
|
-
`,F+=` }
|
599
|
-
`,F+=`}
|
600
|
-
`,F},"generateSource"),this.generateObject=o(function(I,T,D){let R={},H=[],F=[],V=I.slice(0);return R.grammarObject="grammarObject",T.forEach(X=>{H.push(X.lower)}),H.sort(),D.length>0&&(D.forEach(X=>{F.push(X.lower)}),F.sort()),R.callbacks=[],H.forEach(X=>{R.callbacks[X]=!1}),D.length>0&&F.forEach(X=>{R.callbacks[X]=!1}),R.rules=T,R.udts=D,R.toString=o(function(){return V},"toStringFunc"),R},"generateObject")},"exportParser")});var kB=Q((Owe,TB)=>{TB.exports=o(function(){let e=Oo(),r="rule-attributes.js",n=null;function i(P){return P.left||P.nested||P.right||P.cyclic?!1:P.empty}o(i,"isEmptyOnly");function s(P){return!!(P.left||P.nested||P.right||P.cyclic)}o(s,"isRecursive");function a(P,g){let _=0,v=0,l=0;for(_=0;_<g;_+=1)if(P[_].nested)return!0;for(_=0;_<g;_+=1)if(P[_].right&&!P[_].leaf){for(v=_+1;v<g;v+=1)if(!i(P[v]))return!0}for(_=g-1;_>=0;_-=1)if(P[_].left&&!P[_].leaf){for(v=_-1;v>=0;v-=1)if(!i(P[v]))return!0}for(_=0;_<g;_+=1)if(!P[_].empty&&!s(P[_])){for(v=_+1;v<g;v+=1)if(s(P[v])){for(l=v+1;l<g;l+=1)if(!P[l].empty&&!s(P[l]))return!0}}return!1}o(a,"isCatNested");function f(P,g){for(let _=0;_<g;_+=1)if(!P[_].cyclic)return!1;return!0}o(f,"isCatCyclic");function d(P,g){for(let _=0;_<g;_+=1){if(P[_].left)return!0;if(!P[_].empty)return!1}return!1}o(d,"isCatLeft");function h(P,g){for(let _=g-1;_>=0;_-=1){if(P[_].right)return!0;if(!P[_].empty)return!1}return!1}o(h,"isCatRight");function p(P,g){for(let _=0;_<g;_+=1)if(!P[_].empty)return!1;return!0}o(p,"isCatEmpty");function y(P,g){for(let _=0;_<g;_+=1)if(!P[_].finite)return!1;return!0}o(y,"isCatFinite");function I(P,g,_,v){let l=0,b=g[_],E=b.children.length,C=[];for(l=0;l<E;l+=1)C.push(P.attrGen());for(l=0;l<E;l+=1)R(P,g,b.children[l],C[l]);v.left=d(C,E),v.right=h(C,E),v.nested=a(C,E),v.empty=p(C,E),v.finite=y(C,E),v.cyclic=f(C,E)}o(I,"cat");function T(P,g,_,v){let l=0,b=g[_],E=b.children.length,C=[];for(l=0;l<E;l+=1)C.push(P.attrGen());for(l=0;l<E;l+=1)R(P,g,b.children[l],C[l]);for(v.left=!1,v.right=!1,v.nested=!1,v.empty=!1,v.finite=!1,v.cyclic=!1,l=0;l<E;l+=1)C[l].left&&(v.left=!0),C[l].nested&&(v.nested=!0),C[l].right&&(v.right=!0),C[l].empty&&(v.empty=!0),C[l].finite&&(v.finite=!0),C[l].cyclic&&(v.cyclic=!0)}o(T,"alt");function D(P,g,_,v){let l=g[_];l.index>=P.ruleCount?(v.empty=P.udts[l.index-P.ruleCount].empty,v.finite=!0):(H(P,l.index,v),v.left=!1,v.nested=!1,v.right=!1,v.cyclic=!1)}o(D,"bkr");function R(P,g,_,v){P.attrInit(v);let l=g[_];switch(l.type){case e.ALT:T(P,g,_,v);break;case e.CAT:I(P,g,_,v);break;case e.REP:R(P,g,_+1,v),l.min===0&&(v.empty=!0,v.finite=!0);break;case e.RNM:H(P,g[_].index,v);break;case e.BKR:D(P,g,_,v);break;case e.AND:case e.NOT:case e.BKA:case e.BKN:R(P,g,_+1,v),v.empty=!0;break;case e.TLS:v.empty=!g[_].string.length,v.finite=!0,v.cyclic=!1;break;case e.TBS:case e.TRG:v.empty=!1,v.finite=!0,v.cyclic=!1;break;case e.UDT:v.empty=l.empty,v.finite=!0,v.cyclic=!1;break;case e.ABG:case e.AEN:v.empty=!0,v.finite=!0,v.cyclic=!1;break;default:throw new Error(`unknown opcode type: ${l}`)}}o(R,"opEval");function H(P,g,_){let v=P.attrsWorking[g];v.isComplete?P.attrCopy(_,v):v.isOpen?g===P.startRule?g===P.startRule&&(_.left=!0,_.right=!0,_.cyclic=!0,_.leaf=!0):_.finite=!0:(v.isOpen=!0,R(P,v.rule.opcodes,0,_),v.left=_.left,v.right=_.right,v.nested=_.nested,v.empty=_.empty,v.finite=_.finite,v.cyclic=_.cyclic,v.leaf=!1,v.isOpen=!1,v.isComplete=!0)}o(H,"ruleAttrsEval");let F=o(P=>{n=P;let g=0,_=0,v=n.attrGen();for(g=0;g<n.ruleCount;g+=1){for(_=0;_<n.ruleCount;_+=1)n.attrInit(n.attrsWorking[_]);n.startRule=g,H(n,g,v),n.attrCopy(n.attrs[g],n.attrsWorking[g])}n.attributesComplete=!0;let l=null;for(g=0;g<n.ruleCount;g+=1)if(l=n.attrs[g],l.left||!l.finite||l.cyclic){let b=n.attrGen(l.rule);n.attrCopy(b,l),n.attrsErrors.push(b),n.attrsErrorCount+=1}},"ruleAttributes"),V=o(P=>P?"t":"f","truth"),X=o(P=>P?"e":"f","tError"),J=o(P=>P?"t":"e","fError"),re=o((P,g,_,v)=>{let l=`${P}:${g}:`;return l+=`${X(_.left)} `,l+=`${V(_.nested)} `,l+=`${V(_.right)} `,l+=`${X(_.cyclic)} `,l+=`${J(_.finite)} `,l+=`${V(_.empty)}:`,l+=`${n.typeToString(v.recursiveType)}:`,l+=v.recursiveType===e.ATTR_MR?v.groupNumber:"-",l+=`:${_.rule.name}
|
601
|
-
`,l},"showAttr"),z=o(()=>{let P=`LEGEND - t=true, f=false, e=error
|
602
|
-
`;return P+=`sequence:rule index:left nested right cyclic finite empty:type:group number:rule name
|
603
|
-
`,P},"showLegend"),$=o(()=>{let P=null,g=null,_="";if(_+=`RULE ATTRIBUTES WITH ERRORS
|
604
|
-
`,_+=z(),n.attrsErrorCount)for(let v=0;v<n.attrsErrorCount;v+=1)P=n.attrsErrors[v],g=n.ruleDeps[P.rule.index],_+=re(v,P.rule.index,P,g);else _+=`<none>
|
605
|
-
`;return _},"showAttributeErrors"),G=o(P=>{let g=0,_=0,v=null,l=null,b="",{ruleIndexes:E}=n;for(P===97?E=n.ruleAlphaIndexes:P===116&&(E=n.ruleTypeIndexes),g=0;g<n.ruleCount;g+=1)_=E[g],v=n.attrs[_],l=n.ruleDeps[_],b+=re(g,_,v,l);return b},"show");return{ruleAttributes:F,showAttributes:o((P="index")=>{if(!n.attributesComplete)throw new Error(`${r}:showAttributes: attributes not available`);let g="",_=`RULE ATTRIBUTES
|
606
|
-
`;return P.charCodeAt(0)===97?(g+=`alphabetical by rule name
|
607
|
-
`,g+=_,g+=z(),g+=G(97)):P.charCodeAt(0)===116?(g+=`ordered by rule type
|
608
|
-
`,g+=_,g+=z(),g+=G(116)):(g+=`ordered by rule index
|
609
|
-
`,g+=_,g+=z(),g+=G()),g},"showAttributes"),showAttributeErrors:$}},"exportRuleAttributes")()});var RB=Q((Nwe,MB)=>{MB.exports=(()=>{let t=Oo(),e=null,r=o((a,f,d,h)=>{let p=0,y=0,I=f[d];h[d]=!0;let T=I.rule.opcodes;for(p=0;p<T.length;p+=1){let D=T[p];if(D.type===t.RNM)for(I.refersTo[D.index]=!0,h[D.index]||r(a,f,D.index,h),y=0;y<a;y+=1)f[D.index].refersTo[y]&&(I.refersTo[y]=!0);else D.type===t.UDT?I.refersToUdt[D.index]=!0:D.type===t.BKR&&(D.index<a?(I.refersTo[D.index]=!0,h[D.index]||r(a,f,D.index,h)):I.refersToUdt[a-D.index]=!0)}},"scan"),n=o(a=>{e=a;let f=0,d=0,h=0,p=null,y=null,I=!1;e.dependenciesComplete=!1;let T=e.falseArray(e.ruleCount);for(f=0;f<e.ruleCount;f+=1)e.falsifyArray(T),r(e.ruleCount,e.ruleDeps,f,T);for(f=0;f<e.ruleCount;f+=1)for(d=0;d<e.ruleCount;d+=1)f!==d&&e.ruleDeps[d].refersTo[f]&&(e.ruleDeps[f].referencedBy[d]=!0);for(f=0;f<e.ruleCount;f+=1)e.ruleDeps[f].recursiveType=t.ATTR_N,e.ruleDeps[f].refersTo[f]&&(e.ruleDeps[f].recursiveType=t.ATTR_R);for(h=-1,f=0;f<e.ruleCount;f+=1)if(p=e.ruleDeps[f],p.recursiveType===t.ATTR_R)for(I=!0,d=0;d<e.ruleCount;d+=1)f!==d&&(y=e.ruleDeps[d],y.recursiveType===t.ATTR_R&&p.refersTo[d]&&y.refersTo[f]&&(I&&(h+=1,p.recursiveType=t.ATTR_MR,p.groupNumber=h,I=!1),y.recursiveType=t.ATTR_MR,y.groupNumber=h));e.isMutuallyRecursive=h>-1,e.ruleAlphaIndexes.sort(e.compRulesAlpha),e.ruleTypeIndexes.sort(e.compRulesAlpha),e.ruleTypeIndexes.sort(e.compRulesType),e.isMutuallyRecursive&&e.ruleTypeIndexes.sort(e.compRulesGroup),e.udtCount&&e.udtAlphaIndexes.sort(e.compUdtsAlpha),e.dependenciesComplete=!0},"ruleDependencies"),i=o((a=null)=>{let f=0,d=0,h=0,p=0,y=e.ruleCount-1,I=e.udtCount-1,T=100,D="",R="",H="=> ",F="<= ",V=!1,X=null,{ruleIndexes:J}=e,{udtIndexes:re}=e;for(a===97?(J=e.ruleAlphaIndexes,re=e.udtAlphaIndexes):a===116&&(J=e.ruleTypeIndexes,re=e.udtAlphaIndexes),f=0;f<e.ruleCount;f+=1){for(X=e.ruleDeps[J[f]],R=`${J[f]}:${e.typeToString(X.recursiveType)}:`,e.isMutuallyRecursive&&(R+=X.groupNumber>-1?X.groupNumber:"-",R+=":"),R+=" ",D+=`${R+e.rules[J[f]].name}
|
610
|
-
`,V=!0,h=0,p=D.length,D+=R,d=0;d<e.ruleCount;d+=1)X.refersTo[J[d]]&&(V?(D+=H,V=!1,D+=e.ruleDeps[J[d]].rule.name):D+=`, ${e.ruleDeps[J[d]].rule.name}`,h+=1),D.length-p>T&&d!==y&&(D+=`
|
611
|
-
${R}${H}`,p=D.length);if(e.udtCount)for(d=0;d<e.udtCount;d+=1)X.refersToUdt[re[d]]&&(V?(D+=H,V=!1,D+=e.udts[re[d]].name):D+=`, ${e.udts[re[d]].name}`,h+=1),D.length-p>T&&d!==I&&(D+=`
|
612
|
-
${R}${H}`,p=D.length);for(h===0&&(D+=`=> <none>
|
613
|
-
`),V===!1&&(D+=`
|
614
|
-
`),V=!0,h=0,p=D.length,D+=R,d=0;d<e.ruleCount;d+=1)X.referencedBy[J[d]]&&(V?(D+=F,V=!1,D+=e.ruleDeps[J[d]].rule.name):D+=`, ${e.ruleDeps[J[d]].rule.name}`,h+=1),D.length-p>T&&d!==y&&(D+=`
|
615
|
-
${R}${H}`,p=D.length);h===0&&(D+=`<= <none>
|
616
|
-
`),V===!1&&(D+=`
|
617
|
-
`),D+=`
|
618
|
-
`}return D},"show");return{ruleDependencies:n,showRuleDependencies:o((a="index")=>{let f=`RULE DEPENDENCIES(index:type:[group number:])
|
619
|
-
`;return f+=`=> refers to rule names
|
620
|
-
`,f+=`<= referenced by rule names
|
621
|
-
`,e.dependenciesComplete&&(a.charCodeAt(0)===97?(f+=`alphabetical by rule name
|
622
|
-
`,f+=i(97)):a.charCodeAt(0)===116?(f+=`ordered by rule type
|
623
|
-
`,f+=i(116)):(f+=`ordered by rule index
|
624
|
-
`,f+=i(null))),f},"showRuleDependencies")}})()});var FB=Q((Lwe,BB)=>{BB.exports=o(function(){let e=Oo(),{ruleAttributes:r,showAttributes:n,showAttributeErrors:i}=kB(),{ruleDependencies:s,showRuleDependencies:a}=RB();class f{constructor(p,y){this.rules=p,this.udts=y,this.ruleCount=p.length,this.udtCount=y.length,this.startRule=0,this.dependenciesComplete=!1,this.attributesComplete=!1,this.isMutuallyRecursive=!1,this.ruleIndexes=this.indexArray(this.ruleCount),this.ruleAlphaIndexes=this.indexArray(this.ruleCount),this.ruleTypeIndexes=this.indexArray(this.ruleCount),this.udtIndexes=this.indexArray(this.udtCount),this.udtAlphaIndexes=this.indexArray(this.udtCount),this.attrsErrorCount=0,this.attrs=[],this.attrsErrors=[],this.attrsWorking=[],this.ruleDeps=[];for(let I=0;I<this.ruleCount;I+=1)this.attrs.push(this.attrGen(this.rules[I])),this.attrsWorking.push(this.attrGen(this.rules[I])),this.ruleDeps.push(this.rdGen(p[I],this.ruleCount,this.udtCount));this.compRulesAlpha=this.compRulesAlpha.bind(this),this.compUdtsAlpha=this.compUdtsAlpha.bind(this),this.compRulesType=this.compRulesType.bind(this),this.compRulesGroup=this.compRulesGroup.bind(this)}attrGen(p){return{left:!1,nested:!1,right:!1,empty:!1,finite:!1,cyclic:!1,leaf:!1,isOpen:!1,isComplete:!1,rule:p}}attrInit(p){p.left=!1,p.nested=!1,p.right=!1,p.empty=!1,p.finite=!1,p.cyclic=!1,p.leaf=!1,p.isOpen=!1,p.isComplete=!1}attrCopy(p,y){p.left=y.left,p.nested=y.nested,p.right=y.right,p.empty=y.empty,p.finite=y.finite,p.cyclic=y.cyclic,p.leaf=y.leaf,p.isOpen=y.isOpen,p.isComplete=y.isComplete,p.rule=y.rule}rdGen(p,y,I){return{rule:p,recursiveType:e.ATTR_N,groupNumber:-1,refersTo:this.falseArray(y),refersToUdt:this.falseArray(I),referencedBy:this.falseArray(y)}}typeToString(p){switch(p){case e.ATTR_N:return" N";case e.ATTR_R:return" R";case e.ATTR_MR:return"MR";default:return"UNKNOWN"}}falseArray(p){let y=[];if(p>0)for(let I=0;I<p;I+=1)y.push(!1);return y}falsifyArray(p){for(let y=0;y<p.length;y+=1)p[y]=!1}indexArray(p){let y=[];if(p>0)for(let I=0;I<p;I+=1)y.push(I);return y}compRulesAlpha(p,y){return this.rules[p].lower<this.rules[y].lower?-1:this.rules[p].lower>this.rules[y].lower?1:0}compUdtsAlpha(p,y){return this.udts[p].lower<this.udts[y].lower?-1:this.udts[p].lower>this.udts[y].lower?1:0}compRulesType(p,y){return this.ruleDeps[p].recursiveType<this.ruleDeps[y].recursiveType?-1:this.ruleDeps[p].recursiveType>this.ruleDeps[y].recursiveType?1:0}compRulesGroup(p,y){if(this.ruleDeps[p].recursiveType===e.ATTR_MR&&this.ruleDeps[y].recursiveType===e.ATTR_MR){if(this.ruleDeps[p].groupNumber<this.ruleDeps[y].groupNumber)return-1;if(this.ruleDeps[p].groupNumber>this.ruleDeps[y].groupNumber)return 1}return 0}}return o(f,"State"),{attributes:o(function(p=[],y=[],I=[],T=[]){let D=new f(p,y);return s(D),r(D),D.attrsErrorCount&&T.push({line:0,char:0,msg:`${D.attrsErrorCount} attribute errors`}),D.attrsErrorCount},"attributes"),showAttributes:n,showAttributeErrors:i,showRuleDependencies:a}},"exportAttributes")()});var OB=Q((Uwe,PB)=>{PB.exports=o(function(){let e="show-rules.js";return o(function(i=[],s=[],a="index"){let f="showRules",d=[],h=[],p=[],y=[],I=i,T=s,D=i.length,R=s.length,H="RULE/UDT NAMES",F;function V(J,re){return I[J].lower<I[re].lower?-1:I[J].lower>I[re].lower?1:0}o(V,"compRulesAlpha");function X(J,re){return T[J].lower<T[re].lower?-1:T[J].lower>T[re].lower?1:0}if(o(X,"compUdtsAlpha"),!(Array.isArray(i)&&i.length))throw new Error(`${e}:${f}: rules arg must be array with length > 0`);if(!Array.isArray(s))throw new Error(`${e}:${f}: udts arg must be array`);for(F=0;F<D;F+=1)p.push(F);if(d=p.slice(0),d.sort(V),R){for(F=0;F<R;F+=1)y.push(F);h=y.slice(0),h.sort(X)}if(a.charCodeAt(0)===97){for(H+=` - alphabetical by rule/UDT name
|
625
|
-
`,F=0;F<D;F+=1)H+=`${F}: ${d[F]}: ${I[d[F]].name}
|
626
|
-
`;if(R)for(F=0;F<R;F+=1)H+=`${F}: ${h[F]}: ${T[h[F]].name}
|
627
|
-
`}else{for(H+=` - ordered by rule/UDT index
|
628
|
-
`,F=0;F<D;F+=1)H+=`${F}: ${I[F].name}
|
629
|
-
`;if(R)for(F=0;F<R;F+=1)H+=`${F}: ${T[F].name}
|
630
|
-
`}return H},"showRules")},"exfn")()});var LB=Q((qwe,NB)=>{NB.exports=o(function(e){let r="api.js: ",n=this,i=Vf(),s=Rx(),a=xB(),f=new(SB()),{attributes:d,showAttributes:h,showAttributeErrors:p,showRuleDependencies:y}=FB(),I=OB(),T=o(function(P,g,_){let E=`<span class="${i.style.CLASS_CTRLCHAR}">`,C="</span>",A=`<span class="${i.style.CLASS_NOMATCH}">`,x="</span>",k,O="",w=!0;for(;w&&!(!Array.isArray(P)||P.length===0);){if(typeof g!="number")throw new Error("abnfToHtml: beg must be type number");if(g>=P.length)break;typeof _!="number"||g+_>=P.length?k=P.length:k=g+_;let M=0;for(let he=g;he<k;he+=1){let B=P[he];if(B>=32&&B<=126)switch(M===1?(O+=C,M=0):M===2&&(O+=x,M=0),B){case 32:O+=" ";break;case 60:O+="<";break;case 62:O+=">";break;case 38:O+="&";break;case 34:O+=""";break;case 39:O+="'";break;case 92:O+="\";break;default:O+=String.fromCharCode(B);break}else B===9||B===10||B===13?(M===0?(O+=E,M=1):M===2&&(O+=x+E,M=1),B===9&&(O+="TAB"),B===10&&(O+="LF"),B===13&&(O+="CR")):(M===0?(O+=A,M=2):M===1&&(O+=C+A,M=2),O+=`\\x${i.utils.charToHex(B)}`)}M===2&&(O+=x),M===1&&(O+=C);break}return O},"abnfToHtml"),D=o(function(P,g,_){let v="";for(let l=g;l<g+_;l+=1){let b=P[l];if(b>=32&&b<=126)v+=String.fromCharCode(b);else switch(b){case 9:v+="\\t";break;case 10:v+="\\n";break;case 13:v+="\\r";break;default:v+="\\unknown";break}}return v},"abnfToAscii"),R=o(function(P){let g="Annotated Input Grammar";return P.forEach(_=>{g+=`
|
631
|
-
`,g+=`line no: ${_.lineNo}`,g+=` : char index: ${_.beginChar}`,g+=` : length: ${_.length}`,g+=` : abnf: ${D(n.chars,_.beginChar,_.length)}`}),g+=`
|
632
|
-
`,g},"linesToAscii"),H=o(function(P){let g="";return g+=`<table class="${i.style.CLASS_GRAMMAR}">
|
633
|
-
`,g+=`<caption>Annotated Input Grammar</caption>
|
634
|
-
`,g+="<tr>",g+="<th>line<br>no.</th><th>first<br>char</th><th><br>length</th><th><br>text</th>",g+=`</tr>
|
635
|
-
`,P.forEach(v=>{g+="<tr>",g+=`<td>${v.lineNo}`,g+=`</td><td>${v.beginChar}`,g+=`</td><td>${v.length}`,g+=`</td><td>${T(n.chars,v.beginChar,v.length)}`,g+="</td>",g+=`</tr>
|
636
|
-
`}),g+=`</table>
|
637
|
-
`,g},"linesToHtml"),F=o(function(P,g,_,v){let[l]=i,b="",E=`<span class="${l.CLASS_NOMATCH}">»</span>`;return b+=`<p><table class="${l.CLASS_GRAMMAR}">
|
638
|
-
`,v&&typeof v=="string"&&(b+=`<caption>${v}</caption>
|
639
|
-
`),b+=`<tr><th>line<br>no.</th><th>line<br>offset</th><th>error<br>offset</th><th><br>text</th></tr>
|
640
|
-
`,P.forEach(C=>{let A,x,k,O,w,M="",he="";g.length===0?(w=E,x=0):(A=g[C.line],k=A.beginChar,C.char>k&&(M=T(_,k,C.char-k)),k=C.char,O=A.beginChar+A.length,k<O&&(he=T(_,k,O-k)),w=M+E+he,x=C.char-A.beginChar,b+="<tr>",b+=`<td>${C.line}</td><td>${A.beginChar}</td><td>${x}</td><td>${w}</td>`,b+=`</tr>
|
641
|
-
`,b+="<tr>",b+=`<td colspan="3"></td><td>↑: ${i.utils.stringToAsciiHtml(C.msg)}</td>`,b+=`</tr>
|
642
|
-
`)}),b+=`</table></p>
|
643
|
-
`,b},"errorsToHtml"),V=o(function(P,g,_){let v,l,b,E;return v="",P.forEach(C=>{l=g[C.line],v+=`${l.lineNo}: `,v+=`${l.beginChar}: `,v+=`${C.char-l.beginChar}: `,b=l.beginChar,E=C.char-l.beginChar,v+=D(_,b,E),v+=" >> ",b=C.char,E=l.beginChar+l.length-C.char,v+=D(_,b,E),v+=`
|
644
|
-
`,v+=`${l.lineNo}: `,v+=`${l.beginChar}: `,v+=`${C.char-l.beginChar}: `,v+="error: ",v+=C.msg,v+=`
|
645
|
-
`}),v},"errorsToAscii"),X=!1,J=!1,re=!1,z=!1,$=0,G;if(this.errors=[],Buffer.isBuffer(e))this.chars=s.decode("BINARY",e);else if(Array.isArray(e))this.chars=e.slice();else if(typeof e=="string")this.chars=s.decode("STRING",e);else throw new Error(`${r}input source is not a string, byte Buffer or character array`);this.sabnf=s.encode("STRING",this.chars),this.scan=o(function(P,g){this.lines=a(this.chars,this.errors,P,g),X=!0},"scan"),this.parse=o(function(P,g){if(!X)throw new Error(`${r}grammar not scanned`);f.syntax(this.chars,this.lines,this.errors,P,g),J=!0},"parse"),this.translate=o(function(){if(!J)throw new Error(`${r}grammar not scanned and parsed`);let P=f.semantic(this.chars,this.lines,this.errors);this.errors.length===0&&(this.rules=P.rules,this.udts=P.udts,G=P.lineMap,re=!0)},"translate"),this.attributes=o(function(){if(!re)throw new Error(`${r}grammar not scanned, parsed and translated`);return $=d(this.rules,this.udts,G,this.errors),z=!0,$},"attrs"),this.generate=o(function(P){if(this.lines=a(this.chars,this.errors,P),this.errors.length||(f.syntax(this.chars,this.lines,this.errors,P),this.errors.length))return;let g=f.semantic(this.chars,this.lines,this.errors);this.errors.length||(this.rules=g.rules,this.udts=g.udts,G=g.lineMap,$=d(this.rules,this.udts,G,this.errors),z=!0)},"generate"),this.displayRules=o(function(P="index"){if(!re)throw new Error(`${r}grammar not scanned, parsed and translated`);return I(this.rules,this.udts,P)},"displayRules"),this.displayRuleDependencies=o(function(P="index"){if(!z)throw new Error(`${r}no attributes - must be preceeded by call to attributes()`);return y(P)},"displayRuleDependencies"),this.displayAttributes=o(function(P="index"){if(!z)throw new Error(`${r}no attributes - must be preceeded by call to attributes()`);return $&&p(P),h(P)},"displayAttributes"),this.displayAttributeErrors=o(function(){if(!z)throw new Error(`${r}no attributes - must be preceeded by call to attributes()`);return p()},"displayAttributeErrors"),this.toSource=o(function(P){if(!z)throw new Error(`${r}can't generate parser source - must be preceeded by call to attributes()`);if($)throw new Error(`${r}can't generate parser source - attributes have ${$} errors`);return f.generateSource(this.chars,this.lines,this.rules,this.udts,P)},"toSource"),this.toObject=o(function(){if(!z)throw new Error(`${r}can't generate parser source - must be preceeded by call to attributes()`);if($)throw new Error(`${r}can't generate parser source - attributes have ${$} errors`);return f.generateObject(this.sabnf,this.rules,this.udts)},"toObject"),this.errorsToAscii=o(function(){return V(this.errors,this.lines,this.chars)},"errorsToAsciiFunc"),this.errorsToHtml=o(function(P){return F(this.errors,this.lines,this.chars,P)},"errorsToHtmlFunc"),this.linesToAscii=o(function(){return R(this.lines)},"linesToAsciiFunc"),this.linesToHtml=o(function(){return H(this.lines)},"linesToHtmlFunc")},"api")});var Gx=Q((eF,Kx)=>{(function(t,e){"use strict";function r(v,l){if(!v)throw new Error(l||"Assertion failed")}o(r,"assert");function n(v,l){v.super_=l;var b=o(function(){},"TempCtor");b.prototype=l.prototype,v.prototype=new b,v.prototype.constructor=v}o(n,"inherits");function i(v,l,b){if(i.isBN(v))return v;this.negative=0,this.words=null,this.length=0,this.red=null,v!==null&&((l==="le"||l==="be")&&(b=l,l=10),this._init(v||0,l||10,b||"be"))}o(i,"BN"),typeof t=="object"?t.exports=i:e.BN=i,i.BN=i,i.wordSize=26;var s;try{typeof window<"u"&&typeof window.Buffer<"u"?s=window.Buffer:s=vy().Buffer}catch{}i.isBN=o(function(l){return l instanceof i?!0:l!==null&&typeof l=="object"&&l.constructor.wordSize===i.wordSize&&Array.isArray(l.words)},"isBN"),i.max=o(function(l,b){return l.cmp(b)>0?l:b},"max"),i.min=o(function(l,b){return l.cmp(b)<0?l:b},"min"),i.prototype._init=o(function(l,b,E){if(typeof l=="number")return this._initNumber(l,b,E);if(typeof l=="object")return this._initArray(l,b,E);b==="hex"&&(b=16),r(b===(b|0)&&b>=2&&b<=36),l=l.toString().replace(/\s+/g,"");var C=0;l[0]==="-"&&(C++,this.negative=1),C<l.length&&(b===16?this._parseHex(l,C,E):(this._parseBase(l,b,C),E==="le"&&this._initArray(this.toArray(),b,E)))},"init"),i.prototype._initNumber=o(function(l,b,E){l<0&&(this.negative=1,l=-l),l<67108864?(this.words=[l&67108863],this.length=1):l<4503599627370496?(this.words=[l&67108863,l/67108864&67108863],this.length=2):(r(l<9007199254740992),this.words=[l&67108863,l/67108864&67108863,1],this.length=3),E==="le"&&this._initArray(this.toArray(),b,E)},"_initNumber"),i.prototype._initArray=o(function(l,b,E){if(r(typeof l.length=="number"),l.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(l.length/3),this.words=new Array(this.length);for(var C=0;C<this.length;C++)this.words[C]=0;var A,x,k=0;if(E==="be")for(C=l.length-1,A=0;C>=0;C-=3)x=l[C]|l[C-1]<<8|l[C-2]<<16,this.words[A]|=x<<k&67108863,this.words[A+1]=x>>>26-k&67108863,k+=24,k>=26&&(k-=26,A++);else if(E==="le")for(C=0,A=0;C<l.length;C+=3)x=l[C]|l[C+1]<<8|l[C+2]<<16,this.words[A]|=x<<k&67108863,this.words[A+1]=x>>>26-k&67108863,k+=24,k>=26&&(k-=26,A++);return this._strip()},"_initArray");function a(v,l){var b=v.charCodeAt(l);if(b>=48&&b<=57)return b-48;if(b>=65&&b<=70)return b-55;if(b>=97&&b<=102)return b-87;r(!1,"Invalid character in "+v)}o(a,"parseHex4Bits");function f(v,l,b){var E=a(v,b);return b-1>=l&&(E|=a(v,b-1)<<4),E}o(f,"parseHexByte"),i.prototype._parseHex=o(function(l,b,E){this.length=Math.ceil((l.length-b)/6),this.words=new Array(this.length);for(var C=0;C<this.length;C++)this.words[C]=0;var A=0,x=0,k;if(E==="be")for(C=l.length-1;C>=b;C-=2)k=f(l,b,C)<<A,this.words[x]|=k&67108863,A>=18?(A-=18,x+=1,this.words[x]|=k>>>26):A+=8;else{var O=l.length-b;for(C=O%2===0?b+1:b;C<l.length;C+=2)k=f(l,b,C)<<A,this.words[x]|=k&67108863,A>=18?(A-=18,x+=1,this.words[x]|=k>>>26):A+=8}this._strip()},"_parseHex");function d(v,l,b,E){for(var C=0,A=0,x=Math.min(v.length,b),k=l;k<x;k++){var O=v.charCodeAt(k)-48;C*=E,O>=49?A=O-49+10:O>=17?A=O-17+10:A=O,r(O>=0&&A<E,"Invalid character"),C+=A}return C}o(d,"parseBase"),i.prototype._parseBase=o(function(l,b,E){this.words=[0],this.length=1;for(var C=0,A=1;A<=67108863;A*=b)C++;C--,A=A/b|0;for(var x=l.length-E,k=x%C,O=Math.min(x,x-k)+E,w=0,M=E;M<O;M+=C)w=d(l,M,M+C,b),this.imuln(A),this.words[0]+w<67108864?this.words[0]+=w:this._iaddn(w);if(k!==0){var he=1;for(w=d(l,M,l.length,b),M=0;M<k;M++)he*=b;this.imuln(he),this.words[0]+w<67108864?this.words[0]+=w:this._iaddn(w)}this._strip()},"_parseBase"),i.prototype.copy=o(function(l){l.words=new Array(this.length);for(var b=0;b<this.length;b++)l.words[b]=this.words[b];l.length=this.length,l.negative=this.negative,l.red=this.red},"copy");function h(v,l){v.words=l.words,v.length=l.length,v.negative=l.negative,v.red=l.red}if(o(h,"move"),i.prototype._move=o(function(l){h(l,this)},"_move"),i.prototype.clone=o(function(){var l=new i(null);return this.copy(l),l},"clone"),i.prototype._expand=o(function(l){for(;this.length<l;)this.words[this.length++]=0;return this},"_expand"),i.prototype._strip=o(function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},"strip"),i.prototype._normSign=o(function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},"_normSign"),typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=p}catch{i.prototype.inspect=p}else i.prototype.inspect=p;function p(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}o(p,"inspect");var y=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],I=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],T=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=o(function(l,b){l=l||10,b=b|0||1;var E;if(l===16||l==="hex"){E="";for(var C=0,A=0,x=0;x<this.length;x++){var k=this.words[x],O=((k<<C|A)&16777215).toString(16);A=k>>>24-C&16777215,C+=2,C>=26&&(C-=26,x--),A!==0||x!==this.length-1?E=y[6-O.length]+O+E:E=O+E}for(A!==0&&(E=A.toString(16)+E);E.length%b!==0;)E="0"+E;return this.negative!==0&&(E="-"+E),E}if(l===(l|0)&&l>=2&&l<=36){var w=I[l],M=T[l];E="";var he=this.clone();for(he.negative=0;!he.isZero();){var B=he.modrn(M).toString(l);he=he.idivn(M),he.isZero()?E=B+E:E=y[w-B.length]+B+E}for(this.isZero()&&(E="0"+E);E.length%b!==0;)E="0"+E;return this.negative!==0&&(E="-"+E),E}r(!1,"Base should be between 2 and 36")},"toString"),i.prototype.toNumber=o(function(){var l=this.words[0];return this.length===2?l+=this.words[1]*67108864:this.length===3&&this.words[2]===1?l+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-l:l},"toNumber"),i.prototype.toJSON=o(function(){return this.toString(16,2)},"toJSON"),s&&(i.prototype.toBuffer=o(function(l,b){return this.toArrayLike(s,l,b)},"toBuffer")),i.prototype.toArray=o(function(l,b){return this.toArrayLike(Array,l,b)},"toArray");var D=o(function(l,b){return l.allocUnsafe?l.allocUnsafe(b):new l(b)},"allocate");i.prototype.toArrayLike=o(function(l,b,E){this._strip();var C=this.byteLength(),A=E||Math.max(1,C);r(C<=A,"byte array longer than desired length"),r(A>0,"Requested array length <= 0");var x=D(l,A),k=b==="le"?"LE":"BE";return this["_toArrayLike"+k](x,C),x},"toArrayLike"),i.prototype._toArrayLikeLE=o(function(l,b){for(var E=0,C=0,A=0,x=0;A<this.length;A++){var k=this.words[A]<<x|C;l[E++]=k&255,E<l.length&&(l[E++]=k>>8&255),E<l.length&&(l[E++]=k>>16&255),x===6?(E<l.length&&(l[E++]=k>>24&255),C=0,x=0):(C=k>>>24,x+=2)}if(E<l.length)for(l[E++]=C;E<l.length;)l[E++]=0},"_toArrayLikeLE"),i.prototype._toArrayLikeBE=o(function(l,b){for(var E=l.length-1,C=0,A=0,x=0;A<this.length;A++){var k=this.words[A]<<x|C;l[E--]=k&255,E>=0&&(l[E--]=k>>8&255),E>=0&&(l[E--]=k>>16&255),x===6?(E>=0&&(l[E--]=k>>24&255),C=0,x=0):(C=k>>>24,x+=2)}if(E>=0)for(l[E--]=C;E>=0;)l[E--]=0},"_toArrayLikeBE"),Math.clz32?i.prototype._countBits=o(function(l){return 32-Math.clz32(l)},"_countBits"):i.prototype._countBits=o(function(l){var b=l,E=0;return b>=4096&&(E+=13,b>>>=13),b>=64&&(E+=7,b>>>=7),b>=8&&(E+=4,b>>>=4),b>=2&&(E+=2,b>>>=2),E+b},"_countBits"),i.prototype._zeroBits=o(function(l){if(l===0)return 26;var b=l,E=0;return(b&8191)===0&&(E+=13,b>>>=13),(b&127)===0&&(E+=7,b>>>=7),(b&15)===0&&(E+=4,b>>>=4),(b&3)===0&&(E+=2,b>>>=2),(b&1)===0&&E++,E},"_zeroBits"),i.prototype.bitLength=o(function(){var l=this.words[this.length-1],b=this._countBits(l);return(this.length-1)*26+b},"bitLength");function R(v){for(var l=new Array(v.bitLength()),b=0;b<l.length;b++){var E=b/26|0,C=b%26;l[b]=v.words[E]>>>C&1}return l}o(R,"toBitArray"),i.prototype.zeroBits=o(function(){if(this.isZero())return 0;for(var l=0,b=0;b<this.length;b++){var E=this._zeroBits(this.words[b]);if(l+=E,E!==26)break}return l},"zeroBits"),i.prototype.byteLength=o(function(){return Math.ceil(this.bitLength()/8)},"byteLength"),i.prototype.toTwos=o(function(l){return this.negative!==0?this.abs().inotn(l).iaddn(1):this.clone()},"toTwos"),i.prototype.fromTwos=o(function(l){return this.testn(l-1)?this.notn(l).iaddn(1).ineg():this.clone()},"fromTwos"),i.prototype.isNeg=o(function(){return this.negative!==0},"isNeg"),i.prototype.neg=o(function(){return this.clone().ineg()},"neg"),i.prototype.ineg=o(function(){return this.isZero()||(this.negative^=1),this},"ineg"),i.prototype.iuor=o(function(l){for(;this.length<l.length;)this.words[this.length++]=0;for(var b=0;b<l.length;b++)this.words[b]=this.words[b]|l.words[b];return this._strip()},"iuor"),i.prototype.ior=o(function(l){return r((this.negative|l.negative)===0),this.iuor(l)},"ior"),i.prototype.or=o(function(l){return this.length>l.length?this.clone().ior(l):l.clone().ior(this)},"or"),i.prototype.uor=o(function(l){return this.length>l.length?this.clone().iuor(l):l.clone().iuor(this)},"uor"),i.prototype.iuand=o(function(l){var b;this.length>l.length?b=l:b=this;for(var E=0;E<b.length;E++)this.words[E]=this.words[E]&l.words[E];return this.length=b.length,this._strip()},"iuand"),i.prototype.iand=o(function(l){return r((this.negative|l.negative)===0),this.iuand(l)},"iand"),i.prototype.and=o(function(l){return this.length>l.length?this.clone().iand(l):l.clone().iand(this)},"and"),i.prototype.uand=o(function(l){return this.length>l.length?this.clone().iuand(l):l.clone().iuand(this)},"uand"),i.prototype.iuxor=o(function(l){var b,E;this.length>l.length?(b=this,E=l):(b=l,E=this);for(var C=0;C<E.length;C++)this.words[C]=b.words[C]^E.words[C];if(this!==b)for(;C<b.length;C++)this.words[C]=b.words[C];return this.length=b.length,this._strip()},"iuxor"),i.prototype.ixor=o(function(l){return r((this.negative|l.negative)===0),this.iuxor(l)},"ixor"),i.prototype.xor=o(function(l){return this.length>l.length?this.clone().ixor(l):l.clone().ixor(this)},"xor"),i.prototype.uxor=o(function(l){return this.length>l.length?this.clone().iuxor(l):l.clone().iuxor(this)},"uxor"),i.prototype.inotn=o(function(l){r(typeof l=="number"&&l>=0);var b=Math.ceil(l/26)|0,E=l%26;this._expand(b),E>0&&b--;for(var C=0;C<b;C++)this.words[C]=~this.words[C]&67108863;return E>0&&(this.words[C]=~this.words[C]&67108863>>26-E),this._strip()},"inotn"),i.prototype.notn=o(function(l){return this.clone().inotn(l)},"notn"),i.prototype.setn=o(function(l,b){r(typeof l=="number"&&l>=0);var E=l/26|0,C=l%26;return this._expand(E+1),b?this.words[E]=this.words[E]|1<<C:this.words[E]=this.words[E]&~(1<<C),this._strip()},"setn"),i.prototype.iadd=o(function(l){var b;if(this.negative!==0&&l.negative===0)return this.negative=0,b=this.isub(l),this.negative^=1,this._normSign();if(this.negative===0&&l.negative!==0)return l.negative=0,b=this.isub(l),l.negative=1,b._normSign();var E,C;this.length>l.length?(E=this,C=l):(E=l,C=this);for(var A=0,x=0;x<C.length;x++)b=(E.words[x]|0)+(C.words[x]|0)+A,this.words[x]=b&67108863,A=b>>>26;for(;A!==0&&x<E.length;x++)b=(E.words[x]|0)+A,this.words[x]=b&67108863,A=b>>>26;if(this.length=E.length,A!==0)this.words[this.length]=A,this.length++;else if(E!==this)for(;x<E.length;x++)this.words[x]=E.words[x];return this},"iadd"),i.prototype.add=o(function(l){var b;return l.negative!==0&&this.negative===0?(l.negative=0,b=this.sub(l),l.negative^=1,b):l.negative===0&&this.negative!==0?(this.negative=0,b=l.sub(this),this.negative=1,b):this.length>l.length?this.clone().iadd(l):l.clone().iadd(this)},"add"),i.prototype.isub=o(function(l){if(l.negative!==0){l.negative=0;var b=this.iadd(l);return l.negative=1,b._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(l),this.negative=1,this._normSign();var E=this.cmp(l);if(E===0)return this.negative=0,this.length=1,this.words[0]=0,this;var C,A;E>0?(C=this,A=l):(C=l,A=this);for(var x=0,k=0;k<A.length;k++)b=(C.words[k]|0)-(A.words[k]|0)+x,x=b>>26,this.words[k]=b&67108863;for(;x!==0&&k<C.length;k++)b=(C.words[k]|0)+x,x=b>>26,this.words[k]=b&67108863;if(x===0&&k<C.length&&C!==this)for(;k<C.length;k++)this.words[k]=C.words[k];return this.length=Math.max(this.length,k),C!==this&&(this.negative=1),this._strip()},"isub"),i.prototype.sub=o(function(l){return this.clone().isub(l)},"sub");function H(v,l,b){b.negative=l.negative^v.negative;var E=v.length+l.length|0;b.length=E,E=E-1|0;var C=v.words[0]|0,A=l.words[0]|0,x=C*A,k=x&67108863,O=x/67108864|0;b.words[0]=k;for(var w=1;w<E;w++){for(var M=O>>>26,he=O&67108863,B=Math.min(w,l.length-1),ee=Math.max(0,w-v.length+1);ee<=B;ee++){var ae=w-ee|0;C=v.words[ae]|0,A=l.words[ee]|0,x=C*A+he,M+=x/67108864|0,he=x&67108863}b.words[w]=he|0,O=M|0}return O!==0?b.words[w]=O|0:b.length--,b._strip()}o(H,"smallMulTo");var F=o(function(l,b,E){var C=l.words,A=b.words,x=E.words,k=0,O,w,M,he=C[0]|0,B=he&8191,ee=he>>>13,ae=C[1]|0,q=ae&8191,U=ae>>>13,te=C[2]|0,oe=te&8191,ce=te>>>13,Ce=C[3]|0,ve=Ce&8191,ie=Ce>>>13,De=C[4]|0,ue=De&8191,ye=De>>>13,W=C[5]|0,me=W&8191,ke=W>>>13,ze=C[6]|0,Oe=ze&8191,Je=ze>>>13,Dr=C[7]|0,de=Dr&8191,se=Dr>>>13,L=C[8]|0,Z=L&8191,ge=L>>>13,we=C[9]|0,Ee=we&8191,Me=we>>>13,Ot=A[0]|0,$e=Ot&8191,Fe=Ot>>>13,qt=A[1]|0,We=qt&8191,Ze=qt>>>13,ii=A[2]|0,at=ii&8191,ct=ii>>>13,Ti=A[3]|0,ft=Ti&8191,ot=Ti>>>13,ki=A[4]|0,ut=ki&8191,dt=ki>>>13,On=A[5]|0,lt=On&8191,rt=On>>>13,Mi=A[6]|0,ht=Mi&8191,pt=Mi>>>13,Ri=A[7]|0,mt=Ri&8191,gt=Ri>>>13,Bi=A[8]|0,bt=Bi&8191,st=Bi>>>13,oi=A[9]|0,Vt=oi&8191,zt=oi>>>13;E.negative=l.negative^b.negative,E.length=19,O=Math.imul(B,$e),w=Math.imul(B,Fe),w=w+Math.imul(ee,$e)|0,M=Math.imul(ee,Fe);var Nn=(k+O|0)+((w&8191)<<13)|0;k=(M+(w>>>13)|0)+(Nn>>>26)|0,Nn&=67108863,O=Math.imul(q,$e),w=Math.imul(q,Fe),w=w+Math.imul(U,$e)|0,M=Math.imul(U,Fe),O=O+Math.imul(B,We)|0,w=w+Math.imul(B,Ze)|0,w=w+Math.imul(ee,We)|0,M=M+Math.imul(ee,Ze)|0;var Ln=(k+O|0)+((w&8191)<<13)|0;k=(M+(w>>>13)|0)+(Ln>>>26)|0,Ln&=67108863,O=Math.imul(oe,$e),w=Math.imul(oe,Fe),w=w+Math.imul(ce,$e)|0,M=Math.imul(ce,Fe),O=O+Math.imul(q,We)|0,w=w+Math.imul(q,Ze)|0,w=w+Math.imul(U,We)|0,M=M+Math.imul(U,Ze)|0,O=O+Math.imul(B,at)|0,w=w+Math.imul(B,ct)|0,w=w+Math.imul(ee,at)|0,M=M+Math.imul(ee,ct)|0;var Un=(k+O|0)+((w&8191)<<13)|0;k=(M+(w>>>13)|0)+(Un>>>26)|0,Un&=67108863,O=Math.imul(ve,$e),w=Math.imul(ve,Fe),w=w+Math.imul(ie,$e)|0,M=Math.imul(ie,Fe),O=O+Math.imul(oe,We)|0,w=w+Math.imul(oe,Ze)|0,w=w+Math.imul(ce,We)|0,M=M+Math.imul(ce,Ze)|0,O=O+Math.imul(q,at)|0,w=w+Math.imul(q,ct)|0,w=w+Math.imul(U,at)|0,M=M+Math.imul(U,ct)|0,O=O+Math.imul(B,ft)|0,w=w+Math.imul(B,ot)|0,w=w+Math.imul(ee,ft)|0,M=M+Math.imul(ee,ot)|0;var en=(k+O|0)+((w&8191)<<13)|0;k=(M+(w>>>13)|0)+(en>>>26)|0,en&=67108863,O=Math.imul(ue,$e),w=Math.imul(ue,Fe),w=w+Math.imul(ye,$e)|0,M=Math.imul(ye,Fe),O=O+Math.imul(ve,We)|0,w=w+Math.imul(ve,Ze)|0,w=w+Math.imul(ie,We)|0,M=M+Math.imul(ie,Ze)|0,O=O+Math.imul(oe,at)|0,w=w+Math.imul(oe,ct)|0,w=w+Math.imul(ce,at)|0,M=M+Math.imul(ce,ct)|0,O=O+Math.imul(q,ft)|0,w=w+Math.imul(q,ot)|0,w=w+Math.imul(U,ft)|0,M=M+Math.imul(U,ot)|0,O=O+Math.imul(B,ut)|0,w=w+Math.imul(B,dt)|0,w=w+Math.imul(ee,ut)|0,M=M+Math.imul(ee,dt)|0;var qn=(k+O|0)+((w&8191)<<13)|0;k=(M+(w>>>13)|0)+(qn>>>26)|0,qn&=67108863,O=Math.imul(me,$e),w=Math.imul(me,Fe),w=w+Math.imul(ke,$e)|0,M=Math.imul(ke,Fe),O=O+Math.imul(ue,We)|0,w=w+Math.imul(ue,Ze)|0,w=w+Math.imul(ye,We)|0,M=M+Math.imul(ye,Ze)|0,O=O+Math.imul(ve,at)|0,w=w+Math.imul(ve,ct)|0,w=w+Math.imul(ie,at)|0,M=M+Math.imul(ie,ct)|0,O=O+Math.imul(oe,ft)|0,w=w+Math.imul(oe,ot)|0,w=w+Math.imul(ce,ft)|0,M=M+Math.imul(ce,ot)|0,O=O+Math.imul(q,ut)|0,w=w+Math.imul(q,dt)|0,w=w+Math.imul(U,ut)|0,M=M+Math.imul(U,dt)|0,O=O+Math.imul(B,lt)|0,w=w+Math.imul(B,rt)|0,w=w+Math.imul(ee,lt)|0,M=M+Math.imul(ee,rt)|0;var Fi=(k+O|0)+((w&8191)<<13)|0;k=(M+(w>>>13)|0)+(Fi>>>26)|0,Fi&=67108863,O=Math.imul(Oe,$e),w=Math.imul(Oe,Fe),w=w+Math.imul(Je,$e)|0,M=Math.imul(Je,Fe),O=O+Math.imul(me,We)|0,w=w+Math.imul(me,Ze)|0,w=w+Math.imul(ke,We)|0,M=M+Math.imul(ke,Ze)|0,O=O+Math.imul(ue,at)|0,w=w+Math.imul(ue,ct)|0,w=w+Math.imul(ye,at)|0,M=M+Math.imul(ye,ct)|0,O=O+Math.imul(ve,ft)|0,w=w+Math.imul(ve,ot)|0,w=w+Math.imul(ie,ft)|0,M=M+Math.imul(ie,ot)|0,O=O+Math.imul(oe,ut)|0,w=w+Math.imul(oe,dt)|0,w=w+Math.imul(ce,ut)|0,M=M+Math.imul(ce,dt)|0,O=O+Math.imul(q,lt)|0,w=w+Math.imul(q,rt)|0,w=w+Math.imul(U,lt)|0,M=M+Math.imul(U,rt)|0,O=O+Math.imul(B,ht)|0,w=w+Math.imul(B,pt)|0,w=w+Math.imul(ee,ht)|0,M=M+Math.imul(ee,pt)|0;var Ds=(k+O|0)+((w&8191)<<13)|0;k=(M+(w>>>13)|0)+(Ds>>>26)|0,Ds&=67108863,O=Math.imul(de,$e),w=Math.imul(de,Fe),w=w+Math.imul(se,$e)|0,M=Math.imul(se,Fe),O=O+Math.imul(Oe,We)|0,w=w+Math.imul(Oe,Ze)|0,w=w+Math.imul(Je,We)|0,M=M+Math.imul(Je,Ze)|0,O=O+Math.imul(me,at)|0,w=w+Math.imul(me,ct)|0,w=w+Math.imul(ke,at)|0,M=M+Math.imul(ke,ct)|0,O=O+Math.imul(ue,ft)|0,w=w+Math.imul(ue,ot)|0,w=w+Math.imul(ye,ft)|0,M=M+Math.imul(ye,ot)|0,O=O+Math.imul(ve,ut)|0,w=w+Math.imul(ve,dt)|0,w=w+Math.imul(ie,ut)|0,M=M+Math.imul(ie,dt)|0,O=O+Math.imul(oe,lt)|0,w=w+Math.imul(oe,rt)|0,w=w+Math.imul(ce,lt)|0,M=M+Math.imul(ce,rt)|0,O=O+Math.imul(q,ht)|0,w=w+Math.imul(q,pt)|0,w=w+Math.imul(U,ht)|0,M=M+Math.imul(U,pt)|0,O=O+Math.imul(B,mt)|0,w=w+Math.imul(B,gt)|0,w=w+Math.imul(ee,mt)|0,M=M+Math.imul(ee,gt)|0;var Ss=(k+O|0)+((w&8191)<<13)|0;k=(M+(w>>>13)|0)+(Ss>>>26)|0,Ss&=67108863,O=Math.imul(Z,$e),w=Math.imul(Z,Fe),w=w+Math.imul(ge,$e)|0,M=Math.imul(ge,Fe),O=O+Math.imul(de,We)|0,w=w+Math.imul(de,Ze)|0,w=w+Math.imul(se,We)|0,M=M+Math.imul(se,Ze)|0,O=O+Math.imul(Oe,at)|0,w=w+Math.imul(Oe,ct)|0,w=w+Math.imul(Je,at)|0,M=M+Math.imul(Je,ct)|0,O=O+Math.imul(me,ft)|0,w=w+Math.imul(me,ot)|0,w=w+Math.imul(ke,ft)|0,M=M+Math.imul(ke,ot)|0,O=O+Math.imul(ue,ut)|0,w=w+Math.imul(ue,dt)|0,w=w+Math.imul(ye,ut)|0,M=M+Math.imul(ye,dt)|0,O=O+Math.imul(ve,lt)|0,w=w+Math.imul(ve,rt)|0,w=w+Math.imul(ie,lt)|0,M=M+Math.imul(ie,rt)|0,O=O+Math.imul(oe,ht)|0,w=w+Math.imul(oe,pt)|0,w=w+Math.imul(ce,ht)|0,M=M+Math.imul(ce,pt)|0,O=O+Math.imul(q,mt)|0,w=w+Math.imul(q,gt)|0,w=w+Math.imul(U,mt)|0,M=M+Math.imul(U,gt)|0,O=O+Math.imul(B,bt)|0,w=w+Math.imul(B,st)|0,w=w+Math.imul(ee,bt)|0,M=M+Math.imul(ee,st)|0;var Ts=(k+O|0)+((w&8191)<<13)|0;k=(M+(w>>>13)|0)+(Ts>>>26)|0,Ts&=67108863,O=Math.imul(Ee,$e),w=Math.imul(Ee,Fe),w=w+Math.imul(Me,$e)|0,M=Math.imul(Me,Fe),O=O+Math.imul(Z,We)|0,w=w+Math.imul(Z,Ze)|0,w=w+Math.imul(ge,We)|0,M=M+Math.imul(ge,Ze)|0,O=O+Math.imul(de,at)|0,w=w+Math.imul(de,ct)|0,w=w+Math.imul(se,at)|0,M=M+Math.imul(se,ct)|0,O=O+Math.imul(Oe,ft)|0,w=w+Math.imul(Oe,ot)|0,w=w+Math.imul(Je,ft)|0,M=M+Math.imul(Je,ot)|0,O=O+Math.imul(me,ut)|0,w=w+Math.imul(me,dt)|0,w=w+Math.imul(ke,ut)|0,M=M+Math.imul(ke,dt)|0,O=O+Math.imul(ue,lt)|0,w=w+Math.imul(ue,rt)|0,w=w+Math.imul(ye,lt)|0,M=M+Math.imul(ye,rt)|0,O=O+Math.imul(ve,ht)|0,w=w+Math.imul(ve,pt)|0,w=w+Math.imul(ie,ht)|0,M=M+Math.imul(ie,pt)|0,O=O+Math.imul(oe,mt)|0,w=w+Math.imul(oe,gt)|0,w=w+Math.imul(ce,mt)|0,M=M+Math.imul(ce,gt)|0,O=O+Math.imul(q,bt)|0,w=w+Math.imul(q,st)|0,w=w+Math.imul(U,bt)|0,M=M+Math.imul(U,st)|0,O=O+Math.imul(B,Vt)|0,w=w+Math.imul(B,zt)|0,w=w+Math.imul(ee,Vt)|0,M=M+Math.imul(ee,zt)|0;var Vo=(k+O|0)+((w&8191)<<13)|0;k=(M+(w>>>13)|0)+(Vo>>>26)|0,Vo&=67108863,O=Math.imul(Ee,We),w=Math.imul(Ee,Ze),w=w+Math.imul(Me,We)|0,M=Math.imul(Me,Ze),O=O+Math.imul(Z,at)|0,w=w+Math.imul(Z,ct)|0,w=w+Math.imul(ge,at)|0,M=M+Math.imul(ge,ct)|0,O=O+Math.imul(de,ft)|0,w=w+Math.imul(de,ot)|0,w=w+Math.imul(se,ft)|0,M=M+Math.imul(se,ot)|0,O=O+Math.imul(Oe,ut)|0,w=w+Math.imul(Oe,dt)|0,w=w+Math.imul(Je,ut)|0,M=M+Math.imul(Je,dt)|0,O=O+Math.imul(me,lt)|0,w=w+Math.imul(me,rt)|0,w=w+Math.imul(ke,lt)|0,M=M+Math.imul(ke,rt)|0,O=O+Math.imul(ue,ht)|0,w=w+Math.imul(ue,pt)|0,w=w+Math.imul(ye,ht)|0,M=M+Math.imul(ye,pt)|0,O=O+Math.imul(ve,mt)|0,w=w+Math.imul(ve,gt)|0,w=w+Math.imul(ie,mt)|0,M=M+Math.imul(ie,gt)|0,O=O+Math.imul(oe,bt)|0,w=w+Math.imul(oe,st)|0,w=w+Math.imul(ce,bt)|0,M=M+Math.imul(ce,st)|0,O=O+Math.imul(q,Vt)|0,w=w+Math.imul(q,zt)|0,w=w+Math.imul(U,Vt)|0,M=M+Math.imul(U,zt)|0;var zo=(k+O|0)+((w&8191)<<13)|0;k=(M+(w>>>13)|0)+(zo>>>26)|0,zo&=67108863,O=Math.imul(Ee,at),w=Math.imul(Ee,ct),w=w+Math.imul(Me,at)|0,M=Math.imul(Me,ct),O=O+Math.imul(Z,ft)|0,w=w+Math.imul(Z,ot)|0,w=w+Math.imul(ge,ft)|0,M=M+Math.imul(ge,ot)|0,O=O+Math.imul(de,ut)|0,w=w+Math.imul(de,dt)|0,w=w+Math.imul(se,ut)|0,M=M+Math.imul(se,dt)|0,O=O+Math.imul(Oe,lt)|0,w=w+Math.imul(Oe,rt)|0,w=w+Math.imul(Je,lt)|0,M=M+Math.imul(Je,rt)|0,O=O+Math.imul(me,ht)|0,w=w+Math.imul(me,pt)|0,w=w+Math.imul(ke,ht)|0,M=M+Math.imul(ke,pt)|0,O=O+Math.imul(ue,mt)|0,w=w+Math.imul(ue,gt)|0,w=w+Math.imul(ye,mt)|0,M=M+Math.imul(ye,gt)|0,O=O+Math.imul(ve,bt)|0,w=w+Math.imul(ve,st)|0,w=w+Math.imul(ie,bt)|0,M=M+Math.imul(ie,st)|0,O=O+Math.imul(oe,Vt)|0,w=w+Math.imul(oe,zt)|0,w=w+Math.imul(ce,Vt)|0,M=M+Math.imul(ce,zt)|0;var Ko=(k+O|0)+((w&8191)<<13)|0;k=(M+(w>>>13)|0)+(Ko>>>26)|0,Ko&=67108863,O=Math.imul(Ee,ft),w=Math.imul(Ee,ot),w=w+Math.imul(Me,ft)|0,M=Math.imul(Me,ot),O=O+Math.imul(Z,ut)|0,w=w+Math.imul(Z,dt)|0,w=w+Math.imul(ge,ut)|0,M=M+Math.imul(ge,dt)|0,O=O+Math.imul(de,lt)|0,w=w+Math.imul(de,rt)|0,w=w+Math.imul(se,lt)|0,M=M+Math.imul(se,rt)|0,O=O+Math.imul(Oe,ht)|0,w=w+Math.imul(Oe,pt)|0,w=w+Math.imul(Je,ht)|0,M=M+Math.imul(Je,pt)|0,O=O+Math.imul(me,mt)|0,w=w+Math.imul(me,gt)|0,w=w+Math.imul(ke,mt)|0,M=M+Math.imul(ke,gt)|0,O=O+Math.imul(ue,bt)|0,w=w+Math.imul(ue,st)|0,w=w+Math.imul(ye,bt)|0,M=M+Math.imul(ye,st)|0,O=O+Math.imul(ve,Vt)|0,w=w+Math.imul(ve,zt)|0,w=w+Math.imul(ie,Vt)|0,M=M+Math.imul(ie,zt)|0;var ks=(k+O|0)+((w&8191)<<13)|0;k=(M+(w>>>13)|0)+(ks>>>26)|0,ks&=67108863,O=Math.imul(Ee,ut),w=Math.imul(Ee,dt),w=w+Math.imul(Me,ut)|0,M=Math.imul(Me,dt),O=O+Math.imul(Z,lt)|0,w=w+Math.imul(Z,rt)|0,w=w+Math.imul(ge,lt)|0,M=M+Math.imul(ge,rt)|0,O=O+Math.imul(de,ht)|0,w=w+Math.imul(de,pt)|0,w=w+Math.imul(se,ht)|0,M=M+Math.imul(se,pt)|0,O=O+Math.imul(Oe,mt)|0,w=w+Math.imul(Oe,gt)|0,w=w+Math.imul(Je,mt)|0,M=M+Math.imul(Je,gt)|0,O=O+Math.imul(me,bt)|0,w=w+Math.imul(me,st)|0,w=w+Math.imul(ke,bt)|0,M=M+Math.imul(ke,st)|0,O=O+Math.imul(ue,Vt)|0,w=w+Math.imul(ue,zt)|0,w=w+Math.imul(ye,Vt)|0,M=M+Math.imul(ye,zt)|0;var Ms=(k+O|0)+((w&8191)<<13)|0;k=(M+(w>>>13)|0)+(Ms>>>26)|0,Ms&=67108863,O=Math.imul(Ee,lt),w=Math.imul(Ee,rt),w=w+Math.imul(Me,lt)|0,M=Math.imul(Me,rt),O=O+Math.imul(Z,ht)|0,w=w+Math.imul(Z,pt)|0,w=w+Math.imul(ge,ht)|0,M=M+Math.imul(ge,pt)|0,O=O+Math.imul(de,mt)|0,w=w+Math.imul(de,gt)|0,w=w+Math.imul(se,mt)|0,M=M+Math.imul(se,gt)|0,O=O+Math.imul(Oe,bt)|0,w=w+Math.imul(Oe,st)|0,w=w+Math.imul(Je,bt)|0,M=M+Math.imul(Je,st)|0,O=O+Math.imul(me,Vt)|0,w=w+Math.imul(me,zt)|0,w=w+Math.imul(ke,Vt)|0,M=M+Math.imul(ke,zt)|0;var Rs=(k+O|0)+((w&8191)<<13)|0;k=(M+(w>>>13)|0)+(Rs>>>26)|0,Rs&=67108863,O=Math.imul(Ee,ht),w=Math.imul(Ee,pt),w=w+Math.imul(Me,ht)|0,M=Math.imul(Me,pt),O=O+Math.imul(Z,mt)|0,w=w+Math.imul(Z,gt)|0,w=w+Math.imul(ge,mt)|0,M=M+Math.imul(ge,gt)|0,O=O+Math.imul(de,bt)|0,w=w+Math.imul(de,st)|0,w=w+Math.imul(se,bt)|0,M=M+Math.imul(se,st)|0,O=O+Math.imul(Oe,Vt)|0,w=w+Math.imul(Oe,zt)|0,w=w+Math.imul(Je,Vt)|0,M=M+Math.imul(Je,zt)|0;var Bs=(k+O|0)+((w&8191)<<13)|0;k=(M+(w>>>13)|0)+(Bs>>>26)|0,Bs&=67108863,O=Math.imul(Ee,mt),w=Math.imul(Ee,gt),w=w+Math.imul(Me,mt)|0,M=Math.imul(Me,gt),O=O+Math.imul(Z,bt)|0,w=w+Math.imul(Z,st)|0,w=w+Math.imul(ge,bt)|0,M=M+Math.imul(ge,st)|0,O=O+Math.imul(de,Vt)|0,w=w+Math.imul(de,zt)|0,w=w+Math.imul(se,Vt)|0,M=M+Math.imul(se,zt)|0;var Cu=(k+O|0)+((w&8191)<<13)|0;k=(M+(w>>>13)|0)+(Cu>>>26)|0,Cu&=67108863,O=Math.imul(Ee,bt),w=Math.imul(Ee,st),w=w+Math.imul(Me,bt)|0,M=Math.imul(Me,st),O=O+Math.imul(Z,Vt)|0,w=w+Math.imul(Z,zt)|0,w=w+Math.imul(ge,Vt)|0,M=M+Math.imul(ge,zt)|0;var Iu=(k+O|0)+((w&8191)<<13)|0;k=(M+(w>>>13)|0)+(Iu>>>26)|0,Iu&=67108863,O=Math.imul(Ee,Vt),w=Math.imul(Ee,zt),w=w+Math.imul(Me,Vt)|0,M=Math.imul(Me,zt);var Du=(k+O|0)+((w&8191)<<13)|0;return k=(M+(w>>>13)|0)+(Du>>>26)|0,Du&=67108863,x[0]=Nn,x[1]=Ln,x[2]=Un,x[3]=en,x[4]=qn,x[5]=Fi,x[6]=Ds,x[7]=Ss,x[8]=Ts,x[9]=Vo,x[10]=zo,x[11]=Ko,x[12]=ks,x[13]=Ms,x[14]=Rs,x[15]=Bs,x[16]=Cu,x[17]=Iu,x[18]=Du,k!==0&&(x[19]=k,E.length++),E},"comb10MulTo");Math.imul||(F=H);function V(v,l,b){b.negative=l.negative^v.negative,b.length=v.length+l.length;for(var E=0,C=0,A=0;A<b.length-1;A++){var x=C;C=0;for(var k=E&67108863,O=Math.min(A,l.length-1),w=Math.max(0,A-v.length+1);w<=O;w++){var M=A-w,he=v.words[M]|0,B=l.words[w]|0,ee=he*B,ae=ee&67108863;x=x+(ee/67108864|0)|0,ae=ae+k|0,k=ae&67108863,x=x+(ae>>>26)|0,C+=x>>>26,x&=67108863}b.words[A]=k,E=x,x=C}return E!==0?b.words[A]=E:b.length--,b._strip()}o(V,"bigMulTo");function X(v,l,b){return V(v,l,b)}o(X,"jumboMulTo"),i.prototype.mulTo=o(function(l,b){var E,C=this.length+l.length;return this.length===10&&l.length===10?E=F(this,l,b):C<63?E=H(this,l,b):C<1024?E=V(this,l,b):E=X(this,l,b),E},"mulTo");function J(v,l){this.x=v,this.y=l}o(J,"FFTM"),J.prototype.makeRBT=o(function(l){for(var b=new Array(l),E=i.prototype._countBits(l)-1,C=0;C<l;C++)b[C]=this.revBin(C,E,l);return b},"makeRBT"),J.prototype.revBin=o(function(l,b,E){if(l===0||l===E-1)return l;for(var C=0,A=0;A<b;A++)C|=(l&1)<<b-A-1,l>>=1;return C},"revBin"),J.prototype.permute=o(function(l,b,E,C,A,x){for(var k=0;k<x;k++)C[k]=b[l[k]],A[k]=E[l[k]]},"permute"),J.prototype.transform=o(function(l,b,E,C,A,x){this.permute(x,l,b,E,C,A);for(var k=1;k<A;k<<=1)for(var O=k<<1,w=Math.cos(2*Math.PI/O),M=Math.sin(2*Math.PI/O),he=0;he<A;he+=O)for(var B=w,ee=M,ae=0;ae<k;ae++){var q=E[he+ae],U=C[he+ae],te=E[he+ae+k],oe=C[he+ae+k],ce=B*te-ee*oe;oe=B*oe+ee*te,te=ce,E[he+ae]=q+te,C[he+ae]=U+oe,E[he+ae+k]=q-te,C[he+ae+k]=U-oe,ae!==O&&(ce=w*B-M*ee,ee=w*ee+M*B,B=ce)}},"transform"),J.prototype.guessLen13b=o(function(l,b){var E=Math.max(b,l)|1,C=E&1,A=0;for(E=E/2|0;E;E=E>>>1)A++;return 1<<A+1+C},"guessLen13b"),J.prototype.conjugate=o(function(l,b,E){if(!(E<=1))for(var C=0;C<E/2;C++){var A=l[C];l[C]=l[E-C-1],l[E-C-1]=A,A=b[C],b[C]=-b[E-C-1],b[E-C-1]=-A}},"conjugate"),J.prototype.normalize13b=o(function(l,b){for(var E=0,C=0;C<b/2;C++){var A=Math.round(l[2*C+1]/b)*8192+Math.round(l[2*C]/b)+E;l[C]=A&67108863,A<67108864?E=0:E=A/67108864|0}return l},"normalize13b"),J.prototype.convert13b=o(function(l,b,E,C){for(var A=0,x=0;x<b;x++)A=A+(l[x]|0),E[2*x]=A&8191,A=A>>>13,E[2*x+1]=A&8191,A=A>>>13;for(x=2*b;x<C;++x)E[x]=0;r(A===0),r((A&-8192)===0)},"convert13b"),J.prototype.stub=o(function(l){for(var b=new Array(l),E=0;E<l;E++)b[E]=0;return b},"stub"),J.prototype.mulp=o(function(l,b,E){var C=2*this.guessLen13b(l.length,b.length),A=this.makeRBT(C),x=this.stub(C),k=new Array(C),O=new Array(C),w=new Array(C),M=new Array(C),he=new Array(C),B=new Array(C),ee=E.words;ee.length=C,this.convert13b(l.words,l.length,k,C),this.convert13b(b.words,b.length,M,C),this.transform(k,x,O,w,C,A),this.transform(M,x,he,B,C,A);for(var ae=0;ae<C;ae++){var q=O[ae]*he[ae]-w[ae]*B[ae];w[ae]=O[ae]*B[ae]+w[ae]*he[ae],O[ae]=q}return this.conjugate(O,w,C),this.transform(O,w,ee,x,C,A),this.conjugate(ee,x,C),this.normalize13b(ee,C),E.negative=l.negative^b.negative,E.length=l.length+b.length,E._strip()},"mulp"),i.prototype.mul=o(function(l){var b=new i(null);return b.words=new Array(this.length+l.length),this.mulTo(l,b)},"mul"),i.prototype.mulf=o(function(l){var b=new i(null);return b.words=new Array(this.length+l.length),X(this,l,b)},"mulf"),i.prototype.imul=o(function(l){return this.clone().mulTo(l,this)},"imul"),i.prototype.imuln=o(function(l){var b=l<0;b&&(l=-l),r(typeof l=="number"),r(l<67108864);for(var E=0,C=0;C<this.length;C++){var A=(this.words[C]|0)*l,x=(A&67108863)+(E&67108863);E>>=26,E+=A/67108864|0,E+=x>>>26,this.words[C]=x&67108863}return E!==0&&(this.words[C]=E,this.length++),b?this.ineg():this},"imuln"),i.prototype.muln=o(function(l){return this.clone().imuln(l)},"muln"),i.prototype.sqr=o(function(){return this.mul(this)},"sqr"),i.prototype.isqr=o(function(){return this.imul(this.clone())},"isqr"),i.prototype.pow=o(function(l){var b=R(l);if(b.length===0)return new i(1);for(var E=this,C=0;C<b.length&&b[C]===0;C++,E=E.sqr());if(++C<b.length)for(var A=E.sqr();C<b.length;C++,A=A.sqr())b[C]!==0&&(E=E.mul(A));return E},"pow"),i.prototype.iushln=o(function(l){r(typeof l=="number"&&l>=0);var b=l%26,E=(l-b)/26,C=67108863>>>26-b<<26-b,A;if(b!==0){var x=0;for(A=0;A<this.length;A++){var k=this.words[A]&C,O=(this.words[A]|0)-k<<b;this.words[A]=O|x,x=k>>>26-b}x&&(this.words[A]=x,this.length++)}if(E!==0){for(A=this.length-1;A>=0;A--)this.words[A+E]=this.words[A];for(A=0;A<E;A++)this.words[A]=0;this.length+=E}return this._strip()},"iushln"),i.prototype.ishln=o(function(l){return r(this.negative===0),this.iushln(l)},"ishln"),i.prototype.iushrn=o(function(l,b,E){r(typeof l=="number"&&l>=0);var C;b?C=(b-b%26)/26:C=0;var A=l%26,x=Math.min((l-A)/26,this.length),k=67108863^67108863>>>A<<A,O=E;if(C-=x,C=Math.max(0,C),O){for(var w=0;w<x;w++)O.words[w]=this.words[w];O.length=x}if(x!==0)if(this.length>x)for(this.length-=x,w=0;w<this.length;w++)this.words[w]=this.words[w+x];else this.words[0]=0,this.length=1;var M=0;for(w=this.length-1;w>=0&&(M!==0||w>=C);w--){var he=this.words[w]|0;this.words[w]=M<<26-A|he>>>A,M=he&k}return O&&M!==0&&(O.words[O.length++]=M),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},"iushrn"),i.prototype.ishrn=o(function(l,b,E){return r(this.negative===0),this.iushrn(l,b,E)},"ishrn"),i.prototype.shln=o(function(l){return this.clone().ishln(l)},"shln"),i.prototype.ushln=o(function(l){return this.clone().iushln(l)},"ushln"),i.prototype.shrn=o(function(l){return this.clone().ishrn(l)},"shrn"),i.prototype.ushrn=o(function(l){return this.clone().iushrn(l)},"ushrn"),i.prototype.testn=o(function(l){r(typeof l=="number"&&l>=0);var b=l%26,E=(l-b)/26,C=1<<b;if(this.length<=E)return!1;var A=this.words[E];return!!(A&C)},"testn"),i.prototype.imaskn=o(function(l){r(typeof l=="number"&&l>=0);var b=l%26,E=(l-b)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=E)return this;if(b!==0&&E++,this.length=Math.min(E,this.length),b!==0){var C=67108863^67108863>>>b<<b;this.words[this.length-1]&=C}return this._strip()},"imaskn"),i.prototype.maskn=o(function(l){return this.clone().imaskn(l)},"maskn"),i.prototype.iaddn=o(function(l){return r(typeof l=="number"),r(l<67108864),l<0?this.isubn(-l):this.negative!==0?this.length===1&&(this.words[0]|0)<=l?(this.words[0]=l-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(l),this.negative=1,this):this._iaddn(l)},"iaddn"),i.prototype._iaddn=o(function(l){this.words[0]+=l;for(var b=0;b<this.length&&this.words[b]>=67108864;b++)this.words[b]-=67108864,b===this.length-1?this.words[b+1]=1:this.words[b+1]++;return this.length=Math.max(this.length,b+1),this},"_iaddn"),i.prototype.isubn=o(function(l){if(r(typeof l=="number"),r(l<67108864),l<0)return this.iaddn(-l);if(this.negative!==0)return this.negative=0,this.iaddn(l),this.negative=1,this;if(this.words[0]-=l,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var b=0;b<this.length&&this.words[b]<0;b++)this.words[b]+=67108864,this.words[b+1]-=1;return this._strip()},"isubn"),i.prototype.addn=o(function(l){return this.clone().iaddn(l)},"addn"),i.prototype.subn=o(function(l){return this.clone().isubn(l)},"subn"),i.prototype.iabs=o(function(){return this.negative=0,this},"iabs"),i.prototype.abs=o(function(){return this.clone().iabs()},"abs"),i.prototype._ishlnsubmul=o(function(l,b,E){var C=l.length+E,A;this._expand(C);var x,k=0;for(A=0;A<l.length;A++){x=(this.words[A+E]|0)+k;var O=(l.words[A]|0)*b;x-=O&67108863,k=(x>>26)-(O/67108864|0),this.words[A+E]=x&67108863}for(;A<this.length-E;A++)x=(this.words[A+E]|0)+k,k=x>>26,this.words[A+E]=x&67108863;if(k===0)return this._strip();for(r(k===-1),k=0,A=0;A<this.length;A++)x=-(this.words[A]|0)+k,k=x>>26,this.words[A]=x&67108863;return this.negative=1,this._strip()},"_ishlnsubmul"),i.prototype._wordDiv=o(function(l,b){var E=this.length-l.length,C=this.clone(),A=l,x=A.words[A.length-1]|0,k=this._countBits(x);E=26-k,E!==0&&(A=A.ushln(E),C.iushln(E),x=A.words[A.length-1]|0);var O=C.length-A.length,w;if(b!=="mod"){w=new i(null),w.length=O+1,w.words=new Array(w.length);for(var M=0;M<w.length;M++)w.words[M]=0}var he=C.clone()._ishlnsubmul(A,1,O);he.negative===0&&(C=he,w&&(w.words[O]=1));for(var B=O-1;B>=0;B--){var ee=(C.words[A.length+B]|0)*67108864+(C.words[A.length+B-1]|0);for(ee=Math.min(ee/x|0,67108863),C._ishlnsubmul(A,ee,B);C.negative!==0;)ee--,C.negative=0,C._ishlnsubmul(A,1,B),C.isZero()||(C.negative^=1);w&&(w.words[B]=ee)}return w&&w._strip(),C._strip(),b!=="div"&&E!==0&&C.iushrn(E),{div:w||null,mod:C}},"_wordDiv"),i.prototype.divmod=o(function(l,b,E){if(r(!l.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var C,A,x;return this.negative!==0&&l.negative===0?(x=this.neg().divmod(l,b),b!=="mod"&&(C=x.div.neg()),b!=="div"&&(A=x.mod.neg(),E&&A.negative!==0&&A.iadd(l)),{div:C,mod:A}):this.negative===0&&l.negative!==0?(x=this.divmod(l.neg(),b),b!=="mod"&&(C=x.div.neg()),{div:C,mod:x.mod}):(this.negative&l.negative)!==0?(x=this.neg().divmod(l.neg(),b),b!=="div"&&(A=x.mod.neg(),E&&A.negative!==0&&A.isub(l)),{div:x.div,mod:A}):l.length>this.length||this.cmp(l)<0?{div:new i(0),mod:this}:l.length===1?b==="div"?{div:this.divn(l.words[0]),mod:null}:b==="mod"?{div:null,mod:new i(this.modrn(l.words[0]))}:{div:this.divn(l.words[0]),mod:new i(this.modrn(l.words[0]))}:this._wordDiv(l,b)},"divmod"),i.prototype.div=o(function(l){return this.divmod(l,"div",!1).div},"div"),i.prototype.mod=o(function(l){return this.divmod(l,"mod",!1).mod},"mod"),i.prototype.umod=o(function(l){return this.divmod(l,"mod",!0).mod},"umod"),i.prototype.divRound=o(function(l){var b=this.divmod(l);if(b.mod.isZero())return b.div;var E=b.div.negative!==0?b.mod.isub(l):b.mod,C=l.ushrn(1),A=l.andln(1),x=E.cmp(C);return x<0||A===1&&x===0?b.div:b.div.negative!==0?b.div.isubn(1):b.div.iaddn(1)},"divRound"),i.prototype.modrn=o(function(l){var b=l<0;b&&(l=-l),r(l<=67108863);for(var E=(1<<26)%l,C=0,A=this.length-1;A>=0;A--)C=(E*C+(this.words[A]|0))%l;return b?-C:C},"modrn"),i.prototype.modn=o(function(l){return this.modrn(l)},"modn"),i.prototype.idivn=o(function(l){var b=l<0;b&&(l=-l),r(l<=67108863);for(var E=0,C=this.length-1;C>=0;C--){var A=(this.words[C]|0)+E*67108864;this.words[C]=A/l|0,E=A%l}return this._strip(),b?this.ineg():this},"idivn"),i.prototype.divn=o(function(l){return this.clone().idivn(l)},"divn"),i.prototype.egcd=o(function(l){r(l.negative===0),r(!l.isZero());var b=this,E=l.clone();b.negative!==0?b=b.umod(l):b=b.clone();for(var C=new i(1),A=new i(0),x=new i(0),k=new i(1),O=0;b.isEven()&&E.isEven();)b.iushrn(1),E.iushrn(1),++O;for(var w=E.clone(),M=b.clone();!b.isZero();){for(var he=0,B=1;(b.words[0]&B)===0&&he<26;++he,B<<=1);if(he>0)for(b.iushrn(he);he-- >0;)(C.isOdd()||A.isOdd())&&(C.iadd(w),A.isub(M)),C.iushrn(1),A.iushrn(1);for(var ee=0,ae=1;(E.words[0]&ae)===0&&ee<26;++ee,ae<<=1);if(ee>0)for(E.iushrn(ee);ee-- >0;)(x.isOdd()||k.isOdd())&&(x.iadd(w),k.isub(M)),x.iushrn(1),k.iushrn(1);b.cmp(E)>=0?(b.isub(E),C.isub(x),A.isub(k)):(E.isub(b),x.isub(C),k.isub(A))}return{a:x,b:k,gcd:E.iushln(O)}},"egcd"),i.prototype._invmp=o(function(l){r(l.negative===0),r(!l.isZero());var b=this,E=l.clone();b.negative!==0?b=b.umod(l):b=b.clone();for(var C=new i(1),A=new i(0),x=E.clone();b.cmpn(1)>0&&E.cmpn(1)>0;){for(var k=0,O=1;(b.words[0]&O)===0&&k<26;++k,O<<=1);if(k>0)for(b.iushrn(k);k-- >0;)C.isOdd()&&C.iadd(x),C.iushrn(1);for(var w=0,M=1;(E.words[0]&M)===0&&w<26;++w,M<<=1);if(w>0)for(E.iushrn(w);w-- >0;)A.isOdd()&&A.iadd(x),A.iushrn(1);b.cmp(E)>=0?(b.isub(E),C.isub(A)):(E.isub(b),A.isub(C))}var he;return b.cmpn(1)===0?he=C:he=A,he.cmpn(0)<0&&he.iadd(l),he},"_invmp"),i.prototype.gcd=o(function(l){if(this.isZero())return l.abs();if(l.isZero())return this.abs();var b=this.clone(),E=l.clone();b.negative=0,E.negative=0;for(var C=0;b.isEven()&&E.isEven();C++)b.iushrn(1),E.iushrn(1);do{for(;b.isEven();)b.iushrn(1);for(;E.isEven();)E.iushrn(1);var A=b.cmp(E);if(A<0){var x=b;b=E,E=x}else if(A===0||E.cmpn(1)===0)break;b.isub(E)}while(!0);return E.iushln(C)},"gcd"),i.prototype.invm=o(function(l){return this.egcd(l).a.umod(l)},"invm"),i.prototype.isEven=o(function(){return(this.words[0]&1)===0},"isEven"),i.prototype.isOdd=o(function(){return(this.words[0]&1)===1},"isOdd"),i.prototype.andln=o(function(l){return this.words[0]&l},"andln"),i.prototype.bincn=o(function(l){r(typeof l=="number");var b=l%26,E=(l-b)/26,C=1<<b;if(this.length<=E)return this._expand(E+1),this.words[E]|=C,this;for(var A=C,x=E;A!==0&&x<this.length;x++){var k=this.words[x]|0;k+=A,A=k>>>26,k&=67108863,this.words[x]=k}return A!==0&&(this.words[x]=A,this.length++),this},"bincn"),i.prototype.isZero=o(function(){return this.length===1&&this.words[0]===0},"isZero"),i.prototype.cmpn=o(function(l){var b=l<0;if(this.negative!==0&&!b)return-1;if(this.negative===0&&b)return 1;this._strip();var E;if(this.length>1)E=1;else{b&&(l=-l),r(l<=67108863,"Number is too big");var C=this.words[0]|0;E=C===l?0:C<l?-1:1}return this.negative!==0?-E|0:E},"cmpn"),i.prototype.cmp=o(function(l){if(this.negative!==0&&l.negative===0)return-1;if(this.negative===0&&l.negative!==0)return 1;var b=this.ucmp(l);return this.negative!==0?-b|0:b},"cmp"),i.prototype.ucmp=o(function(l){if(this.length>l.length)return 1;if(this.length<l.length)return-1;for(var b=0,E=this.length-1;E>=0;E--){var C=this.words[E]|0,A=l.words[E]|0;if(C!==A){C<A?b=-1:C>A&&(b=1);break}}return b},"ucmp"),i.prototype.gtn=o(function(l){return this.cmpn(l)===1},"gtn"),i.prototype.gt=o(function(l){return this.cmp(l)===1},"gt"),i.prototype.gten=o(function(l){return this.cmpn(l)>=0},"gten"),i.prototype.gte=o(function(l){return this.cmp(l)>=0},"gte"),i.prototype.ltn=o(function(l){return this.cmpn(l)===-1},"ltn"),i.prototype.lt=o(function(l){return this.cmp(l)===-1},"lt"),i.prototype.lten=o(function(l){return this.cmpn(l)<=0},"lten"),i.prototype.lte=o(function(l){return this.cmp(l)<=0},"lte"),i.prototype.eqn=o(function(l){return this.cmpn(l)===0},"eqn"),i.prototype.eq=o(function(l){return this.cmp(l)===0},"eq"),i.red=o(function(l){return new g(l)},"red"),i.prototype.toRed=o(function(l){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),l.convertTo(this)._forceRed(l)},"toRed"),i.prototype.fromRed=o(function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},"fromRed"),i.prototype._forceRed=o(function(l){return this.red=l,this},"_forceRed"),i.prototype.forceRed=o(function(l){return r(!this.red,"Already a number in reduction context"),this._forceRed(l)},"forceRed"),i.prototype.redAdd=o(function(l){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,l)},"redAdd"),i.prototype.redIAdd=o(function(l){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,l)},"redIAdd"),i.prototype.redSub=o(function(l){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,l)},"redSub"),i.prototype.redISub=o(function(l){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,l)},"redISub"),i.prototype.redShl=o(function(l){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,l)},"redShl"),i.prototype.redMul=o(function(l){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.mul(this,l)},"redMul"),i.prototype.redIMul=o(function(l){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.imul(this,l)},"redIMul"),i.prototype.redSqr=o(function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},"redSqr"),i.prototype.redISqr=o(function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},"redISqr"),i.prototype.redSqrt=o(function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},"redSqrt"),i.prototype.redInvm=o(function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},"redInvm"),i.prototype.redNeg=o(function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},"redNeg"),i.prototype.redPow=o(function(l){return r(this.red&&!l.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,l)},"redPow");var re={k256:null,p224:null,p192:null,p25519:null};function z(v,l){this.name=v,this.p=new i(l,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}o(z,"MPrime"),z.prototype._tmp=o(function(){var l=new i(null);return l.words=new Array(Math.ceil(this.n/13)),l},"_tmp"),z.prototype.ireduce=o(function(l){var b=l,E;do this.split(b,this.tmp),b=this.imulK(b),b=b.iadd(this.tmp),E=b.bitLength();while(E>this.n);var C=E<this.n?-1:b.ucmp(this.p);return C===0?(b.words[0]=0,b.length=1):C>0?b.isub(this.p):b.strip!==void 0?b.strip():b._strip(),b},"ireduce"),z.prototype.split=o(function(l,b){l.iushrn(this.n,0,b)},"split"),z.prototype.imulK=o(function(l){return l.imul(this.k)},"imulK");function $(){z.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o($,"K256"),n($,z),$.prototype.split=o(function(l,b){for(var E=4194303,C=Math.min(l.length,9),A=0;A<C;A++)b.words[A]=l.words[A];if(b.length=C,l.length<=9){l.words[0]=0,l.length=1;return}var x=l.words[9];for(b.words[b.length++]=x&E,A=10;A<l.length;A++){var k=l.words[A]|0;l.words[A-10]=(k&E)<<4|x>>>22,x=k}x>>>=22,l.words[A-10]=x,x===0&&l.length>10?l.length-=10:l.length-=9},"split"),$.prototype.imulK=o(function(l){l.words[l.length]=0,l.words[l.length+1]=0,l.length+=2;for(var b=0,E=0;E<l.length;E++){var C=l.words[E]|0;b+=C*977,l.words[E]=b&67108863,b=C*64+(b/67108864|0)}return l.words[l.length-1]===0&&(l.length--,l.words[l.length-1]===0&&l.length--),l},"imulK");function G(){z.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}o(G,"P224"),n(G,z);function le(){z.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}o(le,"P192"),n(le,z);function P(){z.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}o(P,"P25519"),n(P,z),P.prototype.imulK=o(function(l){for(var b=0,E=0;E<l.length;E++){var C=(l.words[E]|0)*19+b,A=C&67108863;C>>>=26,l.words[E]=A,b=C}return b!==0&&(l.words[l.length++]=b),l},"imulK"),i._prime=o(function(l){if(re[l])return re[l];var b;if(l==="k256")b=new $;else if(l==="p224")b=new G;else if(l==="p192")b=new le;else if(l==="p25519")b=new P;else throw new Error("Unknown prime "+l);return re[l]=b,b},"prime");function g(v){if(typeof v=="string"){var l=i._prime(v);this.m=l.p,this.prime=l}else r(v.gtn(1),"modulus must be greater than 1"),this.m=v,this.prime=null}o(g,"Red"),g.prototype._verify1=o(function(l){r(l.negative===0,"red works only with positives"),r(l.red,"red works only with red numbers")},"_verify1"),g.prototype._verify2=o(function(l,b){r((l.negative|b.negative)===0,"red works only with positives"),r(l.red&&l.red===b.red,"red works only with red numbers")},"_verify2"),g.prototype.imod=o(function(l){return this.prime?this.prime.ireduce(l)._forceRed(this):(h(l,l.umod(this.m)._forceRed(this)),l)},"imod"),g.prototype.neg=o(function(l){return l.isZero()?l.clone():this.m.sub(l)._forceRed(this)},"neg"),g.prototype.add=o(function(l,b){this._verify2(l,b);var E=l.add(b);return E.cmp(this.m)>=0&&E.isub(this.m),E._forceRed(this)},"add"),g.prototype.iadd=o(function(l,b){this._verify2(l,b);var E=l.iadd(b);return E.cmp(this.m)>=0&&E.isub(this.m),E},"iadd"),g.prototype.sub=o(function(l,b){this._verify2(l,b);var E=l.sub(b);return E.cmpn(0)<0&&E.iadd(this.m),E._forceRed(this)},"sub"),g.prototype.isub=o(function(l,b){this._verify2(l,b);var E=l.isub(b);return E.cmpn(0)<0&&E.iadd(this.m),E},"isub"),g.prototype.shl=o(function(l,b){return this._verify1(l),this.imod(l.ushln(b))},"shl"),g.prototype.imul=o(function(l,b){return this._verify2(l,b),this.imod(l.imul(b))},"imul"),g.prototype.mul=o(function(l,b){return this._verify2(l,b),this.imod(l.mul(b))},"mul"),g.prototype.isqr=o(function(l){return this.imul(l,l.clone())},"isqr"),g.prototype.sqr=o(function(l){return this.mul(l,l)},"sqr"),g.prototype.sqrt=o(function(l){if(l.isZero())return l.clone();var b=this.m.andln(3);if(r(b%2===1),b===3){var E=this.m.add(new i(1)).iushrn(2);return this.pow(l,E)}for(var C=this.m.subn(1),A=0;!C.isZero()&&C.andln(1)===0;)A++,C.iushrn(1);r(!C.isZero());var x=new i(1).toRed(this),k=x.redNeg(),O=this.m.subn(1).iushrn(1),w=this.m.bitLength();for(w=new i(2*w*w).toRed(this);this.pow(w,O).cmp(k)!==0;)w.redIAdd(k);for(var M=this.pow(w,C),he=this.pow(l,C.addn(1).iushrn(1)),B=this.pow(l,C),ee=A;B.cmp(x)!==0;){for(var ae=B,q=0;ae.cmp(x)!==0;q++)ae=ae.redSqr();r(q<ee);var U=this.pow(M,new i(1).iushln(ee-q-1));he=he.redMul(U),M=U.redSqr(),B=B.redMul(M),ee=q}return he},"sqrt"),g.prototype.invm=o(function(l){var b=l._invmp(this.m);return b.negative!==0?(b.negative=0,this.imod(b).redNeg()):this.imod(b)},"invm"),g.prototype.pow=o(function(l,b){if(b.isZero())return new i(1).toRed(this);if(b.cmpn(1)===0)return l.clone();var E=4,C=new Array(1<<E);C[0]=new i(1).toRed(this),C[1]=l;for(var A=2;A<C.length;A++)C[A]=this.mul(C[A-1],l);var x=C[0],k=0,O=0,w=b.bitLength()%26;for(w===0&&(w=26),A=b.length-1;A>=0;A--){for(var M=b.words[A],he=w-1;he>=0;he--){var B=M>>he&1;if(x!==C[0]&&(x=this.sqr(x)),B===0&&k===0){O=0;continue}k<<=1,k|=B,O++,!(O!==E&&(A!==0||he!==0))&&(x=this.mul(x,C[k]),O=0,k=0)}w=26}return x},"pow"),g.prototype.convertTo=o(function(l){var b=l.umod(this.m);return b===l?b.clone():b},"convertTo"),g.prototype.convertFrom=o(function(l){var b=l.clone();return b.red=null,b},"convertFrom"),i.mont=o(function(l){return new _(l)},"mont");function _(v){g.call(this,v),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}o(_,"Mont"),n(_,g),_.prototype.convertTo=o(function(l){return this.imod(l.ushln(this.shift))},"convertTo"),_.prototype.convertFrom=o(function(l){var b=this.imod(l.mul(this.rinv));return b.red=null,b},"convertFrom"),_.prototype.imul=o(function(l,b){if(l.isZero()||b.isZero())return l.words[0]=0,l.length=1,l;var E=l.imul(b),C=E.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=E.isub(C).iushrn(this.shift),x=A;return A.cmp(this.m)>=0?x=A.isub(this.m):A.cmpn(0)<0&&(x=A.iadd(this.m)),x._forceRed(this)},"imul"),_.prototype.mul=o(function(l,b){if(l.isZero()||b.isZero())return new i(0)._forceRed(this);var E=l.mul(b),C=E.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=E.isub(C).iushrn(this.shift),x=A;return A.cmp(this.m)>=0?x=A.isub(this.m):A.cmpn(0)<0&&(x=A.iadd(this.m)),x._forceRed(this)},"mul"),_.prototype.invm=o(function(l){var b=this.imod(l._invmp(this.m).mul(this.r2));return b._forceRed(this)},"invm")})(typeof Kx>"u"||Kx,eF)});var LF=Q((F9e,NF)=>{NF.exports=a4;var OF=128,Sde=127,Tde=~Sde,kde=Math.pow(2,31);function a4(t,e,r){if(Number.MAX_SAFE_INTEGER&&t>Number.MAX_SAFE_INTEGER)throw a4.bytes=0,new RangeError("Could not encode varint");e=e||[],r=r||0;for(var n=r;t>=kde;)e[r++]=t&255|OF,t/=128;for(;t&Tde;)e[r++]=t&255|OF,t>>>=7;return e[r]=t|0,a4.bytes=r-n+1,e}o(a4,"encode")});var $F=Q((P9e,qF)=>{qF.exports=c4;var Mde=128,UF=127;function c4(t,n){var r=0,n=n||0,i=0,s=n,a,f=t.length;do{if(s>=f||i>49)throw c4.bytes=0,new RangeError("Could not decode varint");a=t[s++],r+=i<28?(a&UF)<<i:(a&UF)*Math.pow(2,i),i+=7}while(a>=Mde);return c4.bytes=s-n,r}o(c4,"read")});var HF=Q((O9e,jF)=>{var Rde=Math.pow(2,7),Bde=Math.pow(2,14),Fde=Math.pow(2,21),Pde=Math.pow(2,28),Ode=Math.pow(2,35),Nde=Math.pow(2,42),Lde=Math.pow(2,49),Ude=Math.pow(2,56),qde=Math.pow(2,63);jF.exports=function(t){return t<Rde?1:t<Bde?2:t<Fde?3:t<Pde?4:t<Ode?5:t<Nde?6:t<Lde?7:t<Ude?8:t<qde?9:10}});var D0=Q((N9e,VF)=>{VF.exports={encode:LF(),decode:$F(),encodingLength:HF()}});var eP=Q((j9e,QF)=>{"use strict";QF.exports=function(t,e){e||(e={}),typeof e=="function"&&(e={cmp:e});var r=typeof e.cycles=="boolean"?e.cycles:!1,n=e.cmp&&function(s){return function(a){return function(f,d){var h={key:f,value:a[f]},p={key:d,value:a[d]};return s(h,p)}}}(e.cmp),i=[];return o(function s(a){if(a&&a.toJSON&&typeof a.toJSON=="function"&&(a=a.toJSON()),a!==void 0){if(typeof a=="number")return isFinite(a)?""+a:"null";if(typeof a!="object")return JSON.stringify(a);var f,d;if(Array.isArray(a)){for(d="[",f=0;f<a.length;f++)f&&(d+=","),d+=s(a[f])||"null";return d+"]"}if(a===null)return"null";if(i.indexOf(a)!==-1){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var h=i.push(a)-1,p=Object.keys(a).sort(n&&n(a));for(d="",f=0;f<p.length;f++){var y=p[f],I=s(a[y]);!I||(d&&(d+=","),d+=JSON.stringify(y)+":"+I)}return i.splice(h,1),"{"+d+"}"}},"stringify")(t)}});var Qd=Q((R0,Yd)=>{var wle=200,vP="__lodash_hash_undefined__",yP=9007199254740991,M4="[object Arguments]",_le="[object Array]",xP="[object Boolean]",wP="[object Date]",Ele="[object Error]",R4="[object Function]",_P="[object GeneratorFunction]",Yg="[object Map]",EP="[object Number]",B4="[object Object]",aP="[object Promise]",AP="[object RegExp]",Jg="[object Set]",CP="[object String]",IP="[object Symbol]",C4="[object WeakMap]",DP="[object ArrayBuffer]",Xg="[object DataView]",SP="[object Float32Array]",TP="[object Float64Array]",kP="[object Int8Array]",MP="[object Int16Array]",RP="[object Int32Array]",BP="[object Uint8Array]",FP="[object Uint8ClampedArray]",PP="[object Uint16Array]",OP="[object Uint32Array]",Ale=/[\\^$.*+?()[\]{}|]/g,Cle=/\w*$/,Ile=/^\[object .+?Constructor\]$/,Dle=/^(?:0|[1-9]\d*)$/,ur={};ur[M4]=ur[_le]=ur[DP]=ur[Xg]=ur[xP]=ur[wP]=ur[SP]=ur[TP]=ur[kP]=ur[MP]=ur[RP]=ur[Yg]=ur[EP]=ur[B4]=ur[AP]=ur[Jg]=ur[CP]=ur[IP]=ur[BP]=ur[FP]=ur[PP]=ur[OP]=!0;ur[Ele]=ur[R4]=ur[C4]=!1;var Sle=typeof global=="object"&&global&&global.Object===Object&&global,Tle=typeof self=="object"&&self&&self.Object===Object&&self,la=Sle||Tle||Function("return this")(),NP=typeof R0=="object"&&R0&&!R0.nodeType&&R0,cP=NP&&typeof Yd=="object"&&Yd&&!Yd.nodeType&&Yd,kle=cP&&cP.exports===NP;function Mle(t,e){return t.set(e[0],e[1]),t}o(Mle,"addMapEntry");function Rle(t,e){return t.add(e),t}o(Rle,"addSetEntry");function Ble(t,e){for(var r=-1,n=t?t.length:0;++r<n&&e(t[r],r,t)!==!1;);return t}o(Ble,"arrayEach");function Fle(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}o(Fle,"arrayPush");function LP(t,e,r,n){var i=-1,s=t?t.length:0;for(n&&s&&(r=t[++i]);++i<s;)r=e(r,t[i],i,t);return r}o(LP,"arrayReduce");function Ple(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}o(Ple,"baseTimes");function Ole(t,e){return t?.[e]}o(Ole,"getValue");function UP(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}o(UP,"isHostObject");function fP(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}o(fP,"mapToArray");function F4(t,e){return function(r){return t(e(r))}}o(F4,"overArg");function uP(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}o(uP,"setToArray");var Nle=Array.prototype,Lle=Function.prototype,Zg=Object.prototype,A4=la["__core-js_shared__"],dP=function(){var t=/[^.]+$/.exec(A4&&A4.keys&&A4.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),qP=Lle.toString,Bc=Zg.hasOwnProperty,Qg=Zg.toString,Ule=RegExp("^"+qP.call(Bc).replace(Ale,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),lP=kle?la.Buffer:void 0,hP=la.Symbol,pP=la.Uint8Array,qle=F4(Object.getPrototypeOf,Object),$le=Object.create,jle=Zg.propertyIsEnumerable,Hle=Nle.splice,mP=Object.getOwnPropertySymbols,Vle=lP?lP.isBuffer:void 0,zle=F4(Object.keys,Object),I4=Zd(la,"DataView"),B0=Zd(la,"Map"),D4=Zd(la,"Promise"),S4=Zd(la,"Set"),T4=Zd(la,"WeakMap"),F0=Zd(Object,"create"),Kle=Zf(I4),Gle=Zf(B0),Wle=Zf(D4),Yle=Zf(S4),Jle=Zf(T4),gP=hP?hP.prototype:void 0,bP=gP?gP.valueOf:void 0;function Xf(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}o(Xf,"Hash");function Xle(){this.__data__=F0?F0(null):{}}o(Xle,"hashClear");function Zle(t){return this.has(t)&&delete this.__data__[t]}o(Zle,"hashDelete");function Qle(t){var e=this.__data__;if(F0){var r=e[t];return r===vP?void 0:r}return Bc.call(e,t)?e[t]:void 0}o(Qle,"hashGet");function ehe(t){var e=this.__data__;return F0?e[t]!==void 0:Bc.call(e,t)}o(ehe,"hashHas");function the(t,e){var r=this.__data__;return r[t]=F0&&e===void 0?vP:e,this}o(the,"hashSet");Xf.prototype.clear=Xle;Xf.prototype.delete=Zle;Xf.prototype.get=Qle;Xf.prototype.has=ehe;Xf.prototype.set=the;function ha(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}o(ha,"ListCache");function rhe(){this.__data__=[]}o(rhe,"listCacheClear");function nhe(t){var e=this.__data__,r=eb(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Hle.call(e,r,1),!0}o(nhe,"listCacheDelete");function ihe(t){var e=this.__data__,r=eb(e,t);return r<0?void 0:e[r][1]}o(ihe,"listCacheGet");function ohe(t){return eb(this.__data__,t)>-1}o(ohe,"listCacheHas");function she(t,e){var r=this.__data__,n=eb(r,t);return n<0?r.push([t,e]):r[n][1]=e,this}o(she,"listCacheSet");ha.prototype.clear=rhe;ha.prototype.delete=nhe;ha.prototype.get=ihe;ha.prototype.has=ohe;ha.prototype.set=she;function Jd(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}o(Jd,"MapCache");function ahe(){this.__data__={hash:new Xf,map:new(B0||ha),string:new Xf}}o(ahe,"mapCacheClear");function che(t){return tb(this,t).delete(t)}o(che,"mapCacheDelete");function fhe(t){return tb(this,t).get(t)}o(fhe,"mapCacheGet");function uhe(t){return tb(this,t).has(t)}o(uhe,"mapCacheHas");function dhe(t,e){return tb(this,t).set(t,e),this}o(dhe,"mapCacheSet");Jd.prototype.clear=ahe;Jd.prototype.delete=che;Jd.prototype.get=fhe;Jd.prototype.has=uhe;Jd.prototype.set=dhe;function Xd(t){this.__data__=new ha(t)}o(Xd,"Stack");function lhe(){this.__data__=new ha}o(lhe,"stackClear");function hhe(t){return this.__data__.delete(t)}o(hhe,"stackDelete");function phe(t){return this.__data__.get(t)}o(phe,"stackGet");function mhe(t){return this.__data__.has(t)}o(mhe,"stackHas");function ghe(t,e){var r=this.__data__;if(r instanceof ha){var n=r.__data__;if(!B0||n.length<wle-1)return n.push([t,e]),this;r=this.__data__=new Jd(n)}return r.set(t,e),this}o(ghe,"stackSet");Xd.prototype.clear=lhe;Xd.prototype.delete=hhe;Xd.prototype.get=phe;Xd.prototype.has=mhe;Xd.prototype.set=ghe;function bhe(t,e){var r=O4(t)||$he(t)?Ple(t.length,String):[],n=r.length,i=!!n;for(var s in t)(e||Bc.call(t,s))&&!(i&&(s=="length"||Nhe(s,n)))&&r.push(s);return r}o(bhe,"arrayLikeKeys");function $P(t,e,r){var n=t[e];(!(Bc.call(t,e)&&zP(n,r))||r===void 0&&!(e in t))&&(t[e]=r)}o($P,"assignValue");function eb(t,e){for(var r=t.length;r--;)if(zP(t[r][0],e))return r;return-1}o(eb,"assocIndexOf");function vhe(t,e){return t&&jP(e,N4(e),t)}o(vhe,"baseAssign");function k4(t,e,r,n,i,s,a){var f;if(n&&(f=s?n(t,i,s,a):n(t)),f!==void 0)return f;if(!rb(t))return t;var d=O4(t);if(d){if(f=Fhe(t),!e)return Mhe(t,f)}else{var h=Jf(t),p=h==R4||h==_P;if(Hhe(t))return Ahe(t,e);if(h==B4||h==M4||p&&!s){if(UP(t))return s?t:{};if(f=Phe(p?{}:t),!e)return Rhe(t,vhe(f,t))}else{if(!ur[h])return s?t:{};f=Ohe(t,h,k4,e)}}a||(a=new Xd);var y=a.get(t);if(y)return y;if(a.set(t,f),!d)var I=r?Bhe(t):N4(t);return Ble(I||t,function(T,D){I&&(D=T,T=t[D]),$P(f,D,k4(T,e,r,n,D,t,a))}),f}o(k4,"baseClone");function yhe(t){return rb(t)?$le(t):{}}o(yhe,"baseCreate");function xhe(t,e,r){var n=e(t);return O4(t)?n:Fle(n,r(t))}o(xhe,"baseGetAllKeys");function whe(t){return Qg.call(t)}o(whe,"baseGetTag");function _he(t){if(!rb(t)||Uhe(t))return!1;var e=GP(t)||UP(t)?Ule:Ile;return e.test(Zf(t))}o(_he,"baseIsNative");function Ehe(t){if(!VP(t))return zle(t);var e=[];for(var r in Object(t))Bc.call(t,r)&&r!="constructor"&&e.push(r);return e}o(Ehe,"baseKeys");function Ahe(t,e){if(e)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}o(Ahe,"cloneBuffer");function P4(t){var e=new t.constructor(t.byteLength);return new pP(e).set(new pP(t)),e}o(P4,"cloneArrayBuffer");function Che(t,e){var r=e?P4(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}o(Che,"cloneDataView");function Ihe(t,e,r){var n=e?r(fP(t),!0):fP(t);return LP(n,Mle,new t.constructor)}o(Ihe,"cloneMap");function Dhe(t){var e=new t.constructor(t.source,Cle.exec(t));return e.lastIndex=t.lastIndex,e}o(Dhe,"cloneRegExp");function She(t,e,r){var n=e?r(uP(t),!0):uP(t);return LP(n,Rle,new t.constructor)}o(She,"cloneSet");function The(t){return bP?Object(bP.call(t)):{}}o(The,"cloneSymbol");function khe(t,e){var r=e?P4(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}o(khe,"cloneTypedArray");function Mhe(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}o(Mhe,"copyArray");function jP(t,e,r,n){r||(r={});for(var i=-1,s=e.length;++i<s;){var a=e[i],f=n?n(r[a],t[a],a,r,t):void 0;$P(r,a,f===void 0?t[a]:f)}return r}o(jP,"copyObject");function Rhe(t,e){return jP(t,HP(t),e)}o(Rhe,"copySymbols");function Bhe(t){return xhe(t,N4,HP)}o(Bhe,"getAllKeys");function tb(t,e){var r=t.__data__;return Lhe(e)?r[typeof e=="string"?"string":"hash"]:r.map}o(tb,"getMapData");function Zd(t,e){var r=Ole(t,e);return _he(r)?r:void 0}o(Zd,"getNative");var HP=mP?F4(mP,Object):Khe,Jf=whe;(I4&&Jf(new I4(new ArrayBuffer(1)))!=Xg||B0&&Jf(new B0)!=Yg||D4&&Jf(D4.resolve())!=aP||S4&&Jf(new S4)!=Jg||T4&&Jf(new T4)!=C4)&&(Jf=o(function(t){var e=Qg.call(t),r=e==B4?t.constructor:void 0,n=r?Zf(r):void 0;if(n)switch(n){case Kle:return Xg;case Gle:return Yg;case Wle:return aP;case Yle:return Jg;case Jle:return C4}return e},"getTag"));function Fhe(t){var e=t.length,r=t.constructor(e);return e&&typeof t[0]=="string"&&Bc.call(t,"index")&&(r.index=t.index,r.input=t.input),r}o(Fhe,"initCloneArray");function Phe(t){return typeof t.constructor=="function"&&!VP(t)?yhe(qle(t)):{}}o(Phe,"initCloneObject");function Ohe(t,e,r,n){var i=t.constructor;switch(e){case DP:return P4(t);case xP:case wP:return new i(+t);case Xg:return Che(t,n);case SP:case TP:case kP:case MP:case RP:case BP:case FP:case PP:case OP:return khe(t,n);case Yg:return Ihe(t,n,r);case EP:case CP:return new i(t);case AP:return Dhe(t);case Jg:return She(t,n,r);case IP:return The(t)}}o(Ohe,"initCloneByTag");function Nhe(t,e){return e=e??yP,!!e&&(typeof t=="number"||Dle.test(t))&&t>-1&&t%1==0&&t<e}o(Nhe,"isIndex");function Lhe(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}o(Lhe,"isKeyable");function Uhe(t){return!!dP&&dP in t}o(Uhe,"isMasked");function VP(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Zg;return t===r}o(VP,"isPrototype");function Zf(t){if(t!=null){try{return qP.call(t)}catch{}try{return t+""}catch{}}return""}o(Zf,"toSource");function qhe(t){return k4(t,!0,!0)}o(qhe,"cloneDeep");function zP(t,e){return t===e||t!==t&&e!==e}o(zP,"eq");function $he(t){return jhe(t)&&Bc.call(t,"callee")&&(!jle.call(t,"callee")||Qg.call(t)==M4)}o($he,"isArguments");var O4=Array.isArray;function KP(t){return t!=null&&Vhe(t.length)&&!GP(t)}o(KP,"isArrayLike");function jhe(t){return zhe(t)&&KP(t)}o(jhe,"isArrayLikeObject");var Hhe=Vle||Ghe;function GP(t){var e=rb(t)?Qg.call(t):"";return e==R4||e==_P}o(GP,"isFunction");function Vhe(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=yP}o(Vhe,"isLength");function rb(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}o(rb,"isObject");function zhe(t){return!!t&&typeof t=="object"}o(zhe,"isObjectLike");function N4(t){return KP(t)?bhe(t):Ehe(t)}o(N4,"keys");function Khe(){return[]}o(Khe,"stubArray");function Ghe(){return!1}o(Ghe,"stubFalse");Yd.exports=qhe});var SO=Q((O_e,fb)=>{var nO,iO,oO,sO,aO,cO,fO,uO,dO,lO,hO,pO,mO,ab,K4,gO,bO,vO,il,yO,xO,wO,_O,EO,AO,CO,IO,DO,cb;(function(t){var e=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(n){t(r(e,r(n)))}):typeof fb=="object"&&typeof fb.exports=="object"?t(r(e,r(fb.exports))):t(r(e));function r(n,i){return n!==e&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(s,a){return n[s]=i?i(s,a):a}}o(r,"createExporter")})(function(t){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])};nO=o(function(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");e(n,i);function s(){this.constructor=n}o(s,"__"),n.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s)},"__extends"),iO=Object.assign||function(n){for(var i,s=1,a=arguments.length;s<a;s++){i=arguments[s];for(var f in i)Object.prototype.hasOwnProperty.call(i,f)&&(n[f]=i[f])}return n},oO=o(function(n,i){var s={};for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&i.indexOf(a)<0&&(s[a]=n[a]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,a=Object.getOwnPropertySymbols(n);f<a.length;f++)i.indexOf(a[f])<0&&Object.prototype.propertyIsEnumerable.call(n,a[f])&&(s[a[f]]=n[a[f]]);return s},"__rest"),sO=o(function(n,i,s,a){var f=arguments.length,d=f<3?i:a===null?a=Object.getOwnPropertyDescriptor(i,s):a,h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(n,i,s,a);else for(var p=n.length-1;p>=0;p--)(h=n[p])&&(d=(f<3?h(d):f>3?h(i,s,d):h(i,s))||d);return f>3&&d&&Object.defineProperty(i,s,d),d},"__decorate"),aO=o(function(n,i){return function(s,a){i(s,a,n)}},"__param"),cO=o(function(n,i,s,a,f,d){function h(J){if(J!==void 0&&typeof J!="function")throw new TypeError("Function expected");return J}o(h,"accept");for(var p=a.kind,y=p==="getter"?"get":p==="setter"?"set":"value",I=!i&&n?a.static?n:n.prototype:null,T=i||(I?Object.getOwnPropertyDescriptor(I,a.name):{}),D,R=!1,H=s.length-1;H>=0;H--){var F={};for(var V in a)F[V]=V==="access"?{}:a[V];for(var V in a.access)F.access[V]=a.access[V];F.addInitializer=function(J){if(R)throw new TypeError("Cannot add initializers after decoration has completed");d.push(h(J||null))};var X=(0,s[H])(p==="accessor"?{get:T.get,set:T.set}:T[y],F);if(p==="accessor"){if(X===void 0)continue;if(X===null||typeof X!="object")throw new TypeError("Object expected");(D=h(X.get))&&(T.get=D),(D=h(X.set))&&(T.set=D),(D=h(X.init))&&f.push(D)}else(D=h(X))&&(p==="field"?f.push(D):T[y]=D)}I&&Object.defineProperty(I,a.name,T),R=!0},"__esDecorate"),fO=o(function(n,i,s){for(var a=arguments.length>2,f=0;f<i.length;f++)s=a?i[f].call(n,s):i[f].call(n);return a?s:void 0},"__runInitializers"),uO=o(function(n){return typeof n=="symbol"?n:"".concat(n)},"__propKey"),dO=o(function(n,i,s){return typeof i=="symbol"&&(i=i.description?"[".concat(i.description,"]"):""),Object.defineProperty(n,"name",{configurable:!0,value:s?"".concat(s," ",i):i})},"__setFunctionName"),lO=o(function(n,i){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,i)},"__metadata"),hO=o(function(n,i,s,a){function f(d){return d instanceof s?d:new s(function(h){h(d)})}return o(f,"adopt"),new(s||(s=Promise))(function(d,h){function p(T){try{I(a.next(T))}catch(D){h(D)}}o(p,"fulfilled");function y(T){try{I(a.throw(T))}catch(D){h(D)}}o(y,"rejected");function I(T){T.done?d(T.value):f(T.value).then(p,y)}o(I,"step"),I((a=a.apply(n,i||[])).next())})},"__awaiter"),pO=o(function(n,i){var s={label:0,sent:function(){if(d[0]&1)throw d[1];return d[1]},trys:[],ops:[]},a,f,d,h;return h={next:p(0),throw:p(1),return:p(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function p(I){return function(T){return y([I,T])}}function y(I){if(a)throw new TypeError("Generator is already executing.");for(;h&&(h=0,I[0]&&(s=0)),s;)try{if(a=1,f&&(d=I[0]&2?f.return:I[0]?f.throw||((d=f.return)&&d.call(f),0):f.next)&&!(d=d.call(f,I[1])).done)return d;switch(f=0,d&&(I=[I[0]&2,d.value]),I[0]){case 0:case 1:d=I;break;case 4:return s.label++,{value:I[1],done:!1};case 5:s.label++,f=I[1],I=[0];continue;case 7:I=s.ops.pop(),s.trys.pop();continue;default:if(d=s.trys,!(d=d.length>0&&d[d.length-1])&&(I[0]===6||I[0]===2)){s=0;continue}if(I[0]===3&&(!d||I[1]>d[0]&&I[1]<d[3])){s.label=I[1];break}if(I[0]===6&&s.label<d[1]){s.label=d[1],d=I;break}if(d&&s.label<d[2]){s.label=d[2],s.ops.push(I);break}d[2]&&s.ops.pop(),s.trys.pop();continue}I=i.call(n,s)}catch(T){I=[6,T],f=0}finally{a=d=0}if(I[0]&5)throw I[1];return{value:I[0]?I[1]:void 0,done:!0}}},"__generator"),mO=o(function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&cb(i,n,s)},"__exportStar"),cb=Object.create?function(n,i,s,a){a===void 0&&(a=s);var f=Object.getOwnPropertyDescriptor(i,s);(!f||("get"in f?!i.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,a,f)}:function(n,i,s,a){a===void 0&&(a=s),n[a]=i[s]},ab=o(function(n){var i=typeof Symbol=="function"&&Symbol.iterator,s=i&&n[i],a=0;if(s)return s.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&a>=n.length&&(n=void 0),{value:n&&n[a++],done:!n}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},"__values"),K4=o(function(n,i){var s=typeof Symbol=="function"&&n[Symbol.iterator];if(!s)return n;var a=s.call(n),f,d=[],h;try{for(;(i===void 0||i-- >0)&&!(f=a.next()).done;)d.push(f.value)}catch(p){h={error:p}}finally{try{f&&!f.done&&(s=a.return)&&s.call(a)}finally{if(h)throw h.error}}return d},"__read"),gO=o(function(){for(var n=[],i=0;i<arguments.length;i++)n=n.concat(K4(arguments[i]));return n},"__spread"),bO=o(function(){for(var n=0,i=0,s=arguments.length;i<s;i++)n+=arguments[i].length;for(var a=Array(n),f=0,i=0;i<s;i++)for(var d=arguments[i],h=0,p=d.length;h<p;h++,f++)a[f]=d[h];return a},"__spreadArrays"),vO=o(function(n,i,s){if(s||arguments.length===2)for(var a=0,f=i.length,d;a<f;a++)(d||!(a in i))&&(d||(d=Array.prototype.slice.call(i,0,a)),d[a]=i[a]);return n.concat(d||Array.prototype.slice.call(i))},"__spreadArray"),il=o(function(n){return this instanceof il?(this.v=n,this):new il(n)},"__await"),yO=o(function(n,i,s){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=s.apply(n,i||[]),f,d=[];return f={},h("next"),h("throw"),h("return"),f[Symbol.asyncIterator]=function(){return this},f;function h(R){a[R]&&(f[R]=function(H){return new Promise(function(F,V){d.push([R,H,F,V])>1||p(R,H)})})}function p(R,H){try{y(a[R](H))}catch(F){D(d[0][3],F)}}function y(R){R.value instanceof il?Promise.resolve(R.value.v).then(I,T):D(d[0][2],R)}function I(R){p("next",R)}function T(R){p("throw",R)}function D(R,H){R(H),d.shift(),d.length&&p(d[0][0],d[0][1])}},"__asyncGenerator"),xO=o(function(n){var i,s;return i={},a("next"),a("throw",function(f){throw f}),a("return"),i[Symbol.iterator]=function(){return this},i;function a(f,d){i[f]=n[f]?function(h){return(s=!s)?{value:il(n[f](h)),done:!1}:d?d(h):h}:d}},"__asyncDelegator"),wO=o(function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=n[Symbol.asyncIterator],s;return i?i.call(n):(n=typeof ab=="function"?ab(n):n[Symbol.iterator](),s={},a("next"),a("throw"),a("return"),s[Symbol.asyncIterator]=function(){return this},s);function a(d){s[d]=n[d]&&function(h){return new Promise(function(p,y){h=n[d](h),f(p,y,h.done,h.value)})}}function f(d,h,p,y){Promise.resolve(y).then(function(I){d({value:I,done:p})},h)}},"__asyncValues"),_O=o(function(n,i){return Object.defineProperty?Object.defineProperty(n,"raw",{value:i}):n.raw=i,n},"__makeTemplateObject");var r=Object.create?function(n,i){Object.defineProperty(n,"default",{enumerable:!0,value:i})}:function(n,i){n.default=i};EO=o(function(n){if(n&&n.__esModule)return n;var i={};if(n!=null)for(var s in n)s!=="default"&&Object.prototype.hasOwnProperty.call(n,s)&&cb(i,n,s);return r(i,n),i},"__importStar"),AO=o(function(n){return n&&n.__esModule?n:{default:n}},"__importDefault"),CO=o(function(n,i,s,a){if(s==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof i=="function"?n!==i||!a:!i.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?a:s==="a"?a.call(n):a?a.value:i.get(n)},"__classPrivateFieldGet"),IO=o(function(n,i,s,a,f){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!f)throw new TypeError("Private accessor was defined without a setter");if(typeof i=="function"?n!==i||!f:!i.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?f.call(n,s):f?f.value=s:i.set(n,s),s},"__classPrivateFieldSet"),DO=o(function(n,i){if(i===null||typeof i!="object"&&typeof i!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof n=="function"?i===n:n.has(i)},"__classPrivateFieldIn"),t("__extends",nO),t("__assign",iO),t("__rest",oO),t("__decorate",sO),t("__param",aO),t("__esDecorate",cO),t("__runInitializers",fO),t("__propKey",uO),t("__setFunctionName",dO),t("__metadata",lO),t("__awaiter",hO),t("__generator",pO),t("__exportStar",mO),t("__createBinding",cb),t("__values",ab),t("__read",K4),t("__spread",gO),t("__spreadArrays",bO),t("__spreadArray",vO),t("__await",il),t("__asyncGenerator",yO),t("__asyncDelegator",xO),t("__asyncValues",wO),t("__makeTemplateObject",_O),t("__importStar",EO),t("__importDefault",AO),t("__classPrivateFieldGet",CO),t("__classPrivateFieldSet",IO),t("__classPrivateFieldIn",DO)})});var EN=Q((KDe,_N)=>{"use strict";var B0e=function(){function t(r,n){if(typeof r!="function")throw new TypeError("DataLoader must be constructed with a function which accepts "+("Array<key> and returns Promise<Array<value>>, but got: "+r+"."));this._batchLoadFn=r,this._maxBatchSize=N0e(n),this._batchScheduleFn=L0e(n),this._cacheKeyFn=U0e(n),this._cacheMap=q0e(n),this._batch=null,this.name=$0e(n)}o(t,"DataLoader");var e=t.prototype;return e.load=o(function(n){if(n==null)throw new TypeError("The loader.load() function must be called with a value, "+("but got: "+String(n)+"."));var i=P0e(this),s=this._cacheMap,a=this._cacheKeyFn(n);if(s){var f=s.get(a);if(f){var d=i.cacheHits||(i.cacheHits=[]);return new Promise(function(p){d.push(function(){p(f)})})}}i.keys.push(n);var h=new Promise(function(p,y){i.callbacks.push({resolve:p,reject:y})});return s&&s.set(a,h),h},"load"),e.loadMany=o(function(n){if(!wN(n))throw new TypeError("The loader.loadMany() function must be called with Array<key> "+("but got: "+n+"."));for(var i=[],s=0;s<n.length;s++)i.push(this.load(n[s]).catch(function(a){return a}));return Promise.all(i)},"loadMany"),e.clear=o(function(n){var i=this._cacheMap;if(i){var s=this._cacheKeyFn(n);i.delete(s)}return this},"clear"),e.clearAll=o(function(){var n=this._cacheMap;return n&&n.clear(),this},"clearAll"),e.prime=o(function(n,i){var s=this._cacheMap;if(s){var a=this._cacheKeyFn(n);if(s.get(a)===void 0){var f;i instanceof Error?(f=Promise.reject(i),f.catch(function(){})):f=Promise.resolve(i),s.set(a,f)}}return this},"prime"),t}(),F0e=typeof process=="object"&&typeof process.nextTick=="function"?function(t){u8||(u8=Promise.resolve()),u8.then(function(){process.nextTick(t)})}:typeof setImmediate=="function"?function(t){setImmediate(t)}:function(t){setTimeout(t)},u8;function P0e(t){var e=t._batch;if(e!==null&&!e.hasDispatched&&e.keys.length<t._maxBatchSize)return e;var r={hasDispatched:!1,keys:[],callbacks:[]};return t._batch=r,t._batchScheduleFn(function(){O0e(t,r)}),r}o(P0e,"getCurrentBatch");function O0e(t,e){if(e.hasDispatched=!0,e.keys.length===0){l8(e);return}var r;try{r=t._batchLoadFn(e.keys)}catch(n){return d8(t,e,new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function "+("errored synchronously: "+String(n)+".")))}if(!r||typeof r.then!="function")return d8(t,e,new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did "+("not return a Promise: "+String(r)+".")));r.then(function(n){if(!wN(n))throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did "+("not return a Promise of an Array: "+String(n)+"."));if(n.length!==e.keys.length)throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did not return a Promise of an Array of the same length as the Array of keys."+(`
|
646
|
-
|
647
|
-
Keys:
|
648
|
-
`+String(e.keys))+(`
|
649
|
-
|
650
|
-
Values:
|
651
|
-
`+String(n)));l8(e);for(var i=0;i<e.callbacks.length;i++){var s=n[i];s instanceof Error?e.callbacks[i].reject(s):e.callbacks[i].resolve(s)}}).catch(function(n){d8(t,e,n)})}o(O0e,"dispatchBatch");function d8(t,e,r){l8(e);for(var n=0;n<e.keys.length;n++)t.clear(e.keys[n]),e.callbacks[n].reject(r)}o(d8,"failedDispatch");function l8(t){if(t.cacheHits)for(var e=0;e<t.cacheHits.length;e++)t.cacheHits[e]()}o(l8,"resolveCacheHits");function N0e(t){var e=!t||t.batch!==!1;if(!e)return 1;var r=t&&t.maxBatchSize;if(r===void 0)return 1/0;if(typeof r!="number"||r<1)throw new TypeError("maxBatchSize must be a positive number: "+r);return r}o(N0e,"getValidMaxBatchSize");function L0e(t){var e=t&&t.batchScheduleFn;if(e===void 0)return F0e;if(typeof e!="function")throw new TypeError("batchScheduleFn must be a function: "+e);return e}o(L0e,"getValidBatchScheduleFn");function U0e(t){var e=t&&t.cacheKeyFn;if(e===void 0)return function(r){return r};if(typeof e!="function")throw new TypeError("cacheKeyFn must be a function: "+e);return e}o(U0e,"getValidCacheKeyFn");function q0e(t){var e=!t||t.cache!==!1;if(!e)return null;var r=t&&t.cacheMap;if(r===void 0)return new Map;if(r!==null){var n=["get","set","delete","clear"],i=n.filter(function(s){return r&&typeof r[s]!="function"});if(i.length!==0)throw new TypeError("Custom cacheMap missing methods: "+i.join(", "))}return r}o(q0e,"getValidCacheMap");function $0e(t){return t&&t.name?t.name:null}o($0e,"getValidName");function wN(t){return typeof t=="object"&&t!==null&&typeof t.length=="number"&&(t.length===0||t.length>0&&Object.prototype.hasOwnProperty.call(t,t.length-1))}o(wN,"isArrayLike");_N.exports=B0e});var ON=Q((vSe,PN)=>{"use strict";function Y0e(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r<e.length;r++)e[r]=255;for(var n=0;n<t.length;n++){var i=t.charAt(n),s=i.charCodeAt(0);if(e[s]!==255)throw new TypeError(i+" is ambiguous");e[s]=n}var a=t.length,f=t.charAt(0),d=Math.log(a)/Math.log(256),h=Math.log(256)/Math.log(a);function p(T){if(T instanceof Uint8Array||(ArrayBuffer.isView(T)?T=new Uint8Array(T.buffer,T.byteOffset,T.byteLength):Array.isArray(T)&&(T=Uint8Array.from(T))),!(T instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(T.length===0)return"";for(var D=0,R=0,H=0,F=T.length;H!==F&&T[H]===0;)H++,D++;for(var V=(F-H)*h+1>>>0,X=new Uint8Array(V);H!==F;){for(var J=T[H],re=0,z=V-1;(J!==0||re<R)&&z!==-1;z--,re++)J+=256*X[z]>>>0,X[z]=J%a>>>0,J=J/a>>>0;if(J!==0)throw new Error("Non-zero carry");R=re,H++}for(var $=V-R;$!==V&&X[$]===0;)$++;for(var G=f.repeat(D);$<V;++$)G+=t.charAt(X[$]);return G}o(p,"encode");function y(T){if(typeof T!="string")throw new TypeError("Expected String");if(T.length===0)return new Uint8Array;var D=0;if(T[D]!==" "){for(var R=0,H=0;T[D]===f;)R++,D++;for(var F=(T.length-D)*d+1>>>0,V=new Uint8Array(F);T[D];){var X=e[T.charCodeAt(D)];if(X===255)return;for(var J=0,re=F-1;(X!==0||J<H)&&re!==-1;re--,J++)X+=a*V[re]>>>0,V[re]=X%256>>>0,X=X/256>>>0;if(X!==0)throw new Error("Non-zero carry");H=J,D++}if(T[D]!==" "){for(var z=F-H;z!==F&&V[z]===0;)z++;for(var $=new Uint8Array(R+(F-z)),G=R;z!==F;)$[G++]=V[z++];return $}}}o(y,"decodeUnsafe");function I(T){var D=y(T);if(D)return D;throw new Error("Non-base"+a+" character")}return o(I,"decode"),{encode:p,decodeUnsafe:y,decode:I}}o(Y0e,"base");PN.exports=Y0e});var Bb=Q((ySe,NN)=>{"use strict";var J0e=new TextDecoder,X0e=o(t=>J0e.decode(t),"decodeText"),Z0e=new TextEncoder,Q0e=o(t=>Z0e.encode(t),"encodeText");function epe(t,e){let r=new Uint8Array(e),n=0;for(let i of t)r.set(i,n),n+=i.length;return r}o(epe,"concat");NN.exports={decodeText:X0e,encodeText:Q0e,concat:epe}});var UN=Q((xSe,LN)=>{"use strict";var{encodeText:tpe}=Bb(),Fb=class{constructor(e,r,n,i){this.name=e,this.code=r,this.codeBuf=tpe(this.code),this.alphabet=i,this.codec=n(i)}encode(e){return this.codec.encode(e)}decode(e){for(let r of e)if(this.alphabet&&this.alphabet.indexOf(r)<0)throw new Error(`invalid character '${r}' in '${e}'`);return this.codec.decode(e)}};o(Fb,"Base");LN.exports=Fb});var $N=Q((wSe,qN)=>{"use strict";var rpe=o((t,e,r)=>{let n={};for(let h=0;h<e.length;++h)n[e[h]]=h;let i=t.length;for(;t[i-1]==="=";)--i;let s=new Uint8Array(i*r/8|0),a=0,f=0,d=0;for(let h=0;h<i;++h){let p=n[t[h]];if(p===void 0)throw new SyntaxError("Invalid character "+t[h]);f=f<<r|p,a+=r,a>=8&&(a-=8,s[d++]=255&f>>a)}if(a>=r||255&f<<8-a)throw new SyntaxError("Unexpected end of data");return s},"decode"),npe=o((t,e,r)=>{let n=e[e.length-1]==="=",i=(1<<r)-1,s="",a=0,f=0;for(let d=0;d<t.length;++d)for(f=f<<8|t[d],a+=8;a>r;)a-=r,s+=e[i&f>>a];if(a&&(s+=e[i&f<<r-a]),n)for(;s.length*r&7;)s+="=";return s},"encode"),ipe=o(t=>e=>({encode(r){return npe(r,e,t)},decode(r){return rpe(r,e,t)}}),"rfc4648");qN.exports={rfc4648:ipe}});var zN=Q((_Se,VN)=>{"use strict";var G0=ON(),ope=UN(),{rfc4648:dn}=$N(),{decodeText:spe,encodeText:ape}=Bb(),cpe=o(()=>({encode:spe,decode:ape}),"identity"),jN=[["identity","\0",cpe,""],["base2","0",dn(1),"01"],["base8","7",dn(3),"01234567"],["base10","9",G0,"0123456789"],["base16","f",dn(4),"0123456789abcdef"],["base16upper","F",dn(4),"0123456789ABCDEF"],["base32hex","v",dn(5),"0123456789abcdefghijklmnopqrstuv"],["base32hexupper","V",dn(5),"0123456789ABCDEFGHIJKLMNOPQRSTUV"],["base32hexpad","t",dn(5),"0123456789abcdefghijklmnopqrstuv="],["base32hexpadupper","T",dn(5),"0123456789ABCDEFGHIJKLMNOPQRSTUV="],["base32","b",dn(5),"abcdefghijklmnopqrstuvwxyz234567"],["base32upper","B",dn(5),"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"],["base32pad","c",dn(5),"abcdefghijklmnopqrstuvwxyz234567="],["base32padupper","C",dn(5),"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567="],["base32z","h",dn(5),"ybndrfg8ejkmcpqxot1uwisza345h769"],["base36","k",G0,"0123456789abcdefghijklmnopqrstuvwxyz"],["base36upper","K",G0,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"],["base58btc","z",G0,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base58flickr","Z",G0,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base64","m",dn(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",dn(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",dn(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",dn(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],HN=jN.reduce((t,e)=>(t[e[0]]=new ope(e[0],e[1],e[2],e[3]),t),{}),fpe=jN.reduce((t,e)=>(t[e[1]]=HN[e[0]],t),{});VN.exports={names:HN,codes:fpe}});var WN=Q((va,GN)=>{"use strict";var ll=zN(),{encodeText:upe,decodeText:Pb,concat:KN}=Bb();function dpe(t,e){if(!e)throw new Error("requires an encoded Uint8Array");let{name:r,codeBuf:n}=cu(t);return mpe(r,e),KN([n,e],n.length+e.length)}o(dpe,"multibase");function lpe(t,e){let r=cu(t),n=upe(r.encode(e));return KN([r.codeBuf,n],r.codeBuf.length+n.length)}o(lpe,"encode");function hpe(t){t instanceof Uint8Array&&(t=Pb(t));let e=t[0];return["f","F","v","V","t","T","b","B","c","C","h","k","K"].includes(e)&&(t=t.toLowerCase()),cu(t[0]).decode(t.substring(1))}o(hpe,"decode");function ppe(t){if(t instanceof Uint8Array&&(t=Pb(t)),Object.prototype.toString.call(t)!=="[object String]")return!1;try{return cu(t[0]).name}catch{return!1}}o(ppe,"isEncoded");function mpe(t,e){cu(t).decode(Pb(e))}o(mpe,"validEncode");function cu(t){if(Object.prototype.hasOwnProperty.call(ll.names,t))return ll.names[t];if(Object.prototype.hasOwnProperty.call(ll.codes,t))return ll.codes[t];throw new Error(`Unsupported encoding: ${t}`)}o(cu,"encoding");function gpe(t){return t instanceof Uint8Array&&(t=Pb(t)),cu(t[0])}o(gpe,"encodingFromData");va=GN.exports=dpe;va.encode=lpe;va.decode=hpe;va.isEncoded=ppe;va.encoding=cu;va.encodingFromData=gpe;var bpe=Object.freeze(ll.names),vpe=Object.freeze(ll.codes);va.names=bpe;va.codes=vpe});var ZN=Q((ESe,XN)=>{XN.exports=JN;var YN=128,ype=127,xpe=~ype,wpe=Math.pow(2,31);function JN(t,e,r){e=e||[],r=r||0;for(var n=r;t>=wpe;)e[r++]=t&255|YN,t/=128;for(;t&xpe;)e[r++]=t&255|YN,t>>>=7;return e[r]=t|0,JN.bytes=r-n+1,e}o(JN,"encode")});var tL=Q((ASe,eL)=>{eL.exports=E8;var _pe=128,QN=127;function E8(t,n){var r=0,n=n||0,i=0,s=n,a,f=t.length;do{if(s>=f)throw E8.bytes=0,new RangeError("Could not decode varint");a=t[s++],r+=i<28?(a&QN)<<i:(a&QN)*Math.pow(2,i),i+=7}while(a>=_pe);return E8.bytes=s-n,r}o(E8,"read")});var nL=Q((CSe,rL)=>{var Epe=Math.pow(2,7),Ape=Math.pow(2,14),Cpe=Math.pow(2,21),Ipe=Math.pow(2,28),Dpe=Math.pow(2,35),Spe=Math.pow(2,42),Tpe=Math.pow(2,49),kpe=Math.pow(2,56),Mpe=Math.pow(2,63);rL.exports=function(t){return t<Epe?1:t<Ape?2:t<Cpe?3:t<Ipe?4:t<Dpe?5:t<Spe?6:t<Tpe?7:t<kpe?8:t<Mpe?9:10}});var oL=Q((ISe,iL)=>{iL.exports={encode:ZN(),decode:tL(),encodingLength:nL()}});var aL=Q((DSe,sL)=>{"use strict";var Rpe=Object.freeze({identity:0,sha1:17,"sha2-256":18,"sha2-512":19,"sha3-512":20,"sha3-384":21,"sha3-256":22,"sha3-224":23,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,blake3:30,"murmur3-128":34,"murmur3-32":35,"dbl-sha2-256":86,md4:212,md5:213,bmt:214,"sha2-256-trunc254-padded":4114,"ripemd-128":4178,"ripemd-160":4179,"ripemd-256":4180,"ripemd-320":4181,x11:4352,kangarootwelve:7425,"sm3-256":21325,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"skein256-8":45825,"skein256-16":45826,"skein256-24":45827,"skein256-32":45828,"skein256-40":45829,"skein256-48":45830,"skein256-56":45831,"skein256-64":45832,"skein256-72":45833,"skein256-80":45834,"skein256-88":45835,"skein256-96":45836,"skein256-104":45837,"skein256-112":45838,"skein256-120":45839,"skein256-128":45840,"skein256-136":45841,"skein256-144":45842,"skein256-152":45843,"skein256-160":45844,"skein256-168":45845,"skein256-176":45846,"skein256-184":45847,"skein256-192":45848,"skein256-200":45849,"skein256-208":45850,"skein256-216":45851,"skein256-224":45852,"skein256-232":45853,"skein256-240":45854,"skein256-248":45855,"skein256-256":45856,"skein512-8":45857,"skein512-16":45858,"skein512-24":45859,"skein512-32":45860,"skein512-40":45861,"skein512-48":45862,"skein512-56":45863,"skein512-64":45864,"skein512-72":45865,"skein512-80":45866,"skein512-88":45867,"skein512-96":45868,"skein512-104":45869,"skein512-112":45870,"skein512-120":45871,"skein512-128":45872,"skein512-136":45873,"skein512-144":45874,"skein512-152":45875,"skein512-160":45876,"skein512-168":45877,"skein512-176":45878,"skein512-184":45879,"skein512-192":45880,"skein512-200":45881,"skein512-208":45882,"skein512-216":45883,"skein512-224":45884,"skein512-232":45885,"skein512-240":45886,"skein512-248":45887,"skein512-256":45888,"skein512-264":45889,"skein512-272":45890,"skein512-280":45891,"skein512-288":45892,"skein512-296":45893,"skein512-304":45894,"skein512-312":45895,"skein512-320":45896,"skein512-328":45897,"skein512-336":45898,"skein512-344":45899,"skein512-352":45900,"skein512-360":45901,"skein512-368":45902,"skein512-376":45903,"skein512-384":45904,"skein512-392":45905,"skein512-400":45906,"skein512-408":45907,"skein512-416":45908,"skein512-424":45909,"skein512-432":45910,"skein512-440":45911,"skein512-448":45912,"skein512-456":45913,"skein512-464":45914,"skein512-472":45915,"skein512-480":45916,"skein512-488":45917,"skein512-496":45918,"skein512-504":45919,"skein512-512":45920,"skein1024-8":45921,"skein1024-16":45922,"skein1024-24":45923,"skein1024-32":45924,"skein1024-40":45925,"skein1024-48":45926,"skein1024-56":45927,"skein1024-64":45928,"skein1024-72":45929,"skein1024-80":45930,"skein1024-88":45931,"skein1024-96":45932,"skein1024-104":45933,"skein1024-112":45934,"skein1024-120":45935,"skein1024-128":45936,"skein1024-136":45937,"skein1024-144":45938,"skein1024-152":45939,"skein1024-160":45940,"skein1024-168":45941,"skein1024-176":45942,"skein1024-184":45943,"skein1024-192":45944,"skein1024-200":45945,"skein1024-208":45946,"skein1024-216":45947,"skein1024-224":45948,"skein1024-232":45949,"skein1024-240":45950,"skein1024-248":45951,"skein1024-256":45952,"skein1024-264":45953,"skein1024-272":45954,"skein1024-280":45955,"skein1024-288":45956,"skein1024-296":45957,"skein1024-304":45958,"skein1024-312":45959,"skein1024-320":45960,"skein1024-328":45961,"skein1024-336":45962,"skein1024-344":45963,"skein1024-352":45964,"skein1024-360":45965,"skein1024-368":45966,"skein1024-376":45967,"skein1024-384":45968,"skein1024-392":45969,"skein1024-400":45970,"skein1024-408":45971,"skein1024-416":45972,"skein1024-424":45973,"skein1024-432":45974,"skein1024-440":45975,"skein1024-448":45976,"skein1024-456":45977,"skein1024-464":45978,"skein1024-472":45979,"skein1024-480":45980,"skein1024-488":45981,"skein1024-496":45982,"skein1024-504":45983,"skein1024-512":45984,"skein1024-520":45985,"skein1024-528":45986,"skein1024-536":45987,"skein1024-544":45988,"skein1024-552":45989,"skein1024-560":45990,"skein1024-568":45991,"skein1024-576":45992,"skein1024-584":45993,"skein1024-592":45994,"skein1024-600":45995,"skein1024-608":45996,"skein1024-616":45997,"skein1024-624":45998,"skein1024-632":45999,"skein1024-640":46e3,"skein1024-648":46001,"skein1024-656":46002,"skein1024-664":46003,"skein1024-672":46004,"skein1024-680":46005,"skein1024-688":46006,"skein1024-696":46007,"skein1024-704":46008,"skein1024-712":46009,"skein1024-720":46010,"skein1024-728":46011,"skein1024-736":46012,"skein1024-744":46013,"skein1024-752":46014,"skein1024-760":46015,"skein1024-768":46016,"skein1024-776":46017,"skein1024-784":46018,"skein1024-792":46019,"skein1024-800":46020,"skein1024-808":46021,"skein1024-816":46022,"skein1024-824":46023,"skein1024-832":46024,"skein1024-840":46025,"skein1024-848":46026,"skein1024-856":46027,"skein1024-864":46028,"skein1024-872":46029,"skein1024-880":46030,"skein1024-888":46031,"skein1024-896":46032,"skein1024-904":46033,"skein1024-912":46034,"skein1024-920":46035,"skein1024-928":46036,"skein1024-936":46037,"skein1024-944":46038,"skein1024-952":46039,"skein1024-960":46040,"skein1024-968":46041,"skein1024-976":46042,"skein1024-984":46043,"skein1024-992":46044,"skein1024-1000":46045,"skein1024-1008":46046,"skein1024-1016":46047,"skein1024-1024":46048,"poseidon-bls12_381-a2-fc1":46081,"poseidon-bls12_381-a2-fc1-sc":46082});sL.exports={names:Rpe}});var pL=Q((SSe,hL)=>{"use strict";var cL=WN(),hl=oL(),{names:W0}=aL(),{toString:Ob}=(pd(),Zp(PS)),{fromString:Bpe}=(Am(),Zp(FS)),{concat:Fpe}=(jv(),Zp(oS)),pl={};for(let t in W0){let e=t;pl[W0[e]]=e}Object.freeze(pl);function Ppe(t){if(!(t instanceof Uint8Array))throw new Error("must be passed a Uint8Array");return Ob(t,"base16")}o(Ppe,"toHexString");function Ope(t){return Bpe(t,"base16")}o(Ope,"fromHexString");function Npe(t){if(!(t instanceof Uint8Array))throw new Error("must be passed a Uint8Array");return Ob(cL.encode("base58btc",t)).slice(1)}o(Npe,"toB58String");function Lpe(t){let e=t instanceof Uint8Array?Ob(t):t;return cL.decode("z"+e)}o(Lpe,"fromB58String");function fL(t){if(!(t instanceof Uint8Array))throw new Error("multihash must be a Uint8Array");if(t.length<2)throw new Error("multihash too short. must be > 2 bytes.");let e=hl.decode(t);if(!dL(e))throw new Error(`multihash unknown function code: 0x${e.toString(16)}`);t=t.slice(hl.decode.bytes);let r=hl.decode(t);if(r<0)throw new Error(`multihash invalid length: ${r}`);if(t=t.slice(hl.decode.bytes),t.length!==r)throw new Error(`multihash length inconsistent: 0x${Ob(t,"base16")}`);return{code:e,name:pl[e],length:r,digest:t}}o(fL,"decode");function Upe(t,e,r){if(!t||e===void 0)throw new Error("multihash encode requires at least two args: digest, code");let n=uL(e);if(!(t instanceof Uint8Array))throw new Error("digest should be a Uint8Array");if(r==null&&(r=t.length),r&&t.length!==r)throw new Error("digest length should be equal to specified length.");let i=hl.encode(n),s=hl.encode(r);return Fpe([i,s,t],i.length+s.length+t.length)}o(Upe,"encode");function uL(t){let e=t;if(typeof t=="string"){if(W0[t]===void 0)throw new Error(`Unrecognized hash function named: ${t}`);e=W0[t]}if(typeof e!="number")throw new Error(`Hash function code should be a number. Got: ${e}`);if(pl[e]===void 0&&!A8(e))throw new Error(`Unrecognized function code: ${e}`);return e}o(uL,"coerceCode");function A8(t){return t>0&&t<16}o(A8,"isAppCode");function dL(t){return!!(A8(t)||pl[t])}o(dL,"isValidCode");function lL(t){fL(t)}o(lL,"validate");function qpe(t){return lL(t),t.subarray(0,2)}o(qpe,"prefix");hL.exports={names:W0,codes:pl,toHexString:Ppe,fromHexString:Ope,toB58String:Npe,fromB58String:Lpe,decode:fL,encode:Upe,coerceCode:uL,isAppCode:A8,validate:lL,prefix:qpe,isValidCode:dL}});var kL=Q(Kb=>{"use strict";Kb.byteLength=l1e;Kb.toByteArray=p1e;Kb.fromByteArray=b1e;var As=[],uo=[],d1e=typeof Uint8Array<"u"?Uint8Array:Array,R8="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(hu=0,SL=R8.length;hu<SL;++hu)As[hu]=R8[hu],uo[R8.charCodeAt(hu)]=hu;var hu,SL;uo["-".charCodeAt(0)]=62;uo["_".charCodeAt(0)]=63;function TL(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}o(TL,"getLens");function l1e(t){var e=TL(t),r=e[0],n=e[1];return(r+n)*3/4-n}o(l1e,"byteLength");function h1e(t,e,r){return(e+r)*3/4-r}o(h1e,"_byteLength");function p1e(t){var e,r=TL(t),n=r[0],i=r[1],s=new d1e(h1e(t,n,i)),a=0,f=i>0?n-4:n,d;for(d=0;d<f;d+=4)e=uo[t.charCodeAt(d)]<<18|uo[t.charCodeAt(d+1)]<<12|uo[t.charCodeAt(d+2)]<<6|uo[t.charCodeAt(d+3)],s[a++]=e>>16&255,s[a++]=e>>8&255,s[a++]=e&255;return i===2&&(e=uo[t.charCodeAt(d)]<<2|uo[t.charCodeAt(d+1)]>>4,s[a++]=e&255),i===1&&(e=uo[t.charCodeAt(d)]<<10|uo[t.charCodeAt(d+1)]<<4|uo[t.charCodeAt(d+2)]>>2,s[a++]=e>>8&255,s[a++]=e&255),s}o(p1e,"toByteArray");function m1e(t){return As[t>>18&63]+As[t>>12&63]+As[t>>6&63]+As[t&63]}o(m1e,"tripletToBase64");function g1e(t,e,r){for(var n,i=[],s=e;s<r;s+=3)n=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(t[s+2]&255),i.push(m1e(n));return i.join("")}o(g1e,"encodeChunk");function b1e(t){for(var e,r=t.length,n=r%3,i=[],s=16383,a=0,f=r-n;a<f;a+=s)i.push(g1e(t,a,a+s>f?f:a+s));return n===1?(e=t[r-1],i.push(As[e>>2]+As[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(As[e>>10]+As[e>>4&63]+As[e<<2&63]+"=")),i.join("")}o(b1e,"fromByteArray")});var ML=Q(B8=>{B8.read=function(t,e,r,n,i){var s,a,f=i*8-n-1,d=(1<<f)-1,h=d>>1,p=-7,y=r?i-1:0,I=r?-1:1,T=t[e+y];for(y+=I,s=T&(1<<-p)-1,T>>=-p,p+=f;p>0;s=s*256+t[e+y],y+=I,p-=8);for(a=s&(1<<-p)-1,s>>=-p,p+=n;p>0;a=a*256+t[e+y],y+=I,p-=8);if(s===0)s=1-h;else{if(s===d)return a?NaN:(T?-1:1)*(1/0);a=a+Math.pow(2,n),s=s-h}return(T?-1:1)*a*Math.pow(2,s-n)};B8.write=function(t,e,r,n,i,s){var a,f,d,h=s*8-i-1,p=(1<<h)-1,y=p>>1,I=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=n?0:s-1,D=n?1:-1,R=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(f=isNaN(e)?1:0,a=p):(a=Math.floor(Math.log(e)/Math.LN2),e*(d=Math.pow(2,-a))<1&&(a--,d*=2),a+y>=1?e+=I/d:e+=I*Math.pow(2,1-y),e*d>=2&&(a++,d/=2),a+y>=p?(f=0,a=p):a+y>=1?(f=(e*d-1)*Math.pow(2,i),a=a+y):(f=e*Math.pow(2,y-1)*Math.pow(2,i),a=0));i>=8;t[r+T]=f&255,T+=D,f/=256,i-=8);for(a=a<<i|f,h+=i;h>0;t[r+T]=a&255,T+=D,a/=256,h-=8);t[r+T-D]|=R*128}});var VL=Q(yl=>{"use strict";var F8=kL(),vl=ML(),RL=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;yl.Buffer=Ie;yl.SlowBuffer=E1e;yl.INSPECT_MAX_BYTES=50;var Gb=2147483647;yl.kMaxLength=Gb;Ie.TYPED_ARRAY_SUPPORT=v1e();!Ie.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function v1e(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch{return!1}}o(v1e,"typedArraySupport");Object.defineProperty(Ie.prototype,"parent",{enumerable:!0,get:function(){if(!!Ie.isBuffer(this))return this.buffer}});Object.defineProperty(Ie.prototype,"offset",{enumerable:!0,get:function(){if(!!Ie.isBuffer(this))return this.byteOffset}});function xa(t){if(t>Gb)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,Ie.prototype),e}o(xa,"createBuffer");function Ie(t,e,r){if(typeof t=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return L8(t)}return PL(t,e,r)}o(Ie,"Buffer");Ie.poolSize=8192;function PL(t,e,r){if(typeof t=="string")return x1e(t,e);if(ArrayBuffer.isView(t))return w1e(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(Cs(t,ArrayBuffer)||t&&Cs(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Cs(t,SharedArrayBuffer)||t&&Cs(t.buffer,SharedArrayBuffer)))return O8(t,e,r);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(n!=null&&n!==t)return Ie.from(n,e,r);var i=_1e(t);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return Ie.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}o(PL,"from");Ie.from=function(t,e,r){return PL(t,e,r)};Object.setPrototypeOf(Ie.prototype,Uint8Array.prototype);Object.setPrototypeOf(Ie,Uint8Array);function OL(t){if(typeof t!="number")throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}o(OL,"assertSize");function y1e(t,e,r){return OL(t),t<=0?xa(t):e!==void 0?typeof r=="string"?xa(t).fill(e,r):xa(t).fill(e):xa(t)}o(y1e,"alloc");Ie.alloc=function(t,e,r){return y1e(t,e,r)};function L8(t){return OL(t),xa(t<0?0:U8(t)|0)}o(L8,"allocUnsafe");Ie.allocUnsafe=function(t){return L8(t)};Ie.allocUnsafeSlow=function(t){return L8(t)};function x1e(t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!Ie.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=NL(t,e)|0,n=xa(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}o(x1e,"fromString");function P8(t){for(var e=t.length<0?0:U8(t.length)|0,r=xa(e),n=0;n<e;n+=1)r[n]=t[n]&255;return r}o(P8,"fromArrayLike");function w1e(t){if(Cs(t,Uint8Array)){var e=new Uint8Array(t);return O8(e.buffer,e.byteOffset,e.byteLength)}return P8(t)}o(w1e,"fromArrayView");function O8(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return e===void 0&&r===void 0?n=new Uint8Array(t):r===void 0?n=new Uint8Array(t,e):n=new Uint8Array(t,e,r),Object.setPrototypeOf(n,Ie.prototype),n}o(O8,"fromArrayBuffer");function _1e(t){if(Ie.isBuffer(t)){var e=U8(t.length)|0,r=xa(e);return r.length===0||t.copy(r,0,0,e),r}if(t.length!==void 0)return typeof t.length!="number"||q8(t.length)?xa(0):P8(t);if(t.type==="Buffer"&&Array.isArray(t.data))return P8(t.data)}o(_1e,"fromObject");function U8(t){if(t>=Gb)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Gb.toString(16)+" bytes");return t|0}o(U8,"checked");function E1e(t){return+t!=t&&(t=0),Ie.alloc(+t)}o(E1e,"SlowBuffer");Ie.isBuffer=o(function(e){return e!=null&&e._isBuffer===!0&&e!==Ie.prototype},"isBuffer");Ie.compare=o(function(e,r){if(Cs(e,Uint8Array)&&(e=Ie.from(e,e.offset,e.byteLength)),Cs(r,Uint8Array)&&(r=Ie.from(r,r.offset,r.byteLength)),!Ie.isBuffer(e)||!Ie.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===r)return 0;for(var n=e.length,i=r.length,s=0,a=Math.min(n,i);s<a;++s)if(e[s]!==r[s]){n=e[s],i=r[s];break}return n<i?-1:i<n?1:0},"compare");Ie.isEncoding=o(function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},"isEncoding");Ie.concat=o(function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return Ie.alloc(0);var n;if(r===void 0)for(r=0,n=0;n<e.length;++n)r+=e[n].length;var i=Ie.allocUnsafe(r),s=0;for(n=0;n<e.length;++n){var a=e[n];if(Cs(a,Uint8Array))s+a.length>i.length?Ie.from(a).copy(i,s):Uint8Array.prototype.set.call(i,a,s);else if(Ie.isBuffer(a))a.copy(i,s);else throw new TypeError('"list" argument must be an Array of Buffers');s+=a.length}return i},"concat");function NL(t,e){if(Ie.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Cs(t,ArrayBuffer))return t.byteLength;if(typeof t!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return N8(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return HL(t).length;default:if(i)return n?-1:N8(t).length;e=(""+e).toLowerCase(),i=!0}}o(NL,"byteLength");Ie.byteLength=NL;function A1e(t,e,r){var n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,e>>>=0,r<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":return F1e(this,e,r);case"utf8":case"utf-8":return UL(this,e,r);case"ascii":return R1e(this,e,r);case"latin1":case"binary":return B1e(this,e,r);case"base64":return k1e(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P1e(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}o(A1e,"slowToString");Ie.prototype._isBuffer=!0;function pu(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}o(pu,"swap");Ie.prototype.swap16=o(function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<e;r+=2)pu(this,r,r+1);return this},"swap16");Ie.prototype.swap32=o(function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<e;r+=4)pu(this,r,r+3),pu(this,r+1,r+2);return this},"swap32");Ie.prototype.swap64=o(function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<e;r+=8)pu(this,r,r+7),pu(this,r+1,r+6),pu(this,r+2,r+5),pu(this,r+3,r+4);return this},"swap64");Ie.prototype.toString=o(function(){var e=this.length;return e===0?"":arguments.length===0?UL(this,0,e):A1e.apply(this,arguments)},"toString");Ie.prototype.toLocaleString=Ie.prototype.toString;Ie.prototype.equals=o(function(e){if(!Ie.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:Ie.compare(this,e)===0},"equals");Ie.prototype.inspect=o(function(){var e="",r=yl.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},"inspect");RL&&(Ie.prototype[RL]=Ie.prototype.inspect);Ie.prototype.compare=o(function(e,r,n,i,s){if(Cs(e,Uint8Array)&&(e=Ie.from(e,e.offset,e.byteLength)),!Ie.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(r===void 0&&(r=0),n===void 0&&(n=e?e.length:0),i===void 0&&(i=0),s===void 0&&(s=this.length),r<0||n>e.length||i<0||s>this.length)throw new RangeError("out of range index");if(i>=s&&r>=n)return 0;if(i>=s)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,s>>>=0,this===e)return 0;for(var a=s-i,f=n-r,d=Math.min(a,f),h=this.slice(i,s),p=e.slice(r,n),y=0;y<d;++y)if(h[y]!==p[y]){a=h[y],f=p[y];break}return a<f?-1:f<a?1:0},"compare");function LL(t,e,r,n,i){if(t.length===0)return-1;if(typeof r=="string"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,q8(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof e=="string"&&(e=Ie.from(e,n)),Ie.isBuffer(e))return e.length===0?-1:BL(t,e,r,n,i);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):BL(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}o(LL,"bidirectionalIndexOf");function BL(t,e,r,n,i){var s=1,a=t.length,f=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(t.length<2||e.length<2)return-1;s=2,a/=2,f/=2,r/=2}function d(T,D){return s===1?T[D]:T.readUInt16BE(D*s)}o(d,"read");var h;if(i){var p=-1;for(h=r;h<a;h++)if(d(t,h)===d(e,p===-1?0:h-p)){if(p===-1&&(p=h),h-p+1===f)return p*s}else p!==-1&&(h-=h-p),p=-1}else for(r+f>a&&(r=a-f),h=r;h>=0;h--){for(var y=!0,I=0;I<f;I++)if(d(t,h+I)!==d(e,I)){y=!1;break}if(y)return h}return-1}o(BL,"arrayIndexOf");Ie.prototype.includes=o(function(e,r,n){return this.indexOf(e,r,n)!==-1},"includes");Ie.prototype.indexOf=o(function(e,r,n){return LL(this,e,r,n,!0)},"indexOf");Ie.prototype.lastIndexOf=o(function(e,r,n){return LL(this,e,r,n,!1)},"lastIndexOf");function C1e(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var s=e.length;n>s/2&&(n=s/2);for(var a=0;a<n;++a){var f=parseInt(e.substr(a*2,2),16);if(q8(f))return a;t[r+a]=f}return a}o(C1e,"hexWrite");function I1e(t,e,r,n){return Wb(N8(e,t.length-r),t,r,n)}o(I1e,"utf8Write");function D1e(t,e,r,n){return Wb(L1e(e),t,r,n)}o(D1e,"asciiWrite");function S1e(t,e,r,n){return Wb(HL(e),t,r,n)}o(S1e,"base64Write");function T1e(t,e,r,n){return Wb(U1e(e,t.length-r),t,r,n)}o(T1e,"ucs2Write");Ie.prototype.write=o(function(e,r,n,i){if(r===void 0)i="utf8",n=this.length,r=0;else if(n===void 0&&typeof r=="string")i=r,n=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var s=this.length-r;if((n===void 0||n>s)&&(n=s),e.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var a=!1;;)switch(i){case"hex":return C1e(this,e,r,n);case"utf8":case"utf-8":return I1e(this,e,r,n);case"ascii":case"latin1":case"binary":return D1e(this,e,r,n);case"base64":return S1e(this,e,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T1e(this,e,r,n);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0}},"write");Ie.prototype.toJSON=o(function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},"toJSON");function k1e(t,e,r){return e===0&&r===t.length?F8.fromByteArray(t):F8.fromByteArray(t.slice(e,r))}o(k1e,"base64Slice");function UL(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var s=t[i],a=null,f=s>239?4:s>223?3:s>191?2:1;if(i+f<=r){var d,h,p,y;switch(f){case 1:s<128&&(a=s);break;case 2:d=t[i+1],(d&192)===128&&(y=(s&31)<<6|d&63,y>127&&(a=y));break;case 3:d=t[i+1],h=t[i+2],(d&192)===128&&(h&192)===128&&(y=(s&15)<<12|(d&63)<<6|h&63,y>2047&&(y<55296||y>57343)&&(a=y));break;case 4:d=t[i+1],h=t[i+2],p=t[i+3],(d&192)===128&&(h&192)===128&&(p&192)===128&&(y=(s&15)<<18|(d&63)<<12|(h&63)<<6|p&63,y>65535&&y<1114112&&(a=y))}}a===null?(a=65533,f=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|a&1023),n.push(a),i+=f}return M1e(n)}o(UL,"utf8Slice");var FL=4096;function M1e(t){var e=t.length;if(e<=FL)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=FL));return r}o(M1e,"decodeCodePointsArray");function R1e(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]&127);return n}o(R1e,"asciiSlice");function B1e(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}o(B1e,"latin1Slice");function F1e(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",s=e;s<r;++s)i+=q1e[t[s]];return i}o(F1e,"hexSlice");function P1e(t,e,r){for(var n=t.slice(e,r),i="",s=0;s<n.length-1;s+=2)i+=String.fromCharCode(n[s]+n[s+1]*256);return i}o(P1e,"utf16leSlice");Ie.prototype.slice=o(function(e,r){var n=this.length;e=~~e,r=r===void 0?n:~~r,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<e&&(r=e);var i=this.subarray(e,r);return Object.setPrototypeOf(i,Ie.prototype),i},"slice");function Qr(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}o(Qr,"checkOffset");Ie.prototype.readUintLE=Ie.prototype.readUIntLE=o(function(e,r,n){e=e>>>0,r=r>>>0,n||Qr(e,r,this.length);for(var i=this[e],s=1,a=0;++a<r&&(s*=256);)i+=this[e+a]*s;return i},"readUIntLE");Ie.prototype.readUintBE=Ie.prototype.readUIntBE=o(function(e,r,n){e=e>>>0,r=r>>>0,n||Qr(e,r,this.length);for(var i=this[e+--r],s=1;r>0&&(s*=256);)i+=this[e+--r]*s;return i},"readUIntBE");Ie.prototype.readUint8=Ie.prototype.readUInt8=o(function(e,r){return e=e>>>0,r||Qr(e,1,this.length),this[e]},"readUInt8");Ie.prototype.readUint16LE=Ie.prototype.readUInt16LE=o(function(e,r){return e=e>>>0,r||Qr(e,2,this.length),this[e]|this[e+1]<<8},"readUInt16LE");Ie.prototype.readUint16BE=Ie.prototype.readUInt16BE=o(function(e,r){return e=e>>>0,r||Qr(e,2,this.length),this[e]<<8|this[e+1]},"readUInt16BE");Ie.prototype.readUint32LE=Ie.prototype.readUInt32LE=o(function(e,r){return e=e>>>0,r||Qr(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},"readUInt32LE");Ie.prototype.readUint32BE=Ie.prototype.readUInt32BE=o(function(e,r){return e=e>>>0,r||Qr(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},"readUInt32BE");Ie.prototype.readIntLE=o(function(e,r,n){e=e>>>0,r=r>>>0,n||Qr(e,r,this.length);for(var i=this[e],s=1,a=0;++a<r&&(s*=256);)i+=this[e+a]*s;return s*=128,i>=s&&(i-=Math.pow(2,8*r)),i},"readIntLE");Ie.prototype.readIntBE=o(function(e,r,n){e=e>>>0,r=r>>>0,n||Qr(e,r,this.length);for(var i=r,s=1,a=this[e+--i];i>0&&(s*=256);)a+=this[e+--i]*s;return s*=128,a>=s&&(a-=Math.pow(2,8*r)),a},"readIntBE");Ie.prototype.readInt8=o(function(e,r){return e=e>>>0,r||Qr(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},"readInt8");Ie.prototype.readInt16LE=o(function(e,r){e=e>>>0,r||Qr(e,2,this.length);var n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n},"readInt16LE");Ie.prototype.readInt16BE=o(function(e,r){e=e>>>0,r||Qr(e,2,this.length);var n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n},"readInt16BE");Ie.prototype.readInt32LE=o(function(e,r){return e=e>>>0,r||Qr(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},"readInt32LE");Ie.prototype.readInt32BE=o(function(e,r){return e=e>>>0,r||Qr(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},"readInt32BE");Ie.prototype.readFloatLE=o(function(e,r){return e=e>>>0,r||Qr(e,4,this.length),vl.read(this,e,!0,23,4)},"readFloatLE");Ie.prototype.readFloatBE=o(function(e,r){return e=e>>>0,r||Qr(e,4,this.length),vl.read(this,e,!1,23,4)},"readFloatBE");Ie.prototype.readDoubleLE=o(function(e,r){return e=e>>>0,r||Qr(e,8,this.length),vl.read(this,e,!0,52,8)},"readDoubleLE");Ie.prototype.readDoubleBE=o(function(e,r){return e=e>>>0,r||Qr(e,8,this.length),vl.read(this,e,!1,52,8)},"readDoubleBE");function ni(t,e,r,n,i,s){if(!Ie.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<s)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}o(ni,"checkInt");Ie.prototype.writeUintLE=Ie.prototype.writeUIntLE=o(function(e,r,n,i){if(e=+e,r=r>>>0,n=n>>>0,!i){var s=Math.pow(2,8*n)-1;ni(this,e,r,n,s,0)}var a=1,f=0;for(this[r]=e&255;++f<n&&(a*=256);)this[r+f]=e/a&255;return r+n},"writeUIntLE");Ie.prototype.writeUintBE=Ie.prototype.writeUIntBE=o(function(e,r,n,i){if(e=+e,r=r>>>0,n=n>>>0,!i){var s=Math.pow(2,8*n)-1;ni(this,e,r,n,s,0)}var a=n-1,f=1;for(this[r+a]=e&255;--a>=0&&(f*=256);)this[r+a]=e/f&255;return r+n},"writeUIntBE");Ie.prototype.writeUint8=Ie.prototype.writeUInt8=o(function(e,r,n){return e=+e,r=r>>>0,n||ni(this,e,r,1,255,0),this[r]=e&255,r+1},"writeUInt8");Ie.prototype.writeUint16LE=Ie.prototype.writeUInt16LE=o(function(e,r,n){return e=+e,r=r>>>0,n||ni(this,e,r,2,65535,0),this[r]=e&255,this[r+1]=e>>>8,r+2},"writeUInt16LE");Ie.prototype.writeUint16BE=Ie.prototype.writeUInt16BE=o(function(e,r,n){return e=+e,r=r>>>0,n||ni(this,e,r,2,65535,0),this[r]=e>>>8,this[r+1]=e&255,r+2},"writeUInt16BE");Ie.prototype.writeUint32LE=Ie.prototype.writeUInt32LE=o(function(e,r,n){return e=+e,r=r>>>0,n||ni(this,e,r,4,4294967295,0),this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=e&255,r+4},"writeUInt32LE");Ie.prototype.writeUint32BE=Ie.prototype.writeUInt32BE=o(function(e,r,n){return e=+e,r=r>>>0,n||ni(this,e,r,4,4294967295,0),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4},"writeUInt32BE");Ie.prototype.writeIntLE=o(function(e,r,n,i){if(e=+e,r=r>>>0,!i){var s=Math.pow(2,8*n-1);ni(this,e,r,n,s-1,-s)}var a=0,f=1,d=0;for(this[r]=e&255;++a<n&&(f*=256);)e<0&&d===0&&this[r+a-1]!==0&&(d=1),this[r+a]=(e/f>>0)-d&255;return r+n},"writeIntLE");Ie.prototype.writeIntBE=o(function(e,r,n,i){if(e=+e,r=r>>>0,!i){var s=Math.pow(2,8*n-1);ni(this,e,r,n,s-1,-s)}var a=n-1,f=1,d=0;for(this[r+a]=e&255;--a>=0&&(f*=256);)e<0&&d===0&&this[r+a+1]!==0&&(d=1),this[r+a]=(e/f>>0)-d&255;return r+n},"writeIntBE");Ie.prototype.writeInt8=o(function(e,r,n){return e=+e,r=r>>>0,n||ni(this,e,r,1,127,-128),e<0&&(e=255+e+1),this[r]=e&255,r+1},"writeInt8");Ie.prototype.writeInt16LE=o(function(e,r,n){return e=+e,r=r>>>0,n||ni(this,e,r,2,32767,-32768),this[r]=e&255,this[r+1]=e>>>8,r+2},"writeInt16LE");Ie.prototype.writeInt16BE=o(function(e,r,n){return e=+e,r=r>>>0,n||ni(this,e,r,2,32767,-32768),this[r]=e>>>8,this[r+1]=e&255,r+2},"writeInt16BE");Ie.prototype.writeInt32LE=o(function(e,r,n){return e=+e,r=r>>>0,n||ni(this,e,r,4,2147483647,-2147483648),this[r]=e&255,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24,r+4},"writeInt32LE");Ie.prototype.writeInt32BE=o(function(e,r,n){return e=+e,r=r>>>0,n||ni(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4},"writeInt32BE");function qL(t,e,r,n,i,s){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}o(qL,"checkIEEE754");function $L(t,e,r,n,i){return e=+e,r=r>>>0,i||qL(t,e,r,4,34028234663852886e22,-34028234663852886e22),vl.write(t,e,r,n,23,4),r+4}o($L,"writeFloat");Ie.prototype.writeFloatLE=o(function(e,r,n){return $L(this,e,r,!0,n)},"writeFloatLE");Ie.prototype.writeFloatBE=o(function(e,r,n){return $L(this,e,r,!1,n)},"writeFloatBE");function jL(t,e,r,n,i){return e=+e,r=r>>>0,i||qL(t,e,r,8,17976931348623157e292,-17976931348623157e292),vl.write(t,e,r,n,52,8),r+8}o(jL,"writeDouble");Ie.prototype.writeDoubleLE=o(function(e,r,n){return jL(this,e,r,!0,n)},"writeDoubleLE");Ie.prototype.writeDoubleBE=o(function(e,r,n){return jL(this,e,r,!1,n)},"writeDoubleBE");Ie.prototype.copy=o(function(e,r,n,i){if(!Ie.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),r>=e.length&&(r=e.length),r||(r=0),i>0&&i<n&&(i=n),i===n||e.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);var s=i-n;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,n,i):Uint8Array.prototype.set.call(e,this.subarray(n,i),r),s},"copy");Ie.prototype.fill=o(function(e,r,n,i){if(typeof e=="string"){if(typeof r=="string"?(i=r,r=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!Ie.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(e.length===1){var s=e.charCodeAt(0);(i==="utf8"&&s<128||i==="latin1")&&(e=s)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r=r>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);var a;if(typeof e=="number")for(a=r;a<n;++a)this[a]=e;else{var f=Ie.isBuffer(e)?e:Ie.from(e,i),d=f.length;if(d===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(a=0;a<n-r;++a)this[a+r]=f[a%d]}return this},"fill");var O1e=/[^+/0-9A-Za-z-_]/g;function N1e(t){if(t=t.split("=")[0],t=t.trim().replace(O1e,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}o(N1e,"base64clean");function N8(t,e){e=e||1/0;for(var r,n=t.length,i=null,s=[],a=0;a<n;++a){if(r=t.charCodeAt(a),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&s.push(239,191,189);continue}else if(a+1===n){(e-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&s.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;s.push(r)}else if(r<2048){if((e-=2)<0)break;s.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;s.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return s}o(N8,"utf8ToBytes");function L1e(t){for(var e=[],r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}o(L1e,"asciiToBytes");function U1e(t,e){for(var r,n,i,s=[],a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,i=r%256,s.push(i),s.push(n);return s}o(U1e,"utf16leToBytes");function HL(t){return F8.toByteArray(N1e(t))}o(HL,"base64ToBytes");function Wb(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}o(Wb,"blitBuffer");function Cs(t,e){return t instanceof e||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===e.name}o(Cs,"isInstance");function q8(t){return t!==t}o(q8,"numberIsNaN");var q1e=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var n=r*16,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}()});var WL=Q((mke,z1e)=>{z1e.exports=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"}]});var YL=Q((gke,K1e)=>{K1e.exports={name:"Uniswap Labs Default",timestamp:"2022-06-29T15:57:01.868Z",version:{major:4,minor:1,patch:0},tags:{},logoURI:"ipfs://QmNa8mQkrNKp1WEEeGjFezDmDeodkWRevGFN8JCV7b4Xir",keywords:["uniswap","default"],tokens:[{chainId:1,address:"0x111111111117dC0aa78b770fA6A738034120C302",name:"1inch",symbol:"1INCH",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/13469/thumb/1inch-token.png?1608803028",extensions:{bridgeInfo:{"137":{tokenAddress:"0x9c2C5fd7b07E95EE044DDeba0E97a665F142394f"},"42161":{tokenAddress:"0x6314C31A7a1652cE482cffe247E9CB7c3f4BB9aF"}}}},{chainId:1,address:"0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9",name:"Aave",symbol:"AAVE",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12645/thumb/AAVE.png?1601374110",extensions:{bridgeInfo:{"137":{tokenAddress:"0xD6DF932A45C0f255f85145f286eA0b292B21C90B"},"42161":{tokenAddress:"0xba5DdD1f9d7F570dc94a51479a000E3BCE967196"}}}},{chainId:1,address:"0xEd04915c23f00A313a544955524EB7DBD823143d",name:"Alchemy Pay",symbol:"ACH",decimals:8,logoURI:"https://assets.coingecko.com/coins/images/12390/thumb/ACH_%281%29.png?1599691266"},{chainId:1,address:"0x91Af0fBB28ABA7E31403Cb457106Ce79397FD4E6",name:"Aergo",symbol:"AERGO",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/4490/thumb/aergo.png?1647696770"},{chainId:1,address:"0x32353A6C91143bfd6C7d363B546e62a9A2489A20",name:"Adventure Gold",symbol:"AGLD",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/18125/thumb/lpgblc4h_400x400.jpg?1630570955",extensions:{bridgeInfo:{"137":{tokenAddress:"0x6a6bD53d677F8632631662C48bD47b1D4D6524ee"}}}},{chainId:1,address:"0x626E8036dEB333b408Be468F951bdB42433cBF18",name:"AIOZ Network",symbol:"AIOZ",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14631/thumb/aioz_logo.png?1617413126",extensions:{bridgeInfo:{"137":{tokenAddress:"0xe2341718c6C0CbFa8e6686102DD8FbF4047a9e9B"}}}},{chainId:1,address:"0xdBdb4d16EdA451D0503b854CF79D55697F90c8DF",name:"Alchemix",symbol:"ALCX",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14113/thumb/Alchemix.png?1614409874",extensions:{bridgeInfo:{"137":{tokenAddress:"0x95c300e7740D2A88a44124B424bFC1cB2F9c3b89"}}}},{chainId:1,address:"0xAC51066d7bEC65Dc4589368da368b212745d63E8",name:"My Neighbor Alice",symbol:"ALICE",decimals:6,logoURI:"https://assets.coingecko.com/coins/images/14375/thumb/alice_logo.jpg?1615782968",extensions:{bridgeInfo:{"137":{tokenAddress:"0x50858d870FAF55da2fD90FB6DF7c34b5648305C6"}}}},{chainId:1,address:"0xfF20817765cB7f73d4bde2e66e067E58D11095C2",name:"Amp",symbol:"AMP",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12409/thumb/amp-200x200.png?1599625397",extensions:{bridgeInfo:{"137":{tokenAddress:"0x0621d647cecbFb64b79E44302c1933cB4f27054d"}}}},{chainId:1,address:"0x8290333ceF9e6D528dD5618Fb97a76f268f3EDD4",name:"Ankr",symbol:"ANKR",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/4324/thumb/U85xTl2.png?1608111978",extensions:{bridgeInfo:{"137":{tokenAddress:"0x101A023270368c0D50BFfb62780F4aFd4ea79C35"}}}},{name:"Aragon Network Token",address:"0x960b236A07cf122663c4303350609A66A7B288C0",symbol:"ANT",decimals:18,chainId:1,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x960b236A07cf122663c4303350609A66A7B288C0/logo.png"},{chainId:1,address:"0x4d224452801ACEd8B2F0aebE155379bb5D594381",name:"ApeCoin",symbol:"APE",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/24383/small/apecoin.jpg?1647476455",extensions:{bridgeInfo:{"137":{tokenAddress:"0xB7b31a6BC18e48888545CE79e83E06003bE70930"},"42161":{tokenAddress:"0x74885b4D524d497261259B38900f54e6dbAd2210"}}}},{chainId:1,address:"0x0b38210ea11411557c13457D4dA7dC6ea731B88a",name:"API3",symbol:"API3",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/13256/thumb/api3.jpg?1606751424",extensions:{bridgeInfo:{"137":{tokenAddress:"0x45C27821E80F8789b60Fd8B600C73815d34DDa6C"}}}},{chainId:1,address:"0xBA50933C268F567BDC86E1aC131BE072C6B0b71a",name:"ARPA Chain",symbol:"ARPA",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/8506/thumb/9u0a23XY_400x400.jpg?1559027357",extensions:{bridgeInfo:{"137":{tokenAddress:"0xEE800B277A96B0f490a1A732e1D6395FAD960A26"}}}},{chainId:1,address:"0x64D91f12Ece7362F91A6f8E7940Cd55F05060b92",name:"ASH",symbol:"ASH",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/15714/thumb/omnPqaTY.png?1622820503"},{chainId:1,address:"0x2565ae0385659badCada1031DB704442E1b69982",name:"Assemble Protocol",symbol:"ASM",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/11605/thumb/gpvrlkSq_400x400_%281%29.jpg?1591775789"},{chainId:1,address:"0xA9B1Eb5908CfC3cdf91F9B8B3a74108598009096",name:"Bounce",symbol:"AUCTION",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/13860/thumb/1_KtgpRIJzuwfHe0Rl0avP_g.jpeg?1612412025"},{chainId:1,address:"0x18aAA7115705e8be94bfFEBDE57Af9BFc265B998",name:"Audius",symbol:"AUDIO",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12913/thumb/AudiusCoinLogo_2x.png?1603425727",extensions:{bridgeInfo:{"137":{tokenAddress:"0x5eB8D998371971D01954205c7AFE90A7AF6a95AC"}}}},{chainId:1,address:"0x845576c64f9754CF09d87e45B720E82F3EeF522C",name:"Artverse Token",symbol:"AVT",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/19727/thumb/ewnektoB_400x400.png?1635767094"},{chainId:1,address:"0xBB0E17EF65F82Ab018d8EDd776e8DD940327B28b",name:"Axie Infinity",symbol:"AXS",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/13029/thumb/axie_infinity_logo.png?1604471082",extensions:{bridgeInfo:{"137":{tokenAddress:"0x61BDD9C7d4dF4Bf47A4508c0c8245505F2Af5b7b"},"42161":{tokenAddress:"0xe88998Fb579266628aF6a03e3821d5983e5D0089"}}}},{chainId:1,address:"0x3472A5A71965499acd81997a54BBA8D852C6E53d",name:"Badger DAO",symbol:"BADGER",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/13287/thumb/badger_dao_logo.jpg?1607054976",extensions:{bridgeInfo:{"137":{tokenAddress:"0x1FcbE5937B0cc2adf69772D228fA4205aCF4D9b2"},"42161":{tokenAddress:"0xBfa641051Ba0a0Ad1b0AcF549a89536A0D76472E"}}}},{name:"Balancer",address:"0xba100000625a3754423978a60c9317c58a424e3D",symbol:"BAL",decimals:18,chainId:1,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xba100000625a3754423978a60c9317c58a424e3D/logo.png",extensions:{bridgeInfo:{"137":{tokenAddress:"0x9a71012B13CA4d3D0Cdc72A177DF3ef03b0E76A3"},"42161":{tokenAddress:"0x040d1EdC9569d4Bab2D15287Dc5A4F10F56a56B8"}}}},{chainId:1,address:"0xBA11D00c5f74255f56a5E366F4F77f5A186d7f55",name:"Band Protocol",symbol:"BAND",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/9545/thumb/band-protocol.png?1568730326",extensions:{bridgeInfo:{"137":{tokenAddress:"0xA8b1E0764f85f53dfe21760e8AfE5446D82606ac"}}}},{chainId:1,address:"0x0D8775F648430679A709E98d2b0Cb6250d2887EF",name:"Basic Attention Token",symbol:"BAT",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/677/thumb/basic-attention-token.png?1547034427",extensions:{bridgeInfo:{"137":{tokenAddress:"0x3Cef98bb43d732E2F285eE605a8158cDE967D219"}}}},{chainId:1,address:"0xF17e65822b568B3903685a7c9F496CF7656Cc6C2",name:"Biconomy",symbol:"BICO",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/21061/thumb/biconomy_logo.jpg?1638269749",extensions:{bridgeInfo:{"137":{tokenAddress:"0x91c89A94567980f0e9723b487b0beD586eE96aa7"},"42161":{tokenAddress:"0xa68Ec98D7ca870cF1Dd0b00EBbb7c4bF60A8e74d"}}}},{chainId:1,address:"0x5732046A883704404F284Ce41FfADd5b007FD668",name:"Bluzelle",symbol:"BLZ",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/2848/thumb/ColorIcon_3x.png?1622516510",extensions:{bridgeInfo:{"137":{tokenAddress:"0x438B28C5AA5F00a817b7Def7cE2Fb3d5d1970974"}}}},{name:"Bancor Network Token",address:"0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C",symbol:"BNT",decimals:18,chainId:1,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C/logo.png",extensions:{bridgeInfo:{"137":{tokenAddress:"0xc26D47d5c33aC71AC5CF9F776D63Ba292a4F7842"}}}},{chainId:1,address:"0x0391D2021f89DC339F60Fff84546EA23E337750f",name:"BarnBridge",symbol:"BOND",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12811/thumb/barnbridge.jpg?1602728853",extensions:{bridgeInfo:{"10":{tokenAddress:"0x3e7eF8f50246f725885102E8238CBba33F276747"},"137":{tokenAddress:"0xA041544fe2BE56CCe31Ebb69102B965E06aacE80"},"42161":{tokenAddress:"0x0D81E50bC677fa67341c44D7eaA9228DEE64A4e1"}}}},{chainId:1,address:"0x799ebfABE77a6E34311eeEe9825190B9ECe32824",name:"Braintrust",symbol:"BTRST",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/18100/thumb/braintrust.PNG?1630475394"},{chainId:1,address:"0x3506424F91fD33084466F402d5D97f05F8e3b4AF",name:"Chiliz",symbol:"CHZ",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/8834/thumb/Chiliz.png?1561970540",extensions:{bridgeInfo:{"137":{tokenAddress:"0xf1938Ce12400f9a761084E7A80d37e732a4dA056"}}}},{chainId:1,address:"0x80C62FE4487E1351b47Ba49809EBD60ED085bf52",name:"Clover Finance",symbol:"CLV",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/15278/thumb/clover.png?1645084454"},{name:"Compound",address:"0xc00e94Cb662C3520282E6f5717214004A7f26888",symbol:"COMP",decimals:18,chainId:1,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xc00e94Cb662C3520282E6f5717214004A7f26888/logo.png",extensions:{bridgeInfo:{"137":{tokenAddress:"0x8505b9d2254A7Ae468c0E9dd10Ccea3A837aef5c"},"42161":{tokenAddress:"0x354A6dA3fcde098F8389cad84b0182725c6C91dE"}}}},{chainId:1,address:"0xDDB3422497E61e13543BeA06989C0789117555c5",name:"COTI",symbol:"COTI",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/2962/thumb/Coti.png?1559653863",extensions:{bridgeInfo:{"42161":{tokenAddress:"0x6FE14d3CC2f7bDdffBa5CdB3BBE7467dd81ea101"}}}},{chainId:1,address:"0x3D658390460295FB963f54dC0899cfb1c30776Df",name:"Circuits of Value",symbol:"COVAL",decimals:8,logoURI:"https://assets.coingecko.com/coins/images/588/thumb/coval-logo.png?1599493950"},{chainId:1,address:"0xA0b73E1Ff0B80914AB6fe0444E65848C4C34450b",name:"Cronos",symbol:"CRO",decimals:8,logoURI:"https://assets.coingecko.com/coins/images/7310/thumb/oCw2s3GI_400x400.jpeg?1645172042",extensions:{bridgeInfo:{"137":{tokenAddress:"0xAdA58DF0F643D959C2A47c9D4d4c1a4deFe3F11C"}}}},{chainId:1,address:"0x08389495D7456E1951ddF7c3a1314A4bfb646d8B",name:"Crypterium",symbol:"CRPT",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/1901/thumb/crypt.png?1547036205"},{name:"Curve DAO Token",address:"0xD533a949740bb3306d119CC777fa900bA034cd52",symbol:"CRV",decimals:18,chainId:1,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xD533a949740bb3306d119CC777fa900bA034cd52/logo.png",extensions:{bridgeInfo:{"10":{tokenAddress:"0x0994206dfE8De6Ec6920FF4D779B0d950605Fb53"},"137":{tokenAddress:"0x172370d5Cd63279eFa6d502DAB29171933a610AF"},"42161":{tokenAddress:"0x11cDb42B0EB46D95f990BeDD4695A6e3fA034978"}}}},{chainId:1,address:"0x491604c0FDF08347Dd1fa4Ee062a822A5DD06B5D",name:"Cartesi",symbol:"CTSI",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/11038/thumb/cartesi.png?1592288021",extensions:{bridgeInfo:{"137":{tokenAddress:"0x2727Ab1c2D22170ABc9b595177B2D5C6E1Ab7B7B"},"42161":{tokenAddress:"0x319f865b287fCC10b30d8cE6144e8b6D1b476999"}}}},{chainId:1,address:"0x321C2fE4446C7c963dc41Dd58879AF648838f98D",name:"Cryptex Finance",symbol:"CTX",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14932/thumb/glossy_icon_-_C200px.png?1619073171",extensions:{bridgeInfo:{"137":{tokenAddress:"0x8c208BC2A808a088a78398fed8f2640cab0b6EDb"}}}},{chainId:1,address:"0xDf801468a808a32656D2eD2D2d80B72A129739f4",name:"Somnium Space CUBEs",symbol:"CUBE",decimals:8,logoURI:"https://assets.coingecko.com/coins/images/10687/thumb/CUBE_icon.png?1617026861",extensions:{bridgeInfo:{"137":{tokenAddress:"0x276C9cbaa4BDf57d7109a41e67BD09699536FA3d"}}}},{chainId:1,address:"0x41e5560054824eA6B0732E656E3Ad64E20e94E45",name:"Civic",symbol:"CVC",decimals:8,logoURI:"https://assets.coingecko.com/coins/images/788/thumb/civic.png?1547034556",extensions:{bridgeInfo:{"137":{tokenAddress:"0x66Dc5A08091d1968e08C16aA5b27BAC8398b02Be"},"42161":{tokenAddress:"0x9DfFB23CAd3322440bCcFF7aB1C58E781dDBF144"}}}},{chainId:1,address:"0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B",name:"Convex Finance",symbol:"CVX",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/15585/thumb/convex.png?1621256328",extensions:{bridgeInfo:{"137":{tokenAddress:"0x4257EA7637c355F81616050CbB6a9b709fd72683"}}}},{name:"Dai Stablecoin",address:"0x6B175474E89094C44Da98b954EedeAC495271d0F",symbol:"DAI",decimals:18,chainId:1,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x6B175474E89094C44Da98b954EedeAC495271d0F/logo.png",extensions:{bridgeInfo:{"10":{tokenAddress:"0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1"},"137":{tokenAddress:"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063"},"42161":{tokenAddress:"0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1"}}}},{chainId:1,address:"0x3A880652F47bFaa771908C07Dd8673A787dAEd3A",name:"DerivaDAO",symbol:"DDX",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/13453/thumb/ddx_logo.png?1608741641",extensions:{bridgeInfo:{"137":{tokenAddress:"0x26f5FB1e6C8a65b3A873fF0a213FA16EFF5a7828"}}}},{chainId:1,address:"0x84cA8bc7997272c7CfB4D0Cd3D55cd942B3c9419",name:"DIA",symbol:"DIA",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/11955/thumb/image.png?1646041751",extensions:{bridgeInfo:{"137":{tokenAddress:"0x993f2CafE9dbE525243f4A78BeBC69DAc8D36000"}}}},{chainId:1,address:"0x0AbdAce70D3790235af448C88547603b945604ea",name:"district0x",symbol:"DNT",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/849/thumb/district0x.png?1547223762"},{chainId:1,address:"0x92D6C1e31e14520e676a687F0a93788B716BEff5",name:"dYdX",symbol:"DYDX",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/17500/thumb/hjnIm9bV.jpg?1628009360",extensions:{bridgeInfo:{"137":{tokenAddress:"0x4C3bF0a3DE9524aF68327d1D2558a3B70d17D42a"},"42161":{tokenAddress:"0x51863cB90Ce5d6dA9663106F292fA27c8CC90c5a"}}}},{chainId:1,address:"0x761D38e5ddf6ccf6Cf7c55759d5210750B5D60F3",name:"Dogelon Mars",symbol:"ELON",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14962/thumb/6GxcPRo3_400x400.jpg?1619157413",extensions:{bridgeInfo:{"137":{tokenAddress:"0xE0339c80fFDE91F3e20494Df88d4206D86024cdF"},"42161":{tokenAddress:"0x3e4Cff6E50F37F731284A92d44AE943e17077fD4"}}}},{chainId:1,address:"0xF629cBd94d3791C9250152BD8dfBDF380E2a3B9c",name:"Enjin Coin",symbol:"ENJ",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/1102/thumb/enjin-coin-logo.png?1547035078",extensions:{bridgeInfo:{"137":{tokenAddress:"0x7eC26842F195c852Fa843bB9f6D8B583a274a157"},"42161":{tokenAddress:"0x7fa9549791EFc9030e1Ed3F25D18014163806758"}}}},{chainId:1,address:"0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72",name:"Ethereum Name Service",symbol:"ENS",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/19785/thumb/acatxTm8_400x400.jpg?1635850140",extensions:{bridgeInfo:{"10":{tokenAddress:"0x65559aA14915a70190438eF90104769e5E890A00"},"137":{tokenAddress:"0xbD7A5Cf51d22930B8B3Df6d834F9BCEf90EE7c4f"},"42161":{tokenAddress:"0xfeA31d704DEb0975dA8e77Bf13E04239e70d7c28"}}}},{chainId:1,address:"0xBBc2AE13b23d715c30720F079fcd9B4a74093505",name:"Ethernity Chain",symbol:"ERN",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14238/thumb/LOGO_HIGH_QUALITY.png?1647831402",extensions:{bridgeInfo:{"137":{tokenAddress:"0x0E50BEA95Fe001A370A4F1C220C49AEdCB982DeC"}}}},{chainId:1,address:"0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c",name:"Euro Coin",symbol:"EUROC",decimals:6,logoURI:"https://assets.coingecko.com/coins/images/26045/thumb/euro-coin.png?1655394420",extensions:{bridgeInfo:{"137":{tokenAddress:"0x8a037dbcA8134FFc72C362e394e35E0Cad618F85"}}}},{chainId:1,address:"0xa0246c9032bC3A600820415aE600c6388619A14D",name:"Harvest Finance",symbol:"FARM",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12304/thumb/Harvest.png?1613016180",extensions:{bridgeInfo:{"137":{tokenAddress:"0x176f5AB638cf4Ff3B6239Ba609C3fadAA46ef5B0"}}}},{chainId:1,address:"0xaea46A60368A7bD060eec7DF8CBa43b7EF41Ad85",name:"Fetch ai",symbol:"FET",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/5681/thumb/Fetch.jpg?1572098136",extensions:{bridgeInfo:{"137":{tokenAddress:"0x7583FEDDbceFA813dc18259940F76a02710A8905"}}}},{chainId:1,address:"0x77FbA179C79De5B7653F68b5039Af940AdA60ce0",name:"Ampleforth Governance Token",symbol:"FORTH",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14917/thumb/photo_2021-04-22_00.00.03.jpeg?1619020835",extensions:{bridgeInfo:{"137":{tokenAddress:"0x5eCbA59DAcc1ADc5bDEA35f38A732823fc3dE977"}}}},{chainId:1,address:"0xc770EEfAd204B5180dF6a14Ee197D99d808ee52d",name:"ShapeShift FOX Token",symbol:"FOX",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/9988/thumb/FOX.png?1574330622",extensions:{bridgeInfo:{"137":{tokenAddress:"0x65A05DB8322701724c197AF82C9CaE41195B0aA8"}}}},{chainId:1,address:"0x4E15361FD6b4BB609Fa63C81A2be19d873717870",name:"Fantom",symbol:"FTM",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/4001/thumb/Fantom.png?1558015016",extensions:{bridgeInfo:{"137":{tokenAddress:"0xC9c1c1c20B3658F8787CC2FD702267791f224Ce1"},"42161":{tokenAddress:"0xd42785D323e608B9E99fa542bd8b1000D4c2Df37"}}}},{chainId:1,address:"0x8c15Ef5b4B21951d50E53E4fbdA8298FFAD25057",name:"Function X",symbol:"FX",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/8186/thumb/47271330_590071468072434_707260356350705664_n.jpg?1556096683"},{chainId:1,address:"0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0",name:"Frax Share",symbol:"FXS",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/13423/thumb/frax_share.png?1608478989",extensions:{bridgeInfo:{"137":{tokenAddress:"0x3e121107F6F22DA4911079845a470757aF4e1A1b"},"42161":{tokenAddress:"0xd9f9d2Ee2d3EFE420699079f16D9e924affFdEA4"}}}},{chainId:1,address:"0x15D4c048F83bd7e37d49eA4C83a07267Ec4203dA",name:"Gala",symbol:"GALA",decimals:8,logoURI:"https://assets.coingecko.com/coins/images/12493/thumb/GALA-COINGECKO.png?1600233435",extensions:{bridgeInfo:{"137":{tokenAddress:"0x09E1943Dd2A4e82032773594f50CF54453000b97"}}}},{chainId:1,address:"0xdab396cCF3d84Cf2D07C4454e10C8A6F5b008D2b",name:"Goldfinch",symbol:"GFI",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/19081/thumb/GOLDFINCH.png?1634369662"},{chainId:1,address:"0x7DD9c5Cba05E151C895FDe1CF355C9A1D5DA6429",name:"Golem",symbol:"GLM",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/542/thumb/Golem_Submark_Positive_RGB.png?1606392013",extensions:{bridgeInfo:{"137":{tokenAddress:"0x0B220b82F3eA3B7F6d9A1D8ab58930C064A2b5Bf"}}}},{name:"Gnosis Token",address:"0x6810e776880C02933D47DB1b9fc05908e5386b96",symbol:"GNO",decimals:18,chainId:1,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x6810e776880C02933D47DB1b9fc05908e5386b96/logo.png",extensions:{bridgeInfo:{"137":{tokenAddress:"0x5FFD62D3C3eE2E81C00A7b9079FB248e7dF024A8"},"42161":{tokenAddress:"0xa0b862F60edEf4452F25B4160F177db44DeB6Cf1"}}}},{chainId:1,address:"0xccC8cb5229B0ac8069C51fd58367Fd1e622aFD97",name:"Gods Unchained",symbol:"GODS",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/17139/thumb/10631.png?1635718182",extensions:{bridgeInfo:{"137":{tokenAddress:"0xF88fc6b493eda7650E4bcf7A290E8d108F677CfE"}}}},{chainId:1,address:"0xc944E90C64B2c07662A292be6244BDf05Cda44a7",name:"The Graph",symbol:"GRT",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/13397/thumb/Graph_Token.png?1608145566",extensions:{bridgeInfo:{"137":{tokenAddress:"0x5fe2B58c013d7601147DcdD68C143A77499f5531"},"42161":{tokenAddress:"0x23A941036Ae778Ac51Ab04CEa08Ed6e2FE103614"}}}},{chainId:1,address:"0xDe30da39c46104798bB5aA3fe8B9e0e1F348163F",name:"Gitcoin",symbol:"GTC",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/15810/thumb/gitcoin.png?1621992929",extensions:{bridgeInfo:{"137":{tokenAddress:"0xdb95f9188479575F3F718a245EcA1B3BF74567EC"},"42161":{tokenAddress:"0x7f9a7DB853Ca816B9A138AEe3380Ef34c437dEe0"}}}},{chainId:1,address:"0x056Fd409E1d7A124BD7017459dFEa2F387b6d5Cd",name:"Gemini Dollar",symbol:"GUSD",decimals:2,logoURI:"https://assets.coingecko.com/coins/images/5992/thumb/gemini-dollar-gusd.png?1536745278",extensions:{bridgeInfo:{"137":{tokenAddress:"0xC8A94a3d3D2dabC3C1CaffFFDcA6A7543c3e3e65"}}}},{chainId:1,address:"0xC08512927D12348F6620a698105e1BAac6EcD911",name:"GYEN",symbol:"GYEN",decimals:6,logoURI:"https://assets.coingecko.com/coins/images/14191/thumb/icon_gyen_200_200.png?1614843343",extensions:{bridgeInfo:{"137":{tokenAddress:"0x482bc619eE7662759CDc0685B4E78f464Da39C73"}}}},{chainId:1,address:"0x71Ab77b7dbB4fa7e017BC15090b2163221420282",name:"Highstreet",symbol:"HIGH",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/18973/thumb/logosq200200Coingecko.png?1634090470"},{chainId:1,address:"0xB705268213D593B8FD88d3FDEFF93AFF5CbDcfAE",name:"IDEX",symbol:"IDEX",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/2565/thumb/logomark-purple-286x286.png?1638362736",extensions:{bridgeInfo:{"137":{tokenAddress:"0x9Cb74C8032b007466865f060ad2c46145d45553D"}}}},{chainId:1,address:"0xF57e7e7C23978C3cAEC3C3548E3D615c346e79fF",name:"Immutable X",symbol:"IMX",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/17233/thumb/imx.png?1636691817",extensions:{bridgeInfo:{"137":{tokenAddress:"0x183070C90B34A63292cC908Ce1b263Cb56D49A7F"}}}},{chainId:1,address:"0xe28b3B32B6c345A34Ff64674606124Dd5Aceca30",name:"Injective",symbol:"INJ",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12882/thumb/Secondary_Symbol.png?1628233237",extensions:{bridgeInfo:{"137":{tokenAddress:"0x4E8dc2149EaC3f3dEf36b1c281EA466338249371"}}}},{chainId:1,address:"0x41D5D79431A913C4aE7d69a668ecdfE5fF9DFB68",name:"Inverse Finance",symbol:"INV",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14205/thumb/inverse_finance.jpg?1614921871",extensions:{bridgeInfo:{"137":{tokenAddress:"0xF18Ac368001b0DdC80aA6a8374deb49e868EFDb8"}}}},{chainId:1,address:"0x6fB3e0A217407EFFf7Ca062D46c26E5d60a14d69",name:"IoTeX",symbol:"IOTX",decimals:18,logoURI:"https://s2.coinmarketcap.com/static/img/coins/64x64/2777.png",extensions:{bridgeInfo:{"137":{tokenAddress:"0xf6372cDb9c1d3674E83842e3800F2A62aC9F3C66"}}}},{chainId:1,address:"0x7420B4b9a0110cdC71fB720908340C03F9Bc03EC",name:"JasmyCoin",symbol:"JASMY",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/13876/thumb/JASMY200x200.jpg?1612473259",extensions:{bridgeInfo:{"137":{tokenAddress:"0xb87f5c1E81077FfcfE821dA240fd20C99c533aF1"}}}},{chainId:1,address:"0x85Eee30c52B0b379b046Fb0F85F4f3Dc3009aFEC",name:"Keep Network",symbol:"KEEP",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/3373/thumb/IuNzUb5b_400x400.jpg?1589526336",extensions:{bridgeInfo:{"137":{tokenAddress:"0x42f37A1296b2981F7C3cAcEd84c5096b2Eb0C72C"}}}},{name:"Kyber Network Crystal",address:"0xdd974D5C2e2928deA5F71b9825b8b646686BD200",symbol:"KNC",decimals:18,chainId:1,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdd974D5C2e2928deA5F71b9825b8b646686BD200/logo.png",extensions:{bridgeInfo:{"137":{tokenAddress:"0x324b28d6565f784d596422B0F2E5aB6e9CFA1Dc7"}}}},{chainId:1,address:"0x1cEB5cB57C4D4E2b2433641b95Dd330A33185A44",name:"Keep3rV1",symbol:"KP3R",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12966/thumb/kp3r_logo.jpg?1607057458",extensions:{bridgeInfo:{"137":{tokenAddress:"0x53AEc293212E3B792563Bc16f1be26956adb12e9"}}}},{chainId:1,address:"0x464eBE77c293E473B48cFe96dDCf88fcF7bFDAC0",name:"KRYLL",symbol:"KRL",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/2807/thumb/krl.png?1547036979"},{chainId:1,address:"0x037A54AaB062628C9Bbae1FDB1583c195585fe41",name:"LCX",symbol:"LCX",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/9985/thumb/zRPSu_0o_400x400.jpg?1574327008",extensions:{bridgeInfo:{"137":{tokenAddress:"0xE8A51D0dD1b4525189ddA2187F90ddF0932b5482"}}}},{chainId:1,address:"0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32",name:"Lido DAO",symbol:"LDO",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/13573/thumb/Lido_DAO.png?1609873644",extensions:{bridgeInfo:{"137":{tokenAddress:"0xC3C7d422809852031b44ab29EEC9F1EfF2A58756"}}}},{name:"ChainLink Token",address:"0x514910771AF9Ca656af840dff83E8264EcF986CA",symbol:"LINK",decimals:18,chainId:1,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x514910771AF9Ca656af840dff83E8264EcF986CA/logo.png",extensions:{bridgeInfo:{"10":{tokenAddress:"0x350a791Bfc2C21F9Ed5d10980Dad2e2638ffa7f6"},"137":{tokenAddress:"0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39"},"42161":{tokenAddress:"0xf97f4df75117a78c1A5a0DBb814Af92458539FB4"}}}},{name:"Loom Network",address:"0xA4e8C3Ec456107eA67d3075bF9e3DF3A75823DB0",symbol:"LOOM",decimals:18,chainId:1,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA4e8C3Ec456107eA67d3075bF9e3DF3A75823DB0/logo.png",extensions:{bridgeInfo:{"137":{tokenAddress:"0x66EfB7cC647e0efab02eBA4316a2d2941193F6b3"}}}},{chainId:1,address:"0x58b6A8A3302369DAEc383334672404Ee733aB239",name:"Livepeer",symbol:"LPT",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/7137/thumb/logo-circle-green.png?1619593365",extensions:{bridgeInfo:{"137":{tokenAddress:"0x3962F4A0A0051DccE0be73A7e09cEf5756736712"},"42161":{tokenAddress:"0x289ba1701C2F088cf0faf8B3705246331cB8A839"}}}},{chainId:1,address:"0x6DEA81C8171D0bA574754EF6F8b412F2Ed88c54D",name:"Liquity",symbol:"LQTY",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14665/thumb/200-lqty-icon.png?1617631180",extensions:{bridgeInfo:{"137":{tokenAddress:"0x8Ab2Fec94d17ae69FB90E7c773f2C85Ed1802c01"}}}},{name:"LoopringCoin V2",address:"0xBBbbCA6A901c926F240b89EacB641d8Aec7AEafD",symbol:"LRC",decimals:18,chainId:1,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xBBbbCA6A901c926F240b89EacB641d8Aec7AEafD/logo.png",extensions:{bridgeInfo:{"10":{tokenAddress:"0xFEaA9194F9F8c1B65429E31341a103071464907E"},"137":{tokenAddress:"0x84e1670F61347CDaeD56dcc736FB990fBB47ddC1"},"42161":{tokenAddress:"0x46d0cE7de6247b0A95f67b43B589b4041BaE7fbE"}}}},{chainId:1,address:"0x0F5D2fB29fb7d3CFeE444a200298f468908cC942",name:"Decentraland",symbol:"MANA",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/878/thumb/decentraland-mana.png?1550108745",extensions:{bridgeInfo:{"137":{tokenAddress:"0xA1c57f48F0Deb89f569dFbE6E2B7f46D33606fD4"},"42161":{tokenAddress:"0x442d24578A564EF628A65e6a7E3e7be2a165E231"}}}},{chainId:1,address:"0x69af81e73A73B40adF4f3d4223Cd9b1ECE623074",name:"Mask Network",symbol:"MASK",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14051/thumb/Mask_Network.jpg?1614050316",extensions:{bridgeInfo:{"10":{tokenAddress:"0x3390108E913824B8eaD638444cc52B9aBdF63798"},"137":{tokenAddress:"0x2B9E7ccDF0F4e5B24757c1E1a80e311E34Cb10c7"},"42161":{tokenAddress:"0x533A7B414CD1236815a5e09F1E97FC7d5c313739"}}}},{chainId:1,address:"0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0",name:"Polygon",symbol:"MATIC",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/4713/thumb/matic-token-icon.png?1624446912",extensions:{bridgeInfo:{"42161":{tokenAddress:"0x561877b6b3DD7651313794e5F2894B2F18bE0766"}}}},{chainId:1,address:"0x949D48EcA67b17269629c7194F4b727d4Ef9E5d6",name:"Merit Circle",symbol:"MC",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/19304/thumb/Db4XqML.png?1634972154"},{chainId:1,address:"0xfC98e825A2264D890F9a1e68ed50E1526abCcacD",name:"Moss Carbon Credit",symbol:"MCO2",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14414/thumb/ENtxnThA_400x400.jpg?1615948522",extensions:{bridgeInfo:{"137":{tokenAddress:"0xAa7DbD1598251f856C12f63557A4C4397c253Cea"}}}},{chainId:1,address:"0x814e0908b12A99FeCf5BC101bB5d0b8B5cDf7d26",name:"Measurable Data Token",symbol:"MDT",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/2441/thumb/mdt_logo.png?1569813574"},{chainId:1,address:"0x99D8a9C45b2ecA8864373A26D1459e3Dff1e17F3",name:"Magic Internet Money",symbol:"MIM",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/16786/thumb/mimlogopng.png?1624979612",extensions:{bridgeInfo:{"137":{tokenAddress:"0x01288e04435bFcd4718FF203D6eD18146C17Cd4b"},"42161":{tokenAddress:"0xB20A02dfFb172C474BC4bDa3fD6f4eE70C04daf2"}}}},{chainId:1,address:"0x09a3EcAFa817268f77BE1283176B946C4ff2E608",name:"Mirror Protocol",symbol:"MIR",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/13295/thumb/mirror_logo_transparent.png?1611554658",extensions:{bridgeInfo:{"137":{tokenAddress:"0x1C5cccA2CB59145A4B25F452660cbA6436DDce9b"}}}},{name:"Maker",address:"0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2",symbol:"MKR",decimals:18,chainId:1,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2/logo.png",extensions:{bridgeInfo:{"10":{tokenAddress:"0xab7bAdEF82E9Fe11f6f33f87BC9bC2AA27F2fCB5"},"137":{tokenAddress:"0x6f7C932e7684666C9fd1d44527765433e01fF61d"},"42161":{tokenAddress:"0x2e9a6Df78E42a30712c10a9Dc4b1C8656f8F2879"}}}},{chainId:1,address:"0xec67005c4E498Ec7f55E092bd1d35cbC47C91892",name:"Melon",symbol:"MLN",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/605/thumb/melon.png?1547034295",extensions:{bridgeInfo:{"137":{tokenAddress:"0xa9f37D84c856fDa3812ad0519Dad44FA0a3Fe207"},"42161":{tokenAddress:"0x8f5c1A99b1df736Ad685006Cb6ADCA7B7Ae4b514"}}}},{chainId:1,address:"0x33349B282065b0284d756F0577FB39c158F935e6",name:"Maple",symbol:"MPL",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14097/thumb/photo_2021-05-03_14.20.41.jpeg?1620022863"},{chainId:1,address:"0x65Ef703f5594D2573eb71Aaf55BC0CB548492df4",name:"Multichain",symbol:"MULTI",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/22087/thumb/1_Wyot-SDGZuxbjdkaOeT2-A.png?1640764238"},{chainId:1,address:"0xe2f2a5C287993345a840Db3B0845fbC70f5935a5",name:"mStable USD",symbol:"MUSD",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/11576/thumb/mStable_USD.png?1595591803"},{chainId:1,address:"0x9E46A38F5DaaBe8683E10793b06749EEF7D733d1",name:"PolySwarm",symbol:"NCT",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/2843/thumb/ImcYCVfX_400x400.jpg?1628519767",extensions:{bridgeInfo:{"137":{tokenAddress:"0x4985E0B13554fB521840e893574D3848C10Fcc6f"},"42161":{tokenAddress:"0x53236015A675fcB937485F1AE58040e4Fb920d5b"}}}},{chainId:1,address:"0x5Cf04716BA20127F1E2297AdDCf4B5035000c9eb",name:"NKN",symbol:"NKN",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/3375/thumb/nkn.png?1548329212"},{name:"Numeraire",address:"0x1776e1F26f98b1A5dF9cD347953a26dd3Cb46671",symbol:"NMR",decimals:18,chainId:1,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x1776e1F26f98b1A5dF9cD347953a26dd3Cb46671/logo.png",extensions:{bridgeInfo:{"137":{tokenAddress:"0x0Bf519071b02F22C17E7Ed5F4002ee1911f46729"},"42161":{tokenAddress:"0x597701b32553b9fa473e21362D480b3a6B569711"}}}},{chainId:1,address:"0x4fE83213D56308330EC302a8BD641f1d0113A4Cc",name:"NuCypher",symbol:"NU",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/3318/thumb/photo1198982838879365035.jpg?1547037916"},{chainId:1,address:"0x967da4048cD07aB37855c090aAF366e4ce1b9F48",name:"Ocean Protocol",symbol:"OCEAN",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/3687/thumb/ocean-protocol-logo.jpg?1547038686",extensions:{bridgeInfo:{"137":{tokenAddress:"0x282d8efCe846A88B159800bd4130ad77443Fa1A1"},"42161":{tokenAddress:"0x933d31561e470478079FEB9A6Dd2691fAD8234DF"}}}},{chainId:1,address:"0x8207c1FfC5B6804F6024322CcF34F29c3541Ae26",name:"Origin Protocol",symbol:"OGN",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/3296/thumb/op.jpg?1547037878",extensions:{bridgeInfo:{"137":{tokenAddress:"0xa63Beffd33AB3a2EfD92a39A7D2361CEE14cEbA8"}}}},{chainId:1,address:"0xd26114cd6EE289AccF82350c8d8487fedB8A0C07",name:"OMG Network",symbol:"OMG",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/776/thumb/OMG_Network.jpg?1591167168",extensions:{bridgeInfo:{"137":{tokenAddress:"0x62414D03084EeB269E18C970a21f45D2967F0170"}}}},{chainId:1,address:"0x6F59e0461Ae5E2799F1fB3847f05a63B16d0DbF8",name:"ORCA Alliance",symbol:"ORCA",decimals:18,logoURI:"https://s2.coinmarketcap.com/static/img/coins/64x64/5183.png"},{chainId:1,address:"0x0258F474786DdFd37ABCE6df6BBb1Dd5dfC4434a",name:"Orion Protocol",symbol:"ORN",decimals:8,logoURI:"https://assets.coingecko.com/coins/images/11841/thumb/orion_logo.png?1594943318",extensions:{bridgeInfo:{"137":{tokenAddress:"0x0EE392bA5ef1354c9bd75a98044667d307C0e773"}}}},{name:"Orchid",address:"0x4575f41308EC1483f3d399aa9a2826d74Da13Deb",symbol:"OXT",decimals:18,chainId:1,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x4575f41308EC1483f3d399aa9a2826d74Da13Deb/logo.png",extensions:{bridgeInfo:{"137":{tokenAddress:"0x9880e3dDA13c8e7D4804691A45160102d31F6060"}}}},{chainId:1,address:"0xc1D204d77861dEf49b6E769347a883B15EC397Ff",name:"PayperEx",symbol:"PAX",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/1601/thumb/pax.png?1547035800"},{chainId:1,address:"0x45804880De22913dAFE09f4980848ECE6EcbAf78",name:"PAX Gold",symbol:"PAXG",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/9519/thumb/paxg.PNG?1568542565",extensions:{bridgeInfo:{"137":{tokenAddress:"0x553d3D295e0f695B9228246232eDF400ed3560B5"},"42161":{tokenAddress:"0xfEb4DfC8C4Cf7Ed305bb08065D08eC6ee6728429"}}}},{chainId:1,address:"0xbC396689893D065F41bc2C6EcbeE5e0085233447",name:"Perpetual Protocol",symbol:"PERP",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12381/thumb/60d18e06844a844ad75901a9_mark_only_03.png?1628674771",extensions:{bridgeInfo:{"10":{tokenAddress:"0x9e1028F5F1D5eDE59748FFceE5532509976840E0"},"137":{tokenAddress:"0x263534a4Fe3cb249dF46810718B7B612a30ebbff"},"42161":{tokenAddress:"0x753D224bCf9AAFaCD81558c32341416df61D3DAC"}}}},{chainId:1,address:"0x3a4f40631a4f906c2BaD353Ed06De7A5D3fCb430",name:"PlayDapp",symbol:"PLA",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14316/thumb/54023228.png?1615366911",extensions:{bridgeInfo:{"137":{tokenAddress:"0x8765f05ADce126d70bcdF1b0a48Db573316662eB"}}}},{chainId:1,address:"0xD8912C10681D8B21Fd3742244f44658dBA12264E",name:"Pluton",symbol:"PLU",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/1241/thumb/pluton.png?1548331624",extensions:{bridgeInfo:{"137":{tokenAddress:"0x7dc0cb65EC6019330a6841e9c274f2EE57A6CA6C"}}}},{chainId:1,address:"0x83e6f1E41cdd28eAcEB20Cb649155049Fac3D5Aa",name:"Polkastarter",symbol:"POLS",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12648/thumb/polkastarter.png?1609813702",extensions:{bridgeInfo:{"137":{tokenAddress:"0x8dc302e2141DA59c934d900886DbF1518Fd92cd4"}}}},{chainId:1,address:"0x9992eC3cF6A55b00978cdDF2b27BC6882d88D1eC",name:"Polymath",symbol:"POLY",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/2784/thumb/inKkF01.png?1605007034",extensions:{bridgeInfo:{"137":{tokenAddress:"0xcB059C5573646047D6d88dDdb87B745C18161d3b"}}}},{chainId:1,address:"0x595832F8FC6BF59c85C527fEC3740A1b7a361269",name:"Power Ledger",symbol:"POWR",decimals:6,logoURI:"https://assets.coingecko.com/coins/images/1104/thumb/power-ledger.png?1547035082",extensions:{bridgeInfo:{"137":{tokenAddress:"0x0AaB8DC887D34f00D50E19aee48371a941390d14"},"42161":{tokenAddress:"0x4e91F2AF1ee0F84B529478f19794F5AFD423e4A6"}}}},{chainId:1,address:"0x226bb599a12C826476e3A771454697EA52E9E220",name:"Propy",symbol:"PRO",decimals:8,logoURI:"https://assets.coingecko.com/coins/images/869/thumb/propy.png?1548332100",extensions:{bridgeInfo:{"137":{tokenAddress:"0x82FFdFD1d8699E8886a4e77CeFA9dd9710a7FefD"}}}},{chainId:1,address:"0x4a220E6096B25EADb88358cb44068A3248254675",name:"Quant",symbol:"QNT",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/3370/thumb/5ZOu7brX_400x400.jpg?1612437252",extensions:{bridgeInfo:{"137":{tokenAddress:"0x36B77a184bE8ee56f5E81C56727B20647A42e28E"}}}},{chainId:1,address:"0x99ea4dB9EE77ACD40B119BD1dC4E33e1C070b80d",name:"Quantstamp",symbol:"QSP",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/1219/thumb/0_E0kZjb4dG4hUnoDD_.png?1604815917"},{chainId:1,address:"0x6c28AeF8977c9B773996d0e8376d2EE379446F2f",name:"Quickswap",symbol:"QUICK",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/13970/thumb/1_pOU6pBMEmiL-ZJVb0CYRjQ.png?1613386659",extensions:{bridgeInfo:{"137":{tokenAddress:"0x831753DD7087CaC61aB5644b308642cc1c33Dc13"}}}},{chainId:1,address:"0x31c8EAcBFFdD875c74b94b077895Bd78CF1E64A3",name:"Radicle",symbol:"RAD",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14013/thumb/radicle.png?1614402918",extensions:{bridgeInfo:{"137":{tokenAddress:"0x2f81e176471CC57fDC76f7d332FB4511bF2bebDD"}}}},{chainId:1,address:"0x03ab458634910AaD20eF5f1C8ee96F1D6ac54919",name:"Rai Reflex Index",symbol:"RAI",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14004/thumb/RAI-logo-coin.png?1613592334",extensions:{bridgeInfo:{"10":{tokenAddress:"0x7FB688CCf682d58f86D7e38e03f9D22e7705448B"},"137":{tokenAddress:"0x00e5646f60AC6Fb446f621d146B6E1886f002905"},"42161":{tokenAddress:"0xaeF5bbcbFa438519a5ea80B4c7181B4E78d419f2"}}}},{chainId:1,address:"0xba5BDe662c17e2aDFF1075610382B9B691296350",name:"SuperRare",symbol:"RARE",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/17753/thumb/RARE.jpg?1629220534"},{chainId:1,address:"0xFca59Cd816aB1eaD66534D82bc21E7515cE441CF",name:"Rarible",symbol:"RARI",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/11845/thumb/Rari.png?1594946953",extensions:{bridgeInfo:{"137":{tokenAddress:"0x780053837cE2CeEaD2A90D9151aA21FC89eD49c2"},"42161":{tokenAddress:"0xCF8600347Dc375C5f2FdD6Dab9BB66e0b6773cd7"}}}},{chainId:1,address:"0xA4EED63db85311E22dF4473f87CcfC3DaDCFA3E3",name:"Rubic",symbol:"RBC",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12629/thumb/200x200.png?1607952509",extensions:{bridgeInfo:{"137":{tokenAddress:"0xc3cFFDAf8F3fdF07da6D5e3A89B8723D5E385ff8"},"42161":{tokenAddress:"0x2E9AE8f178d5Ea81970C7799A377B3985cbC335F"}}}},{chainId:1,address:"0x6123B0049F904d730dB3C36a31167D9d4121fA6B",name:"Ribbon Finance",symbol:"RBN",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/15823/thumb/RBN_64x64.png?1633529723"},{name:"Republic Token",address:"0x408e41876cCCDC0F92210600ef50372656052a38",symbol:"REN",decimals:18,chainId:1,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x408e41876cCCDC0F92210600ef50372656052a38/logo.png",extensions:{bridgeInfo:{"137":{tokenAddress:"0x19782D3Dc4701cEeeDcD90f0993f0A9126ed89d0"},"42161":{tokenAddress:"0x9fA891e1dB0a6D1eEAC4B929b5AAE1011C79a204"}}}},{name:"Reputation Augur v1",address:"0x1985365e9f78359a9B6AD760e32412f4a445E862",symbol:"REP",decimals:18,chainId:1,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x1985365e9f78359a9B6AD760e32412f4a445E862/logo.png"},{name:"Reputation Augur v2",address:"0x221657776846890989a759BA2973e427DfF5C9bB",symbol:"REPv2",decimals:18,chainId:1,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x221657776846890989a759BA2973e427DfF5C9bB/logo.png",extensions:{bridgeInfo:{"137":{tokenAddress:"0x6563c1244820CfBd6Ca8820FBdf0f2847363F733"}}}},{chainId:1,address:"0x8f8221aFbB33998d8584A2B05749bA73c37a938a",name:"Request",symbol:"REQ",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/1031/thumb/Request_icon_green.png?1643250951",extensions:{bridgeInfo:{"137":{tokenAddress:"0xAdf2F2Ed91755eA3f4bcC9107a494879f633ae7C"}}}},{chainId:1,address:"0xD291E7a03283640FDc51b121aC401383A46cC623",name:"Rari Governance Token",symbol:"RGT",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12900/thumb/Rari_Logo_Transparent.png?1613978014",extensions:{bridgeInfo:{"10":{tokenAddress:"0xB548f63D4405466B36C0c0aC3318a22fDcec711a"},"137":{tokenAddress:"0x3b9dB434F08003A89554CDB43b3e0b1f8734BdE7"},"42161":{tokenAddress:"0xef888bcA6AB6B1d26dbeC977C455388ecd794794"}}}},{chainId:1,address:"0x607F4C5BB672230e8672085532f7e901544a7375",name:"iExec RLC",symbol:"RLC",decimals:9,logoURI:"https://assets.coingecko.com/coins/images/646/thumb/pL1VuXm.png?1604543202",extensions:{bridgeInfo:{"137":{tokenAddress:"0xbe662058e00849C3Eef2AC9664f37fEfdF2cdbFE"}}}},{chainId:1,address:"0xf1f955016EcbCd7321c7266BccFB96c68ea5E49b",name:"Rally",symbol:"RLY",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12843/thumb/image.png?1611212077"},{chainId:1,address:"0x6De037ef9aD2725EB40118Bb1702EBb27e4Aeb24",name:"Render Token",symbol:"RNDR",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/11636/thumb/rndr.png?1638840934",extensions:{bridgeInfo:{"137":{tokenAddress:"0x61299774020dA444Af134c82fa83E3810b309991"}}}},{chainId:1,address:"0x3845badAde8e6dFF049820680d1F14bD3903a5d0",name:"The Sandbox",symbol:"SAND",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12129/thumb/sandbox_logo.jpg?1597397942",extensions:{bridgeInfo:{"137":{tokenAddress:"0xBbba073C31bF03b8ACf7c28EF0738DeCF3695683"}}}},{chainId:1,address:"0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE",name:"Shiba Inu",symbol:"SHIB",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/11939/thumb/shiba.png?1622619446",extensions:{bridgeInfo:{"137":{tokenAddress:"0x6f8a06447Ff6FcF75d803135a7de15CE88C1d4ec"},"42161":{tokenAddress:"0x5033833c9fe8B9d3E09EEd2f73d2aaF7E3872fd1"}}}},{chainId:1,address:"0x7C84e62859D0715eb77d1b1C4154Ecd6aBB21BEC",name:"Shping",symbol:"SHPING",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/2588/thumb/r_yabKKi_400x400.jpg?1639470164"},{chainId:1,address:"0x00c83aeCC790e8a4453e5dD3B0B4b3680501a7A7",name:"SKALE",symbol:"SKL",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/13245/thumb/SKALE_token_300x300.png?1606789574"},{chainId:1,address:"0xCC8Fa225D80b9c7D42F96e9570156c65D6cAAa25",name:"Smooth Love Potion",symbol:"SLP",decimals:0,logoURI:"https://assets.coingecko.com/coins/images/10366/thumb/SLP.png?1578640057",extensions:{bridgeInfo:{"137":{tokenAddress:"0x0C7304fBAf2A320a1c50c46FE03752722F729946"}}}},{chainId:1,address:"0x744d70FDBE2Ba4CF95131626614a1763DF805B9E",name:"Status",symbol:"SNT",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/779/thumb/status.png?1548610778"},{name:"Synthetix Network Token",address:"0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F",symbol:"SNX",decimals:18,chainId:1,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F/logo.png",extensions:{bridgeInfo:{"10":{tokenAddress:"0x8700dAec35aF8Ff88c16BdF0418774CB3D7599B4"},"137":{tokenAddress:"0x50B728D8D964fd00C2d0AAD81718b71311feF68a"},"42161":{tokenAddress:"0xcBA56Cd8216FCBBF3fA6DF6137F3147cBcA37D60"}}}},{chainId:1,address:"0xD31a59c85aE9D8edEFeC411D448f90841571b89c",name:"SOL Wormhole ",symbol:"SOL",decimals:9,logoURI:"https://assets.coingecko.com/coins/images/22876/thumb/SOL_wh_small.png?1644224316",extensions:{bridgeInfo:{"42161":{tokenAddress:"0xb74Da9FE2F96B9E0a5f4A3cf0b92dd2bEC617124"}}}},{chainId:1,address:"0x090185f2135308BaD17527004364eBcC2D37e5F6",name:"Spell Token",symbol:"SPELL",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/15861/thumb/abracadabra-3.png?1622544862",extensions:{bridgeInfo:{"137":{tokenAddress:"0xcdB3C70CD25FD15307D84C4F9D37d5C043B33Fb2"},"42161":{tokenAddress:"0x3E6648C5a70A150A88bCE65F4aD4d506Fe15d2AF"}}}},{name:"Storj Token",address:"0xB64ef51C888972c908CFacf59B47C1AfBC0Ab8aC",symbol:"STORJ",decimals:8,chainId:1,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xB64ef51C888972c908CFacf59B47C1AfBC0Ab8aC/logo.png",extensions:{bridgeInfo:{"137":{tokenAddress:"0xd72357dAcA2cF11A5F155b9FF7880E595A3F5792"}}}},{chainId:1,address:"0x006BeA43Baa3f7A6f765F14f10A1a1b08334EF45",name:"Stox",symbol:"STX",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/1230/thumb/stox-token.png?1547035256",extensions:{bridgeInfo:{"137":{tokenAddress:"0xB36e3391B22a970d31A9b620Ae1A414C6c256d2a"}}}},{chainId:1,address:"0x0763fdCCF1aE541A5961815C0872A8c5Bc6DE4d7",name:"SUKU",symbol:"SUKU",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/11969/thumb/UmfW5S6f_400x400.jpg?1596602238"},{chainId:1,address:"0xe53EC727dbDEB9E2d5456c3be40cFF031AB40A55",name:"SuperFarm",symbol:"SUPER",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14040/thumb/6YPdWn6.png?1613975899",extensions:{bridgeInfo:{"137":{tokenAddress:"0xa1428174F516F527fafdD146b883bB4428682737"}}}},{name:"Synth sUSD",address:"0x57Ab1ec28D129707052df4dF418D58a2D46d5f51",symbol:"sUSD",decimals:18,chainId:1,logoURI:"https://assets.coingecko.com/coins/images/5013/thumb/sUSD.png?1616150765",extensions:{bridgeInfo:{"137":{tokenAddress:"0xF81b4Bec6Ca8f9fe7bE01CA734F55B2b6e03A7a0"},"42161":{tokenAddress:"0xA970AF1a584579B618be4d69aD6F73459D112F95"}}}},{chainId:1,address:"0x6B3595068778DD592e39A122f4f5a5cF09C90fE2",name:"Sushi",symbol:"SUSHI",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12271/thumb/512x512_Logo_no_chop.png?1606986688",extensions:{bridgeInfo:{"137":{tokenAddress:"0x0b3F868E0BE5597D5DB7fEB59E1CADBb0fdDa50a"},"42161":{tokenAddress:"0xd4d42F0b6DEF4CE0383636770eF773390d85c61A"}}}},{chainId:1,address:"0x0f2D719407FdBeFF09D87557AbB7232601FD9F29",name:"Synapse",symbol:"SYN",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/18024/thumb/syn.png?1635002049",extensions:{bridgeInfo:{"42161":{tokenAddress:"0x1bCfc0B4eE1471674cd6A9F6B363A034375eAD84"}}}},{chainId:1,address:"0x8dAEBADE922dF735c38C80C7eBD708Af50815fAa",name:"tBTC",symbol:"TBTC",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/11224/thumb/tBTC.png?1589620754",extensions:{bridgeInfo:{"137":{tokenAddress:"0x50a4a434247089848991DD8f09b889D4e2870aB6"}}}},{chainId:1,address:"0x2e9d63788249371f1DFC918a52f8d799F4a38C94",name:"Tokemak",symbol:"TOKE",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/17495/thumb/tokemak-avatar-200px-black.png?1628131614",extensions:{bridgeInfo:{"137":{tokenAddress:"0xe1708AbDE4847B4929b70547E5197F1Ba1db2250"}}}},{chainId:1,address:"0xaA7a9CA87d3694B5755f213B5D04094b8d0F0A6F",name:"OriginTrail",symbol:"TRAC",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/1877/thumb/TRAC.jpg?1635134367",extensions:{bridgeInfo:{"137":{tokenAddress:"0xA7b98d63a137bF402b4570799ac4caD0BB1c4B1c"}}}},{chainId:1,address:"0x88dF592F8eb5D7Bd38bFeF7dEb0fBc02cf3778a0",name:"Tellor",symbol:"TRB",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/9644/thumb/Blk_icon_current.png?1584980686",extensions:{bridgeInfo:{"137":{tokenAddress:"0xE3322702BEdaaEd36CdDAb233360B939775ae5f1"}}}},{chainId:1,address:"0xc7283b66Eb1EB5FB86327f08e1B5816b0720212B",name:"Tribe",symbol:"TRIBE",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14575/thumb/tribe.PNG?1617487954",extensions:{bridgeInfo:{"137":{tokenAddress:"0x8676815789211E799a6DC86d02748ADF9cF86836"},"42161":{tokenAddress:"0xBfAE6fecD8124ba33cbB2180aAb0Fe4c03914A5A"}}}},{chainId:1,address:"0x4C19596f5aAfF459fA38B0f7eD92F11AE6543784",name:"TrueFi",symbol:"TRU",decimals:8,logoURI:"https://assets.coingecko.com/coins/images/13180/thumb/truefi_glyph_color.png?1617610941",extensions:{bridgeInfo:{"137":{tokenAddress:"0x5b77bCA482bd3E7958b1103d123888EfCCDaF803"}}}},{name:"UMA Voting Token v1",address:"0x04Fa0d235C4abf4BcF4787aF4CF447DE572eF828",symbol:"UMA",decimals:18,chainId:1,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x04Fa0d235C4abf4BcF4787aF4CF447DE572eF828/logo.png",extensions:{bridgeInfo:{"10":{tokenAddress:"0xE7798f023fC62146e8Aa1b36Da45fb70855a77Ea"},"137":{tokenAddress:"0x3066818837c5e6eD6601bd5a91B0762877A6B731"},"42161":{tokenAddress:"0xd693Ec944A85eeca4247eC1c3b130DCa9B0C3b22"}}}},{chainId:1,address:"0x441761326490cACF7aF299725B6292597EE822c2",name:"Unifi Protocol DAO",symbol:"UNFI",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/13152/thumb/logo-2.png?1605748967"},{name:"Uniswap",address:"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",symbol:"UNI",decimals:18,chainId:1,logoURI:"ipfs://QmXttGpZrECX5qCyXbBQiqgQNytVGeZW5Anewvh2jc4psg",extensions:{bridgeInfo:{"10":{tokenAddress:"0x6fd9d7AD17242c41f7131d257212c54A0e816691"},"137":{tokenAddress:"0xb33EaAd8d922B1083446DC23f610c2567fB5180f"},"42161":{tokenAddress:"0xFa7F8980b0f1E64A2062791cc3b0871572f1F7f0"}}}},{chainId:1,address:"0x70D2b7C19352bB76e4409858FF5746e500f2B67c",name:"Pawtocol",symbol:"UPI",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12186/thumb/pawtocol.jpg?1597962008"},{name:"USDCoin",address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",symbol:"USDC",decimals:6,chainId:1,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png",extensions:{bridgeInfo:{"10":{tokenAddress:"0x7F5c764cBc14f9669B88837ca1490cCa17c31607"},"137":{tokenAddress:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"},"42161":{tokenAddress:"0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8"}}}},{name:"Tether USD",address:"0xdAC17F958D2ee523a2206206994597C13D831ec7",symbol:"USDT",decimals:6,chainId:1,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png",extensions:{bridgeInfo:{"10":{tokenAddress:"0x94b008aA00579c1307B0EF2c499aD98a8ce58e58"},"137":{tokenAddress:"0xc2132D05D31c914a87C6611C10748AEb04B58e8F"},"42161":{tokenAddress:"0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"}}}},{chainId:1,address:"0x3C4B6E6e1eA3D4863700D7F76b36B7f3D3f13E3d",name:"Voyager Token",symbol:"VGX",decimals:8,logoURI:"https://assets.coingecko.com/coins/images/794/thumb/Voyager-vgx.png?1575693595"},{name:"Wrapped BTC",address:"0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",symbol:"WBTC",decimals:8,chainId:1,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599/logo.png",extensions:{bridgeInfo:{"10":{tokenAddress:"0x68f180fcCe6836688e9084f035309E29Bf0A2095"},"137":{tokenAddress:"0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6"},"42161":{tokenAddress:"0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f"}}}},{name:"Wrapped Ether",address:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",symbol:"WETH",decimals:18,chainId:1,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png",extensions:{bridgeInfo:{"42161":{tokenAddress:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"}}}},{chainId:1,address:"0x55296f69f40Ea6d20E478533C15A6B08B654E758",name:"XYO Network",symbol:"XYO",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/4519/thumb/XYO_Network-logo.png?1547039819",extensions:{bridgeInfo:{"137":{tokenAddress:"0xd2507e7b5794179380673870d88B22F94da6abe0"}}}},{chainId:1,address:"0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e",name:"yearn finance",symbol:"YFI",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/11849/thumb/yfi-192x192.png?1598325330",extensions:{bridgeInfo:{"137":{tokenAddress:"0xDA537104D6A5edd53c6fBba9A898708E465260b6"},"42161":{tokenAddress:"0x82e3A8F066a6989666b031d916c43672085b1582"}}}},{chainId:1,address:"0xa1d0E215a23d7030842FC67cE582a6aFa3CCaB83",name:"DFI money",symbol:"YFII",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/11902/thumb/YFII-logo.78631676.png?1598677348",extensions:{bridgeInfo:{"137":{tokenAddress:"0xb8cb8a7F4C2885C03e57E973C74827909Fdc2032"}}}},{name:"0x Protocol Token",address:"0xE41d2489571d322189246DaFA5ebDe1F4699F498",symbol:"ZRX",decimals:18,chainId:1,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xE41d2489571d322189246DaFA5ebDe1F4699F498/logo.png",extensions:{bridgeInfo:{"137":{tokenAddress:"0x5559Edb74751A0edE9DeA4DC23aeE72cCA6bE3D5"},"42161":{tokenAddress:"0xBD591Bd4DdB64b77B5f76Eab8f03d02519235Ae2"}}}},{name:"Dai Stablecoin",address:"0xaD6D458402F60fD3Bd25163575031ACDce07538D",symbol:"DAI",decimals:18,chainId:3,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xaD6D458402F60fD3Bd25163575031ACDce07538D/logo.png"},{name:"Uniswap",address:"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",symbol:"UNI",decimals:18,chainId:3,logoURI:"ipfs://QmXttGpZrECX5qCyXbBQiqgQNytVGeZW5Anewvh2jc4psg"},{name:"Wrapped Ether",address:"0xc778417E063141139Fce010982780140Aa0cD5Ab",symbol:"WETH",decimals:18,chainId:3,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xc778417E063141139Fce010982780140Aa0cD5Ab/logo.png"},{name:"Dai Stablecoin",address:"0xc7AD46e0b8a400Bb3C915120d284AafbA8fc4735",symbol:"DAI",decimals:18,chainId:4,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xc7AD46e0b8a400Bb3C915120d284AafbA8fc4735/logo.png"},{name:"Maker",address:"0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85",symbol:"MKR",decimals:18,chainId:4,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85/logo.png"},{name:"Uniswap",address:"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",symbol:"UNI",decimals:18,chainId:4,logoURI:"ipfs://QmXttGpZrECX5qCyXbBQiqgQNytVGeZW5Anewvh2jc4psg"},{name:"Wrapped Ether",address:"0xc778417E063141139Fce010982780140Aa0cD5Ab",symbol:"WETH",decimals:18,chainId:4,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xc778417E063141139Fce010982780140Aa0cD5Ab/logo.png"},{name:"Uniswap",address:"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",symbol:"UNI",decimals:18,chainId:5,logoURI:"ipfs://QmXttGpZrECX5qCyXbBQiqgQNytVGeZW5Anewvh2jc4psg"},{name:"Wrapped Ether",address:"0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",symbol:"WETH",decimals:18,chainId:5,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6/logo.png"},{chainId:10,address:"0x3e7eF8f50246f725885102E8238CBba33F276747",name:"BarnBridge",symbol:"BOND",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12811/thumb/barnbridge.jpg?1602728853",extensions:{bridgeInfo:{"1":{tokenAddress:"0x0391D2021f89DC339F60Fff84546EA23E337750f"}}}},{name:"Curve DAO Token",address:"0x0994206dfE8De6Ec6920FF4D779B0d950605Fb53",symbol:"CRV",decimals:18,chainId:10,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xD533a949740bb3306d119CC777fa900bA034cd52/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0xD533a949740bb3306d119CC777fa900bA034cd52"}}}},{name:"Dai Stablecoin",address:"0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1",symbol:"DAI",decimals:18,chainId:10,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x6B175474E89094C44Da98b954EedeAC495271d0F/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0x6B175474E89094C44Da98b954EedeAC495271d0F"}}}},{chainId:10,address:"0x65559aA14915a70190438eF90104769e5E890A00",name:"Ethereum Name Service",symbol:"ENS",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/19785/thumb/acatxTm8_400x400.jpg?1635850140",extensions:{bridgeInfo:{"1":{tokenAddress:"0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72"}}}},{name:"ChainLink Token",address:"0x350a791Bfc2C21F9Ed5d10980Dad2e2638ffa7f6",symbol:"LINK",decimals:18,chainId:10,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x514910771AF9Ca656af840dff83E8264EcF986CA/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0x514910771AF9Ca656af840dff83E8264EcF986CA"}}}},{name:"LoopringCoin V2",address:"0xFEaA9194F9F8c1B65429E31341a103071464907E",symbol:"LRC",decimals:18,chainId:10,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xBBbbCA6A901c926F240b89EacB641d8Aec7AEafD/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0xBBbbCA6A901c926F240b89EacB641d8Aec7AEafD"}}}},{chainId:10,address:"0x3390108E913824B8eaD638444cc52B9aBdF63798",name:"Mask Network",symbol:"MASK",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14051/thumb/Mask_Network.jpg?1614050316",extensions:{bridgeInfo:{"1":{tokenAddress:"0x69af81e73A73B40adF4f3d4223Cd9b1ECE623074"}}}},{name:"Maker",address:"0xab7bAdEF82E9Fe11f6f33f87BC9bC2AA27F2fCB5",symbol:"MKR",decimals:18,chainId:10,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2"}}}},{chainId:10,address:"0x9e1028F5F1D5eDE59748FFceE5532509976840E0",name:"Perpetual Protocol",symbol:"PERP",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12381/thumb/60d18e06844a844ad75901a9_mark_only_03.png?1628674771",extensions:{bridgeInfo:{"1":{tokenAddress:"0xbC396689893D065F41bc2C6EcbeE5e0085233447"}}}},{chainId:10,address:"0x7FB688CCf682d58f86D7e38e03f9D22e7705448B",name:"Rai Reflex Index",symbol:"RAI",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14004/thumb/RAI-logo-coin.png?1613592334",extensions:{bridgeInfo:{"1":{tokenAddress:"0x03ab458634910AaD20eF5f1C8ee96F1D6ac54919"}}}},{chainId:10,address:"0xB548f63D4405466B36C0c0aC3318a22fDcec711a",name:"Rari Governance Token",symbol:"RGT",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12900/thumb/Rari_Logo_Transparent.png?1613978014",extensions:{bridgeInfo:{"1":{tokenAddress:"0xD291E7a03283640FDc51b121aC401383A46cC623"}}}},{name:"Synthetix Network Token",address:"0x8700dAec35aF8Ff88c16BdF0418774CB3D7599B4",symbol:"SNX",decimals:18,chainId:10,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F"}}}},{name:"UMA Voting Token v1",address:"0xE7798f023fC62146e8Aa1b36Da45fb70855a77Ea",symbol:"UMA",decimals:18,chainId:10,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x04Fa0d235C4abf4BcF4787aF4CF447DE572eF828/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0x04Fa0d235C4abf4BcF4787aF4CF447DE572eF828"}}}},{name:"Uniswap",address:"0x6fd9d7AD17242c41f7131d257212c54A0e816691",symbol:"UNI",decimals:18,chainId:10,logoURI:"ipfs://QmXttGpZrECX5qCyXbBQiqgQNytVGeZW5Anewvh2jc4psg",extensions:{bridgeInfo:{"1":{tokenAddress:"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984"}}}},{name:"USDCoin",address:"0x7F5c764cBc14f9669B88837ca1490cCa17c31607",symbol:"USDC",decimals:6,chainId:10,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"}}}},{name:"Tether USD",address:"0x94b008aA00579c1307B0EF2c499aD98a8ce58e58",symbol:"USDT",decimals:6,chainId:10,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0xdAC17F958D2ee523a2206206994597C13D831ec7"}}}},{name:"Wrapped BTC",address:"0x68f180fcCe6836688e9084f035309E29Bf0A2095",symbol:"WBTC",decimals:8,chainId:10,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599"}}}},{name:"Dai Stablecoin",address:"0x4F96Fe3b7A6Cf9725f59d353F723c1bDb64CA6Aa",symbol:"DAI",decimals:18,chainId:42,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x4F96Fe3b7A6Cf9725f59d353F723c1bDb64CA6Aa/logo.png"},{name:"Maker",address:"0xAaF64BFCC32d0F15873a02163e7E500671a4ffcD",symbol:"MKR",decimals:18,chainId:42,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xAaF64BFCC32d0F15873a02163e7E500671a4ffcD/logo.png"},{name:"Uniswap",address:"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",symbol:"UNI",decimals:18,chainId:42,logoURI:"ipfs://QmXttGpZrECX5qCyXbBQiqgQNytVGeZW5Anewvh2jc4psg"},{name:"Wrapped Ether",address:"0xd0A1E359811322d97991E03f863a0C30C2cF029C",symbol:"WETH",decimals:18,chainId:42,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xd0A1E359811322d97991E03f863a0C30C2cF029C/logo.png"},{chainId:137,address:"0x9c2C5fd7b07E95EE044DDeba0E97a665F142394f",name:"1inch",symbol:"1INCH",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/13469/thumb/1inch-token.png?1608803028",extensions:{bridgeInfo:{"1":{tokenAddress:"0x111111111117dC0aa78b770fA6A738034120C302"}}}},{chainId:137,address:"0xD6DF932A45C0f255f85145f286eA0b292B21C90B",name:"Aave",symbol:"AAVE",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12645/thumb/AAVE.png?1601374110",extensions:{bridgeInfo:{"1":{tokenAddress:"0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9"}}}},{chainId:137,address:"0x6a6bD53d677F8632631662C48bD47b1D4D6524ee",name:"Adventure Gold",symbol:"AGLD",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/18125/thumb/lpgblc4h_400x400.jpg?1630570955",extensions:{bridgeInfo:{"1":{tokenAddress:"0x32353A6C91143bfd6C7d363B546e62a9A2489A20"}}}},{chainId:137,address:"0xe2341718c6C0CbFa8e6686102DD8FbF4047a9e9B",name:"AIOZ Network",symbol:"AIOZ",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14631/thumb/aioz_logo.png?1617413126",extensions:{bridgeInfo:{"1":{tokenAddress:"0x626E8036dEB333b408Be468F951bdB42433cBF18"}}}},{chainId:137,address:"0x95c300e7740D2A88a44124B424bFC1cB2F9c3b89",name:"Alchemix",symbol:"ALCX",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14113/thumb/Alchemix.png?1614409874",extensions:{bridgeInfo:{"1":{tokenAddress:"0xdBdb4d16EdA451D0503b854CF79D55697F90c8DF"}}}},{chainId:137,address:"0x50858d870FAF55da2fD90FB6DF7c34b5648305C6",name:"My Neighbor Alice",symbol:"ALICE",decimals:6,logoURI:"https://assets.coingecko.com/coins/images/14375/thumb/alice_logo.jpg?1615782968",extensions:{bridgeInfo:{"1":{tokenAddress:"0xAC51066d7bEC65Dc4589368da368b212745d63E8"}}}},{chainId:137,address:"0x0621d647cecbFb64b79E44302c1933cB4f27054d",name:"Amp",symbol:"AMP",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12409/thumb/amp-200x200.png?1599625397",extensions:{bridgeInfo:{"1":{tokenAddress:"0xfF20817765cB7f73d4bde2e66e067E58D11095C2"}}}},{chainId:137,address:"0x101A023270368c0D50BFfb62780F4aFd4ea79C35",name:"Ankr",symbol:"ANKR",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/4324/thumb/U85xTl2.png?1608111978",extensions:{bridgeInfo:{"1":{tokenAddress:"0x8290333ceF9e6D528dD5618Fb97a76f268f3EDD4"}}}},{chainId:137,address:"0xB7b31a6BC18e48888545CE79e83E06003bE70930",name:"ApeCoin",symbol:"APE",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/24383/small/apecoin.jpg?1647476455",extensions:{bridgeInfo:{"1":{tokenAddress:"0x4d224452801ACEd8B2F0aebE155379bb5D594381"}}}},{chainId:137,address:"0x45C27821E80F8789b60Fd8B600C73815d34DDa6C",name:"API3",symbol:"API3",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/13256/thumb/api3.jpg?1606751424",extensions:{bridgeInfo:{"1":{tokenAddress:"0x0b38210ea11411557c13457D4dA7dC6ea731B88a"}}}},{chainId:137,address:"0xEE800B277A96B0f490a1A732e1D6395FAD960A26",name:"ARPA Chain",symbol:"ARPA",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/8506/thumb/9u0a23XY_400x400.jpg?1559027357",extensions:{bridgeInfo:{"1":{tokenAddress:"0xBA50933C268F567BDC86E1aC131BE072C6B0b71a"}}}},{chainId:137,address:"0x5eB8D998371971D01954205c7AFE90A7AF6a95AC",name:"Audius",symbol:"AUDIO",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12913/thumb/AudiusCoinLogo_2x.png?1603425727",extensions:{bridgeInfo:{"1":{tokenAddress:"0x18aAA7115705e8be94bfFEBDE57Af9BFc265B998"}}}},{chainId:137,address:"0x61BDD9C7d4dF4Bf47A4508c0c8245505F2Af5b7b",name:"Axie Infinity",symbol:"AXS",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/13029/thumb/axie_infinity_logo.png?1604471082",extensions:{bridgeInfo:{"1":{tokenAddress:"0xBB0E17EF65F82Ab018d8EDd776e8DD940327B28b"}}}},{chainId:137,address:"0x1FcbE5937B0cc2adf69772D228fA4205aCF4D9b2",name:"Badger DAO",symbol:"BADGER",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/13287/thumb/badger_dao_logo.jpg?1607054976",extensions:{bridgeInfo:{"1":{tokenAddress:"0x3472A5A71965499acd81997a54BBA8D852C6E53d"}}}},{name:"Balancer",address:"0x9a71012B13CA4d3D0Cdc72A177DF3ef03b0E76A3",symbol:"BAL",decimals:18,chainId:137,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xba100000625a3754423978a60c9317c58a424e3D/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0xba100000625a3754423978a60c9317c58a424e3D"}}}},{chainId:137,address:"0xA8b1E0764f85f53dfe21760e8AfE5446D82606ac",name:"Band Protocol",symbol:"BAND",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/9545/thumb/band-protocol.png?1568730326",extensions:{bridgeInfo:{"1":{tokenAddress:"0xBA11D00c5f74255f56a5E366F4F77f5A186d7f55"}}}},{chainId:137,address:"0x3Cef98bb43d732E2F285eE605a8158cDE967D219",name:"Basic Attention Token",symbol:"BAT",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/677/thumb/basic-attention-token.png?1547034427",extensions:{bridgeInfo:{"1":{tokenAddress:"0x0D8775F648430679A709E98d2b0Cb6250d2887EF"}}}},{chainId:137,address:"0x91c89A94567980f0e9723b487b0beD586eE96aa7",name:"Biconomy",symbol:"BICO",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/21061/thumb/biconomy_logo.jpg?1638269749",extensions:{bridgeInfo:{"1":{tokenAddress:"0xF17e65822b568B3903685a7c9F496CF7656Cc6C2"}}}},{chainId:137,address:"0x438B28C5AA5F00a817b7Def7cE2Fb3d5d1970974",name:"Bluzelle",symbol:"BLZ",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/2848/thumb/ColorIcon_3x.png?1622516510",extensions:{bridgeInfo:{"1":{tokenAddress:"0x5732046A883704404F284Ce41FfADd5b007FD668"}}}},{name:"Bancor Network Token",address:"0xc26D47d5c33aC71AC5CF9F776D63Ba292a4F7842",symbol:"BNT",decimals:18,chainId:137,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C"}}}},{chainId:137,address:"0xA041544fe2BE56CCe31Ebb69102B965E06aacE80",name:"BarnBridge",symbol:"BOND",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12811/thumb/barnbridge.jpg?1602728853",extensions:{bridgeInfo:{"1":{tokenAddress:"0x0391D2021f89DC339F60Fff84546EA23E337750f"}}}},{chainId:137,address:"0xf1938Ce12400f9a761084E7A80d37e732a4dA056",name:"Chiliz",symbol:"CHZ",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/8834/thumb/Chiliz.png?1561970540",extensions:{bridgeInfo:{"1":{tokenAddress:"0x3506424F91fD33084466F402d5D97f05F8e3b4AF"}}}},{name:"Compound",address:"0x8505b9d2254A7Ae468c0E9dd10Ccea3A837aef5c",symbol:"COMP",decimals:18,chainId:137,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xc00e94Cb662C3520282E6f5717214004A7f26888/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0xc00e94Cb662C3520282E6f5717214004A7f26888"}}}},{chainId:137,address:"0xAdA58DF0F643D959C2A47c9D4d4c1a4deFe3F11C",name:"Cronos",symbol:"CRO",decimals:8,logoURI:"https://assets.coingecko.com/coins/images/7310/thumb/oCw2s3GI_400x400.jpeg?1645172042",extensions:{bridgeInfo:{"1":{tokenAddress:"0xA0b73E1Ff0B80914AB6fe0444E65848C4C34450b"}}}},{name:"Curve DAO Token",address:"0x172370d5Cd63279eFa6d502DAB29171933a610AF",symbol:"CRV",decimals:18,chainId:137,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xD533a949740bb3306d119CC777fa900bA034cd52/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0xD533a949740bb3306d119CC777fa900bA034cd52"}}}},{chainId:137,address:"0x2727Ab1c2D22170ABc9b595177B2D5C6E1Ab7B7B",name:"Cartesi",symbol:"CTSI",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/11038/thumb/cartesi.png?1592288021",extensions:{bridgeInfo:{"1":{tokenAddress:"0x491604c0FDF08347Dd1fa4Ee062a822A5DD06B5D"}}}},{chainId:137,address:"0x8c208BC2A808a088a78398fed8f2640cab0b6EDb",name:"Cryptex Finance",symbol:"CTX",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14932/thumb/glossy_icon_-_C200px.png?1619073171",extensions:{bridgeInfo:{"1":{tokenAddress:"0x321C2fE4446C7c963dc41Dd58879AF648838f98D"}}}},{chainId:137,address:"0x276C9cbaa4BDf57d7109a41e67BD09699536FA3d",name:"Somnium Space CUBEs",symbol:"CUBE",decimals:8,logoURI:"https://assets.coingecko.com/coins/images/10687/thumb/CUBE_icon.png?1617026861",extensions:{bridgeInfo:{"1":{tokenAddress:"0xDf801468a808a32656D2eD2D2d80B72A129739f4"}}}},{chainId:137,address:"0x66Dc5A08091d1968e08C16aA5b27BAC8398b02Be",name:"Civic",symbol:"CVC",decimals:8,logoURI:"https://assets.coingecko.com/coins/images/788/thumb/civic.png?1547034556",extensions:{bridgeInfo:{"1":{tokenAddress:"0x41e5560054824eA6B0732E656E3Ad64E20e94E45"}}}},{chainId:137,address:"0x4257EA7637c355F81616050CbB6a9b709fd72683",name:"Convex Finance",symbol:"CVX",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/15585/thumb/convex.png?1621256328",extensions:{bridgeInfo:{"1":{tokenAddress:"0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B"}}}},{name:"Dai Stablecoin",address:"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063",symbol:"DAI",decimals:18,chainId:137,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x6B175474E89094C44Da98b954EedeAC495271d0F/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0x6B175474E89094C44Da98b954EedeAC495271d0F"}}}},{chainId:137,address:"0x26f5FB1e6C8a65b3A873fF0a213FA16EFF5a7828",name:"DerivaDAO",symbol:"DDX",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/13453/thumb/ddx_logo.png?1608741641",extensions:{bridgeInfo:{"1":{tokenAddress:"0x3A880652F47bFaa771908C07Dd8673A787dAEd3A"}}}},{chainId:137,address:"0x993f2CafE9dbE525243f4A78BeBC69DAc8D36000",name:"DIA",symbol:"DIA",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/11955/thumb/image.png?1646041751",extensions:{bridgeInfo:{"1":{tokenAddress:"0x84cA8bc7997272c7CfB4D0Cd3D55cd942B3c9419"}}}},{chainId:137,address:"0x4C3bF0a3DE9524aF68327d1D2558a3B70d17D42a",name:"dYdX",symbol:"DYDX",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/17500/thumb/hjnIm9bV.jpg?1628009360",extensions:{bridgeInfo:{"1":{tokenAddress:"0x92D6C1e31e14520e676a687F0a93788B716BEff5"}}}},{chainId:137,address:"0xE0339c80fFDE91F3e20494Df88d4206D86024cdF",name:"Dogelon Mars",symbol:"ELON",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14962/thumb/6GxcPRo3_400x400.jpg?1619157413",extensions:{bridgeInfo:{"1":{tokenAddress:"0x761D38e5ddf6ccf6Cf7c55759d5210750B5D60F3"}}}},{chainId:137,address:"0x7eC26842F195c852Fa843bB9f6D8B583a274a157",name:"Enjin Coin",symbol:"ENJ",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/1102/thumb/enjin-coin-logo.png?1547035078",extensions:{bridgeInfo:{"1":{tokenAddress:"0xF629cBd94d3791C9250152BD8dfBDF380E2a3B9c"}}}},{chainId:137,address:"0xbD7A5Cf51d22930B8B3Df6d834F9BCEf90EE7c4f",name:"Ethereum Name Service",symbol:"ENS",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/19785/thumb/acatxTm8_400x400.jpg?1635850140",extensions:{bridgeInfo:{"1":{tokenAddress:"0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72"}}}},{chainId:137,address:"0x0E50BEA95Fe001A370A4F1C220C49AEdCB982DeC",name:"Ethernity Chain",symbol:"ERN",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14238/thumb/LOGO_HIGH_QUALITY.png?1647831402",extensions:{bridgeInfo:{"1":{tokenAddress:"0xBBc2AE13b23d715c30720F079fcd9B4a74093505"}}}},{chainId:137,address:"0x8a037dbcA8134FFc72C362e394e35E0Cad618F85",name:"Euro Coin",symbol:"EUROC",decimals:6,logoURI:"https://assets.coingecko.com/coins/images/26045/thumb/euro-coin.png?1655394420",extensions:{bridgeInfo:{"1":{tokenAddress:"0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c"}}}},{chainId:137,address:"0x176f5AB638cf4Ff3B6239Ba609C3fadAA46ef5B0",name:"Harvest Finance",symbol:"FARM",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12304/thumb/Harvest.png?1613016180",extensions:{bridgeInfo:{"1":{tokenAddress:"0xa0246c9032bC3A600820415aE600c6388619A14D"}}}},{chainId:137,address:"0x7583FEDDbceFA813dc18259940F76a02710A8905",name:"Fetch ai",symbol:"FET",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/5681/thumb/Fetch.jpg?1572098136",extensions:{bridgeInfo:{"1":{tokenAddress:"0xaea46A60368A7bD060eec7DF8CBa43b7EF41Ad85"}}}},{chainId:137,address:"0x5eCbA59DAcc1ADc5bDEA35f38A732823fc3dE977",name:"Ampleforth Governance Token",symbol:"FORTH",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14917/thumb/photo_2021-04-22_00.00.03.jpeg?1619020835",extensions:{bridgeInfo:{"1":{tokenAddress:"0x77FbA179C79De5B7653F68b5039Af940AdA60ce0"}}}},{chainId:137,address:"0x65A05DB8322701724c197AF82C9CaE41195B0aA8",name:"ShapeShift FOX Token",symbol:"FOX",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/9988/thumb/FOX.png?1574330622",extensions:{bridgeInfo:{"1":{tokenAddress:"0xc770EEfAd204B5180dF6a14Ee197D99d808ee52d"}}}},{chainId:137,address:"0xC9c1c1c20B3658F8787CC2FD702267791f224Ce1",name:"Fantom",symbol:"FTM",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/4001/thumb/Fantom.png?1558015016",extensions:{bridgeInfo:{"1":{tokenAddress:"0x4E15361FD6b4BB609Fa63C81A2be19d873717870"}}}},{chainId:137,address:"0x3e121107F6F22DA4911079845a470757aF4e1A1b",name:"Frax Share",symbol:"FXS",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/13423/thumb/frax_share.png?1608478989",extensions:{bridgeInfo:{"1":{tokenAddress:"0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0"}}}},{chainId:137,address:"0x09E1943Dd2A4e82032773594f50CF54453000b97",name:"Gala",symbol:"GALA",decimals:8,logoURI:"https://assets.coingecko.com/coins/images/12493/thumb/GALA-COINGECKO.png?1600233435",extensions:{bridgeInfo:{"1":{tokenAddress:"0x15D4c048F83bd7e37d49eA4C83a07267Ec4203dA"}}}},{chainId:137,address:"0x0B220b82F3eA3B7F6d9A1D8ab58930C064A2b5Bf",name:"Golem",symbol:"GLM",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/542/thumb/Golem_Submark_Positive_RGB.png?1606392013",extensions:{bridgeInfo:{"1":{tokenAddress:"0x7DD9c5Cba05E151C895FDe1CF355C9A1D5DA6429"}}}},{name:"Gnosis Token",address:"0x5FFD62D3C3eE2E81C00A7b9079FB248e7dF024A8",symbol:"GNO",decimals:18,chainId:137,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x6810e776880C02933D47DB1b9fc05908e5386b96/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0x6810e776880C02933D47DB1b9fc05908e5386b96"}}}},{chainId:137,address:"0xF88fc6b493eda7650E4bcf7A290E8d108F677CfE",name:"Gods Unchained",symbol:"GODS",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/17139/thumb/10631.png?1635718182",extensions:{bridgeInfo:{"1":{tokenAddress:"0xccC8cb5229B0ac8069C51fd58367Fd1e622aFD97"}}}},{chainId:137,address:"0x5fe2B58c013d7601147DcdD68C143A77499f5531",name:"The Graph",symbol:"GRT",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/13397/thumb/Graph_Token.png?1608145566",extensions:{bridgeInfo:{"1":{tokenAddress:"0xc944E90C64B2c07662A292be6244BDf05Cda44a7"}}}},{chainId:137,address:"0xdb95f9188479575F3F718a245EcA1B3BF74567EC",name:"Gitcoin",symbol:"GTC",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/15810/thumb/gitcoin.png?1621992929",extensions:{bridgeInfo:{"1":{tokenAddress:"0xDe30da39c46104798bB5aA3fe8B9e0e1F348163F"}}}},{chainId:137,address:"0xC8A94a3d3D2dabC3C1CaffFFDcA6A7543c3e3e65",name:"Gemini Dollar",symbol:"GUSD",decimals:2,logoURI:"https://assets.coingecko.com/coins/images/5992/thumb/gemini-dollar-gusd.png?1536745278",extensions:{bridgeInfo:{"1":{tokenAddress:"0x056Fd409E1d7A124BD7017459dFEa2F387b6d5Cd"}}}},{chainId:137,address:"0x482bc619eE7662759CDc0685B4E78f464Da39C73",name:"GYEN",symbol:"GYEN",decimals:6,logoURI:"https://assets.coingecko.com/coins/images/14191/thumb/icon_gyen_200_200.png?1614843343",extensions:{bridgeInfo:{"1":{tokenAddress:"0xC08512927D12348F6620a698105e1BAac6EcD911"}}}},{chainId:137,address:"0x9Cb74C8032b007466865f060ad2c46145d45553D",name:"IDEX",symbol:"IDEX",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/2565/thumb/logomark-purple-286x286.png?1638362736",extensions:{bridgeInfo:{"1":{tokenAddress:"0xB705268213D593B8FD88d3FDEFF93AFF5CbDcfAE"}}}},{chainId:137,address:"0x183070C90B34A63292cC908Ce1b263Cb56D49A7F",name:"Immutable X",symbol:"IMX",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/17233/thumb/imx.png?1636691817",extensions:{bridgeInfo:{"1":{tokenAddress:"0xF57e7e7C23978C3cAEC3C3548E3D615c346e79fF"}}}},{chainId:137,address:"0x4E8dc2149EaC3f3dEf36b1c281EA466338249371",name:"Injective",symbol:"INJ",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12882/thumb/Secondary_Symbol.png?1628233237",extensions:{bridgeInfo:{"1":{tokenAddress:"0xe28b3B32B6c345A34Ff64674606124Dd5Aceca30"}}}},{chainId:137,address:"0xF18Ac368001b0DdC80aA6a8374deb49e868EFDb8",name:"Inverse Finance",symbol:"INV",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14205/thumb/inverse_finance.jpg?1614921871",extensions:{bridgeInfo:{"1":{tokenAddress:"0x41D5D79431A913C4aE7d69a668ecdfE5fF9DFB68"}}}},{chainId:137,address:"0xf6372cDb9c1d3674E83842e3800F2A62aC9F3C66",name:"IoTeX",symbol:"IOTX",decimals:18,logoURI:"https://s2.coinmarketcap.com/static/img/coins/64x64/2777.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0x6fB3e0A217407EFFf7Ca062D46c26E5d60a14d69"}}}},{chainId:137,address:"0xb87f5c1E81077FfcfE821dA240fd20C99c533aF1",name:"JasmyCoin",symbol:"JASMY",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/13876/thumb/JASMY200x200.jpg?1612473259",extensions:{bridgeInfo:{"1":{tokenAddress:"0x7420B4b9a0110cdC71fB720908340C03F9Bc03EC"}}}},{chainId:137,address:"0x42f37A1296b2981F7C3cAcEd84c5096b2Eb0C72C",name:"Keep Network",symbol:"KEEP",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/3373/thumb/IuNzUb5b_400x400.jpg?1589526336",extensions:{bridgeInfo:{"1":{tokenAddress:"0x85Eee30c52B0b379b046Fb0F85F4f3Dc3009aFEC"}}}},{name:"Kyber Network Crystal",address:"0x324b28d6565f784d596422B0F2E5aB6e9CFA1Dc7",symbol:"KNC",decimals:18,chainId:137,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdd974D5C2e2928deA5F71b9825b8b646686BD200/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0xdd974D5C2e2928deA5F71b9825b8b646686BD200"}}}},{chainId:137,address:"0x53AEc293212E3B792563Bc16f1be26956adb12e9",name:"Keep3rV1",symbol:"KP3R",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12966/thumb/kp3r_logo.jpg?1607057458",extensions:{bridgeInfo:{"1":{tokenAddress:"0x1cEB5cB57C4D4E2b2433641b95Dd330A33185A44"}}}},{chainId:137,address:"0xE8A51D0dD1b4525189ddA2187F90ddF0932b5482",name:"LCX",symbol:"LCX",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/9985/thumb/zRPSu_0o_400x400.jpg?1574327008",extensions:{bridgeInfo:{"1":{tokenAddress:"0x037A54AaB062628C9Bbae1FDB1583c195585fe41"}}}},{chainId:137,address:"0xC3C7d422809852031b44ab29EEC9F1EfF2A58756",name:"Lido DAO",symbol:"LDO",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/13573/thumb/Lido_DAO.png?1609873644",extensions:{bridgeInfo:{"1":{tokenAddress:"0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32"}}}},{name:"ChainLink Token",address:"0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39",symbol:"LINK",decimals:18,chainId:137,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x514910771AF9Ca656af840dff83E8264EcF986CA/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0x514910771AF9Ca656af840dff83E8264EcF986CA"}}}},{name:"Loom Network",address:"0x66EfB7cC647e0efab02eBA4316a2d2941193F6b3",symbol:"LOOM",decimals:18,chainId:137,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA4e8C3Ec456107eA67d3075bF9e3DF3A75823DB0/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0xA4e8C3Ec456107eA67d3075bF9e3DF3A75823DB0"}}}},{chainId:137,address:"0x3962F4A0A0051DccE0be73A7e09cEf5756736712",name:"Livepeer",symbol:"LPT",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/7137/thumb/logo-circle-green.png?1619593365",extensions:{bridgeInfo:{"1":{tokenAddress:"0x58b6A8A3302369DAEc383334672404Ee733aB239"}}}},{chainId:137,address:"0x8Ab2Fec94d17ae69FB90E7c773f2C85Ed1802c01",name:"Liquity",symbol:"LQTY",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14665/thumb/200-lqty-icon.png?1617631180",extensions:{bridgeInfo:{"1":{tokenAddress:"0x6DEA81C8171D0bA574754EF6F8b412F2Ed88c54D"}}}},{name:"LoopringCoin V2",address:"0x84e1670F61347CDaeD56dcc736FB990fBB47ddC1",symbol:"LRC",decimals:18,chainId:137,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xBBbbCA6A901c926F240b89EacB641d8Aec7AEafD/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0xBBbbCA6A901c926F240b89EacB641d8Aec7AEafD"}}}},{chainId:137,address:"0xA1c57f48F0Deb89f569dFbE6E2B7f46D33606fD4",name:"Decentraland",symbol:"MANA",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/878/thumb/decentraland-mana.png?1550108745",extensions:{bridgeInfo:{"1":{tokenAddress:"0x0F5D2fB29fb7d3CFeE444a200298f468908cC942"}}}},{chainId:137,address:"0x2B9E7ccDF0F4e5B24757c1E1a80e311E34Cb10c7",name:"Mask Network",symbol:"MASK",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14051/thumb/Mask_Network.jpg?1614050316",extensions:{bridgeInfo:{"1":{tokenAddress:"0x69af81e73A73B40adF4f3d4223Cd9b1ECE623074"}}}},{chainId:137,address:"0xAa7DbD1598251f856C12f63557A4C4397c253Cea",name:"Moss Carbon Credit",symbol:"MCO2",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14414/thumb/ENtxnThA_400x400.jpg?1615948522",extensions:{bridgeInfo:{"1":{tokenAddress:"0xfC98e825A2264D890F9a1e68ed50E1526abCcacD"}}}},{chainId:137,address:"0x01288e04435bFcd4718FF203D6eD18146C17Cd4b",name:"Magic Internet Money",symbol:"MIM",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/16786/thumb/mimlogopng.png?1624979612",extensions:{bridgeInfo:{"1":{tokenAddress:"0x99D8a9C45b2ecA8864373A26D1459e3Dff1e17F3"}}}},{chainId:137,address:"0x1C5cccA2CB59145A4B25F452660cbA6436DDce9b",name:"Mirror Protocol",symbol:"MIR",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/13295/thumb/mirror_logo_transparent.png?1611554658",extensions:{bridgeInfo:{"1":{tokenAddress:"0x09a3EcAFa817268f77BE1283176B946C4ff2E608"}}}},{name:"Maker",address:"0x6f7C932e7684666C9fd1d44527765433e01fF61d",symbol:"MKR",decimals:18,chainId:137,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2"}}}},{chainId:137,address:"0xa9f37D84c856fDa3812ad0519Dad44FA0a3Fe207",name:"Melon",symbol:"MLN",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/605/thumb/melon.png?1547034295",extensions:{bridgeInfo:{"1":{tokenAddress:"0xec67005c4E498Ec7f55E092bd1d35cbC47C91892"}}}},{chainId:137,address:"0x4985E0B13554fB521840e893574D3848C10Fcc6f",name:"PolySwarm",symbol:"NCT",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/2843/thumb/ImcYCVfX_400x400.jpg?1628519767",extensions:{bridgeInfo:{"1":{tokenAddress:"0x9E46A38F5DaaBe8683E10793b06749EEF7D733d1"}}}},{name:"Numeraire",address:"0x0Bf519071b02F22C17E7Ed5F4002ee1911f46729",symbol:"NMR",decimals:18,chainId:137,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x1776e1F26f98b1A5dF9cD347953a26dd3Cb46671/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0x1776e1F26f98b1A5dF9cD347953a26dd3Cb46671"}}}},{chainId:137,address:"0x282d8efCe846A88B159800bd4130ad77443Fa1A1",name:"Ocean Protocol",symbol:"OCEAN",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/3687/thumb/ocean-protocol-logo.jpg?1547038686",extensions:{bridgeInfo:{"1":{tokenAddress:"0x967da4048cD07aB37855c090aAF366e4ce1b9F48"}}}},{chainId:137,address:"0xa63Beffd33AB3a2EfD92a39A7D2361CEE14cEbA8",name:"Origin Protocol",symbol:"OGN",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/3296/thumb/op.jpg?1547037878",extensions:{bridgeInfo:{"1":{tokenAddress:"0x8207c1FfC5B6804F6024322CcF34F29c3541Ae26"}}}},{chainId:137,address:"0x62414D03084EeB269E18C970a21f45D2967F0170",name:"OMG Network",symbol:"OMG",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/776/thumb/OMG_Network.jpg?1591167168",extensions:{bridgeInfo:{"1":{tokenAddress:"0xd26114cd6EE289AccF82350c8d8487fedB8A0C07"}}}},{chainId:137,address:"0x0EE392bA5ef1354c9bd75a98044667d307C0e773",name:"Orion Protocol",symbol:"ORN",decimals:8,logoURI:"https://assets.coingecko.com/coins/images/11841/thumb/orion_logo.png?1594943318",extensions:{bridgeInfo:{"1":{tokenAddress:"0x0258F474786DdFd37ABCE6df6BBb1Dd5dfC4434a"}}}},{name:"Orchid",address:"0x9880e3dDA13c8e7D4804691A45160102d31F6060",symbol:"OXT",decimals:18,chainId:137,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x4575f41308EC1483f3d399aa9a2826d74Da13Deb/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0x4575f41308EC1483f3d399aa9a2826d74Da13Deb"}}}},{chainId:137,address:"0x553d3D295e0f695B9228246232eDF400ed3560B5",name:"PAX Gold",symbol:"PAXG",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/9519/thumb/paxg.PNG?1568542565",extensions:{bridgeInfo:{"1":{tokenAddress:"0x45804880De22913dAFE09f4980848ECE6EcbAf78"}}}},{chainId:137,address:"0x263534a4Fe3cb249dF46810718B7B612a30ebbff",name:"Perpetual Protocol",symbol:"PERP",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12381/thumb/60d18e06844a844ad75901a9_mark_only_03.png?1628674771",extensions:{bridgeInfo:{"1":{tokenAddress:"0xbC396689893D065F41bc2C6EcbeE5e0085233447"}}}},{chainId:137,address:"0x8765f05ADce126d70bcdF1b0a48Db573316662eB",name:"PlayDapp",symbol:"PLA",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14316/thumb/54023228.png?1615366911",extensions:{bridgeInfo:{"1":{tokenAddress:"0x3a4f40631a4f906c2BaD353Ed06De7A5D3fCb430"}}}},{chainId:137,address:"0x7dc0cb65EC6019330a6841e9c274f2EE57A6CA6C",name:"Pluton",symbol:"PLU",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/1241/thumb/pluton.png?1548331624",extensions:{bridgeInfo:{"1":{tokenAddress:"0xD8912C10681D8B21Fd3742244f44658dBA12264E"}}}},{chainId:137,address:"0x8dc302e2141DA59c934d900886DbF1518Fd92cd4",name:"Polkastarter",symbol:"POLS",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12648/thumb/polkastarter.png?1609813702",extensions:{bridgeInfo:{"1":{tokenAddress:"0x83e6f1E41cdd28eAcEB20Cb649155049Fac3D5Aa"}}}},{chainId:137,address:"0xcB059C5573646047D6d88dDdb87B745C18161d3b",name:"Polymath",symbol:"POLY",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/2784/thumb/inKkF01.png?1605007034",extensions:{bridgeInfo:{"1":{tokenAddress:"0x9992eC3cF6A55b00978cdDF2b27BC6882d88D1eC"}}}},{chainId:137,address:"0x0AaB8DC887D34f00D50E19aee48371a941390d14",name:"Power Ledger",symbol:"POWR",decimals:6,logoURI:"https://assets.coingecko.com/coins/images/1104/thumb/power-ledger.png?1547035082",extensions:{bridgeInfo:{"1":{tokenAddress:"0x595832F8FC6BF59c85C527fEC3740A1b7a361269"}}}},{chainId:137,address:"0x82FFdFD1d8699E8886a4e77CeFA9dd9710a7FefD",name:"Propy",symbol:"PRO",decimals:8,logoURI:"https://assets.coingecko.com/coins/images/869/thumb/propy.png?1548332100",extensions:{bridgeInfo:{"1":{tokenAddress:"0x226bb599a12C826476e3A771454697EA52E9E220"}}}},{chainId:137,address:"0x36B77a184bE8ee56f5E81C56727B20647A42e28E",name:"Quant",symbol:"QNT",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/3370/thumb/5ZOu7brX_400x400.jpg?1612437252",extensions:{bridgeInfo:{"1":{tokenAddress:"0x4a220E6096B25EADb88358cb44068A3248254675"}}}},{chainId:137,address:"0x831753DD7087CaC61aB5644b308642cc1c33Dc13",name:"Quickswap",symbol:"QUICK",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/13970/thumb/1_pOU6pBMEmiL-ZJVb0CYRjQ.png?1613386659",extensions:{bridgeInfo:{"1":{tokenAddress:"0x6c28AeF8977c9B773996d0e8376d2EE379446F2f"}}}},{chainId:137,address:"0x2f81e176471CC57fDC76f7d332FB4511bF2bebDD",name:"Radicle",symbol:"RAD",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14013/thumb/radicle.png?1614402918",extensions:{bridgeInfo:{"1":{tokenAddress:"0x31c8EAcBFFdD875c74b94b077895Bd78CF1E64A3"}}}},{chainId:137,address:"0x00e5646f60AC6Fb446f621d146B6E1886f002905",name:"Rai Reflex Index",symbol:"RAI",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14004/thumb/RAI-logo-coin.png?1613592334",extensions:{bridgeInfo:{"1":{tokenAddress:"0x03ab458634910AaD20eF5f1C8ee96F1D6ac54919"}}}},{chainId:137,address:"0x780053837cE2CeEaD2A90D9151aA21FC89eD49c2",name:"Rarible",symbol:"RARI",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/11845/thumb/Rari.png?1594946953",extensions:{bridgeInfo:{"1":{tokenAddress:"0xFca59Cd816aB1eaD66534D82bc21E7515cE441CF"}}}},{chainId:137,address:"0xc3cFFDAf8F3fdF07da6D5e3A89B8723D5E385ff8",name:"Rubic",symbol:"RBC",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12629/thumb/200x200.png?1607952509",extensions:{bridgeInfo:{"1":{tokenAddress:"0xA4EED63db85311E22dF4473f87CcfC3DaDCFA3E3"}}}},{name:"Republic Token",address:"0x19782D3Dc4701cEeeDcD90f0993f0A9126ed89d0",symbol:"REN",decimals:18,chainId:137,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x408e41876cCCDC0F92210600ef50372656052a38/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0x408e41876cCCDC0F92210600ef50372656052a38"}}}},{name:"Reputation Augur v2",address:"0x6563c1244820CfBd6Ca8820FBdf0f2847363F733",symbol:"REPv2",decimals:18,chainId:137,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x221657776846890989a759BA2973e427DfF5C9bB/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0x221657776846890989a759BA2973e427DfF5C9bB"}}}},{chainId:137,address:"0xAdf2F2Ed91755eA3f4bcC9107a494879f633ae7C",name:"Request",symbol:"REQ",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/1031/thumb/Request_icon_green.png?1643250951",extensions:{bridgeInfo:{"1":{tokenAddress:"0x8f8221aFbB33998d8584A2B05749bA73c37a938a"}}}},{chainId:137,address:"0x3b9dB434F08003A89554CDB43b3e0b1f8734BdE7",name:"Rari Governance Token",symbol:"RGT",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12900/thumb/Rari_Logo_Transparent.png?1613978014",extensions:{bridgeInfo:{"1":{tokenAddress:"0xD291E7a03283640FDc51b121aC401383A46cC623"}}}},{chainId:137,address:"0xbe662058e00849C3Eef2AC9664f37fEfdF2cdbFE",name:"iExec RLC",symbol:"RLC",decimals:9,logoURI:"https://assets.coingecko.com/coins/images/646/thumb/pL1VuXm.png?1604543202",extensions:{bridgeInfo:{"1":{tokenAddress:"0x607F4C5BB672230e8672085532f7e901544a7375"}}}},{chainId:137,address:"0x61299774020dA444Af134c82fa83E3810b309991",name:"Render Token",symbol:"RNDR",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/11636/thumb/rndr.png?1638840934",extensions:{bridgeInfo:{"1":{tokenAddress:"0x6De037ef9aD2725EB40118Bb1702EBb27e4Aeb24"}}}},{chainId:137,address:"0xBbba073C31bF03b8ACf7c28EF0738DeCF3695683",name:"The Sandbox",symbol:"SAND",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12129/thumb/sandbox_logo.jpg?1597397942",extensions:{bridgeInfo:{"1":{tokenAddress:"0x3845badAde8e6dFF049820680d1F14bD3903a5d0"}}}},{chainId:137,address:"0x6f8a06447Ff6FcF75d803135a7de15CE88C1d4ec",name:"Shiba Inu",symbol:"SHIB",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/11939/thumb/shiba.png?1622619446",extensions:{bridgeInfo:{"1":{tokenAddress:"0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE"}}}},{chainId:137,address:"0x0C7304fBAf2A320a1c50c46FE03752722F729946",name:"Smooth Love Potion",symbol:"SLP",decimals:0,logoURI:"https://assets.coingecko.com/coins/images/10366/thumb/SLP.png?1578640057",extensions:{bridgeInfo:{"1":{tokenAddress:"0xCC8Fa225D80b9c7D42F96e9570156c65D6cAAa25"}}}},{name:"Synthetix Network Token",address:"0x50B728D8D964fd00C2d0AAD81718b71311feF68a",symbol:"SNX",decimals:18,chainId:137,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F"}}}},{chainId:137,address:"0xcdB3C70CD25FD15307D84C4F9D37d5C043B33Fb2",name:"Spell Token",symbol:"SPELL",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/15861/thumb/abracadabra-3.png?1622544862",extensions:{bridgeInfo:{"1":{tokenAddress:"0x090185f2135308BaD17527004364eBcC2D37e5F6"}}}},{name:"Storj Token",address:"0xd72357dAcA2cF11A5F155b9FF7880E595A3F5792",symbol:"STORJ",decimals:8,chainId:137,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xB64ef51C888972c908CFacf59B47C1AfBC0Ab8aC/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0xB64ef51C888972c908CFacf59B47C1AfBC0Ab8aC"}}}},{chainId:137,address:"0xB36e3391B22a970d31A9b620Ae1A414C6c256d2a",name:"Stox",symbol:"STX",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/1230/thumb/stox-token.png?1547035256",extensions:{bridgeInfo:{"1":{tokenAddress:"0x006BeA43Baa3f7A6f765F14f10A1a1b08334EF45"}}}},{chainId:137,address:"0xa1428174F516F527fafdD146b883bB4428682737",name:"SuperFarm",symbol:"SUPER",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14040/thumb/6YPdWn6.png?1613975899",extensions:{bridgeInfo:{"1":{tokenAddress:"0xe53EC727dbDEB9E2d5456c3be40cFF031AB40A55"}}}},{name:"Synth sUSD",address:"0xF81b4Bec6Ca8f9fe7bE01CA734F55B2b6e03A7a0",symbol:"sUSD",decimals:18,chainId:137,logoURI:"https://assets.coingecko.com/coins/images/5013/thumb/sUSD.png?1616150765",extensions:{bridgeInfo:{"1":{tokenAddress:"0x57Ab1ec28D129707052df4dF418D58a2D46d5f51"}}}},{chainId:137,address:"0x0b3F868E0BE5597D5DB7fEB59E1CADBb0fdDa50a",name:"Sushi",symbol:"SUSHI",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12271/thumb/512x512_Logo_no_chop.png?1606986688",extensions:{bridgeInfo:{"1":{tokenAddress:"0x6B3595068778DD592e39A122f4f5a5cF09C90fE2"}}}},{chainId:137,address:"0x50a4a434247089848991DD8f09b889D4e2870aB6",name:"tBTC",symbol:"TBTC",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/11224/thumb/tBTC.png?1589620754",extensions:{bridgeInfo:{"1":{tokenAddress:"0x8dAEBADE922dF735c38C80C7eBD708Af50815fAa"}}}},{chainId:137,address:"0xe1708AbDE4847B4929b70547E5197F1Ba1db2250",name:"Tokemak",symbol:"TOKE",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/17495/thumb/tokemak-avatar-200px-black.png?1628131614",extensions:{bridgeInfo:{"1":{tokenAddress:"0x2e9d63788249371f1DFC918a52f8d799F4a38C94"}}}},{chainId:137,address:"0xA7b98d63a137bF402b4570799ac4caD0BB1c4B1c",name:"OriginTrail",symbol:"TRAC",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/1877/thumb/TRAC.jpg?1635134367",extensions:{bridgeInfo:{"1":{tokenAddress:"0xaA7a9CA87d3694B5755f213B5D04094b8d0F0A6F"}}}},{chainId:137,address:"0xE3322702BEdaaEd36CdDAb233360B939775ae5f1",name:"Tellor",symbol:"TRB",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/9644/thumb/Blk_icon_current.png?1584980686",extensions:{bridgeInfo:{"1":{tokenAddress:"0x88dF592F8eb5D7Bd38bFeF7dEb0fBc02cf3778a0"}}}},{chainId:137,address:"0x8676815789211E799a6DC86d02748ADF9cF86836",name:"Tribe",symbol:"TRIBE",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14575/thumb/tribe.PNG?1617487954",extensions:{bridgeInfo:{"1":{tokenAddress:"0xc7283b66Eb1EB5FB86327f08e1B5816b0720212B"}}}},{chainId:137,address:"0x5b77bCA482bd3E7958b1103d123888EfCCDaF803",name:"TrueFi",symbol:"TRU",decimals:8,logoURI:"https://assets.coingecko.com/coins/images/13180/thumb/truefi_glyph_color.png?1617610941",extensions:{bridgeInfo:{"1":{tokenAddress:"0x4C19596f5aAfF459fA38B0f7eD92F11AE6543784"}}}},{name:"UMA Voting Token v1",address:"0x3066818837c5e6eD6601bd5a91B0762877A6B731",symbol:"UMA",decimals:18,chainId:137,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x04Fa0d235C4abf4BcF4787aF4CF447DE572eF828/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0x04Fa0d235C4abf4BcF4787aF4CF447DE572eF828"}}}},{name:"Uniswap",address:"0xb33EaAd8d922B1083446DC23f610c2567fB5180f",symbol:"UNI",decimals:18,chainId:137,logoURI:"ipfs://QmXttGpZrECX5qCyXbBQiqgQNytVGeZW5Anewvh2jc4psg",extensions:{bridgeInfo:{"1":{tokenAddress:"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984"}}}},{name:"USDCoin",address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",symbol:"USDC",decimals:6,chainId:137,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"}}}},{name:"Tether USD",address:"0xc2132D05D31c914a87C6611C10748AEb04B58e8F",symbol:"USDT",decimals:6,chainId:137,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0xdAC17F958D2ee523a2206206994597C13D831ec7"}}}},{name:"Wrapped BTC",address:"0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6",symbol:"WBTC",decimals:8,chainId:137,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599"}}}},{name:"Wrapped Ether",address:"0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619",symbol:"WETH",decimals:18,chainId:137,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png"},{name:"Wrapped Matic",address:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",symbol:"WMATIC",decimals:18,chainId:137,logoURI:"https://assets.coingecko.com/coins/images/4713/thumb/matic-token-icon.png?1624446912"},{chainId:137,address:"0xd2507e7b5794179380673870d88B22F94da6abe0",name:"XYO Network",symbol:"XYO",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/4519/thumb/XYO_Network-logo.png?1547039819",extensions:{bridgeInfo:{"1":{tokenAddress:"0x55296f69f40Ea6d20E478533C15A6B08B654E758"}}}},{chainId:137,address:"0xDA537104D6A5edd53c6fBba9A898708E465260b6",name:"yearn finance",symbol:"YFI",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/11849/thumb/yfi-192x192.png?1598325330",extensions:{bridgeInfo:{"1":{tokenAddress:"0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e"}}}},{chainId:137,address:"0xb8cb8a7F4C2885C03e57E973C74827909Fdc2032",name:"DFI money",symbol:"YFII",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/11902/thumb/YFII-logo.78631676.png?1598677348",extensions:{bridgeInfo:{"1":{tokenAddress:"0xa1d0E215a23d7030842FC67cE582a6aFa3CCaB83"}}}},{name:"0x Protocol Token",address:"0x5559Edb74751A0edE9DeA4DC23aeE72cCA6bE3D5",symbol:"ZRX",decimals:18,chainId:137,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xE41d2489571d322189246DaFA5ebDe1F4699F498/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0xE41d2489571d322189246DaFA5ebDe1F4699F498"}}}},{chainId:42161,address:"0x6314C31A7a1652cE482cffe247E9CB7c3f4BB9aF",name:"1inch",symbol:"1INCH",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/13469/thumb/1inch-token.png?1608803028",extensions:{bridgeInfo:{"1":{tokenAddress:"0x111111111117dC0aa78b770fA6A738034120C302"}}}},{chainId:42161,address:"0xba5DdD1f9d7F570dc94a51479a000E3BCE967196",name:"Aave",symbol:"AAVE",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12645/thumb/AAVE.png?1601374110",extensions:{bridgeInfo:{"1":{tokenAddress:"0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9"}}}},{chainId:42161,address:"0x74885b4D524d497261259B38900f54e6dbAd2210",name:"ApeCoin",symbol:"APE",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/24383/small/apecoin.jpg?1647476455",extensions:{bridgeInfo:{"1":{tokenAddress:"0x4d224452801ACEd8B2F0aebE155379bb5D594381"}}}},{chainId:42161,address:"0xe88998Fb579266628aF6a03e3821d5983e5D0089",name:"Axie Infinity",symbol:"AXS",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/13029/thumb/axie_infinity_logo.png?1604471082",extensions:{bridgeInfo:{"1":{tokenAddress:"0xBB0E17EF65F82Ab018d8EDd776e8DD940327B28b"}}}},{chainId:42161,address:"0xBfa641051Ba0a0Ad1b0AcF549a89536A0D76472E",name:"Badger DAO",symbol:"BADGER",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/13287/thumb/badger_dao_logo.jpg?1607054976",extensions:{bridgeInfo:{"1":{tokenAddress:"0x3472A5A71965499acd81997a54BBA8D852C6E53d"}}}},{name:"Balancer",address:"0x040d1EdC9569d4Bab2D15287Dc5A4F10F56a56B8",symbol:"BAL",decimals:18,chainId:42161,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xba100000625a3754423978a60c9317c58a424e3D/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0xba100000625a3754423978a60c9317c58a424e3D"}}}},{chainId:42161,address:"0xa68Ec98D7ca870cF1Dd0b00EBbb7c4bF60A8e74d",name:"Biconomy",symbol:"BICO",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/21061/thumb/biconomy_logo.jpg?1638269749",extensions:{bridgeInfo:{"1":{tokenAddress:"0xF17e65822b568B3903685a7c9F496CF7656Cc6C2"}}}},{chainId:42161,address:"0x0D81E50bC677fa67341c44D7eaA9228DEE64A4e1",name:"BarnBridge",symbol:"BOND",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12811/thumb/barnbridge.jpg?1602728853",extensions:{bridgeInfo:{"1":{tokenAddress:"0x0391D2021f89DC339F60Fff84546EA23E337750f"}}}},{name:"Compound",address:"0x354A6dA3fcde098F8389cad84b0182725c6C91dE",symbol:"COMP",decimals:18,chainId:42161,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xc00e94Cb662C3520282E6f5717214004A7f26888/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0xc00e94Cb662C3520282E6f5717214004A7f26888"}}}},{chainId:42161,address:"0x6FE14d3CC2f7bDdffBa5CdB3BBE7467dd81ea101",name:"COTI",symbol:"COTI",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/2962/thumb/Coti.png?1559653863",extensions:{bridgeInfo:{"1":{tokenAddress:"0xDDB3422497E61e13543BeA06989C0789117555c5"}}}},{name:"Curve DAO Token",address:"0x11cDb42B0EB46D95f990BeDD4695A6e3fA034978",symbol:"CRV",decimals:18,chainId:42161,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xD533a949740bb3306d119CC777fa900bA034cd52/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0xD533a949740bb3306d119CC777fa900bA034cd52"}}}},{chainId:42161,address:"0x319f865b287fCC10b30d8cE6144e8b6D1b476999",name:"Cartesi",symbol:"CTSI",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/11038/thumb/cartesi.png?1592288021",extensions:{bridgeInfo:{"1":{tokenAddress:"0x491604c0FDF08347Dd1fa4Ee062a822A5DD06B5D"}}}},{chainId:42161,address:"0x9DfFB23CAd3322440bCcFF7aB1C58E781dDBF144",name:"Civic",symbol:"CVC",decimals:8,logoURI:"https://assets.coingecko.com/coins/images/788/thumb/civic.png?1547034556",extensions:{bridgeInfo:{"1":{tokenAddress:"0x41e5560054824eA6B0732E656E3Ad64E20e94E45"}}}},{name:"Dai Stablecoin",address:"0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1",symbol:"DAI",decimals:18,chainId:42161,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x6B175474E89094C44Da98b954EedeAC495271d0F/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0x6B175474E89094C44Da98b954EedeAC495271d0F"}}}},{chainId:42161,address:"0x51863cB90Ce5d6dA9663106F292fA27c8CC90c5a",name:"dYdX",symbol:"DYDX",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/17500/thumb/hjnIm9bV.jpg?1628009360",extensions:{bridgeInfo:{"1":{tokenAddress:"0x92D6C1e31e14520e676a687F0a93788B716BEff5"}}}},{chainId:42161,address:"0x3e4Cff6E50F37F731284A92d44AE943e17077fD4",name:"Dogelon Mars",symbol:"ELON",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14962/thumb/6GxcPRo3_400x400.jpg?1619157413",extensions:{bridgeInfo:{"1":{tokenAddress:"0x761D38e5ddf6ccf6Cf7c55759d5210750B5D60F3"}}}},{chainId:42161,address:"0x7fa9549791EFc9030e1Ed3F25D18014163806758",name:"Enjin Coin",symbol:"ENJ",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/1102/thumb/enjin-coin-logo.png?1547035078",extensions:{bridgeInfo:{"1":{tokenAddress:"0xF629cBd94d3791C9250152BD8dfBDF380E2a3B9c"}}}},{chainId:42161,address:"0xfeA31d704DEb0975dA8e77Bf13E04239e70d7c28",name:"Ethereum Name Service",symbol:"ENS",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/19785/thumb/acatxTm8_400x400.jpg?1635850140",extensions:{bridgeInfo:{"1":{tokenAddress:"0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72"}}}},{chainId:42161,address:"0xd42785D323e608B9E99fa542bd8b1000D4c2Df37",name:"Fantom",symbol:"FTM",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/4001/thumb/Fantom.png?1558015016",extensions:{bridgeInfo:{"1":{tokenAddress:"0x4E15361FD6b4BB609Fa63C81A2be19d873717870"}}}},{chainId:42161,address:"0xd9f9d2Ee2d3EFE420699079f16D9e924affFdEA4",name:"Frax Share",symbol:"FXS",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/13423/thumb/frax_share.png?1608478989",extensions:{bridgeInfo:{"1":{tokenAddress:"0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0"}}}},{name:"Gnosis Token",address:"0xa0b862F60edEf4452F25B4160F177db44DeB6Cf1",symbol:"GNO",decimals:18,chainId:42161,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x6810e776880C02933D47DB1b9fc05908e5386b96/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0x6810e776880C02933D47DB1b9fc05908e5386b96"}}}},{chainId:42161,address:"0x23A941036Ae778Ac51Ab04CEa08Ed6e2FE103614",name:"The Graph",symbol:"GRT",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/13397/thumb/Graph_Token.png?1608145566",extensions:{bridgeInfo:{"1":{tokenAddress:"0xc944E90C64B2c07662A292be6244BDf05Cda44a7"}}}},{chainId:42161,address:"0x7f9a7DB853Ca816B9A138AEe3380Ef34c437dEe0",name:"Gitcoin",symbol:"GTC",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/15810/thumb/gitcoin.png?1621992929",extensions:{bridgeInfo:{"1":{tokenAddress:"0xDe30da39c46104798bB5aA3fe8B9e0e1F348163F"}}}},{name:"ChainLink Token",address:"0xf97f4df75117a78c1A5a0DBb814Af92458539FB4",symbol:"LINK",decimals:18,chainId:42161,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x514910771AF9Ca656af840dff83E8264EcF986CA/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0x514910771AF9Ca656af840dff83E8264EcF986CA"}}}},{chainId:42161,address:"0x289ba1701C2F088cf0faf8B3705246331cB8A839",name:"Livepeer",symbol:"LPT",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/7137/thumb/logo-circle-green.png?1619593365",extensions:{bridgeInfo:{"1":{tokenAddress:"0x58b6A8A3302369DAEc383334672404Ee733aB239"}}}},{name:"LoopringCoin V2",address:"0x46d0cE7de6247b0A95f67b43B589b4041BaE7fbE",symbol:"LRC",decimals:18,chainId:42161,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xBBbbCA6A901c926F240b89EacB641d8Aec7AEafD/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0xBBbbCA6A901c926F240b89EacB641d8Aec7AEafD"}}}},{chainId:42161,address:"0x442d24578A564EF628A65e6a7E3e7be2a165E231",name:"Decentraland",symbol:"MANA",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/878/thumb/decentraland-mana.png?1550108745",extensions:{bridgeInfo:{"1":{tokenAddress:"0x0F5D2fB29fb7d3CFeE444a200298f468908cC942"}}}},{chainId:42161,address:"0x533A7B414CD1236815a5e09F1E97FC7d5c313739",name:"Mask Network",symbol:"MASK",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14051/thumb/Mask_Network.jpg?1614050316",extensions:{bridgeInfo:{"1":{tokenAddress:"0x69af81e73A73B40adF4f3d4223Cd9b1ECE623074"}}}},{chainId:42161,address:"0x561877b6b3DD7651313794e5F2894B2F18bE0766",name:"Polygon",symbol:"MATIC",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/4713/thumb/matic-token-icon.png?1624446912",extensions:{bridgeInfo:{"1":{tokenAddress:"0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0"}}}},{chainId:42161,address:"0xB20A02dfFb172C474BC4bDa3fD6f4eE70C04daf2",name:"Magic Internet Money",symbol:"MIM",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/16786/thumb/mimlogopng.png?1624979612",extensions:{bridgeInfo:{"1":{tokenAddress:"0x99D8a9C45b2ecA8864373A26D1459e3Dff1e17F3"}}}},{name:"Maker",address:"0x2e9a6Df78E42a30712c10a9Dc4b1C8656f8F2879",symbol:"MKR",decimals:18,chainId:42161,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2"}}}},{chainId:42161,address:"0x8f5c1A99b1df736Ad685006Cb6ADCA7B7Ae4b514",name:"Melon",symbol:"MLN",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/605/thumb/melon.png?1547034295",extensions:{bridgeInfo:{"1":{tokenAddress:"0xec67005c4E498Ec7f55E092bd1d35cbC47C91892"}}}},{chainId:42161,address:"0x53236015A675fcB937485F1AE58040e4Fb920d5b",name:"PolySwarm",symbol:"NCT",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/2843/thumb/ImcYCVfX_400x400.jpg?1628519767",extensions:{bridgeInfo:{"1":{tokenAddress:"0x9E46A38F5DaaBe8683E10793b06749EEF7D733d1"}}}},{name:"Numeraire",address:"0x597701b32553b9fa473e21362D480b3a6B569711",symbol:"NMR",decimals:18,chainId:42161,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x1776e1F26f98b1A5dF9cD347953a26dd3Cb46671/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0x1776e1F26f98b1A5dF9cD347953a26dd3Cb46671"}}}},{chainId:42161,address:"0x933d31561e470478079FEB9A6Dd2691fAD8234DF",name:"Ocean Protocol",symbol:"OCEAN",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/3687/thumb/ocean-protocol-logo.jpg?1547038686",extensions:{bridgeInfo:{"1":{tokenAddress:"0x967da4048cD07aB37855c090aAF366e4ce1b9F48"}}}},{chainId:42161,address:"0xfEb4DfC8C4Cf7Ed305bb08065D08eC6ee6728429",name:"PAX Gold",symbol:"PAXG",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/9519/thumb/paxg.PNG?1568542565",extensions:{bridgeInfo:{"1":{tokenAddress:"0x45804880De22913dAFE09f4980848ECE6EcbAf78"}}}},{chainId:42161,address:"0x753D224bCf9AAFaCD81558c32341416df61D3DAC",name:"Perpetual Protocol",symbol:"PERP",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12381/thumb/60d18e06844a844ad75901a9_mark_only_03.png?1628674771",extensions:{bridgeInfo:{"1":{tokenAddress:"0xbC396689893D065F41bc2C6EcbeE5e0085233447"}}}},{chainId:42161,address:"0x4e91F2AF1ee0F84B529478f19794F5AFD423e4A6",name:"Power Ledger",symbol:"POWR",decimals:6,logoURI:"https://assets.coingecko.com/coins/images/1104/thumb/power-ledger.png?1547035082",extensions:{bridgeInfo:{"1":{tokenAddress:"0x595832F8FC6BF59c85C527fEC3740A1b7a361269"}}}},{chainId:42161,address:"0xaeF5bbcbFa438519a5ea80B4c7181B4E78d419f2",name:"Rai Reflex Index",symbol:"RAI",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14004/thumb/RAI-logo-coin.png?1613592334",extensions:{bridgeInfo:{"1":{tokenAddress:"0x03ab458634910AaD20eF5f1C8ee96F1D6ac54919"}}}},{chainId:42161,address:"0xCF8600347Dc375C5f2FdD6Dab9BB66e0b6773cd7",name:"Rarible",symbol:"RARI",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/11845/thumb/Rari.png?1594946953",extensions:{bridgeInfo:{"1":{tokenAddress:"0xFca59Cd816aB1eaD66534D82bc21E7515cE441CF"}}}},{chainId:42161,address:"0x2E9AE8f178d5Ea81970C7799A377B3985cbC335F",name:"Rubic",symbol:"RBC",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12629/thumb/200x200.png?1607952509",extensions:{bridgeInfo:{"1":{tokenAddress:"0xA4EED63db85311E22dF4473f87CcfC3DaDCFA3E3"}}}},{name:"Republic Token",address:"0x9fA891e1dB0a6D1eEAC4B929b5AAE1011C79a204",symbol:"REN",decimals:18,chainId:42161,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x408e41876cCCDC0F92210600ef50372656052a38/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0x408e41876cCCDC0F92210600ef50372656052a38"}}}},{chainId:42161,address:"0xef888bcA6AB6B1d26dbeC977C455388ecd794794",name:"Rari Governance Token",symbol:"RGT",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12900/thumb/Rari_Logo_Transparent.png?1613978014",extensions:{bridgeInfo:{"1":{tokenAddress:"0xD291E7a03283640FDc51b121aC401383A46cC623"}}}},{chainId:42161,address:"0x5033833c9fe8B9d3E09EEd2f73d2aaF7E3872fd1",name:"Shiba Inu",symbol:"SHIB",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/11939/thumb/shiba.png?1622619446",extensions:{bridgeInfo:{"1":{tokenAddress:"0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE"}}}},{name:"Synthetix Network Token",address:"0xcBA56Cd8216FCBBF3fA6DF6137F3147cBcA37D60",symbol:"SNX",decimals:18,chainId:42161,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F"}}}},{chainId:42161,address:"0xb74Da9FE2F96B9E0a5f4A3cf0b92dd2bEC617124",name:"SOL Wormhole ",symbol:"SOL",decimals:9,logoURI:"https://assets.coingecko.com/coins/images/22876/thumb/SOL_wh_small.png?1644224316",extensions:{bridgeInfo:{"1":{tokenAddress:"0xD31a59c85aE9D8edEFeC411D448f90841571b89c"}}}},{chainId:42161,address:"0x3E6648C5a70A150A88bCE65F4aD4d506Fe15d2AF",name:"Spell Token",symbol:"SPELL",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/15861/thumb/abracadabra-3.png?1622544862",extensions:{bridgeInfo:{"1":{tokenAddress:"0x090185f2135308BaD17527004364eBcC2D37e5F6"}}}},{name:"Synth sUSD",address:"0xA970AF1a584579B618be4d69aD6F73459D112F95",symbol:"sUSD",decimals:18,chainId:42161,logoURI:"https://assets.coingecko.com/coins/images/5013/thumb/sUSD.png?1616150765",extensions:{bridgeInfo:{"1":{tokenAddress:"0x57Ab1ec28D129707052df4dF418D58a2D46d5f51"}}}},{chainId:42161,address:"0xd4d42F0b6DEF4CE0383636770eF773390d85c61A",name:"Sushi",symbol:"SUSHI",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/12271/thumb/512x512_Logo_no_chop.png?1606986688",extensions:{bridgeInfo:{"1":{tokenAddress:"0x6B3595068778DD592e39A122f4f5a5cF09C90fE2"}}}},{chainId:42161,address:"0x1bCfc0B4eE1471674cd6A9F6B363A034375eAD84",name:"Synapse",symbol:"SYN",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/18024/thumb/syn.png?1635002049",extensions:{bridgeInfo:{"1":{tokenAddress:"0x0f2D719407FdBeFF09D87557AbB7232601FD9F29"}}}},{chainId:42161,address:"0xBfAE6fecD8124ba33cbB2180aAb0Fe4c03914A5A",name:"Tribe",symbol:"TRIBE",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/14575/thumb/tribe.PNG?1617487954",extensions:{bridgeInfo:{"1":{tokenAddress:"0xc7283b66Eb1EB5FB86327f08e1B5816b0720212B"}}}},{name:"UMA Voting Token v1",address:"0xd693Ec944A85eeca4247eC1c3b130DCa9B0C3b22",symbol:"UMA",decimals:18,chainId:42161,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x04Fa0d235C4abf4BcF4787aF4CF447DE572eF828/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0x04Fa0d235C4abf4BcF4787aF4CF447DE572eF828"}}}},{name:"Uniswap",address:"0xFa7F8980b0f1E64A2062791cc3b0871572f1F7f0",symbol:"UNI",decimals:18,chainId:42161,logoURI:"ipfs://QmXttGpZrECX5qCyXbBQiqgQNytVGeZW5Anewvh2jc4psg",extensions:{bridgeInfo:{"1":{tokenAddress:"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984"}}}},{name:"USDCoin",address:"0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8",symbol:"USDC",decimals:6,chainId:42161,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"}}}},{name:"Tether USD",address:"0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",symbol:"USDT",decimals:6,chainId:42161,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0xdAC17F958D2ee523a2206206994597C13D831ec7"}}}},{name:"Wrapped BTC",address:"0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f",symbol:"WBTC",decimals:8,chainId:42161,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599"}}}},{name:"Wrapped Ether",address:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",symbol:"WETH",decimals:18,chainId:42161,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"}}}},{chainId:42161,address:"0x82e3A8F066a6989666b031d916c43672085b1582",name:"yearn finance",symbol:"YFI",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/11849/thumb/yfi-192x192.png?1598325330",extensions:{bridgeInfo:{"1":{tokenAddress:"0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e"}}}},{name:"0x Protocol Token",address:"0xBD591Bd4DdB64b77B5f76Eab8f03d02519235Ae2",symbol:"ZRX",decimals:18,chainId:42161,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xE41d2489571d322189246DaFA5ebDe1F4699F498/logo.png",extensions:{bridgeInfo:{"1":{tokenAddress:"0xE41d2489571d322189246DaFA5ebDe1F4699F498"}}}},{name:"Wrapped Ether",address:"0xA6FA4fB5f76172d178d61B04b0ecd319C5d1C0aa",symbol:"WETH",decimals:18,chainId:80001,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png"},{name:"Wrapped Matic",address:"0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889",symbol:"WMATIC",decimals:18,chainId:80001,logoURI:"https://assets.coingecko.com/coins/images/4713/thumb/matic-token-icon.png?1624446912"}]}});var DU=Q((FRe,IU)=>{var yme="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",xme="0123456789ABCDEFGHIJKLMNOPQRSTUV",wme="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function _me(t,e){var r=t.indexOf(e);if(r===-1)throw new Error("Invalid character found: "+e);return r}o(_me,"readChar");IU.exports=o(function(e,r){var n;switch(r){case"RFC3548":case"RFC4648":n=yme,e=e.replace(/=+$/,"");break;case"RFC4648-HEX":n=xme,e=e.replace(/=+$/,"");break;case"Crockford":n=wme,e=e.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1");break;default:throw new Error("Unknown base32 variant: "+r)}for(var i=e.length,s=0,a=0,f=0,d=new Uint8Array(i*5/8|0),h=0;h<i;h++)a=a<<5|_me(n,e[h]),s+=5,s>=8&&(d[f++]=a>>>s-8&255,s-=8);return d.buffer},"base32Decode")});var Kme={};tr(Kme,{BackwardsCompatCredentialsListValidator:()=>M8,BackwardsCompatIDXCredentialValidator:()=>DL,CeramicURIValidator:()=>Nb,CredentialsListValidator:()=>k8,VCResolutionPlugin:()=>qv,customLearnCard:()=>lv,emptyLearnCard:()=>Lv,expirationPlugin:()=>sf,generateLearnCard:()=>Qo,getCHAPIPlugin:()=>Va,getCeramicPlugin:()=>Q0,getDidKeyPlugin:()=>Uv,getDidKitPlugin:()=>hh,getEthereumPlugin:()=>j8,getIDXPlugin:()=>np,getLearnCardPlugin:()=>vf,getTestCache:()=>Vme,getTestStorage:()=>zme,getVCAPIPlugin:()=>l5,getVCPlugin:()=>am,getVCTemplatesPlugin:()=>Na,getVpqrPlugin:()=>u5,initLearnCard:()=>Hme,learnCardFromApiUrl:()=>h5,learnCardFromSeed:()=>d5});module.exports=Zp(Kme);var W2e=Mt(qI()),Y2e=require("isomorphic-fetch"),j1=Mt(require("abort-controller/dist/abort-controller.js")),uh=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:void 0;uh&&(typeof uh.AbortController>"u"&&(uh.AbortController=j1.AbortController),typeof uh.AbortSignal>"u"&&(uh.AbortSignal=j1.AbortSignal));var uv=o((t,e)=>t.reduce((r,n)=>r!==void 0?r:e(n),void 0),"findFirstResult"),hi=o((t,e)=>e==="read"?"get"in(t.read??{}):e==="store"?"upload"in(t.store??{}):e==="index"?"get"in(t.index??{}):e==="cache"?"getIndex"in(t.cache??{}):e==="id"?"did"in(t.id??{}):!1,"pluginImplementsPlane"),Lr=o((t,e)=>e==="read"?"read"in t:e==="store"?"store"in t:e==="index"?"index"in t:e==="cache"?"cache"in t:e==="id"?"id"in t:!1,"learnCardImplementsPlane"),$I=o((t,e)=>Object.fromEntries(Object.entries(t).map(([r,n],i)=>[r,e(n,i)])),"mapObject"),H1=o(t=>t.status==="fulfilled"&&!!t.value,"isFulfilledAndNotEmpty"),jI=o((t,e)=>[...new Map(t.map(r=>[e instanceof Function?e(r):r[e],r])).values()],"uniqBy");var dh=o((t,e)=>t.reduce((r,n)=>(e in n&&(r[n.name]={name:n.name,displayName:n.displayName,description:n.description}),r),{}),"getPlaneProviders"),dv=o((t,e)=>$I(e,r=>r.bind(t,t)),"bindLearnCardToFunctionsObject"),Dte=o(async(t,e)=>(t.debug?.("Adding plugin",e.name),Qo({plugins:[...t.plugins,e],debug:t.debug})),"addPluginToLearnCard"),Ste=o(t=>({get:async(e,{cache:r="cache-first"}={})=>{if(t.debug?.("learnCard.read.get",e),!e)return;if(r==="cache-only"&&!Lr(t,"cache"))throw new Error("Cannot read from cache. Cache Plane is not implemented!");if(Lr(t,"cache")&&r!=="skip-cache"){let s=await t.cache.getVc(e);if(s)return r==="cache-first"&&Lr(t,"read")&&t.read.get(e,{cache:"skip-cache"}).then(a=>t.cache.setVc(e,a)),s}let i=(await Promise.allSettled(t.plugins.map(async s=>{if(!hi(s,"read"))throw new Error("Plugin is not a Read Plugin");return s.read.get(t,e)}))).find(H1)?.value;return i&&Lr(t,"cache")&&r!=="skip-cache"&&await t.cache.setVc(e,i),i},providers:dh(t.plugins,"read")}),"generateReadPlane"),Tte=o(t=>({upload:async(e,r,{cache:n="cache-first"}={})=>{let i=await t.upload(e,r);return n!=="skip-cache"&&Lr(e,"cache")&&await e.cache.setVc(i,r),i},..."uploadMany"in t?{uploadMany:t.uploadMany}:{},..."uploadEncrypted"in t?{uploadEncrypted:async(e,r,n,{cache:i="cache-first"}={})=>{let s=await t.uploadEncrypted?.(e,r,n);return i!=="skip-cache"&&Lr(e,"cache")&&await e.cache.setVc(s,r),s}}:{}}),"addCachingToStorePlane"),kte=o(t=>({...t.plugins.reduce((r,n)=>(hi(n,"store")&&(r[n.name]=dv(t,Tte(n.store))),r),{}),providers:dh(t.plugins,"store")}),"generateStorePlane"),Mte=o((t,e)=>({get:async(r,n,{cache:i="cache-first"}={})=>{if(i==="cache-only"&&!Lr(r,"cache"))throw new Error("Cannot read from cache. Cache Plane is not implemented!");if(Lr(r,"cache")&&i!=="skip-cache"){let a=await r.cache.getIndex(e,n??{});if(a)return i==="cache-first"&&t.get(r,n,{cache:"skip-cache"}).then(f=>r.cache.setIndex(e,n??{},f)),a}let s=await t.get(r,n);return s&&Lr(r,"cache")&&i!=="skip-cache"&&await r.cache.setIndex(e,n??{},s),s},add:async(r,n,{cache:i="cache-first"}={})=>(i!=="skip-cache"&&Lr(r,"cache")&&await r.cache.flushIndex(),t.add(r,n)),...t.addMany?{addMany:async(r,n,{cache:i="cache-first"}={})=>(i!=="skip-cache"&&Lr(r,"cache")&&await r.cache.flushIndex(),t.addMany?.(r,n))}:{},update:async(r,n,i,{cache:s="cache-first"}={})=>(s!=="skip-cache"&&Lr(r,"cache")&&await r.cache.flushIndex(),t.update(r,n,i)),remove:async(r,n,{cache:i="cache-first"}={})=>(i!=="skip-cache"&&Lr(r,"cache")&&await r.cache.flushIndex(),t.remove(r,n)),...t.removeAll?{removeAll:async(r,{cache:n="cache-first"}={})=>(n!=="skip-cache"&&Lr(r,"cache")&&await r.cache.flushIndex(),t.removeAll?.(r))}:{}}),"addCachingToIndexPlane"),Rte=o(t=>({...t.plugins.reduce((n,i)=>(hi(i,"index")&&(n[i.name]=dv(t,Mte(i.index,i.name))),n),{}),all:{get:async(n,{cache:i="cache-first"}={})=>{if(t.debug?.("learnCard.index.all.get"),i==="cache-only"&&!Lr(t,"cache"))throw new Error("Cannot read from cache. Cache Plane is not implemented!");if(Lr(t,"cache")&&i!=="skip-cache"){let f=await t.cache.getIndex("all",n??{});if(f)return i==="cache-first"&&Lr(t,"index")&&t.index.all.get(n,{cache:"skip-cache"}).then(d=>t.cache.setIndex("all",n??{},d)),f}let s=(await Promise.all(t.plugins.map(async f=>hi(f,"index")?f.index.get(t,n):[]))).flat(),a=jI(s,"id");return a&&Lr(t,"cache")&&i!=="skip-cache"&&await t.cache.setIndex("all",n??{},a),a}},providers:dh(t.plugins,"index")}),"generateIndexPlane"),Bte=o(t=>({getIndex:async(e,r)=>{t.debug?.("learnCard.cache.getIndex");try{return(await Promise.allSettled(t.plugins.map(async s=>{if(!hi(s,"cache"))throw new Error("Plugin is not a Cache Plugin");return s.cache.getIndex(t,e,r)}))).find(H1)?.value}catch{return}},setIndex:async(e,r,n)=>(t.debug?.("learnCard.cache.setIndex"),(await Promise.allSettled(t.plugins.map(async s=>{if(!hi(s,"cache"))throw new Error("Plugin is not a Cache Plugin");return s.cache.setIndex(t,e,r,n)}))).some(s=>s.status==="fulfilled")),flushIndex:async()=>(t.debug?.("learnCard.cache.flushIndex"),(await Promise.allSettled(t.plugins.map(async r=>{if(!hi(r,"cache"))throw new Error("Plugin is not a Cache Plugin");return r.cache.flushIndex(t)}))).some(r=>r.status==="fulfilled")),getVc:async e=>{t.debug?.("learnCard.cache.getVc");try{return(await Promise.allSettled(t.plugins.map(async i=>{if(!hi(i,"cache"))throw new Error("Plugin is not a Cache Plugin");return i.cache.getVc(t,e)}))).find(H1)?.value}catch{return}},setVc:async(e,r)=>(t.debug?.("learnCard.cache.setVc"),(await Promise.allSettled(t.plugins.map(async i=>{if(!hi(i,"cache"))throw new Error("Plugin is not a Cache Plugin");return i.cache.setVc(t,e,r)}))).some(i=>i.status==="fulfilled")),flushVc:async()=>(t.debug?.("learnCard.cache.flushVc"),(await Promise.allSettled(t.plugins.map(async r=>{if(!hi(r,"cache"))throw new Error("Plugin is not a Cache Plugin");return r.cache.flushVc(t)}))).some(r=>r.status==="fulfilled")),providers:dh(t.plugins,"cache")}),"generateCachePlane"),Fte=o(t=>({did:e=>{t.debug?.("learnCard.id.did",e);let r=uv([...t.plugins].reverse(),n=>{try{return hi(n,"id")?n.id.did(t,e):void 0}catch{return}});if(!r)throw new Error(`No plugin supports did method ${e}`);return r},keypair:e=>{t.debug?.("learnCard.id.keypair",e);let r=uv(t.plugins,n=>{try{return hi(n,"id")?n.id.keypair(t,e):void 0}catch{return}});if(!r)throw new Error(`No plugin supports keypair type ${e}`);return r},providers:dh(t.plugins,"id")}),"generateIdPlane"),Pte=o((t,e)=>dv(t,e),"bindMethods"),Qo=o(async(t={})=>{let{plugins:e=[]}=t,r=e.reduce((i,s)=>({...i,...s.methods}),{}),n={read:{},store:{},index:{},cache:{},id:{},plugins:e,invoke:r,addPlugin:function(i){return Dte(this,i)},debug:t.debug};return n.read=Ste(n),n.store=kte(n),n.index=Rte(n),n.cache=Bte(n),n.id=Fte(n),r&&(n.invoke=Pte(n,r)),n},"generateLearnCard");var HI=Mt(require("isomorphic-webcrypto"));typeof window>"u"&&!globalThis.crypto&&(globalThis.crypto=HI.default);var lv=o(async({debug:t}={})=>Qo({debug:t}),"customLearnCard");var zte={};var Ne,zs=new Array(32).fill(void 0);zs.push(void 0,null,!0,!1);function Ve(t){return zs[t]}o(Ve,"getObject");var lh=zs.length;function Ote(t){t<36||(zs[t]=lh,lh=t)}o(Ote,"dropObject");function Kn(t){let e=Ve(t);return Ote(t),e}o(Kn,"takeObject");var zI=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});zI.decode();var V1=new Uint8Array;function ed(){return V1.byteLength===0&&(V1=new Uint8Array(Ne.memory.buffer)),V1}o(ed,"getUint8Memory0");function _o(t,e){return zI.decode(ed().subarray(t,t+e))}o(_o,"getStringFromWasm0");function et(t){lh===zs.length&&zs.push(zs.length+1);let e=lh;return lh=zs[e],zs[e]=t,e}o(et,"addHeapObject");var rr=0,z1=new TextEncoder("utf-8"),Nte=typeof z1.encodeInto=="function"?function(t,e){return z1.encodeInto(t,e)}:function(t,e){let r=z1.encode(t);return e.set(r),{read:t.length,written:r.length}};function gr(t,e,r){if(r===void 0){let f=z1.encode(t),d=e(f.length);return ed().subarray(d,d+f.length).set(f),rr=f.length,d}let n=t.length,i=e(n),s=ed(),a=0;for(;a<n;a++){let f=t.charCodeAt(a);if(f>127)break;s[i+a]=f}if(a!==n){a!==0&&(t=t.slice(a)),i=r(i,n,n=a+t.length*3);let f=ed().subarray(i+a,i+n);a+=Nte(t,f).written}return rr=a,i}o(gr,"passStringToWasm0");function Lte(t){return t==null}o(Lte,"isLikeNone");var K1=new Int32Array;function Hr(){return K1.byteLength===0&&(K1=new Int32Array(Ne.memory.buffer)),K1}o(Hr,"getInt32Memory0");function hv(t){let e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){let i=t.description;return i==null?"Symbol":`Symbol(${i})`}if(e=="function"){let i=t.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(t)){let i=t.length,s="[";i>0&&(s+=hv(t[0]));for(let a=1;a<i;a++)s+=", "+hv(t[a]);return s+="]",s}let r=/\[object ([^\]]+)\]/.exec(toString.call(t)),n;if(r.length>1)n=r[1];else return toString.call(t);if(n=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message}
|
652
|
-
${t.stack}`:n}o(hv,"debugString");function Ute(t,e,r,n){let i={a:t,b:e,cnt:1,dtor:r},s=o((...a)=>{i.cnt++;let f=i.a;i.a=0;try{return n(f,i.b,...a)}finally{--i.cnt===0?Ne.__wbindgen_export_2.get(i.dtor)(f,i.b):i.a=f}},"real");return s.original=i,s}o(Ute,"makeMutClosure");function qte(t,e,r){Ne._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hf6251ee6687a20b8(t,e,et(r))}o(qte,"__wbg_adapter_26");function KI(t,e){let r=gr(t,Ne.__wbindgen_malloc,Ne.__wbindgen_realloc),n=rr,i=gr(e,Ne.__wbindgen_malloc,Ne.__wbindgen_realloc),s=rr,a=Ne.didResolver(r,n,i,s);return Kn(a)}o(KI,"didResolver");function GI(t,e){let r=gr(t,Ne.__wbindgen_malloc,Ne.__wbindgen_realloc),n=rr,i=gr(e,Ne.__wbindgen_malloc,Ne.__wbindgen_realloc),s=rr,a=Ne.resolveDID(r,n,i,s);return Kn(a)}o(GI,"resolveDID");function WI(t,e){let r=e(t.length*1);return ed().set(t,r/1),rr=t.length,r}o(WI,"passArray8ToWasm0");function YI(t){try{let f=Ne.__wbindgen_add_to_stack_pointer(-16),d=WI(t,Ne.__wbindgen_malloc),h=rr;Ne.generateEd25519KeyFromBytes(f,d,h);var e=Hr()[f/4+0],r=Hr()[f/4+1],n=Hr()[f/4+2],i=Hr()[f/4+3],s=e,a=r;if(i)throw s=0,a=0,Kn(n);return _o(s,a)}finally{Ne.__wbindgen_add_to_stack_pointer(16),Ne.__wbindgen_free(s,a)}}o(YI,"generateEd25519KeyFromBytes");function JI(t){try{let f=Ne.__wbindgen_add_to_stack_pointer(-16),d=WI(t,Ne.__wbindgen_malloc),h=rr;Ne.generateSecp256k1KeyFromBytes(f,d,h);var e=Hr()[f/4+0],r=Hr()[f/4+1],n=Hr()[f/4+2],i=Hr()[f/4+3],s=e,a=r;if(i)throw s=0,a=0,Kn(n);return _o(s,a)}finally{Ne.__wbindgen_add_to_stack_pointer(16),Ne.__wbindgen_free(s,a)}}o(JI,"generateSecp256k1KeyFromBytes");function XI(t,e){try{let d=Ne.__wbindgen_add_to_stack_pointer(-16),h=gr(t,Ne.__wbindgen_malloc,Ne.__wbindgen_realloc),p=rr,y=gr(e,Ne.__wbindgen_malloc,Ne.__wbindgen_realloc),I=rr;Ne.keyToDID(d,h,p,y,I);var r=Hr()[d/4+0],n=Hr()[d/4+1],i=Hr()[d/4+2],s=Hr()[d/4+3],a=r,f=n;if(s)throw a=0,f=0,Kn(i);return _o(a,f)}finally{Ne.__wbindgen_add_to_stack_pointer(16),Ne.__wbindgen_free(a,f)}}o(XI,"keyToDID");function ZI(t,e){let r=gr(t,Ne.__wbindgen_malloc,Ne.__wbindgen_realloc),n=rr,i=gr(e,Ne.__wbindgen_malloc,Ne.__wbindgen_realloc),s=rr,a=Ne.keyToVerificationMethod(r,n,i,s);return Kn(a)}o(ZI,"keyToVerificationMethod");function QI(t){let e=gr(t,Ne.__wbindgen_malloc,Ne.__wbindgen_realloc),r=rr,n=Ne.didToVerificationMethod(e,r);return Kn(n)}o(QI,"didToVerificationMethod");function eD(t,e,r){let n=gr(t,Ne.__wbindgen_malloc,Ne.__wbindgen_realloc),i=rr,s=gr(e,Ne.__wbindgen_malloc,Ne.__wbindgen_realloc),a=rr,f=gr(r,Ne.__wbindgen_malloc,Ne.__wbindgen_realloc),d=rr,h=Ne.issueCredential(n,i,s,a,f,d);return Kn(h)}o(eD,"issueCredential");function tD(t,e){let r=gr(t,Ne.__wbindgen_malloc,Ne.__wbindgen_realloc),n=rr,i=gr(e,Ne.__wbindgen_malloc,Ne.__wbindgen_realloc),s=rr,a=Ne.verifyCredential(r,n,i,s);return Kn(a)}o(tD,"verifyCredential");function rD(t,e,r){let n=gr(t,Ne.__wbindgen_malloc,Ne.__wbindgen_realloc),i=rr,s=gr(e,Ne.__wbindgen_malloc,Ne.__wbindgen_realloc),a=rr,f=gr(r,Ne.__wbindgen_malloc,Ne.__wbindgen_realloc),d=rr,h=Ne.issuePresentation(n,i,s,a,f,d);return Kn(h)}o(rD,"issuePresentation");function nD(t,e){let r=gr(t,Ne.__wbindgen_malloc,Ne.__wbindgen_realloc),n=rr,i=gr(e,Ne.__wbindgen_malloc,Ne.__wbindgen_realloc),s=rr,a=Ne.verifyPresentation(r,n,i,s);return Kn(a)}o(nD,"verifyPresentation");function iD(t){let e=gr(t,Ne.__wbindgen_malloc,Ne.__wbindgen_realloc),r=rr,n=Ne.contextLoader(e,r);return Kn(n)}o(iD,"contextLoader");function Ur(t,e){try{return t.apply(this,e)}catch(r){Ne.__wbindgen_exn_store(et(r))}}o(Ur,"handleError");function VI(t,e){return ed().subarray(t/1,t/1+e)}o(VI,"getArrayU8FromWasm0");function $te(t,e,r,n){Ne.wasm_bindgen__convert__closures__invoke2_mut__h63ffd509f6690aab(t,e,et(r),et(n))}o($te,"__wbg_adapter_133");async function jte(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(n){if(t.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",n);else throw n}let r=await t.arrayBuffer();return await WebAssembly.instantiate(r,e)}else{let r=await WebAssembly.instantiate(t,e);return r instanceof WebAssembly.Instance?{instance:r,module:t}:r}}o(jte,"load");function Hte(){let t={};return t.wbg={},t.wbg.__wbindgen_object_drop_ref=function(e){Kn(e)},t.wbg.__wbindgen_string_new=function(e,r){let n=_o(e,r);return et(n)},t.wbg.__wbindgen_cb_drop=function(e){let r=Kn(e).original;return r.cnt--==1?(r.a=0,!0):!1},t.wbg.__wbindgen_object_clone_ref=function(e){let r=Ve(e);return et(r)},t.wbg.__wbg_fetch_b1379d93c1e2b015=function(e){let r=fetch(Ve(e));return et(r)},t.wbg.__wbg_fetch_17b968b9c79d3c56=function(e,r){let n=Ve(e).fetch(Ve(r));return et(n)},t.wbg.__wbg_new_4cba26249c1686cd=function(){return Ur(function(){let e=new Headers;return et(e)},arguments)},t.wbg.__wbg_append_9c6d4d7f71076e48=function(){return Ur(function(e,r,n,i,s){Ve(e).append(_o(r,n),_o(i,s))},arguments)},t.wbg.__wbindgen_string_get=function(e,r){let n=Ve(r),i=typeof n=="string"?n:void 0;var s=Lte(i)?0:gr(i,Ne.__wbindgen_malloc,Ne.__wbindgen_realloc),a=rr;Hr()[e/4+1]=a,Hr()[e/4+0]=s},t.wbg.__wbg_instanceof_Response_240e67e5796c3c6b=function(e){return Ve(e)instanceof Response},t.wbg.__wbg_url_0f503b904b694ff5=function(e,r){let n=Ve(r).url,i=gr(n,Ne.__wbindgen_malloc,Ne.__wbindgen_realloc),s=rr;Hr()[e/4+1]=s,Hr()[e/4+0]=i},t.wbg.__wbg_status_9067c6a4fdd064c9=function(e){return Ve(e).status},t.wbg.__wbg_headers_aa309e800cf75016=function(e){let r=Ve(e).headers;return et(r)},t.wbg.__wbg_arrayBuffer_ccd485f4d2929b08=function(){return Ur(function(e){let r=Ve(e).arrayBuffer();return et(r)},arguments)},t.wbg.__wbg_newwithstrandinit_de7c409ec8538105=function(){return Ur(function(e,r,n){let i=new Request(_o(e,r),Ve(n));return et(i)},arguments)},t.wbg.__wbg_randomFillSync_91e2b39becca6147=function(){return Ur(function(e,r,n){Ve(e).randomFillSync(VI(r,n))},arguments)},t.wbg.__wbg_getRandomValues_b14734aa289bc356=function(){return Ur(function(e,r){Ve(e).getRandomValues(Ve(r))},arguments)},t.wbg.__wbg_process_e56fd54cf6319b6c=function(e){let r=Ve(e).process;return et(r)},t.wbg.__wbindgen_is_object=function(e){let r=Ve(e);return typeof r=="object"&&r!==null},t.wbg.__wbg_versions_77e21455908dad33=function(e){let r=Ve(e).versions;return et(r)},t.wbg.__wbg_node_0dd25d832e4785d5=function(e){let r=Ve(e).node;return et(r)},t.wbg.__wbindgen_is_string=function(e){return typeof Ve(e)=="string"},t.wbg.__wbg_crypto_b95d7173266618a9=function(e){let r=Ve(e).crypto;return et(r)},t.wbg.__wbg_msCrypto_5a86d77a66230f81=function(e){let r=Ve(e).msCrypto;return et(r)},t.wbg.__wbg_static_accessor_NODE_MODULE_26b231378c1be7dd=function(){let e=module;return et(e)},t.wbg.__wbg_require_0db1598d9ccecb30=function(){return Ur(function(e,r,n){let i=Ve(e).require(_o(r,n));return et(i)},arguments)},t.wbg.__wbg_randomFillSync_d2ba53160aec6aba=function(e,r,n){Ve(e).randomFillSync(VI(r,n))},t.wbg.__wbg_getRandomValues_e57c9b75ddead065=function(e,r){Ve(e).getRandomValues(Ve(r))},t.wbg.__wbg_self_86b4b13392c7af56=function(){return Ur(function(){let e=self.self;return et(e)},arguments)},t.wbg.__wbg_crypto_b8c92eaac23d0d80=function(e){let r=Ve(e).crypto;return et(r)},t.wbg.__wbg_msCrypto_9ad6677321a08dd8=function(e){let r=Ve(e).msCrypto;return et(r)},t.wbg.__wbindgen_is_undefined=function(e){return Ve(e)===void 0},t.wbg.__wbg_static_accessor_MODULE_452b4680e8614c81=function(){let e=module;return et(e)},t.wbg.__wbg_require_f5521a5b85ad2542=function(e,r,n){let i=Ve(e).require(_o(r,n));return et(i)},t.wbg.__wbg_getRandomValues_dd27e6b0652b3236=function(e){let r=Ve(e).getRandomValues;return et(r)},t.wbg.__wbindgen_is_function=function(e){return typeof Ve(e)=="function"},t.wbg.__wbg_newnoargs_971e9a5abe185139=function(e,r){let n=new Function(_o(e,r));return et(n)},t.wbg.__wbg_next_726d1c2255989269=function(e){let r=Ve(e).next;return et(r)},t.wbg.__wbg_next_3d0c4cc33e7418c9=function(){return Ur(function(e){let r=Ve(e).next();return et(r)},arguments)},t.wbg.__wbg_done_e5655b169bb04f60=function(e){return Ve(e).done},t.wbg.__wbg_value_8f901bca1014f843=function(e){let r=Ve(e).value;return et(r)},t.wbg.__wbg_iterator_22ed2b976832ff0c=function(){return et(Symbol.iterator)},t.wbg.__wbg_get_72332cd2bc57924c=function(){return Ur(function(e,r){let n=Reflect.get(Ve(e),Ve(r));return et(n)},arguments)},t.wbg.__wbg_call_33d7bcddbbfa394a=function(){return Ur(function(e,r){let n=Ve(e).call(Ve(r));return et(n)},arguments)},t.wbg.__wbg_new_e6a9fecc2bf26696=function(){let e=new Object;return et(e)},t.wbg.__wbg_self_fd00a1ef86d1b2ed=function(){return Ur(function(){let e=self.self;return et(e)},arguments)},t.wbg.__wbg_window_6f6e346d8bbd61d7=function(){return Ur(function(){let e=window.window;return et(e)},arguments)},t.wbg.__wbg_globalThis_3348936ac49df00a=function(){return Ur(function(){let e=globalThis.globalThis;return et(e)},arguments)},t.wbg.__wbg_global_67175caf56f55ca9=function(){return Ur(function(){let e=global.global;return et(e)},arguments)},t.wbg.__wbg_call_65af9f665ab6ade5=function(){return Ur(function(e,r,n){let i=Ve(e).call(Ve(r),Ve(n));return et(i)},arguments)},t.wbg.__wbg_getTime_58b0bdbebd4ef11d=function(e){return Ve(e).getTime()},t.wbg.__wbg_new0_adda2d4bcb124f0a=function(){let e=new Date;return et(e)},t.wbg.__wbg_new_52205195aa880fc2=function(e,r){try{var n={a:e,b:r},i=o((a,f)=>{let d=n.a;n.a=0;try{return $te(d,n.b,a,f)}finally{n.a=d}},"cb0");let s=new Promise(i);return et(s)}finally{n.a=n.b=0}},t.wbg.__wbg_resolve_0107b3a501450ba0=function(e){let r=Promise.resolve(Ve(e));return et(r)},t.wbg.__wbg_then_18da6e5453572fc8=function(e,r){let n=Ve(e).then(Ve(r));return et(n)},t.wbg.__wbg_then_e5489f796341454b=function(e,r,n){let i=Ve(e).then(Ve(r),Ve(n));return et(i)},t.wbg.__wbg_buffer_34f5ec9f8a838ba0=function(e){let r=Ve(e).buffer;return et(r)},t.wbg.__wbg_newwithbyteoffsetandlength_88fdad741db1b182=function(e,r,n){let i=new Uint8Array(Ve(e),r>>>0,n>>>0);return et(i)},t.wbg.__wbg_new_cda198d9dbc6d7ea=function(e){let r=new Uint8Array(Ve(e));return et(r)},t.wbg.__wbg_set_1a930cfcda1a8067=function(e,r,n){Ve(e).set(Ve(r),n>>>0)},t.wbg.__wbg_length_51f19f73d6d9eff3=function(e){return Ve(e).length},t.wbg.__wbg_newwithlength_66e5530e7079ea1b=function(e){let r=new Uint8Array(e>>>0);return et(r)},t.wbg.__wbg_subarray_270ff8dd5582c1ac=function(e,r,n){let i=Ve(e).subarray(r>>>0,n>>>0);return et(i)},t.wbg.__wbg_has_3be27932089d278e=function(){return Ur(function(e,r){return Reflect.has(Ve(e),Ve(r))},arguments)},t.wbg.__wbg_set_2762e698c2f5b7e0=function(){return Ur(function(e,r,n){return Reflect.set(Ve(e),Ve(r),Ve(n))},arguments)},t.wbg.__wbg_stringify_d8d1ee75d5b55ce4=function(){return Ur(function(e){let r=JSON.stringify(Ve(e));return et(r)},arguments)},t.wbg.__wbindgen_debug_string=function(e,r){let n=hv(Ve(r)),i=gr(n,Ne.__wbindgen_malloc,Ne.__wbindgen_realloc),s=rr;Hr()[e/4+1]=s,Hr()[e/4+0]=i},t.wbg.__wbindgen_throw=function(e,r){throw new Error(_o(e,r))},t.wbg.__wbindgen_memory=function(){let e=Ne.memory;return et(e)},t.wbg.__wbindgen_closure_wrapper9508=function(e,r,n){let i=Ute(e,r,2773,qte);return et(i)},t}o(Hte,"getImports");function Vte(t,e){return Ne=t.exports,oD.__wbindgen_wasm_module=e,K1=new Int32Array,V1=new Uint8Array,Ne}o(Vte,"finalizeInit");async function oD(t){typeof t>"u"&&(t=new URL("didkit_wasm_bg.wasm",zte.url));let e=Hte();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));let{instance:r,module:n}=await jte(await t,e);return Vte(r,n)}o(oD,"init");var sD=oD;var aD=!1,Kte=o(async(t="https://cdn.filestackcontent.com/mg9PANmSiRzqPDfNluAa")=>{if(!aD)return aD=!0,sD(t)},"init"),cD=Kte;var hh=o(async t=>{await cD(t);let e={};return{name:"DIDKit",displayName:"DIDKit",description:"Provides an interface to DIDKit, which allows for the generation of key material, as well as signing and verifying credentials and presentations",methods:{generateEd25519KeyFromBytes:(r,n)=>JSON.parse(YI(n)),generateSecp256k1KeyFromBytes:(r,n)=>JSON.parse(JI(n)),keyToDid:(r,n,i)=>{let s=e[n];if(!s){let a=XI(n,JSON.stringify(i));return e[n]=a,a}return s},keyToVerificationMethod:async(r,n,i)=>ZI(n,JSON.stringify(i)),didToVerificationMethod:async(r,n)=>QI(n),issueCredential:async(r,n,i,s)=>JSON.parse(await eD(JSON.stringify(n),JSON.stringify(i),JSON.stringify(s))),verifyCredential:async(r,n,i={})=>JSON.parse(await tD(JSON.stringify(n),JSON.stringify(i))),issuePresentation:async(r,n,i,s)=>{let a=i.proofFormat==="jwt",f=await rD(JSON.stringify(n),JSON.stringify(i),JSON.stringify(s));return a?f:JSON.parse(f)},verifyPresentation:async(r,n,i={})=>{let s=typeof n=="string";return JSON.parse(await nD(s?n:JSON.stringify(n),JSON.stringify(i)))},contextLoader:async(r,n)=>JSON.parse(await iD(n)),resolveDid:async(r,n,i={})=>JSON.parse(await GI(n,JSON.stringify(i))),didResolver:async(r,n,i={})=>JSON.parse(await KI(n,JSON.stringify(i)))}}},"getDidKitPlugin");var sf=o(t=>({name:"Expiration",displayName:"Expiration Extension",description:"Adds a check to make sure credentials aren't expired when verifying them",methods:{verifyCredential:async(e,r)=>{let n=await t.invoke.verifyCredential(r);return r.expirationDate&&new Date>new Date(r.expirationDate)?n.errors.push("expiration error: Credential is expired"):n.checks.push("expiration"),n}}}),"expirationPlugin");var pv={basic:({did:t="did:example:d23dd687a7dc6787646f2eb98d0",subject:e="did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:r="2020-08-19T21:41:50Z"}={})=>({"@context":["https://www.w3.org/2018/credentials/v1"],id:"http://example.org/credentials/3731",type:["VerifiableCredential"],issuer:t,issuanceDate:r,credentialSubject:{id:e}}),achievement:({did:t="did:example:d23dd687a7dc6787646f2eb98d0",subject:e="did:example:d23dd687a7dc6787646f2eb98d0",name:r="Teamwork Badge",achievementName:n="Teamwork",description:i="This badge recognizes the development of the capacity to collaborate within a group environment.",criteriaNarrative:s="Team members are nominated for this badge by their peers and recognized upon review by Example Corp management.",issuanceDate:a="2020-08-19T21:41:50Z"}={})=>({"@context":["https://www.w3.org/2018/credentials/v1","https://purl.imsglobal.org/spec/ob/v3p0/context.json"],id:"http://example.com/credentials/3527",type:["VerifiableCredential","OpenBadgeCredential"],issuer:t,issuanceDate:a,name:r,credentialSubject:{id:e,type:["AchievementSubject"],achievement:{id:"https://example.com/achievements/21st-century-skills/teamwork",type:["Achievement"],criteria:{narrative:s},description:i,name:n}}}),jff2:({did:t="did:example:d23dd687a7dc6787646f2eb98d0",subject:e="did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:r="2020-08-19T21:41:50Z"}={})=>({"@context":["https://www.w3.org/2018/credentials/v1","https://purl.imsglobal.org/spec/ob/v3p0/context.json","https://w3id.org/security/suites/ed25519-2020/v1"],id:"urn:uuid:a63a60be-f4af-491c-87fc-2c8fd3007a58",type:["VerifiableCredential","OpenBadgeCredential"],name:"JFF x vc-edu PlugFest 2 Interoperability",issuer:{type:["Profile"],id:t,name:"Jobs for the Future (JFF)",image:{id:"https://w3c-ccg.github.io/vc-ed/plugfest-1-2022/images/JFF_LogoLockup.png",type:"Image"}},issuanceDate:r,credentialSubject:{type:["AchievementSubject"],id:e,achievement:{id:"urn:uuid:bd6d9316-f7ae-4073-a1e5-2f7f5bd22922",type:["Achievement"],name:"JFF x vc-edu PlugFest 2 Interoperability",description:"This credential solution supports the use of OBv3 and w3c Verifiable Credentials and is interoperable with at least two other solutions. This was demonstrated successfully during JFF x vc-edu PlugFest 2.",criteria:{narrative:"Solutions providers earned this badge by demonstrating interoperability between multiple providers based on the OBv3 candidate final standard, with some additional required fields. Credential issuers earning this badge successfully issued a credential into at least two wallets. Wallet implementers earning this badge successfully displayed credentials issued by at least two different credential issuers."},image:{id:"https://w3c-ccg.github.io/vc-ed/plugfest-2-2022/images/JFF-VC-EDU-PLUGFEST2-badge-image.png",type:"Image"}}}}),boost:({did:t="did:example:d23dd687a7dc6787646f2eb98d0",subject:e="did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:r="2020-08-19T21:41:50Z",expirationDate:n,boostName:i="Example Boost",boostId:s="urn:uuid:boost:example:555",boostImage:a,achievementId:f="urn:uuid:123",achievementType:d="Influencer",achievementName:h="Awesome Badge",achievementDescription:p="Awesome People Earn Awesome Badge",achievementNarrative:y="Earned by being awesome.",achievementImage:I="",attachments:T,display:D}={})=>({"@context":["https://www.w3.org/2018/credentials/v1","https://purl.imsglobal.org/spec/ob/v3p0/context.json",{type:"@type",xsd:"https://www.w3.org/2001/XMLSchema#",lcn:"https://docs.learncard.com/definitions#",BoostCredential:{"@id":"lcn:boostCredential","@context":{boostId:{"@id":"lcn:boostId","@type":"xsd:string"},display:{"@id":"lcn:boostDisplay","@context":{backgroundImage:{"@id":"lcn:boostBackgroundImage","@type":"xsd:string"},backgroundColor:{"@id":"lcn:boostBackgroundColor","@type":"xsd:string"}}},image:{"@id":"lcn:boostImage","@type":"xsd:string"},attachments:{"@id":"lcn:boostAttachments","@container":"@set","@context":{type:{"@id":"lcn:boostAttachmentType","@type":"xsd:string"},title:{"@id":"lcn:boostAttachmentTitle","@type":"xsd:string"},url:{"@id":"lcn:boostAttachmentUrl","@type":"xsd:string"}}}}}}],type:["VerifiableCredential","OpenBadgeCredential","BoostCredential"],issuer:t,issuanceDate:r,name:i,expirationDate:n,credentialSubject:{id:e,type:["AchievementSubject"],achievement:{id:f,type:["Achievement"],achievementType:d,name:h,description:p,image:I,criteria:{narrative:y}}},display:D,image:a,attachments:T})};var Na=o(()=>({name:"VC Templates",displayName:"VC Templates",description:"Allows for the easy creation of VCs and VPs based on predefined templates",methods:{newCredential:(t,e={type:"basic"})=>{let r=e.did||t.id.did();if(!r)throw new Error("Could not get issuer did!");let n={did:r,subject:"did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:"2020-08-19T21:41:50Z"},{type:i="basic",...s}=e;if(!(i in pv))throw new Error("Invalid Test VC Type!");return pv[i]({...n,...s})},newPresentation:async(t,e,r={})=>{let n=r?.did||t.id.did();if(!n)throw new Error("Could not get issuer did!");return{"@context":["https://www.w3.org/2018/credentials/v1"],type:["VerifiablePresentation"],holder:n,verifiableCredential:e}}}}),"getVCTemplatesPlugin");var mv={ParseError:{message:"Parse error",code:-32700},InvalidRequest:{message:"Invalid Request",code:-32600},MethodNotFound:{message:"Method not found",code:-32601},InvalidParams:{message:"Invalid params",code:-32602},InternalError:{message:"Internal Error",code:-32603},ServerError:{message:"Server error",code:-32e3}};function La(t,e){if(e===void 0&&(e=window.location.href),typeof URL=="function")return new URL(t,e);if(typeof t!="string")throw new TypeError('"url" must be a string.');t.includes(":")||(e.startsWith("http")&&!t.startsWith("/")?t=e+"/"+t:t=e+t);let r=document.createElement("a");r.href=t;let n=(r.protocol||window.location.protocol)+"//";r.host?r.protocol==="http:"&&r.port==="80"||r.protocol==="https:"&&r.port==="443"?n+=r.hostname:n+=r.host:n+=window.location.host;let i=r.pathname;return i.startsWith("/")||(i="/"+i),{host:r.host||window.location.host,hostname:r.hostname,origin:n,protocol:r.protocol,pathname:i}}o(La,"parseUrl");function fD(t,e){for(e=t="";t++<36;e+=t*51&52?(t^15?8^Math.random()*(t^20?16:4):4).toString(16):"-");return e}o(fD,"uuidv4");function uD(t){return t&&typeof t=="object"&&t.jsonrpc==="2.0"&&t.id&&typeof t.id=="string"}o(uD,"isValidMessage");function Gte(t){return uD(t)&&Array.isArray(t.params)}o(Gte,"isValidRequest");function Wte(t){return uD(t)&&!!("result"in t^"error"in t)&&(!("error"in t)||Yte(t.error))}o(Wte,"isValidResponse");function Yte(t){return t&&typeof t=="object"&&typeof t.code=="number"&&typeof t.message=="string"}o(Yte,"isValidError");function dD(t){let e={message:t.message};return t.constructor.name!=="Error"&&(e.constructor=t.constructor.name),"name"in t&&(e.name=t.name),"code"in t?e.code=t.code:e.code=mv.ServerError.code,"details"in t&&(e.details=t.details),e}o(dD,"serializeError");function lD(t){let e;return t.constructor==="DOMException"?e=new DOMException(t.message,t.name):(e=new Error(t.message),"code"in t&&(e.code=t.code)),t.details&&(e.details=t.details),e}o(lD,"deserializeError");function G1({listener:t,origin:e,handle:r,expectRequest:n}){if(td(r)){let i=r;r=!1,i.then(s=>r=s)}return i=>{!(i.source===r&&i.origin===e&&(n&&Gte(i.data)||!n&&Wte(i.data)))||t(i.data,i)}}o(G1,"createMessageListener");function hD(t){let[e,...r]=t.split("."),n=r.pop();return e=[e,...r].join("."),{name:e,method:n}}o(hD,"destructureMethodName");function td(t){try{return typeof t.then=="function"}catch{}return!1}o(td,"isHandlePromise");var Jte=3e4,Ua=class{constructor(){this.origin=null,this._handle=null,this._listener=null,this._pending=new Map}async connect(e,r){if(this._listener)throw new Error("Already connected.");r=r||{};let n=this;n.origin=La(e).origin,n._handle=r.handle||window.opener||window.parent;let i=n._pending;return n._listener=G1({origin:n.origin,handle:n._handle,expectRequest:!1,listener:s=>{if(!i.has(s.id))return;let{resolve:a,reject:f,cancelTimeout:d}=i.get(s.id);if(d(),"result"in s)return a(s.result);f(lD(s.error))}}),window.addEventListener("message",n._listener),new W1(n)}async send(e,r,{timeout:n=Jte}){if(!this._listener)throw new Error("RPC client not connected.");let i=this,s={jsonrpc:"2.0",id:fD(),method:e,params:r};return td(i._handle)?(await i._handle).postMessage(s,i.origin):i._handle.postMessage(s,i.origin),new Promise((a,f)=>{let d=i._pending,h;if(n>0){let p=setTimeout(()=>{d.delete(s.id),f(new Error("RPC call timed out."))},n);h=o(()=>{d.delete(s.id),clearTimeout(p)},"cancelTimeout")}else h=o(()=>{d.delete(s.id)},"cancelTimeout");d.set(s.id,{resolve:a,reject:f,cancelTimeout:h})})}close(){if(this._listener){window.removeEventListener("message",this._listener),this._handle=this.origin=this._listener=null;for(let e of this._pending.values())e.reject(new Error("RPC client closed."));this._pending=new Map}}};o(Ua,"Client");var W1=class{constructor(e){this.client=e,this._apis=new Map}define(e,r){if(!(e&&typeof e=="string"))throw new TypeError("`name` must be a non-empty string.");if(!(r&&typeof r=="object"&&Array.isArray(r.functions)))throw new TypeError("`definition.function` must be an array of function names or function definition objects to be defined.");let n=this,i={};return r.functions.forEach(s=>{typeof s=="string"&&(s={name:s,options:{}}),i[s.name]=async function(){return n.client.send(e+"."+s.name,[...arguments],s.options)}}),n._apis[e]=i,i}get(e,r){if(!this._apis[e]){if(r)return this.define(e,r);throw new Error(`API "${e}" has not been defined.`)}return this._apis[e]}};o(W1,"Injector");var rd=class{constructor({deserialize:e=o(n=>n,"deserialize"),waitUntil:r=o(async()=>{},"waitUntil")}={}){this._listeners=[],this._deserialize=e,this._waitUntil=r}async emit(e){return e=this._deserialize(e),(this._listeners[e.type]||[]).forEach(r=>r(e)),this._waitUntil(e)}addEventListener(e,r){this._listeners[e]?this._listeners[e].push(r):this._listeners[e]=[r]}removeEventListener(e,r){let n=this._listeners[e];if(!n)return;let i=n.indexOf(r);i!==-1&&n.splice(i,1)}};o(rd,"EventEmitter");var qa=class{constructor(){this.origin=null,this._handle=null,this._apis=new Map}define(e,r){if(!(e&&typeof e=="string"))throw new TypeError("`name` must be a non-empty string.");if(!(r&&r!=="object"))throw new TypeError("`api` must be an object.");if(e in this._apis)throw new Error(`The "${e}" API is already defined.`);this._apis[e]=r}async listen(e,r){if(this._listener)throw new Error("Already listening.");r=r||{};let n=this;n.origin=La(e).origin,n._handle=r.handle||window.opener||window.parent;let i=r.ignoreUnknownApi==="true"||!1;n._listener=G1({origin:n.origin,handle:n._handle,expectRequest:!0,listener:s=>{let{name:a,method:f}=hD(s.method),d=n._apis[a];if(f&&f.startsWith("_"))return pD(n._handle,n.origin,s);if(!d&&i)return;if(!d||typeof d[f]!="function")return pD(n._handle,n.origin,s);let h=d[f];(async()=>{let p={jsonrpc:"2.0",id:s.id};try{p.result=await h.apply(d,s.params)}catch(y){p.error=dD(y)}n._handle&&(td(n._handle)?n._handle.then(y=>y.postMessage(p,n.origin)):n._handle.postMessage(p,n.origin))})()}}),window.addEventListener("message",n._listener)}close(){this._listener&&(window.removeEventListener("message",this._listener),this._handle=this.origin=this._listener=null)}};o(qa,"Server");function pD(t,e,r){let n={jsonrpc:"2.0",id:r.id,error:Object.assign({},mv.MethodNotFound)};return td(t)?t.then(i=>i.postMessage(n,e)):t.postMessage(n,e)}o(pD,"sendMethodNotFound");var $a=class{constructor(e){this.relyingOrigin=La(e).origin,this.client=null,this.injector=null,this.client=new Ua,this.server=new qa,this._control=null,this._connected=!1}async connect(){return this.injector=await this.client.connect(this.relyingOrigin),this._connected=!0,this._control=this.injector.define("core.control",{functions:["ready","show","hide"]}),this.server.listen(this.relyingOrigin),this.injector}async ready(){if(!this._connected)throw new Error('WebApp not connected. Did you call ".connect()"?');return await this._control.ready(),this}close(){this._connected&&(this.server.close(),this.client.close(),this._connected=!1)}async show(){if(!this._connected)throw new Error('Cannot "show" yet; not connected. Did you call ".connect()"?');return this._control.show()}async hide(){if(!this._connected)throw new Error('Cannot "hide" yet; not connected. Did you call ".connect()?"');return this._control.hide()}};o($a,"WebApp");var af=class{constructor(){this._closeEventListeners=new Set}addEventListener(e,r){if(e!=="close")throw new Error(`Unknown event "${e}".`);if(typeof r!="function")throw new TypeError('"listener" must be a function.');this._closeEventListeners.add(r)}removeEventListener(e,r){if(e!=="close")throw new Error(`Unknown event "${e}".`);if(typeof r!="function")throw new TypeError('"listener" must be a function.');this._closeEventListeners.delete(r)}show(){}close(){for(let e of this._closeEventListeners)e({})}destroy(){this._closeEventListeners.clear()}};o(af,"WebAppWindowDialog");var ph=class extends af{constructor({url:e,handle:r,className:n}){super(),this.url=e,this.handle=r,this.dialog=document.createElement("dialog"),bv(this.dialog,{position:"fixed",top:0,left:0,width:"100%",height:"100%","max-width":"100%","max-height":"100%",display:"none",margin:0,padding:0,border:"none",background:"transparent",color:"black","box-sizing":"border-box",overflow:"hidden","user-select":"none","z-index":1e6}),this.dialog.className="web-app-window",typeof n=="string"&&(this.dialog.className=this.dialog.className+" "+n);let i=document.createElement("style");i.appendChild(document.createTextNode(`dialog.web-app-window::backdrop {
|
653
|
-
background-color: transparent;
|
654
|
-
}`)),this.container=document.createElement("div"),bv(this.container,{position:"relative",width:"100%",height:"100%",margin:0,padding:0,display:"flex","flex-direction":"column"}),this.container.className="web-app-window-backdrop",this.iframe=document.createElement("iframe"),this.iframe.src=e,this.iframe.scrolling="auto",bv(this.iframe,{position:"fixed",top:0,left:0,width:"100%",height:"100%",border:"none",background:"transparent",overflow:"hidden",margin:0,padding:0,"flex-grow":1,"user-select":"none"}),this.dialog.appendChild(i),this.container.appendChild(this.iframe),this.dialog.appendChild(this.container),this.dialog.addEventListener("cancel",s=>{s.preventDefault(),this.hide()}),document.body.appendChild(this.dialog),this.handle=this.iframe.contentWindow}show(){this.dialog.style.display="block",this.dialog.showModal&&this.dialog.showModal();try{this.dialog.style.pointerEvents="none"}catch{}setTimeout(()=>{try{this.dialog.style.pointerEvents=""}catch{}},32)}close(){if(this.dialog.style.display="none",this.dialog.close)try{this.dialog.close()}catch(e){console.error(e)}super.close()}destroy(){this.dialog.parentNode.removeChild(this.dialog),super.destroy()}};o(ph,"WebAppWindowInlineDialog");function bv(t,e){for(let r in e)t.style[r]=e[r]}o(bv,"applyStyle");var mh=class extends af{constructor({url:e,handle:r,bounds:n={width:500,height:400}}){super(),this.url=e,this.handle=r,this._locationChanging=!1,r||this._openWindow({url:e,name:"web-app-window",bounds:n}),this.destroyed=!1,this._removeListeners=()=>{}}show(){}close(){this.destroy()}destroy(){this.handle&&!this.destroyed&&(this.handle.close(),super.close(),this.handle=null,this.destroyed=!0,this._removeListeners(),super.destroy())}isClosed(){return!this.handle||this.handle.closed}_openWindow({url:e,name:r,bounds:n}){let{x:i,y:s}=n,{width:a=500,height:f=400}=n;a=Math.min(a,window.innerWidth),f=Math.min(f,window.innerHeight);let d=Math.floor(i!==void 0?i:window.screenX+(window.innerWidth-a)/2),h=Math.floor(s!==void 0?s:window.screenY+(window.innerHeight-f)/2),p=`popup=yes,menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${a},height=${f},left=${d},top=${h}`;this._locationChanging=!0,this.handle=window.open(e,r,p),this._addListeners()}setLocation(e){this.url=e,this._locationChanging=!0,this.handle.location.replace(e)}_addListeners(){let e=o(()=>this.destroy(),"destroyDialog"),r=o(()=>{this._locationChanging=!1},"loadDialog"),n=o(()=>{this._locationChanging||this.destroy()},"unloadDialog");this.handle.addEventListener("unload",n),this.handle.addEventListener("load",r),window.addEventListener("beforeUnload",e,{once:!0});let i=setInterval(()=>{this.isClosed()&&(this.destroy(),clearInterval(i))},250);this._removeListeners=()=>{clearInterval(i),this.handle.removeListener("unload",n),this.handle.removeListener("load",r),window.removeEventListener("beforeUnload",e)}}};o(mh,"WebAppWindowPopupDialog");var Xte=6e4,es=class{constructor(e,{timeout:r=Xte,dialog:n=null,handle:i,popup:s=!1,className:a=null,customize:f=null,bounds:d}={}){if(this.visible=!1,this.dialog=n,this.handle=null,this.popup=s,this.windowControl=null,this._destroyed=!1,this._ready=!1,this._private={},this._timeoutId=null,i&&i._dialog&&(this.dialog=n=i._dialog),this._private._readyPromise=new Promise((h,p)=>{this._timeoutId=setTimeout(()=>p(new DOMException("Loading Web application window timed out.","TimeoutError")),r),this._private._resolveReady=y=>{clearTimeout(this.timeoutId),this._timeoutId=null,h(y)},this._private._rejectReady=y=>{clearTimeout(this.timeoutId),this._timeoutId=null,p(y)}}),this._private.isReady=async()=>this._private._readyPromise,this._private.destroy=()=>{this._timeoutId&&this._private._rejectReady(new DOMException("Web application window closed before ready.","AbortError")),this._destroyed||(this.dialog.destroy(),this.dialog=null,this._destroyed=!0)},f&&!typeof f==="function")throw new TypeError("`options.customize` must be a function.");if(this.dialog||(this.popup?this.dialog=new mh({url:e,handle:i,bounds:d}):this.dialog=new ph({url:e,handle:i,className:a})),this.popup&&d){let{x:h,y:p,width:y=500,height:I=400}=d;y=Math.min(y,window.innerWidth),I=Math.min(I+30,window.innerHeight),h=Math.floor(h!==void 0?h:window.screenX+(window.innerWidth-y)/2),p=Math.floor(p!==void 0?p:window.screenY+(window.innerHeight-I)/2+15),this.dialog.handle.resizeTo(y,I),this.dialog.handle.moveTo(h,p)}if(this.handle=this.dialog.handle,f)try{f({dialog:this.dialog.dialog,container:this.dialog.container,iframe:this.dialog.iframe,webAppWindow:this})}catch(h){console.error(h)}}ready(){this._ready=!0,this._private._resolveReady(!0)}show(){if(!this.visible){this.visible=!0;let e=document.querySelector("body");this._bodyOverflowStyle=e.style.overflow,e.style.overflow="hidden",this._destroyed?this.windowControl.show&&this.windowControl.show():this.dialog.show()}}hide(){if(this.visible){this.visible=!1;let e=document.querySelector("body");this._bodyOverflowStyle?e.style.overflow=this._bodyOverflowStyle:e.style.overflow="",this._destroyed?this.windowControl.hide&&this.windowControl.hide():this.dialog.close()}}};o(es,"WebAppWindow");var Zte=1e4,ja=class{constructor(){this.client=new Ua,this.server=new qa,this.injector=null,this.control=null,this.loaded=!1,this.closed=!1}async createWindow(e,{timeout:r=Zte,iframe:n,dialog:i=null,popup:s=!1,handle:a,windowControl:f,className:d,customize:h,bounds:p}={}){if(this.loaded)throw new Error("AppContext already loaded.");this.loaded=!0,this.control=new es(e,{timeout:r,dialog:i,iframe:n,popup:s,handle:a,windowControl:f,className:d,customize:h,bounds:p}),window.addEventListener("pagehide",()=>this.close(),{once:!0}),this.server.define("core.control",this.control);let y=La(e).origin;return this.server.listen(y,{handle:this.control.handle,ignoreUnknownApi:!0}),await this.control._private.isReady(),this.injector=await this.client.connect(y,{handle:this.control.handle}),this.injector}close(){this.closed||(this.closed=!0,this.control._private.destroy(),this.server.close(),this.client.close())}};o(ja,"WebAppContext");var gh=class{constructor({credentialHandler:e,credentialRequestOrigin:r,credentialRequestOptions:n,hintKey:i}){this.type="credentialrequest",this._credentialHandler=e,this.credentialRequestOrigin=r,this.credentialRequestOptions=n,this.hintKey=i}async openWindow(e){await this._credentialHandler.show();let r=new es(e,{className:"credential-handler"});return r.ready(),r.show(),r.handle._dialog=r.dialog,r.handle}respondWith(e){this._promise=e}};o(gh,"CredentialRequestEvent");var bh=class{constructor({credentialHandler:e,credentialRequestOrigin:r,credential:n,hintKey:i}){this.type="credentialstore",this._credentialHandler=e,this.credentialRequestOrigin=r,this.credential=n,this.hintKey=i}async openWindow(e){await this._credentialHandler.show();let r=new es(e);return r.ready(),r.show(),r.handle._dialog=r.dialog,r.handle}respondWith(e){this._promise=e}};o(bh,"CredentialStoreEvent");var vh=class{constructor(e){this._credentialHandler=e}async request(e){return await this._credentialHandler._emitter.emit(new gh(Object.assign({credentialHandler:this._credentialHandler},e)))}async store(e){return await this._credentialHandler._emitter.emit(new bh(Object.assign({credentialHandler:this._credentialHandler},e)))}};o(vh,"CredentialHandlerService");var mD=["credentialrequest","credentialstore"],yh=class extends $a{constructor(e,r=!1){if(typeof e!="string")throw new TypeError('"mediatorOrigin" must be a string.');super(e,r),this._emitter=new rd({async waitUntil(n){return n._promise||Promise.reject(new DOMException('No "credentialrequest" event handler found.',"NotFoundError"))}})}async connect(){let e=await super.connect();return this.server.define("credentialHandler",new vh(this)),await this.ready(),e}addEventListener(e,r){if(!mD.includes(e))throw new DOMException(`Unsupported event type "${e}"`,"NotSupportedError");return this._emitter.addEventListener(e,r)}removeEventListener(e,r){if(!mD.includes(e))throw new DOMException(`Unsupported event type "${e}"`,"NotSupportedError");return this._emitter.removeEventListener(e,r)}};o(yh,"CredentialHandler");var xh=class{constructor(e,r){let n=r.get("credentialHints",{functions:["delete","get","keys","has","set","clear"]});for(let i in n)if(i!=="set"){let s=n[i].bind(this,e);this[i]=function(...a){return this._deprecateNotice(),s(...a)}}this._remoteSet=n.set.bind(this,e)}async set(e,r){this._deprecateNotice(),r.icons=r.icons||[];let n=r.icons.map(i=>Qte(i.src).then(s=>{i.fetchedImage=s}));return await Promise.all(n),this._remoteSet(e,r)}_deprecateNotice(){console.warn("Credential hints are deprecated and no longer used.")}};o(xh,"CredentialHints");function Qte(t){return new Promise(e=>{let r=new Image;r.crossOrigin="Anonymous",r.onload=()=>{let n=document.createElement("canvas"),i=n.getContext("2d");n.height=r.height,n.width=r.width,i.drawImage(r,0,0);let s=n.toDataURL();e(s),n=null},r.onerror=()=>e(null),r.src=t})}o(Qte,"imageToDataUrl");var Ha=class{constructor(e,r){if(!(e&&typeof e=="string"))throw new TypeError('"url" must be a non-empty string.');this.hints=new xh(e,r)}static async requestPermission(){return(await navigator.credentialsPolyfill.permissions.request({name:"credentialhandler"})).state}};o(Ha,"CredentialManager");var nd=class{constructor(e,r){if(!(e&&typeof e=="string"))throw new TypeError('"url" must be a non-empty string.');this.credentialManager=new Ha(e,r)}};o(nd,"CredentialHandlerRegistration");var wh=class{constructor(e){this._init=(async()=>{this._injector=await e,this._remote=this._injector.get("credentialHandlers",{functions:["register","unregister","getRegistration","hasRegistration"]})})()}async register(e){return this._deprecateNotice(),await this._init,e=await this._remote.register("credential",e),new nd(e,this._injector)}async unregister(e){return this._deprecateNotice(),await this._init,this._remote.unregister("credential",e)}async getRegistration(e){return this._deprecateNotice(),await this._init,e=await this._remote.getRegistration("credential",e),e?new nd(e,this._injector):null}async hasRegistration(e){return this._deprecateNotice(),await this._init,await this._remote.hasRegistration("credential",e)}_deprecateNotice(){console.warn('Credential handler registration APIs are deprecated. The credential handler specified in "manifest.json" is now automatically registered when a user grants permission to install a credential handler via "CredentialManager.requestPermission()".')}};o(wh,"CredentialHandlers");var ts=class{constructor(e,r,{recommendedHandlerOrigins:n=[]}={}){if(typeof e!="string")throw new TypeError('"dataType" must be a string.');this.type="web",this.dataType=e,this.data=r,this.options={recommendedHandlerOrigins:n}}};o(ts,"WebCredential");var ere=0,tre=0,_h=class{constructor(e){this._nativeCredentialsContainer={get:navigator.credentials&&navigator.credentials.get&&navigator.credentials.get.bind(navigator.credentials),store:navigator.credentials&&navigator.credentials.store&&navigator.credentials.store.bind(navigator.credentials)},this._init=(async()=>{this._remote=(await e).get("credentialsContainer",{functions:[{name:"get",options:{timeout:ere}},{name:"store",options:{timeout:tre}}]})})()}async get(e={}){if(e.web){await this._init;let r=await this._remote.get(e);return r?new ts(r.dataType,r.data):null}if(this._nativeCredentialsContainer.get)return this._nativeCredentialsContainer.get(e);throw new DOMException("Not implemented.","NotSupportedError")}async store(e){if(e instanceof ts){await this._init;let r=await this._remote.store(e);return r?new ts(r.dataType,r.data):null}if(this._nativeCredentialsContainer.store)return this._nativeCredentialsContainer.store(e);throw new DOMException("Not implemented.","NotSupportedError")}};o(_h,"CredentialsContainer");var Eh=class{constructor(e){this._init=(async()=>{this._remote=(await e).get("permissionManager",{functions:["query",{name:"request",options:{timeout:0}},"revoke"]})})()}async query(e){return await this._init,await this._remote.query(e)}async request(e){return await this._init,await this._remote.request(e)}async revoke(e){return await this._init,await this._remote.revoke(e)}};o(Eh,"PermissionManager");var rre="https://authn.io";var vv;async function gD(t){return vv||(vv=!0,nre(t))}o(gD,"loadOnce");async function nre(t={mediatorOrigin:rre}){ire();let e;if(typeof t=="string")e=t;else if(t&&typeof t=="object"&&typeof t.mediatorOrigin=="string")e=`${t.mediatorOrigin}/mediator`;else throw new Error('"options.mediatorOrigin" must be a string expressing the origin of the mediator.');let n=new ja().createWindow(e,{className:"credential-mediator",timeout:3e4}),i=document.createElement("style");i.appendChild(document.createTextNode(`dialog.web-app-window.credential-mediator > .web-app-window-backdrop {
|
655
|
-
background-color: rgba(0, 0, 0, 0.25);
|
656
|
-
}`)),document.body.appendChild(i);let s={};return s.permissions=new Eh(n),s.CredentialHandlers=new wh(n),s.CredentialHandler=yh,s.CredentialManager=Ha,s.credentials=new _h(n),s.WebCredential=ts,navigator.credentialsPolyfill=s,"credentials"in navigator?(navigator.credentials.get=s.credentials.get.bind(s.credentials),navigator.credentials.store=s.credentials.store.bind(s.credentials)):navigator.credentials=s.credentials,window.CredentialManager=Ha,window.WebCredential=ts,s}o(nre,"load");function ire(){if(!window.isSecureContext)throw new DOMException("SecurityError","The operation is insecure.")}o(ire,"_assertSecureContext");var ore=6e4,Ah=class extends $a{constructor(){super(window.location.origin)}async receive(){let e=this;return await e.connect(),new Promise((r,n)=>{let i=setTimeout(()=>{n(new Error("Timed out waiting to receive event."))},ore);e.server.define("credentialEventProxy",{async send(s){return r(s),clearTimeout(i),new Promise((a,f)=>{s.respondWith=d=>{try{a(d)}catch(h){f(h)}}})}}),e.ready()})}};o(Ah,"CredentialEventProxy");var sre="https://authn.io";async function vD(){if(await navigator.credentialsPolyfill.CredentialManager.requestPermission()!=="granted")throw new Error("Permission denied.")}o(vD,"installHandler");async function yD({mediatorOrigin:t=sre,get:e,store:r}){if(!(e||r))throw new Error('"get" or "store" function(s) must be specified.');let n=navigator.credentialsPolyfill.CredentialHandler,i=new n(t);if(e){if(typeof e!="function")throw new TypeError('"get" must be a function.');i.addEventListener("credentialrequest",s=>bD({event:s,get:e}))}if(r){if(typeof r!="function")throw new TypeError('"store" must be a function.');i.addEventListener("credentialstore",s=>bD({event:s,store:r}))}await i.connect()}o(yD,"activateHandler");async function xD(){return new Ah().receive()}o(xD,"receiveCredentialEvent");function bD({event:t,get:e,store:r}){t.respondWith(are({event:t,get:e,store:r}))}o(bD,"listener");async function are({event:t,get:e,store:r}){let n=await(e||r)({event:t});if(!(n&&typeof n=="object"))throw new TypeError('Return value of "get" or "store" hook must be an object.');if(n.type==="response")return{dataType:n.dataType,data:n.data};if(n.type==="redirect"){let i=new ja,s=await t.openWindow(n.url);return(await i.createWindow(n.url,{handle:s,popup:!1,timeout:6e5})).get("credentialEventProxy",{functions:[{name:"send",options:{timeout:0}}]}).send({type:t.type,credentialRequestOptions:t.credentialRequestOptions,credentialRequestOrigin:t.credentialRequestOrigin,credential:t.credential,hintKey:t.hintKey})}throw new Error('Return value of "get" or "store" must have a type of "response" or "redirect".')}o(are,"createResponse");var Va=o(async()=>typeof window>"u"?{name:"CHAPI",methods:{installChapiHandler:async()=>{throw new Error("CHAPI is only available inside of a browser!")},activateChapiHandler:async()=>{throw new Error("CHAPI is only available inside of a browser!")},receiveChapiEvent:async()=>{throw new Error("CHAPI is only available inside of a browser!")},storeCredentialViaChapiDidAuth:async()=>{throw new Error("CHAPI is only available inside of a browser!")},storePresentationViaChapi:async()=>{throw new Error("CHAPI is only available inside of a browser!")}}}:(await gD(),{name:"CHAPI",displayName:"CHAPI",description:"Credential Handler API. Allows sending/retrieving credentials across wallets and issuers",methods:{installChapiHandler:async()=>vD(),activateChapiHandler:async(t,{mediatorOrigin:e=`https://authn.io/mediator?${encodeURIComponent(window.location.origin)}`,get:r,store:n})=>yD({mediatorOrigin:e,get:r,store:n}),receiveChapiEvent:async()=>xD(),storeCredentialViaChapiDidAuth:async(t,e)=>{let r=crypto.randomUUID(),n=window.location.origin,i={web:{VerifiablePresentation:{query:{type:"DIDAuthentication"},challenge:r,domain:n}}},s=await navigator.credentials.get(i);if(!s)return{success:!1,reason:"did not auth"};let a=await t.invoke.verifyPresentation(s.data,{challenge:r,domain:n,proofPurpose:"authentication"});if(a.warnings.length>0||a.errors.length>0)return{success:!1,reason:"auth failed verification"};let f=s.data?.proof?.verificationMethod?.split("#")[0];Array.isArray(e.credentialSubject)||(e.credentialSubject.id=f);let d=await t.invoke.getTestVp(await t.invoke.issueCredential(e));return await t.invoke.storePresentationViaChapi(d)?{success:!0}:{success:!1,reason:"did not store"}},storePresentationViaChapi:async(t,e)=>{let r=new WebCredential("VerifiablePresentation",e);return window.navigator.credentials.store(r)}}}),"getCHAPIPlugin");var Gt;(function(t){t.assertEqual=i=>i;function e(i){}o(e,"assertIs"),t.assertIs=e;function r(i){throw new Error}o(r,"assertNever"),t.assertNever=r,t.arrayToEnum=i=>{let s={};for(let a of i)s[a]=a;return s},t.getValidEnumValues=i=>{let s=t.objectKeys(i).filter(f=>typeof i[i[f]]!="number"),a={};for(let f of s)a[f]=i[f];return t.objectValues(a)},t.objectValues=i=>t.objectKeys(i).map(function(s){return i[s]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let s=[];for(let a in i)Object.prototype.hasOwnProperty.call(i,a)&&s.push(a);return s},t.find=(i,s)=>{for(let a of i)if(s(a))return a},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,s=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(s)}o(n,"joinValues"),t.joinValues=n,t.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(Gt||(Gt={}));var je=Gt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),za=o(t=>{switch(typeof t){case"undefined":return je.undefined;case"string":return je.string;case"number":return isNaN(t)?je.nan:je.number;case"boolean":return je.boolean;case"function":return je.function;case"bigint":return je.bigint;case"symbol":return je.symbol;case"object":return Array.isArray(t)?je.array:t===null?je.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?je.promise:typeof Map<"u"&&t instanceof Map?je.map:typeof Set<"u"&&t instanceof Set?je.set:typeof Date<"u"&&t instanceof Date?je.date:je.object;default:return je.unknown}},"getParsedType"),Pe=Gt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),cre=o(t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),"quotelessJson"),Vi=class extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let r=e||function(s){return s.message},n={_errors:[]},i=o(s=>{for(let a of s.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let f=n,d=0;for(;d<a.path.length;){let h=a.path[d];d===a.path.length-1?(f[h]=f[h]||{_errors:[]},f[h]._errors.push(r(a))):f[h]=f[h]||{_errors:[]},f=f[h],d++}}},"processError");return i(this),n}toString(){return this.message}get message(){return JSON.stringify(this.issues,Gt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};o(Vi,"ZodError");Vi.create=t=>new Vi(t);var Ih=o((t,e)=>{let r;switch(t.code){case Pe.invalid_type:t.received===je.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case Pe.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Gt.jsonStringifyReplacer)}`;break;case Pe.unrecognized_keys:r=`Unrecognized key(s) in object: ${Gt.joinValues(t.keys,", ")}`;break;case Pe.invalid_union:r="Invalid input";break;case Pe.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Gt.joinValues(t.options)}`;break;case Pe.invalid_enum_value:r=`Invalid enum value. Expected ${Gt.joinValues(t.options)}, received '${t.received}'`;break;case Pe.invalid_arguments:r="Invalid function arguments";break;case Pe.invalid_return_type:r="Invalid function return type";break;case Pe.invalid_date:r="Invalid date";break;case Pe.invalid_string:typeof t.validation=="object"?"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:Gt.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case Pe.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(t.minimum)}`:r="Invalid input";break;case Pe.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(t.maximum)}`:r="Invalid input";break;case Pe.custom:r="Invalid input";break;case Pe.invalid_intersection_types:r="Intersection results could not be merged";break;case Pe.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case Pe.not_finite:r="Number must be finite";break;default:r=e.defaultError,Gt.assertNever(t)}return{message:r}},"errorMap"),ED=Ih;function fre(t){ED=t}o(fre,"setErrorMap");function J1(){return ED}o(J1,"getErrorMap");var X1=o(t=>{let{data:e,path:r,errorMaps:n,issueData:i}=t,s=[...r,...i.path||[]],a={...i,path:s},f="",d=n.filter(h=>!!h).slice().reverse();for(let h of d)f=h(a,{data:e,defaultError:f}).message;return{...i,path:s,message:i.message||f}},"makeIssue"),ure=[];function Ge(t,e){let r=X1({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,J1(),Ih].filter(n=>!!n)});t.common.issues.push(r)}o(Ge,"addIssueToContext");var Vr=class{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let i of r){if(i.status==="aborted")return wt;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let i of r)n.push({key:await i.key,value:await i.value});return Vr.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let i of r){let{key:s,value:a}=i;if(s.status==="aborted"||a.status==="aborted")return wt;s.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),(typeof a.value<"u"||i.alwaysSet)&&(n[s.value]=a.value)}return{status:e.value,value:n}}};o(Vr,"ParseStatus");var wt=Object.freeze({status:"aborted"}),AD=o(t=>({status:"dirty",value:t}),"DIRTY"),xn=o(t=>({status:"valid",value:t}),"OK"),yv=o(t=>t.status==="aborted","isAborted"),xv=o(t=>t.status==="dirty","isDirty"),Z1=o(t=>t.status==="valid","isValid"),Q1=o(t=>typeof Promise<"u"&&t instanceof Promise,"isAsync"),Ft;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Ft||(Ft={}));var pi=class{constructor(e,r,n,i){this.parent=e,this.data=r,this._path=n,this._key=i}get path(){return this._path.concat(this._key)}};o(pi,"ParseInputLazyPath");var wD=o((t,e)=>{if(Z1(e))return{success:!0,data:e.value};{if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");let r=new Vi(t.common.issues);return{success:!1,error:r}}},"handleResult");function It(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:o((a,f)=>a.code!=="invalid_type"?{message:f.defaultError}:typeof f.data>"u"?{message:n??f.defaultError}:{message:r??f.defaultError},"customMap"),description:i}}o(It,"processCreateParams");var At=class{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return za(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:za(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Vr,ctx:{common:e.parent.common,data:e.data,parsedType:za(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(Q1(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;let i={common:{issues:[],async:(n=r?.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:za(e)},s=this._parseSync({data:e,path:i.path,parent:i});return wD(i,s)}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:za(e)},i=this._parse({data:e,path:n.path,parent:n}),s=await(Q1(i)?i:Promise.resolve(i));return wD(n,s)}refine(e,r){let n=o(i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r,"getIssueProperties");return this._refinement((i,s)=>{let a=e(i),f=o(()=>s.addIssue({code:Pe.custom,...n(i)}),"setError");return typeof Promise<"u"&&a instanceof Promise?a.then(d=>d?!0:(f(),!1)):a?!0:(f(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new Wn({schema:this,typeName:vt.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Gi.create(this,this._def)}nullable(){return os.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Gn.create(this,this._def)}promise(){return Ws.create(this,this._def)}or(e){return Ja.create([this,e],this._def)}and(e){return Xa.create(this,e,this._def)}transform(e){return new Wn({...It(this._def),schema:this,typeName:vt.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new rc({...It(this._def),innerType:this,defaultValue:r,typeName:vt.ZodDefault})}brand(){return new Ch({typeName:vt.ZodBranded,type:this,...It(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new lf({...It(this._def),innerType:this,catchValue:r,typeName:vt.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return nc.create(this,e)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};o(At,"ZodType");var dre=/^c[^\s-]{8,}$/i,lre=/^[a-z][a-z0-9]*$/,hre=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,pre=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|([^-]([a-zA-Z0-9-]*\.)+[a-zA-Z]{2,}))$/,mre=o(t=>t.precision?t.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}Z$`):t.precision===0?t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"),"datetimeRegex"),zi=class extends At{constructor(){super(...arguments),this._regex=(e,r,n)=>this.refinement(i=>e.test(i),{validation:r,code:Pe.invalid_string,...Ft.errToObj(n)}),this.nonempty=e=>this.min(1,Ft.errToObj(e)),this.trim=()=>new zi({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==je.string){let s=this._getOrReturnCtx(e);return Ge(s,{code:Pe.invalid_type,expected:je.string,received:s.parsedType}),wt}let n=new Vr,i;for(let s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(i=this._getOrReturnCtx(e,i),Ge(i,{code:Pe.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(i=this._getOrReturnCtx(e,i),Ge(i,{code:Pe.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){let a=e.data.length>s.value,f=e.data.length<s.value;(a||f)&&(i=this._getOrReturnCtx(e,i),a?Ge(i,{code:Pe.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):f&&Ge(i,{code:Pe.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")pre.test(e.data)||(i=this._getOrReturnCtx(e,i),Ge(i,{validation:"email",code:Pe.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")hre.test(e.data)||(i=this._getOrReturnCtx(e,i),Ge(i,{validation:"uuid",code:Pe.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")dre.test(e.data)||(i=this._getOrReturnCtx(e,i),Ge(i,{validation:"cuid",code:Pe.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")lre.test(e.data)||(i=this._getOrReturnCtx(e,i),Ge(i,{validation:"cuid2",code:Pe.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),Ge(i,{validation:"url",code:Pe.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),Ge(i,{validation:"regex",code:Pe.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="startsWith"?e.data.startsWith(s.value)||(i=this._getOrReturnCtx(e,i),Ge(i,{code:Pe.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(i=this._getOrReturnCtx(e,i),Ge(i,{code:Pe.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?mre(s).test(e.data)||(i=this._getOrReturnCtx(e,i),Ge(i,{code:Pe.invalid_string,validation:"datetime",message:s.message}),n.dirty()):Gt.assertNever(s);return{status:n.value,value:e.data}}_addCheck(e){return new zi({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Ft.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Ft.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Ft.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Ft.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Ft.errToObj(e)})}datetime(e){var r;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:(r=e?.offset)!==null&&r!==void 0?r:!1,...Ft.errToObj(e?.message)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...Ft.errToObj(r)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...Ft.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...Ft.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...Ft.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...Ft.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...Ft.errToObj(r)})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};o(zi,"ZodString");zi.create=t=>{var e;return new zi({checks:[],typeName:vt.ZodString,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...It(t)})};function gre(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,s=parseInt(t.toFixed(i).replace(".","")),a=parseInt(e.toFixed(i).replace(".",""));return s%a/Math.pow(10,i)}o(gre,"floatSafeRemainder");var Eo=class extends At{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==je.number){let s=this._getOrReturnCtx(e);return Ge(s,{code:Pe.invalid_type,expected:je.number,received:s.parsedType}),wt}let n,i=new Vr;for(let s of this._def.checks)s.kind==="int"?Gt.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),Ge(n,{code:Pe.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),Ge(n,{code:Pe.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),Ge(n,{code:Pe.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?gre(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),Ge(n,{code:Pe.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),Ge(n,{code:Pe.not_finite,message:s.message}),i.dirty()):Gt.assertNever(s);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,Ft.toString(r))}gt(e,r){return this.setLimit("min",e,!1,Ft.toString(r))}lte(e,r){return this.setLimit("max",e,!0,Ft.toString(r))}lt(e,r){return this.setLimit("max",e,!1,Ft.toString(r))}setLimit(e,r,n,i){return new Eo({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:Ft.toString(i)}]})}_addCheck(e){return new Eo({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Ft.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ft.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ft.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ft.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ft.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:Ft.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:Ft.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Gt.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};o(Eo,"ZodNumber");Eo.create=t=>new Eo({checks:[],typeName:vt.ZodNumber,coerce:t?.coerce||!1,...It(t)});var Ka=class extends At{_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==je.bigint){let n=this._getOrReturnCtx(e);return Ge(n,{code:Pe.invalid_type,expected:je.bigint,received:n.parsedType}),wt}return xn(e.data)}};o(Ka,"ZodBigInt");Ka.create=t=>{var e;return new Ka({typeName:vt.ZodBigInt,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...It(t)})};var Ga=class extends At{_parse(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==je.boolean){let n=this._getOrReturnCtx(e);return Ge(n,{code:Pe.invalid_type,expected:je.boolean,received:n.parsedType}),wt}return xn(e.data)}};o(Ga,"ZodBoolean");Ga.create=t=>new Ga({typeName:vt.ZodBoolean,coerce:t?.coerce||!1,...It(t)});var rs=class extends At{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==je.date){let s=this._getOrReturnCtx(e);return Ge(s,{code:Pe.invalid_type,expected:je.date,received:s.parsedType}),wt}if(isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return Ge(s,{code:Pe.invalid_date}),wt}let n=new Vr,i;for(let s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(i=this._getOrReturnCtx(e,i),Ge(i,{code:Pe.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(i=this._getOrReturnCtx(e,i),Ge(i,{code:Pe.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):Gt.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new rs({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:Ft.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:Ft.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};o(rs,"ZodDate");rs.create=t=>new rs({checks:[],coerce:t?.coerce||!1,typeName:vt.ZodDate,...It(t)});var cf=class extends At{_parse(e){if(this._getType(e)!==je.symbol){let n=this._getOrReturnCtx(e);return Ge(n,{code:Pe.invalid_type,expected:je.symbol,received:n.parsedType}),wt}return xn(e.data)}};o(cf,"ZodSymbol");cf.create=t=>new cf({typeName:vt.ZodSymbol,...It(t)});var Wa=class extends At{_parse(e){if(this._getType(e)!==je.undefined){let n=this._getOrReturnCtx(e);return Ge(n,{code:Pe.invalid_type,expected:je.undefined,received:n.parsedType}),wt}return xn(e.data)}};o(Wa,"ZodUndefined");Wa.create=t=>new Wa({typeName:vt.ZodUndefined,...It(t)});var Ya=class extends At{_parse(e){if(this._getType(e)!==je.null){let n=this._getOrReturnCtx(e);return Ge(n,{code:Pe.invalid_type,expected:je.null,received:n.parsedType}),wt}return xn(e.data)}};o(Ya,"ZodNull");Ya.create=t=>new Ya({typeName:vt.ZodNull,...It(t)});var Ks=class extends At{constructor(){super(...arguments),this._any=!0}_parse(e){return xn(e.data)}};o(Ks,"ZodAny");Ks.create=t=>new Ks({typeName:vt.ZodAny,...It(t)});var ns=class extends At{constructor(){super(...arguments),this._unknown=!0}_parse(e){return xn(e.data)}};o(ns,"ZodUnknown");ns.create=t=>new ns({typeName:vt.ZodUnknown,...It(t)});var Ki=class extends At{_parse(e){let r=this._getOrReturnCtx(e);return Ge(r,{code:Pe.invalid_type,expected:je.never,received:r.parsedType}),wt}};o(Ki,"ZodNever");Ki.create=t=>new Ki({typeName:vt.ZodNever,...It(t)});var ff=class extends At{_parse(e){if(this._getType(e)!==je.undefined){let n=this._getOrReturnCtx(e);return Ge(n,{code:Pe.invalid_type,expected:je.void,received:n.parsedType}),wt}return xn(e.data)}};o(ff,"ZodVoid");ff.create=t=>new ff({typeName:vt.ZodVoid,...It(t)});var Gn=class extends At{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==je.array)return Ge(r,{code:Pe.invalid_type,expected:je.array,received:r.parsedType}),wt;if(i.exactLength!==null){let a=r.data.length>i.exactLength.value,f=r.data.length<i.exactLength.value;(a||f)&&(Ge(r,{code:a?Pe.too_big:Pe.too_small,minimum:f?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(Ge(r,{code:Pe.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(Ge(r,{code:Pe.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((a,f)=>i.type._parseAsync(new pi(r,a,r.path,f)))).then(a=>Vr.mergeArray(n,a));let s=[...r.data].map((a,f)=>i.type._parseSync(new pi(r,a,r.path,f)));return Vr.mergeArray(n,s)}get element(){return this._def.type}min(e,r){return new Gn({...this._def,minLength:{value:e,message:Ft.toString(r)}})}max(e,r){return new Gn({...this._def,maxLength:{value:e,message:Ft.toString(r)}})}length(e,r){return new Gn({...this._def,exactLength:{value:e,message:Ft.toString(r)}})}nonempty(e){return this.min(1,e)}};o(Gn,"ZodArray");Gn.create=(t,e)=>new Gn({type:t,minLength:null,maxLength:null,exactLength:null,typeName:vt.ZodArray,...It(e)});var em;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(em||(em={}));function id(t){if(t instanceof cr){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=Gi.create(id(n))}return new cr({...t._def,shape:()=>e})}else return t instanceof Gn?Gn.create(id(t.element)):t instanceof Gi?Gi.create(id(t.unwrap())):t instanceof os?os.create(id(t.unwrap())):t instanceof mi?mi.create(t.items.map(e=>id(e))):t}o(id,"deepPartialify");var cr=class extends At{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=Gt.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==je.object){let h=this._getOrReturnCtx(e);return Ge(h,{code:Pe.invalid_type,expected:je.object,received:h.parsedType}),wt}let{status:n,ctx:i}=this._processInputParams(e),{shape:s,keys:a}=this._getCached(),f=[];if(!(this._def.catchall instanceof Ki&&this._def.unknownKeys==="strip"))for(let h in i.data)a.includes(h)||f.push(h);let d=[];for(let h of a){let p=s[h],y=i.data[h];d.push({key:{status:"valid",value:h},value:p._parse(new pi(i,y,i.path,h)),alwaysSet:h in i.data})}if(this._def.catchall instanceof Ki){let h=this._def.unknownKeys;if(h==="passthrough")for(let p of f)d.push({key:{status:"valid",value:p},value:{status:"valid",value:i.data[p]}});else if(h==="strict")f.length>0&&(Ge(i,{code:Pe.unrecognized_keys,keys:f}),n.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let h=this._def.catchall;for(let p of f){let y=i.data[p];d.push({key:{status:"valid",value:p},value:h._parse(new pi(i,y,i.path,p)),alwaysSet:p in i.data})}}return i.common.async?Promise.resolve().then(async()=>{let h=[];for(let p of d){let y=await p.key;h.push({key:y,value:await p.value,alwaysSet:p.alwaysSet})}return h}).then(h=>Vr.mergeObjectSync(n,h)):Vr.mergeObjectSync(n,d)}get shape(){return this._def.shape()}strict(e){return Ft.errToObj,new cr({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var i,s,a,f;let d=(a=(s=(i=this._def).errorMap)===null||s===void 0?void 0:s.call(i,r,n).message)!==null&&a!==void 0?a:n.defaultError;return r.code==="unrecognized_keys"?{message:(f=Ft.errToObj(e).message)!==null&&f!==void 0?f:d}:{message:d}}}:{}})}strip(){return new cr({...this._def,unknownKeys:"strip"})}passthrough(){return new cr({...this._def,unknownKeys:"passthrough"})}extend(e){return new cr({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new cr({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>em.mergeShapes(this._def.shape(),e._def.shape()),typeName:vt.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new cr({...this._def,catchall:e})}pick(e){let r={};return Gt.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new cr({...this._def,shape:()=>r})}omit(e){let r={};return Gt.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new cr({...this._def,shape:()=>r})}deepPartial(){return id(this)}partial(e){let r={};return Gt.objectKeys(this.shape).forEach(n=>{let i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}),new cr({...this._def,shape:()=>r})}required(e){let r={};return Gt.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof Gi;)s=s._def.innerType;r[n]=s}}),new cr({...this._def,shape:()=>r})}keyof(){return CD(Gt.objectKeys(this.shape))}};o(cr,"ZodObject");cr.create=(t,e)=>new cr({shape:()=>t,unknownKeys:"strip",catchall:Ki.create(),typeName:vt.ZodObject,...It(e)});cr.strictCreate=(t,e)=>new cr({shape:()=>t,unknownKeys:"strict",catchall:Ki.create(),typeName:vt.ZodObject,...It(e)});cr.lazycreate=(t,e)=>new cr({shape:t,unknownKeys:"strip",catchall:Ki.create(),typeName:vt.ZodObject,...It(e)});var Ja=class extends At{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function i(s){for(let f of s)if(f.result.status==="valid")return f.result;for(let f of s)if(f.result.status==="dirty")return r.common.issues.push(...f.ctx.common.issues),f.result;let a=s.map(f=>new Vi(f.ctx.common.issues));return Ge(r,{code:Pe.invalid_union,unionErrors:a}),wt}if(o(i,"handleResults"),r.common.async)return Promise.all(n.map(async s=>{let a={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(i);{let s,a=[];for(let d of n){let h={...r,common:{...r.common,issues:[]},parent:null},p=d._parseSync({data:r.data,path:r.path,parent:h});if(p.status==="valid")return p;p.status==="dirty"&&!s&&(s={result:p,ctx:h}),h.common.issues.length&&a.push(h.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;let f=a.map(d=>new Vi(d));return Ge(r,{code:Pe.invalid_union,unionErrors:f}),wt}}get options(){return this._def.options}};o(Ja,"ZodUnion");Ja.create=(t,e)=>new Ja({options:t,typeName:vt.ZodUnion,...It(e)});var Y1=o(t=>t instanceof Qa?Y1(t.schema):t instanceof Wn?Y1(t.innerType()):t instanceof ec?[t.value]:t instanceof Ao?t.options:t instanceof tc?Object.keys(t.enum):t instanceof rc?Y1(t._def.innerType):t instanceof Wa?[void 0]:t instanceof Ya?[null]:null,"getDiscriminator"),uf=class extends At{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==je.object)return Ge(r,{code:Pe.invalid_type,expected:je.object,received:r.parsedType}),wt;let n=this.discriminator,i=r.data[n],s=this.optionsMap.get(i);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(Ge(r,{code:Pe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),wt)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let i=new Map;for(let s of r){let a=Y1(s.shape[e]);if(!a)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let f of a){if(i.has(f))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(f)}`);i.set(f,s)}}return new uf({typeName:vt.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...It(n)})}};o(uf,"ZodDiscriminatedUnion");function wv(t,e){let r=za(t),n=za(e);if(t===e)return{valid:!0,data:t};if(r===je.object&&n===je.object){let i=Gt.objectKeys(e),s=Gt.objectKeys(t).filter(f=>i.indexOf(f)!==-1),a={...t,...e};for(let f of s){let d=wv(t[f],e[f]);if(!d.valid)return{valid:!1};a[f]=d.data}return{valid:!0,data:a}}else if(r===je.array&&n===je.array){if(t.length!==e.length)return{valid:!1};let i=[];for(let s=0;s<t.length;s++){let a=t[s],f=e[s],d=wv(a,f);if(!d.valid)return{valid:!1};i.push(d.data)}return{valid:!0,data:i}}else return r===je.date&&n===je.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}o(wv,"mergeValues");var Xa=class extends At{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=o((s,a)=>{if(yv(s)||yv(a))return wt;let f=wv(s.value,a.value);return f.valid?((xv(s)||xv(a))&&r.dirty(),{status:r.value,value:f.data}):(Ge(n,{code:Pe.invalid_intersection_types}),wt)},"handleParsed");return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,a])=>i(s,a)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};o(Xa,"ZodIntersection");Xa.create=(t,e,r)=>new Xa({left:t,right:e,typeName:vt.ZodIntersection,...It(r)});var mi=class extends At{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==je.array)return Ge(n,{code:Pe.invalid_type,expected:je.array,received:n.parsedType}),wt;if(n.data.length<this._def.items.length)return Ge(n,{code:Pe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),wt;!this._def.rest&&n.data.length>this._def.items.length&&(Ge(n,{code:Pe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let s=[...n.data].map((a,f)=>{let d=this._def.items[f]||this._def.rest;return d?d._parse(new pi(n,a,n.path,f)):null}).filter(a=>!!a);return n.common.async?Promise.all(s).then(a=>Vr.mergeArray(r,a)):Vr.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new mi({...this._def,rest:e})}};o(mi,"ZodTuple");mi.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new mi({items:t,typeName:vt.ZodTuple,rest:null,...It(e)})};var Za=class extends At{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==je.object)return Ge(n,{code:Pe.invalid_type,expected:je.object,received:n.parsedType}),wt;let i=[],s=this._def.keyType,a=this._def.valueType;for(let f in n.data)i.push({key:s._parse(new pi(n,f,n.path,f)),value:a._parse(new pi(n,n.data[f],n.path,f))});return n.common.async?Vr.mergeObjectAsync(r,i):Vr.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof At?new Za({keyType:e,valueType:r,typeName:vt.ZodRecord,...It(n)}):new Za({keyType:zi.create(),valueType:e,typeName:vt.ZodRecord,...It(r)})}};o(Za,"ZodRecord");var df=class extends At{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==je.map)return Ge(n,{code:Pe.invalid_type,expected:je.map,received:n.parsedType}),wt;let i=this._def.keyType,s=this._def.valueType,a=[...n.data.entries()].map(([f,d],h)=>({key:i._parse(new pi(n,f,n.path,[h,"key"])),value:s._parse(new pi(n,d,n.path,[h,"value"]))}));if(n.common.async){let f=new Map;return Promise.resolve().then(async()=>{for(let d of a){let h=await d.key,p=await d.value;if(h.status==="aborted"||p.status==="aborted")return wt;(h.status==="dirty"||p.status==="dirty")&&r.dirty(),f.set(h.value,p.value)}return{status:r.value,value:f}})}else{let f=new Map;for(let d of a){let h=d.key,p=d.value;if(h.status==="aborted"||p.status==="aborted")return wt;(h.status==="dirty"||p.status==="dirty")&&r.dirty(),f.set(h.value,p.value)}return{status:r.value,value:f}}}};o(df,"ZodMap");df.create=(t,e,r)=>new df({valueType:e,keyType:t,typeName:vt.ZodMap,...It(r)});var is=class extends At{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==je.set)return Ge(n,{code:Pe.invalid_type,expected:je.set,received:n.parsedType}),wt;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(Ge(n,{code:Pe.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(Ge(n,{code:Pe.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let s=this._def.valueType;function a(d){let h=new Set;for(let p of d){if(p.status==="aborted")return wt;p.status==="dirty"&&r.dirty(),h.add(p.value)}return{status:r.value,value:h}}o(a,"finalizeSet");let f=[...n.data.values()].map((d,h)=>s._parse(new pi(n,d,n.path,h)));return n.common.async?Promise.all(f).then(d=>a(d)):a(f)}min(e,r){return new is({...this._def,minSize:{value:e,message:Ft.toString(r)}})}max(e,r){return new is({...this._def,maxSize:{value:e,message:Ft.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};o(is,"ZodSet");is.create=(t,e)=>new is({valueType:t,minSize:null,maxSize:null,typeName:vt.ZodSet,...It(e)});var Gs=class extends At{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==je.function)return Ge(r,{code:Pe.invalid_type,expected:je.function,received:r.parsedType}),wt;function n(f,d){return X1({data:f,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,J1(),Ih].filter(h=>!!h),issueData:{code:Pe.invalid_arguments,argumentsError:d}})}o(n,"makeArgsIssue");function i(f,d){return X1({data:f,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,J1(),Ih].filter(h=>!!h),issueData:{code:Pe.invalid_return_type,returnTypeError:d}})}o(i,"makeReturnsIssue");let s={errorMap:r.common.contextualErrorMap},a=r.data;return this._def.returns instanceof Ws?xn(async(...f)=>{let d=new Vi([]),h=await this._def.args.parseAsync(f,s).catch(I=>{throw d.addIssue(n(f,I)),d}),p=await a(...h);return await this._def.returns._def.type.parseAsync(p,s).catch(I=>{throw d.addIssue(i(p,I)),d})}):xn((...f)=>{let d=this._def.args.safeParse(f,s);if(!d.success)throw new Vi([n(f,d.error)]);let h=a(...d.data),p=this._def.returns.safeParse(h,s);if(!p.success)throw new Vi([i(h,p.error)]);return p.data})}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Gs({...this._def,args:mi.create(e).rest(ns.create())})}returns(e){return new Gs({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new Gs({args:e||mi.create([]).rest(ns.create()),returns:r||ns.create(),typeName:vt.ZodFunction,...It(n)})}};o(Gs,"ZodFunction");var Qa=class extends At{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};o(Qa,"ZodLazy");Qa.create=(t,e)=>new Qa({getter:t,typeName:vt.ZodLazy,...It(e)});var ec=class extends At{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return Ge(r,{received:r.data,code:Pe.invalid_literal,expected:this._def.value}),wt}return{status:"valid",value:e.data}}get value(){return this._def.value}};o(ec,"ZodLiteral");ec.create=(t,e)=>new ec({value:t,typeName:vt.ZodLiteral,...It(e)});function CD(t,e){return new Ao({values:t,typeName:vt.ZodEnum,...It(e)})}o(CD,"createZodEnum");var Ao=class extends At{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return Ge(r,{expected:Gt.joinValues(n),received:r.parsedType,code:Pe.invalid_type}),wt}if(this._def.values.indexOf(e.data)===-1){let r=this._getOrReturnCtx(e),n=this._def.values;return Ge(r,{received:r.data,code:Pe.invalid_enum_value,options:n}),wt}return xn(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e){return Ao.create(e)}exclude(e){return Ao.create(this.options.filter(r=>!e.includes(r)))}};o(Ao,"ZodEnum");Ao.create=CD;var tc=class extends At{_parse(e){let r=Gt.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==je.string&&n.parsedType!==je.number){let i=Gt.objectValues(r);return Ge(n,{expected:Gt.joinValues(i),received:n.parsedType,code:Pe.invalid_type}),wt}if(r.indexOf(e.data)===-1){let i=Gt.objectValues(r);return Ge(n,{received:n.data,code:Pe.invalid_enum_value,options:i}),wt}return xn(e.data)}get enum(){return this._def.values}};o(tc,"ZodNativeEnum");tc.create=(t,e)=>new tc({values:t,typeName:vt.ZodNativeEnum,...It(e)});var Ws=class extends At{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==je.promise&&r.common.async===!1)return Ge(r,{code:Pe.invalid_type,expected:je.promise,received:r.parsedType}),wt;let n=r.parsedType===je.promise?r.data:Promise.resolve(r.data);return xn(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};o(Ws,"ZodPromise");Ws.create=(t,e)=>new Ws({type:t,typeName:vt.ZodPromise,...It(e)});var Wn=class extends At{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===vt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null;if(i.type==="preprocess"){let a=i.transform(n.data);return n.common.async?Promise.resolve(a).then(f=>this._def.schema._parseAsync({data:f,path:n.path,parent:n})):this._def.schema._parseSync({data:a,path:n.path,parent:n})}let s={addIssue:a=>{Ge(n,a),a.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="refinement"){let a=o(f=>{let d=i.refinement(f,s);if(n.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return f},"executeRefinement");if(n.common.async===!1){let f=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return f.status==="aborted"?wt:(f.status==="dirty"&&r.dirty(),a(f.value),{status:r.value,value:f.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(f=>f.status==="aborted"?wt:(f.status==="dirty"&&r.dirty(),a(f.value).then(()=>({status:r.value,value:f.value}))))}if(i.type==="transform")if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Z1(a))return a;let f=i.transform(a.value,s);if(f instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:f}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>Z1(a)?Promise.resolve(i.transform(a.value,s)).then(f=>({status:r.value,value:f})):a);Gt.assertNever(i)}};o(Wn,"ZodEffects");Wn.create=(t,e,r)=>new Wn({schema:t,typeName:vt.ZodEffects,effect:e,...It(r)});Wn.createWithPreprocess=(t,e,r)=>new Wn({schema:e,effect:{type:"preprocess",transform:t},typeName:vt.ZodEffects,...It(r)});var Gi=class extends At{_parse(e){return this._getType(e)===je.undefined?xn(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};o(Gi,"ZodOptional");Gi.create=(t,e)=>new Gi({innerType:t,typeName:vt.ZodOptional,...It(e)});var os=class extends At{_parse(e){return this._getType(e)===je.null?xn(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};o(os,"ZodNullable");os.create=(t,e)=>new os({innerType:t,typeName:vt.ZodNullable,...It(e)});var rc=class extends At{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===je.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};o(rc,"ZodDefault");rc.create=(t,e)=>new rc({innerType:t,typeName:vt.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...It(e)});var lf=class extends At{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r,common:{...r.common,issues:[]}}});return Q1(n)?n.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue()})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue()}}removeCatch(){return this._def.innerType}};o(lf,"ZodCatch");lf.create=(t,e)=>new lf({innerType:t,typeName:vt.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...It(e)});var hf=class extends At{_parse(e){if(this._getType(e)!==je.nan){let n=this._getOrReturnCtx(e);return Ge(n,{code:Pe.invalid_type,expected:je.nan,received:n.parsedType}),wt}return{status:"valid",value:e.data}}};o(hf,"ZodNaN");hf.create=t=>new hf({typeName:vt.ZodNaN,...It(t)});var bre=Symbol("zod_brand"),Ch=class extends At{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}};o(Ch,"ZodBranded");var nc=class extends At{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return o(async()=>{let s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?wt:s.status==="dirty"?(r.dirty(),AD(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})},"handleAsync")();{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?wt:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new nc({in:e,out:r,typeName:vt.ZodPipeline})}};o(nc,"ZodPipeline");var ID=o((t,e={},r)=>t?Ks.create().superRefine((n,i)=>{if(!t(n)){let s=typeof e=="function"?e(n):e,a=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...a,fatal:r})}}):Ks.create(),"custom"),vre={object:cr.lazycreate},vt;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline"})(vt||(vt={}));var yre=o((t,e={message:`Input not instance of ${t.name}`})=>ID(r=>r instanceof t,e,!0),"instanceOfType"),DD=zi.create,SD=Eo.create,xre=hf.create,wre=Ka.create,TD=Ga.create,_re=rs.create,Ere=cf.create,Are=Wa.create,Cre=Ya.create,Ire=Ks.create,Dre=ns.create,Sre=Ki.create,Tre=ff.create,kre=Gn.create,Mre=cr.create,Rre=cr.strictCreate,Bre=Ja.create,Fre=uf.create,Pre=Xa.create,Ore=mi.create,Nre=Za.create,Lre=df.create,Ure=is.create,qre=Gs.create,$re=Qa.create,jre=ec.create,Hre=Ao.create,Vre=tc.create,zre=Ws.create,_D=Wn.create,Kre=Gi.create,Gre=os.create,Wre=Wn.createWithPreprocess,Yre=nc.create,Jre=o(()=>DD().optional(),"ostring"),Xre=o(()=>SD().optional(),"onumber"),Zre=o(()=>TD().optional(),"oboolean"),Qre={string:t=>zi.create({...t,coerce:!0}),number:t=>Eo.create({...t,coerce:!0}),boolean:t=>Ga.create({...t,coerce:!0}),bigint:t=>Ka.create({...t,coerce:!0}),date:t=>rs.create({...t,coerce:!0})},ene=wt,Y=Object.freeze({__proto__:null,defaultErrorMap:Ih,setErrorMap:fre,getErrorMap:J1,makeIssue:X1,EMPTY_PATH:ure,addIssueToContext:Ge,ParseStatus:Vr,INVALID:wt,DIRTY:AD,OK:xn,isAborted:yv,isDirty:xv,isValid:Z1,isAsync:Q1,get util(){return Gt},ZodParsedType:je,getParsedType:za,ZodType:At,ZodString:zi,ZodNumber:Eo,ZodBigInt:Ka,ZodBoolean:Ga,ZodDate:rs,ZodSymbol:cf,ZodUndefined:Wa,ZodNull:Ya,ZodAny:Ks,ZodUnknown:ns,ZodNever:Ki,ZodVoid:ff,ZodArray:Gn,get objectUtil(){return em},ZodObject:cr,ZodUnion:Ja,ZodDiscriminatedUnion:uf,ZodIntersection:Xa,ZodTuple:mi,ZodRecord:Za,ZodMap:df,ZodSet:is,ZodFunction:Gs,ZodLazy:Qa,ZodLiteral:ec,ZodEnum:Ao,ZodNativeEnum:tc,ZodPromise:Ws,ZodEffects:Wn,ZodTransformer:Wn,ZodOptional:Gi,ZodNullable:os,ZodDefault:rc,ZodCatch:lf,ZodNaN:hf,BRAND:bre,ZodBranded:Ch,ZodPipeline:nc,custom:ID,Schema:At,ZodSchema:At,late:vre,get ZodFirstPartyTypeKind(){return vt},coerce:Qre,any:Ire,array:kre,bigint:wre,boolean:TD,date:_re,discriminatedUnion:Fre,effect:_D,enum:Hre,function:qre,instanceof:yre,intersection:Pre,lazy:$re,literal:jre,map:Lre,nan:xre,nativeEnum:Vre,never:Sre,null:Cre,nullable:Gre,number:SD,object:Mre,oboolean:Zre,onumber:Xre,optional:Kre,ostring:Jre,pipeline:Yre,preprocess:Wre,promise:zre,record:Nre,set:Ure,strictObject:Rre,string:DD,symbol:Ere,transformer:_D,tuple:Ore,undefined:Are,union:Bre,unknown:Dre,void:Tre,NEVER:ene,ZodIssueCode:Pe,quotelessJson:cre,ZodError:Vi});var MD=Y.array(Y.string().or(Y.record(Y.any()))),O6e=Y.object({type:Y.string().optional(),narrative:Y.string().optional()}),tm=Y.string().or(Y.object({id:Y.string(),type:Y.string(),caption:Y.string().optional()})),tne=Y.object({type:Y.string().min(1).or(Y.string().array().nonempty()),latitude:Y.number(),longitude:Y.number()}),rne=Y.object({type:Y.string().min(1).or(Y.string().array().nonempty()),addressCountry:Y.string().optional(),addressCountryCode:Y.string().optional(),addressRegion:Y.string().optional(),addressLocality:Y.string().optional(),streetAddress:Y.string().optional(),postOfficeBoxNumber:Y.string().optional(),postalCode:Y.string().optional(),geo:tne.optional()}),nne=Y.enum(["sourcedId","systemId","productId","userName","accountId","emailAddress","nationalIdentityNumber","isbn","issn","lisSourcedId","oneRosterSourcedId","sisSourcedId","ltiContextId","ltiDeploymentId","ltiToolId","ltiPlatformId","ltiUserId","identifier"]).or(Y.string()),RD=Y.object({type:Y.string().min(1).or(Y.string().array().nonempty()),identifier:Y.string(),identifierType:nne}),Dh=Y.string().or(Y.object({id:Y.string().optional(),type:Y.string().or(Y.string().array().nonempty().optional()),name:Y.string().optional(),url:Y.string().optional(),phone:Y.string().optional(),description:Y.string().optional(),endorsement:Y.any().array().optional(),image:tm.optional(),email:Y.string().email().optional(),address:rne.optional(),otherIdentifier:RD.array().optional(),official:Y.string().optional(),parentOrg:Y.any().optional(),familyName:Y.string().optional(),givenName:Y.string().optional(),additionalName:Y.string().optional(),patronymicName:Y.string().optional(),honorificPrefix:Y.string().optional(),honorificSuffix:Y.string().optional(),familyNamePrefix:Y.string().optional(),dateOfBirth:Y.string().optional()}).catchall(Y.any())),_v=Y.object({id:Y.string().optional()}).catchall(Y.any()),ine=Y.object({type:Y.string(),id:Y.string()}),one=Y.object({id:Y.string(),type:Y.string()}),sne=Y.object({id:Y.string(),type:Y.string()}).catchall(Y.any()),od=Y.object({"@context":MD,id:Y.string().optional(),type:Y.string().array().nonempty(),issuer:Dh,issuanceDate:Y.string(),expirationDate:Y.string().optional(),credentialSubject:_v.or(_v.array()),credentialStatus:ine.optional(),credentialSchema:one.array().optional(),refreshService:sne.optional()}).catchall(Y.any()),ic=Y.object({type:Y.string(),created:Y.string(),challenge:Y.string().optional(),domain:Y.string().optional(),nonce:Y.string().optional(),proofPurpose:Y.string(),verificationMethod:Y.string(),jws:Y.string().optional()}).catchall(Y.any()),Wi=od.extend({proof:ic.or(ic.array())}),Av=Y.object({"@context":MD,id:Y.string().optional(),type:Y.string().array().nonempty(),verifiableCredential:Wi.or(Wi.array()).optional(),holder:Y.string().optional()}).catchall(Y.any()),sd=Av.extend({proof:ic.or(ic.array())}),ane=Y.enum(["ceasn:Competency","ceterms:Credential","CFItem","CFRubric","CFRubricCriterion","CFRubricCriterionLevel","CTDL"]).or(Y.string()),rm=Y.object({type:Y.string().array().nonempty(),targetCode:Y.string().optional(),targetDescription:Y.string().optional(),targetName:Y.string(),targetFramework:Y.string().optional(),targetType:ane.optional(),targetUrl:Y.string()}),cne=Y.enum(["Achievement","ApprenticeshipCertificate","Assessment","Assignment","AssociateDegree","Award","Badge","BachelorDegree","Certificate","CertificateOfCompletion","Certification","CommunityService","Competency","Course","CoCurricular","Degree","Diploma","DoctoralDegree","Fieldwork","GeneralEducationDevelopment","JourneymanCertificate","LearningProgram","License","Membership","ProfessionalDoctorate","QualityAssuranceCredential","MasterCertificate","MasterDegree","MicroCredential","ResearchDoctorate","SecondarySchoolDiploma"]),fne=cne.or(Y.string()),une=Y.object({id:Y.string().optional(),narrative:Y.string().optional()}).catchall(Y.any()),dne=Y.object({id:Y.string(),type:Y.string().array().nonempty(),endorsementComment:Y.string().optional()}),lne=od.extend({credentialSubject:dne,proof:ic.or(ic.array()).optional()}),hne=Y.object({id:Y.string(),"@language":Y.string().optional(),version:Y.string().optional()}),pne=Y.enum(["GradePointAverage","LetterGrade","Percent","PerformanceLevel","PredictedScore","RawScore","Result","RubricCriterion","RubricCriterionLevel","RubricScore","ScaledScore","Status"]).or(Y.string()),mne=Y.object({id:Y.string(),type:Y.string().array().nonempty(),alignment:rm.array().optional(),description:Y.string().optional(),level:Y.string().optional(),name:Y.string(),points:Y.string().optional()}).catchall(Y.any()),gne=Y.object({id:Y.string(),type:Y.string().array().nonempty(),alignment:rm.array().optional(),allowedValue:Y.string().array().optional(),name:Y.string(),requiredLevel:Y.string().optional(),requiredValue:Y.string().optional(),resultType:pne,rubricCriterionLevel:mne.array().optional(),valueMax:Y.string().optional(),valueMin:Y.string().optional()}).catchall(Y.any()),bne=Y.object({id:Y.string().optional(),type:Y.string().array().nonempty(),alignment:rm.array().optional(),achievementType:fne.optional(),creator:Dh.optional(),creditsAvailable:Y.number().optional(),criteria:une,description:Y.string(),endorsement:lne.array().optional(),fieldOfStudy:Y.string().optional(),humanCode:Y.string().optional(),image:tm.optional(),"@language":Y.string().optional(),name:Y.string(),otherIdentifier:RD.array().optional(),related:hne.array().optional(),resultDescription:gne.array().optional(),specialization:Y.string().optional(),tag:Y.string().array().optional(),version:Y.string().optional()}).catchall(Y.any()),vne=Y.object({type:Y.string(),hashed:Y.boolean(),identityHash:Y.string(),identityType:Y.string(),salt:Y.string().optional()}),yne=Y.enum(["Completed","Enrolled","Failed","InProgress","OnHold","Withdrew"]),xne=Y.object({type:Y.string().array().nonempty(),achievedLevel:Y.string().optional(),alignment:rm.array().optional(),resultDescription:Y.string().optional(),status:yne.optional(),value:Y.string().optional()}).catchall(Y.any()),kD=Y.object({id:Y.string().optional(),type:Y.string().array().nonempty(),activityEndDate:Y.string().optional(),activityStartDate:Y.string().optional(),creditsEarned:Y.number().optional(),achievement:bne.optional(),identifier:vne.array().optional(),image:tm.optional(),licenseNumber:Y.string().optional(),narrative:Y.string().optional(),result:xne.array().optional(),role:Y.string().optional(),source:Dh.optional(),term:Y.string().optional()}).catchall(Y.any()),wne=Y.object({id:Y.string().optional(),type:Y.string().array().nonempty(),narrative:Y.string().optional(),name:Y.string().optional(),description:Y.string().optional(),genre:Y.string().optional(),audience:Y.string().optional()}).catchall(Y.any()),_ne=od.extend({name:Y.string().optional(),description:Y.string().optional(),image:tm.optional(),credentialSubject:kD.or(kD.array()),endorsement:od.array().optional(),evidence:wne.array().optional()}),L6e=_ne.extend({proof:ic.or(ic.array())}),Cv=Y.object({checks:Y.string().array(),warnings:Y.string().array(),errors:Y.string().array()}),BD=Y.enum(["Success","Failed","Error"]),nm=BD.enum,q6e=Y.object({check:Y.string(),status:BD,message:Y.string().optional(),details:Y.string().optional()}),$6e=Y.object({title:Y.string().optional(),createdAt:Y.string().optional(),issuer:Dh.optional(),issuee:Dh.optional(),credentialSubject:_v.optional()}),pf=Y.object({id:Y.string(),uri:Y.string()}).catchall(Y.any()),Ev=Y.object({profileId:Y.string().min(3).max(40),displayName:Y.string().default(""),did:Y.string(),email:Y.string().optional(),image:Y.string().optional(),isServiceProfile:Y.boolean().default(!1).optional(),notificationsWebhook:Y.string().url().startsWith("https://").optional()}),H6e=Y.enum(["CONNECTED","PENDING_REQUEST_SENT","PENDING_REQUEST_RECEIVED","NOT_CONNECTED"]),V6e=Y.object({uri:Y.string(),to:Y.string(),from:Y.string(),sent:Y.string().datetime(),received:Y.string().datetime().optional()}),z6e=Y.object({uri:Y.string(),name:Y.string().optional(),type:Y.string().optional(),category:Y.string().optional()}),K6e=Y.object({to:Ev,from:Y.string(),received:Y.string()}),Ene=Y.enum(["CONNECTION_REQUEST","CONNECTION_ACCEPTED","CREDENTIAL_RECEIVED","CREDENTIAL_ACCEPTED","BOOST_RECEIVED","BOOST_ACCEPTED","PRESENTATION_REQUEST","PRESENTATION_RECEIVED"]),Ane=Y.object({title:Y.string().optional(),body:Y.string().optional()}),Cne=Y.object({vcUris:Y.array(Y.string()).optional(),vpUris:Y.array(Y.string()).optional()}),G6e=Y.object({type:Ene,to:Y.string().or(Ev),from:Y.string().or(Ev),message:Ane.optional(),data:Cne.optional(),sent:Y.string().datetime().optional()}),W6e=Y.object({endpoint:Y.string(),name:Y.string(),did:Y.string().optional()}),Ine=Y.object({endpoint:Y.string()}),Y6e=Y.object({signingAuthority:Ine,relationship:Y.object({name:Y.string(),did:Y.string()})}),Dne=Y.object({kty:Y.string(),crv:Y.string(),x:Y.string(),y:Y.string().optional(),n:Y.string().optional(),d:Y.string()}),Sne=Y.object({alg:Y.string(),iv:Y.string(),tag:Y.string(),epk:Dne.partial().optional(),kid:Y.string().optional(),apv:Y.string().optional(),apu:Y.string().optional()}),Tne=Y.object({header:Sne,encrypted_key:Y.string()}),X6e=Y.object({protected:Y.string(),iv:Y.string(),ciphertext:Y.string(),tag:Y.string(),aad:Y.string().optional(),recipients:Tne.array().optional()});function Yn(t){if(t===null||t===!0||t===!1)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}o(Yn,"toInteger");function Wt(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}o(Wt,"requiredArgs");function im(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?im=o(function(r){return typeof r},"_typeof"):im=o(function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},"_typeof"),im(t)}o(im,"_typeof");function kr(t){Wt(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||im(t)==="object"&&e==="[object Date]"?new Date(t.getTime()):typeof t=="number"||e==="[object Number]"?new Date(t):((typeof t=="string"||e==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}o(kr,"toDate");function Iv(t,e){Wt(2,arguments);var r=kr(t).getTime(),n=Yn(e);return new Date(r+n)}o(Iv,"addMilliseconds");var kne={};function oc(){return kne}o(oc,"getDefaultOptions");function Dv(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}o(Dv,"getTimezoneOffsetInMilliseconds");function om(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?om=o(function(r){return typeof r},"_typeof"):om=o(function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},"_typeof"),om(t)}o(om,"_typeof");function Sv(t){return Wt(1,arguments),t instanceof Date||om(t)==="object"&&Object.prototype.toString.call(t)==="[object Date]"}o(Sv,"isDate");function Tv(t){if(Wt(1,arguments),!Sv(t)&&typeof t!="number")return!1;var e=kr(t);return!isNaN(Number(e))}o(Tv,"isValid");function kv(t,e){Wt(2,arguments);var r=Yn(e);return Iv(t,-r)}o(kv,"subMilliseconds");var Mne=864e5;function Mv(t){Wt(1,arguments);var e=kr(t),r=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var n=e.getTime(),i=r-n;return Math.floor(i/Mne)+1}o(Mv,"getUTCDayOfYear");function sc(t){Wt(1,arguments);var e=1,r=kr(t),n=r.getUTCDay(),i=(n<e?7:0)+n-e;return r.setUTCDate(r.getUTCDate()-i),r.setUTCHours(0,0,0,0),r}o(sc,"startOfUTCISOWeek");function Sh(t){Wt(1,arguments);var e=kr(t),r=e.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(r+1,0,4),n.setUTCHours(0,0,0,0);var i=sc(n),s=new Date(0);s.setUTCFullYear(r,0,4),s.setUTCHours(0,0,0,0);var a=sc(s);return e.getTime()>=i.getTime()?r+1:e.getTime()>=a.getTime()?r:r-1}o(Sh,"getUTCISOWeekYear");function Rv(t){Wt(1,arguments);var e=Sh(t),r=new Date(0);r.setUTCFullYear(e,0,4),r.setUTCHours(0,0,0,0);var n=sc(r);return n}o(Rv,"startOfUTCISOWeekYear");var Rne=6048e5;function Bv(t){Wt(1,arguments);var e=kr(t),r=sc(e).getTime()-Rv(e).getTime();return Math.round(r/Rne)+1}o(Bv,"getUTCISOWeek");function ac(t,e){var r,n,i,s,a,f,d,h;Wt(1,arguments);var p=oc(),y=Yn((r=(n=(i=(s=e?.weekStartsOn)!==null&&s!==void 0?s:e==null||(a=e.locale)===null||a===void 0||(f=a.options)===null||f===void 0?void 0:f.weekStartsOn)!==null&&i!==void 0?i:p.weekStartsOn)!==null&&n!==void 0?n:(d=p.locale)===null||d===void 0||(h=d.options)===null||h===void 0?void 0:h.weekStartsOn)!==null&&r!==void 0?r:0);if(!(y>=0&&y<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var I=kr(t),T=I.getUTCDay(),D=(T<y?7:0)+T-y;return I.setUTCDate(I.getUTCDate()-D),I.setUTCHours(0,0,0,0),I}o(ac,"startOfUTCWeek");function Th(t,e){var r,n,i,s,a,f,d,h;Wt(1,arguments);var p=kr(t),y=p.getUTCFullYear(),I=oc(),T=Yn((r=(n=(i=(s=e?.firstWeekContainsDate)!==null&&s!==void 0?s:e==null||(a=e.locale)===null||a===void 0||(f=a.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&i!==void 0?i:I.firstWeekContainsDate)!==null&&n!==void 0?n:(d=I.locale)===null||d===void 0||(h=d.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&r!==void 0?r:1);if(!(T>=1&&T<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var D=new Date(0);D.setUTCFullYear(y+1,0,T),D.setUTCHours(0,0,0,0);var R=ac(D,e),H=new Date(0);H.setUTCFullYear(y,0,T),H.setUTCHours(0,0,0,0);var F=ac(H,e);return p.getTime()>=R.getTime()?y+1:p.getTime()>=F.getTime()?y:y-1}o(Th,"getUTCWeekYear");function Fv(t,e){var r,n,i,s,a,f,d,h;Wt(1,arguments);var p=oc(),y=Yn((r=(n=(i=(s=e?.firstWeekContainsDate)!==null&&s!==void 0?s:e==null||(a=e.locale)===null||a===void 0||(f=a.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&i!==void 0?i:p.firstWeekContainsDate)!==null&&n!==void 0?n:(d=p.locale)===null||d===void 0||(h=d.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&r!==void 0?r:1),I=Th(t,e),T=new Date(0);T.setUTCFullYear(I,0,y),T.setUTCHours(0,0,0,0);var D=ac(T,e);return D}o(Fv,"startOfUTCWeekYear");var Bne=6048e5;function Pv(t,e){Wt(1,arguments);var r=kr(t),n=ac(r,e).getTime()-Fv(r,e).getTime();return Math.round(n/Bne)+1}o(Pv,"getUTCWeek");function jt(t,e){for(var r=t<0?"-":"",n=Math.abs(t).toString();n.length<e;)n="0"+n;return r+n}o(jt,"addLeadingZeros");var Fne={y:o(function(e,r){var n=e.getUTCFullYear(),i=n>0?n:1-n;return jt(r==="yy"?i%100:i,r.length)},"y"),M:o(function(e,r){var n=e.getUTCMonth();return r==="M"?String(n+1):jt(n+1,2)},"M"),d:o(function(e,r){return jt(e.getUTCDate(),r.length)},"d"),a:o(function(e,r){var n=e.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},"a"),h:o(function(e,r){return jt(e.getUTCHours()%12||12,r.length)},"h"),H:o(function(e,r){return jt(e.getUTCHours(),r.length)},"H"),m:o(function(e,r){return jt(e.getUTCMinutes(),r.length)},"m"),s:o(function(e,r){return jt(e.getUTCSeconds(),r.length)},"s"),S:o(function(e,r){var n=r.length,i=e.getUTCMilliseconds(),s=Math.floor(i*Math.pow(10,n-3));return jt(s,r.length)},"S")},Ys=Fne;var ad={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Pne={G:o(function(e,r,n){var i=e.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},"G"),y:o(function(e,r,n){if(r==="yo"){var i=e.getUTCFullYear(),s=i>0?i:1-i;return n.ordinalNumber(s,{unit:"year"})}return Ys.y(e,r)},"y"),Y:o(function(e,r,n,i){var s=Th(e,i),a=s>0?s:1-s;if(r==="YY"){var f=a%100;return jt(f,2)}return r==="Yo"?n.ordinalNumber(a,{unit:"year"}):jt(a,r.length)},"Y"),R:o(function(e,r){var n=Sh(e);return jt(n,r.length)},"R"),u:o(function(e,r){var n=e.getUTCFullYear();return jt(n,r.length)},"u"),Q:o(function(e,r,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(r){case"Q":return String(i);case"QQ":return jt(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},"Q"),q:o(function(e,r,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(r){case"q":return String(i);case"qq":return jt(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},"q"),M:o(function(e,r,n){var i=e.getUTCMonth();switch(r){case"M":case"MM":return Ys.M(e,r);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},"M"),L:o(function(e,r,n){var i=e.getUTCMonth();switch(r){case"L":return String(i+1);case"LL":return jt(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},"L"),w:o(function(e,r,n,i){var s=Pv(e,i);return r==="wo"?n.ordinalNumber(s,{unit:"week"}):jt(s,r.length)},"w"),I:o(function(e,r,n){var i=Bv(e);return r==="Io"?n.ordinalNumber(i,{unit:"week"}):jt(i,r.length)},"I"),d:o(function(e,r,n){return r==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):Ys.d(e,r)},"d"),D:o(function(e,r,n){var i=Mv(e);return r==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):jt(i,r.length)},"D"),E:o(function(e,r,n){var i=e.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},"E"),e:o(function(e,r,n,i){var s=e.getUTCDay(),a=(s-i.weekStartsOn+8)%7||7;switch(r){case"e":return String(a);case"ee":return jt(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},"e"),c:o(function(e,r,n,i){var s=e.getUTCDay(),a=(s-i.weekStartsOn+8)%7||7;switch(r){case"c":return String(a);case"cc":return jt(a,r.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},"c"),i:o(function(e,r,n){var i=e.getUTCDay(),s=i===0?7:i;switch(r){case"i":return String(s);case"ii":return jt(s,r.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},"i"),a:o(function(e,r,n){var i=e.getUTCHours(),s=i/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},"a"),b:o(function(e,r,n){var i=e.getUTCHours(),s;switch(i===12?s=ad.noon:i===0?s=ad.midnight:s=i/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},"b"),B:o(function(e,r,n){var i=e.getUTCHours(),s;switch(i>=17?s=ad.evening:i>=12?s=ad.afternoon:i>=4?s=ad.morning:s=ad.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},"B"),h:o(function(e,r,n){if(r==="ho"){var i=e.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return Ys.h(e,r)},"h"),H:o(function(e,r,n){return r==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):Ys.H(e,r)},"H"),K:o(function(e,r,n){var i=e.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(i,{unit:"hour"}):jt(i,r.length)},"K"),k:o(function(e,r,n){var i=e.getUTCHours();return i===0&&(i=24),r==="ko"?n.ordinalNumber(i,{unit:"hour"}):jt(i,r.length)},"k"),m:o(function(e,r,n){return r==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):Ys.m(e,r)},"m"),s:o(function(e,r,n){return r==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):Ys.s(e,r)},"s"),S:o(function(e,r){return Ys.S(e,r)},"S"),X:o(function(e,r,n,i){var s=i._originalDate||e,a=s.getTimezoneOffset();if(a===0)return"Z";switch(r){case"X":return PD(a);case"XXXX":case"XX":return mf(a);case"XXXXX":case"XXX":default:return mf(a,":")}},"X"),x:o(function(e,r,n,i){var s=i._originalDate||e,a=s.getTimezoneOffset();switch(r){case"x":return PD(a);case"xxxx":case"xx":return mf(a);case"xxxxx":case"xxx":default:return mf(a,":")}},"x"),O:o(function(e,r,n,i){var s=i._originalDate||e,a=s.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+FD(a,":");case"OOOO":default:return"GMT"+mf(a,":")}},"O"),z:o(function(e,r,n,i){var s=i._originalDate||e,a=s.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+FD(a,":");case"zzzz":default:return"GMT"+mf(a,":")}},"z"),t:o(function(e,r,n,i){var s=i._originalDate||e,a=Math.floor(s.getTime()/1e3);return jt(a,r.length)},"t"),T:o(function(e,r,n,i){var s=i._originalDate||e,a=s.getTime();return jt(a,r.length)},"T")};function FD(t,e){var r=t>0?"-":"+",n=Math.abs(t),i=Math.floor(n/60),s=n%60;if(s===0)return r+String(i);var a=e||"";return r+String(i)+a+jt(s,2)}o(FD,"formatTimezoneShort");function PD(t,e){if(t%60===0){var r=t>0?"-":"+";return r+jt(Math.abs(t)/60,2)}return mf(t,e)}o(PD,"formatTimezoneWithOptionalMinutes");function mf(t,e){var r=e||"",n=t>0?"-":"+",i=Math.abs(t),s=jt(Math.floor(i/60),2),a=jt(i%60,2);return n+s+r+a}o(mf,"formatTimezone");var OD=Pne;var ND=o(function(e,r){switch(e){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},"dateLongFormatter"),LD=o(function(e,r){switch(e){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},"timeLongFormatter"),One=o(function(e,r){var n=e.match(/(P+)(p+)?/)||[],i=n[1],s=n[2];if(!s)return ND(e,r);var a;switch(i){case"P":a=r.dateTime({width:"short"});break;case"PP":a=r.dateTime({width:"medium"});break;case"PPP":a=r.dateTime({width:"long"});break;case"PPPP":default:a=r.dateTime({width:"full"});break}return a.replace("{{date}}",ND(i,r)).replace("{{time}}",LD(s,r))},"dateTimeLongFormatter"),Nne={p:LD,P:One},UD=Nne;var Lne=["D","DD"],Une=["YY","YYYY"];function qD(t){return Lne.indexOf(t)!==-1}o(qD,"isProtectedDayOfYearToken");function $D(t){return Une.indexOf(t)!==-1}o($D,"isProtectedWeekYearToken");function Ov(t,e,r){if(t==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}o(Ov,"throwProtectedError");var qne={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},$ne=o(function(e,r,n){var i,s=qne[e];return typeof s=="string"?i=s:r===1?i=s.one:i=s.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i},"formatDistance"),jD=$ne;function kh(t){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.width?String(e.width):t.defaultWidth,n=t.formats[r]||t.formats[t.defaultWidth];return n}}o(kh,"buildFormatLongFn");var jne={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Hne={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Vne={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},zne={date:kh({formats:jne,defaultWidth:"full"}),time:kh({formats:Hne,defaultWidth:"full"}),dateTime:kh({formats:Vne,defaultWidth:"full"})},HD=zne;var Kne={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Gne=o(function(e,r,n,i){return Kne[e]},"formatRelative"),VD=Gne;function gf(t){return function(e,r){var n=r!=null&&r.context?String(r.context):"standalone",i;if(n==="formatting"&&t.formattingValues){var s=t.defaultFormattingWidth||t.defaultWidth,a=r!=null&&r.width?String(r.width):s;i=t.formattingValues[a]||t.formattingValues[s]}else{var f=t.defaultWidth,d=r!=null&&r.width?String(r.width):t.defaultWidth;i=t.values[d]||t.values[f]}var h=t.argumentCallback?t.argumentCallback(e):e;return i[h]}}o(gf,"buildLocalizeFn");var Wne={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Yne={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Jne={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Xne={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Zne={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Qne={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},eie=o(function(e,r){var n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},"ordinalNumber"),tie={ordinalNumber:eie,era:gf({values:Wne,defaultWidth:"wide"}),quarter:gf({values:Yne,defaultWidth:"wide",argumentCallback:o(function(e){return e-1},"argumentCallback")}),month:gf({values:Jne,defaultWidth:"wide"}),day:gf({values:Xne,defaultWidth:"wide"}),dayPeriod:gf({values:Zne,defaultWidth:"wide",formattingValues:Qne,defaultFormattingWidth:"wide"})},zD=tie;function bf(t){return function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,i=n&&t.matchPatterns[n]||t.matchPatterns[t.defaultMatchWidth],s=e.match(i);if(!s)return null;var a=s[0],f=n&&t.parsePatterns[n]||t.parsePatterns[t.defaultParseWidth],d=Array.isArray(f)?nie(f,function(y){return y.test(a)}):rie(f,function(y){return y.test(a)}),h;h=t.valueCallback?t.valueCallback(d):d,h=r.valueCallback?r.valueCallback(h):h;var p=e.slice(a.length);return{value:h,rest:p}}}o(bf,"buildMatchFn");function rie(t,e){for(var r in t)if(t.hasOwnProperty(r)&&e(t[r]))return r}o(rie,"findKey");function nie(t,e){for(var r=0;r<t.length;r++)if(e(t[r]))return r}o(nie,"findIndex");function Nv(t){return function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.match(t.matchPattern);if(!n)return null;var i=n[0],s=e.match(t.parsePattern);if(!s)return null;var a=t.valueCallback?t.valueCallback(s[0]):s[0];a=r.valueCallback?r.valueCallback(a):a;var f=e.slice(i.length);return{value:a,rest:f}}}o(Nv,"buildMatchPatternFn");var iie=/^(\d+)(th|st|nd|rd)?/i,oie=/\d+/i,sie={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},aie={any:[/^b/i,/^(a|c)/i]},cie={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},fie={any:[/1/i,/2/i,/3/i,/4/i]},uie={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},die={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},lie={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},hie={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},pie={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},mie={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},gie={ordinalNumber:Nv({matchPattern:iie,parsePattern:oie,valueCallback:o(function(e){return parseInt(e,10)},"valueCallback")}),era:bf({matchPatterns:sie,defaultMatchWidth:"wide",parsePatterns:aie,defaultParseWidth:"any"}),quarter:bf({matchPatterns:cie,defaultMatchWidth:"wide",parsePatterns:fie,defaultParseWidth:"any",valueCallback:o(function(e){return e+1},"valueCallback")}),month:bf({matchPatterns:uie,defaultMatchWidth:"wide",parsePatterns:die,defaultParseWidth:"any"}),day:bf({matchPatterns:lie,defaultMatchWidth:"wide",parsePatterns:hie,defaultParseWidth:"any"}),dayPeriod:bf({matchPatterns:pie,defaultMatchWidth:"any",parsePatterns:mie,defaultParseWidth:"any"})},KD=gie;var bie={code:"en-US",formatDistance:jD,formatLong:HD,formatRelative:VD,localize:zD,match:KD,options:{weekStartsOn:0,firstWeekContainsDate:1}},GD=bie;var WD=GD;var vie=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,yie=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,xie=/^'([^]*?)'?$/,wie=/''/g,_ie=/[a-zA-Z]/;function Mh(t,e,r){var n,i,s,a,f,d,h,p,y,I,T,D,R,H,F,V,X,J;Wt(2,arguments);var re=String(e),z=oc(),$=(n=(i=r?.locale)!==null&&i!==void 0?i:z.locale)!==null&&n!==void 0?n:WD,G=Yn((s=(a=(f=(d=r?.firstWeekContainsDate)!==null&&d!==void 0?d:r==null||(h=r.locale)===null||h===void 0||(p=h.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&f!==void 0?f:z.firstWeekContainsDate)!==null&&a!==void 0?a:(y=z.locale)===null||y===void 0||(I=y.options)===null||I===void 0?void 0:I.firstWeekContainsDate)!==null&&s!==void 0?s:1);if(!(G>=1&&G<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var le=Yn((T=(D=(R=(H=r?.weekStartsOn)!==null&&H!==void 0?H:r==null||(F=r.locale)===null||F===void 0||(V=F.options)===null||V===void 0?void 0:V.weekStartsOn)!==null&&R!==void 0?R:z.weekStartsOn)!==null&&D!==void 0?D:(X=z.locale)===null||X===void 0||(J=X.options)===null||J===void 0?void 0:J.weekStartsOn)!==null&&T!==void 0?T:0);if(!(le>=0&&le<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!$.localize)throw new RangeError("locale must contain localize property");if(!$.formatLong)throw new RangeError("locale must contain formatLong property");var P=kr(t);if(!Tv(P))throw new RangeError("Invalid time value");var g=Dv(P),_=kv(P,g),v={firstWeekContainsDate:G,weekStartsOn:le,locale:$,_originalDate:P},l=re.match(yie).map(function(b){var E=b[0];if(E==="p"||E==="P"){var C=UD[E];return C(b,$.formatLong)}return b}).join("").match(vie).map(function(b){if(b==="''")return"'";var E=b[0];if(E==="'")return Eie(b);var C=OD[E];if(C)return!(r!=null&&r.useAdditionalWeekYearTokens)&&$D(b)&&Ov(b,e,String(t)),!(r!=null&&r.useAdditionalDayOfYearTokens)&&qD(b)&&Ov(b,e,String(t)),C(_,b,$.localize,v);if(E.match(_ie))throw new RangeError("Format string contains an unescaped latin alphabet character `"+E+"`");return b}).join("");return l}o(Mh,"format");function Eie(t){var e=t.match(xie);return e?e[1].replace(wie,"'"):t}o(Eie,"cleanEscapedString");var Aie=o((t,e)=>t.split(" error")[0]||t,"transformErrorCheck"),Cie=o((t,e)=>t.startsWith("expiration")?e.expirationDate?`Invalid \u2022 Expired ${Mh(new Date(e.expirationDate),"dd MMM yyyy").toUpperCase()}`:"Invalid \u2022 Expired":t,"transformErrorMessage"),Iie=o((t,e)=>({proof:"Valid",expiration:e.expirationDate?`Valid \u2022 Expires ${Mh(new Date(e.expirationDate),"dd MMM yyyy").toUpperCase()}`:"Valid \u2022 Does Not Expire"})[t]||t,"transformCheckMessage"),YD=o(t=>async(e,r,n,i=!1)=>{let s=await t.invoke.verifyCredential(r,n);if(!i)return s;let a=[];return s.errors.forEach(f=>{a.push({status:nm.Failed,check:Aie(f,r),details:Cie(f,r)})}),s.warnings.forEach(f=>{a.push({status:nm.Error,check:"hmm",message:f})}),s.checks.forEach(f=>{a.push({status:nm.Success,check:f,message:Iie(f,r)})}),a},"verifyCredential");var vf=o(t=>({name:"LearnCard",displayName:"LearnCard",description:"Adds opinionated logic to a LearnCard",methods:{verifyCredential:YD(t)}}),"getLearnCardPlugin");var Lv=o(async({didkit:t,debug:e}={})=>{let r=await(await Qo({debug:e})).addPlugin(await hh(t)),s=await(await(await r.addPlugin(sf(r))).addPlugin(Na())).addPlugin(await Va());return s.addPlugin(vf(s))},"emptyLearnCard");function sm(t){var e=0,r=t.length,n=[];if(r%2)throw new Error("invalid hex:"+t);for(;e<r;e+=2)n.push(parseInt(t.substr(e,2),16));return new Uint8Array(n)}o(sm,"toUint8Array");var Die=Object.defineProperty,Sie=o((t,e)=>Die(t,"name",{value:e,configurable:!0}),"__name"),JD=Sie(t=>/^[0-9a-f]+$/i.test(t),"isHex");var Tie=["key","tz","pkh:tz","pkh:tezos","pkh:sol","pkh:solana"],kie=["key","tz","ethr","pkh:tz","pkh:tezos","pkh:eth","pkh:celo","pkh:poly","pkh:btc","pkh:doge","pkh:eip155","pkh:bip122"],XD=o(t=>{if(Tie.includes(t))return"ed25519";if(kie.includes(t)||t.startsWith("pkh:eip155:")||t.startsWith("pkh:bip122:"))return"secp256k1";throw new Error("Unspported Did Method")},"getAlgorithmForDidMethod");var Uv=o(async(t,e,r)=>{if(e.length===0)throw new Error("Please don't use an empty string for a key!");if(!JD(e))throw new Error("Key must be a hexadecimal string!");if(e.length>64)throw new Error("Key must be less than 64 characters");e.length<64&&(console.warn("Warning: A LearnCard has been initialized with a seed that is less than 32 bytes, and will be padded with zeroes"),console.warn("Please instantiate LearnCards using 32 bytes that have been randomly generated in a cryptographically secure fashion!"),console.warn("See https://app.gitbook.com/o/6uDv1QDlxaaZC7i8EaGb/s/FXvEJ9j3Vf3FW5Nc557n/learn-card-packages/learncard-core/instantiation#key-generation for details"));let n=e.padStart(64,"0"),i=sm(n),s={},a={ed25519:t.invoke.generateEd25519KeyFromBytes(i),secp256k1:t.invoke.generateSecp256k1KeyFromBytes(i)},f=o((h=r)=>{if(!s[h]){let p=XD(h);s[h]=t.invoke.keyToDid(h,a[p])}return s[h]},"did"),d=o((h="ed25519")=>{if(!a[h])throw new Error("Unsupported algorithm");return a[h]},"keypair");return{name:"DID Key",displayName:"DID Key",description:"Generates dids and JWKs using 32 Secure Random Bytes of Entropy",id:{did:(h,p)=>f(p),keypair:(h,p)=>d(p)},methods:{getSubjectDid:(h,p=r)=>f(p),getSubjectKeypair:(h,p="ed25519")=>d(p),getKey:()=>n}}},"getDidKeyPlugin");var ZD=o(t=>async(e,r,n={})=>{let i=e.id.keypair();if(!i)throw new Error("Cannot issue credential: Could not get subject keypair");let a={verificationMethod:await e.invoke.didToVerificationMethod(typeof r.issuer=="string"?r.issuer:r.issuer.id),proofPurpose:"assertionMethod",type:"Ed25519Signature2020",...n};return t.invoke.issueCredential(r,a,i)},"issueCredential");var QD=o(t=>async(e,r,n={})=>t.invoke.verifyCredential(r,n),"verifyCredential");var eS=o(t=>async(e,r,n={})=>{let i=e.id.keypair();if(!i)throw new Error("Cannot issue credential: Could not get subject keypair");let a={verificationMethod:await e.invoke.didToVerificationMethod(e.id.did()),...n.proofFormat==="jwt"?{}:{proofPurpose:"assertionMethod"},...n.proofFormat==="jwt"?{}:{type:"Ed25519Signature2020"},...n};return t.invoke.issuePresentation(r,a,i)},"issuePresentation");var tS=o(t=>async(e,r,n={})=>t.invoke.verifyPresentation(r,n),"verifyPresentation");var am=o(t=>({name:"VC",displayName:"VC",description:"Handles the infrastructure needed to issue and verify credentials and presentations",methods:{issueCredential:ZD(t),verifyCredential:QD(t),issuePresentation:eS(t),verifyPresentation:tS(t),getTestVc:(e,r="did:example:d23dd687a7dc6787646f2eb98d0")=>{let n=e.id.did();return{"@context":["https://www.w3.org/2018/credentials/v1"],id:"http://example.org/credentials/3731",type:["VerifiableCredential"],issuer:n,issuanceDate:"2020-08-19T21:41:50Z",credentialSubject:{id:r}}},getTestVp:async(e,r)=>{let n=r||await e.invoke.issueCredential(e.invoke.getTestVc()),i=e.id.did();return{"@context":["https://www.w3.org/2018/credentials/v1"],type:["VerifiablePresentation"],holder:i,verifiableCredential:n}},getDidAuthVp:async(e,r={})=>{let n=e.id.did(),i={"@context":["https://www.w3.org/2018/credentials/v1"],type:["VerifiablePresentation"],holder:n};return e.invoke.issuePresentation(i,{proofPurpose:"authentication",...r})}}}),"getVCPlugin");var qv={name:"VC Resolution",displayName:"VC Resolution",description:"[Deprecated] Allows for a fallback mechanism of resolving credentials",methods:{resolveCredential:async(t,e)=>{throw new Error(`No Credential Resolution Plugins found that can resolve ${e}`)}}};var wL=Mt(rS());function Mie(t,e){try{var r=t()}catch(n){return e(n)}return r&&r.then?r.then(void 0,e):r}o(Mie,"_catch");function Rie(){let t=new Map;return function(e,r){try{let i=function(a){if(n)return a;let f=t.get(e.didUrl);return f!==void 0?f:Promise.resolve(r()).then(function(d){var h;return((h=d.didResolutionMetadata)==null?void 0:h.error)!=="notFound"&&t.set(e.didUrl,d),d})};o(i,"_temp2");let n,s=function(){if(e.params&&e.params["no-cache"]==="true")return Promise.resolve(r()).then(function(a){return n=1,a})}();return Promise.resolve(s&&s.then?s.then(i):i(s))}catch(n){return Promise.reject(n)}}}o(Rie,"inMemoryCache");function Bie(t,e){return e()}o(Bie,"noCache");var Fie="(?:%[0-9a-fA-F]{2})",nS=`(?:[a-zA-Z0-9._-]|${Fie})`,Pie="([a-z0-9]+)",Oie=`((?:${nS}*:)*(${nS}+))`,iS="[a-zA-Z0-9_.:%-]",Nie=`;${iS}+=${iS}*`,Lie=`((${Nie})*)`,Uie="(/[^#?]*)?",qie="([?][^#]*)?",$ie="(#.*)?",jie=new RegExp(`^did:${Pie}:${Oie}${Lie}${Uie}${qie}${$ie}$`);function $v(t){if(t===""||!t)return null;let e=t.match(jie);if(e){let r={did:`did:${e[1]}:${e[2]}`,method:e[1],id:e[2],didUrl:t};if(e[4]){let n=e[4].slice(1).split(";");r.params={};for(let i of n){let s=i.split("=");r.params[s[0]]=s[1]}}return e[6]&&(r.path=e[6]),e[7]&&(r.query=e[7].slice(1)),e[8]&&(r.fragment=e[8].slice(1)),r}return null}o($v,"parse");var cm={didResolutionMetadata:{},didDocument:null,didDocumentMetadata:{}};function Hie(t){return function(e,r,n){try{return Promise.resolve(Mie(function(){return Promise.resolve(t(e,r,n)).then(function(i){return{...cm,didResolutionMetadata:{contentType:"application/did+ld+json"},didDocument:i}})},function(i){return{...cm,didResolutionMetadata:{error:"notFound",message:i.toString()}}}))}catch(i){return Promise.reject(i)}}}o(Hie,"wrapLegacyResolver");var Bh=class{constructor(e={},r={}){this.registry=void 0,this.cache=void 0,this.registry=e,this.cache=r.cache===!0?Rie():r.cache||Bie,r.legacyResolvers&&Object.keys(r.legacyResolvers).map(n=>{this.registry[n]||(this.registry[n]=Hie(r.legacyResolvers[n]))})}resolve(e,r={}){try{let n=this,i=$v(e);if(i===null)return Promise.resolve({...cm,didResolutionMetadata:{error:"invalidDid"}});let s=n.registry[i.method];return s?Promise.resolve(n.cache(i,()=>s(i.did,i,n,r))):Promise.resolve({...cm,didResolutionMetadata:{error:"unsupportedDidMethod"}})}catch(n){return Promise.reject(n)}}};o(Bh,"Resolver");jv();Am();pd();fm();Fh();cy();var fx=Mt(HS()),hM=Mt(by()),ux=Mt(gk()),ig=Mt(Xm()),pM=Mt($k()),r0=Mt(zk()),dx=Mt(oM()),lx=Mt(kf());function to(t){return Pt(t,"base64url")}o(to,"bytesToBase64url");function Zn(t){let e=t.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"");return $t(e,"base64url")}o(Zn,"base64ToBytes");function hx(t){return $t(t,"base58btc")}o(hx,"base58ToBytes");function sx(t){let e=t.startsWith("0x")?t.substring(2):t;return $t(e.toLowerCase(),"base16")}o(sx,"hexToBytes");function ax(t){return to($t(t))}o(ax,"encodeBase64url");function mM(t){return Pt(Zn(t))}o(mM,"decodeBase64url");function Ff(t){return Pt(t,"base16")}o(Ff,"bytesToHex");function gM(t){return $t(t)}o(gM,"stringToBytes");function pfe({r:t,s:e,recoveryParam:r},n){let i=new Uint8Array(n?65:64);if(i.set($t(t,"base16"),0),i.set($t(e,"base16"),32),n){if(typeof r>"u")throw new Error("Signer did not return a recoveryParam");i[64]=r}return to(i)}o(pfe,"toJose");function mfe(t){let e=Zn(t);if(e.length<64||e.length>65)throw new TypeError(`Wrong size for signature. Expected 64 or 65 bytes, but got ${e.length}`);let r=Ff(e.slice(0,32)),n=Ff(e.slice(32,64)),i=e.length===65?e[64]:void 0;return{r,s:n,recoveryParam:i}}o(mfe,"fromJose");function bM(t,e){return Co([Zn(t),Zn(e)])}o(bM,"toSealed");var gfe=/^(0x)?([a-fA-F0-9]{64}|[a-fA-F0-9]{128})$/,bfe=/^([1-9A-HJ-NP-Za-km-z]{44}|[1-9A-HJ-NP-Za-km-z]{88})$/,vfe=/^([0-9a-zA-Z=\-_+/]{43}|[0-9a-zA-Z=\-_+/]{86})(={0,2})$/;function yfe(t){if(typeof t=="string"){if(gfe.test(t))return sx(t);if(bfe.test(t))return hx(t);if(vfe.test(t))return Zn(t);throw TypeError("bad_key: Invalid private key format")}else{if(t instanceof Uint8Array)return t;throw TypeError("bad_key: Invalid private key format")}}o(yfe,"parseKey");function vM(t){let e=typeof t=="string"?$t(t):t;return(0,fx.hash)(e)}o(vM,"sha256");function xfe(t){return new Uint8Array(hM.keccak_256.arrayBuffer(t))}o(xfe,"keccak");function wfe(t){let e=$t(t.slice(2),"base16");return`0x${Pt(xfe(e).slice(-20),"base16")}`}o(wfe,"toEthereumAddress");function cx(t,e=new Uint8Array(4)){let r=$t(t.toString(),"base10");return e.set(r,4-r.length),e}o(cx,"writeUint32BE");var ox=o(t=>Co([cx(t.length),t]),"lengthAndInput");function yM(t,e,r,n,i){if(e!==256)throw new Error(`Unsupported key length: ${e}`);let s=Co([ox($t(r)),ox(typeof n>"u"?new Uint8Array(0):n),ox(typeof i>"u"?new Uint8Array(0):i),cx(e)]);return(0,fx.hash)(Co([cx(1),t,s]))}o(yM,"concatKDF");var z8e=new ux.ec("secp256k1");function xM(t){let e=yfe(t);if(e.length!==64)throw new Error(`bad_key: Invalid private key format. Expecting 64 bytes, but got ${e.length}`);return function(r){try{let n=typeof r=="string"?gM(r):r,i=(0,ig.sign)(e,n);return Promise.resolve(to(i))}catch(n){return Promise.reject(n)}}}o(xM,"EdDSASigner");function wM(t){return typeof t=="object"&&"r"in t&&"s"in t}o(wM,"instanceOfEcdsaSignature");function sM(t){return o(function(r,n){try{return Promise.resolve(n(r)).then(function(i){if(wM(i))return pfe(i,t);if(t&&typeof mfe(i).recoveryParam>"u")throw new Error("not_supported: ES256K-R not supported when signer doesn't provide a recovery param");return i})}catch(i){return Promise.reject(i)}},"sign")}o(sM,"ES256KSignerAlg");function aM(){return o(function(e,r){try{return Promise.resolve(r(e)).then(function(n){if(wM(n))throw new Error("invalid_config: expected a signer function that returns a string instead of signature object");return n})}catch(n){return Promise.reject(n)}},"sign")}o(aM,"Ed25519SignerAlg");var _fe={ES256K:sM(),"ES256K-R":sM(!0),Ed25519:aM(),EdDSA:aM()};function Efe(t){let e=_fe[t];if(!e)throw new Error(`not_supported: Unsupported algorithm ${t}`);return e}o(Efe,"SignerAlg");var px=new ux.ec("secp256k1");function ng(t,e=!1){let r=Zn(t);if(r.length!==(e?65:64))throw new Error("wrong signature length");let n=Ff(r.slice(0,32)),i=Ff(r.slice(32,64)),s={r:n,s:i};return e&&(s.recoveryParam=r[64]),s}o(ng,"toSignatureObject");function mx(t){if(t.publicKeyBase58)return hx(t.publicKeyBase58);if(t.publicKeyBase64)return Zn(t.publicKeyBase64);if(t.publicKeyHex)return sx(t.publicKeyHex);if(t.publicKeyJwk&&t.publicKeyJwk.crv==="secp256k1"&&t.publicKeyJwk.x&&t.publicKeyJwk.y)return sx(px.keyFromPublic({x:Ff(Zn(t.publicKeyJwk.x)),y:Ff(Zn(t.publicKeyJwk.y))}).getPublic("hex"));if(t.publicKeyMultibase){let{base16:e,base58btc:r,base64:n,base64url:i}=$h;return e.decoder.or(r.decoder.or(n.decoder.or(i.decoder))).decode(t.publicKeyMultibase)}return new Uint8Array}o(mx,"extractPublicKeyBytes");function Afe(t,e,r){let n=vM(t),i=ng(e),s=r.filter(({ethereumAddress:d,blockchainAccountId:h})=>typeof d>"u"&&typeof h>"u"),a=r.filter(({ethereumAddress:d,blockchainAccountId:h})=>typeof d<"u"||typeof h!==void 0),f=s.find(d=>{try{let h=mx(d);return px.keyFromPublic(h).verify(n,i)}catch{return!1}});if(!f&&a.length>0&&(f=_M(t,e,a)),!f)throw new Error("invalid_signature: Signature invalid for JWT");return f}o(Afe,"verifyES256K");function _M(t,e,r){let n;if(e.length>86)n=[ng(e,!0)];else{let a=ng(e,!1);n=[{...a,recoveryParam:0},{...a,recoveryParam:1}]}let i=o(a=>{let f=vM(t),d=px.recoverPubKey(f,a,a.recoveryParam),h=d.encode("hex"),p=d.encode("hex",!0),y=wfe(h);return r.find(T=>{var D,R,H;let F=Ff(mx(T));return F===h||F===p||((D=T.ethereumAddress)==null?void 0:D.toLowerCase())===y||((R=T.blockchainAccountId)==null||(H=R.split("@eip155"))==null?void 0:H[0].toLowerCase())===y})},"checkSignatureAgainstSigner"),s=n.map(i).filter(a=>typeof a<"u");if(s.length===0)throw new Error("invalid_signature: Signature invalid for JWT");return s[0]}o(_M,"verifyRecoverableES256K");function cM(t,e,r){let n=gM(t),i=Zn(e),s=r.find(a=>(0,ig.verify)(mx(a),n,i));if(!s)throw new Error("invalid_signature: Signature invalid for JWT");return s}o(cM,"verifyEd25519");var Cfe={ES256K:Afe,"ES256K-R":_M,Ed25519:cM,EdDSA:cM};function EM(t){let e=Cfe[t];if(!e)throw new Error(`not_supported: Unsupported algorithm ${t}`);return e}o(EM,"VerifierAlgorithm");EM.toSignatureObject=ng;var AM=o(function(t,e,r={},n={}){try{r.alg||(r.alg=Ife);let i=typeof t=="string"?t:fM(t,n.canonicalize),s=[fM(r,n.canonicalize),i].join("."),a=Efe(r.alg);return Promise.resolve(a(s,e)).then(function(f){return[s,f].join(".")})}catch(i){return Promise.reject(i)}},"createJWS");var Ife="ES256K";function fM(t,e=!1){return ax(e?(0,pM.default)(t):JSON.stringify(t))}o(fM,"encodeSection");function Dfe(t){let e=t.match(/^([a-zA-Z0-9_-]+)\.([a-zA-Z0-9_-]+)\.([a-zA-Z0-9_-]+)$/);if(e)return{header:JSON.parse(mM(e[1])),payload:e[2],signature:e[3],data:`${e[1]}.${e[2]}`};throw new Error("invalid_argument: Incorrect format JWS")}o(Dfe,"decodeJWS");function Sfe({header:t,data:e,signature:r},n){return Array.isArray(n)||(n=[n]),EM(t.alg)(e,r,n)}o(Sfe,"verifyJWSDecoded");function CM(t,e){let r=Dfe(t);return Sfe(r,e)}o(CM,"verifyJWS");function Tfe(t,e,r){for(var n;;){var i=t();if(wc(i)&&(i=i.v),!i)return s;if(i.then){n=0;break}var s=r();if(s&&s.then)if(wc(s))s=s.s;else{n=1;break}if(e){var a=e();if(a&&a.then&&!wc(a)){n=2;break}}}var f=new Pf,d=qr.bind(null,f,2);return(n===0?i.then(p):n===1?s.then(h):a.then(y)).then(void 0,d),f;function h(I){s=I;do{if(e&&(a=e(),a&&a.then&&!wc(a))){a.then(y).then(void 0,d);return}if(i=t(),!i||wc(i)&&!i.v){qr(f,1,s);return}if(i.then){i.then(p).then(void 0,d);return}s=r(),wc(s)&&(s=s.v)}while(!s||!s.then);s.then(h).then(void 0,d)}o(h,"_resumeAfterBody");function p(I){I?(s=r(),s&&s.then?s.then(h).then(void 0,d):h(s)):qr(f,1,s)}o(p,"_resumeAfterTest");function y(){(i=t())?i.then?i.then(p).then(void 0,d):p(i):qr(f,1,s)}o(y,"_resumeAfterUpdate")}o(Tfe,"_for");var IM=o(function(t,e){try{let n=function(h){if(f===null)throw new Error("failure: Failed to decrypt");return f};o(n,"_temp5");let r;Rfe(t);let i=JSON.parse(mM(t.protected));if(i.enc!==e.enc)throw new Error(`not_supported: Decrypter does not supported: '${i.enc}'`);let s=bM(t.ciphertext,t.tag),a=new Uint8Array(Buffer.from(t.aad?`${t.protected}.${t.aad}`:t.protected)),f=null,d=function(){return i.alg==="dir"&&e.alg==="dir"?Promise.resolve(e.decrypt(s,Zn(t.iv),a)).then(function(h){f=h}):function(){if(!t.recipients||t.recipients.length===0)throw new Error("bad_jwe: missing recipients");{let h=0;return Tfe(function(){return!f&&h<t.recipients.length},function(){return h++},function(){let p=t.recipients[h];Object.assign(p.header,i);let y=function(){if(p.header.alg===e.alg)return Promise.resolve(e.decrypt(s,Zn(t.iv),a,p)).then(function(I){f=I})}();if(y&&y.then)return y.then(function(){})})}}()}();return Promise.resolve(d&&d.then?d.then(n):n(d))}catch(r){return Promise.reject(r)}},"decryptJWE"),uM=typeof Symbol<"u"?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function qr(t,e,r){if(!t.s){if(r instanceof Pf)if(r.s)e&1&&(e=r.s),r=r.v;else{r.o=qr.bind(null,t,e);return}if(r&&r.then){r.then(qr.bind(null,t,e),qr.bind(null,t,2));return}t.s=e,t.v=r;let n=t.o;n&&n(t)}}o(qr,"_settle");var Pf=function(){function t(){}return o(t,"_Pact"),t.prototype.then=function(e,r){let n=new t,i=this.s;if(i){let s=i&1?e:r;if(s){try{qr(n,1,s(this.v))}catch(a){qr(n,2,a)}return n}else return this}return this.o=function(s){try{let a=s.v;s.s&1?qr(n,1,e?e(a):a):r?qr(n,1,r(a)):qr(n,2,a)}catch(a){qr(n,2,a)}},n},t}();function wc(t){return t instanceof Pf&&t.s&1}o(wc,"_isSettledPact");function kfe(t,e,r){var n=-1,i,s;function a(f){try{for(;++n<t.length&&(!r||!r());)if(f=e(n),f&&f.then)if(wc(f))f=f.v;else{f.then(a,s||(s=qr.bind(null,i=new Pf,2)));return}i?qr(i,1,f):i=f}catch(d){qr(i||(i=new Pf),2,d)}}return o(a,"_cycle"),a(),i}o(kfe,"_forTo");function Mfe(t,e,r){if(typeof t[uM]=="function"){let p=function(y){try{for(;!(i=n.next()).done&&(!r||!r());)if(y=e(i.value),y&&y.then)if(wc(y))y=y.v;else{y.then(p,a||(a=qr.bind(null,s=new Pf,2)));return}s?qr(s,1,y):s=y}catch(I){qr(s||(s=new Pf),2,I)}};o(p,"_cycle");var n=t[uM](),i,s,a;if(p(),n.return){var f=o(function(y){try{i.done||n.return()}catch{}return y},"_fixup");if(s&&s.then)return s.then(f,function(y){throw f(y)});f()}return s}if(!("length"in t))throw new TypeError("Object is not iterable");for(var d=[],h=0;h<t.length;h++)d.push(t[h]);return kfe(d,function(p){return e(d[p])},r)}o(Mfe,"_forOf");function Rfe(t){if(!(t.protected&&t.iv&&t.ciphertext&&t.tag))throw new Error("bad_jwe: missing properties");t.recipients&&t.recipients.map(e=>{if(!(e.header&&e.encrypted_key))throw new Error("bad_jwe: malformed recipients")})}o(Rfe,"validateJWE");function dM({ciphertext:t,tag:e,iv:r,protectedHeader:n,recipient:i},s){let a={protected:n,iv:to(r),ciphertext:to(t),tag:to(e)};return s&&(a.aad=to(s)),i&&(a.recipients=[i]),a}o(dM,"encodeJWE");var DM=o(function(t,e,r={},n){try{if(e[0].alg==="dir"){if(e.length>1)throw new Error('not_supported: Can only do "dir" encryption to one key.');return Promise.resolve(e[0].encrypt(t,r,n)).then(function(i){return dM(i,n)})}else{let i=e[0].enc;if(!e.reduce((d,h)=>d&&h.enc===i,!0))throw new Error("invalid_argument: Incompatible encrypters passed");let s,a,f=Mfe(e,function(d){let h=function(){return s?Promise.resolve(d.encryptCek==null?void 0:d.encryptCek(s)).then(function(p){if(p){var y,I;(y=a)==null||(I=y.recipients)==null||I.push(p)}}):Promise.resolve(d.encrypt(t,r,n)).then(function(p){s=p.cek,a=dM(p,n)})}();if(h&&h.then)return h.then(function(){})});return Promise.resolve(f&&f.then?f.then(function(){return a}):a)}}catch(i){return Promise.reject(i)}},"createJWE");var SM=o(function(t,e){try{let r=o(function(i){try{return Promise.resolve(e.resolve(i)).then(function({didResolutionMetadata:s,didDocument:a}){var f;if(s!=null&&s.error||a==null)throw new Error(`resolver_error: Could not resolve ${i}: ${s.error}, ${s.message}`);if(!a.keyAgreement)throw new Error(`no_suitable_keys: Could not find x25519 key for ${i}`);let h=((f=a.keyAgreement)==null?void 0:f.map(p=>typeof p=="string"?[...a.publicKey||[],...a.verificationMethod||[]].find(y=>y.id===p):p).filter(p=>typeof p<"u")).filter(p=>p.type==="X25519KeyAgreementKey2019"&&Boolean(p.publicKeyBase58));if(!h.length)throw new Error(`no_suitable_keys: Could not find x25519 key for ${i}`);return h.map(p=>Ffe(hx(p.publicKeyBase58),p.id))})}catch(s){return Promise.reject(s)}},"encryptersForDID"),n=t.map(i=>r(i));return Promise.resolve(Promise.all(n)).then(function(i){return[].concat(...i)})}catch(r){return Promise.reject(r)}},"resolveX25519Encrypters");function TM(t){let e=new dx.XChaCha20Poly1305(t);return(r,n)=>{let i=(0,lx.randomBytes)(e.nonceLength),s=e.seal(i,r,n);return{ciphertext:s.subarray(0,s.length-e.tagLength),tag:s.subarray(s.length-e.tagLength),iv:i}}}o(TM,"xc20pEncrypter");function Bfe(t){let e=o(function(s,a={},f){try{let d=ax(JSON.stringify(Object.assign({alg:i},a,{enc:n}))),h=new Uint8Array(Buffer.from(f?`${d}.${to(f)}`:d));return Promise.resolve({...r(s,h),protectedHeader:d})}catch(d){return Promise.reject(d)}},"encrypt"),r=TM(t),n="XC20P",i="dir";return{alg:i,enc:n,encrypt:e}}o(Bfe,"xc20pDirEncrypter");function lM(t){let e=o(function(n,i,s){try{return Promise.resolve(r.open(i,n,s))}catch(a){return Promise.reject(a)}},"decrypt"),r=new dx.XChaCha20Poly1305(t);return{alg:"dir",enc:"XC20P",decrypt:e}}o(lM,"xc20pDirDecrypter");function Ffe(t,e){let r=o(function(f,d={},h){try{Object.assign(d,{alg:void 0});let p=(0,lx.randomBytes)(32);return Promise.resolve(Bfe(p).encrypt(f,d,h)).then(function(y){return Promise.resolve(n(p)).then(function(I){return{...y,recipient:I,cek:p}})})}catch(p){return Promise.reject(p)}},"encrypt"),n=o(function(f){try{let d=(0,r0.generateKeyPair)(),h=(0,r0.sharedKey)(d.secretKey,t),p=yM(h,s,i),y=TM(p)(f),I={encrypted_key:to(y.ciphertext),header:{alg:i,iv:to(y.iv),tag:to(y.tag),epk:{kty:"OKP",crv:a,x:to(d.publicKey)}}};return e&&(I.header.kid=e),Promise.resolve(I)}catch(d){return Promise.reject(d)}},"encryptCek"),i="ECDH-ES+XC20PKW",s=256,a="X25519";return{alg:i,enc:"XC20P",encrypt:r,encryptCek:n}}o(Ffe,"x25519Encrypter");function Pfe(t){if(!(t&&t.epk&&t.iv&&t.tag))throw new Error("bad_jwe: malformed header")}o(Pfe,"validateHeader");function kM(t){let e=o(function(s,a,f,d){try{let y=function(){let R=yM(T,n,r),H=bM(d.encrypted_key,d.header.tag);return Promise.resolve(lM(R).decrypt(H,Zn(d.header.iv))).then(function(F){return F===null?null:lM(F).decrypt(s,a,f)})};o(y,"_temp4");var h,p;if(Pfe((h=d)==null?void 0:h.header),d=d,((p=d.header.epk)==null?void 0:p.crv)!==i||typeof d.header.epk.x>"u")return Promise.resolve(null);let I=Zn(d.header.epk.x),T,D=function(){if(t instanceof Uint8Array)T=(0,r0.sharedKey)(t,I);else return Promise.resolve(t(I)).then(function(R){T=R})}();return Promise.resolve(D&&D.then?D.then(y):y(D))}catch(y){return Promise.reject(y)}},"decrypt"),r="ECDH-ES+XC20PKW",n=256,i="X25519";return{alg:r,enc:"XC20P",decrypt:e}}o(kM,"x25519Decrypter");ay();var og=o(({enumerable:t=!0,configurable:e=!1}={})=>({enumerable:t,configurable:e,writable:!1}),"readonly"),gx=o(function*(t,e){if(t!=null&&!(t instanceof Uint8Array))for(let[r,n]of Object.entries(t)){let i=[...e,r];if(n!=null&&typeof n=="object")if(Array.isArray(n))for(let[s,a]of n.entries()){let f=[...i,s],d=Xe.asCID(a);d?yield[f.join("/"),d]:typeof a=="object"&&(yield*gx(a,f))}else{let s=Xe.asCID(n);s?yield[i.join("/"),s]:yield*gx(n,i)}}},"links"),bx=o(function*(t,e){if(t!=null)for(let[r,n]of Object.entries(t)){let i=[...e,r];if(yield i.join("/"),n!=null&&!(n instanceof Uint8Array)&&typeof n=="object"&&!Xe.asCID(n))if(Array.isArray(n))for(let[s,a]of n.entries()){let f=[...i,s];yield f.join("/"),typeof a=="object"&&!Xe.asCID(a)&&(yield*bx(a,f))}else yield*bx(n,i)}},"tree"),Ofe=o((t,e)=>{let r=t;for(let[n,i]of e.entries()){if(r=r[i],r==null)throw new Error(`Object has no property at ${e.slice(0,n+1).map(a=>`[${JSON.stringify(a)}]`).join("")}`);let s=Xe.asCID(r);if(s)return{value:s,remaining:e.slice(n+1).join("/")}}return{value:r}},"get"),n0=class{constructor({cid:e,bytes:r,value:n}){if(!e||!r||typeof n>"u")throw new Error("Missing required argument");this.cid=e,this.bytes=r,this.value=n,this.asBlock=this,Object.defineProperties(this,{cid:og(),bytes:og(),value:og(),asBlock:og()})}links(){return gx(this.value,[])}tree(){return bx(this.value,[])}get(e="/"){return Ofe(this.value,e.split("/").filter(Boolean))}};o(n0,"Block");var Of=o(async({value:t,codec:e,hasher:r})=>{if(typeof t>"u")throw new Error('Missing required argument "value"');if(!e||!r)throw new Error("Missing required argument: codec or hasher");let n=e.encode(t),i=await r.digest(n),s=Xe.create(1,e.code,i);return new n0({value:t,bytes:n,cid:s})},"encode"),MM=o(async({bytes:t,codec:e,hasher:r})=>{if(!t)throw new Error('Missing required argument "bytes"');if(!e||!r)throw new Error("Missing required argument: codec or hasher");let n=e.decode(t),i=await r.digest(t),s=Xe.create(1,e.code,i);return new n0({value:n,bytes:t,cid:s})},"decode");So();Uh();sy();mm();var Po={};tr(Po,{code:()=>Od,decode:()=>Ix,encode:()=>$f,name:()=>bue});var Nfe=["string","number","bigint","symbol"],Lfe=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","HTMLElement","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function RM(t){if(t===null)return"null";if(t===void 0)return"undefined";if(t===!0||t===!1)return"boolean";let e=typeof t;if(Nfe.includes(e))return e;if(e==="function")return"Function";if(Array.isArray(t))return"Array";if(Ufe(t))return"Buffer";let r=qfe(t);return r||"Object"}o(RM,"is");function Ufe(t){return t&&t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer.call(null,t)}o(Ufe,"isBuffer");function qfe(t){let e=Object.prototype.toString.call(t).slice(8,-1);if(Lfe.includes(e))return e}o(qfe,"getObjectType");var xe=class{constructor(e,r,n){this.major=e,this.majorEncoded=e<<5,this.name=r,this.terminal=n}toString(){return`Type[${this.major}].${this.name}`}compare(e){return this.major<e.major?-1:this.major>e.major?1:0}};o(xe,"Type");xe.uint=new xe(0,"uint",!0);xe.negint=new xe(1,"negint",!0);xe.bytes=new xe(2,"bytes",!0);xe.string=new xe(3,"string",!0);xe.array=new xe(4,"array",!1);xe.map=new xe(5,"map",!1);xe.tag=new xe(6,"tag",!1);xe.float=new xe(7,"float",!0);xe.false=new xe(7,"false",!0);xe.true=new xe(7,"true",!0);xe.null=new xe(7,"null",!0);xe.undefined=new xe(7,"undefined",!0);xe.break=new xe(7,"break",!0);var Be=class{constructor(e,r,n){this.type=e,this.value=r,this.encodedLength=n,this.encodedBytes=void 0,this.byteValue=void 0}toString(){return`Token[${this.type}].${this.value}`}};o(Be,"Token");var kd=globalThis.process&&!globalThis.process.browser&&globalThis.Buffer&&typeof globalThis.Buffer.isBuffer=="function",$fe=new TextDecoder,jfe=new TextEncoder;function sg(t){return kd&&globalThis.Buffer.isBuffer(t)}o(sg,"isBuffer");function yx(t){return t instanceof Uint8Array?sg(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t:Uint8Array.from(t)}o(yx,"asU8A");var OM=kd?(t,e,r)=>r-e>64?globalThis.Buffer.from(t.subarray(e,r)).toString("utf8"):FM(t,e,r):(t,e,r)=>r-e>64?$fe.decode(t.subarray(e,r)):FM(t,e,r),NM=kd?t=>t.length>64?globalThis.Buffer.from(t):BM(t):t=>t.length>64?jfe.encode(t):BM(t),ms=o(t=>Uint8Array.from(t),"fromArray"),Md=kd?(t,e,r)=>sg(t)?new Uint8Array(t.subarray(e,r)):t.slice(e,r):(t,e,r)=>t.slice(e,r),LM=kd?(t,e)=>(t=t.map(r=>r instanceof Uint8Array?r:globalThis.Buffer.from(r)),yx(globalThis.Buffer.concat(t,e))):(t,e)=>{let r=new Uint8Array(e),n=0;for(let i of t)n+i.length>r.length&&(i=i.subarray(0,r.length-n)),r.set(i,n),n+=i.length;return r},UM=kd?t=>globalThis.Buffer.allocUnsafe(t):t=>new Uint8Array(t);function qM(t,e){if(sg(t)&&sg(e))return t.compare(e);for(let r=0;r<t.length;r++)if(t[r]!==e[r])return t[r]<e[r]?-1:1;return 0}o(qM,"compare");function BM(t,e=1/0){let r,n=t.length,i=null,s=[];for(let a=0;a<n;++a){if(r=t.charCodeAt(a),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&s.push(239,191,189);continue}else if(a+1===n){(e-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&s.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;s.push(r)}else if(r<2048){if((e-=2)<0)break;s.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;s.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return s}o(BM,"utf8ToBytes");function FM(t,e,r){let n=[];for(;e<r;){let i=t[e],s=null,a=i>239?4:i>223?3:i>191?2:1;if(e+a<=r){let f,d,h,p;switch(a){case 1:i<128&&(s=i);break;case 2:f=t[e+1],(f&192)===128&&(p=(i&31)<<6|f&63,p>127&&(s=p));break;case 3:f=t[e+1],d=t[e+2],(f&192)===128&&(d&192)===128&&(p=(i&15)<<12|(f&63)<<6|d&63,p>2047&&(p<55296||p>57343)&&(s=p));break;case 4:f=t[e+1],d=t[e+2],h=t[e+3],(f&192)===128&&(d&192)===128&&(h&192)===128&&(p=(i&15)<<18|(f&63)<<12|(d&63)<<6|h&63,p>65535&&p<1114112&&(s=p))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),e+=a}return Hfe(n)}o(FM,"utf8Slice");var PM=4096;function Hfe(t){let e=t.length;if(e<=PM)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=PM));return r}o(Hfe,"decodeCodePointsArray");var Vfe=256,Rd=class{constructor(e=Vfe){this.chunkSize=e,this.cursor=0,this.maxCursor=-1,this.chunks=[],this._initReuseChunk=null}reset(){this.cursor=0,this.maxCursor=-1,this.chunks.length&&(this.chunks=[]),this._initReuseChunk!==null&&(this.chunks.push(this._initReuseChunk),this.maxCursor=this._initReuseChunk.length-1)}push(e){let r=this.chunks[this.chunks.length-1];if(this.cursor+e.length<=this.maxCursor+1){let i=r.length-(this.maxCursor-this.cursor)-1;r.set(e,i)}else{if(r){let i=r.length-(this.maxCursor-this.cursor)-1;i<r.length&&(this.chunks[this.chunks.length-1]=r.subarray(0,i),this.maxCursor=this.cursor-1)}e.length<64&&e.length<this.chunkSize?(r=UM(this.chunkSize),this.chunks.push(r),this.maxCursor+=r.length,this._initReuseChunk===null&&(this._initReuseChunk=r),r.set(e,0)):(this.chunks.push(e),this.maxCursor+=e.length)}this.cursor+=e.length}toBytes(e=!1){let r;if(this.chunks.length===1){let n=this.chunks[0];e&&this.cursor>n.length/2?(r=this.cursor===n.length?n:n.subarray(0,this.cursor),this._initReuseChunk=null,this.chunks=[]):r=Md(n,0,this.cursor)}else r=LM(this.chunks,this.cursor);return e&&this.reset(),r}};o(Rd,"Bl");var yt="CBOR decode error:",xx="CBOR encode error:",i0=[];i0[23]=1;i0[24]=2;i0[25]=3;i0[26]=5;i0[27]=9;function aa(t,e,r){if(t.length-e<r)throw new Error(`${yt} not enough data for type`)}o(aa,"assertEnoughData");var Wr=[24,256,65536,4294967296,BigInt("18446744073709551616")];function vi(t,e,r){aa(t,e,1);let n=t[e];if(r.strict===!0&&n<Wr[0])throw new Error(`${yt} integer encoded in more bytes than necessary (strict decode)`);return n}o(vi,"readUint8");function yi(t,e,r){aa(t,e,2);let n=t[e]<<8|t[e+1];if(r.strict===!0&&n<Wr[1])throw new Error(`${yt} integer encoded in more bytes than necessary (strict decode)`);return n}o(yi,"readUint16");function xi(t,e,r){aa(t,e,4);let n=t[e]*16777216+(t[e+1]<<16)+(t[e+2]<<8)+t[e+3];if(r.strict===!0&&n<Wr[2])throw new Error(`${yt} integer encoded in more bytes than necessary (strict decode)`);return n}o(xi,"readUint32");function wi(t,e,r){aa(t,e,8);let n=t[e]*16777216+(t[e+1]<<16)+(t[e+2]<<8)+t[e+3],i=t[e+4]*16777216+(t[e+5]<<16)+(t[e+6]<<8)+t[e+7],s=(BigInt(n)<<BigInt(32))+BigInt(i);if(r.strict===!0&&s<Wr[3])throw new Error(`${yt} integer encoded in more bytes than necessary (strict decode)`);if(s<=Number.MAX_SAFE_INTEGER)return Number(s);if(r.allowBigInt===!0)return s;throw new Error(`${yt} integers outside of the safe integer range are not supported`)}o(wi,"readUint64");function $M(t,e,r,n){return new Be(xe.uint,vi(t,e+1,n),2)}o($M,"decodeUint8");function jM(t,e,r,n){return new Be(xe.uint,yi(t,e+1,n),3)}o(jM,"decodeUint16");function HM(t,e,r,n){return new Be(xe.uint,xi(t,e+1,n),5)}o(HM,"decodeUint32");function VM(t,e,r,n){return new Be(xe.uint,wi(t,e+1,n),9)}o(VM,"decodeUint64");function ro(t,e){return sn(t,0,e.value)}o(ro,"encodeUint");function sn(t,e,r){if(r<Wr[0]){let n=Number(r);t.push([e|n])}else if(r<Wr[1]){let n=Number(r);t.push([e|24,n])}else if(r<Wr[2]){let n=Number(r);t.push([e|25,n>>>8,n&255])}else if(r<Wr[3]){let n=Number(r);t.push([e|26,n>>>24&255,n>>>16&255,n>>>8&255,n&255])}else{let n=BigInt(r);if(n<Wr[4]){let i=[e|27,0,0,0,0,0,0,0],s=Number(n&BigInt(4294967295)),a=Number(n>>BigInt(32)&BigInt(4294967295));i[8]=s&255,s=s>>8,i[7]=s&255,s=s>>8,i[6]=s&255,s=s>>8,i[5]=s&255,i[4]=a&255,a=a>>8,i[3]=a&255,a=a>>8,i[2]=a&255,a=a>>8,i[1]=a&255,t.push(i)}else throw new Error(`${yt} encountered BigInt larger than allowable range`)}}o(sn,"encodeUintValue");ro.encodedSize=o(function(e){return sn.encodedSize(e.value)},"encodedSize");sn.encodedSize=o(function(e){return e<Wr[0]?1:e<Wr[1]?2:e<Wr[2]?3:e<Wr[3]?5:9},"encodedSize");ro.compareTokens=o(function(e,r){return e.value<r.value?-1:e.value>r.value?1:0},"compareTokens");function zM(t,e,r,n){return new Be(xe.negint,-1-vi(t,e+1,n),2)}o(zM,"decodeNegint8");function KM(t,e,r,n){return new Be(xe.negint,-1-yi(t,e+1,n),3)}o(KM,"decodeNegint16");function GM(t,e,r,n){return new Be(xe.negint,-1-xi(t,e+1,n),5)}o(GM,"decodeNegint32");var wx=BigInt(-1),WM=BigInt(1);function YM(t,e,r,n){let i=wi(t,e+1,n);if(typeof i!="bigint"){let s=-1-i;if(s>=Number.MIN_SAFE_INTEGER)return new Be(xe.negint,s,9)}if(n.allowBigInt!==!0)throw new Error(`${yt} integers outside of the safe integer range are not supported`);return new Be(xe.negint,wx-BigInt(i),9)}o(YM,"decodeNegint64");function ag(t,e){let r=e.value,n=typeof r=="bigint"?r*wx-WM:r*-1-1;sn(t,e.type.majorEncoded,n)}o(ag,"encodeNegint");ag.encodedSize=o(function(e){let r=e.value,n=typeof r=="bigint"?r*wx-WM:r*-1-1;return n<Wr[0]?1:n<Wr[1]?2:n<Wr[2]?3:n<Wr[3]?5:9},"encodedSize");ag.compareTokens=o(function(e,r){return e.value<r.value?1:e.value>r.value?-1:0},"compareTokens");function o0(t,e,r,n){aa(t,e,r+n);let i=Md(t,e+r,e+r+n);return new Be(xe.bytes,i,r+n)}o(o0,"toToken");function JM(t,e,r,n){return o0(t,e,1,r)}o(JM,"decodeBytesCompact");function XM(t,e,r,n){return o0(t,e,2,vi(t,e+1,n))}o(XM,"decodeBytes8");function ZM(t,e,r,n){return o0(t,e,3,yi(t,e+1,n))}o(ZM,"decodeBytes16");function QM(t,e,r,n){return o0(t,e,5,xi(t,e+1,n))}o(QM,"decodeBytes32");function eR(t,e,r,n){let i=wi(t,e+1,n);if(typeof i=="bigint")throw new Error(`${yt} 64-bit integer bytes lengths not supported`);return o0(t,e,9,i)}o(eR,"decodeBytes64");function cg(t){return t.encodedBytes===void 0&&(t.encodedBytes=t.type===xe.string?NM(t.value):t.value),t.encodedBytes}o(cg,"tokenBytes");function Bd(t,e){let r=cg(e);sn(t,e.type.majorEncoded,r.length),t.push(r)}o(Bd,"encodeBytes");Bd.encodedSize=o(function(e){let r=cg(e);return sn.encodedSize(r.length)+r.length},"encodedSize");Bd.compareTokens=o(function(e,r){return Kfe(cg(e),cg(r))},"compareTokens");function Kfe(t,e){return t.length<e.length?-1:t.length>e.length?1:qM(t,e)}o(Kfe,"compareBytes");function s0(t,e,r,n,i){let s=r+n;aa(t,e,s);let a=new Be(xe.string,OM(t,e+r,e+s),s);return i.retainStringBytes===!0&&(a.byteValue=Md(t,e+r,e+s)),a}o(s0,"toToken");function tR(t,e,r,n){return s0(t,e,1,r,n)}o(tR,"decodeStringCompact");function rR(t,e,r,n){return s0(t,e,2,vi(t,e+1,n),n)}o(rR,"decodeString8");function nR(t,e,r,n){return s0(t,e,3,yi(t,e+1,n),n)}o(nR,"decodeString16");function iR(t,e,r,n){return s0(t,e,5,xi(t,e+1,n),n)}o(iR,"decodeString32");function oR(t,e,r,n){let i=wi(t,e+1,n);if(typeof i=="bigint")throw new Error(`${yt} 64-bit integer string lengths not supported`);return s0(t,e,9,i,n)}o(oR,"decodeString64");var sR=Bd;function Fd(t,e,r,n){return new Be(xe.array,n,r)}o(Fd,"toToken");function aR(t,e,r,n){return Fd(t,e,1,r)}o(aR,"decodeArrayCompact");function cR(t,e,r,n){return Fd(t,e,2,vi(t,e+1,n))}o(cR,"decodeArray8");function fR(t,e,r,n){return Fd(t,e,3,yi(t,e+1,n))}o(fR,"decodeArray16");function uR(t,e,r,n){return Fd(t,e,5,xi(t,e+1,n))}o(uR,"decodeArray32");function dR(t,e,r,n){let i=wi(t,e+1,n);if(typeof i=="bigint")throw new Error(`${yt} 64-bit integer array lengths not supported`);return Fd(t,e,9,i)}o(dR,"decodeArray64");function lR(t,e,r,n){if(n.allowIndefinite===!1)throw new Error(`${yt} indefinite length items not allowed`);return Fd(t,e,1,1/0)}o(lR,"decodeArrayIndefinite");function fg(t,e){sn(t,xe.array.majorEncoded,e.value)}o(fg,"encodeArray");fg.compareTokens=ro.compareTokens;fg.encodedSize=o(function(e){return sn.encodedSize(e.value)},"encodedSize");function Pd(t,e,r,n){return new Be(xe.map,n,r)}o(Pd,"toToken");function hR(t,e,r,n){return Pd(t,e,1,r)}o(hR,"decodeMapCompact");function pR(t,e,r,n){return Pd(t,e,2,vi(t,e+1,n))}o(pR,"decodeMap8");function mR(t,e,r,n){return Pd(t,e,3,yi(t,e+1,n))}o(mR,"decodeMap16");function gR(t,e,r,n){return Pd(t,e,5,xi(t,e+1,n))}o(gR,"decodeMap32");function bR(t,e,r,n){let i=wi(t,e+1,n);if(typeof i=="bigint")throw new Error(`${yt} 64-bit integer map lengths not supported`);return Pd(t,e,9,i)}o(bR,"decodeMap64");function vR(t,e,r,n){if(n.allowIndefinite===!1)throw new Error(`${yt} indefinite length items not allowed`);return Pd(t,e,1,1/0)}o(vR,"decodeMapIndefinite");function ug(t,e){sn(t,xe.map.majorEncoded,e.value)}o(ug,"encodeMap");ug.compareTokens=ro.compareTokens;ug.encodedSize=o(function(e){return sn.encodedSize(e.value)},"encodedSize");function yR(t,e,r,n){return new Be(xe.tag,r,1)}o(yR,"decodeTagCompact");function xR(t,e,r,n){return new Be(xe.tag,vi(t,e+1,n),2)}o(xR,"decodeTag8");function wR(t,e,r,n){return new Be(xe.tag,yi(t,e+1,n),3)}o(wR,"decodeTag16");function _R(t,e,r,n){return new Be(xe.tag,xi(t,e+1,n),5)}o(_R,"decodeTag32");function ER(t,e,r,n){return new Be(xe.tag,wi(t,e+1,n),9)}o(ER,"decodeTag64");function dg(t,e){sn(t,xe.tag.majorEncoded,e.value)}o(dg,"encodeTag");dg.compareTokens=ro.compareTokens;dg.encodedSize=o(function(e){return sn.encodedSize(e.value)},"encodedSize");var Zfe=20,Qfe=21,eue=22,tue=23;function AR(t,e,r,n){if(n.allowUndefined===!1)throw new Error(`${yt} undefined values are not supported`);return n.coerceUndefinedToNull===!0?new Be(xe.null,null,1):new Be(xe.undefined,void 0,1)}o(AR,"decodeUndefined");function CR(t,e,r,n){if(n.allowIndefinite===!1)throw new Error(`${yt} indefinite length items not allowed`);return new Be(xe.break,void 0,1)}o(CR,"decodeBreak");function _x(t,e,r){if(r){if(r.allowNaN===!1&&Number.isNaN(t))throw new Error(`${yt} NaN values are not supported`);if(r.allowInfinity===!1&&(t===1/0||t===-1/0))throw new Error(`${yt} Infinity values are not supported`)}return new Be(xe.float,t,e)}o(_x,"createToken");function IR(t,e,r,n){return _x(Ex(t,e+1),3,n)}o(IR,"decodeFloat16");function DR(t,e,r,n){return _x(Ax(t,e+1),5,n)}o(DR,"decodeFloat32");function SR(t,e,r,n){return _x(RR(t,e+1),9,n)}o(SR,"decodeFloat64");function lg(t,e,r){let n=e.value;if(n===!1)t.push([xe.float.majorEncoded|Zfe]);else if(n===!0)t.push([xe.float.majorEncoded|Qfe]);else if(n===null)t.push([xe.float.majorEncoded|eue]);else if(n===void 0)t.push([xe.float.majorEncoded|tue]);else{let i,s=!1;(!r||r.float64!==!0)&&(kR(n),i=Ex(Bo,1),n===i||Number.isNaN(n)?(Bo[0]=249,t.push(Bo.slice(0,3)),s=!0):(MR(n),i=Ax(Bo,1),n===i&&(Bo[0]=250,t.push(Bo.slice(0,5)),s=!0))),s||(rue(n),i=RR(Bo,1),Bo[0]=251,t.push(Bo.slice(0,9)))}}o(lg,"encodeFloat");lg.encodedSize=o(function(e,r){let n=e.value;if(n===!1||n===!0||n===null||n===void 0)return 1;if(!r||r.float64!==!0){kR(n);let i=Ex(Bo,1);if(n===i||Number.isNaN(n))return 3;if(MR(n),i=Ax(Bo,1),n===i)return 5}return 9},"encodedSize");var TR=new ArrayBuffer(9),no=new DataView(TR,1),Bo=new Uint8Array(TR,0);function kR(t){if(t===1/0)no.setUint16(0,31744,!1);else if(t===-1/0)no.setUint16(0,64512,!1);else if(Number.isNaN(t))no.setUint16(0,32256,!1);else{no.setFloat32(0,t);let e=no.getUint32(0),r=(e&2139095040)>>23,n=e&8388607;if(r===255)no.setUint16(0,31744,!1);else if(r===0)no.setUint16(0,(t&2147483648)>>16|n>>13,!1);else{let i=r-127;i<-24?no.setUint16(0,0):i<-14?no.setUint16(0,(e&2147483648)>>16|1<<24+i,!1):no.setUint16(0,(e&2147483648)>>16|i+15<<10|n>>13,!1)}}}o(kR,"encodeFloat16");function Ex(t,e){if(t.length-e<2)throw new Error(`${yt} not enough data for float16`);let r=(t[e]<<8)+t[e+1];if(r===31744)return 1/0;if(r===64512)return-1/0;if(r===32256)return NaN;let n=r>>10&31,i=r&1023,s;return n===0?s=i*2**-24:n!==31?s=(i+1024)*2**(n-25):s=i===0?1/0:NaN,r&32768?-s:s}o(Ex,"readFloat16");function MR(t){no.setFloat32(0,t,!1)}o(MR,"encodeFloat32");function Ax(t,e){if(t.length-e<4)throw new Error(`${yt} not enough data for float32`);let r=(t.byteOffset||0)+e;return new DataView(t.buffer,r,4).getFloat32(0,!1)}o(Ax,"readFloat32");function rue(t){no.setFloat64(0,t,!1)}o(rue,"encodeFloat64");function RR(t,e){if(t.length-e<8)throw new Error(`${yt} not enough data for float64`);let r=(t.byteOffset||0)+e;return new DataView(t.buffer,r,8).getFloat64(0,!1)}o(RR,"readFloat64");lg.compareTokens=ro.compareTokens;function Ht(t,e,r){throw new Error(`${yt} encountered invalid minor (${r}) for major ${t[e]>>>5}`)}o(Ht,"invalidMinor");function hg(t){return()=>{throw new Error(`${yt} ${t}`)}}o(hg,"errorer");var Le=[];for(let t=0;t<=23;t++)Le[t]=Ht;Le[24]=$M;Le[25]=jM;Le[26]=HM;Le[27]=VM;Le[28]=Ht;Le[29]=Ht;Le[30]=Ht;Le[31]=Ht;for(let t=32;t<=55;t++)Le[t]=Ht;Le[56]=zM;Le[57]=KM;Le[58]=GM;Le[59]=YM;Le[60]=Ht;Le[61]=Ht;Le[62]=Ht;Le[63]=Ht;for(let t=64;t<=87;t++)Le[t]=JM;Le[88]=XM;Le[89]=ZM;Le[90]=QM;Le[91]=eR;Le[92]=Ht;Le[93]=Ht;Le[94]=Ht;Le[95]=hg("indefinite length bytes/strings are not supported");for(let t=96;t<=119;t++)Le[t]=tR;Le[120]=rR;Le[121]=nR;Le[122]=iR;Le[123]=oR;Le[124]=Ht;Le[125]=Ht;Le[126]=Ht;Le[127]=hg("indefinite length bytes/strings are not supported");for(let t=128;t<=151;t++)Le[t]=aR;Le[152]=cR;Le[153]=fR;Le[154]=uR;Le[155]=dR;Le[156]=Ht;Le[157]=Ht;Le[158]=Ht;Le[159]=lR;for(let t=160;t<=183;t++)Le[t]=hR;Le[184]=pR;Le[185]=mR;Le[186]=gR;Le[187]=bR;Le[188]=Ht;Le[189]=Ht;Le[190]=Ht;Le[191]=vR;for(let t=192;t<=215;t++)Le[t]=yR;Le[216]=xR;Le[217]=wR;Le[218]=_R;Le[219]=ER;Le[220]=Ht;Le[221]=Ht;Le[222]=Ht;Le[223]=Ht;for(let t=224;t<=243;t++)Le[t]=hg("simple values are not supported");Le[244]=Ht;Le[245]=Ht;Le[246]=Ht;Le[247]=AR;Le[248]=hg("simple values are not supported");Le[249]=IR;Le[250]=DR;Le[251]=SR;Le[252]=Ht;Le[253]=Ht;Le[254]=Ht;Le[255]=CR;var Fo=[];for(let t=0;t<24;t++)Fo[t]=new Be(xe.uint,t,1);for(let t=-1;t>=-24;t--)Fo[31-t]=new Be(xe.negint,t,1);Fo[64]=new Be(xe.bytes,new Uint8Array(0),1);Fo[96]=new Be(xe.string,"",1);Fo[128]=new Be(xe.array,0,1);Fo[160]=new Be(xe.map,0,1);Fo[244]=new Be(xe.false,!1,1);Fo[245]=new Be(xe.true,!0,1);Fo[246]=new Be(xe.null,null,1);function BR(t){switch(t.type){case xe.false:return ms([244]);case xe.true:return ms([245]);case xe.null:return ms([246]);case xe.bytes:return t.value.length?void 0:ms([64]);case xe.string:return t.value===""?ms([96]):void 0;case xe.array:return t.value===0?ms([128]):void 0;case xe.map:return t.value===0?ms([160]):void 0;case xe.uint:return t.value<24?ms([Number(t.value)]):void 0;case xe.negint:if(t.value>=-24)return ms([31-Number(t.value)])}}o(BR,"quickEncodeToken");var iue={float64:!1,mapSorter:aue,quickEncodeToken:BR};function oue(){let t=[];return t[xe.uint.major]=ro,t[xe.negint.major]=ag,t[xe.bytes.major]=Bd,t[xe.string.major]=sR,t[xe.array.major]=fg,t[xe.map.major]=ug,t[xe.tag.major]=dg,t[xe.float.major]=lg,t}o(oue,"makeCborEncoders");var FR=oue(),Cx=new Rd,Lf=class{constructor(e,r){this.obj=e,this.parent=r}includes(e){let r=this;do if(r.obj===e)return!0;while(r=r.parent);return!1}static createCheck(e,r){if(e&&e.includes(r))throw new Error(`${xx} object contains circular references`);return new Lf(r,e)}};o(Lf,"Ref");var _c={null:new Be(xe.null,null),undefined:new Be(xe.undefined,void 0),true:new Be(xe.true,!0),false:new Be(xe.false,!1),emptyArray:new Be(xe.array,0),emptyMap:new Be(xe.map,0)},Ec={number(t,e,r,n){return!Number.isInteger(t)||!Number.isSafeInteger(t)?new Be(xe.float,t):t>=0?new Be(xe.uint,t):new Be(xe.negint,t)},bigint(t,e,r,n){return t>=BigInt(0)?new Be(xe.uint,t):new Be(xe.negint,t)},Uint8Array(t,e,r,n){return new Be(xe.bytes,t)},string(t,e,r,n){return new Be(xe.string,t)},boolean(t,e,r,n){return t?_c.true:_c.false},null(t,e,r,n){return _c.null},undefined(t,e,r,n){return _c.undefined},ArrayBuffer(t,e,r,n){return new Be(xe.bytes,new Uint8Array(t))},DataView(t,e,r,n){return new Be(xe.bytes,new Uint8Array(t.buffer,t.byteOffset,t.byteLength))},Array(t,e,r,n){if(!t.length)return r.addBreakTokens===!0?[_c.emptyArray,new Be(xe.break)]:_c.emptyArray;n=Lf.createCheck(n,t);let i=[],s=0;for(let a of t)i[s++]=pg(a,r,n);return r.addBreakTokens?[new Be(xe.array,t.length),i,new Be(xe.break)]:[new Be(xe.array,t.length),i]},Object(t,e,r,n){let i=e!=="Object",s=i?t.keys():Object.keys(t),a=i?t.size:s.length;if(!a)return r.addBreakTokens===!0?[_c.emptyMap,new Be(xe.break)]:_c.emptyMap;n=Lf.createCheck(n,t);let f=[],d=0;for(let h of s)f[d++]=[pg(h,r,n),pg(i?t.get(h):t[h],r,n)];return sue(f,r),r.addBreakTokens?[new Be(xe.map,a),f,new Be(xe.break)]:[new Be(xe.map,a),f]}};Ec.Map=Ec.Object;Ec.Buffer=Ec.Uint8Array;for(let t of"Uint8Clamped Uint16 Uint32 Int8 Int16 Int32 BigUint64 BigInt64 Float32 Float64".split(" "))Ec[`${t}Array`]=Ec.DataView;function pg(t,e={},r){let n=RM(t),i=e&&e.typeEncoders&&e.typeEncoders[n]||Ec[n];if(typeof i=="function"){let a=i(t,n,e,r);if(a!=null)return a}let s=Ec[n];if(!s)throw new Error(`${xx} unsupported type: ${n}`);return s(t,n,e,r)}o(pg,"objectToTokens");function sue(t,e){e.mapSorter&&t.sort(e.mapSorter)}o(sue,"sortMapEntries");function aue(t,e){let r=Array.isArray(t[0])?t[0][0]:t[0],n=Array.isArray(e[0])?e[0][0]:e[0];if(r.type!==n.type)return r.type.compare(n.type);let i=r.type.major,s=FR[i].compareTokens(r,n);return s===0&&console.warn("WARNING: complex key types used, CBOR key sorting guarantees are gone"),s}o(aue,"mapSorter");function PR(t,e,r,n){if(Array.isArray(e))for(let i of e)PR(t,i,r,n);else r[e.type.major](t,e,n)}o(PR,"tokensToEncoded");function cue(t,e,r){let n=pg(t,r);if(!Array.isArray(n)&&r.quickEncodeToken){let i=r.quickEncodeToken(n);if(i)return i;let s=e[n.type.major];if(s.encodedSize){let a=s.encodedSize(n,r),f=new Rd(a);if(s(f,n,r),f.chunks.length!==1)throw new Error(`Unexpected error: pre-calculated length for ${n} was wrong`);return yx(f.chunks[0])}}return Cx.reset(),PR(Cx,n,e,r),Cx.toBytes(!0)}o(cue,"encodeCustom");function Uf(t,e){return e=Object.assign({},iue,e),cue(t,FR,e)}o(Uf,"encode");var fue={strict:!1,allowIndefinite:!0,allowUndefined:!0,allowBigInt:!0},mg=class{constructor(e,r={}){this.pos=0,this.data=e,this.options=r}done(){return this.pos>=this.data.length}next(){let e=this.data[this.pos],r=Fo[e];if(r===void 0){let n=Le[e];if(!n)throw new Error(`${yt} no decoder for major type ${e>>>5} (byte 0x${e.toString(16).padStart(2,"0")})`);let i=e&31;r=n(this.data,this.pos,i,this.options)}return this.pos+=r.encodedLength,r}};o(mg,"Tokeniser");var a0=Symbol.for("DONE"),gg=Symbol.for("BREAK");function uue(t,e,r){let n=[];for(let i=0;i<t.value;i++){let s=c0(e,r);if(s===gg){if(t.value===1/0)break;throw new Error(`${yt} got unexpected break to lengthed array`)}if(s===a0)throw new Error(`${yt} found array but not enough entries (got ${i}, expected ${t.value})`);n[i]=s}return n}o(uue,"tokenToArray");function due(t,e,r){let n=r.useMaps===!0,i=n?void 0:{},s=n?new Map:void 0;for(let a=0;a<t.value;a++){let f=c0(e,r);if(f===gg){if(t.value===1/0)break;throw new Error(`${yt} got unexpected break to lengthed map`)}if(f===a0)throw new Error(`${yt} found map but not enough entries (got ${a} [no key], expected ${t.value})`);if(n!==!0&&typeof f!="string")throw new Error(`${yt} non-string keys not supported (got ${typeof f})`);if(r.rejectDuplicateMapKeys===!0&&(n&&s.has(f)||!n&&f in i))throw new Error(`${yt} found repeat map key "${f}"`);let d=c0(e,r);if(d===a0)throw new Error(`${yt} found map but not enough entries (got ${a} [no value], expected ${t.value})`);n?s.set(f,d):i[f]=d}return n?s:i}o(due,"tokenToMap");function c0(t,e){if(t.done())return a0;let r=t.next();if(r.type===xe.break)return gg;if(r.type.terminal)return r.value;if(r.type===xe.array)return uue(r,t,e);if(r.type===xe.map)return due(r,t,e);if(r.type===xe.tag){if(e.tags&&typeof e.tags[r.value]=="function"){let n=c0(t,e);return e.tags[r.value](n)}throw new Error(`${yt} tag not supported (${r.value})`)}throw new Error("unsupported")}o(c0,"tokensToObject");function qf(t,e){if(!(t instanceof Uint8Array))throw new Error(`${yt} data to decode must be a Uint8Array`);e=Object.assign({},fue,e);let r=e.tokenizer||new mg(t,e),n=c0(r,e);if(n===a0)throw new Error(`${yt} did not find any content to decode`);if(n===gg)throw new Error(`${yt} got unexpected break`);if(!r.done())throw new Error(`${yt} too many terminals, data makes no sense`);return n}o(qf,"decode");So();var OR=42;function lue(t){if(t.asCID!==t)return null;let e=Xe.asCID(t);if(!e)return null;let r=new Uint8Array(e.bytes.byteLength+1);return r.set(e.bytes,1),[new Be(xe.tag,OR),new Be(xe.bytes,r)]}o(lue,"cidEncoder");function hue(){throw new Error("`undefined` is not supported by the IPLD Data Model and cannot be encoded")}o(hue,"undefinedEncoder");function pue(t){if(Number.isNaN(t))throw new Error("`NaN` is not supported by the IPLD Data Model and cannot be encoded");if(t===1/0||t===-1/0)throw new Error("`Infinity` and `-Infinity` is not supported by the IPLD Data Model and cannot be encoded");return null}o(pue,"numberEncoder");var mue={float64:!0,typeEncoders:{Object:lue,undefined:hue,number:pue}};function gue(t){if(t[0]!==0)throw new Error("Invalid CID for CBOR tag 42; expected leading 0x00");return Xe.decode(t.subarray(1))}o(gue,"cidDecoder");var NR={allowIndefinite:!1,coerceUndefinedToNull:!0,allowNaN:!1,allowInfinity:!1,allowBigInt:!0,strict:!0,useMaps:!1,tags:[]};NR.tags[OR]=gue;var bue="dag-cbor",Od=113,$f=o(t=>Uf(t,mue),"encode"),Ix=o(t=>qf(t,NR),"decode");var vue=24;async function LR(t){let e=await Of({value:t,codec:Po,hasher:uc});return{cid:e.cid,linkedBlock:e.bytes}}o(LR,"encodePayload");function yue(t,e=vue){let r=(e-t.length%e)%e,n=new Uint8Array(t.length+r);return n.set(t,0),n}o(yue,"pad");async function xue(t){return(await Of({value:t,codec:Po,hasher:xm})).cid}o(xue,"encodeIdentityCID");function wue(t){if(t=Xe.asCID(t),t.code!==Od)throw new Error("CID codec must be dag-cbor");if(t.multihash.code!==xm.code)throw new Error("CID must use identity multihash");return Ix(t.multihash.digest)}o(wue,"decodeIdentityCID");async function UR(t,e){return yue((await xue(t)).bytes,e)}o(UR,"prepareCleartext");function qR(t){return wue(Xe.decodeFirst(t)[0])}o(qR,"decodeCleartext");var $R=Symbol("abortable"),bg=Symbol("aborted");function jR(t,e){if(e.aborted)return Promise.reject(bg);let r,n=new Promise((i,s)=>{r=s});return e.addEventListener("abort",()=>{r(bg)}),Promise.race([t,n])}o(jR,"abortable");var HR=o((t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((e,r)=>(r&=63,r<36?e+=r.toString(36):r<62?e+=(r-26).toString(36).toUpperCase():r>62?e+="-":e+="_",e),""),"nanoid");var vg="utils_abort_request";var Fn;(function(t){t[t.PARSE_ERROR=-32700]="PARSE_ERROR",t[t.INVALID_REQUEST=-32600]="INVALID_REQUEST",t[t.METHOD_NOT_FOUND=-32601]="METHOD_NOT_FOUND",t[t.INVALID_PARAMS=-32602]="INVALID_PARAMS",t[t.INTERNAL_ERROR=-32603]="INTERNAL_ERROR"})(Fn||(Fn={}));var VR={[Fn.PARSE_ERROR]:"Parse error",[Fn.INVALID_REQUEST]:"Invalid request",[Fn.METHOD_NOT_FOUND]:"Method not found",[Fn.INVALID_PARAMS]:"Invalid params",[Fn.INTERNAL_ERROR]:"Internal error"};function _ue(t){return-32e3>=t&&t>=-32099}o(_ue,"isServerError");function yg(t){return VR[t.toString()]??(_ue(t)?"Server error":"Application error")}o(yg,"getErrorMessage");var Qn=class extends Error{static fromObject(e){return new Qn(e.code,e.message,e.data)}toObject(){return{code:this.code,data:this.data,message:this.message}}constructor(e,r,n){super(),Object.setPrototypeOf(this,Qn.prototype),this.code=e,this.data=n,this.message=r??yg(e)}};o(Qn,"RPCError");function u0(t){let e=VR[t];return o(function(n){return new Qn(t,e,n)},"createError")}o(u0,"createErrorFactory");var Eue=u0(Fn.PARSE_ERROR),nwe=u0(Fn.INVALID_REQUEST),iwe=u0(Fn.METHOD_NOT_FOUND),owe=u0(Fn.INVALID_PARAMS),swe=u0(Fn.INTERNAL_ERROR);function Aue(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}o(Aue,"_checkPrivateRedeclaration");function Cue(t,e){return e.get?e.get.call(t):e.value}o(Cue,"_classApplyDescriptorGet");function Iue(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}o(Iue,"_classApplyDescriptorSet");function zR(t,e,r){if(!e.has(t))throw new TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}o(zR,"_classExtractFieldDescriptor");function Dx(t,e){var r=zR(t,e,"get");return Cue(t,r)}o(Dx,"_classPrivateFieldGet");function Due(t,e,r){Aue(t,e),e.set(t,r)}o(Due,"_classPrivateFieldInit");function Sue(t,e,r){var n=zR(t,e,"set");return Iue(t,n,r),r}o(Sue,"_classPrivateFieldSet");var d0=new WeakMap,Nd=class{get connection(){return Dx(this,d0)}createID(){return HR()}request(e,r=void 0,n={}){let{signal:i}=n;if(i?.aborted)return Promise.reject(bg);let s=this.createID(),a=Dx(this,d0).send({jsonrpc:"2.0",id:s,method:e,params:r}).then(f=>{if(f==null)throw new Error("Missing response");if(f.error!=null)throw Qn.fromObject(f.error);return f.result});return i==null?a:(i.addEventListener("abort",()=>{this.notify(vg,{id:s})}),jR(a,i))}async notify(e,r=void 0){await Dx(this,d0).send({jsonrpc:"2.0",method:e,params:r})}constructor(e){Due(this,d0,{writable:!0,value:void 0}),Sue(this,d0,e)}};o(Nd,"RPCClient");function KR(t,e){return{jsonrpc:"2.0",id:t,error:{code:e,message:yg(e)}}}o(KR,"createErrorResponse");function Tue(t,e,r){console.warn("Unhandled handler error",e,r)}o(Tue,"fallbackOnHandlerError");function kue(t,e){console.warn("Unhandled invalid message",e)}o(kue,"fallbackOnInvalidMessage");function Mue(t,e){console.warn("Unhandled notification",e)}o(Mue,"fallbackOnNotification");function GR(t,e={}){let r=e.onHandlerError??Tue,n=e.onInvalidMessage??kue,i=e.onNotification??Mue,s={};function a(f,d){if(d.method===vg){let h=d.params?.id;h!=null&&s[h]?.abort()}else i(f,d)}return o(a,"handleNotification"),o(async function(d,h){let p=h.id;if(h.jsonrpc!=="2.0"||h.method==null)return p==null?(n(d,h),null):KR(p,Fn.INVALID_REQUEST);let y=t[h.method];if(y==null)return p==null?(a(d,h),null):KR(p,Fn.METHOD_NOT_FOUND);try{let I;if(p!=null&&y[$R]){let D=new AbortController;s[p]=D,I=y(d,h.params,{signal:D.signal})}else I=y(d,h.params,{});let T=I==null?I:typeof I.then=="function"?await I:I;return p==null||s[p]?.signal.aborted?null:{jsonrpc:"2.0",id:p,result:T}}catch(I){if(p==null||s[p]?.signal.aborted)return r(d,h,I),null;let T;if(I instanceof Qn)T=I.toObject();else{r(d,h,I);let D=I.code??-32e3;T={code:D,message:I.message||yg(D)}}return{jsonrpc:"2.0",id:p,error:T}}finally{p!=null&&delete s[p]}},"handleRequest")}o(GR,"createHandler");So();var UB=Mt(LB(),1),Cn=Mt(Vf(),1);var Jue=`
|
657
|
-
sign-in-with-ethereum =
|
658
|
-
domain %s" wants you to sign in with your Ethereum account:" LF
|
659
|
-
address LF
|
660
|
-
LF
|
661
|
-
[ statement LF ]
|
662
|
-
LF
|
663
|
-
%s"URI: " URI LF
|
664
|
-
%s"Version: " version LF
|
665
|
-
%s"Chain ID: " chain-id LF
|
666
|
-
%s"Nonce: " nonce LF
|
667
|
-
%s"Issued At: " issued-at
|
668
|
-
[ LF %s"Expiration Time: " expiration-time ]
|
669
|
-
[ LF %s"Not Before: " not-before ]
|
670
|
-
[ LF %s"Request ID: " request-id ]
|
671
|
-
[ LF %s"Resources:"
|
672
|
-
resources ]
|
673
|
-
|
674
|
-
domain = dnsauthority
|
675
|
-
|
676
|
-
address = "0x" 40*40HEXDIG
|
677
|
-
; Must also conform to captilization
|
678
|
-
; checksum encoding specified in EIP-55
|
679
|
-
; where applicable (EOAs).
|
680
|
-
|
681
|
-
statement = *( reserved / unreserved / " " )
|
682
|
-
; The purpose is to exclude LF (line breaks).
|
683
|
-
|
684
|
-
version = "1"
|
685
|
-
|
686
|
-
nonce = 8*( ALPHA / DIGIT )
|
687
|
-
|
688
|
-
issued-at = date-time
|
689
|
-
expiration-time = date-time
|
690
|
-
not-before = date-time
|
691
|
-
|
692
|
-
request-id = *pchar
|
693
|
-
|
694
|
-
chain-id = 1*DIGIT
|
695
|
-
; See EIP-155 for valid CHAIN_IDs.
|
696
|
-
|
697
|
-
resources = *( LF resource )
|
698
|
-
|
699
|
-
resource = "- " URI
|
700
|
-
|
701
|
-
; ------------------------------------------------------------------------------
|
702
|
-
; RFC 3986
|
703
|
-
|
704
|
-
URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
|
705
|
-
|
706
|
-
hier-part = "//" authority path-abempty
|
707
|
-
/ path-absolute
|
708
|
-
/ path-rootless
|
709
|
-
/ path-empty
|
710
|
-
|
711
|
-
scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
|
712
|
-
|
713
|
-
authority = [ userinfo "@" ] host [ ":" port ]
|
714
|
-
userinfo = *( unreserved / pct-encoded / sub-delims / ":" )
|
715
|
-
host = IP-literal / IPv4address / reg-name
|
716
|
-
port = *DIGIT
|
717
|
-
|
718
|
-
IP-literal = "[" ( IPv6address / IPvFuture ) "]"
|
719
|
-
|
720
|
-
IPvFuture = "v" 1*HEXDIG "." 1*( unreserved / sub-delims / ":" )
|
721
|
-
|
722
|
-
IPv6address = 6( h16 ":" ) ls32
|
723
|
-
/ "::" 5( h16 ":" ) ls32
|
724
|
-
/ [ h16 ] "::" 4( h16 ":" ) ls32
|
725
|
-
/ [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
|
726
|
-
/ [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
|
727
|
-
/ [ *3( h16 ":" ) h16 ] "::" h16 ":" ls32
|
728
|
-
/ [ *4( h16 ":" ) h16 ] "::" ls32
|
729
|
-
/ [ *5( h16 ":" ) h16 ] "::" h16
|
730
|
-
/ [ *6( h16 ":" ) h16 ] "::"
|
731
|
-
|
732
|
-
h16 = 1*4HEXDIG
|
733
|
-
ls32 = ( h16 ":" h16 ) / IPv4address
|
734
|
-
IPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet
|
735
|
-
dec-octet = DIGIT ; 0-9
|
736
|
-
/ %x31-39 DIGIT ; 10-99
|
737
|
-
/ "1" 2DIGIT ; 100-199
|
738
|
-
/ "2" %x30-34 DIGIT ; 200-249
|
739
|
-
/ "25" %x30-35 ; 250-255
|
740
|
-
|
741
|
-
reg-name = *( unreserved / pct-encoded / sub-delims )
|
742
|
-
|
743
|
-
path-abempty = *( "/" segment )
|
744
|
-
path-absolute = "/" [ segment-nz *( "/" segment ) ]
|
745
|
-
path-rootless = segment-nz *( "/" segment )
|
746
|
-
path-empty = 0pchar
|
747
|
-
|
748
|
-
segment = *pchar
|
749
|
-
segment-nz = 1*pchar
|
750
|
-
|
751
|
-
pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
|
752
|
-
|
753
|
-
query = *( pchar / "/" / "?" )
|
754
|
-
|
755
|
-
fragment = *( pchar / "/" / "?" )
|
756
|
-
|
757
|
-
pct-encoded = "%" HEXDIG HEXDIG
|
758
|
-
|
759
|
-
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
|
760
|
-
reserved = gen-delims / sub-delims
|
761
|
-
gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@"
|
762
|
-
sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
|
763
|
-
/ "*" / "+" / "," / ";" / "="
|
764
|
-
|
765
|
-
; ------------------------------------------------------------------------------
|
766
|
-
; RFC 4501
|
767
|
-
|
768
|
-
dnsauthority = host [ ":" port ]
|
769
|
-
; See RFC 3986 for the
|
770
|
-
; definition of "host" and "port".
|
771
|
-
|
772
|
-
; ------------------------------------------------------------------------------
|
773
|
-
; RFC 3339
|
774
|
-
|
775
|
-
date-fullyear = 4DIGIT
|
776
|
-
date-month = 2DIGIT ; 01-12
|
777
|
-
date-mday = 2DIGIT ; 01-28, 01-29, 01-30, 01-31 based on
|
778
|
-
; month/year
|
779
|
-
time-hour = 2DIGIT ; 00-23
|
780
|
-
time-minute = 2DIGIT ; 00-59
|
781
|
-
time-second = 2DIGIT ; 00-58, 00-59, 00-60 based on leap second
|
782
|
-
; rules
|
783
|
-
time-secfrac = "." 1*DIGIT
|
784
|
-
time-numoffset = ("+" / "-") time-hour ":" time-minute
|
785
|
-
time-offset = "Z" / time-numoffset
|
786
|
-
|
787
|
-
partial-time = time-hour ":" time-minute ":" time-second
|
788
|
-
[time-secfrac]
|
789
|
-
full-date = date-fullyear "-" date-month "-" date-mday
|
790
|
-
full-time = partial-time time-offset
|
791
|
-
|
792
|
-
date-time = full-date "T" full-time
|
793
|
-
|
794
|
-
; ------------------------------------------------------------------------------
|
795
|
-
; RFC 5234
|
796
|
-
|
797
|
-
ALPHA = %x41-5A / %x61-7A ; A-Z / a-z
|
798
|
-
LF = %x0A
|
799
|
-
; linefeed
|
800
|
-
DIGIT = %x30-39
|
801
|
-
; 0-9
|
802
|
-
HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"
|
803
|
-
`,g0=class{constructor(e){let r=new UB.default(Jue);if(r.generate(),r.errors.length)throw console.error(r.errorsToAscii()),console.error(r.linesToAscii()),console.log(r.displayAttributeErrors()),new Error("ABNF grammar has errors");let n=r.toObject(),i=new Cn.default.parser;i.ast=new Cn.default.ast;let s=Cn.default.ids,a=o(function(J,re,z,$,G){let le=s.SEM_OK;return J===s.SEM_PRE&&(G.domain=Cn.default.utils.charsToString(re,z,$)),le},"domain");i.ast.callbacks.domain=a;let f=o(function(J,re,z,$,G){let le=s.SEM_OK;return J===s.SEM_PRE&&(G.address=Cn.default.utils.charsToString(re,z,$)),le},"address");i.ast.callbacks.address=f;let d=o(function(J,re,z,$,G){let le=s.SEM_OK;return J===s.SEM_PRE&&(G.statement=Cn.default.utils.charsToString(re,z,$)),le},"statement");i.ast.callbacks.statement=d;let h=o(function(J,re,z,$,G){let le=s.SEM_OK;return J===s.SEM_PRE&&(G.uri||(G.uri=Cn.default.utils.charsToString(re,z,$))),le},"uri");i.ast.callbacks.uri=h;let p=o(function(J,re,z,$,G){let le=s.SEM_OK;return J===s.SEM_PRE&&(G.version=Cn.default.utils.charsToString(re,z,$)),le},"version");i.ast.callbacks.version=p;let y=o(function(J,re,z,$,G){let le=s.SEM_OK;return J===s.SEM_PRE&&(G.chainId=Cn.default.utils.charsToString(re,z,$)),le},"chainId");i.ast.callbacks["chain-id"]=y;let I=o(function(J,re,z,$,G){let le=s.SEM_OK;return J===s.SEM_PRE&&(G.nonce=Cn.default.utils.charsToString(re,z,$)),le},"nonce");i.ast.callbacks.nonce=I;let T=o(function(J,re,z,$,G){let le=s.SEM_OK;return J===s.SEM_PRE&&(G.issuedAt=Cn.default.utils.charsToString(re,z,$)),le},"issuedAt");i.ast.callbacks["issued-at"]=T;let D=o(function(J,re,z,$,G){let le=s.SEM_OK;return J===s.SEM_PRE&&(G.expirationTime=Cn.default.utils.charsToString(re,z,$)),le},"expirationTime");i.ast.callbacks["expiration-time"]=D;let R=o(function(J,re,z,$,G){let le=s.SEM_OK;return J===s.SEM_PRE&&(G.notBefore=Cn.default.utils.charsToString(re,z,$)),le},"notBefore");i.ast.callbacks["not-before"]=R;let H=o(function(J,re,z,$,G){let le=s.SEM_OK;return J===s.SEM_PRE&&(G.requestId=Cn.default.utils.charsToString(re,z,$)),le},"requestId");i.ast.callbacks["request-id"]=H;let F=o(function(J,re,z,$,G){let le=s.SEM_OK;return J===s.SEM_PRE&&(G.resources=Cn.default.utils.charsToString(re,z,$).slice(3).split(`
|
804
|
-
- `)),le},"resources");i.ast.callbacks.resources=F;let V=i.parse(n,"sign-in-with-ethereum",e);if(!V.success)throw new Error(`Invalid message: ${JSON.stringify(V)}`);let X={};i.ast.translate(X);for(let[J,re]of Object.entries(X))this[J]=re}};o(g0,"ParsedMessage");function Ox(){return Ox=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ox.apply(this,arguments)}o(Ox,"_extends");var Nx={name:"chainId",regex:"[-:a-zA-Z0-9]{5,41}",parameters:{delimiter:":",values:{0:{name:"namespace",regex:"[-a-z0-9]{3,8}"},1:{name:"reference",regex:"[-a-zA-Z0-9]{1,32}"}}}},Xue={name:"accountId",regex:"[-:a-zA-Z0-9]{7,106}",parameters:{delimiter:":",values:{0:{name:"namespace",regex:"[-a-z0-9]{3,8}"},1:{name:"reference",regex:"[-a-zA-Z0-9]{1,32}"},2:{name:"address",regex:"[a-zA-Z0-9]{1,64}"}}}},Lx={name:"assetName",regex:"[-:a-zA-Z0-9]{5,73}",parameters:{delimiter:":",values:{0:{name:"namespace",regex:"[-a-z0-9]{3,8}"},1:{name:"reference",regex:"[-a-zA-Z0-9]{1,64}"}}}},Zue={name:"assetType",regex:"[-:a-zA-Z0-9]{11,115}",parameters:{delimiter:"/",values:{0:Nx,1:Lx}}},Que={name:"assetId",regex:"[-:a-zA-Z0-9]{13,148}",parameters:{delimiter:"/",values:{0:Nx,1:Lx,2:{name:"tokenId",regex:"[-a-zA-Z0-9]{1,32}"}}}},b0={2:Nx,10:Xue,19:{assetName:Lx,assetType:Zue,assetId:Que}};function qB(t,e){return t.split(e.parameters.delimiter)}o(qB,"splitParams");function v0(t,e){var r=qB(t,e),n={};return r.forEach(function(i,s){n[e.parameters.values[s].name]=i}),n}o(v0,"getParams");function jd(t,e){return Object.values(e.parameters.values).map(function(r){var n=t[r.name];return typeof n=="string"?n:jd(n,r)}).join(e.parameters.delimiter)}o(jd,"joinParams");function y0(t,e){if(!new RegExp(e.regex).test(t))return!1;var r=qB(t,e);if(r.length!==Object.keys(e.parameters.values).length)return!1;var n=r.map(function(i,s){return new RegExp(e.parameters.values[s].regex).test(i)}).filter(function(i){return!!i});return n.length===r.length}o(y0,"isValidId");var Dc=function(){function t(r){typeof r=="string"&&(r=t.parse(r)),this.namespace=r.namespace,this.reference=r.reference}o(t,"ChainId"),t.parse=o(function(n){if(!y0(n,this.spec))throw new Error("Invalid "+this.spec.name+" provided: "+n);return new t(v0(n,this.spec)).toJSON()},"parse"),t.format=o(function(n){return jd(n,this.spec)},"format");var e=t.prototype;return e.toString=o(function(){return t.format(this.toJSON())},"toString"),e.toJSON=o(function(){return{namespace:this.namespace,reference:this.reference}},"toJSON"),t}();Dc.spec=b0[2];var Sc=function(){function t(r){typeof r=="string"&&(r=t.parse(r)),this.chainId=new Dc(r.chainId),this.address=r.address}o(t,"AccountId"),t.parse=o(function(n){if(!y0(n,this.spec))throw new Error("Invalid "+this.spec.name+" provided: "+n);var i=v0(n,this.spec),s=i.namespace,a=i.reference,f=i.address,d=new Dc({namespace:s,reference:a});return new t({chainId:d,address:f}).toJSON()},"parse"),t.format=o(function(n){var i=new Dc(n.chainId),s=Ox({},i.toJSON(),{address:n.address});return jd(s,this.spec)},"format");var e=t.prototype;return e.toString=o(function(){return t.format(this.toJSON())},"toString"),e.toJSON=o(function(){return{chainId:this.chainId.toJSON(),address:this.address}},"toJSON"),t}();Sc.spec=b0[10];var Ux=function(){function t(r){typeof r=="string"&&(r=t.parse(r)),this.namespace=r.namespace,this.reference=r.reference}o(t,"AssetName"),t.parse=o(function(n){if(!y0(n,this.spec))throw new Error("Invalid "+this.spec.name+" provided: "+n);return new t(v0(n,this.spec)).toJSON()},"parse"),t.format=o(function(n){return jd(n,this.spec)},"format");var e=t.prototype;return e.toString=o(function(){return t.format(this.toJSON())},"toString"),e.toJSON=o(function(){return{namespace:this.namespace,reference:this.reference}},"toJSON"),t}();Ux.spec=b0[19].assetName;var ede=function(){function t(r){typeof r=="string"&&(r=t.parse(r)),this.chainId=new Dc(r.chainId),this.assetName=new Ux(r.assetName)}o(t,"AssetType"),t.parse=o(function(n){if(!y0(n,this.spec))throw new Error("Invalid "+this.spec.name+" provided: "+n);return new t(v0(n,this.spec)).toJSON()},"parse"),t.format=o(function(n){return jd(n,this.spec)},"format");var e=t.prototype;return e.toString=o(function(){return t.format(this.toJSON())},"toString"),e.toJSON=o(function(){return{chainId:this.chainId.toJSON(),assetName:this.assetName}},"toJSON"),t}();ede.spec=b0[19].assetType;var tde=function(){function t(r){typeof r=="string"&&(r=t.parse(r)),this.chainId=new Dc(r.chainId),this.assetName=new Ux(r.assetName),this.tokenId=r.tokenId}o(t,"AssetId"),t.parse=o(function(n){if(!y0(n,this.spec))throw new Error("Invalid "+this.spec.name+" provided: "+n);return new t(v0(n,this.spec)).toJSON()},"parse"),t.format=o(function(n){return jd(n,this.spec)},"format");var e=t.prototype;return e.toString=o(function(){return t.format(this.toJSON())},"toString"),e.toJSON=o(function(){return{chainId:this.chainId.toJSON(),assetName:this.assetName.toJSON(),tokenId:this.tokenId}},"toJSON"),t}();tde.spec=b0[19].assetId;var $B;(function(t){t.INVALID_SIGNATURE="Invalid signature.",t.EXPIRED_MESSAGE="Expired message.",t.MALFORMED_SESSION="Malformed session."})($B||($B={}));var w0;(function(t){t.PERSONAL_SIGNATURE="Personal signature"})(w0||(w0={}));var x0=class{static fromCacao(e){let r=Sc.parse(e.p.iss.replace("did:pkh:","")),n=new this({domain:e.p.domain,address:r.address,uri:e.p.aud,version:e.p.version,chainId:new Dc(r.chainId).reference});return e.p.statement&&(n.statement=e.p.statement),e.p.nonce&&(n.nonce=e.p.nonce),e.p.iat&&(n.issuedAt=e.p.iat),e.p.exp&&(n.expirationTime=e.p.exp),e.p.nbf&&(n.notBefore=e.p.nbf),e.p.requestId&&(n.requestId=e.p.requestId),e.p.resources&&(n.resources=e.p.resources),e.s&&(e.s.s&&(n.signature=e.s.s),e.s.t==="eip191"&&(n.type=w0.PERSONAL_SIGNATURE)),n}toMessage(e){return rde(this,e)}constructor(e){if(this.statement=void 0,this.nonce=void 0,this.issuedAt=void 0,this.expirationTime=void 0,this.notBefore=void 0,this.requestId=void 0,this.resources=void 0,this.signature=void 0,typeof e=="string"){let r=new g0(e);this.domain=r.domain,this.address=r.address,this.statement=r.statement,this.uri=r.uri,this.version=r.version,this.nonce=r.nonce,this.issuedAt=r.issuedAt,this.expirationTime=r.expirationTime,this.notBefore=r.notBefore,this.requestId=r.requestId,this.chainId=r.chainId,this.resources=r.resources}else Object.assign(this,e)}};o(x0,"SiwxMessage");function jB(t,e){let r=`${t.domain} wants you to sign in with your ${e} account:`,n=`URI: ${t.uri}`,i=[r,t.address].join(`
|
805
|
-
`),s=`Version: ${t.version}`;t.nonce||(t.nonce=(Math.random()+1).toString(36).substring(4));let a=`Nonce: ${t.nonce}`,f=[n,s,a];if(t.issuedAt&&Date.parse(t.issuedAt),t.issuedAt=t.issuedAt?t.issuedAt:new Date().toISOString(),f.push(`Issued At: ${t.issuedAt}`),t.expirationTime){let h=`Expiration Time: ${t.expirationTime}`;f.push(h)}t.notBefore&&f.push(`Not Before: ${t.notBefore}`),t.requestId&&f.push(`Request ID: ${t.requestId}`),t.chainId&&f.push(`Chain ID: ${t.chainId}`),t.resources&&f.push(["Resources:",...t.resources.map(h=>`- ${h}`)].join(`
|
806
|
-
`));let d=f.join(`
|
807
|
-
`);return t.statement&&(i=[i,t.statement].join(`
|
808
|
-
|
809
|
-
`)),[i,d].join(`
|
810
|
-
|
811
|
-
`)}o(jB,"asLegacyChainIdString");function rde(t,e){let r=`${t.domain} wants you to sign in with your ${e} account:`,n=`URI: ${t.uri}`,i=[r,t.address].join(`
|
812
|
-
`),s=`Version: ${t.version}`;t.nonce||(t.nonce=(Math.random()+1).toString(36).substring(4));let a=`Nonce: ${t.nonce}`,f=`Chain ID: ${t.chainId}`,d=[n,s,f,a];if(t.issuedAt&&Date.parse(t.issuedAt),t.issuedAt=t.issuedAt?t.issuedAt:new Date().toISOString(),d.push(`Issued At: ${t.issuedAt}`),t.expirationTime){let p=`Expiration Time: ${t.expirationTime}`;d.push(p)}t.notBefore&&d.push(`Not Before: ${t.notBefore}`),t.requestId&&d.push(`Request ID: ${t.requestId}`),t.resources&&t.resources.length>=1&&d.push(["Resources:",...t.resources.map(p=>`- ${p}`)].join(`
|
813
|
-
`));let h=d.join(`
|
814
|
-
`);return t.statement&&(i=[i,t.statement].join(`
|
815
|
-
|
816
|
-
`)),[i,h].join(`
|
817
|
-
|
818
|
-
`)}o(rde,"asString");var Hd=class extends x0{toMessage(){return super.toMessage("Ethereum")}signMessage(){let e;switch(this.type){case w0.PERSONAL_SIGNATURE:{e=this.toMessage();break}default:{e=this.toMessage();break}}return e}};o(Hd,"SiweMessage");Uh();var nde=5*60,Ywe=new Date("2022-09-20").valueOf(),_0;(function(t){function e(f){let d={h:{t:"eip4361"},p:{domain:f.domain,iat:f.issuedAt,iss:`did:pkh:eip155:${f.chainId}:${f.address}`,aud:f.uri,version:f.version,nonce:f.nonce}};return f.signature&&(d.s={t:"eip191",s:f.signature}),f.notBefore&&(d.p.nbf=f.notBefore),f.expirationTime&&(d.p.exp=f.expirationTime),f.statement&&(d.p.statement=f.statement),f.requestId&&(d.p.requestId=f.requestId),f.resources&&(d.p.resources=f.resources),d}o(e,"fromSiweMessage"),t.fromSiweMessage=e;function r(f){let d={h:{t:"caip122"},p:{domain:f.domain,iat:f.issuedAt,iss:`did:pkh:solana:${f.chainId}:${f.address}`,aud:f.uri,version:f.version,nonce:f.nonce}};return f.signature&&(d.s={t:"solana:ed25519",s:f.signature}),f.notBefore&&(d.p.nbf=f.notBefore),f.expirationTime&&(d.p.exp=f.expirationTime),f.statement&&(d.p.statement=f.statement),f.requestId&&(d.p.requestId=f.requestId),f.resources&&(d.p.resources=f.resources),d}o(r,"fromSiwsMessage"),t.fromSiwsMessage=r;function n(f){let d={h:{t:"caip122"},p:{domain:f.domain,iat:f.issuedAt,iss:`did:pkh:tezos:${f.chainId}:${f.address}`,aud:f.uri,version:f.version,nonce:f.nonce}};return f.signature&&(d.s={t:"tezos:ed25519",s:f.signature}),f.notBefore&&(d.p.nbf=f.notBefore),f.expirationTime&&(d.p.exp=f.expirationTime),f.statement&&(d.p.statement=f.statement),f.requestId&&(d.p.requestId=f.requestId),f.resources&&(d.p.resources=f.resources),d}o(n,"fromSiwTezosMessage"),t.fromSiwTezosMessage=n;function i(f){let d={h:{t:"caip122"},p:{domain:f.domain,iat:f.issuedAt,iss:`did:pkh:stacks:${f.chainId}:${f.address}`,aud:f.uri,version:f.version,nonce:f.nonce}};return f.signature&&(d.s={t:"stacks:secp256k1",s:f.signature}),f.notBefore&&(d.p.nbf=f.notBefore),f.expirationTime&&(d.p.exp=f.expirationTime),f.statement&&(d.p.statement=f.statement),f.requestId&&(d.p.requestId=f.requestId),f.resources&&(d.p.resources=f.resources),d}o(i,"fromSiwStacksMessage"),t.fromSiwStacksMessage=i;async function s(f){return(await MM({bytes:f,codec:Po,hasher:uc})).value}o(s,"fromBlockBytes"),t.fromBlockBytes=s;async function a(f,d={}){qx(f);let h=d.verifiers[f.s.t];if(!h)throw new Error("Unsupported CACAO signature type, register the needed verifier");return h(f,d)}o(a,"verify"),t.verify=a})(_0||(_0={}));var E0;(function(t){function e(r){return Of({value:r,codec:Po,hasher:uc})}o(e,"fromCacao"),t.fromCacao=e})(E0||(E0={}));function qx(t){if(t.s===null||t.s===void 0)throw new Error("CACAO does not have a signature")}o(qx,"assertSigned");function HB(t,e){let r=e.atTime?e.atTime.getTime():Date.now(),n=(e.clockSkewSecs??nde)*1e3;if(Date.parse(t.p.iat)>r+n||Date.parse(t.p.nbf)>r+n)throw new Error("CACAO is not valid yet");let i=e.revocationPhaseOutSecs?e.revocationPhaseOutSecs*1e3:0;if(!e.disableExpirationCheck&&Date.parse(t.p.exp)+i+n<r)throw new Error("CACAO has expired")}o(HB,"verifyTimeChecks");var VB="logger/5.7.0";var zB=!1,KB=!1,Cg={debug:1,default:2,info:2,warning:3,error:4,off:5},GB=Cg.default,$x=null;function ide(){try{let t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{t.push(e)}}),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}o(ide,"_checkNormalize");var WB=ide(),jx;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(jx||(jx={}));var No;(function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"})(No||(No={}));var YB="0123456789abcdef",St=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,r){let n=e.toLowerCase();Cg[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(GB>Cg[n])&&console.log.apply(console,r)}debug(...e){this._log(St.levels.DEBUG,e)}info(...e){this._log(St.levels.INFO,e)}warn(...e){this._log(St.levels.WARNING,e)}makeError(e,r,n){if(KB)return this.makeError("censored error",r,{});r||(r=St.errors.UNKNOWN_ERROR),n||(n={});let i=[];Object.keys(n).forEach(d=>{let h=n[d];try{if(h instanceof Uint8Array){let p="";for(let y=0;y<h.length;y++)p+=YB[h[y]>>4],p+=YB[h[y]&15];i.push(d+"=Uint8Array(0x"+p+")")}else i.push(d+"="+JSON.stringify(h))}catch{i.push(d+"="+JSON.stringify(n[d].toString()))}}),i.push(`code=${r}`),i.push(`version=${this.version}`);let s=e,a="";switch(r){case No.NUMERIC_FAULT:{a="NUMERIC_FAULT";let d=e;switch(d){case"overflow":case"underflow":case"division-by-zero":a+="-"+d;break;case"negative-power":case"negative-width":a+="-unsupported";break;case"unbound-bitwise-result":a+="-unbound-result";break}break}case No.CALL_EXCEPTION:case No.INSUFFICIENT_FUNDS:case No.MISSING_NEW:case No.NONCE_EXPIRED:case No.REPLACEMENT_UNDERPRICED:case No.TRANSACTION_REPLACED:case No.UNPREDICTABLE_GAS_LIMIT:a=r;break}a&&(e+=" [ See: https://links.ethers.org/v5-errors-"+a+" ]"),i.length&&(e+=" ("+i.join(", ")+")");let f=new Error(e);return f.reason=s,f.code=r,Object.keys(n).forEach(function(d){f[d]=n[d]}),f}throwError(e,r,n){throw this.makeError(e,r,n)}throwArgumentError(e,r,n){return this.throwError(e,St.errors.INVALID_ARGUMENT,{argument:r,value:n})}assert(e,r,n,i){e||this.throwError(r,n,i)}assertArgument(e,r,n,i){e||this.throwArgumentError(r,n,i)}checkNormalize(e){e==null&&(e="platform missing String.prototype.normalize"),WB&&this.throwError("platform missing String.prototype.normalize",St.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:WB})}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,St.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,St.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,r,n){n?n=": "+n:n="",e<r&&this.throwError("missing argument"+n,St.errors.MISSING_ARGUMENT,{count:e,expectedCount:r}),e>r&&this.throwError("too many arguments"+n,St.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",St.errors.MISSING_NEW,{name:r.name})}checkAbstract(e,r){e===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",St.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",St.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return $x||($x=new St(VB)),$x}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",St.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),zB){if(!e)return;this.globalLogger().throwError("error censorship permanent",St.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}KB=!!e,zB=!!r}static setLogLevel(e){let r=Cg[e.toLowerCase()];if(r==null){St.globalLogger().warn("invalid log level - "+e);return}GB=r}static from(e){return new St(e)}};o(St,"Logger");St.errors=No;St.levels=jx;var JB="bytes/5.7.0";var Mr=new St(JB);function ZB(t){return!!t.toHexString}o(ZB,"isHexable");function Vd(t){return t.slice||(t.slice=function(){let e=Array.prototype.slice.call(arguments);return Vd(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}o(Vd,"addSlice");function QB(t){return Lo(t)&&!(t.length%2)||Vx(t)}o(QB,"isBytesLike");function XB(t){return typeof t=="number"&&t==t&&t%1===0}o(XB,"isInteger");function Vx(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!XB(t.length)||t.length<0)return!1;for(let e=0;e<t.length;e++){let r=t[e];if(!XB(r)||r<0||r>=256)return!1}return!0}o(Vx,"isBytes");function lr(t,e){if(e||(e={}),typeof t=="number"){Mr.checkSafeUint53(t,"invalid arrayify value");let r=[];for(;t;)r.unshift(t&255),t=parseInt(String(t/256));return r.length===0&&r.push(0),Vd(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),ZB(t)&&(t=t.toHexString()),Lo(t)){let r=t.substring(2);r.length%2&&(e.hexPad==="left"?r="0"+r:e.hexPad==="right"?r+="0":Mr.throwArgumentError("hex data is odd-length","value",t));let n=[];for(let i=0;i<r.length;i+=2)n.push(parseInt(r.substring(i,i+2),16));return Vd(new Uint8Array(n))}return Vx(t)?Vd(new Uint8Array(t)):Mr.throwArgumentError("invalid arrayify value","value",t)}o(lr,"arrayify");function zx(t){let e=t.map(i=>lr(i)),r=e.reduce((i,s)=>i+s.length,0),n=new Uint8Array(r);return e.reduce((i,s)=>(n.set(s,i),i+s.length),0),Vd(n)}o(zx,"concat");function ode(t,e){t=lr(t),t.length>e&&Mr.throwArgumentError("value out of range","value",arguments[0]);let r=new Uint8Array(e);return r.set(t,e-t.length),Vd(r)}o(ode,"zeroPad");function Lo(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}o(Lo,"isHexString");var Hx="0123456789abcdef";function In(t,e){if(e||(e={}),typeof t=="number"){Mr.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=Hx[t&15]+r,t=Math.floor(t/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if(typeof t=="bigint")return t=t.toString(16),t.length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),ZB(t))return t.toHexString();if(Lo(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":Mr.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(Vx(t)){let r="0x";for(let n=0;n<t.length;n++){let i=t[n];r+=Hx[(i&240)>>4]+Hx[i&15]}return r}return Mr.throwArgumentError("invalid hexlify value","value",t)}o(In,"hexlify");function Ig(t){if(typeof t!="string")t=In(t);else if(!Lo(t)||t.length%2)return null;return(t.length-2)/2}o(Ig,"hexDataLength");function Dg(t,e,r){return typeof t!="string"?t=In(t):(!Lo(t)||t.length%2)&&Mr.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}o(Dg,"hexDataSlice");function Tc(t,e){for(typeof t!="string"?t=In(t):Lo(t)||Mr.throwArgumentError("invalid hex string","value",t),t.length>2*e+2&&Mr.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}o(Tc,"hexZeroPad");function Sg(t){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(QB(t)){let r=lr(t);r.length===64?(e.v=27+(r[32]>>7),r[32]&=127,e.r=In(r.slice(0,32)),e.s=In(r.slice(32,64))):r.length===65?(e.r=In(r.slice(0,32)),e.s=In(r.slice(32,64)),e.v=r[64]):Mr.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:Mr.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=In(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,e._vs!=null){let i=ode(lr(e._vs),32);e._vs=In(i);let s=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=s:e.recoveryParam!==s&&Mr.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),i[0]&=127;let a=In(i);e.s==null?e.s=a:e.s!==a&&Mr.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?Mr.throwArgumentError("signature missing v and recoveryParam","signature",t):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{let i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&Mr.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!Lo(e.r)?Mr.throwArgumentError("signature missing or invalid r","signature",t):e.r=Tc(e.r,32),e.s==null||!Lo(e.s)?Mr.throwArgumentError("signature missing or invalid s","signature",t):e.s=Tc(e.s,32);let r=lr(e.s);r[0]>=128&&Mr.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);let n=In(r);e._vs&&(Lo(e._vs)||Mr.throwArgumentError("signature invalid _vs","signature",t),e._vs=Tc(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&Mr.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}o(Sg,"splitSignature");var rF=Mt(Gx());var tF="bignumber/5.7.0";var sde=rF.default.BN,a7e=new St(tF);function Wx(t){return new sde(t,36).toString(16)}o(Wx,"_base36To16");var nF=Mt(by());function zd(t){return"0x"+nF.default.keccak_256(lr(t))}o(zd,"keccak256");var iF="address/5.7.0";var A0=new St(iF);function oF(t){Lo(t,20)||A0.throwArgumentError("invalid address","address",t),t=t.toLowerCase();let e=t.substring(2).split(""),r=new Uint8Array(40);for(let i=0;i<40;i++)r[i]=e[i].charCodeAt(0);let n=lr(zd(r));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}o(oF,"getChecksumAddress");var fde=9007199254740991;function ude(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}o(ude,"log10");var Yx={};for(let t=0;t<10;t++)Yx[String(t)]=String(t);for(let t=0;t<26;t++)Yx[String.fromCharCode(65+t)]=String(10+t);var sF=Math.floor(ude(fde));function dde(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>Yx[n]).join("");for(;e.length>=sF;){let n=e.substring(0,sF);e=parseInt(n,10)%97+e.substring(n.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}o(dde,"ibanChecksum");function aF(t){let e=null;if(typeof t!="string"&&A0.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=oF(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&A0.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==dde(t)&&A0.throwArgumentError("bad icap checksum","address",t),e=Wx(t.substring(4));e.length<40;)e="0"+e;e=oF("0x"+e)}else A0.throwArgumentError("invalid address","address",t);return e}o(aF,"getAddress");var cF="properties/5.7.0";var A7e=new St(cF);function Kd(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}o(Kd,"defineReadOnly");var fF="strings/5.7.0";var uF=new St(fF),C0;(function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"})(C0||(C0={}));var zf;(function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"})(zf||(zf={}));function lde(t,e,r,n,i){return uF.throwArgumentError(`invalid codepoint at offset ${e}; ${t}`,"bytes",r)}o(lde,"errorFunc");function dF(t,e,r,n,i){if(t===zf.BAD_PREFIX||t===zf.UNEXPECTED_CONTINUE){let s=0;for(let a=e+1;a<r.length&&r[a]>>6===2;a++)s++;return s}return t===zf.OVERRUN?r.length-e-1:0}o(dF,"ignoreFunc");function hde(t,e,r,n,i){return t===zf.OVERLONG?(n.push(i),0):(n.push(65533),dF(t,e,r,n,i))}o(hde,"replaceFunc");var pde=Object.freeze({error:lde,ignore:dF,replace:hde});function I0(t,e=C0.current){e!=C0.current&&(uF.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n<t.length;n++){let i=t.charCodeAt(n);if(i<128)r.push(i);else if(i<2048)r.push(i>>6|192),r.push(i&63|128);else if((i&64512)==55296){n++;let s=t.charCodeAt(n);if(n>=t.length||(s&64512)!==56320)throw new Error("invalid utf-8 string");let a=65536+((i&1023)<<10)+(s&1023);r.push(a>>18|240),r.push(a>>12&63|128),r.push(a>>6&63|128),r.push(a&63|128)}else r.push(i>>12|224),r.push(i>>6&63|128),r.push(i&63|128)}return lr(r)}o(I0,"toUtf8Bytes");var lF=`Ethereum Signed Message:
|
819
|
-
`;function Jx(t){return typeof t=="string"&&(t=I0(t)),zd(zx([I0(lF),I0(String(t.length)),t]))}o(Jx,"hashMessage");var Et=Mt(Gx()),vs=Mt(Gh());function Gd(t,e,r){return r={path:e,exports:{},require:function(n,i){return mde(n,i??r.path)}},t(r,r.exports),r.exports}o(Gd,"createCommonjsModule");function mde(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}o(mde,"commonjsRequire");var e4=pF;function pF(t,e){if(!t)throw new Error(e||"Assertion failed")}o(pF,"assert");pF.equal=o(function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)},"assertEqual");var Uo=Gd(function(t,e){"use strict";var r=e;function n(a,f){if(Array.isArray(a))return a.slice();if(!a)return[];var d=[];if(typeof a!="string"){for(var h=0;h<a.length;h++)d[h]=a[h]|0;return d}if(f==="hex"){a=a.replace(/[^a-z0-9]+/ig,""),a.length%2!==0&&(a="0"+a);for(var h=0;h<a.length;h+=2)d.push(parseInt(a[h]+a[h+1],16))}else for(var h=0;h<a.length;h++){var p=a.charCodeAt(h),y=p>>8,I=p&255;y?d.push(y,I):d.push(I)}return d}o(n,"toArray"),r.toArray=n;function i(a){return a.length===1?"0"+a:a}o(i,"zero2"),r.zero2=i;function s(a){for(var f="",d=0;d<a.length;d++)f+=i(a[d].toString(16));return f}o(s,"toHex"),r.toHex=s,r.encode=o(function(f,d){return d==="hex"?s(f):f},"encode")}),Ei=Gd(function(t,e){"use strict";var r=e;r.assert=e4,r.toArray=Uo.toArray,r.zero2=Uo.zero2,r.toHex=Uo.toHex,r.encode=Uo.encode;function n(d,h,p){var y=new Array(Math.max(d.bitLength(),p)+1);y.fill(0);for(var I=1<<h+1,T=d.clone(),D=0;D<y.length;D++){var R,H=T.andln(I-1);T.isOdd()?(H>(I>>1)-1?R=(I>>1)-H:R=H,T.isubn(R)):R=0,y[D]=R,T.iushrn(1)}return y}o(n,"getNAF"),r.getNAF=n;function i(d,h){var p=[[],[]];d=d.clone(),h=h.clone();for(var y=0,I=0,T;d.cmpn(-y)>0||h.cmpn(-I)>0;){var D=d.andln(3)+y&3,R=h.andln(3)+I&3;D===3&&(D=-1),R===3&&(R=-1);var H;(D&1)===0?H=0:(T=d.andln(7)+y&7,(T===3||T===5)&&R===2?H=-D:H=D),p[0].push(H);var F;(R&1)===0?F=0:(T=h.andln(7)+I&7,(T===3||T===5)&&D===2?F=-R:F=R),p[1].push(F),2*y===H+1&&(y=1-y),2*I===F+1&&(I=1-I),d.iushrn(1),h.iushrn(1)}return p}o(i,"getJSF"),r.getJSF=i;function s(d,h,p){var y="_"+h;d.prototype[h]=o(function(){return this[y]!==void 0?this[y]:this[y]=p.call(this)},"cachedProperty")}o(s,"cachedProperty"),r.cachedProperty=s;function a(d){return typeof d=="string"?r.toArray(d,"hex"):d}o(a,"parseBytes"),r.parseBytes=a;function f(d){return new Et.default(d,"hex","le")}o(f,"intFromLE"),r.intFromLE=f}),Mg=Ei.getNAF,gde=Ei.getJSF,Rg=Ei.assert;function Mc(t,e){this.type=t,this.p=new Et.default(e.p,16),this.red=e.prime?Et.default.red(e.prime):Et.default.mont(this.p),this.zero=new Et.default(0).toRed(this.red),this.one=new Et.default(1).toRed(this.red),this.two=new Et.default(2).toRed(this.red),this.n=e.n&&new Et.default(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}o(Mc,"BaseCurve");var Kf=Mc;Mc.prototype.point=o(function(){throw new Error("Not implemented")},"point");Mc.prototype.validate=o(function(){throw new Error("Not implemented")},"validate");Mc.prototype._fixedNafMul=o(function(e,r){Rg(e.precomputed);var n=e._getDoubles(),i=Mg(r,1,this._bitLength),s=(1<<n.step+1)-(n.step%2===0?2:1);s/=3;var a=[],f,d;for(f=0;f<i.length;f+=n.step){d=0;for(var h=f+n.step-1;h>=f;h--)d=(d<<1)+i[h];a.push(d)}for(var p=this.jpoint(null,null,null),y=this.jpoint(null,null,null),I=s;I>0;I--){for(f=0;f<a.length;f++)d=a[f],d===I?y=y.mixedAdd(n.points[f]):d===-I&&(y=y.mixedAdd(n.points[f].neg()));p=p.add(y)}return p.toP()},"_fixedNafMul");Mc.prototype._wnafMul=o(function(e,r){var n=4,i=e._getNAFPoints(n);n=i.wnd;for(var s=i.points,a=Mg(r,n,this._bitLength),f=this.jpoint(null,null,null),d=a.length-1;d>=0;d--){for(var h=0;d>=0&&a[d]===0;d--)h++;if(d>=0&&h++,f=f.dblp(h),d<0)break;var p=a[d];Rg(p!==0),e.type==="affine"?p>0?f=f.mixedAdd(s[p-1>>1]):f=f.mixedAdd(s[-p-1>>1].neg()):p>0?f=f.add(s[p-1>>1]):f=f.add(s[-p-1>>1].neg())}return e.type==="affine"?f.toP():f},"_wnafMul");Mc.prototype._wnafMulAdd=o(function(e,r,n,i,s){var a=this._wnafT1,f=this._wnafT2,d=this._wnafT3,h=0,p,y,I;for(p=0;p<i;p++){I=r[p];var T=I._getNAFPoints(e);a[p]=T.wnd,f[p]=T.points}for(p=i-1;p>=1;p-=2){var D=p-1,R=p;if(a[D]!==1||a[R]!==1){d[D]=Mg(n[D],a[D],this._bitLength),d[R]=Mg(n[R],a[R],this._bitLength),h=Math.max(d[D].length,h),h=Math.max(d[R].length,h);continue}var H=[r[D],null,null,r[R]];r[D].y.cmp(r[R].y)===0?(H[1]=r[D].add(r[R]),H[2]=r[D].toJ().mixedAdd(r[R].neg())):r[D].y.cmp(r[R].y.redNeg())===0?(H[1]=r[D].toJ().mixedAdd(r[R]),H[2]=r[D].add(r[R].neg())):(H[1]=r[D].toJ().mixedAdd(r[R]),H[2]=r[D].toJ().mixedAdd(r[R].neg()));var F=[-3,-1,-5,-7,0,7,5,1,3],V=gde(n[D],n[R]);for(h=Math.max(V[0].length,h),d[D]=new Array(h),d[R]=new Array(h),y=0;y<h;y++){var X=V[0][y]|0,J=V[1][y]|0;d[D][y]=F[(X+1)*3+(J+1)],d[R][y]=0,f[D]=H}}var re=this.jpoint(null,null,null),z=this._wnafT4;for(p=h;p>=0;p--){for(var $=0;p>=0;){var G=!0;for(y=0;y<i;y++)z[y]=d[y][p]|0,z[y]!==0&&(G=!1);if(!G)break;$++,p--}if(p>=0&&$++,re=re.dblp($),p<0)break;for(y=0;y<i;y++){var le=z[y];le!==0&&(le>0?I=f[y][le-1>>1]:le<0&&(I=f[y][-le-1>>1].neg()),I.type==="affine"?re=re.mixedAdd(I):re=re.add(I))}}for(p=0;p<i;p++)f[p]=null;return s?re:re.toP()},"_wnafMulAdd");function so(t,e){this.curve=t,this.type=e,this.precomputed=null}o(so,"BasePoint");Mc.BasePoint=so;so.prototype.eq=o(function(){throw new Error("Not implemented")},"eq");so.prototype.validate=o(function(){return this.curve.validate(this)},"validate");Mc.prototype.decodePoint=o(function(e,r){e=Ei.toArray(e,r);var n=this.p.byteLength();if((e[0]===4||e[0]===6||e[0]===7)&&e.length-1===2*n){e[0]===6?Rg(e[e.length-1]%2===0):e[0]===7&&Rg(e[e.length-1]%2===1);var i=this.point(e.slice(1,1+n),e.slice(1+n,1+2*n));return i}else if((e[0]===2||e[0]===3)&&e.length-1===n)return this.pointFromX(e.slice(1,1+n),e[0]===3);throw new Error("Unknown point format")},"decodePoint");so.prototype.encodeCompressed=o(function(e){return this.encode(e,!0)},"encodeCompressed");so.prototype._encode=o(function(e){var r=this.curve.p.byteLength(),n=this.getX().toArray("be",r);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",r))},"_encode");so.prototype.encode=o(function(e,r){return Ei.encode(this._encode(r),e)},"encode");so.prototype.precompute=o(function(e){if(this.precomputed)return this;var r={doubles:null,naf:null,beta:null};return r.naf=this._getNAFPoints(8),r.doubles=this._getDoubles(4,e),r.beta=this._getBeta(),this.precomputed=r,this},"precompute");so.prototype._hasDoubles=o(function(e){if(!this.precomputed)return!1;var r=this.precomputed.doubles;return r?r.points.length>=Math.ceil((e.bitLength()+1)/r.step):!1},"_hasDoubles");so.prototype._getDoubles=o(function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,s=0;s<r;s+=e){for(var a=0;a<e;a++)i=i.dbl();n.push(i)}return{step:e,points:n}},"_getDoubles");so.prototype._getNAFPoints=o(function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var r=[this],n=(1<<e)-1,i=n===1?null:this.dbl(),s=1;s<n;s++)r[s]=r[s-1].add(i);return{wnd:e,points:r}},"_getNAFPoints");so.prototype._getBeta=o(function(){return null},"_getBeta");so.prototype.dblp=o(function(e){for(var r=this,n=0;n<e;n++)r=r.dbl();return r},"dblp");var t4=Gd(function(t){typeof Object.create=="function"?t.exports=o(function(r,n){n&&(r.super_=n,r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))},"inherits"):t.exports=o(function(r,n){if(n){r.super_=n;var i=o(function(){},"TempCtor");i.prototype=n.prototype,r.prototype=new i,r.prototype.constructor=r}},"inherits")}),bde=Ei.assert;function ao(t){Kf.call(this,"short",t),this.a=new Et.default(t.a,16).toRed(this.red),this.b=new Et.default(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}o(ao,"ShortCurve");t4(ao,Kf);var vde=ao;ao.prototype._getEndomorphism=o(function(e){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var r,n;if(e.beta)r=new Et.default(e.beta,16).toRed(this.red);else{var i=this._getEndoRoots(this.p);r=i[0].cmp(i[1])<0?i[0]:i[1],r=r.toRed(this.red)}if(e.lambda)n=new Et.default(e.lambda,16);else{var s=this._getEndoRoots(this.n);this.g.mul(s[0]).x.cmp(this.g.x.redMul(r))===0?n=s[0]:(n=s[1],bde(this.g.mul(n).x.cmp(this.g.x.redMul(r))===0))}var a;return e.basis?a=e.basis.map(function(f){return{a:new Et.default(f.a,16),b:new Et.default(f.b,16)}}):a=this._getEndoBasis(n),{beta:r,lambda:n,basis:a}}},"_getEndomorphism");ao.prototype._getEndoRoots=o(function(e){var r=e===this.p?this.red:Et.default.mont(e),n=new Et.default(2).toRed(r).redInvm(),i=n.redNeg(),s=new Et.default(3).toRed(r).redNeg().redSqrt().redMul(n),a=i.redAdd(s).fromRed(),f=i.redSub(s).fromRed();return[a,f]},"_getEndoRoots");ao.prototype._getEndoBasis=o(function(e){for(var r=this.n.ushrn(Math.floor(this.n.bitLength()/2)),n=e,i=this.n.clone(),s=new Et.default(1),a=new Et.default(0),f=new Et.default(0),d=new Et.default(1),h,p,y,I,T,D,R,H=0,F,V;n.cmpn(0)!==0;){var X=i.div(n);F=i.sub(X.mul(n)),V=f.sub(X.mul(s));var J=d.sub(X.mul(a));if(!y&&F.cmp(r)<0)h=R.neg(),p=s,y=F.neg(),I=V;else if(y&&++H===2)break;R=F,i=n,n=F,f=s,s=V,d=a,a=J}T=F.neg(),D=V;var re=y.sqr().add(I.sqr()),z=T.sqr().add(D.sqr());return z.cmp(re)>=0&&(T=h,D=p),y.negative&&(y=y.neg(),I=I.neg()),T.negative&&(T=T.neg(),D=D.neg()),[{a:y,b:I},{a:T,b:D}]},"_getEndoBasis");ao.prototype._endoSplit=o(function(e){var r=this.endo.basis,n=r[0],i=r[1],s=i.b.mul(e).divRound(this.n),a=n.b.neg().mul(e).divRound(this.n),f=s.mul(n.a),d=a.mul(i.a),h=s.mul(n.b),p=a.mul(i.b),y=e.sub(f).sub(d),I=h.add(p).neg();return{k1:y,k2:I}},"_endoSplit");ao.prototype.pointFromX=o(function(e,r){e=new Et.default(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var s=i.fromRed().isOdd();return(r&&!s||!r&&s)&&(i=i.redNeg()),this.point(e,i)},"pointFromX");ao.prototype.validate=o(function(e){if(e.inf)return!0;var r=e.x,n=e.y,i=this.a.redMul(r),s=r.redSqr().redMul(r).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(s).cmpn(0)===0},"validate");ao.prototype._endoWnafMulAdd=o(function(e,r,n){for(var i=this._endoWnafT1,s=this._endoWnafT2,a=0;a<e.length;a++){var f=this._endoSplit(r[a]),d=e[a],h=d._getBeta();f.k1.negative&&(f.k1.ineg(),d=d.neg(!0)),f.k2.negative&&(f.k2.ineg(),h=h.neg(!0)),i[a*2]=d,i[a*2+1]=h,s[a*2]=f.k1,s[a*2+1]=f.k2}for(var p=this._wnafMulAdd(1,i,s,a*2,n),y=0;y<a*2;y++)i[y]=null,s[y]=null;return p},"_endoWnafMulAdd");function Jr(t,e,r,n){Kf.BasePoint.call(this,t,"affine"),e===null&&r===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new Et.default(e,16),this.y=new Et.default(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}o(Jr,"Point");t4(Jr,Kf.BasePoint);ao.prototype.point=o(function(e,r,n){return new Jr(this,e,r,n)},"point");ao.prototype.pointFromJSON=o(function(e,r){return Jr.fromJSON(this,e,r)},"pointFromJSON");Jr.prototype._getBeta=o(function(){if(!!this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var r=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var n=this.curve,i=o(function(s){return n.point(s.x.redMul(n.endo.beta),s.y)},"endoMul");e.beta=r,r.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(i)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(i)}}}return r}},"_getBeta");Jr.prototype.toJSON=o(function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},"toJSON");Jr.fromJSON=o(function(e,r,n){typeof r=="string"&&(r=JSON.parse(r));var i=e.point(r[0],r[1],n);if(!r[2])return i;function s(f){return e.point(f[0],f[1],n)}o(s,"obj2point");var a=r[2];return i.precomputed={beta:null,doubles:a.doubles&&{step:a.doubles.step,points:[i].concat(a.doubles.points.map(s))},naf:a.naf&&{wnd:a.naf.wnd,points:[i].concat(a.naf.points.map(s))}},i},"fromJSON");Jr.prototype.inspect=o(function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},"inspect");Jr.prototype.isInfinity=o(function(){return this.inf},"isInfinity");Jr.prototype.add=o(function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(e.x),i=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)},"add");Jr.prototype.dbl=o(function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),s=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(i),a=s.redSqr().redISub(this.x.redAdd(this.x)),f=s.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,f)},"dbl");Jr.prototype.getX=o(function(){return this.x.fromRed()},"getX");Jr.prototype.getY=o(function(){return this.y.fromRed()},"getY");Jr.prototype.mul=o(function(e){return e=new Et.default(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},"mul");Jr.prototype.mulAdd=o(function(e,r,n){var i=[this,r],s=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,s):this.curve._wnafMulAdd(1,i,s,2)},"mulAdd");Jr.prototype.jmulAdd=o(function(e,r,n){var i=[this,r],s=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,s,!0):this.curve._wnafMulAdd(1,i,s,2,!0)},"jmulAdd");Jr.prototype.eq=o(function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)},"eq");Jr.prototype.neg=o(function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=o(function(s){return s.neg()},"negate");r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return r},"neg");Jr.prototype.toJ=o(function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e},"toJ");function cn(t,e,r,n){Kf.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Et.default(0)):(this.x=new Et.default(e,16),this.y=new Et.default(r,16),this.z=new Et.default(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(cn,"JPoint");t4(cn,Kf.BasePoint);ao.prototype.jpoint=o(function(e,r,n){return new cn(this,e,r,n)},"jpoint");cn.prototype.toP=o(function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),n=this.x.redMul(r),i=this.y.redMul(r).redMul(e);return this.curve.point(n,i)},"toP");cn.prototype.neg=o(function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},"neg");cn.prototype.add=o(function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(r),s=e.x.redMul(n),a=this.y.redMul(r.redMul(e.z)),f=e.y.redMul(n.redMul(this.z)),d=i.redSub(s),h=a.redSub(f);if(d.cmpn(0)===0)return h.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var p=d.redSqr(),y=p.redMul(d),I=i.redMul(p),T=h.redSqr().redIAdd(y).redISub(I).redISub(I),D=h.redMul(I.redISub(T)).redISub(a.redMul(y)),R=this.z.redMul(e.z).redMul(d);return this.curve.jpoint(T,D,R)},"add");cn.prototype.mixedAdd=o(function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,i=e.x.redMul(r),s=this.y,a=e.y.redMul(r).redMul(this.z),f=n.redSub(i),d=s.redSub(a);if(f.cmpn(0)===0)return d.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var h=f.redSqr(),p=h.redMul(f),y=n.redMul(h),I=d.redSqr().redIAdd(p).redISub(y).redISub(y),T=d.redMul(y.redISub(I)).redISub(s.redMul(p)),D=this.z.redMul(f);return this.curve.jpoint(I,T,D)},"mixedAdd");cn.prototype.dblp=o(function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var n=this;for(r=0;r<e;r++)n=n.dbl();return n}var i=this.curve.a,s=this.curve.tinv,a=this.x,f=this.y,d=this.z,h=d.redSqr().redSqr(),p=f.redAdd(f);for(r=0;r<e;r++){var y=a.redSqr(),I=p.redSqr(),T=I.redSqr(),D=y.redAdd(y).redIAdd(y).redIAdd(i.redMul(h)),R=a.redMul(I),H=D.redSqr().redISub(R.redAdd(R)),F=R.redISub(H),V=D.redMul(F);V=V.redIAdd(V).redISub(T);var X=p.redMul(d);r+1<e&&(h=h.redMul(T)),a=H,d=X,p=V}return this.curve.jpoint(a,p.redMul(s),d)},"dblp");cn.prototype.dbl=o(function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},"dbl");cn.prototype._zeroDbl=o(function(){var e,r,n;if(this.zOne){var i=this.x.redSqr(),s=this.y.redSqr(),a=s.redSqr(),f=this.x.redAdd(s).redSqr().redISub(i).redISub(a);f=f.redIAdd(f);var d=i.redAdd(i).redIAdd(i),h=d.redSqr().redISub(f).redISub(f),p=a.redIAdd(a);p=p.redIAdd(p),p=p.redIAdd(p),e=h,r=d.redMul(f.redISub(h)).redISub(p),n=this.y.redAdd(this.y)}else{var y=this.x.redSqr(),I=this.y.redSqr(),T=I.redSqr(),D=this.x.redAdd(I).redSqr().redISub(y).redISub(T);D=D.redIAdd(D);var R=y.redAdd(y).redIAdd(y),H=R.redSqr(),F=T.redIAdd(T);F=F.redIAdd(F),F=F.redIAdd(F),e=H.redISub(D).redISub(D),r=R.redMul(D.redISub(e)).redISub(F),n=this.y.redMul(this.z),n=n.redIAdd(n)}return this.curve.jpoint(e,r,n)},"_zeroDbl");cn.prototype._threeDbl=o(function(){var e,r,n;if(this.zOne){var i=this.x.redSqr(),s=this.y.redSqr(),a=s.redSqr(),f=this.x.redAdd(s).redSqr().redISub(i).redISub(a);f=f.redIAdd(f);var d=i.redAdd(i).redIAdd(i).redIAdd(this.curve.a),h=d.redSqr().redISub(f).redISub(f);e=h;var p=a.redIAdd(a);p=p.redIAdd(p),p=p.redIAdd(p),r=d.redMul(f.redISub(h)).redISub(p),n=this.y.redAdd(this.y)}else{var y=this.z.redSqr(),I=this.y.redSqr(),T=this.x.redMul(I),D=this.x.redSub(y).redMul(this.x.redAdd(y));D=D.redAdd(D).redIAdd(D);var R=T.redIAdd(T);R=R.redIAdd(R);var H=R.redAdd(R);e=D.redSqr().redISub(H),n=this.y.redAdd(this.z).redSqr().redISub(I).redISub(y);var F=I.redSqr();F=F.redIAdd(F),F=F.redIAdd(F),F=F.redIAdd(F),r=D.redMul(R.redISub(e)).redISub(F)}return this.curve.jpoint(e,r,n)},"_threeDbl");cn.prototype._dbl=o(function(){var e=this.curve.a,r=this.x,n=this.y,i=this.z,s=i.redSqr().redSqr(),a=r.redSqr(),f=n.redSqr(),d=a.redAdd(a).redIAdd(a).redIAdd(e.redMul(s)),h=r.redAdd(r);h=h.redIAdd(h);var p=h.redMul(f),y=d.redSqr().redISub(p.redAdd(p)),I=p.redISub(y),T=f.redSqr();T=T.redIAdd(T),T=T.redIAdd(T),T=T.redIAdd(T);var D=d.redMul(I).redISub(T),R=n.redAdd(n).redMul(i);return this.curve.jpoint(y,D,R)},"_dbl");cn.prototype.trpl=o(function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),r=this.y.redSqr(),n=this.z.redSqr(),i=r.redSqr(),s=e.redAdd(e).redIAdd(e),a=s.redSqr(),f=this.x.redAdd(r).redSqr().redISub(e).redISub(i);f=f.redIAdd(f),f=f.redAdd(f).redIAdd(f),f=f.redISub(a);var d=f.redSqr(),h=i.redIAdd(i);h=h.redIAdd(h),h=h.redIAdd(h),h=h.redIAdd(h);var p=s.redIAdd(f).redSqr().redISub(a).redISub(d).redISub(h),y=r.redMul(p);y=y.redIAdd(y),y=y.redIAdd(y);var I=this.x.redMul(d).redISub(y);I=I.redIAdd(I),I=I.redIAdd(I);var T=this.y.redMul(p.redMul(h.redISub(p)).redISub(f.redMul(d)));T=T.redIAdd(T),T=T.redIAdd(T),T=T.redIAdd(T);var D=this.z.redAdd(f).redSqr().redISub(n).redISub(d);return this.curve.jpoint(I,T,D)},"trpl");cn.prototype.mul=o(function(e,r){return e=new Et.default(e,r),this.curve._wnafMul(this,e)},"mul");cn.prototype.eq=o(function(e){if(e.type==="affine")return this.eq(e.toJ());if(this===e)return!0;var r=this.z.redSqr(),n=e.z.redSqr();if(this.x.redMul(n).redISub(e.x.redMul(r)).cmpn(0)!==0)return!1;var i=r.redMul(this.z),s=n.redMul(e.z);return this.y.redMul(s).redISub(e.y.redMul(i)).cmpn(0)===0},"eq");cn.prototype.eqXToP=o(function(e){var r=this.z.redSqr(),n=e.toRed(this.curve.red).redMul(r);if(this.x.cmp(n)===0)return!0;for(var i=e.clone(),s=this.curve.redN.redMul(r);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(s),this.x.cmp(n)===0)return!0}},"eqXToP");cn.prototype.inspect=o(function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},"inspect");cn.prototype.isInfinity=o(function(){return this.z.cmpn(0)===0},"isInfinity");var Tg=Gd(function(t,e){"use strict";var r=e;r.base=Kf,r.short=vde,r.mont=null,r.edwards=null}),kg=Gd(function(t,e){"use strict";var r=e,n=Ei.assert;function i(f){f.type==="short"?this.curve=new Tg.short(f):f.type==="edwards"?this.curve=new Tg.edwards(f):this.curve=new Tg.mont(f),this.g=this.curve.g,this.n=this.curve.n,this.hash=f.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}o(i,"PresetCurve"),r.PresetCurve=i;function s(f,d){Object.defineProperty(r,f,{configurable:!0,enumerable:!0,get:function(){var h=new i(d);return Object.defineProperty(r,f,{configurable:!0,enumerable:!0,value:h}),h}})}o(s,"defineCurve"),s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:vs.default.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:vs.default.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:vs.default.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:vs.default.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:vs.default.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:vs.default.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:vs.default.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var a;try{a=null.crash()}catch{a=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:vs.default.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",a]})});function kc(t){if(!(this instanceof kc))return new kc(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Uo.toArray(t.entropy,t.entropyEnc||"hex"),r=Uo.toArray(t.nonce,t.nonceEnc||"hex"),n=Uo.toArray(t.pers,t.persEnc||"hex");e4(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}o(kc,"HmacDRBG");var mF=kc;kc.prototype._init=o(function(e,r,n){var i=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var s=0;s<this.V.length;s++)this.K[s]=0,this.V[s]=1;this._update(i),this._reseed=1,this.reseedInterval=281474976710656},"init");kc.prototype._hmac=o(function(){return new vs.default.hmac(this.hash,this.K)},"hmac");kc.prototype._update=o(function(e){var r=this._hmac().update(this.V).update([0]);e&&(r=r.update(e)),this.K=r.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},"update");kc.prototype.reseed=o(function(e,r,n,i){typeof r!="string"&&(i=n,n=r,r=null),e=Uo.toArray(e,r),n=Uo.toArray(n,i),e4(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},"reseed");kc.prototype.generate=o(function(e,r,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(i=n,n=r,r=null),n&&(n=Uo.toArray(n,i||"hex"),this._update(n));for(var s=[];s.length<e;)this.V=this._hmac().update(this.V).digest(),s=s.concat(this.V);var a=s.slice(0,e);return this._update(n),this._reseed++,Uo.encode(a,r)},"generate");var Qx=Ei.assert;function Dn(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}o(Dn,"KeyPair");var r4=Dn;Dn.fromPublic=o(function(e,r,n){return r instanceof Dn?r:new Dn(e,{pub:r,pubEnc:n})},"fromPublic");Dn.fromPrivate=o(function(e,r,n){return r instanceof Dn?r:new Dn(e,{priv:r,privEnc:n})},"fromPrivate");Dn.prototype.validate=o(function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},"validate");Dn.prototype.getPublic=o(function(e,r){return typeof e=="string"&&(r=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),r?this.pub.encode(r,e):this.pub},"getPublic");Dn.prototype.getPrivate=o(function(e){return e==="hex"?this.priv.toString(16,2):this.priv},"getPrivate");Dn.prototype._importPrivate=o(function(e,r){this.priv=new Et.default(e,r||16),this.priv=this.priv.umod(this.ec.curve.n)},"_importPrivate");Dn.prototype._importPublic=o(function(e,r){if(e.x||e.y){this.ec.curve.type==="mont"?Qx(e.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&Qx(e.x&&e.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(e.x,e.y);return}this.pub=this.ec.curve.decodePoint(e,r)},"_importPublic");Dn.prototype.derive=o(function(e){return e.validate()||Qx(e.validate(),"public point not validated"),e.mul(this.priv).getX()},"derive");Dn.prototype.sign=o(function(e,r,n){return this.ec.sign(e,this,r,n)},"sign");Dn.prototype.verify=o(function(e,r){return this.ec.verify(e,r,this)},"verify");Dn.prototype.inspect=o(function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"},"inspect");var yde=Ei.assert;function Bg(t,e){if(t instanceof Bg)return t;this._importDER(t,e)||(yde(t.r&&t.s,"Signature without r or s"),this.r=new Et.default(t.r,16),this.s=new Et.default(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}o(Bg,"Signature");var Fg=Bg;function xde(){this.place=0}o(xde,"Position");function Xx(t,e){var r=t[e.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4)return!1;for(var i=0,s=0,a=e.place;s<n;s++,a++)i<<=8,i|=t[a],i>>>=0;return i<=127?!1:(e.place=a,i)}o(Xx,"getLength");function hF(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e<r;)e++;return e===0?t:t.slice(e)}o(hF,"rmPadding");Bg.prototype._importDER=o(function(e,r){e=Ei.toArray(e,r);var n=new xde;if(e[n.place++]!==48)return!1;var i=Xx(e,n);if(i===!1||i+n.place!==e.length||e[n.place++]!==2)return!1;var s=Xx(e,n);if(s===!1)return!1;var a=e.slice(n.place,s+n.place);if(n.place+=s,e[n.place++]!==2)return!1;var f=Xx(e,n);if(f===!1||e.length!==f+n.place)return!1;var d=e.slice(n.place,f+n.place);if(a[0]===0)if(a[1]&128)a=a.slice(1);else return!1;if(d[0]===0)if(d[1]&128)d=d.slice(1);else return!1;return this.r=new Et.default(a),this.s=new Et.default(d),this.recoveryParam=null,!0},"_importDER");function Zx(t,e){if(e<128){t.push(e);return}var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}o(Zx,"constructLength");Bg.prototype.toDER=o(function(e){var r=this.r.toArray(),n=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),n[0]&128&&(n=[0].concat(n)),r=hF(r),n=hF(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];Zx(i,r.length),i=i.concat(r),i.push(2),Zx(i,n.length);var s=i.concat(n),a=[48];return Zx(a,s.length),a=a.concat(s),Ei.encode(a,e)},"toDER");var wde=o(function(){throw new Error("unsupported")},"rand"),gF=Ei.assert;function oo(t){if(!(this instanceof oo))return new oo(t);typeof t=="string"&&(gF(Object.prototype.hasOwnProperty.call(kg,t),"Unknown curve "+t),t=kg[t]),t instanceof kg.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}o(oo,"EC");var _de=oo;oo.prototype.keyPair=o(function(e){return new r4(this,e)},"keyPair");oo.prototype.keyFromPrivate=o(function(e,r){return r4.fromPrivate(this,e,r)},"keyFromPrivate");oo.prototype.keyFromPublic=o(function(e,r){return r4.fromPublic(this,e,r)},"keyFromPublic");oo.prototype.genKeyPair=o(function(e){e||(e={});for(var r=new mF({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||wde(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new Et.default(2));;){var s=new Et.default(r.generate(n));if(!(s.cmp(i)>0))return s.iaddn(1),this.keyFromPrivate(s)}},"genKeyPair");oo.prototype._truncateToN=o(function(e,r){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e},"_truncateToN");oo.prototype.sign=o(function(e,r,n,i){typeof n=="object"&&(i=n,n=null),i||(i={}),r=this.keyFromPrivate(r,n),e=this._truncateToN(new Et.default(e,16));for(var s=this.n.byteLength(),a=r.getPrivate().toArray("be",s),f=e.toArray("be",s),d=new mF({hash:this.hash,entropy:a,nonce:f,pers:i.pers,persEnc:i.persEnc||"utf8"}),h=this.n.sub(new Et.default(1)),p=0;;p++){var y=i.k?i.k(p):new Et.default(d.generate(this.n.byteLength()));if(y=this._truncateToN(y,!0),!(y.cmpn(1)<=0||y.cmp(h)>=0)){var I=this.g.mul(y);if(!I.isInfinity()){var T=I.getX(),D=T.umod(this.n);if(D.cmpn(0)!==0){var R=y.invm(this.n).mul(D.mul(r.getPrivate()).iadd(e));if(R=R.umod(this.n),R.cmpn(0)!==0){var H=(I.getY().isOdd()?1:0)|(T.cmp(D)!==0?2:0);return i.canonical&&R.cmp(this.nh)>0&&(R=this.n.sub(R),H^=1),new Fg({r:D,s:R,recoveryParam:H})}}}}}},"sign");oo.prototype.verify=o(function(e,r,n,i){e=this._truncateToN(new Et.default(e,16)),n=this.keyFromPublic(n,i),r=new Fg(r,"hex");var s=r.r,a=r.s;if(s.cmpn(1)<0||s.cmp(this.n)>=0||a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var f=a.invm(this.n),d=f.mul(e).umod(this.n),h=f.mul(s).umod(this.n),p;return this.curve._maxwellTrick?(p=this.g.jmulAdd(d,n.getPublic(),h),p.isInfinity()?!1:p.eqXToP(s)):(p=this.g.mulAdd(d,n.getPublic(),h),p.isInfinity()?!1:p.getX().umod(this.n).cmp(s)===0)},"verify");oo.prototype.recoverPubKey=function(t,e,r,n){gF((3&r)===r,"The recovery param is more than two bits"),e=new Fg(e,n);var i=this.n,s=new Et.default(t),a=e.r,f=e.s,d=r&1,h=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw new Error("Unable to find sencond key candinate");h?a=this.curve.pointFromX(a.add(this.curve.n),d):a=this.curve.pointFromX(a,d);var p=e.r.invm(i),y=i.sub(s).mul(p).umod(i),I=f.mul(p).umod(i);return this.g.mulAdd(y,a,I)};oo.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new Fg(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var s;try{s=this.recoverPubKey(t,e,i)}catch{continue}if(s.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var Ede=Gd(function(t,e){"use strict";var r=e;r.version="6.5.4",r.utils=Ei,r.rand=function(){throw new Error("unsupported")},r.curve=Tg,r.curves=kg,r.ec=_de,r.eddsa=null}),bF=Ede.ec;var vF="signing-key/5.7.0";var i4=new St(vF),n4=null;function ys(){return n4||(n4=new bF("secp256k1")),n4}o(ys,"getCurve");var Pg=class{constructor(e){Kd(this,"curve","secp256k1"),Kd(this,"privateKey",In(e)),Ig(this.privateKey)!==32&&i4.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");let r=ys().keyFromPrivate(lr(this.privateKey));Kd(this,"publicKey","0x"+r.getPublic(!1,"hex")),Kd(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),Kd(this,"_isSigningKey",!0)}_addPoint(e){let r=ys().keyFromPublic(lr(this.publicKey)),n=ys().keyFromPublic(lr(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){let r=ys().keyFromPrivate(lr(this.privateKey)),n=lr(e);n.length!==32&&i4.throwArgumentError("bad digest length","digest",e);let i=r.sign(n,{canonical:!0});return Sg({recoveryParam:i.recoveryParam,r:Tc("0x"+i.r.toString(16),32),s:Tc("0x"+i.s.toString(16),32)})}computeSharedSecret(e){let r=ys().keyFromPrivate(lr(this.privateKey)),n=ys().keyFromPublic(lr(o4(e)));return Tc("0x"+r.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};o(Pg,"SigningKey");function yF(t,e){let r=Sg(e),n={r:lr(r.r),s:lr(r.s)};return"0x"+ys().recoverPubKey(lr(t),n,r.recoveryParam).encode("hex",!1)}o(yF,"recoverPublicKey");function o4(t,e){let r=lr(t);if(r.length===32){let n=new Pg(r);return e?"0x"+ys().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?In(r):"0x"+ys().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+ys().keyFromPublic(r).getPublic(!0,"hex"):In(r)}return i4.throwArgumentError("invalid public or private key","key","[REDACTED]")}o(o4,"computePublicKey");var xF="transactions/5.7.0";var i9e=new St(xF),wF;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(wF||(wF={}));function _F(t){let e=o4(t);return aF(Dg(zd(Dg(e,1)),12))}o(_F,"computeAddress");function EF(t,e){return _F(yF(lr(t),e))}o(EF,"recoverAddress");var AF="wallet/5.7.0";var h9e=new St(AF);function s4(t,e){return EF(Jx(t),e)}o(s4,"verifyMessage");function CF(){return{eip191:async(t,e)=>{Cde(t,e)}}}o(CF,"getEIP191Verifier");var Ade=new Date("2022-09-20").valueOf();function Cde(t,e){qx(t),HB(t,e);let n=[s4(Hd.fromCacao(t).toMessage(),t.s.s).toLowerCase()];if(Date.parse(t.p.iat)<=Ade){let s=s4(jB(Hd.fromCacao(t),"Ethereum"),t.s.s).toLowerCase();n.push(s)}let i=Sc.parse(t.p.iss.replace("did:pkh:","")).address.toLowerCase();if(!n.includes(i))throw new Error("Signature does not belong to issuer")}o(Cde,"verifyEIP191Signature");pd();Am();var IF=Mt(kf(),1);pd();function DF(){return Pt((0,IF.randomBytes)(16),"base64")}o(DF,"randomString");var SF="base64pad",TF="base64url";function kF(t){return Pt(t,SF)}o(kF,"encodeBase64");function MF(t){return Pt(t,TF)}o(MF,"encodeBase64Url");function RF(t){return $t(t,SF)}o(RF,"decodeBase64");function Og(t){return JSON.parse(Pt($t(t,TF)))}o(Og,"base64urlToJSON");function BF(t){if(t.signatures.length>1)throw new Error("Cant convert to compact jws");return`${t.signatures[0].protected}.${t.payload}.${t.signatures[0].signature}`}o(BF,"fromDagJWS");function FF(t,e){if(e){let r=e.toISOString().split(".")[0]+"Z";return`${t}?versionTime=${r}`}else return t}o(FF,"didWithTime");function PF(t){return t?Array.isArray(t)?t:[t]:[]}o(PF,"extractControllers");var Ide={...CF()};function Dde(t){return"registry"in t&&"cache"in t}o(Dde,"isResolver");var Gf=class{get capability(){if(!this._capability)throw new Error("DID has no capability attached");return this._capability}get hasCapability(){return this._capability!=null}get parent(){if(!this._parentId)throw new Error("DID has no parent DID");return this._parentId}get hasParent(){return this._parentId!=null}get id(){if(this._id==null)throw new Error("DID is not authenticated");return this._id}get authenticated(){return this._id!=null}withCapability(e){return new Gf({provider:this._client?.connection,resolver:this._resolver,capability:e,parent:this._parentId})}setProvider(e){if(this._client==null)this._client=new Nd(e);else if(this._client.connection!==e)throw new Error("A different provider is already set, create a new DID instance to use another provider")}setResolver(e,r){this._resolver=Dde(e)?e:new Bh(e,r)}async authenticate({provider:e,paths:r=[],aud:n}={}){if(e!=null&&this.setProvider(e),this._client==null)throw new Error("No provider available");let i=DF(),s=await this._client.request("did_authenticate",{nonce:i,aud:n,paths:r}),{kid:a}=await this.verifyJWS(s),f=Og(s.payload);if(!a.includes(f.did))throw new Error("Invalid authencation response, kid mismatch");if(f.nonce!==i)throw new Error("Invalid authencation response, wrong nonce");if(f.aud!==n)throw new Error("Invalid authencation response, wrong aud");if(f.exp<Date.now()/1e3)throw new Error("Invalid authencation response, expired");return this._id=f.did,this._id}async createJWS(e,r={}){if(this._client==null)throw new Error("No provider available");if(this._id==null)throw new Error("DID is not authenticated");if(this._capability){let i=this._capability.p.exp;if(i&&Date.parse(i)<Date.now())throw new Error("Capability is expired, cannot create a valid signature");let s=await E0.fromCacao(this._capability),a=Xe.asCID(s.cid);if(!a)throw new Error("Capability CID of the JWS cannot be set to the capability payload cid as they are incompatible");r.protected=r.protected||{},r.protected.cap=`ipfs://${a?.toString()}`}let{jws:n}=await this._client.request("did_createJWS",{did:this._id,...r,payload:e});return n}async createDagJWS(e,r={}){let{cid:n,linkedBlock:i}=await LR(e),s=MF(n.bytes);Object.assign(r,{linkedBlock:kF(i)});let a=await this.createJWS(s,r),f=Xe.asCID(n);if(!f)throw new Error("CID of the JWS cannot be set to the encoded payload cid as they are incompatible");if(a.link=f,this._capability){let d=await E0.fromCacao(this._capability);return{jws:a,linkedBlock:i,cacaoBlock:d.bytes}}return{jws:a,linkedBlock:i}}async verifyJWS(e,r={}){r=Object.assign({verifiers:Ide},r),typeof e!="string"&&(e=BF(e));let n=Og(e.split(".")[0]).kid;if(!n)throw new Error('No "kid" found in jws');let i=await this.resolve(n);if(!r.disableTimecheck){let h=i.didDocumentMetadata?.nextUpdate;if(h){let y=r.revocationPhaseOutSecs?r.revocationPhaseOutSecs*1e3:0,I=new Date(h).valueOf()+y;if(!(r.atTime&&r.atTime.getTime()<I))throw new Error(`invalid_jws: signature authored with a revoked DID version: ${n}`)}let p=i.didDocumentMetadata?.updated;if(p&&r.atTime&&r.atTime.getTime()<new Date(p).valueOf())throw new Error(`invalid_jws: signature authored before creation of DID version: ${n}`)}let a=i.didDocument?.id;if(r.issuer&&r.issuer===r.capability?.p.iss&&a===r.capability.p.aud){if(!r.verifiers)throw new Error("Registered verifiers needed for CACAO");await _0.verify(r.capability,{disableExpirationCheck:r.disableTimecheck,atTime:r.atTime?r.atTime:void 0,revocationPhaseOutSecs:r.revocationPhaseOutSecs,verifiers:r.verifiers??{}})}else if(r.issuer&&r.issuer!==a){let h=FF(r.issuer,r.atTime),y=(await this.resolve(h)).didDocument?.controller,I=PF(y);if(r.capability?.s&&r.capability.p.aud===a&&I.includes(r.capability.p.iss))await _0.verify(r.capability,{atTime:r.atTime?r.atTime:void 0,revocationPhaseOutSecs:r.revocationPhaseOutSecs,verifiers:r.verifiers??{}});else if(!(a?I.includes(a):!1))throw new Error(`invalid_jws: not a valid verificationMethod for issuer: ${n}`)}let f=i.didDocument?.verificationMethod||[];CM(e,f);let d;try{d=Og(e.split(".")[1])}catch{}return{kid:n,payload:d,didResolutionResult:i}}async createJWE(e,r,n={}){let i=await SM(r,this._resolver);return DM(e,i,n.protectedHeader,n.aad)}async createDagJWE(e,r,n={}){let i=await UR(e);return this.createJWE(i,r,n)}async decryptJWE(e,r={}){if(this._client==null)throw new Error("No provider available");if(this._id==null)throw new Error("DID is not authenticated");let{cleartext:n}=await this._client.request("did_decryptJWE",{did:this._id,...r,jwe:e});return RF(n)}async decryptDagJWE(e){let r=await this.decryptJWE(e);return qR(r)}async resolve(e){let r=await this._resolver.resolve(e);if(r.didResolutionMetadata.error){let{error:n,message:i}=r.didResolutionMetadata,s=i?`, ${i}`:"";throw new Error(`Failed to resolve ${e}: ${n}${s}`)}return r}constructor({provider:e,resolver:r={},resolverOptions:n,capability:i,parent:s}={}){if(e!=null&&(this._client=new Nd(e)),i){if(this._capability=i,this._parentId=this._capability.p.iss,s&&this._parentId!==s)throw new Error("Capability issuer and parent not equal")}else s&&(this._parentId=s);this.setResolver(r,n)}};o(Gf,"DID");var v4=Mt(D0(),1);pm();var f4={};tr(f4,{keyToDidDoc:()=>$de});function $de(t,e){let r=`did:key:${e}`,n=`${r}#${e}`;return{id:r,verificationMethod:[{id:n,type:"Secp256k1VerificationKey2018",controller:r,publicKeyBase58:Pt(t,"base58btc")}],authentication:[n],assertionMethod:[n],capabilityDelegation:[n],capabilityInvocation:[n]}}o($de,"keyToDidDoc");var u4={};tr(u4,{keyToDidDoc:()=>Hde});pd();var zF=Mt(Xm(),1);function jde(t){let e=new Uint8Array(t.length+2);return e[0]=236,e[1]=1,e.set(t,2),`z${Pt(e,"base58btc")}`}o(jde,"encodeKey");function Hde(t,e){let r=`did:key:${e}`,n=`${r}#${e}`,i=(0,zF.convertPublicKeyToX25519)(t),s=`${r}#${jde(i)}`;return{id:r,verificationMethod:[{id:n,type:"Ed25519VerificationKey2018",controller:r,publicKeyBase58:Pt(t,"base58btc")}],authentication:[n],assertionMethod:[n],capabilityDelegation:[n],capabilityInvocation:[n],keyAgreement:[{id:s,type:"X25519KeyAgreementKey2019",controller:r,publicKeyBase58:Pt(i,"base58btc")}]}}o(Hde,"keyToDidDoc");var m4={};tr(m4,{keyToDidDoc:()=>Qde,pubKeyBytesToXY:()=>WF});var Ng={};tr(Ng,{ECPointDecompress:()=>Jde});function Vde(t){return t>=0?t:-t}o(Vde,"abs");function zde(t,e){if(typeof t=="number"&&(t=BigInt(t)),typeof e=="number"&&(e=BigInt(e)),t<=0n||e<=0n)throw new RangeError("a and b MUST be > 0");let r=0n,n=1n,i=1n,s=0n;for(;t!==0n;){let a=e/t,f=e%t,d=r-i*a,h=n-s*a;e=t,t=f,r=i,n=s,i=d,s=h}return{g:e,x:r,y:n}}o(zde,"eGcd");function d4(t,e){if(typeof t=="number"&&(t=BigInt(t)),typeof e=="number"&&(e=BigInt(e)),e<=0n)throw new RangeError("n must be > 0");let r=t%e;return r<0n?r+e:r}o(d4,"toZn");function Kde(t,e){let r=zde(d4(t,e),e);if(r.g!==1n)throw new RangeError(`${t.toString()} does not have inverse modulo ${e.toString()}`);return d4(r.x,e)}o(Kde,"modInv");function Wf(t,e,r){if(typeof t=="number"&&(t=BigInt(t)),typeof e=="number"&&(e=BigInt(e)),typeof r=="number"&&(r=BigInt(r)),r<=0n)throw new RangeError("n must be > 0");if(r===1n)return 0n;if(t=d4(t,r),e<0n)return Kde(Wf(t,Vde(e),r),r);let n=1n;for(;e>0;)e%2n===1n&&(n=n*t%r),e=e/2n,t=t**2n%r;return n}o(Wf,"modPow");var Rr={};tr(Rr,{pubKeyBytesToHex:()=>Gde,publicKeyHexToUint8ArrayPointPair:()=>KF,publicKeyIntToUint8ArrayPointPair:()=>GF,publicKeyIntToXY:()=>Yde,publicKeyToXY:()=>Wde,testHexString:()=>h4,testUint8Array:()=>Rc});mm();function Gde(t){if(!Rc(t))throw new TypeError("input must be a Uint8Array");return Pt(t,"base16")}o(Gde,"pubKeyBytesToHex");function Wde(t){if(!h4(t))throw new TypeError("input must be string with characters 0-9,A-F,a-f");let e=KF(t),r=xf.encode(e.xOctet).slice(1),n=xf.encode(e.yOctet).slice(1);return{xm:r,ym:n}}o(Wde,"publicKeyToXY");function KF(t){if(!h4(t))throw new TypeError("input must be string with characters 0-9,A-F,a-f");let e=t.slice(0,t.length/2),r=t.slice(t.length/2,t.length),n=$t(e,"base16"),i=$t(r,"base16");return{xOctet:n,yOctet:i}}o(KF,"publicKeyHexToUint8ArrayPointPair");function h4(t){let e=/^[A-Fa-f0-9]+$/i;return!!(e.exec(t)!==null&&e.test(t)&&typeof t=="string")}o(h4,"testHexString");function Rc(t){return t==null?!1:t.constructor===Uint8Array}o(Rc,"testUint8Array");function Yde(t){if(t==null)throw new TypeError("input cannot be null or undefined.");if(typeof t!="object")throw new TypeError("Input must be an object with properties x and y");if(!Object.prototype.hasOwnProperty.call(t,"x")||!Object.prototype.hasOwnProperty.call(t,"y"))throw new Error("Input must have properties x and y");if(typeof t.x!="bigint"&&typeof t.y!="bigint")throw new Error("Input coordinates must be BigInt");let e=GF(t),r=xf.encode(e.xOctet).slice(1),n=xf.encode(e.yOctet).slice(1);return{xm:r,ym:n}}o(Yde,"publicKeyIntToXY");function GF(t){if(t==null)throw new TypeError("input cannot be null or undefined.");if(typeof t!="object")throw new TypeError("Input must be an object with properties x and y");if(!Object.prototype.hasOwnProperty.call(t,"x")||!Object.prototype.hasOwnProperty.call(t,"y"))throw new Error("Input must have properties x and y");if(typeof t.x!="bigint"&&typeof t.y!="bigint")throw new Error("Input coordinates must be BigInt");let e=t.x.toString(),r=t.y.toString(),n=$t(e,"base10"),i=$t(r,"base10");return{xOctet:n,yOctet:i}}o(GF,"publicKeyIntToUint8ArrayPointPair");function Jde(t){if(!Rc(t))throw new TypeError("input must be a Uint8Array");let e=BigInt(2),r=e**256n-e**224n+e**192n+e**96n-1n,n=41058363725152142129326129780047268409114441015993725554835256314039467401291n,i=(r+1n)/4n,s=BigInt(t[0]-2),a=t.subarray(1),f=BigInt(Pt(a,"base10")),d=f**3n-f*3n+n,h=Wf(d,i,r);return h%2n!==s&&(h=r-h),{x:f,y:h}}o(Jde,"ECPointDecompress");var Lg={};tr(Lg,{ECPointDecompress:()=>Xde});function Xde(t){if(!Rc(t))throw new TypeError("input must be a Uint8Array");let e=BigInt(2),r=e**384n-e**128n-e**96n+e**32n-1n,n=27580193559959705877849011840389048093056905856361568521428707301988689241309860865136260764883745107765439761230575n,i=(r+1n)/4n,s=BigInt(t[0]-2),a=t.subarray(1),f=BigInt(Pt(a,"base10")),d=f**3n-f*3n+n,h=Wf(d,i,r);return h%2n!==s&&(h=r-h),{x:f,y:h}}o(Xde,"ECPointDecompress");var Ug={};tr(Ug,{ECPointDecompress:()=>Zde});function Zde(t){if(!Rc(t))throw new TypeError("input must be a Uint8Array");let r=BigInt(2)**521n-1n,n=1093849038073734274511112390766805569936207598951683748994586394495953116150735016013708737573759623248592132296706313309438452531591012912142327488478985984n,i=(r+1n)/4n,s=BigInt(t[0]-2),a=t.subarray(1),f=BigInt(Pt(a,"base10")),d=f**3n-f*3n+n,h=Wf(d,i,r);return h%2n!==s&&(h=r-h),{x:f,y:h}}o(Zde,"ECPointDecompress");function Qde(t,e){let r=`did:key:${e}`,n=`${r}#${e}`,i=WF(t);return{id:r,verificationMethod:[{id:n,type:"JsonWebKey2020",controller:r,publicKeyJwk:{kty:"EC",crv:"P-256",x:i.xm,y:i.ym}}],authentication:[n],assertionMethod:[n],capabilityDelegation:[n],capabilityInvocation:[n]}}o(Qde,"keyToDidDoc");function WF(t){if(!Rr.testUint8Array(t))throw new TypeError("input must be a Uint8Array");let e=Rr.pubKeyBytesToHex(t),r=e.length/2;if(r==64)return Rr.publicKeyToXY(e);if(r==65&&e.slice(0,2)=="04"){let n=e.slice(2);return Rr.publicKeyToXY(n)}if(r==33&&(e.slice(0,2)=="03"||e.slice(0,2)=="02")){let n=$t(e,"base16"),i=Ng.ECPointDecompress(n);return Rr.publicKeyIntToXY(i)}throw new Error("Unexpected pubKeyBytes")}o(WF,"pubKeyBytesToXY");var g4={};tr(g4,{keyToDidDoc:()=>ele,pubKeyBytesToXY:()=>YF});function ele(t,e){let r=`did:key:${e}`,n=`${r}#${e}`,i=YF(t);return{id:r,verificationMethod:[{id:n,type:"JsonWebKey2020",controller:r,publicKeyJwk:{kty:"EC",crv:"P-384",x:i.xm,y:i.ym}}],authentication:[n],assertionMethod:[n],capabilityDelegation:[n],capabilityInvocation:[n]}}o(ele,"keyToDidDoc");function YF(t){if(!Rr.testUint8Array(t))throw new TypeError("input must be a Uint8Array");let e=Rr.pubKeyBytesToHex(t),r=e.length/2;if(r==96)return Rr.publicKeyToXY(e);if(r==97&&e.slice(0,2)=="04"){let n=e.slice(2);return Rr.publicKeyToXY(n)}if(r==49&&(e.slice(0,2)=="03"||e.slice(0,2)=="02")){let n=$t(e,"base16"),i=Lg.ECPointDecompress(n);return Rr.publicKeyIntToXY(i)}throw new Error("Unexpected pubKeyBytes")}o(YF,"pubKeyBytesToXY");var b4={};tr(b4,{keyToDidDoc:()=>tle,pubKeyBytesToXY:()=>JF});function tle(t,e){let r=`did:key:${e}`,n=`${r}#${e}`,i=JF(t);return{id:r,verificationMethod:[{id:n,type:"JsonWebKey2020",controller:r,publicKeyJwk:{kty:"EC",crv:"P-521",x:i.xm,y:i.ym}}],authentication:[n],assertionMethod:[n],capabilityDelegation:[n],capabilityInvocation:[n]}}o(tle,"keyToDidDoc");function JF(t){if(!Rr.testUint8Array(t))throw new TypeError("input must be a Uint8Array");let e=Rr.pubKeyBytesToHex(t);if(132<=e.length&&e.length<=134&&(e.slice(0,2)=="03"||e.slice(0,2)=="02")){let r=$t(e,"base16"),n=Ug.ECPointDecompress(r);return Rr.publicKeyIntToXY(n)}throw new Error("Unexpected pubKeyBytes")}o(JF,"pubKeyBytesToXY");var rle="application/did+ld+json",XF="application/did+json",nle={231:f4,237:u4,4608:m4,4609:g4,4610:b4};function ile(){return{key:async(t,e,r,n)=>{let i=n.accept||XF,s={didResolutionMetadata:{contentType:i},didDocument:null,didDocumentMetadata:{}};try{let a=Yi.decode(e.id),f=v4.default.decode(a),d=a.slice(v4.default.decode.bytes),h=await nle[f].keyToDidDoc(d,e.id);i===rle?(h["@context"]="https://w3id.org/did/v1",s.didDocument=h):i===XF?s.didDocument=h:(delete s.didResolutionMetadata.contentType,s.didResolutionMetadata.error="representationNotSupported")}catch(a){s.didResolutionMetadata.error="invalidDid",s.didResolutionMetadata.message=a.toString()}return s}}}o(ile,"getResolver");var ZF={getResolver:ile};var qg=Mt(Xm(),1);var iP=Mt(eP(),1);var ole="base64pad";function tP(t){return JSON.parse((0,iP.default)(t))}o(tP,"toStableObject");function sle(t){let e=new Uint8Array(t.length+2);return e[0]=237,e[1]=1,e.set(t,2),`did:key:z${Pt(e,"base58btc")}`}o(sle,"encodeDID");function rP(t){let[e,r,n]=t.split(".");return{payload:r,signatures:[{protected:e,signature:n}]}}o(rP,"toGeneralJWS");var nP=o(async(t,e,r,n={})=>{let i=`${e}#${e.split(":")[2]}`,s=xM(r),a=tP(Object.assign(n,{kid:i,alg:"EdDSA"}));return AM(typeof t=="string"?t:tP(t),s,a)},"sign"),ale={did_authenticate:async({did:t,secretKey:e},r)=>{let n=await nP({did:t,aud:r.aud,nonce:r.nonce,paths:r.paths,exp:Math.floor(Date.now()/1e3)+600},t,e);return rP(n)},did_createJWS:async({did:t,secretKey:e},r)=>{if(r.did.split("#")[0]!==t)throw new Qn(4100,`Unknown DID: ${t}`);let i=await nP(r.payload,t,e,r.protected);return{jws:rP(i)}},did_decryptJWE:async({secretKey:t},e)=>{let r=kM((0,qg.convertSecretKeyToX25519)(t));try{let n=await IM(e.jwe,r);return{cleartext:Pt(n,ole)}}catch(n){throw new Qn(-32e3,n.message)}}},S0=class{constructor(e){let{secretKey:r,publicKey:n}=(0,qg.generateKeyPairFromSeed)(e),i=sle(n),s=GR(ale);this._handle=async a=>await s({did:i,secretKey:r},a)}get isDidProvider(){return!0}async send(e){return await this._handle(e)}};o(S0,"Ed25519Provider");var y4={};tr(y4,{JsonPatchError:()=>Ar,_areEquals:()=>M0,applyOperation:()=>Yf,applyPatch:()=>Gg,applyReducer:()=>lle,deepClone:()=>ule,getValueByPointer:()=>zg,validate:()=>sP,validator:()=>Kg});var cle=function(){var t=o(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)i.hasOwnProperty(s)&&(n[s]=i[s])},t(e,r)},"extendStatics");return function(e,r){t(e,r);function n(){this.constructor=e}o(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),fle=Object.prototype.hasOwnProperty;function jg(t,e){return fle.call(t,e)}o(jg,"hasOwnProperty");function Hg(t){if(Array.isArray(t)){for(var e=new Array(t.length),r=0;r<e.length;r++)e[r]=""+r;return e}if(Object.keys)return Object.keys(t);var n=[];for(var i in t)jg(t,i)&&n.push(i);return n}o(Hg,"_objectKeys");function fn(t){switch(typeof t){case"object":return JSON.parse(JSON.stringify(t));case"undefined":return null;default:return t}}o(fn,"_deepClone");function Vg(t){for(var e=0,r=t.length,n;e<r;){if(n=t.charCodeAt(e),n>=48&&n<=57){e++;continue}return!1}return!0}o(Vg,"isInteger");function xs(t){return t.indexOf("/")===-1&&t.indexOf("~")===-1?t:t.replace(/~/g,"~0").replace(/\//g,"~1")}o(xs,"escapePathComponent");function T0(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}o(T0,"unescapePathComponent");function $g(t){if(t===void 0)return!0;if(t){if(Array.isArray(t)){for(var e=0,r=t.length;e<r;e++)if($g(t[e]))return!0}else if(typeof t=="object"){for(var n=Hg(t),i=n.length,s=0;s<i;s++)if($g(t[n[s]]))return!0}}return!1}o($g,"hasUndefined");function oP(t,e){var r=[t];for(var n in e){var i=typeof e[n]=="object"?JSON.stringify(e[n],null,2):e[n];typeof i<"u"&&r.push(n+": "+i)}return r.join(`
|
820
|
-
`)}o(oP,"patchErrorMessageFormatter");var k0=function(t){cle(e,t);function e(r,n,i,s,a){var f=this.constructor,d=t.call(this,oP(r,{name:n,index:i,operation:s,tree:a}))||this;return d.name=n,d.index=i,d.operation=s,d.tree=a,Object.setPrototypeOf(d,f.prototype),d.message=oP(r,{name:n,index:i,operation:s,tree:a}),d}return o(e,"PatchError"),e}(Error);var Ar=k0,ule=fn,Wd={add:function(t,e,r){return t[e]=this.value,{newDocument:r}},remove:function(t,e,r){var n=t[e];return delete t[e],{newDocument:r,removed:n}},replace:function(t,e,r){var n=t[e];return t[e]=this.value,{newDocument:r,removed:n}},move:function(t,e,r){var n=zg(r,this.path);n&&(n=fn(n));var i=Yf(r,{op:"remove",path:this.from}).removed;return Yf(r,{op:"add",path:this.path,value:i}),{newDocument:r,removed:n}},copy:function(t,e,r){var n=zg(r,this.from);return Yf(r,{op:"add",path:this.path,value:fn(n)}),{newDocument:r}},test:function(t,e,r){return{newDocument:r,test:M0(t[e],this.value)}},_get:function(t,e,r){return this.value=t[e],{newDocument:r}}},dle={add:function(t,e,r){return Vg(e)?t.splice(e,0,this.value):t[e]=this.value,{newDocument:r,index:e}},remove:function(t,e,r){var n=t.splice(e,1);return{newDocument:r,removed:n[0]}},replace:function(t,e,r){var n=t[e];return t[e]=this.value,{newDocument:r,removed:n}},move:Wd.move,copy:Wd.copy,test:Wd.test,_get:Wd._get};function zg(t,e){if(e=="")return t;var r={op:"_get",path:e};return Yf(t,r),r.value}o(zg,"getValueByPointer");function Yf(t,e,r,n,i,s){if(r===void 0&&(r=!1),n===void 0&&(n=!0),i===void 0&&(i=!0),s===void 0&&(s=0),r&&(typeof r=="function"?r(e,0,t,e.path):Kg(e,0)),e.path===""){var a={newDocument:t};if(e.op==="add")return a.newDocument=e.value,a;if(e.op==="replace")return a.newDocument=e.value,a.removed=t,a;if(e.op==="move"||e.op==="copy")return a.newDocument=zg(t,e.from),e.op==="move"&&(a.removed=t),a;if(e.op==="test"){if(a.test=M0(t,e.value),a.test===!1)throw new Ar("Test operation failed","TEST_OPERATION_FAILED",s,e,t);return a.newDocument=t,a}else{if(e.op==="remove")return a.removed=t,a.newDocument=null,a;if(e.op==="_get")return e.value=t,a;if(r)throw new Ar("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",s,e,t);return a}}else{n||(t=fn(t));var f=e.path||"",d=f.split("/"),h=t,p=1,y=d.length,I=void 0,T=void 0,D=void 0;for(typeof r=="function"?D=r:D=Kg;;){if(T=d[p],T&&T.indexOf("~")!=-1&&(T=T0(T)),i&&(T=="__proto__"||T=="prototype"&&p>0&&d[p-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(r&&I===void 0&&(h[T]===void 0?I=d.slice(0,p).join("/"):p==y-1&&(I=e.path),I!==void 0&&D(e,0,t,I)),p++,Array.isArray(h)){if(T==="-")T=h.length;else{if(r&&!Vg(T))throw new Ar("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",s,e,t);Vg(T)&&(T=~~T)}if(p>=y){if(r&&e.op==="add"&&T>h.length)throw new Ar("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",s,e,t);var a=dle[e.op].call(e,h,T,t);if(a.test===!1)throw new Ar("Test operation failed","TEST_OPERATION_FAILED",s,e,t);return a}}else if(p>=y){var a=Wd[e.op].call(e,h,T,t);if(a.test===!1)throw new Ar("Test operation failed","TEST_OPERATION_FAILED",s,e,t);return a}if(h=h[T],r&&p<y&&(!h||typeof h!="object"))throw new Ar("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",s,e,t)}}}o(Yf,"applyOperation");function Gg(t,e,r,n,i){if(n===void 0&&(n=!0),i===void 0&&(i=!0),r&&!Array.isArray(e))throw new Ar("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");n||(t=fn(t));for(var s=new Array(e.length),a=0,f=e.length;a<f;a++)s[a]=Yf(t,e[a],r,!0,i,a),t=s[a].newDocument;return s.newDocument=t,s}o(Gg,"applyPatch");function lle(t,e,r){var n=Yf(t,e);if(n.test===!1)throw new Ar("Test operation failed","TEST_OPERATION_FAILED",r,e,t);return n.newDocument}o(lle,"applyReducer");function Kg(t,e,r,n){if(typeof t!="object"||t===null||Array.isArray(t))throw new Ar("Operation is not an object","OPERATION_NOT_AN_OBJECT",e,t,r);if(Wd[t.op]){if(typeof t.path!="string")throw new Ar("Operation `path` property is not a string","OPERATION_PATH_INVALID",e,t,r);if(t.path.indexOf("/")!==0&&t.path.length>0)throw new Ar('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",e,t,r);if((t.op==="move"||t.op==="copy")&&typeof t.from!="string")throw new Ar("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",e,t,r);if((t.op==="add"||t.op==="replace"||t.op==="test")&&t.value===void 0)throw new Ar("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",e,t,r);if((t.op==="add"||t.op==="replace"||t.op==="test")&&$g(t.value))throw new Ar("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",e,t,r);if(r){if(t.op=="add"){var i=t.path.split("/").length,s=n.split("/").length;if(i!==s+1&&i!==s)throw new Ar("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",e,t,r)}else if(t.op==="replace"||t.op==="remove"||t.op==="_get"){if(t.path!==n)throw new Ar("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",e,t,r)}else if(t.op==="move"||t.op==="copy"){var a={op:"_get",path:t.from,value:void 0},f=sP([a],r);if(f&&f.name==="OPERATION_PATH_UNRESOLVABLE")throw new Ar("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",e,t,r)}}}else throw new Ar("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",e,t,r)}o(Kg,"validator");function sP(t,e,r){try{if(!Array.isArray(t))throw new Ar("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(e)Gg(fn(e),fn(t),r||!0);else{r=r||Kg;for(var n=0;n<t.length;n++)r(t[n],n,e,void 0)}}catch(i){if(i instanceof Ar)return i;throw i}}o(sP,"validate");function M0(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){var r=Array.isArray(t),n=Array.isArray(e),i,s,a;if(r&&n){if(s=t.length,s!=e.length)return!1;for(i=s;i--!==0;)if(!M0(t[i],e[i]))return!1;return!0}if(r!=n)return!1;var f=Object.keys(t);if(s=f.length,s!==Object.keys(e).length)return!1;for(i=s;i--!==0;)if(!e.hasOwnProperty(f[i]))return!1;for(i=s;i--!==0;)if(a=f[i],!M0(t[a],e[a]))return!1;return!0}return t!==t&&e!==e}o(M0,"_areEquals");var E4={};tr(E4,{compare:()=>xle,generate:()=>x4,observe:()=>yle,unobserve:()=>vle});var w4=new WeakMap,hle=function(){function t(e){this.observers=new Map,this.obj=e}return o(t,"Mirror"),t}(),ple=function(){function t(e,r){this.callback=e,this.observer=r}return o(t,"ObserverInfo"),t}();function mle(t){return w4.get(t)}o(mle,"getMirror");function gle(t,e){return t.observers.get(e)}o(gle,"getObserverFromMirror");function ble(t,e){t.observers.delete(e.callback)}o(ble,"removeObserverFromMirror");function vle(t,e){e.unobserve()}o(vle,"unobserve");function yle(t,e){var r=[],n,i=mle(t);if(!i)i=new hle(t),w4.set(t,i);else{var s=gle(i,e);n=s&&s.observer}if(n)return n;if(n={},i.value=fn(t),e){n.callback=e,n.next=null;var a=o(function(){x4(n)},"dirtyCheck"),f=o(function(){clearTimeout(n.next),n.next=setTimeout(a)},"fastCheck");typeof window<"u"&&(window.addEventListener("mouseup",f),window.addEventListener("keyup",f),window.addEventListener("mousedown",f),window.addEventListener("keydown",f),window.addEventListener("change",f))}return n.patches=r,n.object=t,n.unobserve=function(){x4(n),clearTimeout(n.next),ble(i,n),typeof window<"u"&&(window.removeEventListener("mouseup",f),window.removeEventListener("keyup",f),window.removeEventListener("mousedown",f),window.removeEventListener("keydown",f),window.removeEventListener("change",f))},i.observers.set(e,new ple(e,n)),n}o(yle,"observe");function x4(t,e){e===void 0&&(e=!1);var r=w4.get(t.object);_4(r.value,t.object,t.patches,"",e),t.patches.length&&Gg(r.value,t.patches);var n=t.patches;return n.length>0&&(t.patches=[],t.callback&&t.callback(n)),n}o(x4,"generate");function _4(t,e,r,n,i){if(e!==t){typeof e.toJSON=="function"&&(e=e.toJSON());for(var s=Hg(e),a=Hg(t),f=!1,d=!1,h=a.length-1;h>=0;h--){var p=a[h],y=t[p];if(jg(e,p)&&!(e[p]===void 0&&y!==void 0&&Array.isArray(e)===!1)){var I=e[p];typeof y=="object"&&y!=null&&typeof I=="object"&&I!=null&&Array.isArray(y)===Array.isArray(I)?_4(y,I,r,n+"/"+xs(p),i):y!==I&&(f=!0,i&&r.push({op:"test",path:n+"/"+xs(p),value:fn(y)}),r.push({op:"replace",path:n+"/"+xs(p),value:fn(I)}))}else Array.isArray(t)===Array.isArray(e)?(i&&r.push({op:"test",path:n+"/"+xs(p),value:fn(y)}),r.push({op:"remove",path:n+"/"+xs(p)}),d=!0):(i&&r.push({op:"test",path:n,value:t}),r.push({op:"replace",path:n,value:e}),f=!0)}if(!(!d&&s.length==a.length))for(var h=0;h<s.length;h++){var p=s[h];!jg(t,p)&&e[p]!==void 0&&r.push({op:"add",path:n+"/"+xs(p),value:fn(e[p])})}}}o(_4,"_generate");function xle(t,e,r){r===void 0&&(r=!1);var n=[];return _4(t,e,n,"",r),n}o(xle,"compare");var Wg=Object.assign({},y4,E4,{JsonPatchError:k0,deepClone:fn,escapePathComponent:xs,unescapePathComponent:T0});var yN=Mt(Qd(),1);var xN=Mt(kf(),1);var Pr;(function(t){t[t.PREFER_CACHE=0]="PREFER_CACHE",t[t.SYNC_ALWAYS=1]="SYNC_ALWAYS",t[t.NEVER_SYNC=2]="NEVER_SYNC"})(Pr||(Pr={}));var o8=Mt(Qd(),1);So();dd();var WP={tile:0,"caip10-link":1,model:2,MID:3,UNLOADABLE:4};function Whe(t){let e=WP[t];if(typeof e<"u")return e;throw new Error(`No stream type registered for name ${t}`)}o(Whe,"codeByName");function Yhe(t){let e=Object.entries(WP).find(([,r])=>r===t);if(e)return e[0];throw new Error(`No stream type registered for index ${t}`)}o(Yhe,"nameByCode");var ti=class{};o(ti,"StreamType");ti.nameByCode=Yhe;ti.codeByName=Whe;var z4=Mt(D0(),1);function Ai(t){let e,r,n;return typeof t=="object"?(e=t.hashFunction,r=t.expiring,n=t.tags):e=t,(i,s,a)=>{if(a.value!=null)a.value=YP(a.value,e,r,n);else if(a.get!=null)a.get=YP(a.get,e,r,n);else throw"Only put a Memoize() decorator on a method or get accessor."}}o(Ai,"Memoize");var L4=new Map;function YP(t,e,r=0,n){let i=Symbol("__memoized_map__");return function(...s){let a;this.hasOwnProperty(i)||Object.defineProperty(this,i,{configurable:!1,enumerable:!1,writable:!1,value:new Map});let f=this[i];if(Array.isArray(n))for(let d of n)L4.has(d)?L4.get(d).push(f):L4.set(d,[f]);if(e||s.length>0||r>0){let d;e===!0?d=s.map(y=>y.toString()).join("!"):e?d=e.apply(this,s):d=s[0];let h=`${d}__timestamp`,p=!1;if(r>0)if(!f.has(h))p=!0;else{let y=f.get(h);p=Date.now()-y>r}f.has(d)&&!p?a=f.get(d):(a=t.apply(this,s),f.set(d,a),r>0&&f.set(h,Date.now()))}else{let d=this;f.has(d)?a=f.get(d):(a=t.apply(this,s),f.set(d,a))}return a}}o(YP,"getNewFunction");So();dd();Uh();var H4=Mt(D0(),1);function el(t){try{return t()}catch(e){return e}}o(el,"tryCatch");So();var U4=Mt(D0(),1);_f();function Qf(t){let e=U4.default.decode(t),r=U4.default.decode.bytes,n=t.subarray(r);return[e,n,r]}o(Qf,"readVarint");function Jhe(t){return t===0||t===1}o(Jhe,"isCidVersion");function q4(t){let[e,r]=Qf(t);if(!Jhe(e))throw new Error(`Unknown CID version ${e}`);let[n,i]=Qf(r),[,s,a]=Qf(i),[f,,d]=Qf(s),h=i.subarray(0,a+d+f),p=i.subarray(a+d+f);return[Xe.create(e,n,vm(h)),p]}o(q4,"readCid");So();dd();function eu(t,e="StreamRef"){let[r,n]=Qf(t);if(r!==206)throw new Error(`Invalid ${e}, does not include streamid codec`);let[i,s]=Qf(n),a=q4(s),[f,d]=a;if(d.length===0)return{kind:"stream-id",type:i,genesis:f};if(d.length===1&&d[0]===0)return{kind:"commit-id",type:i,genesis:f,commit:null};{let[h]=q4(d);return{kind:"commit-id",type:i,genesis:f,commit:h}}}o(eu,"fromBytes");var Xhe=/(ceramic:\/\/|\/ceramic\/)?([a-zA-Z0-9]+)(\?commit=([a-zA-Z0-9]+))?/;function tl(t,e="StreamRef"){let r=Xhe.exec(t)||[],n=r[2];if(!n)throw new Error(`Malformed ${e} string: ${t}`);let i=Do.decode(n),s=eu(i),a=r[4];return a?{kind:"commit-id",type:s.type,genesis:s.genesis,commit:$4(s.genesis,a)}:s}o(tl,"fromString");function Zhe(t){try{return typeof t=="string"?Xe.parse(t):Xe.asCID(t)}catch{return null}}o(Zhe,"parseCID");function $4(t,e=null){if(!e||e==="0")return null;let r=Zhe(e);if(r)return t.equals(r)?null:r;throw new Error("Cannot specify commit as a number except to request commit 0 (the genesis commit)")}o($4,"parseCommit");var P0=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var f=t.length-1;f>=0;f--)(a=t[f])&&(s=(i<3?a(s):i>3?a(e,r,s):a(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},co=function(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)},nb=class extends Error{constructor(e){super(`Invalid StreamID bytes ${Do.encode(e)}: contains commit`)}};o(nb,"InvalidStreamIDBytesError");var ib=class extends Error{constructor(e){super(`Invalid StreamID string ${e}: contains commit`)}};o(ib,"InvalidStreamIDStringError");function ZP(t){let e=eu(t,"StreamID");if(e.kind==="stream-id")return new tt(e.type,e.genesis);throw new nb(t)}o(ZP,"fromBytes");function Qhe(t){return el(()=>ZP(t))}o(Qhe,"fromBytesNoThrow");function QP(t){let e=tl(t,"StreamID");if(e.kind==="stream-id")return new tt(e.type,e.genesis);throw new ib(t)}o(QP,"fromString");function e0e(t){return el(()=>QP(t))}o(e0e,"fromStringNoThrow");var XP=Symbol.for("@ceramicnetwork/streamid/StreamID"),tt=class{constructor(e,r){if(this._tag=XP,!(e||e===0))throw new Error("StreamID constructor: type required");if(!r)throw new Error("StreamID constructor: cid required");this._type=typeof e=="string"?ti.codeByName(e):e,this._cid=typeof r=="string"?Xe.parse(r):r}static isInstance(e){return typeof e=="object"&&"_tag"in e&&e._tag===XP}static async fromGenesis(e,r){let n=await Of({value:r,codec:Po,hasher:uc});return new tt(e,n.cid)}get type(){return this._type}get typeName(){return ti.nameByCode(this._type)}get cid(){return this._cid}get bytes(){let e=H4.default.encode(206),r=H4.default.encode(this.type);return Co([e,r,this.cid.bytes])}get baseID(){return new tt(this._type,this._cid)}equals(e){return tt.isInstance(e)?this.type===e.type&&this.cid.equals(e.cid):!1}toString(){return Do.encode(this.bytes)}toUrl(){return`ceramic://${this.toString()}`}[Symbol.for("nodejs.util.inspect.custom")](){return`StreamID(${this.toString()})`}[Symbol.toPrimitive](){return this.toString()}};o(tt,"StreamID");tt.fromBytes=ZP;tt.fromBytesNoThrow=Qhe;tt.fromString=QP;tt.fromStringNoThrow=e0e;P0([Ai(),co("design:type",String),co("design:paramtypes",[])],tt.prototype,"typeName",null);P0([Ai(),co("design:type",Uint8Array),co("design:paramtypes",[])],tt.prototype,"bytes",null);P0([Ai(),co("design:type",tt),co("design:paramtypes",[])],tt.prototype,"baseID",null);P0([Ai(),co("design:type",Function),co("design:paramtypes",[]),co("design:returntype",String)],tt.prototype,"toString",null);P0([Ai(),co("design:type",Function),co("design:paramtypes",[]),co("design:returntype",String)],tt.prototype,"toUrl",null);var nl=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var f=t.length-1;f>=0;f--)(a=t[f])&&(s=(i<3?a(s):i>3?a(e,r,s):a(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},ri=function(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)},V4=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},pa=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},rl,tu,O0,ob=class extends Error{constructor(e){super(`Error while parsing CommitID from bytes ${Do.encode(e)}: no commit information provided`)}};o(ob,"InvalidCommitIDBytesError");var sb=class extends Error{constructor(e){super(`Error while parsing CommitID from string ${e}: no commit information provided`)}};o(sb,"InvalidCommitIDStringError");function tO(t){let e=eu(t,"CommitID");if(e.kind==="commit-id")return new Ut(e.type,e.genesis,e.commit);throw new ob(t)}o(tO,"fromBytes");function t0e(t){return el(()=>tO(t))}o(t0e,"fromBytesNoThrow");function rO(t){let e=tl(t,"CommitID");if(e.kind==="commit-id")return new Ut(e.type,e.genesis,e.commit);throw new sb(t)}o(rO,"fromString");function r0e(t){return el(()=>rO(t))}o(r0e,"fromStringNoThrow");var eO=Symbol.for("@ceramicnetwork/streamid/CommitID");function n0e(t,e){return new Ut(t.type,t.cid,e)}o(n0e,"make");var Ut=class{constructor(e,r,n=null){if(this._tag=eO,rl.set(this,void 0),tu.set(this,void 0),O0.set(this,void 0),!e&&e!==0)throw new Error("constructor: type required");if(!r)throw new Error("constructor: cid required");V4(this,rl,typeof e=="string"?ti.codeByName(e):e,"f"),V4(this,tu,typeof r=="string"?Xe.parse(r):r,"f"),V4(this,O0,$4(pa(this,tu,"f"),n),"f")}static isInstance(e){return typeof e=="object"&&"_tag"in e&&e._tag===eO}get baseID(){return new tt(pa(this,rl,"f"),pa(this,tu,"f"))}get type(){return pa(this,rl,"f")}get typeName(){return ti.nameByCode(pa(this,rl,"f"))}get cid(){return pa(this,tu,"f")}get commit(){return pa(this,O0,"f")||pa(this,tu,"f")}get bytes(){let e=z4.default.encode(206),r=z4.default.encode(this.type),n=pa(this,O0,"f")?.bytes||new Uint8Array([0]);return Co([e,r,this.cid.bytes,n])}equals(e){return this.type===e.type&&this.cid.equals(e.cid)&&this.commit.equals(e.commit)}toString(){return Do.encode(this.bytes)}toUrl(){return`ceramic://${this.toString()}`}[(rl=new WeakMap,tu=new WeakMap,O0=new WeakMap,Symbol.for("nodejs.util.inspect.custom"))](){return`CommitID(${this.toString()})`}[Symbol.toPrimitive](){return this.toString()}};o(Ut,"CommitID");Ut.fromBytes=tO;Ut.fromBytesNoThrow=t0e;Ut.fromString=rO;Ut.fromStringNoThrow=r0e;Ut.make=n0e;nl([Ai(),ri("design:type",tt),ri("design:paramtypes",[])],Ut.prototype,"baseID",null);nl([Ai(),ri("design:type",String),ri("design:paramtypes",[])],Ut.prototype,"typeName",null);nl([Ai(),ri("design:type",Xe),ri("design:paramtypes",[])],Ut.prototype,"commit",null);nl([Ai(),ri("design:type",Uint8Array),ri("design:paramtypes",[])],Ut.prototype,"bytes",null);nl([Ai(),ri("design:type",Function),ri("design:paramtypes",[]),ri("design:returntype",String)],Ut.prototype,"toString",null);nl([Ai(),ri("design:type",Function),ri("design:paramtypes",[]),ri("design:returntype",String)],Ut.prototype,"toUrl",null);dd();var Pn;(function(t){function e(i){let s=eu(i);switch(s.kind){case"commit-id":return new Ut(s.type,s.genesis,s.commit);case"stream-id":return new tt(s.type,s.genesis);default:throw new Error(`Malformed StreamRef bytes: ${Do.encode(i)}`)}}o(e,"fromBytes"),t.fromBytes=e;function r(i){let s=tl(i);switch(s.kind){case"commit-id":return new Ut(s.type,s.genesis,s.commit);case"stream-id":return new tt(s.type,s.genesis);default:throw new Error(`Malformed StreamRef string: ${i}`)}}o(r,"fromString"),t.fromString=r;function n(i){if(tt.isInstance(i)||Ut.isInstance(i))return i;if(i instanceof Uint8Array)return e(i);if(typeof i=="string")return r(i);throw new Error(`Can not build CommitID or StreamID from ${JSON.stringify(i)}`)}o(n,"from"),t.from=n})(Pn||(Pn={}));var TO=Mt(SO(),1),{__extends:pr,__assign:N_e,__rest:L_e,__decorate:U_e,__param:q_e,__esDecorate:$_e,__runInitializers:j_e,__propKey:H_e,__setFunctionName:V_e,__metadata:z_e,__awaiter:kO,__generator:ub,__exportStar:K_e,__createBinding:G_e,__values:ru,__read:Ci,__spread:W_e,__spreadArrays:Y_e,__spreadArray:qo,__await:db,__asyncGenerator:MO,__asyncDelegator:J_e,__asyncValues:RO,__makeTemplateObject:X_e,__importStar:Z_e,__importDefault:Q_e,__classPrivateFieldGet:eEe,__classPrivateFieldSet:tEe,__classPrivateFieldIn:rEe}=TO.default;function Tt(t){return typeof t=="function"}o(Tt,"isFunction");function ol(t){var e=o(function(n){Error.call(n),n.stack=new Error().stack},"_super"),r=t(e);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}o(ol,"createErrorClass");var lb=ol(function(t){return o(function(r){t(this),this.message=r?r.length+` errors occurred during unsubscription:
|
821
|
-
`+r.map(function(n,i){return i+1+") "+n.toString()}).join(`
|
822
|
-
`):"",this.name="UnsubscriptionError",this.errors=r},"UnsubscriptionErrorImpl")});function nu(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}o(nu,"arrRemove");var Fc=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return o(t,"Subscription"),t.prototype.unsubscribe=function(){var e,r,n,i,s;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var f=ru(a),d=f.next();!d.done;d=f.next()){var h=d.value;h.remove(this)}}catch(R){e={error:R}}finally{try{d&&!d.done&&(r=f.return)&&r.call(f)}finally{if(e)throw e.error}}else a.remove(this);var p=this.initialTeardown;if(Tt(p))try{p()}catch(R){s=R instanceof lb?R.errors:[R]}var y=this._finalizers;if(y){this._finalizers=null;try{for(var I=ru(y),T=I.next();!T.done;T=I.next()){var D=T.value;try{BO(D)}catch(R){s=s??[],R instanceof lb?s=qo(qo([],Ci(s)),Ci(R.errors)):s.push(R)}}}catch(R){n={error:R}}finally{try{T&&!T.done&&(i=I.return)&&i.call(I)}finally{if(n)throw n.error}}}if(s)throw new lb(s)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)BO(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(e)}},t.prototype._hasParent=function(e){var r=this._parentage;return r===e||Array.isArray(r)&&r.includes(e)},t.prototype._addParent=function(e){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(e),r):r?[r,e]:e},t.prototype._removeParent=function(e){var r=this._parentage;r===e?this._parentage=null:Array.isArray(r)&&nu(r,e)},t.prototype.remove=function(e){var r=this._finalizers;r&&nu(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}();var G4=Fc.EMPTY;function hb(t){return t instanceof Fc||t&&"closed"in t&&Tt(t.remove)&&Tt(t.add)&&Tt(t.unsubscribe)}o(hb,"isSubscription");function BO(t){Tt(t)?t():t.unsubscribe()}o(BO,"execFinalizer");var $o={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var sl={setTimeout:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=sl.delegate;return i?.setTimeout?i.setTimeout.apply(i,qo([t,e],Ci(r))):setTimeout.apply(void 0,qo([t,e],Ci(r)))},clearTimeout:function(t){var e=sl.delegate;return(e?.clearTimeout||clearTimeout)(t)},delegate:void 0};function pb(t){sl.setTimeout(function(){var e=$o.onUnhandledError;if(e)e(t);else throw t})}o(pb,"reportUnhandledError");function W4(){}o(W4,"noop");var FO=function(){return Y4("C",void 0,void 0)}();function PO(t){return Y4("E",void 0,t)}o(PO,"errorNotification");function OO(t){return Y4("N",t,void 0)}o(OO,"nextNotification");function Y4(t,e,r){return{kind:t,value:e,error:r}}o(Y4,"createNotification");var iu=null;function al(t){if($o.useDeprecatedSynchronousErrorHandling){var e=!iu;if(e&&(iu={errorThrown:!1,error:null}),t(),e){var r=iu,n=r.errorThrown,i=r.error;if(iu=null,n)throw i}}else t()}o(al,"errorContext");function NO(t){$o.useDeprecatedSynchronousErrorHandling&&iu&&(iu.errorThrown=!0,iu.error=t)}o(NO,"captureError");var N0=function(t){pr(e,t);function e(r){var n=t.call(this)||this;return n.isStopped=!1,r?(n.destination=r,hb(r)&&r.add(n)):n.destination=a0e,n}return o(e,"Subscriber"),e.create=function(r,n,i){return new gb(r,n,i)},e.prototype.next=function(r){this.isStopped?X4(OO(r),this):this._next(r)},e.prototype.error=function(r){this.isStopped?X4(PO(r),this):(this.isStopped=!0,this._error(r))},e.prototype.complete=function(){this.isStopped?X4(FO,this):(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(r){this.destination.next(r)},e.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Fc);var i0e=Function.prototype.bind;function J4(t,e){return i0e.call(t,e)}o(J4,"bind");var o0e=function(){function t(e){this.partialObserver=e}return o(t,"ConsumerObserver"),t.prototype.next=function(e){var r=this.partialObserver;if(r.next)try{r.next(e)}catch(n){mb(n)}},t.prototype.error=function(e){var r=this.partialObserver;if(r.error)try{r.error(e)}catch(n){mb(n)}else mb(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(r){mb(r)}},t}(),gb=function(t){pr(e,t);function e(r,n,i){var s=t.call(this)||this,a;if(Tt(r)||!r)a={next:r??void 0,error:n??void 0,complete:i??void 0};else{var f;s&&$o.useDeprecatedNextContext?(f=Object.create(r),f.unsubscribe=function(){return s.unsubscribe()},a={next:r.next&&J4(r.next,f),error:r.error&&J4(r.error,f),complete:r.complete&&J4(r.complete,f)}):a=r}return s.destination=new o0e(a),s}return o(e,"SafeSubscriber"),e}(N0);function mb(t){$o.useDeprecatedSynchronousErrorHandling?NO(t):pb(t)}o(mb,"handleUnhandledError");function s0e(t){throw t}o(s0e,"defaultErrorHandler");function X4(t,e){var r=$o.onStoppedNotification;r&&sl.setTimeout(function(){return r(t,e)})}o(X4,"handleStoppedNotification");var a0e={closed:!0,next:W4,error:s0e,complete:W4};var cl=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function fl(t){return t}o(fl,"identity");function LO(t){return t.length===0?fl:t.length===1?t[0]:o(function(r){return t.reduce(function(n,i){return i(n)},r)},"piped")}o(LO,"pipeFromArray");var er=function(){function t(e){e&&(this._subscribe=e)}return o(t,"Observable"),t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(e,r,n){var i=this,s=f0e(e)?e:new gb(e,r,n);return al(function(){var a=i,f=a.operator,d=a.source;s.add(f?f.call(s,d):d?i._subscribe(s):i._trySubscribe(s))}),s},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(r){e.error(r)}},t.prototype.forEach=function(e,r){var n=this;return r=UO(r),new r(function(i,s){var a=new gb({next:function(f){try{e(f)}catch(d){s(d),a.unsubscribe()}},error:s,complete:i});n.subscribe(a)})},t.prototype._subscribe=function(e){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(e)},t.prototype[cl]=function(){return this},t.prototype.pipe=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return LO(e)(this)},t.prototype.toPromise=function(e){var r=this;return e=UO(e),new e(function(n,i){var s;r.subscribe(function(a){return s=a},function(a){return i(a)},function(){return n(s)})})},t.create=function(e){return new t(e)},t}();function UO(t){var e;return(e=t??$o.Promise)!==null&&e!==void 0?e:Promise}o(UO,"getPromiseCtor");function c0e(t){return t&&Tt(t.next)&&Tt(t.error)&&Tt(t.complete)}o(c0e,"isObserver");function f0e(t){return t&&t instanceof N0||c0e(t)&&hb(t)}o(f0e,"isSubscriber");function u0e(t){return Tt(t?.lift)}o(u0e,"hasLift");function Xr(t){return function(e){if(u0e(e))return e.lift(function(r){try{return t(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}o(Xr,"operate");function Zr(t,e,r,n,i){return new d0e(t,e,r,n,i)}o(Zr,"createOperatorSubscriber");var d0e=function(t){pr(e,t);function e(r,n,i,s,a,f){var d=t.call(this,r)||this;return d.onFinalize=a,d.shouldUnsubscribe=f,d._next=n?function(h){try{n(h)}catch(p){r.error(p)}}:t.prototype._next,d._error=s?function(h){try{s(h)}catch(p){r.error(p)}finally{this.unsubscribe()}}:t.prototype._error,d._complete=i?function(){try{i()}catch(h){r.error(h)}finally{this.unsubscribe()}}:t.prototype._complete,d}return o(e,"OperatorSubscriber"),e.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;t.prototype.unsubscribe.call(this),!n&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},e}(N0);var qO=ol(function(t){return o(function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"},"ObjectUnsubscribedErrorImpl")});var Z4=function(t){pr(e,t);function e(){var r=t.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return o(e,"Subject"),e.prototype.lift=function(r){var n=new $O(this,this);return n.operator=r,n},e.prototype._throwIfClosed=function(){if(this.closed)throw new qO},e.prototype.next=function(r){var n=this;al(function(){var i,s;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=ru(n.currentObservers),f=a.next();!f.done;f=a.next()){var d=f.value;d.next(r)}}catch(h){i={error:h}}finally{try{f&&!f.done&&(s=a.return)&&s.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(r){var n=this;al(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;for(var i=n.observers;i.length;)i.shift().error(r)}})},e.prototype.complete=function(){var r=this;al(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var n=r.observers;n.length;)n.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(r){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,r)},e.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},e.prototype._innerSubscribe=function(r){var n=this,i=this,s=i.hasError,a=i.isStopped,f=i.observers;return s||a?G4:(this.currentObservers=null,f.push(r),new Fc(function(){n.currentObservers=null,nu(f,r)}))},e.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,s=n.thrownError,a=n.isStopped;i?r.error(s):a&&r.complete()},e.prototype.asObservable=function(){var r=new er;return r.source=this,r},e.create=function(r,n){return new $O(r,n)},e}(er);var $O=function(t){pr(e,t);function e(r,n){var i=t.call(this)||this;return i.destination=r,i.source=n,i}return o(e,"AnonymousSubject"),e.prototype.next=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,r)},e.prototype.error=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,r)},e.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},e.prototype._subscribe=function(r){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&i!==void 0?i:G4},e}(Z4);var Q4=function(t){pr(e,t);function e(r){var n=t.call(this)||this;return n._value=r,n}return o(e,"BehaviorSubject"),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(r){var n=t.prototype._subscribe.call(this,r);return!n.closed&&r.next(this._value),n},e.prototype.getValue=function(){var r=this,n=r.hasError,i=r.thrownError,s=r._value;if(n)throw i;return this._throwIfClosed(),s},e.prototype.next=function(r){t.prototype.next.call(this,this._value=r)},e}(Z4);var e8={now:function(){return(e8.delegate||Date).now()},delegate:void 0};var jO=function(t){pr(e,t);function e(r,n){return t.call(this)||this}return o(e,"Action"),e.prototype.schedule=function(r,n){return n===void 0&&(n=0),this},e}(Fc);var L0={setInterval:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=L0.delegate;return i?.setInterval?i.setInterval.apply(i,qo([t,e],Ci(r))):setInterval.apply(void 0,qo([t,e],Ci(r)))},clearInterval:function(t){var e=L0.delegate;return(e?.clearInterval||clearInterval)(t)},delegate:void 0};var HO=function(t){pr(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.scheduler=r,i.work=n,i.pending=!1,i}return o(e,"AsyncAction"),e.prototype.schedule=function(r,n){var i;if(n===void 0&&(n=0),this.closed)return this;this.state=r;var s=this.id,a=this.scheduler;return s!=null&&(this.id=this.recycleAsyncId(a,s,n)),this.pending=!0,this.delay=n,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,n),this},e.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),L0.setInterval(r.flush.bind(r,this),i)},e.prototype.recycleAsyncId=function(r,n,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return n;n!=null&&L0.clearInterval(n)},e.prototype.execute=function(r,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(r,n);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(r,n){var i=!1,s;try{this.work(r)}catch(a){i=!0,s=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),s},e.prototype.unsubscribe=function(){if(!this.closed){var r=this,n=r.id,i=r.scheduler,s=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,nu(s,this),n!=null&&(this.id=this.recycleAsyncId(i,n,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(jO);var t8=function(){function t(e,r){r===void 0&&(r=t.now),this.schedulerActionCtor=e,this.now=r}return o(t,"Scheduler"),t.prototype.schedule=function(e,r,n){return r===void 0&&(r=0),new this.schedulerActionCtor(this,e).schedule(n,r)},t.now=e8.now,t}();var VO=function(t){pr(e,t);function e(r,n){n===void 0&&(n=t8.now);var i=t.call(this,r,n)||this;return i.actions=[],i._active=!1,i}return o(e,"AsyncScheduler"),e.prototype.flush=function(r){var n=this.actions;if(this._active){n.push(r);return}var i;this._active=!0;do if(i=r.execute(r.state,r.delay))break;while(r=n.shift());if(this._active=!1,i){for(;r=n.shift();)r.unsubscribe();throw i}},e}(t8);var l0e=new VO(HO),zO=l0e;var bb=new er(function(t){return t.complete()});function vb(t){return t&&Tt(t.schedule)}o(vb,"isScheduler");function KO(t){return t[t.length-1]}o(KO,"last");function GO(t){return vb(KO(t))?t.pop():void 0}o(GO,"popScheduler");function WO(t,e){return typeof KO(t)=="number"?t.pop():e}o(WO,"popNumber");var ul=o(function(t){return t&&typeof t.length=="number"&&typeof t!="function"},"isArrayLike");function yb(t){return Tt(t?.then)}o(yb,"isPromise");function xb(t){return Tt(t[cl])}o(xb,"isInteropObservable");function wb(t){return Symbol.asyncIterator&&Tt(t?.[Symbol.asyncIterator])}o(wb,"isAsyncIterable");function _b(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}o(_b,"createInvalidObservableTypeError");function h0e(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}o(h0e,"getSymbolIterator");var Eb=h0e();function Ab(t){return Tt(t?.[Eb])}o(Ab,"isIterable");function Cb(t){return MO(this,arguments,o(function(){var r,n,i,s;return ub(this,function(a){switch(a.label){case 0:r=t.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,db(r.read())];case 3:return n=a.sent(),i=n.value,s=n.done,s?[4,db(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,db(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})},"readableStreamLikeToAsyncGenerator_1"))}o(Cb,"readableStreamLikeToAsyncGenerator");function Ib(t){return Tt(t?.getReader)}o(Ib,"isReadableStreamLike");function Sn(t){if(t instanceof er)return t;if(t!=null){if(xb(t))return p0e(t);if(ul(t))return m0e(t);if(yb(t))return g0e(t);if(wb(t))return YO(t);if(Ab(t))return b0e(t);if(Ib(t))return v0e(t)}throw _b(t)}o(Sn,"innerFrom");function p0e(t){return new er(function(e){var r=t[cl]();if(Tt(r.subscribe))return r.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}o(p0e,"fromInteropObservable");function m0e(t){return new er(function(e){for(var r=0;r<t.length&&!e.closed;r++)e.next(t[r]);e.complete()})}o(m0e,"fromArrayLike");function g0e(t){return new er(function(e){t.then(function(r){e.closed||(e.next(r),e.complete())},function(r){return e.error(r)}).then(null,pb)})}o(g0e,"fromPromise");function b0e(t){return new er(function(e){var r,n;try{for(var i=ru(t),s=i.next();!s.done;s=i.next()){var a=s.value;if(e.next(a),e.closed)return}}catch(f){r={error:f}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}e.complete()})}o(b0e,"fromIterable");function YO(t){return new er(function(e){y0e(t,e).catch(function(r){return e.error(r)})})}o(YO,"fromAsyncIterable");function v0e(t){return YO(Cb(t))}o(v0e,"fromReadableStreamLike");function y0e(t,e){var r,n,i,s;return kO(this,void 0,void 0,function(){var a,f;return ub(this,function(d){switch(d.label){case 0:d.trys.push([0,5,6,11]),r=RO(t),d.label=1;case 1:return[4,r.next()];case 2:if(n=d.sent(),!!n.done)return[3,4];if(a=n.value,e.next(a),e.closed)return[2];d.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return f=d.sent(),i={error:f},[3,11];case 6:return d.trys.push([6,,9,10]),n&&!n.done&&(s=r.return)?[4,s.call(r)]:[3,8];case 7:d.sent(),d.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}o(y0e,"process");function fo(t,e,r,n,i){n===void 0&&(n=0),i===void 0&&(i=!1);var s=e.schedule(function(){r(),i?t.add(this.schedule(null,n)):this.unsubscribe()},n);if(t.add(s),!i)return s}o(fo,"executeSchedule");function Db(t,e){return e===void 0&&(e=0),Xr(function(r,n){r.subscribe(Zr(n,function(i){return fo(n,t,function(){return n.next(i)},e)},function(){return fo(n,t,function(){return n.complete()},e)},function(i){return fo(n,t,function(){return n.error(i)},e)}))})}o(Db,"observeOn");function Sb(t,e){return e===void 0&&(e=0),Xr(function(r,n){n.add(t.schedule(function(){return r.subscribe(n)},e))})}o(Sb,"subscribeOn");function JO(t,e){return Sn(t).pipe(Sb(e),Db(e))}o(JO,"scheduleObservable");function XO(t,e){return Sn(t).pipe(Sb(e),Db(e))}o(XO,"schedulePromise");function ZO(t,e){return new er(function(r){var n=0;return e.schedule(function(){n===t.length?r.complete():(r.next(t[n++]),r.closed||this.schedule())})})}o(ZO,"scheduleArray");function QO(t,e){return new er(function(r){var n;return fo(r,e,function(){n=t[Eb](),fo(r,e,function(){var i,s,a;try{i=n.next(),s=i.value,a=i.done}catch(f){r.error(f);return}a?r.complete():r.next(s)},0,!0)}),function(){return Tt(n?.return)&&n.return()}})}o(QO,"scheduleIterable");function Tb(t,e){if(!t)throw new Error("Iterable cannot be null");return new er(function(r){fo(r,e,function(){var n=t[Symbol.asyncIterator]();fo(r,e,function(){n.next().then(function(i){i.done?r.complete():r.next(i.value)})},0,!0)})})}o(Tb,"scheduleAsyncIterable");function eN(t,e){return Tb(Cb(t),e)}o(eN,"scheduleReadableStreamLike");function tN(t,e){if(t!=null){if(xb(t))return JO(t,e);if(ul(t))return ZO(t,e);if(yb(t))return XO(t,e);if(wb(t))return Tb(t,e);if(Ab(t))return QO(t,e);if(Ib(t))return eN(t,e)}throw _b(t)}o(tN,"scheduled");function rN(t,e){return e?tN(t,e):Sn(t)}o(rN,"from");var kb=ol(function(t){return o(function(){t(this),this.name="EmptyError",this.message="no elements in sequence"},"EmptyErrorImpl")});function nN(t){return t instanceof Date&&!isNaN(t)}o(nN,"isValidDate");function Mb(t,e){return Xr(function(r,n){var i=0;r.subscribe(Zr(n,function(s){n.next(t.call(e,s,i++))}))})}o(Mb,"map");var x0e=Array.isArray;function w0e(t,e){return x0e(e)?t.apply(void 0,qo([],Ci(e))):t(e)}o(w0e,"callOrApply");function iN(t){return Mb(function(e){return w0e(t,e)})}o(iN,"mapOneOrManyArgs");function oN(t,e,r,n,i,s,a,f){var d=[],h=0,p=0,y=!1,I=o(function(){y&&!d.length&&!h&&e.complete()},"checkComplete"),T=o(function(R){return h<n?D(R):d.push(R)},"outerNext"),D=o(function(R){s&&e.next(R),h++;var H=!1;Sn(r(R,p++)).subscribe(Zr(e,function(F){i?.(F),s?T(F):e.next(F)},function(){H=!0},void 0,function(){if(H)try{h--;for(var F=o(function(){var V=d.shift();a?fo(e,a,function(){return D(V)}):D(V)},"_loop_1");d.length&&h<n;)F();I()}catch(V){e.error(V)}}))},"doInnerSub");return t.subscribe(Zr(e,T,function(){y=!0,I()})),function(){f?.()}}o(oN,"mergeInternals");function U0(t,e,r){return r===void 0&&(r=1/0),Tt(e)?U0(function(n,i){return Mb(function(s,a){return e(n,s,i,a)})(Sn(t(n,i)))},r):(typeof e=="number"&&(r=e),Xr(function(n,i){return oN(n,i,t,r)}))}o(U0,"mergeMap");function sN(t){return t===void 0&&(t=1/0),U0(fl,t)}o(sN,"mergeAll");var _0e=["addListener","removeListener"],E0e=["addEventListener","removeEventListener"],A0e=["on","off"];function q0(t,e,r,n){if(Tt(r)&&(n=r,r=void 0),n)return q0(t,e,r).pipe(iN(n));var i=Ci(D0e(t)?E0e.map(function(f){return function(d){return t[f](e,d,r)}}):C0e(t)?_0e.map(aN(t,e)):I0e(t)?A0e.map(aN(t,e)):[],2),s=i[0],a=i[1];if(!s&&ul(t))return U0(function(f){return q0(f,e,r)})(Sn(t));if(!s)throw new TypeError("Invalid event target");return new er(function(f){var d=o(function(){for(var h=[],p=0;p<arguments.length;p++)h[p]=arguments[p];return f.next(1<h.length?h:h[0])},"handler");return s(d),function(){return a(d)}})}o(q0,"fromEvent");function aN(t,e){return function(r){return function(n){return t[r](e,n)}}}o(aN,"toCommonHandlerRegistry");function C0e(t){return Tt(t.addListener)&&Tt(t.removeListener)}o(C0e,"isNodeStyleEventEmitter");function I0e(t){return Tt(t.on)&&Tt(t.off)}o(I0e,"isJQueryStyleEventEmitter");function D0e(t){return Tt(t.addEventListener)&&Tt(t.removeEventListener)}o(D0e,"isEventTarget");function $0(t,e,r){t===void 0&&(t=0),r===void 0&&(r=zO);var n=-1;return e!=null&&(vb(e)?r=e:n=e),new er(function(i){var s=nN(t)?+t-r.now():t;s<0&&(s=0);var a=0;return r.schedule(function(){i.closed||(i.next(a++),0<=n?this.schedule(void 0,n):i.complete())},s)})}o($0,"timer");function r8(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=GO(t),n=WO(t,1/0),i=t;return i.length?i.length===1?Sn(i[0]):sN(n)(rN(i,r)):bb}o(r8,"merge");function cN(t,e){return Xr(function(r,n){var i=0;r.subscribe(Zr(n,function(s){return t.call(e,s,i++)&&n.next(s)}))})}o(cN,"filter");function fN(t){return Xr(function(e,r){var n=!1;e.subscribe(Zr(r,function(i){n=!0,r.next(i)},function(){n||r.next(t),r.complete()}))})}o(fN,"defaultIfEmpty");function uN(t){return t<=0?function(){return bb}:Xr(function(e,r){var n=0;e.subscribe(Zr(r,function(i){++n<=t&&(r.next(i),t<=n&&r.complete())}))})}o(uN,"take");function dN(t){return t===void 0&&(t=S0e),Xr(function(e,r){var n=!1;e.subscribe(Zr(r,function(i){n=!0,r.next(i)},function(){return n?r.complete():r.error(t())}))})}o(dN,"throwIfEmpty");function S0e(){return new kb}o(S0e,"defaultErrorFactory");function n8(t,e){var r=arguments.length>=2;return function(n){return n.pipe(t?cN(function(i,s){return t(i,s,n)}):fl,uN(1),r?fN(e):dN(function(){return new kb}))}}o(n8,"first");var T0e={leading:!0,trailing:!1};function i8(t,e){return e===void 0&&(e=T0e),Xr(function(r,n){var i=e.leading,s=e.trailing,a=!1,f=null,d=null,h=!1,p=o(function(){d?.unsubscribe(),d=null,s&&(T(),h&&n.complete())},"endThrottling"),y=o(function(){d=null,h&&n.complete()},"cleanupThrottling"),I=o(function(D){return d=Sn(t(D)).subscribe(Zr(n,p,y))},"startThrottle"),T=o(function(){if(a){a=!1;var D=f;f=null,n.next(D),!h&&I(D)}},"send");r.subscribe(Zr(n,function(D){a=!0,f=D,!(d&&!d.closed)&&(i?T():I(D))},function(){h=!0,!(s&&a&&d&&!d.closed)&&n.complete()}))})}o(i8,"throttle");var lN;(function(t){t[t.GENESIS=0]="GENESIS",t[t.PARTIAL=1]="PARTIAL",t[t.SIGNED=2]="SIGNED"})(lN||(lN={}));var j0;(function(t){t[t.NOT_REQUESTED=0]="NOT_REQUESTED",t[t.PENDING=1]="PENDING",t[t.PROCESSING=2]="PROCESSING",t[t.ANCHORED=3]="ANCHORED",t[t.FAILED=4]="FAILED"})(j0||(j0={}));var s8;(function(t){t[t.GENESIS=0]="GENESIS",t[t.SIGNED=1]="SIGNED",t[t.ANCHOR=2]="ANCHOR"})(s8||(s8={}));var ma=class extends er{constructor(e,r){super(n=>{e.subscribe(n)}),this.state$=e,this._context=r}get id(){return new tt(this.state$.value.type,this.state$.value.log[0].cid)}get api(){return this._context.api}get content(){let{next:e,content:r}=this.state$.value;return(0,o8.default)(e?.content??r)}get tip(){return this.state$.value.log[this.state$.value.log.length-1].cid}get commitId(){return Ut.make(this.id,this.tip)}get allCommitIds(){return this.state$.value.log.map(({cid:e})=>Ut.make(this.id,e))}get anchorCommitIds(){return this.state$.value.log.filter(({type:e})=>e===s8.ANCHOR).map(({cid:e})=>Ut.make(this.id,e))}get state(){return(0,o8.default)(this.state$.value)}async sync(e={}){e={sync:Pr.PREFER_CACHE,...e};let r=await this.api.loadStream(this.id,e);this.state$.next(r.state)}async requestAnchor(){return this.api.requestAnchor(this.id)}};o(ma,"Stream");function dl(){return t=>{}}o(dl,"StreamStatic");var mN=Mt(require("cross-fetch"),1);function hN(t){let e=new AbortController;if(t.length===0)throw Error("Need abort signals to create a merged abort signal");return t.some(r=>r.aborted)?(e.abort(),e.signal):(r8(...t.map(r=>q0(r,"abort"))).pipe(n8()).subscribe(()=>{e.abort()}),e.signal)}o(hN,"mergeAbortSignals");var H0=class{constructor(e){let r=new AbortController;if(this.signal=r.signal,e<=0){r.abort();return}this._subscription=$0(e).subscribe(()=>{r.abort()})}clear(){this._subscription?.unsubscribe()}};o(H0,"TimedAbortSignal");async function pN(t,e){let r=new AbortController,n=o(()=>{r.abort()},"onAbort");return t.addEventListener("abort",n),t.aborted&&r.abort(),e(r.signal).finally(()=>{t.removeEventListener("abort",n)})}o(pN,"abortable");var k0e=60*1e3*3;async function un(t,e={}){e.body&&Object.assign(e,{body:JSON.stringify(e.body),headers:{...e.headers,"Content-Type":"application/json"}});let r=e.timeout||k0e,n=new H0(r),i=e.signal?hN([e.signal,n.signal]):n.signal,s=await pN(i,a=>(0,mN.default)(String(t),{...e,signal:a})).finally(()=>n.clear());if(!s.ok){let a=await s.text();throw new Error(`HTTP request to '${t}' failed with status '${s.statusText}': ${a}`)}return s.json()}o(un,"fetchJson");var V0=Mt(Qd(),1);So();function ga(t){let e=Xe.asCID(t);if(e)return e;if(typeof t=="string")return Xe.parse(t);if(t instanceof Uint8Array)return Xe.decode(t);throw new Error(`${t} cannot be converted to a CID`)}o(ga,"toCID");var gN=0,ir=class{static streamIdFromState(e){return new tt(e.type,e.log[0].cid)}static serializeCommit(e){let r=(0,V0.default)(e);return ir.isSignedCommitContainer(r)?(r.jws.link=r.jws.link.toString(),r.linkedBlock=Pt(r.linkedBlock,"base64"),r.cacaoBlock&&(r.cacaoBlock=Pt(r.cacaoBlock,"base64")),r):(ir.isSignedCommit(e)&&(r.link=r.link.toString()),ir.isAnchorCommit(e)&&(r.proof=r.proof.toString()),r.id&&(r.id=r.id.toString()),r.prev&&(r.prev=r.prev.toString()),e.header?.model&&(r.header.model=Pt(e.header.model,"base64")),r)}static deserializeCommit(e){let r=(0,V0.default)(e);return ir.isSignedCommitContainer(r)?(r.jws.link=ga(r.jws.link),r.linkedBlock=$t(r.linkedBlock,"base64"),r.cacaoBlock&&(r.cacaoBlock=$t(r.cacaoBlock,"base64")),r):(ir.isSignedCommit(r)&&(r.link=ga(r.link)),ir.isAnchorCommit(r)&&(r.proof=ga(r.proof)),r.id&&(r.id=ga(r.id)),r.prev&&(r.prev=ga(r.prev)),r.header?.model&&(r.header.model=$t(r.header.model,"base64")),r)}static serializeState(e){let r=(0,V0.default)(e);return r.log=r.log.map(n=>({...n,cid:n.cid.toString()})),r.anchorStatus!=null&&(r.anchorStatus=j0[r.anchorStatus]),r.anchorProof!=null&&(r.anchorProof.txHash=r.anchorProof.txHash.toString(),r.anchorProof.root=r.anchorProof.root.toString()),e.metadata?.model&&(r.metadata.model=e.metadata.model.toString()),e.next?.metadata?.model&&(r.next.metadata.model=e.next.metadata.model.toString()),e.metadata?.unique&&e.type!=gN&&(r.metadata.unique=Pt(r.metadata.unique,"base64")),r.doctype=ti.nameByCode(r.type),r}static deserializeState(e){if(!e)return null;let r=(0,V0.default)(e);return r.doctype&&(r.type=ti.codeByName(r.doctype),delete r.doctype),r.log=r.log.map(n=>({...n,cid:ga(n.cid)})),r.anchorProof&&(r.anchorProof.txHash=ga(r.anchorProof.txHash),r.anchorProof.root=ga(r.anchorProof.root)),r.anchorStatus&&(r.anchorStatus=j0[r.anchorStatus]),e.metadata?.model&&(r.metadata.model=tt.fromString(e.metadata.model)),e.next?.metadata?.model&&(r.next.metadata.model=tt.fromString(e.next.metadata.model)),e.metadata?.unique&&e.type!=gN&&(r.metadata.unique=$t(e.metadata.unique,"base64")),r}static statesEqual(e,r){return JSON.stringify(ir.serializeState(e))===JSON.stringify(ir.serializeState(r))}static isStateSupersetOf(e,r){if(e.log.length<r.log.length)return!1;for(let n in r.log)if(!e.log[n].cid.equals(r.log[n].cid))return!1;return!(e.log.length===r.log.length&&e.anchorStatus!=r.anchorStatus)}static assertCommitLinksToState(e,r){let n=this.streamIdFromState(e);if(r.id&&!r.id.equals(e.log[0].cid))throw new Error(`Invalid genesis CID in commit for StreamID ${n.toString()}. Found: ${r.id}, expected ${e.log[0].cid}`);let i=e.log[e.log.length-1].cid;if(!r.prev.equals(i))throw new Error(`Commit doesn't properly point to previous commit in log. Expected ${i}, found 'prev' ${r.prev}`)}static async convertCommitToSignedCommitContainer(e,r){if(ir.isSignedCommit(e)){let n=await r.block.get(e.link);return{jws:e,linkedBlock:n}}return e}static isSignedCommitContainer(e){return e&&e.jws!==void 0}static isSignedCommit(e){return e&&e.link!==void 0}static isAnchorCommit(e){return e&&e.proof!==void 0}static isSignedCommitData(e){return e&&e.envelope!==void 0}static isAnchorCommitData(e){return e&&e.proof!==void 0}};o(ir,"StreamUtils");var z0=class extends Q4{next(e){let r=this.value;ir.statesEqual(r,e)||super.next(e)}};o(z0,"StreamStateSubject");var M0e=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var f=t.length-1;f>=0;f--)(a=t[f])&&(s=(i<3?a(s):i>3?a(e,r,s):a(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Ii,a8={anchor:!0,publish:!0,pin:!0,sync:Pr.PREFER_CACHE},R0e={sync:Pr.PREFER_CACHE},bN={anchor:!0,publish:!0,throwOnInvalidCommit:!0};function c8(t,e){if(typeof t?.schema=="string")try{Ut.fromString(t.schema)}catch{throw new Error("Schema must be a CommitID")}let r={controllers:t?.controllers,family:t?.family,schema:t?.schema?.toString(),tags:t?.tags};if(e)t?.deterministic||(r.unique=Pt((0,xN.randomBytes)(12),"base64")),t?.forbidControllerChange&&(r.forbidControllerChange=!0);else{if(t?.deterministic!==void 0||t?.unique!==void 0)throw new Error("Cannot change 'deterministic' or 'unique' properties on existing Streams");if(t?.forbidControllerChange!==void 0)throw new Error("Cannot change 'forbidControllerChange' property on existing Streams")}return Object.keys(r).forEach(n=>r[n]===void 0&&delete r[n]),r}o(c8,"headerFromMetadata");async function vN(t){if(!t.did)throw new Error("No DID provided");return t.did.authenticated||(await t.did.authenticate(),t.loggerProvider&&t.loggerProvider.getDiagnosticsLogger().imp(`Now authenticated as DID ${t.did.id}`)),t.did}o(vN,"getAuthenticatedDID");async function f8(){throw new Error("Historical stream commits cannot be modified. Load the stream without specifying a commit to make updates.")}o(f8,"throwReadOnlyError");var Di=Ii=o(class extends ma{constructor(){super(...arguments),this._isReadOnly=!1}get content(){return super.content}get metadata(){let{next:e,metadata:r}=this.state$.value;return(0,yN.default)(e?.metadata??r)}get controllers(){return this.metadata.controllers}static async create(e,r,n,i={}){i={...a8,...i},!n?.deterministic&&i.syncTimeoutSeconds==null&&(i.syncTimeoutSeconds=0);let s=i.asDID?{did:i.asDID}:e,a=await Ii.makeGenesis(s,r,n);return e.createStreamFromGenesis(Ii.STREAM_TYPE_ID,a,i)}static async createFromGenesis(e,r,n={}){n={...a8,...n},r.header?.unique&&n.syncTimeoutSeconds==null&&(n.syncTimeoutSeconds=0);let i=r.data?await Ii._signDagJWS(e,r):r;return e.createStreamFromGenesis(Ii.STREAM_TYPE_ID,i,n)}static async deterministic(e,r,n={}){if(n={...a8,...n},r={...r,deterministic:!0},r.family==null&&r.tags==null)throw new Error("Family and/or tags are required when creating a deterministic tile document");let i=await Ii.makeGenesis(e,null,r);return e.createStreamFromGenesis(Ii.STREAM_TYPE_ID,i,n)}static async load(e,r,n={}){n={...R0e,...n};let i=Pn.from(r);if(i.type!=Ii.STREAM_TYPE_ID)throw new Error(`StreamID ${i.toString()} does not refer to a '${Ii.STREAM_TYPE_NAME}' stream, but to a ${i.typeName}`);return e.loadStream(i,n)}async update(e,r,n={}){n={...bN,...n};let i=n.asDID?{did:n.asDID}:this.api,s=await this.makeCommit(i,e,r),a=await this.api.applyCommit(this.id,s,n);this.state$.next(a.state)}async patch(e,r={}){r={...bN,...r};let i={header:c8(this.metadata,!1),data:e,prev:this.tip,id:this.id.cid},s=await Ii._signDagJWS(this.api,i),a=await this.api.applyCommit(this.id,s,r);this.state$.next(a.state)}makeReadOnly(){this.update=f8,this.patch=f8,this.sync=f8,this._isReadOnly=!0}get isReadOnly(){return this._isReadOnly}async makeCommit(e,r,n){let i=await this._makeRawCommit(r,n);return Ii._signDagJWS(e,i)}async _makeRawCommit(e,r){r||(r={});let n=c8(r,!1);if(e==null&&(e=this.content),n.controllers){if(n.controllers.length!==1)throw new Error("Exactly one controller must be specified");if(!n.controllers[0])throw new Error("Controller cannot be updated to an undefined value.")}let i=Wg.compare(this.content,e),s=this.state.log[0];return{header:n,data:i,prev:this.tip,id:s.cid}}static async makeGenesis(e,r,n){if(n||(n={}),!n.controllers||n.controllers.length===0)if(e.did){let a=await vN(e);n.controllers=[a.hasParent?a.parent:a.id]}else throw new Error("No controllers specified");if(n.controllers?.length!==1)throw new Error("Exactly one controller must be specified");let i=c8(n,!0);if(n?.deterministic&&r)throw new Error("Initial content must be null when creating a deterministic Tile document");if(r==null){let a={header:i};return $f(a),a}let s={data:r,header:i};return Ii._signDagJWS(e,s)}static async _signDagJWS(e,r){return(await vN(e)).createDagJWS(r)}},"TileDocument");Di.STREAM_TYPE_NAME="tile";Di.STREAM_TYPE_ID=0;Di=Ii=M0e([dl()],Di);var DN=Mt(EN(),1);function j0e(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}o(j0e,"_checkPrivateRedeclaration");function H0e(t,e){return e.get?e.get.call(t):e.value}o(H0e,"_classApplyDescriptorGet");function V0e(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}o(V0e,"_classApplyDescriptorSet");function IN(t,e,r){if(!e.has(t))throw new TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}o(IN,"_classExtractFieldDescriptor");function h8(t,e){var r=IN(t,e,"get");return H0e(t,r)}o(h8,"_classPrivateFieldGet");function AN(t,e,r){j0e(t,e),e.set(t,r)}o(AN,"_classPrivateFieldInit");function CN(t,e,r){var n=IN(t,e,"set");return V0e(t,n,r),r}o(CN,"_classPrivateFieldSet");function z0e(t){return typeof t=="string"||Ut.isInstance(t)||tt.isInstance(t)?{streamId:t}:{streamId:t.streamId,genesis:t.genesis}}o(z0e,"keyToQuery");function p8(t){return typeof t=="string"?Pn.from(t).toString():Ut.isInstance(t)||tt.isInstance(t)?t.toString():t.streamId.toString()}o(p8,"keyToString");async function g8(t){let e=await Di.makeGenesis({},null,{...t,deterministic:!0}),r=await tt.fromGenesis("tile",e);return{genesis:e,streamId:r}}o(g8,"getDeterministicQuery");var K0e=o(()=>Promise.resolve([]),"tempBatchLoadFn"),Rb=new WeakMap,m8=new WeakMap,ba=class extends DN.default{cache(e){if(!h8(this,m8))return!1;let r=e.id.toString();return this.clear(r).prime(r,e),!0}async create(e,r,n){let i=await Di.create(h8(this,Rb),e,r,n);return this.cache(i),i}async deterministic(e,r){let n=await g8(e);try{return await super.load(n)}catch{let s=await Di.createFromGenesis(h8(this,Rb),n.genesis,r);return this.cache(s),s}}async load(e){return await super.load(e)}async update(e,r,n,i){let s=p8(e);this.clear(s);let a=await this.load({streamId:s});return await a.update(r,n,i),a}constructor(e){super(K0e,{cache:!0,cacheKeyFn:p8,cacheMap:e.cache!=null&&typeof e.cache!="boolean"?e.cache:void 0}),AN(this,Rb,{writable:!0,value:void 0}),AN(this,m8,{writable:!0,value:void 0}),this._batchLoadFn=async r=>{e.cache||this.clearAll();let n=await e.ceramic.multiQuery(r.map(z0e),e.multiqueryTimeout);return r.map(i=>{let s=p8(i),a=n[s];return a||new Error(`Failed to load stream: ${s}`)})},CN(this,Rb,e.ceramic),CN(this,m8,!!e.cache)}};o(ba,"TileLoader");function b8(t){return typeof t=="string"?tt.fromString(t):t}o(b8,"typeStreamID");function SN(t,e){let r=new URL(t);for(let[n,i]of Object.entries(e))tt.isInstance(i)?r.searchParams.set(n,i.toString()):typeof i=="object"?r.searchParams.set(n,JSON.stringify(i)):r.searchParams.set(n,i);return r}o(SN,"serializeObjectToSearchParams");function v8(t){let e={};for(let[r,n]of Object.entries(t))tt.isInstance(n)?e[r]=n.toString():e[r]=n;return e}o(v8,"serializeObjectForHttpPost");var Tn=class extends er{constructor(e,r,n){super(i=>{this.state$.observers.length===0&&(this.periodicSubscription=$0(0,n).pipe(i8(()=>this._syncState(this.id,{sync:Pr.PREFER_CACHE}))).subscribe()),this.state$.subscribe(i).add(()=>{this.state$.observers.length===0&&this.periodicSubscription?.unsubscribe()})}),this.state$=new z0(e),this._apiUrl=new URL(r)}get value(){return this.state$.value}get state(){return this.state$.value}next(e){this.state$.next(e)}async _syncState(e,r){let n=await Tn._load(e,this._apiUrl,r);this.state$.next(ir.deserializeState(n))}get id(){return new tt(this.state$.value.type,this.state$.value.log[0].cid)}static async createFromGenesis(e,r,n,i,s){let a=new URL("./streams",e),{state:f}=await un(a,{method:"post",body:{type:r,genesis:ir.serializeCommit(n),opts:i}});return new Tn(ir.deserializeState(f),e,s)}static async applyCommit(e,r,n,i,s){let a=new URL("./commits",e),{state:f}=await un(a,{method:"post",body:{streamId:r.toString(),commit:ir.serializeCommit(n),opts:i}});return new Tn(ir.deserializeState(f),e,s)}static async _load(e,r,n){let i=SN(new URL(`./streams/${e}`,r),n),{state:s}=await un(i);return s}static async load(e,r,n,i){let s=await Tn._load(e,r,i);return new Tn(ir.deserializeState(s),r,n)}static async loadStreamCommits(e,r){let n=new URL(`./commits/${e}`,r),{commits:i}=await un(n);return i.map(s=>({cid:s.cid,value:ir.deserializeCommit(s.value)}))}complete(){this.state$.complete()}};o(Tn,"Document");var ou;(function(t){t[t.PREFER_CACHE=0]="PREFER_CACHE",t[t.SYNC_ALWAYS=1]="SYNC_ALWAYS",t[t.NEVER_SYNC=2]="NEVER_SYNC",t[t.SYNC_ON_ERROR=3]="SYNC_ON_ERROR"})(ou||(ou={}));var y8=Mt(Qd(),1);var TN;(function(t){t[t.GENESIS=0]="GENESIS",t[t.PARTIAL=1]="PARTIAL",t[t.SIGNED=2]="SIGNED"})(TN||(TN={}));var kN;(function(t){t[t.NOT_REQUESTED=0]="NOT_REQUESTED",t[t.PENDING=1]="PENDING",t[t.PROCESSING=2]="PROCESSING",t[t.ANCHORED=3]="ANCHORED",t[t.FAILED=4]="FAILED"})(kN||(kN={}));var x8;(function(t){t[t.GENESIS=0]="GENESIS",t[t.SIGNED=1]="SIGNED",t[t.ANCHOR=2]="ANCHOR"})(x8||(x8={}));var K0=class extends er{constructor(e,r){super(n=>{e.subscribe(n)}),this.state$=e,this._context=r}get id(){return new tt(this.state$.value.type,this.state$.value.log[0].cid)}get api(){return this._context.api}get content(){let{next:e,content:r}=this.state$.value;return(0,y8.default)(e?.content??r)}get tip(){return this.state$.value.log[this.state$.value.log.length-1].cid}get commitId(){return Ut.make(this.id,this.tip)}get allCommitIds(){return this.state$.value.log.map(({cid:e})=>Ut.make(this.id,e))}get anchorCommitIds(){return this.state$.value.log.filter(({type:e})=>e===x8.ANCHOR).map(({cid:e})=>Ut.make(this.id,e))}get state(){return(0,y8.default)(this.state$.value)}async sync(e={}){e={sync:ou.PREFER_CACHE,...e};let r=await this.api.loadStream(this.id,e);this.state$.next(r.state)}async requestAnchor(){return this.api.requestAnchor(this.id)}};o(K0,"Stream");function MN(){return t=>{}}o(MN,"StreamStatic");function RN(t){if(typeof t=="string"&&t.includes("@")){let[e,r]=t.split("@");if(!e||!r)throw new Error("Invalid accountId provided");return new Sc({address:e,chainId:r})}return new Sc(t)}o(RN,"normalizeAccountId");var FN=Mt(Qd(),1);var G0e=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var f=t.length-1;f>=0;f--)(a=t[f])&&(s=(i<3?a(s):i>3?a(e,r,s):a(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},su,w8=o(()=>{throw new Error("Historical stream commits cannot be modified. Load the stream without specifying a commit to make updates.")},"throwReadOnlyError"),BN={anchor:!1,publish:!0,pin:!0,sync:ou.PREFER_CACHE},_8={anchor:!0,publish:!0},W0e={sync:ou.PREFER_CACHE},au=su=o(class extends K0{constructor(){super(...arguments),this._isReadOnly=!1}get did(){return this.content}get metadata(){let{next:e,metadata:r}=this.state$.value;return(0,FN.default)(e?.metadata??r)}get controllers(){return this.metadata.controllers}static async fromAccount(e,r,n={}){n={...BN,...n};let i=RN(r),s=su.makeGenesis(i);return su.fromGenesis(e,s,n)}static async fromGenesis(e,r,n={}){return n={...BN,...n},e.createStreamFromGenesis(su.STREAM_TYPE_ID,r,n)}async setDid(e,r,n={}){n={..._8,...n};let i=typeof e=="string"?e.trim():e.id;if($v(i)?.did!==i)throw new Error(`DID is not valid: '${i}'`);let a=await r.createLink(i);return this.setDidProof(a,n)}async setDidProof(e,r={}){r={..._8,...r};let n=this.makeCommit(e),i=await this.api.applyCommit(this.id,n,r);this.state$.next(i.state)}async clearDid(e,r={}){r={..._8,...r};let n=await e.createLink("");return this.setDidProof(n,r)}static async load(e,r,n={}){n={...W0e,...n};let i=Pn.from(r);if(i.type!=su.STREAM_TYPE_ID)throw new Error(`StreamID ${i.toString()} does not refer to a '${su.STREAM_TYPE_NAME}' stream, but to a ${i.typeName}`);return e.loadStream(i,n)}static makeGenesis(e){return e.chainId.namespace==="eip155"&&(e.address=e.address.toLowerCase()),{header:{controllers:[`${e.address}@${e.chainId.toString()}`],family:`caip10-${e.chainId.toString()}`}}}makeCommit(e){return{data:e,prev:this.tip,id:this.id.cid}}makeReadOnly(){this.setDidProof=w8,this.setDid=w8,this.sync=w8,this._isReadOnly=!0}get isReadOnly(){return this._isReadOnly}},"Caip10Link");au.STREAM_TYPE_NAME="caip10-link";au.STREAM_TYPE_ID=1;au=su=G0e([MN()],au);So();_f();var gL=Mt(pL(),1);var $pe=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var f=t.length-1;f>=0;f--)(a=t[f])&&(s=(i<3?a(s):i>3?a(e,r,s):a(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},ws,jpe={sync:Pr.PREFER_CACHE};async function mL(t){if(t.did==null)throw new Error("No DID provided");t.did.authenticated||(await t.did.authenticate(),t.loggerProvider&&t.loggerProvider.getDiagnosticsLogger().imp(`Now authenticated as DID ${t.did.id}`))}o(mL,"_ensureAuthenticated");async function Hpe(){throw new Error("Historical stream commits cannot be modified. Load the stream without specifying a commit to make updates.")}o(Hpe,"throwReadOnlyError");var Pc=ws=o(class extends ma{constructor(){super(...arguments),this._isReadOnly=!1}get content(){return super.content}get metadata(){return{controller:this.state$.value.metadata.controllers[0],model:ws.MODEL}}static async create(e,r,n){ws.assertComplete(r);let i={publish:!0,anchor:!0,pin:!0,sync:Pr.NEVER_SYNC,throwOnInvalidCommit:!0},s=await ws._makeGenesis(e,r,n);return await e.createStreamFromGenesis(ws.STREAM_TYPE_ID,s,i)}static assertComplete(e,r){if(!e.name)throw r?new Error(`Model with StreamID ${r.toString()} is missing a 'name' field`):new Error("Model is missing a 'name' field");if(!e.schema)throw r?new Error(`Model ${e.name} (${r.toString()}) is missing a 'schema' field`):new Error(`Model ${e.name} is missing a 'schema' field`);if(!e.accountRelation)throw r?new Error(`Model ${e.name} (${r.toString()}) is missing a 'accountRelation' field`):new Error(`Model ${e.name} is missing a 'accountRelation' field`)}static async load(e,r,n={}){n={...jpe,...n};let i=Pn.from(r);if(i.type!=ws.STREAM_TYPE_ID)throw new Error(`StreamID ${i.toString()} does not refer to a '${ws.STREAM_TYPE_NAME}' stream, but to a ${i.typeName}`);return await e.loadStream(i,n)}static async _makeGenesis(e,r,n){let i=await this._makeRawGenesis(e,r,n);return ws._signDagJWS(e,i)}static async _makeRawGenesis(e,r,n){if(r==null)throw new Error("Genesis content cannot be null");if(!n||!n.controller)if(e.did)await mL(e),n={controller:e.did.hasParent?e.did.parent:e.did.id};else throw new Error("No controller specified");let i={controllers:[n.controller],model:ws.MODEL.bytes};return{data:r,header:i}}makeReadOnly(){this.sync=Hpe,this._isReadOnly=!0}get isReadOnly(){return this._isReadOnly}static async _signDagJWS(e,r){return await mL(e),e.did.createDagJWS(r)}},"Model");Pc.STREAM_TYPE_NAME="model";Pc.STREAM_TYPE_ID=2;Pc.MODEL=function(){let t=$f("model-v1"),e=gL.default.encode(t,"identity"),r=Xs(Od,e),n=Xe.createV1(Od,r);return new tt("UNLOADABLE",n)}();Pc=ws=$pe([dl()],Pc);var yL=Mt(kf(),1);var Vpe=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var f=t.length-1;f>=0;f--)(a=t[f])&&(s=(i<3?a(s):i>3?a(e,r,s):a(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},jo,zpe={anchor:!0,publish:!0,pin:!0,sync:Pr.NEVER_SYNC,syncTimeoutSeconds:0},Kpe={anchor:!1,publish:!1,pin:!0,sync:Pr.PREFER_CACHE},Gpe={sync:Pr.PREFER_CACHE},bL={anchor:!0,publish:!0,throwOnInvalidCommit:!0};async function vL(t){if(t.did==null)throw new Error("No DID provided");t.did.authenticated||(await t.did.authenticate(),t.loggerProvider&&t.loggerProvider.getDiagnosticsLogger().imp(`Now authenticated as DID ${t.did.id}`))}o(vL,"_ensureAuthenticated");async function C8(){throw new Error("Historical stream commits cannot be modified. Load the stream without specifying a commit to make updates.")}o(C8,"throwReadOnlyError");var fu=jo=o(class extends ma{constructor(){super(...arguments),this._isReadOnly=!1}get content(){return super.content}get metadata(){let e=this.state$.value.metadata;return{controller:e.controllers[0],model:e.model}}static async create(e,r,n,i={}){i={...zpe,...i};let s=i.asDID?{did:i.asDID}:e,a=await jo._makeGenesis(s,r,n);return e.createStreamFromGenesis(jo.STREAM_TYPE_ID,a,i)}static async single(e,r,n={}){n={...Kpe,...n};let i=n.asDID?{did:n.asDID}:e;r={...r,deterministic:!0};let s=await jo._makeGenesis(i,null,r);return e.createStreamFromGenesis(jo.STREAM_TYPE_ID,s,n)}static async load(e,r,n={}){n={...Gpe,...n};let i=Pn.from(r);if(i.type!=jo.STREAM_TYPE_ID)throw new Error(`StreamID ${i.toString()} does not refer to a '${jo.STREAM_TYPE_NAME}' stream, but to a ${i.typeName}`);return e.loadStream(i,n)}async replace(e,r={}){r={...bL,...r};let n=r.asDID?{did:r.asDID}:this.api,i=await this._makeCommit(n,e),s=await this.api.applyCommit(this.id,i,r);this.state$.next(s.state)}async patch(e,r={}){r={...bL,...r};let n={data:e,prev:this.tip,id:this.id.cid},i=await jo._signDagJWS(this.api,n),s=await this.api.applyCommit(this.id,i,r);this.state$.next(s.state)}makeReadOnly(){this.replace=C8,this.patch=C8,this.sync=C8,this._isReadOnly=!0}get isReadOnly(){return this._isReadOnly}_makeCommit(e,r){let n=this._makeRawCommit(r);return jo._signDagJWS(e,n)}_makeRawCommit(e){return{data:Wg.compare(this.content,e||{}),prev:this.tip,id:this.state.log[0].cid}}static async _makeGenesis(e,r,n){let i=await this._makeRawGenesis(e,r,n);return n.deterministic?($f(i),i):jo._signDagJWS(e,i)}static async _makeRawGenesis(e,r,n){if(!n.model)throw new Error("Must specify a 'model' when creating a ModelInstanceDocument");let i=n.controller;if(!i)if(e.did)await vL(e),i=e.did.hasParent?e.did.parent:e.did.id;else throw new Error("No controller specified");let s={controllers:[i],model:n.model.bytes};return n.deterministic||(s.unique=(0,yL.randomBytes)(12)),{data:r,header:s}}static async _signDagJWS(e,r){return await vL(e),e.did.createDagJWS(r)}},"ModelInstanceDocument");fu.STREAM_TYPE_NAME="MID";fu.STREAM_TYPE_ID=3;fu=jo=Vpe([dl()],fu);var Y0=class{constructor(e){this._apiUrl=e}async add(e,r){let n={};r&&(n.force=!0);let i=new URL(`./pins/${e}`,this._apiUrl);await un(i,{method:"post",body:n})}async rm(e,r){let n=new URL(`./pins/${e}`,this._apiUrl);await un(n,{method:"delete",body:{opts:r}})}async ls(e){let r=new URL("./pins",this._apiUrl);e&&(r=new URL(`./pins/${e.toString()}`,this._apiUrl));let n=await un(r),{pinnedStreamIds:i}=n;return{[Symbol.asyncIterator](){let s=0;return{next(){return s===i.length?Promise.resolve({value:null,done:!0}):Promise.resolve({value:i[s++],done:!1})}}}}}};o(Y0,"RemotePinApi");var J0=class{constructor(e){this._fetchJson=un,this._collectionURL=new URL("./collection",e),this._countURL=new URL("./collection/count",e)}async count(e){return(await this._fetchJson(this._countURL,{method:"POST",body:v8(e)})).count}async query(e){let r=await this._fetchJson(this._collectionURL,{method:"POST",body:v8(e)});return{edges:r.edges.map(i=>({cursor:i.cursor,node:ir.deserializeState(i.node)})),pageInfo:r.pageInfo}}};o(J0,"RemoteIndexApi");var X0=class{constructor(e,r){this._apiUrl=e,this._getDidFn=r,this._fetchJson=un,this.modelsPath="./admin/models",this.getCodePath="./admin/getCode"}getCodeUrl(){return new URL(this.getCodePath,this._apiUrl)}getModelsUrl(){return new URL(this.modelsPath,this._apiUrl)}async buildJWS(e,r,n){let i=n?{models:n.map(a=>a.toString())}:void 0,s=await e.createJWS({code:r,requestPath:this.getModelsUrl().pathname,requestBody:i});return`${s.signatures[0].protected}.${s.payload}.${s.signatures[0].signature}`}async generateCode(){return(await this._fetchJson(this.getCodeUrl())).code}async startIndexingModels(e){let r=await this.generateCode();await this._fetchJson(this.getModelsUrl(),{method:"post",body:{jws:await this.buildJWS(this._getDidFn(),r,e)}})}async getIndexedModels(){let e=await this.generateCode();return(await this._fetchJson(this.getModelsUrl(),{headers:{Authorization:`Basic ${await this.buildJWS(this._getDidFn(),e)}`}})).models.map(n=>tt.fromString(n))}async stopIndexingModels(e){let r=await this.generateCode();await this._fetchJson(this.getModelsUrl(),{method:"delete",body:{jws:await this.buildJWS(this._getDidFn(),r,e)}})}};o(X0,"RemoteAdminApi");var Wpe="/api/v0/",Ype="http://localhost:7007",Jpe={syncInterval:5e3},Xpe={anchor:!0,publish:!0,sync:Pr.PREFER_CACHE},Zpe={anchor:!0,publish:!0,sync:Pr.PREFER_CACHE},xL={sync:Pr.PREFER_CACHE},Z0=class{constructor(e=Ype,r={}){this._config={...Jpe,...r},this._apiUrl=new URL(Wpe,e),this._streamCache=new Map,this.context={api:this},this.pin=new Y0(this._apiUrl),this.index=new J0(this._apiUrl);let n=(()=>this.did).bind(this);this.admin=new X0(this._apiUrl,n),this._streamConstructors={[au.STREAM_TYPE_ID]:au,[Pc.STREAM_TYPE_ID]:Pc,[fu.STREAM_TYPE_ID]:fu,[Di.STREAM_TYPE_ID]:Di}}get did(){return this.context.did}set did(e){this.context.did=e}async createStreamFromGenesis(e,r,n={}){n={...Zpe,...n};let i=await Tn.createFromGenesis(this._apiUrl,e,r,n,this._config.syncInterval),s=this._streamCache.get(i.id.toString());return s?(ir.statesEqual(i.state,s.state)||s.next(i.state),this.buildStreamFromDocument(s)):(this._streamCache.set(i.id.toString(),i),this.buildStreamFromDocument(i))}async loadStream(e,r={}){r={...xL,...r};let n=Pn.from(e),i=this._streamCache.get(n.baseID.toString());return i?await i._syncState(n,r):(i=await Tn.load(n,this._apiUrl,this._config.syncInterval,r),this._streamCache.set(i.id.toString(),i)),this.buildStreamFromDocument(i)}async multiQuery(e,r){let n=e.map(a=>({...a,streamId:typeof a.streamId=="string"?a.streamId:a.streamId.toString()})),i=new URL("./multiqueries",this._apiUrl),s=await un(i,{method:"post",body:{queries:n,timeout:r}});return Object.entries(s).reduce((a,f)=>{let[d,h]=f,p=ir.deserializeState(h),y=new Tn(p,this._apiUrl,this._config.syncInterval);return a[d]=this.buildStreamFromDocument(y),a},{})}loadStreamCommits(e){let r=b8(e);return Tn.loadStreamCommits(r,this._apiUrl)}async applyCommit(e,r,n={}){n={...Xpe,...n};let i=b8(e),s=await Tn.applyCommit(this._apiUrl,i,r,n,this._config.syncInterval),a=this._streamCache.get(i.toString());return a?(a.next(s.state),this.buildStreamFromDocument(s)):(this._streamCache.set(i.toString(),s),this.buildStreamFromDocument(s))}async requestAnchor(e,r={}){r={...xL,...r};let{anchorStatus:n}=await un(`${this._apiUrl}/streams/${e.toString()}/anchor`,{method:"post",body:{opts:r}});return n}addStreamHandler(e){this._streamConstructors[e.name]=e.stream_constructor}buildStreamFromState(e){let r=new Tn(e,this._apiUrl,this._config.syncInterval);return this.buildStreamFromDocument(r)}buildStreamFromDocument(e){let r=e.state.type,n=this._streamConstructors[r];if(!n)throw new Error(`Failed to find constructor for stream ${r}`);return new n(e,this.context)}async setDID(e){this.context.did=e}async getSupportedChains(){if(this._supportedChains)return this._supportedChains;let{supportedChains:e}=await un(this._apiUrl+"/node/chains");return this._supportedChains=e,e}async close(){Array.from(this._streamCache).map(([,e])=>{e.complete()}),this._streamCache.clear()}};o(Z0,"CeramicClient");var uu=o(t=>`lc:ceramic:${t}`,"streamIdToCeramicURI");var Nb=Y.string().refine(t=>t.split(":").length===3&&t.split(":")[0]==="lc","URI must be of the form lc:${storage}:${url}").refine(t=>t.split(":")[1]==="ceramic","URI must use storage type ceramic (i.e. must be lc:ceramic:${streamID})");var Q0=o(async(t,{ceramicEndpoint:e,defaultContentFamily:r})=>{let n=new Z0(e),i=o(async(D,R,H,F)=>t.invoke.didResolver(D,F),"learnCardResolver"),s={...ZF.getResolver(),web:i},a=new Gf({resolver:s});n.did=a;let f=t.invoke.getKey(),d=new S0(sm(f));n.did.setProvider(d),await n.did.authenticate();let h=new ba({ceramic:n}),p=o(async(D,R={},H={},F)=>{if(!D)throw new Error("content is required");if(R.controllers||(R.controllers=[n.did.id]),R.family||(R.family=r),"pin"in H||(H.pin=!0),F?.encrypt){t.debug?.("learnCard.store.Ceramic.upload.publishContentToCeramic - encrypt enabled",F);let X=F?.recipients||[];F?.controllersCanDecrypt&&(X=[...X,...R.controllers]),D=await n?.did?.createDagJWE(D,wL.default.uniq(X))}return t.debug?.("learnCard.store.Ceramic.upload.publishContentToCeramic - content to upload",D,R,H),(await Di.create(n,D,R,H)).id.toString()},"publishContentToCeramic"),y=o(async D=>{let R=(await h.load(D))?.content;if(t.debug?.("learnCard.read.get.readContentFromCeramic",R),R?.ciphertext)try{return await a.decryptDagJWE(R)}catch(H){throw t.debug?.("learnCard.read.get.readContentFromCeramic - Could not decrypt credential - DID not authorized.",H),new Error("Could not decrypt credential - DID not authorized.")}return R},"readContentFromCeramic"),I=o(async(D,R)=>(await Wi.or(sd).parseAsync(D),uu(await p(D,{},{},R))),"uploadCredential"),T=o(async(D="")=>{if(!D)return;if(D.startsWith("ceramic://"))return Wi.parseAsync(await y(D));let R=await Nb.spa(D);if(!R.success)return t.invoke.resolveCredential(D);let H=R.data.split(":")[2];return Wi.parseAsync(await y(H))},"resolveCredential");return{name:"Ceramic",displayName:"Ceramic",description:"Uploads/resolves credentials using the Ceramic Network (https://ceramic.network/)",store:{upload:async(D,R)=>(D.debug?.("learnCard.store.Ceramic.upload"),I(R)),uploadEncrypted:async(D,R,H)=>(D.debug?.("learnCard.store.Ceramic.uploadEncrypted"),I(R,{encrypt:!0,controllersCanDecrypt:!0,...H?{recipients:H.recipients}:{}}))},read:{get:async(D,R)=>{if(D.debug?.("learnCard.read.Ceramic.get"),!R)return;let H=await Nb.spa(R);if(!H.success)return;let F=H.data.split(":")[2];try{return await Wi.or(sd).parseAsync(await y(F))}catch(V){D.debug?.(V);return}}},methods:{publishContentToCeramic:async(D,R,H)=>uu(await p(R,{},{},H)),readContentFromCeramic:async(D,R)=>y(R),resolveCredential:async(D,R)=>T(R),getCeramicClient:()=>n,getDIDObject:()=>n.did}}},"getCeramicPlugin");var _L="ceramic://k3y52l7qbv1fry1fp4s0nwdarh0vahusarpposgevy0pemiykymd2ord6swtharcw",Lb="ceramic://k3y52l7qbv1fryjn62sggjh1lpn11c56qfofzmty190d62hwk1cal1c7qc5he54ow";function Qpe(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}o(Qpe,"_checkPrivateRedeclaration");function e1e(t,e){return e.get?e.get.call(t):e.value}o(e1e,"_classApplyDescriptorGet");function t1e(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}o(t1e,"_classApplyDescriptorSet");function AL(t,e,r){if(!e.has(t))throw new TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}o(AL,"_classExtractFieldDescriptor");function du(t,e){var r=AL(t,e,"get");return e1e(t,r)}o(du,"_classPrivateFieldGet");function EL(t,e,r){Qpe(t,e),e.set(t,r)}o(EL,"_classPrivateFieldInit");function I8(t,e,r){var n=AL(t,e,"set");return t1e(t,n,r),r}o(I8,"_classPrivateFieldSet");var ml=new WeakMap,gl=new WeakMap,bl=class{get aliases(){return du(this,ml)}get loader(){return du(this,gl)}getDefinitionID(e){return du(this,ml).definitions[e]??null}getSchemaURL(e){return du(this,ml).schemas[e]??null}getTileID(e){return du(this,ml).tiles[e]??null}async loadTile(e){let r=this.getTileID(e);if(r==null)throw new Error(`Tile alias "${e}" is not defined`);return await du(this,gl).load(r)}async createTile(e,r,n={}){let i=this.getSchemaURL(e);if(i==null)throw new Error(`Schema alias "${e}" is not defined`);let{controller:s,...a}=n,f={schema:i};return s!=null&&(f.controllers=[s]),await du(this,gl).create(r,f,a)}constructor(e){if(EL(this,ml,{writable:!0,value:void 0}),EL(this,gl,{writable:!0,value:void 0}),I8(this,ml,e.aliases),e.loader!=null)I8(this,gl,e.loader);else{if(e.ceramic==null)throw new Error("Invalid DataModel parameters: missing ceramic or loader");I8(this,gl,new ba({ceramic:e.ceramic,cache:e.cache}))}}};o(bl,"DataModel");function r1e(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}o(r1e,"_checkPrivateRedeclaration");function n1e(t,e){return e.get?e.get.call(t):e.value}o(n1e,"_classApplyDescriptorGet");function i1e(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}o(i1e,"_classApplyDescriptorSet");function CL(t,e,r){if(!e.has(t))throw new TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}o(CL,"_classExtractFieldDescriptor");function _s(t,e){var r=CL(t,e,"get");return n1e(t,r)}o(_s,"_classPrivateFieldGet");function Ub(t,e,r){r1e(t,e),e.set(t,r)}o(Ub,"_classPrivateFieldInit");function qb(t,e,r){var n=CL(t,e,"set");return i1e(t,n,r),r}o(qb,"_classPrivateFieldSet");var $b=new WeakMap,lu=new WeakMap,D8=new WeakMap,jb=new WeakMap,ep=class{_createValuePromise(){qb(this,D8,new Promise((e,r)=>{qb(this,jb,{resolve:e,reject:r})}))}change(e){return new Promise((r,n)=>{let i=o(async s=>{try{let a=await e(s);r(),this._next(a)}catch(a){n(a),this._next(s)}},"run");_s(this,lu).push({reject:n,run:i}),_s(this,lu).length===1&&this._start()})}async changeContent(e){let r=o(async n=>(await n.update(e(n.content),n.metadata),n),"mutation");return await this.change(r)}async get(){return _s(this,lu).length===0?await _s(this,$b).call(this):await _s(this,D8)}async _start(){try{let e=await _s(this,$b).call(this);this._next(e)}catch(e){_s(this,lu).forEach(r=>{r.reject(e)}),qb(this,lu,[]),_s(this,jb).reject(e),this._createValuePromise()}}_next(e){let r=_s(this,lu).shift();r==null?this._end(e):r.run(e)}_end(e){_s(this,jb).resolve(e),this._createValuePromise()}constructor(e){Ub(this,$b,{writable:!0,value:void 0}),Ub(this,lu,{writable:!0,value:[]}),Ub(this,D8,{writable:!0,value:void 0}),Ub(this,jb,{writable:!0,value:void 0}),qb(this,$b,e),this._createValuePromise()}};o(ep,"TileProxy");var o1e=/^did:([A-Za-z0-9]+):([A-Za-z0-9.\-:_]+)$/;function s1e(t){return o1e.test(t)}o(s1e,"isDIDstring");function a1e(t){if(!s1e(t))throw new Error(`Invalid DID: ${t}`)}o(a1e,"assertDIDstring");function S8(t){return a1e(t),{controllers:[t],family:"IDX"}}o(S8,"getIDXMetadata");function c1e(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}o(c1e,"_checkPrivateRedeclaration");function f1e(t,e){return e.get?e.get.call(t):e.value}o(f1e,"_classApplyDescriptorGet");function u1e(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}o(u1e,"_classApplyDescriptorSet");function IL(t,e,r){if(!e.has(t))throw new TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}o(IL,"_classExtractFieldDescriptor");function Br(t,e){var r=IL(t,e,"get");return f1e(t,r)}o(Br,"_classPrivateFieldGet");function tp(t,e,r){c1e(t,e),e.set(t,r)}o(tp,"_classPrivateFieldInit");function Hb(t,e,r){var n=IL(t,e,"set");return u1e(t,n,r),r}o(Hb,"_classPrivateFieldSet");var ya=new WeakMap,Vb=new WeakMap,T8=new WeakMap,Es=new WeakMap,zb=new WeakMap,rp=class{get authenticated(){return Br(this,ya).did!=null}get ceramic(){return Br(this,ya)}get id(){if(Br(this,Vb)!=null)return Br(this,Vb);if(Br(this,ya).did==null)throw new Error("Ceramic instance is not authenticated");return Br(this,ya).did.hasParent?Br(this,ya).did.parent:Br(this,ya).did.id}get loader(){return Br(this,Es)}get model(){return Br(this,zb)}async has(e,r){let n=this.getDefinitionID(e);return await this.getRecordID(n,r)!=null}async get(e,r){let n=this.getDefinitionID(e);return await this.getRecord(n,r)}async getMultiple(e,r){let n=this.getDefinitionID(e),i=await Promise.all(r.map(async f=>{let{genesis:d,streamId:h}=await g8(S8(f));return{genesis:d,streamId:h.toString(),paths:[n]}})),s=await Br(this,ya).multiQuery(i),a=[];for(let f of i){let d=s[f.streamId]?.content?.[n],h=d?s[tt.fromString(d).toString()]:null;a.push(h?.content??null)}return a}async set(e,r,n={}){let i=this.getDefinitionID(e),[s,a]=await this._setRecordOnly(i,r,n);return s&&await this._setReference(n.controller??this.id,i,a),a}async merge(e,r,n={}){let i=this.getDefinitionID(e),s=await this.getRecord(i),a=s?{...s,...r}:r;return await this.setRecord(i,a,n)}async setAll(e,r={}){let n=Object.entries(e).map(async([a,f])=>{let d=this.getDefinitionID(a),[h,p]=await this._setRecordOnly(d,f,r);return[h,d,p]}),s=(await Promise.all(n)).reduce((a,[f,d,h])=>(f&&(a[d]=h.toUrl()),a),{});return await this._setReferences(r.controller??this.id,s),s}async setDefaults(e,r={}){let n=await this.getIndex()??{},i=Object.entries(e).map(([f,d])=>[this.getDefinitionID(f),d]).filter(f=>n[f[0]]==null).map(async([f,d])=>{let h=await this.getDefinition(f),p=await this._createRecord(h,d,r);return{[f]:p.toUrl()}}),a=(await Promise.all(i)).reduce((f,d)=>Object.assign(f,d),{});return await this._setReferences(r.controller??this.id,a),a}async remove(e,r=this.id){await this._getIndexProxy(r).changeContent(n=>(n!=null&&delete n[this.getDefinitionID(e)],n))}async getIndex(e=this.id){let r=this.authenticated&&e===this.id?await this._getIndexProxy(e).get():await this._getIDXDoc(e);return r?r.content:null}iterator(e){let r,n=0;return{[Symbol.asyncIterator](){return this},next:async()=>{if(r==null){let f=await this.getIndex(e);r=Object.entries(f??{})}if(n===r.length)return{done:!0,value:null};let[i,s]=r[n++],a=await Br(this,Es).load(s);return{done:!1,value:{key:i,id:s,record:a.content}}}}}async _createIDXDoc(e){return await Br(this,Es).deterministic(S8(e))}async _getIDXDoc(e){let r=await this._createIDXDoc(e);if(r.content==null||r.metadata.schema==null)return null;if(r.metadata.schema!==Lb)throw new Error("Invalid document: schema is not IdentityIndex");return r}async _getOwnIDXDoc(e){let r=await this._createIDXDoc(e);if(r.content==null||r.metadata.schema==null)await r.update({},{schema:Lb});else if(r.metadata.schema!==Lb)throw new Error("Invalid document: schema is not IdentityIndex");return r}_getIndexProxy(e){let r=Br(this,T8)[e];return r==null&&(r=new ep(async()=>await this._getOwnIDXDoc(e)),Br(this,T8)[e]=r),r}getDefinitionID(e){return Br(this,zb).getDefinitionID(e)??e}async getDefinition(e){let r=await Br(this,Es).load(e);if(r.metadata.schema!==_L)throw new Error("Invalid document: schema is not Definition");return{...r.content,id:r.id}}async getRecordID(e,r){return(await this.getIndex(r??this.id))?.[e]??null}async getRecordDocument(e,r){let n=await this.getRecordID(e,r);return n?await Br(this,Es).load(n):null}async getRecord(e,r){let n=await this.getRecordDocument(e,r);return n?n.content:null}async setRecord(e,r,n={}){let[i,s]=await this._setRecordOnly(e,r,n);return i&&await this._setReference(n.controller??this.id,e,s),s}async _setRecordOnly(e,r,n){let i=await this.getRecordID(e,n.controller??this.id);if(i==null){let s=await this.getDefinition(e),a=await this._createRecord(s,r,n);return[!0,a]}else{let s=await Br(this,Es).update(i,r);return[!1,s.id]}}async _createRecord(e,r,{controller:n,pin:i}){let s=await Br(this,Es).deterministic({controllers:[n??this.id],family:e.id.toString()},{pin:i});return await s.update(r,{schema:e.schema}),s.id}async _setReference(e,r,n){await this._getIndexProxy(e).changeContent(i=>({...i,[r]:n.toUrl()}))}async _setReferences(e,r){Object.keys(r).length!==0&&await this._getIndexProxy(e).changeContent(n=>({...n,...r}))}constructor(e){tp(this,ya,{writable:!0,value:void 0}),tp(this,Vb,{writable:!0,value:void 0}),tp(this,T8,{writable:!0,value:{}}),tp(this,Es,{writable:!0,value:void 0}),tp(this,zb,{writable:!0,value:void 0});let{cache:r,ceramic:n,id:i,loader:s,model:a}=e;Hb(this,ya,n),Hb(this,Vb,i),Hb(this,Es,s??new ba({ceramic:n,cache:r})),Hb(this,zb,a instanceof bl?a:new bl({loader:Br(this,Es),aliases:a}))}};o(rp,"DIDDataStore");var k8=Y.object({credentials:pf.array()}).catchall(Y.any()),DL=Y.object({id:Y.string(),title:Y.string(),storageType:Y.literal("ceramic").optional()}).catchall(Y.any()),M8=Y.object({credentials:pf.or(DL).array()}).strict();var np=o(async(t,{modelData:e,credentialAlias:r})=>{let n=t.invoke.getCeramicClient(),i=new rp({ceramic:n,model:e}),s=o(async(p=r)=>{let y=await i.get(p);if(!y)return{credentials:[]};let I=await k8.spa(y);if(I.success)return I.data;let T=await M8.spa(y);if(T.success){let H={credentials:T.data.credentials.map(F=>{if("uri"in F)return F;let{title:V,id:X,storageType:J,...re}=F;return{...re,id:V,uri:`lc:ceramic:${X.replace("ceramic://","")}`}})};return await i.set(r,H),H}throw console.error(I.error),new Error("Invalid credentials list stored in IDX")},"getCredentialsListFromIdx"),a=o(async(p,y)=>{if(!p)throw new Error("Must provide id to remove");y||(y=r);let I=await s(y);return I.credentials=I.credentials.filter(T=>T.id!==p),i.set(y,I)},"removeCredentialFromIdx"),f=o(async p=>(p||(p=r),i.set(p,{credentials:[]})),"removeAllCredentialsFromIdx"),d=o(async p=>{let y=await pf.parseAsync(p);if(!y)throw new Error("record is required");if(!y.uri)throw Error("No URI provided");await t.read.get(y.uri);let I=await s(r),T=I.credentials.findIndex(D=>D.id===y.id);return T>-1?I.credentials[T]=y:I.credentials.push(y),uu(await i.set(r,I))},"addCredentialInIdx"),h=o(async p=>{let y=pf.array().parse(p),I=await s(r);return await Promise.all(y.map(async T=>{await t.read.get(T.uri);let D=I.credentials.findIndex(R=>R.id===T.id);D>-1?I.credentials[D]=T:I.credentials.push(T)})),uu(await i.set(r,I))},"addCredentialsInIdx");return{name:"IDX",displayName:"IDX",description:"Stores a bespoke index of credentials for an individual based on their did",index:{get:async p=>(p.debug?.("learnCard.index.IDX.get"),(await s()).credentials),add:async(p,y)=>{p.debug?.("learnCard.index.IDX.add");try{return await d(y),!0}catch(I){return console.error("Error adding credential with IDX:",I),!1}},addMany:async(p,y)=>{p.debug?.("learnCard.index.IDX.add");try{return await h(y),!0}catch(I){return console.error("Error adding credential with IDX:",I),!1}},update:async p=>(p.debug?.("learnCard.index.IDX.update"),!1),remove:async(p,y)=>{p.debug?.("learnCard.index.IDX.remove");try{return await a(y),!0}catch(I){return console.error("Error removing credential from IDX:",I),!1}},removeAll:async p=>{p.debug?.("learnCard.index.IDX.removeAll");try{return await f(),!0}catch(y){return console.error("Error removing credentials from IDX:",y),!1}}},methods:{getCredentialsListFromIdx:async(p,y=r)=>(await s(y)).credentials,getVerifiableCredentialFromIdx:async(p,y)=>{let T=(await s())?.credentials?.find(H=>H?.id===y),D=p.read.get(T?.uri),R=await Wi.safeParseAsync(D);return R.success?R.data:void 0},getVerifiableCredentialsFromIdx:async p=>{let I=(await s())?.credentials?.map(T=>T?.uri)??[];return(await Promise.all(I.map(async T=>p.read.get(T)))).filter(T=>!!T)},addVerifiableCredentialInIdx:async(p,y)=>{let I=pf.parse(y);if(!I)throw new Error("record is required");if(!I.uri)throw Error("No URI provided");await p.read.get(I.uri);let T=await s(r),D=T.credentials.findIndex(R=>R.id===I.id);return D>-1?T.credentials[D]=I:T.credentials.push(I),uu(await i.set(r,T))},removeVerifiableCredentialInIdx:async(p,y)=>a(y),removeAllVerifiableCredentialsInIdx:async()=>f(),getIDXIndex:async()=>i.get(r),setIDXIndex:async(p,y)=>i.set(r,y)}}},"getIDXPlugin");var XL=Mt(VL()),wa=require("ethers");var $8=require("ethers");var $1e=o(t=>t.startsWith("0x")&&t.length===42,"isAddress"),zL=o(async(t,e,r,n)=>{let i=await Yb(e,r,n);return $8.ethers.utils.formatUnits(t,i?.decimals)},"formatUnits"),KL=o(async(t,e,r,n)=>{let i=await Yb(e,r,n);return $8.ethers.utils.parseUnits(t,i?.decimals)},"parseUnits"),Yb=o(async(t,e,r)=>{let n;return $1e(t)?n=await j1e(t,e,r):n=await H1e(t,e,r),n},"getTokenFromSymbolOrAddress"),j1e=o(async(t,e,r)=>e.find(i=>i.chainId===r&&i.address===t),"getTokenFromAddress"),H1e=o(async(t,e,r)=>e.find(i=>i.chainId===r&&i.symbol.toUpperCase()===t.toUpperCase()),"getTokenFromSymbol"),Jb=o(async t=>(await t.getNetwork()).chainId,"getChainIdFromProvider");var V1e=[{name:"USDCoin",address:"0x07865c6e87b9f70255377e024ace6630c1eaa37f",symbol:"USDC",decimals:6,chainId:5,logoURI:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png",extensions:{bridgeInfo:{10:{tokenAddress:"0x7F5c764cBc14f9669B88837ca1490cCa17c31607"},137:{tokenAddress:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"},42161:{tokenAddress:"0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8"}}}}],GL=V1e;var JL=WL(),j8=o((t,e)=>{let{infuraProjectId:r,network:n="mainnet"}=e,i=t.id.keypair("secp256k1");if(!i)throw new Error("LearnCard must support secp256k1 JWK in order to add Ethereum Plugin");let s=XL.Buffer.from(i.d,"base64").toString("hex"),a=new wa.ethers.Wallet(s),f=a.address,d=o(()=>{let R;return r?R=new wa.ethers.providers.InfuraProvider(n,r):R=wa.ethers.getDefaultProvider(n),a=a.connect(R),R},"getProvider"),h=d(),y=o(()=>YL().tokens.concat(GL),"getDefaultTokenList")(),I=o(async R=>(await Yb(R,y,await Jb(h)))?.address,"getTokenAddress"),T=o(async(R,H=f)=>{let V=await new wa.ethers.Contract(R,JL,h).balanceOf(H);return zL(V,R,y,await Jb(h))},"getErc20TokenBalance"),D=o(async(R=f,H="ETH")=>{if(!H||H==="ETH"){let X=await h.getBalance(R);return wa.ethers.utils.formatEther(X)}let F=await I(H);if(!F)throw new Error(`Unable to determine token address for "${H}"`);return await T(F,R)},"getBalance");return{name:"Ethereum",displayName:"Ethereum",description:"Provides access to currency",methods:{getEthereumAddress:()=>f,getBalance:async(R,H="ETH")=>D(f,H),getBalanceForAddress:async(R,H,F)=>D(H,F),transferTokens:async(R,H,F,V)=>{if(H==="ETH"){let re={to:V,value:wa.ethers.utils.parseEther(F.toString())};return(await a.sendTransaction(re)).hash}let X=await I(H);if(!X)throw new Error(`Unable to determine token address for "${H}"`);let J=new wa.ethers.Contract(X,JL,a);return(await J.transfer(V,await KL(F.toString(),J.address,y,await Jb(h)))).hash},getGasPrice:async()=>wa.ethers.utils.formatUnits(await h.getGasPrice()),getCurrentNetwork:()=>n,changeNetwork:(R,H)=>{let F=n;try{n=H,h=d()}catch(V){throw n=F,h=d(),V}},addInfuraProjectId:(R,H)=>{r=H,h=d()}}}},"getEthereumPlugin");var Cr=class extends Error{constructor(e,r){super(),this.message=r,this.value=e,this.stack=new Error(`${e}: ${r}`).stack,this.name=this.constructor.name}};o(Cr,"CborldError");var Fr=class{decode({value:e}={}){throw new Error("Must be implemented by derived class.")}static createDecoder({value:e,transformer:r}={}){throw new Error("Must be implemented by derived class.")}};o(Fr,"CborldDecoder");var H8=new Map,V8=new Map;ln(16,"https://www.w3.org/ns/activitystreams");ln(17,"https://www.w3.org/2018/credentials/v1");ln(18,"https://www.w3.org/ns/did/v1");ln(19,"https://w3id.org/security/suites/ed25519-2018/v1");ln(20,"https://w3id.org/security/suites/ed25519-2020/v1");ln(21,"https://w3id.org/cit/v1");ln(22,"https://w3id.org/age/v1");ln(23,"https://w3id.org/security/suites/x25519-2020/v1");ln(24,"https://w3id.org/veres-one/v1");ln(25,"https://w3id.org/webkms/v1");ln(26,"https://w3id.org/zcap/v1");ln(27,"https://w3id.org/security/suites/hmac-2019/v1");ln(28,"https://w3id.org/security/suites/aes-2019/v1");ln(29,"https://w3id.org/vaccination/v1");ln(30,"https://w3id.org/vc-revocation-list-2020/v1");ln(31,"https://w3id.org/dcc/v1c");ln(32,"https://w3id.org/vc/status-list/v1");function ln(t,e){V8.set(e,t),H8.set(t,e)}o(ln,"_addRegistration");var Oc=class extends Fr{constructor({reverseAppContextMap:e}={}){super(),this.reverseAppContextMap=e}decode({value:e}={}){if(typeof e!="number")return z8(e);let r=H8.get(e)||this.reverseAppContextMap.get(e);if(r===void 0)throw new Cr("ERR_UNDEFINED_COMPRESSED_CONTEXT",`Undefined compressed context "${e}".`);return r}static createDecoder({transformer:e}={}){let{reverseAppContextMap:r}=e;return new Oc({reverseAppContextMap:r})}};o(Oc,"ContextDecoder");function z8(t){if(Array.isArray(t))return t.map(z8);if(!(t instanceof Map))return t;let e={};for(let[r,n]of t)e[r]=z8(n);return e}o(z8,"_mapToObject");var nU="3.7.5",G1e=nU,W1e=typeof atob=="function",Y1e=typeof btoa=="function",wl=typeof Buffer=="function",ZL=typeof TextDecoder=="function"?new TextDecoder:void 0,QL=typeof TextEncoder=="function"?new TextEncoder:void 0,J1e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",ip=Array.prototype.slice.call(J1e),Xb=(t=>{let e={};return t.forEach((r,n)=>e[r]=n),e})(ip),X1e=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,hn=String.fromCharCode.bind(String),eU=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),iU=o(t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),"_mkUriSafe"),oU=o(t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),"_tidyB64"),sU=o(t=>{let e,r,n,i,s="",a=t.length%3;for(let f=0;f<t.length;){if((r=t.charCodeAt(f++))>255||(n=t.charCodeAt(f++))>255||(i=t.charCodeAt(f++))>255)throw new TypeError("invalid character found");e=r<<16|n<<8|i,s+=ip[e>>18&63]+ip[e>>12&63]+ip[e>>6&63]+ip[e&63]}return a?s.slice(0,a-3)+"===".substring(a):s},"btoaPolyfill"),W8=Y1e?t=>btoa(t):wl?t=>Buffer.from(t,"binary").toString("base64"):sU,K8=wl?t=>Buffer.from(t).toString("base64"):t=>{let r=[];for(let n=0,i=t.length;n<i;n+=4096)r.push(hn.apply(null,t.subarray(n,n+4096)));return W8(r.join(""))},Zb=o((t,e=!1)=>e?iU(K8(t)):K8(t),"fromUint8Array"),Z1e=o(t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?hn(192|e>>>6)+hn(128|e&63):hn(224|e>>>12&15)+hn(128|e>>>6&63)+hn(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return hn(240|e>>>18&7)+hn(128|e>>>12&63)+hn(128|e>>>6&63)+hn(128|e&63)}},"cb_utob"),Q1e=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,aU=o(t=>t.replace(Q1e,Z1e),"utob"),tU=wl?t=>Buffer.from(t,"utf8").toString("base64"):QL?t=>K8(QL.encode(t)):t=>W8(aU(t)),xl=o((t,e=!1)=>e?iU(tU(t)):tU(t),"encode"),rU=o(t=>xl(t,!0),"encodeURI"),eme=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,tme=o(t=>{switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),r=e-65536;return hn((r>>>10)+55296)+hn((r&1023)+56320);case 3:return hn((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return hn((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},"cb_btou"),cU=o(t=>t.replace(eme,tme),"btou"),fU=o(t=>{if(t=t.replace(/\s+/g,""),!X1e.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let e,r="",n,i;for(let s=0;s<t.length;)e=Xb[t.charAt(s++)]<<18|Xb[t.charAt(s++)]<<12|(n=Xb[t.charAt(s++)])<<6|(i=Xb[t.charAt(s++)]),r+=n===64?hn(e>>16&255):i===64?hn(e>>16&255,e>>8&255):hn(e>>16&255,e>>8&255,e&255);return r},"atobPolyfill"),Y8=W1e?t=>atob(oU(t)):wl?t=>Buffer.from(t,"base64").toString("binary"):fU,uU=wl?t=>eU(Buffer.from(t,"base64")):t=>eU(Y8(t).split("").map(e=>e.charCodeAt(0))),dU=o(t=>uU(lU(t)),"toUint8Array"),rme=wl?t=>Buffer.from(t,"base64").toString("utf8"):ZL?t=>ZL.decode(uU(t)):t=>cU(Y8(t)),lU=o(t=>oU(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),"_unURI"),G8=o(t=>rme(lU(t)),"decode"),nme=o(t=>{if(typeof t!="string")return!1;let e=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},"isValid"),hU=o(t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),"_noEnum"),pU=o(function(){let t=o((e,r)=>Object.defineProperty(String.prototype,e,hU(r)),"_add");t("fromBase64",function(){return G8(this)}),t("toBase64",function(e){return xl(this,e)}),t("toBase64URI",function(){return xl(this,!0)}),t("toBase64URL",function(){return xl(this,!0)}),t("toUint8Array",function(){return dU(this)})},"extendString"),mU=o(function(){let t=o((e,r)=>Object.defineProperty(Uint8Array.prototype,e,hU(r)),"_add");t("toBase64",function(e){return Zb(this,e)}),t("toBase64URI",function(){return Zb(this,!0)}),t("toBase64URL",function(){return Zb(this,!0)})},"extendUint8Array"),ime=o(()=>{pU(),mU()},"extendBuiltins"),Qb={version:nU,VERSION:G1e,atob:Y8,atobPolyfill:fU,btoa:W8,btoaPolyfill:sU,fromBase64:G8,toBase64:xl,encode:xl,encodeURI:rU,encodeURL:rU,utob:aU,btou:cU,decode:G8,isValid:nme,fromUint8Array:Zb,toUint8Array:dU,extendString:pU,extendUint8Array:mU,extendBuiltins:ime};var gU={};function bU(t,e,r){if(!(t instanceof Uint8Array))throw new TypeError('"input" must be a Uint8Array.');if(typeof e!="string")throw new TypeError('"alphabet" must be a string.');if(r!==void 0&&typeof r!="number")throw new TypeError('"maxline" must be a number.');if(t.length===0)return"";let n="",i=0,s=e.length,a=e.charAt(0),f=[0];for(i=0;i<t.length;++i){let d=t[i];for(let h=0;h<f.length;++h)d+=f[h]<<8,f[h]=d%s,d=d/s|0;for(;d>0;)f.push(d%s),d=d/s|0}for(i=0;t[i]===0&&i<t.length-1;++i)n+=a;for(i=f.length-1;i>=0;--i)n+=e[f[i]];if(r){let d=new RegExp(".{1,"+r+"}","g");n=n.match(d).join(`\r
|
823
|
-
`)}return n}o(bU,"encode");function vU(t,e){if(typeof t!="string")throw new TypeError('"input" must be a string.');if(typeof e!="string")throw new TypeError('"alphabet" must be a string.');if(t.length===0)return new Uint8Array;let r=gU[e];if(!r){r=gU[e]=[];for(let a=0;a<e.length;++a)r[e.charCodeAt(a)]=a}t=t.replace(/\s/g,"");let n=e.length,i=e.charAt(0),s=[0];for(let a=0;a<t.length;a++){let f=r[t.charCodeAt(a)];if(f===void 0)return;let d=f;for(let h=0;h<s.length;++h)d+=s[h]*n,s[h]=d&255,d>>=8;for(;d>0;)s.push(d&255),d>>=8}for(let a=0;t[a]===i&&a<t.length-1;++a)s.push(0);return new Uint8Array(s.reverse())}o(vU,"decode");var yU="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";function op(t,e){return bU(t,yU,e)}o(op,"encode");function e2(t){return vU(t,yU)}o(e2,"decode");var mu=class extends Fr{decode({value:e}={}){let{buffer:r,byteOffset:n,length:i}=e,s=new Uint8Array(r,n+1,i-1);return e[0]===122?`z${op(s)}`:e[0]===77?`M${Qb.fromUint8Array(s)}`:e}static createDecoder({value:e}={}){if(!(e instanceof Uint8Array))return!1;if(e[0]===122||e[0]===77)return new mu}};o(mu,"MultibaseDecoder");var Ho=new Map([["@context",0],["@type",2],["@id",4],["@value",6],["@direction",8],["@graph",10],["@included",12],["@index",14],["@json",16],["@language",18],["@list",20],["@nest",22],["@reverse",24],["@base",26],["@container",28],["@default",30],["@embed",32],["@explicit",34],["@none",36],["@omitDefault",38],["@prefix",40],["@preserve",42],["@protected",44],["@requireAll",46],["@set",48],["@version",50],["@vocab",52]]),t2=100;var gu=class{constructor({appContextMap:e,documentLoader:r}={}){this.appContextMap=e,this.documentLoader=r}_beforeObjectContexts(){}_afterObjectContexts(){}_beforeTypeScopedContexts(){}async _transform({obj:e,transformMap:r,contextStack:n=[]}){this._beforeObjectContexts({obj:e,transformMap:r});let i=await this._applyEmbeddedContexts({obj:e,contextStack:n});this._afterObjectContexts({obj:e,transformMap:r});let s=n.slice();this._beforeTypeScopedContexts({activeCtx:i,obj:e,transformMap:r}),i=await this._applyTypeScopedContexts({obj:e,contextStack:n});let{aliases:a,scopedContextMap:f,termMap:d}=i,h=this._getEntries({obj:e,transformMap:r,transformer:this,termMap:d});for(let[p,y]of h){let{term:I}=p;if(I==="@id"||a.id.has(I)){this._transformObjectId({obj:e,transformMap:r,termInfo:p,value:y});continue}if(I==="@type"||a.type.has(I)){this._transformObjectType({obj:e,transformMap:r,termInfo:p,value:y});continue}let T=s,D,R=f.get(I);R&&(D=await this._applyEmbeddedContexts({obj:{"@context":R},contextStack:n}),T=n.slice());let{plural:H,def:F}=p,V=this._getTermType({activeCtx:D||i,def:F}),X=H?y:[y],J=[];for(let re of X){if(re===null){J.push(null);continue}if(!this._transformTypedValue({entries:J,termType:V,value:re,termInfo:p})){if(typeof re!="object"){J.push(re);continue}if(Array.isArray(re)){await this._transformArray({entries:J,contextStack:T,value:re});continue}await this._transformObject({entries:J,contextStack:T,value:re})}}D&&D.revert(),this._assignEntries({entries:J,obj:e,transformMap:r,termInfo:p})}i.revert()}async _applyEmbeddedContexts({obj:e,contextStack:r}){let n=r.length,i=e["@context"];await this._updateContextStack({contextStack:r,contexts:i});let s=r[r.length-1];return s||(s={aliases:{id:new Set,type:new Set},context:{},scopedContextMap:new Map,termMap:new Map}),{...s,revert(){r.length=n}}}async _applyTypeScopedContexts({obj:e,contextStack:r}){let n=r.length,i=r[r.length-1];i||(i={aliases:{id:new Set,type:new Set},context:{},scopedContextMap:new Map,termMap:new Map});let{aliases:s}=i,a=[],f=["@type",...s.type];for(let h of f){let p=e[h];Array.isArray(p)?a.push(...p):a.push(p)}a=[...new Set(a)].sort();let{scopedContextMap:d}=i;for(let h of a){let p=d.get(h);p&&(await this._updateContextStack({contextStack:r,contexts:p}),i=r[r.length-1],{scopedContextMap:d}=i)}return{...i,revert(){r.length=n}}}async _updateContextStack({contextStack:e,contexts:r,transformer:n}){if(!r)return;Array.isArray(r)||(r=[r]);let{contextMap:i}=this;for(let s of r){let a=i.get(s);if(!a){let I=s,T;typeof s=="string"&&(T=s,{"@context":I}=await this._getDocument({url:T})),a=await this._addContext({context:I,contextUrl:T,transformer:n})}let f={aliases:{id:new Set(a.aliases.id),type:new Set(a.aliases.type)},context:s,scopedContextMap:new Map(a.scopedContextMap),termMap:new Map(a.termMap)},d=e[e.length-1];if(e.push(f),!d)continue;let{aliases:h,termMap:p}=f;for(let I of["id","type"])for(let T of d.aliases[I])s[T]===null||f.termMap.has(T)||h[I].add(T);let{scopedContextMap:y}=f;for(let[I,T]of d.scopedContextMap)s[I]===null||y.has(I)||y.set(I,T);for(let[I,T]of d.termMap)s[I]===null||p.has(I)||p.set(I,T)}}async _addContext({context:e,contextUrl:r}){let{contextMap:n,termToId:i,idToTerm:s}=this,a=e["@import"];if(a){let y=n.get(a);if(!y){let{"@context":I}=await this._getDocument({url:a});y=await this._addContext({context:I,contextUrl:a})}e={...y.context,...e}}let f=new Map,d=new Map,h={aliases:{id:new Set,type:new Set},context:e,scopedContextMap:f,termMap:d},p=Object.keys(e).sort();for(let y of p){let I=e[y];if(!I||(I==="@id"||I.id==="@id"?h.aliases.id.add(y):(I==="@type"||I.id==="@type")&&h.aliases.type.add(y),Ho.has(y)))continue;if(!i.has(y)){let D=this.nextTermId;this.nextTermId+=2,i.set(y,D),s&&s.set(D,y)}d.set(y,I);let T=I["@context"];T&&f.set(y,T)}return n.set(r||e,h),h}async _getDocument({url:e}){let{document:r}=await this.documentLoader(e);return typeof r=="string"?JSON.parse(r):r}_getTermType({activeCtx:e,def:r}){let{"@type":n}=r;if(!n)return;let[i,...s]=n.split(":"),a=e.termMap.get(i);if(a===void 0)return n;if(typeof a=="string")return a+s.join(":");if(!(typeof a=="object"&&typeof a["@id"]=="string"))throw new Cr("ERR_INVALID_TERM_DEFINITION",'JSON-LD term definitions must be strings or objects with "@id".');return a["@id"]+s.join(":")}_getIdForTerm({term:e,plural:r}){let n=this.termToId.get(e);if(n===void 0)throw new Cr("ERR_UNDEFINED_TERM","CBOR-LD compression requires all terms to be defined in a JSON-LD context.");return r?n+1:n}_getTermForId({id:e}){let r=(e&1)===1;return{term:this.idToTerm.get(r?e-1:e),plural:r}}};o(gu,"Transformer");var xU=new Map([[1024,"did:v1:nym:"],[1025,"did:key:"]]),Nc=class extends Fr{decode({value:e}={}){let r=xU.get(e[0]);return typeof e[1]=="string"?r+=e[1]:r+=`z${op(e[1])}`,e.length>2&&(typeof e[2]=="string"?r+=`#${e[2]}`:r+=`#z${op(e[2])}`),r}static createDecoder({value:e}={}){return!(Array.isArray(e)&&e.length>1&&e.length<=3)||!xU.has(e[0])?!1:new Nc}};o(Nc,"Base58DidUrlDecoder");var Lc=class extends Fr{constructor({secure:e}={}){super(),this.secure=e}decode({value:e}={}){return`${this.secure?"https://":"http://"}${e[1]}`}static createDecoder({value:e}={}){return e.length===2&&typeof e[1]=="string"?new Lc({secure:e[0]===2}):!1}};o(Lc,"HttpUrlDecoder");var wU=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function ome(t){return typeof t=="string"&&wU.test(t)}o(ome,"validate");var r2=ome;var pn=[];for(n2=0;n2<256;++n2)pn.push((n2+256).toString(16).substr(1));var n2;function sme(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(pn[t[e+0]]+pn[t[e+1]]+pn[t[e+2]]+pn[t[e+3]]+"-"+pn[t[e+4]]+pn[t[e+5]]+"-"+pn[t[e+6]]+pn[t[e+7]]+"-"+pn[t[e+8]]+pn[t[e+9]]+"-"+pn[t[e+10]]+pn[t[e+11]]+pn[t[e+12]]+pn[t[e+13]]+pn[t[e+14]]+pn[t[e+15]]).toLowerCase();if(!r2(r))throw TypeError("Stringified UUID is invalid");return r}o(sme,"stringify");var J8=sme;function ame(t){if(!r2(t))throw TypeError("Invalid UUID");var e,r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}o(ame,"parse");var X8=ame;var bu=class extends Fr{decode({value:e}={}){return`urn:uuid:${typeof e[1]=="string"?e[1]:J8(e[1])}`}static createDecoder({value:e}={}){if(e.length===2&&(typeof e[1]=="string"||e[1]instanceof Uint8Array))return new bu}};o(bu,"UuidUrnDecoder");var cme=new Map([[1,Lc],[2,Lc],[3,bu],[1024,Nc],[1025,Nc]]),Uc=class extends Fr{static createDecoder({value:e}={}){if(!(Array.isArray(e)||e.length>1))return!1;let r=cme.get(e[0]);return r&&r.createDecoder({value:e})}};o(Uc,"UriDecoder");var Is=class extends Fr{constructor({term:e}={}){super(),this.term=e}decode(){return this.term}static createDecoder({value:e,transformer:r}={}){if(Array.isArray(e))return Uc.createDecoder({value:e,transformer:r});let n=r.idToTerm.get(e);if(n!==void 0)return new Is({term:n})}};o(Is,"VocabTermDecoder");var vu=class extends Fr{decode({value:e}={}){let r=new Date(e*1e3).toISOString();return r.substring(0,r.indexOf("T"))}static createDecoder({value:e}={}){if(typeof e=="number")return new vu}};o(vu,"XsdDateDecoder");var qc=class extends Fr{constructor({value:e}={}){super(),this.value=e}decode({value:e}={}){return typeof e=="number"?new Date(e*1e3).toISOString().replace(".000Z","Z"):new Date(e[0]*1e3+e[1]).toISOString()}static createDecoder({value:e}={}){if(typeof e=="number")return new qc;if(Array.isArray(e)&&e.length===2&&(typeof e[0]=="number"||typeof e[1]=="number"))return new qc}};o(qc,"XsdDateTimeDecoder");function $c(t,e){return JSON.stringify(t,null,2)}o($c,"inspect");var fme=new Map([["@id",Uc],["@vocab",Is],["https://w3id.org/security#multibase",mu],["http://www.w3.org/2001/XMLSchema#date",vu],["http://www.w3.org/2001/XMLSchema#dateTime",qc]]),Z8=Ho.get("@context"),_U=Z8+1,sp=class extends gu{constructor({documentLoader:e,appContextMap:r}={}){if(super({documentLoader:e,appContextMap:r}),this.reverseAppContextMap=new Map,r)for(let[n,i]of r)this.reverseAppContextMap.set(i,n)}async decompress({compressedBytes:e,diagnose:r}={}){this.contextMap=new Map,this.termToId=new Map(Ho),this.nextTermId=t2,this.idToTerm=new Map;for(let[f,d]of this.termToId)this.idToTerm.set(d,f);let n=qf(e,{useMaps:!0});r&&(r("Diagnostic CBOR-LD decompression transform map(s):"),r($c(n,{depth:null,colors:!0})));let i=[],s=Array.isArray(n),a=s?n:[n];for(let f of a){let d={};await this._transform({obj:d,transformMap:f}),i.push(d)}return s?i:i[0]}_beforeObjectContexts({obj:e,transformMap:r}){let n=r.get(Z8);if(n){let s=Oc.createDecoder({value:n,transformer:this});e["@context"]=s?s.decode({value:n}):n}let i=r.get(_U);if(i){if(n)throw new Cr("ERR_INVALID_ENCODED_CONTEXT","Both singular and plural context IDs were found in the CBOR-LD input.");if(!Array.isArray(i))throw new Cr("ERR_INVALID_ENCODED_CONTEXT","Encoded plural context value must be an array.");let s=[];for(let a of i){let f=Oc.createDecoder({value:a,transformer:this});s.push(f?f.decode({value:a}):a)}e["@context"]=s}}_beforeTypeScopedContexts({activeCtx:e,obj:r,transformMap:n}){let{termToId:i}=this,s=["@type",...e.aliases.type];for(let a of s){let f=i.get(a),d=n.get(f);if(d===void 0&&(d=n.get(f+1)),d!==void 0)if(Array.isArray(d))r[a]=d.map(h=>{let p=Is.createDecoder({value:h,transformer:this});return p?p.decode({value:h}):h});else{let h=Is.createDecoder({value:d,transformer:this});r[a]=h?h.decode({value:d}):d}}}_getEntries({transformMap:e,termMap:r}){let n=[];for(let[i,s]of e){if(i===Z8||i===_U)continue;let{term:a,plural:f}=this._getTermForId({id:i});if(a===void 0)throw new Cr("ERR_UNKNOWN_CBORLD_TERM_ID",`Unknown term ID '${i}' was detected in the CBOR-LD input.`);let d=r.get(a);if(d===void 0&&!(a.startsWith("@")&&Ho.has(a)))throw new Cr("ERR_UNKNOWN_CBORLD_TERM",`Unknown term "${a}" was detected in the CBOR-LD input.`);n.push([{term:a,termId:i,plural:f,def:d},s])}return n.sort(ume)}_getTermInfo({termMap:e,key:r}){let{term:n,plural:i}=this._getTermForId({id:r});if(n===void 0)throw new Cr("ERR_UNKNOWN_CBORLD_TERM_ID",`Unknown term ID '${r}' was detected in the CBOR-LD input.`);let s=e.get(n);if(s===void 0&&!(n.startsWith("@")&&Ho.has(n)))throw new Cr("ERR_UNKNOWN_CBORLD_TERM",`Unknown term "${n}" was detected in the CBOR-LD input.`);return{term:n,termId:r,plural:i,def:s}}_transformObjectId({obj:e,termInfo:r,value:n}){let i=Uc.createDecoder({value:n});e[r.term]=i?i.decode({value:n}):n}_transformObjectType({obj:e,termInfo:r,value:n}){let{term:i,plural:s}=r,a=s?n:[n],f=[];for(let d of a){let h=Is.createDecoder({value:d,transformer:this});f.push(h?h.decode({value:d}):d)}e[i]=s?f:f[0]}_transformTypedValue({entries:e,termType:r,value:n}){let i=fme.get(r),s=i&&i.createDecoder({value:n,transformer:this});if(s)return e.push(s.decode({value:n})),!0}async _transformArray({entries:e,contextStack:r,value:n}){let i=[];for(let s of n){let a={};i.push(a),await this._transform({obj:a,transformMap:s,contextStack:r})}e.push(i)}async _transformObject({entries:e,contextStack:r,value:n}){let i={};return e.push(i),this._transform({obj:i,transformMap:n,contextStack:r})}_assignEntries({entries:e,obj:r,termInfo:n}){let{term:i,plural:s}=n;r[i]=s?e:e[0]}};o(sp,"Decompressor");function ume([{term:t}],[{term:e}]){return t<e?-1:t>e?1:0}o(ume,"_sortEntriesByTerm");async function Q8({cborldBytes:t,documentLoader:e,appContextMap:r=new Map,diagnose:n}){if(!(t instanceof Uint8Array))throw new TypeError('"cborldBytes" must be a Uint8Array.');let i=0;if(t[i++]!==217)throw new Cr("ERR_NOT_CBORLD",'CBOR-LD must start with a CBOR major type "Tag" header of `0xd9`.');if(t[i++]!==5)throw new Cr("ERR_NOT_CBORLD","CBOR-LD 16-bit tag must start with `0x05`.");let s=t[i];if(s===void 0)throw new Cr("ERR_NOT_CBORLD","Truncated CBOR-LD 16-bit tag.");if(!(s===0||s===1))throw new Cr("ERR_NOT_CBORLD",`Unsupported CBOR-LD compression mode "${s}".`);i++;let{buffer:a,byteOffset:f,length:d}=t,h=new Uint8Array(a,f+i,d-i);if(s===0)return qf(h,{useMaps:!1});let y=await new sp({documentLoader:e,appContextMap:r}).decompress({compressedBytes:h,diagnose:n});return n&&(n("Diagnostic JSON-LD result:"),n($c(y,{depth:null,colors:!0}))),y}o(Q8,"decode");var br=class{encode(){throw new Error("Must be implemented by derived class.")}static createEncoder({value:e}={}){throw new Error("Must be implemented by derived class.")}};o(br,"CborldEncoder");var yu=class extends br{constructor({context:e,appContextMap:r}={}){super(),this.context=e,this.appContextMap=r}encode(){let{context:e}=this,r=V8.get(e)||this.appContextMap.get(e);return r===void 0?new Be(xe.string,e):new Be(xe.uint,r)}static createEncoder({value:e,transformer:r}={}){if(typeof e!="string")return!1;let{appContextMap:n}=r;return new yu({context:e,appContextMap:n})}};o(yu,"ContextEncoder");var xu=class extends br{constructor({value:e}={}){super(),this.value=e}encode(){let{value:e}=this,r,n;e[0]==="z"?(r=122,n=e2(e.substr(1))):e[0]==="M"&&(r=77,n=Qb.toUint8Array(e.substr(1)));let i=new Uint8Array(1+n.length);return i[0]=r,i.set(n,1),new Be(xe.bytes,i)}static createEncoder({value:e}={}){if(typeof e!="string")return!1;if(e[0]==="z"||e[0]==="M")return new xu({value:e})}};o(xu,"MultibaseEncoder");var EU=new Map([["did:v1:nym:",1024],["did:key:",1025]]),jc=class extends br{constructor({value:e,scheme:r}={}){super(),this.value=e,this.scheme=r}encode(){let{value:e,scheme:r}=this,n=e.substr(r.length),[i,s]=n.split("#"),a=[new Be(xe.uint,EU.get(r)),AU(i)];return s!==void 0&&a.push(AU(s)),[new Be(xe.array,a.length),a]}static createEncoder({value:e}={}){let r=[...EU.keys()];for(let n of r)if(e.startsWith(n))return new jc({value:e,scheme:n})}};o(jc,"Base58DidUrlEncoder");function AU(t){if(t.startsWith("z")){let e=e2(t.substr(1));if(e)return new Be(xe.bytes,e)}return new Be(xe.string,t)}o(AU,"_multibase58ToToken");var _a=class extends br{constructor({value:e,secure:r}={}){super(),this.value=e,this.secure=r}encode(){let{value:e,secure:r}=this,n=r?8:7,i=[new Be(xe.uint,r?2:1),new Be(xe.string,e.substr(n))];return[new Be(xe.array,i.length),i]}static createEncoder({value:e}={}){if(e.startsWith("https://"))return new _a({value:e,secure:!0});if(e.startsWith("http://"))return new _a({value:e,secure:!1})}};o(_a,"HttpUrlEncoder");var wu=class extends br{constructor({value:e}={}){super(),this.value=e}encode(){let{value:e}=this,r=e.substr(9),n=[new Be(xe.uint,3)];if(r.toLowerCase()===r){let i=X8(r);n.push(new Be(xe.bytes,i))}else n.push(new Be(xe.string,r));return[new Be(xe.array,n.length),n]}static createEncoder({value:e}={}){if(e.startsWith("urn:uuid:"))return new wu({value:e})}};o(wu,"UuidUrnEncoder");var dme=new Map([["http",_a],["https",_a],["urn:uuid",wu],["did:v1:nym",jc],["did:key",jc]]),Hc=class extends br{static createEncoder({value:e}={}){if(typeof e!="string")return!1;let r;try{let{protocol:i,pathname:s}=new URL(e);r=i,s.includes(":")&&(r+=s);let a=e.split(":");a.pop(),r=a.join(":")}catch{return!1}let n=dme.get(r);return n&&n.createEncoder({value:e})}};o(Hc,"UriEncoder");var Vc=class extends br{constructor({termId:e}={}){super(),this.termId=e}encode(){return new Be(xe.uint,this.termId)}static createEncoder({value:e,transformer:r}={}){let{termToId:n}=r,i=n.get(e);return i!==void 0?new Vc({termId:i}):Hc.createEncoder({value:e})}};o(Vc,"VocabTermEncoder");var _u=class extends br{constructor({value:e,parsed:r}={}){super(),this.value=e,this.parsed=r}encode(){let{value:e,parsed:r}=this,n=Math.floor(r/1e3),i=new Date(n*1e3).toISOString(),s=i.substring(0,i.indexOf("T"));return e!==s?new Be(xe.string,e):new Be(xe.uint,n)}static createEncoder({value:e}={}){if(e.includes("T"))return!1;let r=Date.parse(e);return isNaN(r)?!1:new _u({value:e,parsed:r})}};o(_u,"XsdDateEncoder");var Eu=class extends br{constructor({value:e,parsed:r}={}){super(),this.value=e,this.parsed=r}encode(){let{value:e,parsed:r}=this,n=Math.floor(r/1e3),i=new Be(xe.uint,n),s=e.indexOf(".");if(s===-1){let h=new Date(n*1e3).toISOString().replace(".000Z","Z");return e!==h?new Be(xe.string,e):i}let a=parseInt(e.substr(s+1),10),f=new Date(n*1e3+a).toISOString();if(e!==f)return new Be(xe.string,e);let d=[i,new Be(xe.uint,a)];return[new Be(xe.array,d.length),d]}static createEncoder({value:e}={}){if(!e.includes("T"))return!1;let r=Date.parse(e);return isNaN(r)?!1:new Eu({value:e,parsed:r})}};o(Eu,"XsdDateTimeEncoder");var lme=new Map([["@id",Hc],["@vocab",Vc],["https://w3id.org/security#multibase",xu],["http://www.w3.org/2001/XMLSchema#date",_u],["http://www.w3.org/2001/XMLSchema#dateTime",Eu]]),CU=Ho.get("@context"),hme=CU+1,pme={Object(t){if(t instanceof br)return t.encode({obj:t})}},ap=class extends gu{constructor({documentLoader:e,appContextMap:r}={}){super({documentLoader:e,appContextMap:r})}async compress({jsonldDocument:e,diagnose:r}={}){let n=await this._createTransformMaps({jsonldDocument:e});return r&&(r("Diagnostic CBOR-LD compression transform map(s):"),r($c(n,{depth:null,colors:!0}))),Uf(n,{typeEncoders:pme})}async _createTransformMaps({jsonldDocument:e}){this.contextMap=new Map,this.termToId=new Map(Ho),this.nextTermId=t2;let r=[],n=Array.isArray(e),i=n?e:[e];for(let s of i){let a=new Map;await this._transform({obj:s,transformMap:a}),r.push(a)}return n?r:r[0]}_afterObjectContexts({obj:e,transformMap:r}){let n=e["@context"];if(!n)return;let i=[],s=Array.isArray(n),a=s?n:[n];for(let d of a){let h=yu.createEncoder({value:d,transformer:this});i.push(h||d)}let f=s?hme:CU;r.set(f,s?i:i[0])}_getEntries({obj:e,termMap:r}){let n=[],i=Object.keys(e).sort();for(let s of i){if(s==="@context")continue;let a=r.get(s);if(a===void 0&&!(s.startsWith("@")&&Ho.has(s)))throw new Cr("ERR_UNKNOWN_CBORLD_TERM",`Unknown term '${s}' was detected in the JSON-LD input.`);let f=e[s],d=Array.isArray(f),h=this._getIdForTerm({term:s,plural:d});n.push([{term:s,termId:h,plural:d,def:a},f])}return n}_transformObjectId({transformMap:e,termInfo:r,value:n}){let{termId:i}=r,s=Hc.createEncoder({value:n,transformer:this,termInfo:r});e.set(i,s||n)}_transformObjectType({transformMap:e,termInfo:r,value:n}){let{termId:i,plural:s}=r,a=s?n:[n],f=[];for(let d of a){let h=Vc.createEncoder({value:d,transformer:this,termInfo:r});f.push(h||d)}e.set(i,s?f:f[0])}_transformTypedValue({entries:e,termType:r,value:n,termInfo:i}){let s=lme.get(r),a=s&&s.createEncoder({value:n,transformer:this,termInfo:i});if(a)return e.push(a),!0}async _transformArray({entries:e,contextStack:r,value:n}){let i=[];for(let s of n){let a=new Map;i.push(a),await this._transform({obj:s,transformMap:a,contextStack:r})}e.push(i)}async _transformObject({entries:e,contextStack:r,value:n}){let i=new Map;e.push(i),await this._transform({obj:n,transformMap:i,contextStack:r})}_assignEntries({entries:e,transformMap:r,termInfo:n}){let{termId:i,plural:s}=n;r.set(i,s?e:e[0])}};o(ap,"Compressor");async function e5({jsonldDocument:t,documentLoader:e,appContextMap:r=new Map,compressionMode:n=1,diagnose:i}={}){if(!(n===0||n===1))throw new TypeError('"compressionMode" must be "0" (no compression) or "1" for compression mode version 1.');let s=new Uint8Array([217,5,n]),a;n===0?a=Uf(t):a=await new ap({documentLoader:e,appContextMap:r}).compress({jsonldDocument:t,diagnose:i});let f=s.length+a.length,d=new Uint8Array(f);return d.set(s),d.set(a,s.length),i&&(i("Diagnostic CBOR-LD result:"),i($c(d,{depth:null,colors:!0}))),d}o(e5,"encode");function t5(t){if(t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray)return new DataView(t.buffer,t.byteOffset,t.byteLength);if(t instanceof ArrayBuffer)return new DataView(t);throw new TypeError("Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray")}o(t5,"toDataView");var gme="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bme="0123456789ABCDEFGHIJKLMNOPQRSTUV",vme="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function r5(t,e,r){r=r||{};let n,i;switch(e){case"RFC3548":case"RFC4648":n=gme,i=!0;break;case"RFC4648-HEX":n=bme,i=!0;break;case"Crockford":n=vme,i=!1;break;default:throw new Error("Unknown base32 variant: "+e)}let s=r.padding!==void 0?r.padding:i,a=t5(t),f=0,d=0,h="";for(let p=0;p<a.byteLength;p++)for(d=d<<8|a.getUint8(p),f+=8;f>=5;)h+=n[d>>>f-5&31],f-=5;if(f>0&&(h+=n[d<<5-f&31]),s)for(;h.length%8!==0;)h+="=";return h}o(r5,"base32Encode");var GU=Mt(DU(),1);var Ir;(function(t){t[t.Terminator=0]="Terminator",t[t.Numeric=1]="Numeric",t[t.Alphanumeric=2]="Alphanumeric",t[t.StructuredAppend=3]="StructuredAppend",t[t.Byte=4]="Byte",t[t.Kanji=8]="Kanji",t[t.ECI=7]="ECI"})(Ir||(Ir={}));var _l=function(){function t(e,r){this.bytes=[],this.mode=e,this.data=r}return o(t,"QRData"),t.prototype.getLength=function(){return this.bytes.length},t.prototype.getLengthInBits=function(e){var r=this.mode,n=new Error("illegal mode: ".concat(r));if(1<=e&&e<10)switch(r){case Ir.Numeric:return 10;case Ir.Alphanumeric:return 9;case Ir.Byte:return 8;case Ir.Kanji:return 8;default:throw n}else if(e<27)switch(r){case Ir.Numeric:return 12;case Ir.Alphanumeric:return 11;case Ir.Byte:return 16;case Ir.Kanji:return 10;default:throw n}else if(e<41)switch(r){case Ir.Numeric:return 14;case Ir.Alphanumeric:return 13;case Ir.Byte:return 16;case Ir.Kanji:return 12;default:throw n}else throw new Error("illegal version: ".concat(e))},t}();function SU(t){for(var e=0,r=t.length,n=[],i=0;i<r;i++){var s=t.charCodeAt(i);s<128?n[e++]=s:s<2048?(n[e++]=s>>6|192,n[e++]=s&63|128):(s&64512)===55296&&i+1<r&&(t.charCodeAt(i+1)&64512)===56320?(s=65536+((s&1023)<<10)+(t.charCodeAt(++i)&1023),n[e++]=s>>18|240,n[e++]=s>>12&63|128,n[e++]=s>>6&63|128,n[e++]=s&63|128):(n[e++]=s>>12|224,n[e++]=s>>6&63|128,n[e++]=s&63|128)}return n}o(SU,"encode");var TU=function(t){pr(e,t);function e(r,n){var i=t.call(this,Ir.Byte,r)||this;if(i.encoding=-1,typeof n=="function"){var s=n(r),a=s.encoding,f=s.bytes;i.bytes=f,i.encoding=a}else i.bytes=SU(r),i.encoding=26;return i}return o(e,"QRByte"),e.prototype.writeTo=function(r){for(var n=this.bytes,i=0,s=n;i<s.length;i++){var a=s[i];r.put(a,8)}},e}(_l);var Au=[],n5=[];for(mn=0;mn<256;mn++)n5[mn]=0,Au[mn]=mn<8?1<<mn:Au[mn-4]^Au[mn-5]^Au[mn-6]^Au[mn-8];var mn;for(mn=0;mn<255;mn++)n5[Au[mn]]=mn;var mn;function El(t){if(t<1)throw new Error("illegal log: ".concat(t));return n5[t]}o(El,"glog");function cp(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return Au[t]}o(cp,"gexp");var fp=function(){function t(e,r){r===void 0&&(r=0);for(var n=0,i=e.length;n<i&&e[n]===0;)n++;i-=n;for(var s=[],a=0;a<i;a++)s.push(e[n+a]);for(var a=0;a<r;a++)s.push(0);this.num=s}return o(t,"Polynomial"),t.prototype.getAt=function(e){return this.num[e]},t.prototype.getLength=function(){return this.num.length},t.prototype.multiply=function(e){for(var r=[],n=e.getLength(),i=this.getLength(),s=i+n-1,a=0;a<s;a++)r.push(0);for(var a=0;a<i;a++)for(var f=0;f<n;f++)r[a+f]^=cp(El(this.getAt(a))+El(e.getAt(f)));return new t(r)},t.prototype.mod=function(e){var r=e.getLength(),n=this.getLength();if(n-r<0)return this;for(var i=El(this.getAt(0))-El(e.getAt(0)),s=[],a=0;a<n;a++)s.push(this.getAt(a));for(var a=0;a<r;a++)s[a]^=cp(El(e.getAt(a))+i);return new t(s).mod(e)},t}();var Eme=3,Ame=3,kU=40,Cme=10,Ime=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],Dme=1<<14|1<<12|1<<10|1<<4|1<<1,FU=1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,PU=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0;function OU(t){return Ime[t-1]}o(OU,"getAlignmentPattern");function NU(t){for(var e=new fp([1]),r=0;r<t;r++)e=e.multiply(new fp([1,cp(r)]));return e}o(NU,"getErrorCorrectionPolynomial");function Al(t){for(var e=0;t!==0;)e++,t>>>=1;return e}o(Al,"getBCHDigit");var MU=Al(PU);function LU(t){for(var e=t<<12;Al(e)-MU>=0;)e^=PU<<Al(e)-MU;return t<<12|e}o(LU,"getBCHVersion");var RU=Al(FU);function UU(t){for(var e=t<<10;Al(e)-RU>=0;)e^=FU<<Al(e)-RU;return(t<<10|e)^Dme}o(UU,"getBCHVersionInfo");function BU(t,e){for(var r=t.getMatrixSize(),n=0,i=0;i<r;i++)for(var s=!1,a=0,f=0;f<r;f++){var d=e?t.isDark(i,f):t.isDark(f,i);d===s?(a++,a===5?n+=Eme:a>5&&n++):(s=d,a=1)}return n}o(BU,"applyMaskPenaltyRule1Internal");function Sme(t){return BU(t,!0)+BU(t,!1)}o(Sme,"applyMaskPenaltyRule1");function Tme(t){for(var e=t.getMatrixSize(),r=0,n=0;n<e-1;n++)for(var i=0;i<e-1;i++){var s=t.isDark(n,i);s===t.isDark(n,i+1)&&s===t.isDark(n+1,i)&&s===t.isDark(n+1,i+1)&&(r+=Ame)}return r}o(Tme,"applyMaskPenaltyRule2");function i2(t,e,r,n,i){r=Math.max(r,0),n=Math.min(n,t.getMatrixSize());for(var s=r;s<n;s++){var a=i?t.isDark(e,s):t.isDark(s,e);if(a)return!1}return!0}o(i2,"isFourWhite");function kme(t){for(var e=t.getMatrixSize(),r=0,n=0;n<e;n++)for(var i=0;i<e;i++)i+6<e&&t.isDark(n,i)&&!t.isDark(n,i+1)&&t.isDark(n,i+2)&&t.isDark(n,i+3)&&t.isDark(n,i+4)&&!t.isDark(n,i+5)&&t.isDark(n,i+6)&&(i2(t,n,i-4,i,!0)||i2(t,n,i+7,i+11,!0))&&(r+=kU),n+6<e&&t.isDark(n,i)&&!t.isDark(n+1,i)&&t.isDark(n+2,i)&&t.isDark(n+3,i)&&t.isDark(n+4,i)&&!t.isDark(n+5,i)&&t.isDark(n+6,i)&&(i2(t,i,n-4,n,!1)||i2(t,i,n+7,n+11,!1))&&(r+=kU);return r}o(kme,"applyMaskPenaltyRule3");function Mme(t){for(var e=t.getMatrixSize(),r=0,n=0;n<e;n++)for(var i=0;i<e;i++)t.isDark(n,i)&&r++;var s=e*e,a=Math.floor(Math.abs(r*20-s*10)/s);return a*Cme}o(Mme,"applyMaskPenaltyRule4");function qU(t){return Sme(t)+Tme(t)+kme(t)+Mme(t)}o(qU,"calculateMaskPenalty");var Si;(function(t){t[t.L=1]="L",t[t.M=0]="M",t[t.Q=3]="Q",t[t.H=2]="H"})(Si||(Si={}));var $U=function(){function t(e,r){this.dataCount=r,this.totalCount=e}return o(t,"RSBlock"),t.prototype.getDataCount=function(){return this.dataCount},t.prototype.getTotalCount=function(){return this.totalCount},t.getRSBlocks=function(e,r){for(var n=[],i=t.getRSBlockTable(e,r),s=i.length/3,a=0;a<s;a++)for(var f=i[a*3+0],d=i[a*3+1],h=i[a*3+2],p=0;p<f;p++)n.push(new t(d,h));return n},t.getRSBlockTable=function(e,r){switch(r){case Si.L:return t.RS_BLOCK_TABLE[(e-1)*4+0];case Si.M:return t.RS_BLOCK_TABLE[(e-1)*4+1];case Si.Q:return t.RS_BLOCK_TABLE[(e-1)*4+2];case Si.H:return t.RS_BLOCK_TABLE[(e-1)*4+3];default:throw new Error("illegal error correction level: ".concat(r))}},t.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],t}();var i5=function(){function t(){this.length=0,this.buffer=[]}return o(t,"BitBuffer"),t.prototype.getBuffer=function(){return this.buffer},t.prototype.getLengthInBits=function(){return this.length},t.prototype.getBit=function(e){return(this.buffer[e/8>>0]>>>7-e%8&1)===1},t.prototype.put=function(e,r){for(var n=0;n<r;n++)this.putBit((e>>>r-n-1&1)===1)},t.prototype.putBit=function(e){var r=this.buffer;this.length===r.length*8&&r.push(0),e&&(r[this.length/8>>0]|=128>>>this.length%8),this.length++},t}();var o2=function(){function t(){}return o(t,"OutputStream"),t.prototype.writeBytes=function(e,r,n){r===void 0&&(r=0),n===void 0&&(n=e.length);for(var i=0;i<n;i++)this.writeByte(e[i+r])},t.prototype.flush=function(){},t.prototype.close=function(){this.flush()},t}();var s2=function(t){pr(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.bytes=[],r}return o(e,"ByteArrayOutputStream"),e.prototype.writeByte=function(r){this.bytes.push(r)},e.prototype.writeInt16=function(r){this.bytes.push(r,r>>>8)},e.prototype.toByteArray=function(){return this.bytes},e}(o2);function Rme(t){if(t>=0){if(t<26)return 65+t;if(t<52)return 97+(t-26);if(t<62)return 48+(t-52);if(t===62)return 43;if(t===63)return 47}throw new Error("illegal char: ".concat(String.fromCharCode(t)))}o(Rme,"encode");var jU=function(t){pr(e,t);function e(r){var n=t.call(this)||this;return n.buffer=0,n.length=0,n.bufLength=0,n.stream=r,n}return o(e,"Base64EncodeOutputStream"),e.prototype.writeByte=function(r){for(this.buffer=this.buffer<<8|r&255,this.bufLength+=8,this.length++;this.bufLength>=6;)this.writeEncoded(this.buffer>>>this.bufLength-6),this.bufLength-=6},e.prototype.flush=function(){this.bufLength>0&&(this.writeEncoded(this.buffer<<6-this.bufLength),this.buffer=0,this.bufLength=0);var r=this.stream;if(this.length%3!=0)for(var n=3-this.length%3,i=0;i<n;i++)r.writeByte(61)},e.prototype.writeEncoded=function(r){this.stream.writeByte(Rme(r&63))},e}(o2);function Bme(t){var e=new s2,r=new jU(e);return r.writeBytes(t),r.close(),e.close(),e.toByteArray()}o(Bme,"encodeToBase64");var Fme=function(){function t(){this.size=0,this.map={}}return o(t,"LZWTable"),t.prototype.add=function(e){this.contains(e)||(this.map[e]=this.size++)},t.prototype.getSize=function(){return this.size},t.prototype.indexOf=function(e){return this.map[e]},t.prototype.contains=function(e){return this.map[e]>=0},t}(),Pme=function(){function t(e){this.output=e,this.bitLength=0,this.bitBuffer=0}return o(t,"BitOutputStream"),t.prototype.write=function(e,r){if(e>>>r!==0)throw new Error("length overflow");for(var n=this.output;this.bitLength+r>=8;)n.writeByte(255&(e<<this.bitLength|this.bitBuffer)),r-=8-this.bitLength,e>>>=8-this.bitLength,this.bitBuffer=0,this.bitLength=0;this.bitBuffer=e<<this.bitLength|this.bitBuffer,this.bitLength=this.bitLength+r},t.prototype.flush=function(){var e=this.output;this.bitLength>0&&e.writeByte(this.bitBuffer),e.flush()},t.prototype.close=function(){this.flush(),this.output.close()},t}(),HU=function(){function t(e,r){this.data=[],this.width=e,this.height=r;for(var n=e*r,i=0;i<n;i++)this.data[i]=0}return o(t,"GIFImage"),t.prototype.getLZWRaster=function(e){for(var r=new Fme,n=String.fromCharCode,i=1<<e,s=(1<<e)+1,a=0;a<i;a++)r.add(n(a));r.add(n(i)),r.add(n(s));var f=e+1,d=new s2,h=new Pme(d);try{var p=this.data,y=p.length,I=String.fromCharCode;h.write(i,f);for(var T=0,D=I(p[T++]);T<y;){var R=I(p[T++]);r.contains(D+R)?D+=R:(h.write(r.indexOf(D),f),r.getSize()<4095&&(r.getSize()===1<<f&&f++,r.add(D+R)),D=R)}h.write(r.indexOf(D),f),h.write(s,f)}finally{h.close()}return d.toByteArray()},t.prototype.setPixel=function(e,r,n){var i=this,s=i.width,a=i.height;if(e<0||s<=e)throw new Error("illegal x axis: ".concat(e));if(r<0||a<=r)throw new Error("illegal y axis: ".concat(r));this.data[r*s+e]=n},t.prototype.getPixel=function(e,r){var n=this,i=n.width,s=n.height;if(e<0||i<=e)throw new Error("illegal x axis: ".concat(e));if(r<0||s<=r)throw new Error("illegal y axis: ".concat(r));return this.data[r*i+e]},t.prototype.write=function(e){var r=this,n=r.width,i=r.height;e.writeByte(71),e.writeByte(73),e.writeByte(70),e.writeByte(56),e.writeByte(55),e.writeByte(97),e.writeInt16(n),e.writeInt16(i),e.writeByte(128),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(255),e.writeByte(255),e.writeByte(255),e.writeByte(44),e.writeInt16(0),e.writeInt16(0),e.writeInt16(n),e.writeInt16(i),e.writeByte(0);var s=2,a=this.getLZWRaster(s),f=a.length;e.writeByte(s);for(var d=0;f-d>255;)e.writeByte(255),e.writeBytes(a,d,255),d+=255;var h=f-d;e.writeByte(h),e.writeBytes(a,d,h),e.writeByte(0),e.writeByte(59)},t.prototype.toDataURL=function(){var e=new s2;this.write(e);var r=Bme(e.toByteArray());e.close();for(var n=r.length,i=String.fromCharCode,s="data:image/gif;base64,",a=0;a<n;a++)s+=i(r[a]);return s},t}();function VU(t){switch(t){case 0:return function(e,r){return(e+r&1)===0};case 1:return function(e,r){return(r&1)===0};case 2:return function(e,r){return e%3===0};case 3:return function(e,r){return(e+r)%3===0};case 4:return function(e,r){return((e/3>>0)+(r/2>>0)&1)===0};case 5:return function(e,r){return(e*r&1)+e*r%3===0};case 6:return function(e,r){return((e*r&1)+e*r%3&1)===0};case 7:return function(e,r){return(e*r%3+(e+r&1)&1)===0};default:throw new Error("illegal mask: ".concat(t))}}o(VU,"getMaskFunc");var Ome=236,Nme=17,Lme=Object.prototype.toString;function Ume(t,e){if(t<0||t>=1e6)throw new Error("byte mode encoding hint out of range");e.put(Ir.ECI,4),t<1<<7?e.put(t,8):t<1<<14?(e.put(2,2),e.put(t,14)):(e.put(6,3),e.put(t,21))}o(Ume,"appendECI");function zU(t,e,r,n){for(var i=new i5,s=$U.getRSBlocks(t,e),a=0,f=n;a<f.length;a++){var d=f[a],h=d.mode;r&&h===Ir.Byte&&Ume(d.encoding,i),i.put(h,4),i.put(d.getLength(),d.getLengthInBits(t)),d.writeTo(i)}for(var p=0,y=0,I=s;y<I.length;y++){var T=I[y];p+=T.getDataCount()}return p*=8,[i,s,p]}o(zU,"prepareData");function qme(t,e){for(var r=0,n=0,i=0,s=[],a=[],f=e.length,d=t.getBuffer(),h=0;h<f;h++){var p=e[h],y=p.getDataCount(),I=p.getTotalCount()-y;n=Math.max(n,y),i=Math.max(i,I),s[h]=[];for(var T=0;T<y;T++)s[h][T]=255&d[T+r];r+=y;var D=NU(I),R=D.getLength()-1,H=new fp(s[h],R),F=H.mod(D),V=F.getLength();a[h]=[];for(var T=0;T<R;T++){var X=T+V-R;a[h][T]=X>=0?F.getAt(X):0}}t=new i5;for(var T=0;T<n;T++)for(var h=0;h<f;h++)T<s[h].length&&t.put(s[h][T],8);for(var T=0;T<i;T++)for(var h=0;h<f;h++)T<a[h].length&&t.put(a[h][T],8);return t}o(qme,"createBytes");function $me(t,e,r){for(t.getLengthInBits()+4<=r&&t.put(0,4);t.getLengthInBits()%8!==0;)t.putBit(!1);for(;!(t.getLengthInBits()>=r||(t.put(Ome,8),t.getLengthInBits()>=r));)t.put(Nme,8);return qme(t,e)}o($me,"createData");var o5=function(){function t(e){e===void 0&&(e={}),this.matrixSize=0,this.chunks=[],this.matrix=[];var r=e.version,n=r===void 0?0:r,i=e.encodingHint,s=i===void 0?!1:i,a=e.errorCorrectionLevel,f=a===void 0?Si.L:a;this.setVersion(n),this.setEncodingHint(s),this.setErrorCorrectionLevel(f)}return o(t,"Encoder"),t.prototype.getMatrix=function(){return this.matrix},t.prototype.getMatrixSize=function(){return this.matrixSize},t.prototype.getVersion=function(){return this.version},t.prototype.setVersion=function(e){return this.version=Math.min(40,Math.max(0,e>>0)),this.auto=this.version===0,this},t.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},t.prototype.setErrorCorrectionLevel=function(e){switch(e){case Si.L:case Si.M:case Si.Q:case Si.H:this.errorCorrectionLevel=e}return this},t.prototype.getEncodingHint=function(){return this.encodingHint},t.prototype.setEncodingHint=function(e){return this.encodingHint=e,this},t.prototype.write=function(e){var r=this.chunks;if(e instanceof _l)r.push(e);else{var n=Lme.call(e);if(n==="[object String]")r.push(new TU(e));else throw new Error("illegal data: ".concat(e))}return this},t.prototype.isDark=function(e,r){return this.matrix[e][r]===!0},t.prototype.setupFinderPattern=function(e,r){for(var n=this.matrix,i=this.matrixSize,s=-1;s<=7;s++)for(var a=-1;a<=7;a++)e+s<=-1||i<=e+s||r+a<=-1||i<=r+a||(0<=s&&s<=6&&(a===0||a===6)||0<=a&&a<=6&&(s===0||s===6)||2<=s&&s<=4&&2<=a&&a<=4?n[e+s][r+a]=!0:n[e+s][r+a]=!1)},t.prototype.setupAlignmentPattern=function(){for(var e=this.matrix,r=OU(this.version),n=r.length,i=0;i<n;i++)for(var s=0;s<n;s++){var a=r[i],f=r[s];if(e[a][f]===null)for(var d=-2;d<=2;d++)for(var h=-2;h<=2;h++)d===-2||d===2||h===-2||h===2||d===0&&h===0?e[a+d][f+h]=!0:e[a+d][f+h]=!1}},t.prototype.setupTimingPattern=function(){for(var e=this.matrix,r=this.matrixSize-8,n=8;n<r;n++){var i=n%2===0;e[n][6]===null&&(e[n][6]=i),e[6][n]===null&&(e[6][n]=i)}},t.prototype.setupFormatInfo=function(e){for(var r=this.matrix,n=this.errorCorrectionLevel<<3|e,i=UU(n),s=this.matrixSize,a=0;a<15;a++){var f=(i>>a&1)===1;a<6?r[a][8]=f:a<8?r[a+1][8]=f:r[s-15+a][8]=f,a<8?r[8][s-a-1]=f:a<9?r[8][15-a-1+1]=f:r[8][15-a-1]=f}r[s-8][8]=!0},t.prototype.setupVersionInfo=function(){if(this.version>=7)for(var e=this.matrix,r=this.matrixSize,n=LU(this.version),i=0;i<18;i++){var s=(n>>i&1)===1;e[i/3>>0][i%3+r-8-3]=s,e[i%3+r-8-3][i/3>>0]=s}},t.prototype.setupCodewords=function(e,r){for(var n=this.matrix,i=this.matrixSize,s=e.getLengthInBits(),a=VU(r),f=0,d=i-1;d>=1;d-=2){d===6&&(d=5);for(var h=0;h<i;h++)for(var p=0;p<2;p++){var y=d-p,I=(d+1&2)===0,T=I?i-1-h:h;if(n[T][y]===null){var D=!1;f<s&&(D=e.getBit(f++));var R=a(y,T);R&&(D=!D),n[T][y]=D}}}},t.prototype.buildMatrix=function(e,r){for(var n=[],i=this.matrixSize,s=0;s<i;s++){n[s]=[];for(var a=0;a<i;a++)n[s][a]=null}this.matrix=n,this.setupFinderPattern(0,0),this.setupFinderPattern(i-7,0),this.setupFinderPattern(0,i-7),this.setupAlignmentPattern(),this.setupTimingPattern(),this.setupFormatInfo(r),this.setupVersionInfo(),this.setupCodewords(e,r)},t.prototype.make=function(){var e,r,n,i,s,a=this,f=a.chunks,d=a.errorCorrectionLevel;if(this.auto){for(var h=1;h<=40&&(e=zU(h,d,this.encodingHint,f),n=e[0],i=e[1],s=e[2],!(n.getLengthInBits()<=s));h++);var p=n.getLengthInBits();if(p>s)throw new Error("data overflow: ".concat(p," > ").concat(s));this.version=h}else r=zU(this.version,d,this.encodingHint,f),n=r[0],i=r[1],s=r[2];this.matrixSize=this.version*4+17;for(var y=[],I=$me(n,i,s),T=-1,D=Number.MAX_VALUE,R=0;R<8;R++){this.buildMatrix(I,R),y.push(this.matrix);var H=qU(this);H<D&&(D=H,T=R)}return this.matrix=y[T],this},t.prototype.toDataURL=function(e,r){e===void 0&&(e=2),r===void 0&&(r=e*4),e=Math.max(1,e>>0),r=Math.max(0,r>>0);for(var n=this.matrixSize,i=e*n+r*2,s=r,a=i-r,f=new HU(i,i),d=0;d<i;d++)for(var h=0;h<i;h++)if(s<=h&&h<a&&s<=d&&d<a){var p=(d-s)/e>>0,y=(h-s)/e>>0;f.setPixel(h,d,this.isDark(p,y)?0:1)}else f.setPixel(h,d,1);return f.toDataURL()},t.prototype.clear=function(){this.chunks=[]},t}();function KU(t){for(var e=t.length,r=[],n=0;n<e;n++)r.push(t.charCodeAt(n));return r}o(KU,"encode");function s5(t){if(48<=t&&t<=57)return t-48;if(65<=t&&t<=90)return t-65+10;switch(t){case 32:return 36;case 36:return 37;case 37:return 38;case 42:return 39;case 43:return 40;case 45:return 41;case 46:return 42;case 47:return 43;case 58:return 44;default:throw new Error("illegal char: ".concat(String.fromCharCode(t)))}}o(s5,"getByte");var a5=function(t){pr(e,t);function e(r){var n=t.call(this,Ir.Alphanumeric,r)||this;return n.bytes=KU(r),n}return o(e,"QRAlphanumeric"),e.prototype.writeTo=function(r){for(var n=0,i=this.bytes,s=i.length;n+1<s;)r.put(s5(i[n])*45+s5(i[n+1]),11),n+=2;n<s&&r.put(s5(i[n]),6)},e}(_l);var WU="VP1",YU="B";function jme({bytes:t,size:e}){let r=new o5;r.setEncodingHint(!0);let n=r5(t,"RFC4648",{padding:!1}),i=`${WU}-${YU}${n}`;return r.write(new a5(i)),r.make(),{payload:i,encodedCborld:n,version:r.getVersion(),imageDataUrl:r.toDataURL(e)}}o(jme,"_bytesToQrCodeDataUrl");async function c5({vp:t,documentLoader:e,size:r,diagnose:n}={}){let i=await e5({jsonldDocument:t,documentLoader:e,diagnose:n}),{payload:s,imageDataUrl:a,encodedCborld:f,version:d}=jme({bytes:i,size:r});return{payload:s,imageDataUrl:a,encodedCborld:f,rawCborldBytes:i,version:d}}o(c5,"toQrCode");async function f5({text:t,documentLoader:e,diagnose:r}={}){let n=WU+"-";if(!(t&&t.startsWith(n)))throw TypeError("Unsupported VP QR format.");let i=t.slice(n.length);if(!i.startsWith(YU))throw TypeError("Payload must be multibase base32 (RFC4648) encoded.");let s=(0,GU.default)(i.slice(1),"RFC4648"),a=new Uint8Array(s);return{vp:await Q8({cborldBytes:a,documentLoader:e,diagnose:r})}}o(f5,"fromQrCode");var u5=o(t=>({name:"Vpqr",displayName:"VP QR",description:"Allows reading and creating QR codes with Verifiable Presentations in them",methods:{vpFromQrCode:async(e,r)=>(await f5({text:r,documentLoader:async n=>({document:await t.invoke.contextLoader(n)})}))?.vp,vpToQrCode:async(e,r)=>(await c5({vp:r,documentLoader:async n=>({document:await t.invoke.contextLoader(n)})}))?.imageDataUrl}}),"getVpqrPlugin");var JU={modelData:{definitions:{MyVerifiableCredentials:"kjzl6cwe1jw14am5tu5hh412s19o4zm8aq3g2lpd6s4paxj2nly2lj4drp3pun2"},schemas:{AchievementVerifiableCredential:"ceramic://k3y52l7qbv1frylibw2725v8gem3hxs1onoh6pvux0szdduugczh0hddxo6qsd6o0",VerifiableCredentialsList:"ceramic://k3y52l7qbv1frxkcwfpyauky3fyl4n44izridy3blvjjzgftis40sk9w8g3remghs"},tiles:{}},credentialAlias:"MyVerifiableCredentials",ceramicEndpoint:"https://ceramic-node.welibrary.io:7007",defaultContentFamily:"SuperSkills"},XU={infuraProjectId:"",network:"mainnet"};var d5=o(async(t,{ceramicIdx:e=JU,didkit:r,ethereumConfig:n=XU,debug:i}={})=>{let s=await(await Qo({debug:i})).addPlugin(await hh(r)),a=await s.addPlugin(await Uv(s,t,"key")),h=await(await(await a.addPlugin(am(a))).addPlugin(Na())).addPlugin(qv),p=await h.addPlugin(await Q0(h,e)),y=await p.addPlugin(await np(p,e)),I=await y.addPlugin(sf(y)),T=await I.addPlugin(j8(I,n)),R=await(await T.addPlugin(u5(T))).addPlugin(await Va());return R.addPlugin(vf(R))},"learnCardFromSeed");var up=o(async(t,e)=>fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),"post"),dp=o(t=>t.toString().startsWith("2"),"isSuccessful");var l5=o(async({url:t,did:e})=>{let r=t.endsWith("/")?t.slice(0,-1):t,n=e;if(!n){let i=await fetch(`${r}/did`);i.status===200&&(n=await i.text())}if(!n)throw new Error("Could not retrieve did from VC API! Please suppy a did.");return{name:"VC API",displayName:"VC API",description:"Handles issuing and signing credentials/presentations using an external VC API",id:{did:()=>n,keypair:()=>{throw new Error("Cannot get keypair when using VC API")}},methods:{getSubjectDid:()=>n,issueCredential:async(i,s,a)=>{await od.parseAsync(s);let f=await up(`${r}/credentials/issue`,{credential:s,options:a});if(!dp(f.status))throw new Error(`API Error: ${f.status} ${f.statusText}`);return Wi.parseAsync(await f.json())},verifyCredential:async(i,s,a)=>{await Wi.parseAsync(s);let f=await up(`${r}/credentials/verify`,{verifiableCredential:s,options:a});if(!dp(f.status))throw new Error(`API Error: ${f.status} ${f.statusText}`);return Cv.parseAsync(await f.json())},issuePresentation:async(i,s,a)=>{await Av.parseAsync(s);let f=await up(`${r}/presentations/issue`,{presentation:s,options:a});if(!dp(f.status))throw new Error(`API Error: ${f.status} ${f.statusText}`);return sd.parseAsync(await f.json())},verifyPresentation:async(i,s,a)=>{await sd.parseAsync(s);let f=await up(`${r}/presentations/verify`,{verifiablePresentation:s,options:a});if(!dp(f.status))throw new Error(`API Error: ${f.status} ${f.statusText}`);return Cv.parseAsync(await f.json())},getTestVc:(i,s="did:example:d23dd687a7dc6787646f2eb98d0")=>({"@context":["https://www.w3.org/2018/credentials/v1"],id:"http://example.org/credentials/3731",type:["VerifiableCredential"],issuer:n,issuanceDate:"2020-08-19T21:41:50Z",credentialSubject:{id:s}}),getTestVp:async(i,s)=>{let a=s||await i.invoke.issueCredential(i.invoke.getTestVc());return{"@context":["https://www.w3.org/2018/credentials/v1"],type:["VerifiablePresentation"],holder:n,verifiableCredential:a}}}}},"getVCAPIPlugin");var h5=o(async({url:t,did:e,debug:r})=>{let n=await(await Qo({debug:r})).addPlugin(await l5({url:t,did:e})),a=await(await(await n.addPlugin(sf(n))).addPlugin(Na())).addPlugin(await Va());return a.addPlugin(vf(a))},"learnCardFromApiUrl");async function Hme(t={}){if("custom"in t)return lv({debug:t.debug});if("vcApi"in t){let{vcApi:e,did:r,debug:n}=t;return h5({url:typeof e=="string"?e:"https://bridge.learncard.com",did:e===!0?"did:key:z6MkjSz4mYqcn7dePGuktJ5PxecMkXQQHWRg8Lm6okATyFVh":r,debug:n})}if("seed"in t){let{seed:e,...r}=t;return d5(e,r)}return Lv(t)}o(Hme,"initLearnCard");var Vme=o(()=>{let t={},e={};return{name:"Test Cache",displayName:"Test Cache",description:"[Testing] Tests Caching Implementation",cache:{getIndex:async(r,n,i)=>(r.debug?.("Test Cache, getIndex",{name:n,query:i,value:t}),t[n]),setIndex:async(r,n,i,s)=>(r.debug?.("Test Cache, setIndex",{name:n,query:i,value:s}),t[n]=s,!0),flushIndex:async r=>(r.debug?.("Test Cache, flushIndex"),t={},!0),getVc:async(r,n)=>(r.debug?.("Test Cache, getVc",{uri:n,value:e[n]}),e[n]),setVc:async(r,n,i)=>(r.debug?.("Test Cache, setVc",{uri:n,value:i}),e[n]=i,!0),flushVc:async r=>(r.debug?.("Test Cache, flushVc"),e={},!0)},methods:{}}},"getTestCache");var zme=o(()=>{let t=[],e=[];return{name:"Test Storage",displayName:"Test Storage",description:"[Testing] Tests Storage Implementations",read:{get:async(r,n)=>{if(r.debug?.("Test Storage, read, get",{uri:n}),!n)return;let[i,s,a]=n.split(":");if(s==="test")return e[Number.parseInt(a)]}},store:{upload:async(r,n)=>{r.debug?.("Test Storage, store, upload",{vc:n});let i=e.length;return e.push(n),`lc:test:${i}`}},index:{get:async(r,n)=>(r.debug?.("Test Storage, index, get",{query:n}),t),add:async(r,n)=>(r.debug?.("Test Storage, index, add",{record:n}),t.push(n),!0),update:async()=>!1,remove:async(r,n)=>{r.debug?.("Test Storage, index, remove",{id:n});let i=t.findIndex(s=>s.id===n);return t.splice(i,1),!0}},methods:{}}},"getTestStorage");
|
824
|
-
/*!
|
825
|
-
* A CredentialHandlerRegistration provides a CredentialManager to enable Web
|
826
|
-
* apps to register Profiles that can be presented to websites.
|
827
|
-
*
|
828
|
-
* Copyright (c) 2017 Digital Bazaar, Inc. All rights reserved.
|
829
|
-
*/
|
830
|
-
/*!
|
831
|
-
* A CredentialRequestEvent is emitted when a request has been made for
|
832
|
-
* credentials.
|
833
|
-
*
|
834
|
-
* Copyright (c) 2017 Digital Bazaar, Inc. All rights reserved.
|
835
|
-
*/
|
836
|
-
/*!
|
837
|
-
* A CredentialStoreEvent is emitted when a request has been made to
|
838
|
-
* store a credential.
|
839
|
-
*
|
840
|
-
* Copyright (c) 2017 Digital Bazaar, Inc. All rights reserved.
|
841
|
-
*/
|
842
|
-
/*!
|
843
|
-
* A WebApp is a remote application that runs in a WebAppContext.
|
844
|
-
*
|
845
|
-
* Copyright (c) 2017 Digital Bazaar, Inc. All rights reserved.
|
846
|
-
*/
|
847
|
-
/*!
|
848
|
-
* A WebCredential is a Credential that can be retrieved from or stored by a
|
849
|
-
* "credential handler" that runs in a third party Web application.
|
850
|
-
*
|
851
|
-
* Copyright (c) 2017-2021 Digital Bazaar, Inc. All rights reserved.
|
852
|
-
*/
|
853
|
-
/*!
|
854
|
-
* Copyright (c) 2017 Digital Bazaar, Inc. All rights reserved.
|
855
|
-
*/
|
856
|
-
/*!
|
857
|
-
* Copyright (c) 2017-2018 Digital Bazaar, Inc. All rights reserved.
|
858
|
-
*/
|
859
|
-
/*!
|
860
|
-
* Copyright (c) 2017-2022 Digital Bazaar, Inc. All rights reserved.
|
861
|
-
*/
|
862
|
-
/*!
|
863
|
-
* Copyright (c) 2017-2023 Digital Bazaar, Inc. All rights reserved.
|
864
|
-
*/
|
865
|
-
/*!
|
866
|
-
* Copyright (c) 2018-2022 Digital Bazaar, Inc. All rights reserved.
|
867
|
-
*/
|
868
|
-
/*!
|
869
|
-
* Copyright (c) 2019-2022 Digital Bazaar, Inc. All rights reserved.
|
870
|
-
*/
|
871
|
-
/*!
|
872
|
-
* Copyright (c) 2020 Digital Bazaar, Inc. All rights reserved.
|
873
|
-
*/
|
874
|
-
/*!
|
875
|
-
* Copyright (c) 2020-2021 Digital Bazaar, Inc. All rights reserved.
|
876
|
-
*/
|
877
|
-
/*!
|
878
|
-
* Copyright (c) 2021 Digital Bazaar, Inc. All rights reserved.
|
879
|
-
*/
|
880
|
-
/*!
|
881
|
-
* Copyright (c) 2022 Digital Bazaar, Inc. All rights reserved.
|
882
|
-
*/
|
883
|
-
/*!
|
884
|
-
* Copyright (c) 2022-2023 Digital Bazaar, Inc. All rights reserved.
|
885
|
-
*/
|
886
|
-
/*!
|
887
|
-
* JSON-RPC for Web Request Polyfills.
|
888
|
-
*
|
889
|
-
* Copyright (c) 2017 Digital Bazaar, Inc. All rights reserved.
|
890
|
-
*/
|
891
|
-
/*!
|
892
|
-
* The buffer module from node.js, for the browser.
|
893
|
-
*
|
894
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
895
|
-
* @license MIT
|
896
|
-
*/
|
897
|
-
/*!
|
898
|
-
* The core CredentialHandler class.
|
899
|
-
*
|
900
|
-
* Copyright (c) 2017 Digital Bazaar, Inc. All rights reserved.
|
901
|
-
*/
|
902
|
-
/*!
|
903
|
-
* Utilities for Web Request RPC.
|
904
|
-
*
|
905
|
-
* Copyright (c) 2017 Digital Bazaar, Inc. All rights reserved.
|
906
|
-
*/
|
907
|
-
/*!
|
908
|
-
* Wrapper for native CredentialsContainer that uses remote Credential Mediator
|
909
|
-
* for WebCredential-related operations.
|
910
|
-
*
|
911
|
-
* Copyright (c) 2017-2018 Digital Bazaar, Inc. All rights reserved.
|
912
|
-
*/
|
913
|
-
/*!
|
914
|
-
* https://github.com/Starcounter-Jack/JSON-Patch
|
915
|
-
* (c) 2017-2021 Joachim Wester
|
916
|
-
* MIT license
|
917
|
-
*/
|
918
|
-
/*!
|
919
|
-
* https://github.com/Starcounter-Jack/JSON-Patch
|
920
|
-
* (c) 2017-2022 Joachim Wester
|
921
|
-
* MIT licensed
|
922
|
-
*/
|
923
|
-
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
924
|
-
/**
|
925
|
-
* @license
|
926
|
-
* Lodash <https://lodash.com/>
|
927
|
-
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
928
|
-
* Released under MIT license <https://lodash.com/license>
|
929
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
930
|
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
931
|
-
*/
|
932
|
-
/**
|
933
|
-
* @module QRCode
|
934
|
-
* @package @nuintun/qrcode
|
935
|
-
* @license MIT
|
936
|
-
* @version 3.3.0
|
937
|
-
* @author nuintun <nuintun@qq.com>
|
938
|
-
* @description A pure JavaScript QRCode encode and decode library.
|
939
|
-
* @see https://github.com/nuintun/qrcode#readme
|
940
|
-
*/
|
941
|
-
/**
|
942
|
-
* [js-sha3]{@link https://github.com/emn178/js-sha3}
|
943
|
-
*
|
944
|
-
* @version 0.8.0
|
945
|
-
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
946
|
-
* @copyright Chen, Yi-Cyuan 2015-2018
|
947
|
-
* @license MIT
|
948
|
-
*/
|
1
|
+
"use strict";var Dc=Object.create;var ve=Object.defineProperty;var Gc=Object.getOwnPropertyDescriptor;var Fc=Object.getOwnPropertyNames;var kc=Object.getPrototypeOf,Uc=Object.prototype.hasOwnProperty;var i=(e,r)=>ve(e,"name",{value:r,configurable:!0});var o=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Bc=(e,r)=>{for(var t in r)ve(e,t,{get:r[t],enumerable:!0})},bn=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of Fc(r))!Uc.call(e,a)&&a!==t&&ve(e,a,{get:()=>r[a],enumerable:!(n=Gc(r,a))||n.enumerable});return e};var Rr=(e,r,t)=>(t=e!=null?Dc(kc(e)):{},bn(r||!e||!e.__esModule?ve(t,"default",{value:e,enumerable:!0}):t,e)),Vc=e=>bn(ve({},"__esModule",{value:!0}),e);var q=o((wP,Tn)=>{var De=i(function(e){return e&&e.Math==Math&&e},"check");Tn.exports=De(typeof globalThis=="object"&&globalThis)||De(typeof window=="object"&&window)||De(typeof self=="object"&&self)||De(typeof global=="object"&&global)||function(){return this}()||Function("return this")()});var b=o((CP,On)=>{On.exports=function(e){try{return!!e()}catch{return!0}}});var A=o((AP,Rn)=>{var $c=b();Rn.exports=!$c(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var fe=o((MP,En)=>{var Kc=b();En.exports=!Kc(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var T=o((NP,wn)=>{var Yc=fe(),Ge=Function.prototype.call;wn.exports=Yc?Ge.bind(Ge):function(){return Ge.apply(Ge,arguments)}});var Nn=o(Mn=>{"use strict";var Cn={}.propertyIsEnumerable,An=Object.getOwnPropertyDescriptor,Hc=An&&!Cn.call({1:2},1);Mn.f=Hc?i(function(r){var t=An(this,r);return!!t&&t.enumerable},"propertyIsEnumerable"):Cn});var Q=o((_P,jn)=>{jn.exports=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}});var S=o((LP,Dn)=>{var _n=fe(),Ln=Function.prototype,Er=Ln.call,Wc=_n&&Ln.bind.bind(Er,Er);Dn.exports=_n?Wc:function(e){return function(){return Er.apply(e,arguments)}}});var de=o((DP,Fn)=>{var Gn=S(),zc=Gn({}.toString),Jc=Gn("".slice);Fn.exports=function(e){return Jc(zc(e),8,-1)}});var Un=o((GP,kn)=>{var Qc=S(),Xc=b(),Zc=de(),wr=Object,el=Qc("".split);kn.exports=Xc(function(){return!wr("z").propertyIsEnumerable(0)})?function(e){return Zc(e)=="String"?el(e,""):wr(e)}:wr});var pe=o((FP,Bn)=>{Bn.exports=function(e){return e==null}});var Fe=o((kP,Vn)=>{var rl=pe(),tl=TypeError;Vn.exports=function(e){if(rl(e))throw tl("Can't call method on "+e);return e}});var X=o((UP,$n)=>{var nl=Un(),al=Fe();$n.exports=function(e){return nl(al(e))}});var Ar=o((BP,Kn)=>{var Cr=typeof document=="object"&&document.all,il=typeof Cr>"u"&&Cr!==void 0;Kn.exports={all:Cr,IS_HTMLDDA:il}});var g=o((VP,Hn)=>{var Yn=Ar(),ol=Yn.all;Hn.exports=Yn.IS_HTMLDDA?function(e){return typeof e=="function"||e===ol}:function(e){return typeof e=="function"}});var D=o(($P,Jn)=>{var Wn=g(),zn=Ar(),ul=zn.all;Jn.exports=zn.IS_HTMLDDA?function(e){return typeof e=="object"?e!==null:Wn(e)||e===ul}:function(e){return typeof e=="object"?e!==null:Wn(e)}});var G=o((KP,Qn)=>{var Mr=q(),sl=g(),cl=i(function(e){return sl(e)?e:void 0},"aFunction");Qn.exports=function(e,r){return arguments.length<2?cl(Mr[e]):Mr[e]&&Mr[e][r]}});var ge=o((YP,Xn)=>{var ll=S();Xn.exports=ll({}.isPrototypeOf)});var he=o((HP,Zn)=>{Zn.exports=typeof navigator<"u"&&String(navigator.userAgent)||""});var jr=o((WP,ia)=>{var aa=q(),Nr=he(),ea=aa.process,ra=aa.Deno,ta=ea&&ea.versions||ra&&ra.version,na=ta&&ta.v8,M,ke;na&&(M=na.split("."),ke=M[0]>0&&M[0]<4?1:+(M[0]+M[1]));!ke&&Nr&&(M=Nr.match(/Edge\/(\d+)/),(!M||M[1]>=74)&&(M=Nr.match(/Chrome\/(\d+)/),M&&(ke=+M[1])));ia.exports=ke});var _r=o((zP,ua)=>{var oa=jr(),vl=b();ua.exports=!!Object.getOwnPropertySymbols&&!vl(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&oa&&oa<41})});var Lr=o((JP,sa)=>{var fl=_r();sa.exports=fl&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Dr=o((QP,ca)=>{var dl=G(),pl=g(),gl=ge(),hl=Lr(),yl=Object;ca.exports=hl?function(e){return typeof e=="symbol"}:function(e){var r=dl("Symbol");return pl(r)&&gl(r.prototype,yl(e))}});var ye=o((XP,la)=>{var Pl=String;la.exports=function(e){try{return Pl(e)}catch{return"Object"}}});var N=o((ZP,va)=>{var ql=g(),ml=ye(),Sl=TypeError;va.exports=function(e){if(ql(e))return e;throw Sl(ml(e)+" is not a function")}});var Ue=o((eq,fa)=>{var Il=N(),xl=pe();fa.exports=function(e,r){var t=e[r];return xl(t)?void 0:Il(t)}});var pa=o((rq,da)=>{var Gr=T(),Fr=g(),kr=D(),bl=TypeError;da.exports=function(e,r){var t,n;if(r==="string"&&Fr(t=e.toString)&&!kr(n=Gr(t,e))||Fr(t=e.valueOf)&&!kr(n=Gr(t,e))||r!=="string"&&Fr(t=e.toString)&&!kr(n=Gr(t,e)))return n;throw bl("Can't convert object to primitive value")}});var F=o((tq,ga)=>{ga.exports=!1});var Be=o((nq,ya)=>{var ha=q(),Tl=Object.defineProperty;ya.exports=function(e,r){try{Tl(ha,e,{value:r,configurable:!0,writable:!0})}catch{ha[e]=r}return r}});var Ve=o((aq,qa)=>{var Ol=q(),Rl=Be(),Pa="__core-js_shared__",El=Ol[Pa]||Rl(Pa,{});qa.exports=El});var Ur=o((iq,Sa)=>{var wl=F(),ma=Ve();(Sa.exports=function(e,r){return ma[e]||(ma[e]=r!==void 0?r:{})})("versions",[]).push({version:"3.28.0",mode:wl?"pure":"global",copyright:"\xA9 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.28.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var Br=o((oq,Ia)=>{var Cl=Fe(),Al=Object;Ia.exports=function(e){return Al(Cl(e))}});var j=o((uq,xa)=>{var Ml=S(),Nl=Br(),jl=Ml({}.hasOwnProperty);xa.exports=Object.hasOwn||i(function(r,t){return jl(Nl(r),t)},"hasOwn")});var Vr=o((sq,ba)=>{var _l=S(),Ll=0,Dl=Math.random(),Gl=_l(1 .toString);ba.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Gl(++Ll+Dl,36)}});var I=o((cq,Oa)=>{var Fl=q(),kl=Ur(),Ta=j(),Ul=Vr(),Bl=_r(),Vl=Lr(),Z=Fl.Symbol,$r=kl("wks"),$l=Vl?Z.for||Z:Z&&Z.withoutSetter||Ul;Oa.exports=function(e){return Ta($r,e)||($r[e]=Bl&&Ta(Z,e)?Z[e]:$l("Symbol."+e)),$r[e]}});var Ca=o((lq,wa)=>{var Kl=T(),Ra=D(),Ea=Dr(),Yl=Ue(),Hl=pa(),Wl=I(),zl=TypeError,Jl=Wl("toPrimitive");wa.exports=function(e,r){if(!Ra(e)||Ea(e))return e;var t=Yl(e,Jl),n;if(t){if(r===void 0&&(r="default"),n=Kl(t,e,r),!Ra(n)||Ea(n))return n;throw zl("Can't convert object to primitive value")}return r===void 0&&(r="number"),Hl(e,r)}});var Kr=o((vq,Aa)=>{var Ql=Ca(),Xl=Dr();Aa.exports=function(e){var r=Ql(e,"string");return Xl(r)?r:r+""}});var Pe=o((fq,Na)=>{var Zl=q(),Ma=D(),Yr=Zl.document,ev=Ma(Yr)&&Ma(Yr.createElement);Na.exports=function(e){return ev?Yr.createElement(e):{}}});var Hr=o((dq,ja)=>{var rv=A(),tv=b(),nv=Pe();ja.exports=!rv&&!tv(function(){return Object.defineProperty(nv("div"),"a",{get:function(){return 7}}).a!=7})});var $e=o(La=>{var av=A(),iv=T(),ov=Nn(),uv=Q(),sv=X(),cv=Kr(),lv=j(),vv=Hr(),_a=Object.getOwnPropertyDescriptor;La.f=av?_a:i(function(r,t){if(r=sv(r),t=cv(t),vv)try{return _a(r,t)}catch{}if(lv(r,t))return uv(!iv(ov.f,r,t),r[t])},"getOwnPropertyDescriptor")});var Wr=o((gq,Da)=>{var fv=A(),dv=b();Da.exports=fv&&dv(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})});var _=o((hq,Ga)=>{var pv=D(),gv=String,hv=TypeError;Ga.exports=function(e){if(pv(e))return e;throw hv(gv(e)+" is not an object")}});var k=o(ka=>{var yv=A(),Pv=Hr(),qv=Wr(),Ke=_(),Fa=Kr(),mv=TypeError,zr=Object.defineProperty,Sv=Object.getOwnPropertyDescriptor,Jr="enumerable",Qr="configurable",Xr="writable";ka.f=yv?qv?i(function(r,t,n){if(Ke(r),t=Fa(t),Ke(n),typeof r=="function"&&t==="prototype"&&"value"in n&&Xr in n&&!n[Xr]){var a=Sv(r,t);a&&a[Xr]&&(r[t]=n.value,n={configurable:Qr in n?n[Qr]:a[Qr],enumerable:Jr in n?n[Jr]:a[Jr],writable:!1})}return zr(r,t,n)},"defineProperty"):zr:i(function(r,t,n){if(Ke(r),t=Fa(t),Ke(n),Pv)try{return zr(r,t,n)}catch{}if("get"in n||"set"in n)throw mv("Accessors not supported");return"value"in n&&(r[t]=n.value),r},"defineProperty")});var B=o((Pq,Ua)=>{var Iv=A(),xv=k(),bv=Q();Ua.exports=Iv?function(e,r,t){return xv.f(e,r,bv(1,t))}:function(e,r,t){return e[r]=t,e}});var rt=o((qq,Va)=>{var Zr=A(),Tv=j(),Ba=Function.prototype,Ov=Zr&&Object.getOwnPropertyDescriptor,et=Tv(Ba,"name"),Rv=et&&i(function(){},"something").name==="something",Ev=et&&(!Zr||Zr&&Ov(Ba,"name").configurable);Va.exports={EXISTS:et,PROPER:Rv,CONFIGURABLE:Ev}});var Ye=o((mq,$a)=>{var wv=S(),Cv=g(),tt=Ve(),Av=wv(Function.toString);Cv(tt.inspectSource)||(tt.inspectSource=function(e){return Av(e)});$a.exports=tt.inspectSource});var Ha=o((Sq,Ya)=>{var Mv=q(),Nv=g(),Ka=Mv.WeakMap;Ya.exports=Nv(Ka)&&/native code/.test(String(Ka))});var He=o((Iq,za)=>{var jv=Ur(),_v=Vr(),Wa=jv("keys");za.exports=function(e){return Wa[e]||(Wa[e]=_v(e))}});var We=o((xq,Ja)=>{Ja.exports={}});var me=o((bq,Za)=>{var Lv=Ha(),Xa=q(),Dv=D(),Gv=B(),nt=j(),at=Ve(),Fv=He(),kv=We(),Qa="Object already initialized",it=Xa.TypeError,Uv=Xa.WeakMap,ze,qe,Je,Bv=i(function(e){return Je(e)?qe(e):ze(e,{})},"enforce"),Vv=i(function(e){return function(r){var t;if(!Dv(r)||(t=qe(r)).type!==e)throw it("Incompatible receiver, "+e+" required");return t}},"getterFor");Lv||at.state?(L=at.state||(at.state=new Uv),L.get=L.get,L.has=L.has,L.set=L.set,ze=i(function(e,r){if(L.has(e))throw it(Qa);return r.facade=e,L.set(e,r),r},"set"),qe=i(function(e){return L.get(e)||{}},"get"),Je=i(function(e){return L.has(e)},"has")):(Y=Fv("state"),kv[Y]=!0,ze=i(function(e,r){if(nt(e,Y))throw it(Qa);return r.facade=e,Gv(e,Y,r),r},"set"),qe=i(function(e){return nt(e,Y)?e[Y]:{}},"get"),Je=i(function(e){return nt(e,Y)},"has"));var L,Y;Za.exports={set:ze,get:qe,has:Je,enforce:Bv,getterFor:Vv}});var st=o((Tq,ti)=>{var ut=S(),$v=b(),Kv=g(),Qe=j(),ot=A(),Yv=rt().CONFIGURABLE,Hv=Ye(),ri=me(),Wv=ri.enforce,zv=ri.get,ei=String,Xe=Object.defineProperty,Jv=ut("".slice),Qv=ut("".replace),Xv=ut([].join),Zv=ot&&!$v(function(){return Xe(function(){},"length",{value:8}).length!==8}),ef=String(String).split("String"),rf=ti.exports=function(e,r,t){Jv(ei(r),0,7)==="Symbol("&&(r="["+Qv(ei(r),/^Symbol\(([^)]*)\)/,"$1")+"]"),t&&t.getter&&(r="get "+r),t&&t.setter&&(r="set "+r),(!Qe(e,"name")||Yv&&e.name!==r)&&(ot?Xe(e,"name",{value:r,configurable:!0}):e.name=r),Zv&&t&&Qe(t,"arity")&&e.length!==t.arity&&Xe(e,"length",{value:t.arity});try{t&&Qe(t,"constructor")&&t.constructor?ot&&Xe(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch{}var n=Wv(e);return Qe(n,"source")||(n.source=Xv(ef,typeof r=="string"?r:"")),e};Function.prototype.toString=rf(i(function(){return Kv(this)&&zv(this).source||Hv(this)},"toString"),"toString")});var V=o((Oq,ni)=>{var tf=g(),nf=k(),af=st(),of=Be();ni.exports=function(e,r,t,n){n||(n={});var a=n.enumerable,u=n.name!==void 0?n.name:r;if(tf(t)&&af(t,u,n),n.global)a?e[r]=t:of(r,t);else{try{n.unsafe?e[r]&&(a=!0):delete e[r]}catch{}a?e[r]=t:nf.f(e,r,{value:t,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e}});var ii=o((Rq,ai)=>{var uf=Math.ceil,sf=Math.floor;ai.exports=Math.trunc||i(function(r){var t=+r;return(t>0?sf:uf)(t)},"trunc")});var Ze=o((Eq,oi)=>{var cf=ii();oi.exports=function(e){var r=+e;return r!==r||r===0?0:cf(r)}});var si=o((wq,ui)=>{var lf=Ze(),vf=Math.max,ff=Math.min;ui.exports=function(e,r){var t=lf(e);return t<0?vf(t+r,0):ff(t,r)}});var li=o((Cq,ci)=>{var df=Ze(),pf=Math.min;ci.exports=function(e){return e>0?pf(df(e),9007199254740991):0}});var ct=o((Aq,vi)=>{var gf=li();vi.exports=function(e){return gf(e.length)}});var pi=o((Mq,di)=>{var hf=X(),yf=si(),Pf=ct(),fi=i(function(e){return function(r,t,n){var a=hf(r),u=Pf(a),s=yf(n,u),c;if(e&&t!=t){for(;u>s;)if(c=a[s++],c!=c)return!0}else for(;u>s;s++)if((e||s in a)&&a[s]===t)return e||s||0;return!e&&-1}},"createMethod");di.exports={includes:fi(!0),indexOf:fi(!1)}});var vt=o((Nq,hi)=>{var qf=S(),lt=j(),mf=X(),Sf=pi().indexOf,If=We(),gi=qf([].push);hi.exports=function(e,r){var t=mf(e),n=0,a=[],u;for(u in t)!lt(If,u)&<(t,u)&&gi(a,u);for(;r.length>n;)lt(t,u=r[n++])&&(~Sf(a,u)||gi(a,u));return a}});var er=o((jq,yi)=>{yi.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var qi=o(Pi=>{var xf=vt(),bf=er(),Tf=bf.concat("length","prototype");Pi.f=Object.getOwnPropertyNames||i(function(r){return xf(r,Tf)},"getOwnPropertyNames")});var Si=o(mi=>{mi.f=Object.getOwnPropertySymbols});var xi=o((Dq,Ii)=>{var Of=G(),Rf=S(),Ef=qi(),wf=Si(),Cf=_(),Af=Rf([].concat);Ii.exports=Of("Reflect","ownKeys")||i(function(r){var t=Ef.f(Cf(r)),n=wf.f;return n?Af(t,n(r)):t},"ownKeys")});var ft=o((Gq,Ti)=>{var bi=j(),Mf=xi(),Nf=$e(),jf=k();Ti.exports=function(e,r,t){for(var n=Mf(r),a=jf.f,u=Nf.f,s=0;s<n.length;s++){var c=n[s];!bi(e,c)&&!(t&&bi(t,c))&&a(e,c,u(r,c))}}});var dt=o((Fq,Oi)=>{var _f=b(),Lf=g(),Df=/#|\.prototype\./,Se=i(function(e,r){var t=Ff[Gf(e)];return t==Uf?!0:t==kf?!1:Lf(r)?_f(r):!!r},"isForced"),Gf=Se.normalize=function(e){return String(e).replace(Df,".").toLowerCase()},Ff=Se.data={},kf=Se.NATIVE="N",Uf=Se.POLYFILL="P";Oi.exports=Se});var E=o((kq,Ri)=>{var pt=q(),Bf=$e().f,Vf=B(),$f=V(),Kf=Be(),Yf=ft(),Hf=dt();Ri.exports=function(e,r){var t=e.target,n=e.global,a=e.stat,u,s,c,l,f,v;if(n?s=pt:a?s=pt[t]||Kf(t,{}):s=(pt[t]||{}).prototype,s)for(c in r){if(f=r[c],e.dontCallGetSet?(v=Bf(s,c),l=v&&v.value):l=s[c],u=Hf(n?c:t+(a?".":"#")+c,e.forced),!u&&l!==void 0){if(typeof f==typeof l)continue;Yf(f,l)}(e.sham||l&&l.sham)&&Vf(f,"sham",!0),$f(s,c,f,e)}}});var wi=o((Uq,Ei)=>{var Wf=b();Ei.exports=!Wf(function(){function e(){}return i(e,"F"),e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})});var rr=o((Bq,Ai)=>{var zf=j(),Jf=g(),Qf=Br(),Xf=He(),Zf=wi(),Ci=Xf("IE_PROTO"),gt=Object,ed=gt.prototype;Ai.exports=Zf?gt.getPrototypeOf:function(e){var r=Qf(e);if(zf(r,Ci))return r[Ci];var t=r.constructor;return Jf(t)&&r instanceof t?t.prototype:r instanceof gt?ed:null}});var Ni=o((Vq,Mi)=>{var rd=S(),td=N();Mi.exports=function(e,r,t){try{return rd(td(Object.getOwnPropertyDescriptor(e,r)[t]))}catch{}}});var _i=o(($q,ji)=>{var nd=g(),ad=String,id=TypeError;ji.exports=function(e){if(typeof e=="object"||nd(e))return e;throw id("Can't set "+ad(e)+" as a prototype")}});var tr=o((Kq,Li)=>{var od=Ni(),ud=_(),sd=_i();Li.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,r={},t;try{t=od(Object.prototype,"__proto__","set"),t(r,[]),e=r instanceof Array}catch{}return i(function(a,u){return ud(a),sd(u),e?t(a,u):a.__proto__=u,a},"setPrototypeOf")}():void 0)});var Gi=o((Yq,Di)=>{var cd=vt(),ld=er();Di.exports=Object.keys||i(function(r){return cd(r,ld)},"keys")});var ki=o(Fi=>{var vd=A(),fd=Wr(),dd=k(),pd=_(),gd=X(),hd=Gi();Fi.f=vd&&!fd?Object.defineProperties:i(function(r,t){pd(r);for(var n=gd(t),a=hd(t),u=a.length,s=0,c;u>s;)dd.f(r,c=a[s++],n[c]);return r},"defineProperties")});var ht=o((Wq,Ui)=>{var yd=G();Ui.exports=yd("document","documentElement")});var Ie=o((zq,Wi)=>{var Pd=_(),qd=ki(),Bi=er(),md=We(),Sd=ht(),Id=Pe(),xd=He(),Vi=">",$i="<",Pt="prototype",qt="script",Yi=xd("IE_PROTO"),yt=i(function(){},"EmptyConstructor"),Hi=i(function(e){return $i+qt+Vi+e+$i+"/"+qt+Vi},"scriptTag"),Ki=i(function(e){e.write(Hi("")),e.close();var r=e.parentWindow.Object;return e=null,r},"NullProtoObjectViaActiveX"),bd=i(function(){var e=Id("iframe"),r="java"+qt+":",t;return e.style.display="none",Sd.appendChild(e),e.src=String(r),t=e.contentWindow.document,t.open(),t.write(Hi("document.F=Object")),t.close(),t.F},"NullProtoObjectViaIFrame"),nr,ar=i(function(){try{nr=new ActiveXObject("htmlfile")}catch{}ar=typeof document<"u"?document.domain&&nr?Ki(nr):bd():Ki(nr);for(var e=Bi.length;e--;)delete ar[Pt][Bi[e]];return ar()},"NullProtoObject");md[Yi]=!0;Wi.exports=Object.create||i(function(r,t){var n;return r!==null?(yt[Pt]=Pd(r),n=new yt,yt[Pt]=null,n[Yi]=r):n=ar(),t===void 0?n:qd.f(n,t)},"create")});var Ji=o((Jq,zi)=>{var Td=D(),Od=B();zi.exports=function(e,r){Td(r)&&"cause"in r&&Od(e,"cause",r.cause)}});var eo=o((Qq,Zi)=>{var Rd=S(),Qi=Error,Ed=Rd("".replace),wd=function(e){return String(Qi(e).stack)}("zxcasd"),Xi=/\n\s*at [^:]*:[^\n]*/,Cd=Xi.test(wd);Zi.exports=function(e,r){if(Cd&&typeof e=="string"&&!Qi.prepareStackTrace)for(;r--;)e=Ed(e,Xi,"");return e}});var to=o((Xq,ro)=>{var Ad=b(),Md=Q();ro.exports=!Ad(function(){var e=Error("a");return"stack"in e?(Object.defineProperty(e,"stack",Md(1,7)),e.stack!==7):!0})});var io=o((Zq,ao)=>{var Nd=B(),jd=eo(),_d=to(),no=Error.captureStackTrace;ao.exports=function(e,r,t,n){_d&&(no?no(e,r):Nd(e,"stack",jd(t,n)))}});var uo=o((em,oo)=>{var Ld=de(),Dd=S();oo.exports=function(e){if(Ld(e)==="Function")return Dd(e)}});var ir=o((rm,co)=>{var so=uo(),Gd=N(),Fd=fe(),kd=so(so.bind);co.exports=function(e,r){return Gd(e),r===void 0?e:Fd?kd(e,r):function(){return e.apply(r,arguments)}}});var ee=o((tm,lo)=>{lo.exports={}});var fo=o((nm,vo)=>{var Ud=I(),Bd=ee(),Vd=Ud("iterator"),$d=Array.prototype;vo.exports=function(e){return e!==void 0&&(Bd.Array===e||$d[Vd]===e)}});var or=o((am,go)=>{var Kd=I(),Yd=Kd("toStringTag"),po={};po[Yd]="z";go.exports=String(po)==="[object z]"});var xe=o((im,ho)=>{var Hd=or(),Wd=g(),ur=de(),zd=I(),Jd=zd("toStringTag"),Qd=Object,Xd=ur(function(){return arguments}())=="Arguments",Zd=i(function(e,r){try{return e[r]}catch{}},"tryGet");ho.exports=Hd?ur:function(e){var r,t,n;return e===void 0?"Undefined":e===null?"Null":typeof(t=Zd(r=Qd(e),Jd))=="string"?t:Xd?ur(r):(n=ur(r))=="Object"&&Wd(r.callee)?"Arguments":n}});var mt=o((om,Po)=>{var ep=xe(),yo=Ue(),rp=pe(),tp=ee(),np=I(),ap=np("iterator");Po.exports=function(e){if(!rp(e))return yo(e,ap)||yo(e,"@@iterator")||tp[ep(e)]}});var mo=o((um,qo)=>{var ip=T(),op=N(),up=_(),sp=ye(),cp=mt(),lp=TypeError;qo.exports=function(e,r){var t=arguments.length<2?cp(e):r;if(op(t))return up(ip(t,e));throw lp(sp(e)+" is not iterable")}});var xo=o((sm,Io)=>{var vp=T(),So=_(),fp=Ue();Io.exports=function(e,r,t){var n,a;So(e);try{if(n=fp(e,"return"),!n){if(r==="throw")throw t;return t}n=vp(n,e)}catch(u){a=!0,n=u}if(r==="throw")throw t;if(a)throw n;return So(n),t}});var re=o((cm,Ro)=>{var dp=ir(),pp=T(),gp=_(),hp=ye(),yp=fo(),Pp=ct(),bo=ge(),qp=mo(),mp=mt(),To=xo(),Sp=TypeError,sr=i(function(e,r){this.stopped=e,this.result=r},"Result"),Oo=sr.prototype;Ro.exports=function(e,r,t){var n=t&&t.that,a=!!(t&&t.AS_ENTRIES),u=!!(t&&t.IS_RECORD),s=!!(t&&t.IS_ITERATOR),c=!!(t&&t.INTERRUPTED),l=dp(r,n),f,v,h,y,p,P,R,w=i(function(x){return f&&To(f,"normal",x),new sr(!0,x)},"stop"),C=i(function(x){return a?(gp(x),c?l(x[0],x[1],w):l(x[0],x[1])):c?l(x,w):l(x)},"callFn");if(u)f=e.iterator;else if(s)f=e;else{if(v=mp(e),!v)throw Sp(hp(e)+" is not iterable");if(yp(v)){for(h=0,y=Pp(e);y>h;h++)if(p=C(e[h]),p&&bo(Oo,p))return p;return new sr(!1)}f=qp(e,v)}for(P=u?e.next:f.next;!(R=pp(P,f)).done;){try{p=C(R.value)}catch(x){To(f,"throw",x)}if(typeof p=="object"&&p&&bo(Oo,p))return p}return new sr(!1)}});var cr=o((lm,Eo)=>{var Ip=xe(),xp=String;Eo.exports=function(e){if(Ip(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return xp(e)}});var Co=o((vm,wo)=>{var bp=cr();wo.exports=function(e,r){return e===void 0?arguments.length<2?"":r:bp(e)}});var Mo=o(()=>{"use strict";var Tp=E(),Op=ge(),Rp=rr(),lr=tr(),Ep=ft(),Ao=Ie(),St=B(),It=Q(),wp=Ji(),Cp=io(),Ap=re(),Mp=Co(),Np=I(),jp=Np("toStringTag"),vr=Error,_p=[].push,te=i(function(r,t){var n=Op(xt,this),a;lr?a=lr(vr(),n?Rp(this):xt):(a=n?this:Ao(xt),St(a,jp,"Error")),t!==void 0&&St(a,"message",Mp(t)),Cp(a,te,a.stack,1),arguments.length>2&&wp(a,arguments[2]);var u=[];return Ap(r,_p,{that:u}),St(a,"errors",u),a},"AggregateError");lr?lr(te,vr):Ep(te,vr,{name:!0});var xt=te.prototype=Ao(vr.prototype,{constructor:It(1,te),message:It(1,""),name:It(1,"AggregateError")});Tp({global:!0,constructor:!0,arity:2},{AggregateError:te})});var No=o(()=>{Mo()});var _o=o((hm,jo)=>{var Lp=I(),Dp=Ie(),Gp=k().f,bt=Lp("unscopables"),Tt=Array.prototype;Tt[bt]==null&&Gp(Tt,bt,{configurable:!0,value:Dp(null)});jo.exports=function(e){Tt[bt][e]=!0}});var wt=o((ym,Go)=>{"use strict";var Fp=b(),kp=g(),Up=D(),Bp=Ie(),Lo=rr(),Vp=V(),$p=I(),Kp=F(),Et=$p("iterator"),Do=!1,U,Ot,Rt;[].keys&&(Rt=[].keys(),"next"in Rt?(Ot=Lo(Lo(Rt)),Ot!==Object.prototype&&(U=Ot)):Do=!0);var Yp=!Up(U)||Fp(function(){var e={};return U[Et].call(e)!==e});Yp?U={}:Kp&&(U=Bp(U));kp(U[Et])||Vp(U,Et,function(){return this});Go.exports={IteratorPrototype:U,BUGGY_SAFARI_ITERATORS:Do}});var fr=o((Pm,ko)=>{var Hp=k().f,Wp=j(),zp=I(),Fo=zp("toStringTag");ko.exports=function(e,r,t){e&&!t&&(e=e.prototype),e&&!Wp(e,Fo)&&Hp(e,Fo,{configurable:!0,value:r})}});var Bo=o((qm,Uo)=>{"use strict";var Jp=wt().IteratorPrototype,Qp=Ie(),Xp=Q(),Zp=fr(),eg=ee(),rg=i(function(){return this},"returnThis");Uo.exports=function(e,r,t,n){var a=r+" Iterator";return e.prototype=Qp(Jp,{next:Xp(+!n,t)}),Zp(e,a,!1,!0),eg[a]=rg,e}});var At=o((mm,Xo)=>{"use strict";var tg=E(),ng=T(),dr=F(),Jo=rt(),ag=g(),ig=Bo(),Vo=rr(),$o=tr(),og=fr(),ug=B(),Ct=V(),sg=I(),Ko=ee(),Qo=wt(),cg=Jo.PROPER,lg=Jo.CONFIGURABLE,Yo=Qo.IteratorPrototype,pr=Qo.BUGGY_SAFARI_ITERATORS,be=sg("iterator"),Ho="keys",Te="values",Wo="entries",zo=i(function(){return this},"returnThis");Xo.exports=function(e,r,t,n,a,u,s){ig(t,r,n);var c=i(function(C){if(C===a&&y)return y;if(!pr&&C in v)return v[C];switch(C){case Ho:return i(function(){return new t(this,C)},"keys");case Te:return i(function(){return new t(this,C)},"values");case Wo:return i(function(){return new t(this,C)},"entries")}return function(){return new t(this)}},"getIterationMethod"),l=r+" Iterator",f=!1,v=e.prototype,h=v[be]||v["@@iterator"]||a&&v[a],y=!pr&&h||c(a),p=r=="Array"&&v.entries||h,P,R,w;if(p&&(P=Vo(p.call(new e)),P!==Object.prototype&&P.next&&(!dr&&Vo(P)!==Yo&&($o?$o(P,Yo):ag(P[be])||Ct(P,be,zo)),og(P,l,!0,!0),dr&&(Ko[l]=zo))),cg&&a==Te&&h&&h.name!==Te&&(!dr&&lg?ug(v,"name",Te):(f=!0,y=i(function(){return ng(h,this)},"values"))),a)if(R={values:c(Te),keys:u?y:c(Ho),entries:c(Wo)},s)for(w in R)(pr||f||!(w in v))&&Ct(v,w,R[w]);else tg({target:r,proto:!0,forced:pr||f},R);return(!dr||s)&&v[be]!==y&&Ct(v,be,y,{name:a}),Ko[r]=y,R}});var Mt=o((Sm,Zo)=>{Zo.exports=function(e,r){return{value:e,done:r}}});var jt=o((Im,au)=>{"use strict";var vg=X(),Nt=_o(),eu=ee(),tu=me(),fg=k().f,dg=At(),gr=Mt(),pg=F(),gg=A(),nu="Array Iterator",hg=tu.set,yg=tu.getterFor(nu);au.exports=dg(Array,"Array",function(e,r){hg(this,{type:nu,target:vg(e),index:0,kind:r})},function(){var e=yg(this),r=e.target,t=e.kind,n=e.index++;return!r||n>=r.length?(e.target=void 0,gr(void 0,!0)):t=="keys"?gr(n,!1):t=="values"?gr(r[n],!1):gr([n,r[n]],!1)},"values");var ru=eu.Arguments=eu.Array;Nt("keys");Nt("values");Nt("entries");if(!pg&&gg&&ru.name!=="values")try{fg(ru,"name",{value:"values"})}catch{}});var ou=o((xm,iu)=>{"use strict";var Pg=or(),qg=xe();iu.exports=Pg?{}.toString:i(function(){return"[object "+qg(this)+"]"},"toString")});var uu=o(()=>{var mg=or(),Sg=V(),Ig=ou();mg||Sg(Object.prototype,"toString",Ig,{unsafe:!0})});var Oe=o((Om,su)=>{var xg=de();su.exports=typeof process<"u"&&xg(process)=="process"});var vu=o((Rm,lu)=>{var cu=st(),bg=k();lu.exports=function(e,r,t){return t.get&&cu(t.get,r,{getter:!0}),t.set&&cu(t.set,r,{setter:!0}),bg.f(e,r,t)}});var pu=o((Em,du)=>{"use strict";var Tg=G(),Og=vu(),Rg=I(),Eg=A(),fu=Rg("species");du.exports=function(e){var r=Tg(e);Eg&&r&&!r[fu]&&Og(r,fu,{configurable:!0,get:function(){return this}})}});var hu=o((wm,gu)=>{var wg=ge(),Cg=TypeError;gu.exports=function(e,r){if(wg(r,e))return e;throw Cg("Incorrect invocation")}});var Iu=o((Cm,Su)=>{var Ag=S(),Mg=b(),yu=g(),Ng=xe(),jg=G(),_g=Ye(),Pu=i(function(){},"noop"),Lg=[],qu=jg("Reflect","construct"),_t=/^\s*(?:class|function)\b/,Dg=Ag(_t.exec),Gg=!_t.exec(Pu),Re=i(function(r){if(!yu(r))return!1;try{return qu(Pu,Lg,r),!0}catch{return!1}},"isConstructor"),mu=i(function(r){if(!yu(r))return!1;switch(Ng(r)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Gg||!!Dg(_t,_g(r))}catch{return!0}},"isConstructor");mu.sham=!0;Su.exports=!qu||Mg(function(){var e;return Re(Re.call)||!Re(Object)||!Re(function(){e=!0})||e})?mu:Re});var bu=o((Am,xu)=>{var Fg=Iu(),kg=ye(),Ug=TypeError;xu.exports=function(e){if(Fg(e))return e;throw Ug(kg(e)+" is not a constructor")}});var Lt=o((Mm,Ou)=>{var Tu=_(),Bg=bu(),Vg=pe(),$g=I(),Kg=$g("species");Ou.exports=function(e,r){var t=Tu(e).constructor,n;return t===void 0||Vg(n=Tu(t)[Kg])?r:Bg(n)}});var Au=o((Nm,Cu)=>{var Yg=fe(),wu=Function.prototype,Ru=wu.apply,Eu=wu.call;Cu.exports=typeof Reflect=="object"&&Reflect.apply||(Yg?Eu.bind(Ru):function(){return Eu.apply(Ru,arguments)})});var Nu=o((jm,Mu)=>{var Hg=S();Mu.exports=Hg([].slice)});var _u=o((_m,ju)=>{var Wg=TypeError;ju.exports=function(e,r){if(e<r)throw Wg("Not enough arguments");return e}});var Dt=o((Lm,Lu)=>{var zg=he();Lu.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(zg)});var Yt=o((Dm,Ku)=>{var O=q(),Jg=Au(),Qg=ir(),Du=g(),Xg=j(),$u=b(),Gu=ht(),Zg=Nu(),Fu=Pe(),eh=_u(),rh=Dt(),th=Oe(),Vt=O.setImmediate,$t=O.clearImmediate,nh=O.process,Gt=O.Dispatch,ah=O.Function,ku=O.MessageChannel,ih=O.String,Ft=0,Ee={},Uu="onreadystatechange",we,H,kt,Ut;$u(function(){we=O.location});var Kt=i(function(e){if(Xg(Ee,e)){var r=Ee[e];delete Ee[e],r()}},"run"),Bt=i(function(e){return function(){Kt(e)}},"runner"),Bu=i(function(e){Kt(e.data)},"eventListener"),Vu=i(function(e){O.postMessage(ih(e),we.protocol+"//"+we.host)},"globalPostMessageDefer");(!Vt||!$t)&&(Vt=i(function(r){eh(arguments.length,1);var t=Du(r)?r:ah(r),n=Zg(arguments,1);return Ee[++Ft]=function(){Jg(t,void 0,n)},H(Ft),Ft},"setImmediate"),$t=i(function(r){delete Ee[r]},"clearImmediate"),th?H=i(function(e){nh.nextTick(Bt(e))},"defer"):Gt&&Gt.now?H=i(function(e){Gt.now(Bt(e))},"defer"):ku&&!rh?(kt=new ku,Ut=kt.port2,kt.port1.onmessage=Bu,H=Qg(Ut.postMessage,Ut)):O.addEventListener&&Du(O.postMessage)&&!O.importScripts&&we&&we.protocol!=="file:"&&!$u(Vu)?(H=Vu,O.addEventListener("message",Bu,!1)):Uu in Fu("script")?H=i(function(e){Gu.appendChild(Fu("script"))[Uu]=function(){Gu.removeChild(this),Kt(e)}},"defer"):H=i(function(e){setTimeout(Bt(e),0)},"defer"));Ku.exports={set:Vt,clear:$t}});var Ht=o((Gm,Hu)=>{var Yu=i(function(){this.head=null,this.tail=null},"Queue");Yu.prototype={add:function(e){var r={item:e,next:null},t=this.tail;t?t.next=r:this.head=r,this.tail=r},get:function(){var e=this.head;if(e){var r=this.head=e.next;return r===null&&(this.tail=null),e.item}}};Hu.exports=Yu});var zu=o((Fm,Wu)=>{var oh=he();Wu.exports=/ipad|iphone|ipod/i.test(oh)&&typeof Pebble<"u"});var Qu=o((km,Ju)=>{var uh=he();Ju.exports=/web0s(?!.*chrome)/i.test(uh)});var is=o((Um,as)=>{var W=q(),Xu=ir(),sh=$e().f,Wt=Yt().set,ch=Ht(),lh=Dt(),vh=zu(),fh=Qu(),zt=Oe(),Zu=W.MutationObserver||W.WebKitMutationObserver,es=W.document,rs=W.process,hr=W.Promise,ts=sh(W,"queueMicrotask"),Xt=ts&&ts.value,ne,Jt,Qt,yr,ns;Xt||(Ce=new ch,Ae=i(function(){var e,r;for(zt&&(e=rs.domain)&&e.exit();r=Ce.get();)try{r()}catch(t){throw Ce.head&&ne(),t}e&&e.enter()},"flush"),!lh&&!zt&&!fh&&Zu&&es?(Jt=!0,Qt=es.createTextNode(""),new Zu(Ae).observe(Qt,{characterData:!0}),ne=i(function(){Qt.data=Jt=!Jt},"notify")):!vh&&hr&&hr.resolve?(yr=hr.resolve(void 0),yr.constructor=hr,ns=Xu(yr.then,yr),ne=i(function(){ns(Ae)},"notify")):zt?ne=i(function(){rs.nextTick(Ae)},"notify"):(Wt=Xu(Wt,W),ne=i(function(){Wt(Ae)},"notify")),Xt=i(function(e){Ce.head||ne(),Ce.add(e)},"microtask"));var Ce,Ae;as.exports=Xt});var us=o((Bm,os)=>{os.exports=function(e,r){try{arguments.length==1?console.error(e):console.error(e,r)}catch{}}});var ae=o((Vm,ss)=>{ss.exports=function(e){try{return{error:!1,value:e()}}catch(r){return{error:!0,value:r}}}});var z=o(($m,cs)=>{var dh=q();cs.exports=dh.Promise});var Zt=o((Km,ls)=>{ls.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"});var fs=o((Ym,vs)=>{var ph=Zt(),gh=Oe();vs.exports=!ph&&!gh&&typeof window=="object"&&typeof document=="object"});var ie=o((Hm,gs)=>{var hh=q(),Me=z(),yh=g(),Ph=dt(),qh=Ye(),mh=I(),Sh=fs(),Ih=Zt(),xh=F(),en=jr(),ds=Me&&Me.prototype,bh=mh("species"),rn=!1,ps=yh(hh.PromiseRejectionEvent),Th=Ph("Promise",function(){var e=qh(Me),r=e!==String(Me);if(!r&&en===66||xh&&!(ds.catch&&ds.finally))return!0;if(!en||en<51||!/native code/.test(e)){var t=new Me(function(u){u(1)}),n=i(function(u){u(function(){},function(){})},"FakePromise"),a=t.constructor={};if(a[bh]=n,rn=t.then(function(){})instanceof n,!rn)return!0}return!r&&(Sh||Ih)&&!ps});gs.exports={CONSTRUCTOR:Th,REJECTION_EVENT:ps,SUBCLASSING:rn}});var $=o((Wm,ys)=>{"use strict";var hs=N(),Oh=TypeError,Rh=i(function(e){var r,t;this.promise=new e(function(n,a){if(r!==void 0||t!==void 0)throw Oh("Bad Promise constructor");r=n,t=a}),this.resolve=hs(r),this.reject=hs(t)},"PromiseCapability");ys.exports.f=function(e){return new Rh(e)}});var Ls=o(()=>{"use strict";var Eh=E(),wh=F(),Sr=Oe(),K=q(),ce=T(),Ps=V(),qs=tr(),Ch=fr(),Ah=pu(),Mh=N(),mr=g(),Nh=D(),jh=hu(),_h=Lt(),bs=Yt().set,un=is(),Lh=us(),Dh=ae(),Gh=Ht(),Ts=me(),Ir=z(),sn=ie(),Os=$(),xr="Promise",Rs=sn.CONSTRUCTOR,Fh=sn.REJECTION_EVENT,kh=sn.SUBCLASSING,tn=Ts.getterFor(xr),Uh=Ts.set,oe=Ir&&Ir.prototype,J=Ir,Pr=oe,Es=K.TypeError,nn=K.document,cn=K.process,an=Os.f,Bh=an,Vh=!!(nn&&nn.createEvent&&K.dispatchEvent),ws="unhandledrejection",$h="rejectionhandled",ms=0,Cs=1,Kh=2,ln=1,As=2,qr,Ss,Yh,Is,Ms=i(function(e){var r;return Nh(e)&&mr(r=e.then)?r:!1},"isThenable"),Ns=i(function(e,r){var t=r.value,n=r.state==Cs,a=n?e.ok:e.fail,u=e.resolve,s=e.reject,c=e.domain,l,f,v;try{a?(n||(r.rejection===As&&Wh(r),r.rejection=ln),a===!0?l=t:(c&&c.enter(),l=a(t),c&&(c.exit(),v=!0)),l===e.promise?s(Es("Promise-chain cycle")):(f=Ms(l))?ce(f,l,u,s):u(l)):s(t)}catch(h){c&&!v&&c.exit(),s(h)}},"callReaction"),js=i(function(e,r){e.notified||(e.notified=!0,un(function(){for(var t=e.reactions,n;n=t.get();)Ns(n,e);e.notified=!1,r&&!e.rejection&&Hh(e)}))},"notify"),_s=i(function(e,r,t){var n,a;Vh?(n=nn.createEvent("Event"),n.promise=r,n.reason=t,n.initEvent(e,!1,!0),K.dispatchEvent(n)):n={promise:r,reason:t},!Fh&&(a=K["on"+e])?a(n):e===ws&&Lh("Unhandled promise rejection",t)},"dispatchEvent"),Hh=i(function(e){ce(bs,K,function(){var r=e.facade,t=e.value,n=xs(e),a;if(n&&(a=Dh(function(){Sr?cn.emit("unhandledRejection",t,r):_s(ws,r,t)}),e.rejection=Sr||xs(e)?As:ln,a.error))throw a.value})},"onUnhandled"),xs=i(function(e){return e.rejection!==ln&&!e.parent},"isUnhandled"),Wh=i(function(e){ce(bs,K,function(){var r=e.facade;Sr?cn.emit("rejectionHandled",r):_s($h,r,e.value)})},"onHandleUnhandled"),ue=i(function(e,r,t){return function(n){e(r,n,t)}},"bind"),se=i(function(e,r,t){e.done||(e.done=!0,t&&(e=t),e.value=r,e.state=Kh,js(e,!0))},"internalReject"),on=i(function(e,r,t){if(!e.done){e.done=!0,t&&(e=t);try{if(e.facade===r)throw Es("Promise can't be resolved itself");var n=Ms(r);n?un(function(){var a={done:!1};try{ce(n,r,ue(on,a,e),ue(se,a,e))}catch(u){se(a,u,e)}}):(e.value=r,e.state=Cs,js(e,!1))}catch(a){se({done:!1},a,e)}}},"internalResolve");if(Rs&&(J=i(function(r){jh(this,Pr),Mh(r),ce(qr,this);var t=tn(this);try{r(ue(on,t),ue(se,t))}catch(n){se(t,n)}},"Promise"),Pr=J.prototype,qr=i(function(r){Uh(this,{type:xr,done:!1,notified:!1,parent:!1,reactions:new Gh,rejection:!1,state:ms,value:void 0})},"Promise"),qr.prototype=Ps(Pr,"then",i(function(r,t){var n=tn(this),a=an(_h(this,J));return n.parent=!0,a.ok=mr(r)?r:!0,a.fail=mr(t)&&t,a.domain=Sr?cn.domain:void 0,n.state==ms?n.reactions.add(a):un(function(){Ns(a,n)}),a.promise},"then")),Ss=i(function(){var e=new qr,r=tn(e);this.promise=e,this.resolve=ue(on,r),this.reject=ue(se,r)},"OwnPromiseCapability"),Os.f=an=i(function(e){return e===J||e===Yh?new Ss(e):Bh(e)},"newPromiseCapability"),!wh&&mr(Ir)&&oe!==Object.prototype)){Is=oe.then,kh||Ps(oe,"then",i(function(r,t){var n=this;return new J(function(a,u){ce(Is,n,a,u)}).then(r,t)},"then"),{unsafe:!0});try{delete oe.constructor}catch{}qs&&qs(oe,Pr)}Eh({global:!0,constructor:!0,wrap:!0,forced:Rs},{Promise:J});Ch(J,xr,!1,!0);Ah(xr)});var Us=o((Qm,ks)=>{var zh=I(),Gs=zh("iterator"),Fs=!1;try{Ds=0,vn={next:function(){return{done:!!Ds++}},return:function(){Fs=!0}},vn[Gs]=function(){return this},Array.from(vn,function(){throw 2})}catch{}var Ds,vn;ks.exports=function(e,r){if(!r&&!Fs)return!1;var t=!1;try{var n={};n[Gs]=function(){return{next:function(){return{done:t=!0}}}},e(n)}catch{}return t}});var Ne=o((Xm,Bs)=>{var Jh=z(),Qh=Us(),Xh=ie().CONSTRUCTOR;Bs.exports=Xh||!Qh(function(e){Jh.all(e).then(void 0,function(){})})});var Vs=o(()=>{"use strict";var Zh=E(),ey=T(),ry=N(),ty=$(),ny=ae(),ay=re(),iy=Ne();Zh({target:"Promise",stat:!0,forced:iy},{all:i(function(r){var t=this,n=ty.f(t),a=n.resolve,u=n.reject,s=ny(function(){var c=ry(t.resolve),l=[],f=0,v=1;ay(r,function(h){var y=f++,p=!1;v++,ey(c,t,h).then(function(P){p||(p=!0,l[y]=P,--v||a(l))},u)}),--v||a(l)});return s.error&&u(s.value),n.promise},"all")})});var Ks=o(()=>{"use strict";var oy=E(),uy=F(),sy=ie().CONSTRUCTOR,dn=z(),cy=G(),ly=g(),vy=V(),$s=dn&&dn.prototype;oy({target:"Promise",proto:!0,forced:sy,real:!0},{catch:function(e){return this.then(void 0,e)}});!uy&&ly(dn)&&(fn=cy("Promise").prototype.catch,$s.catch!==fn&&vy($s,"catch",fn,{unsafe:!0}));var fn});var Ys=o(()=>{"use strict";var fy=E(),dy=T(),py=N(),gy=$(),hy=ae(),yy=re(),Py=Ne();fy({target:"Promise",stat:!0,forced:Py},{race:i(function(r){var t=this,n=gy.f(t),a=n.reject,u=hy(function(){var s=py(t.resolve);yy(r,function(c){dy(s,t,c).then(n.resolve,a)})});return u.error&&a(u.value),n.promise},"race")})});var Hs=o(()=>{"use strict";var qy=E(),my=T(),Sy=$(),Iy=ie().CONSTRUCTOR;qy({target:"Promise",stat:!0,forced:Iy},{reject:i(function(r){var t=Sy.f(this);return my(t.reject,void 0,r),t.promise},"reject")})});var pn=o((uS,Ws)=>{var xy=_(),by=D(),Ty=$();Ws.exports=function(e,r){if(xy(e),by(r)&&r.constructor===e)return r;var t=Ty.f(e),n=t.resolve;return n(r),t.promise}});var Qs=o(()=>{"use strict";var Oy=E(),Ry=G(),zs=F(),Ey=z(),Js=ie().CONSTRUCTOR,wy=pn(),Cy=Ry("Promise"),Ay=zs&&!Js;Oy({target:"Promise",stat:!0,forced:zs||Js},{resolve:i(function(r){return wy(Ay&&this===Cy?Ey:this,r)},"resolve")})});var Xs=o(()=>{Ls();Vs();Ks();Ys();Hs();Qs()});var Zs=o(()=>{"use strict";var My=E(),Ny=T(),jy=N(),_y=$(),Ly=ae(),Dy=re(),Gy=Ne();My({target:"Promise",stat:!0,forced:Gy},{allSettled:i(function(r){var t=this,n=_y.f(t),a=n.resolve,u=n.reject,s=Ly(function(){var c=jy(t.resolve),l=[],f=0,v=1;Dy(r,function(h){var y=f++,p=!1;v++,Ny(c,t,h).then(function(P){p||(p=!0,l[y]={status:"fulfilled",value:P},--v||a(l))},function(P){p||(p=!0,l[y]={status:"rejected",reason:P},--v||a(l))})}),--v||a(l)});return s.error&&u(s.value),n.promise},"allSettled")})});var rc=o(()=>{"use strict";var Fy=E(),ky=T(),Uy=N(),By=G(),Vy=$(),$y=ae(),Ky=re(),Yy=Ne(),ec="No one promise resolved";Fy({target:"Promise",stat:!0,forced:Yy},{any:i(function(r){var t=this,n=By("AggregateError"),a=Vy.f(t),u=a.resolve,s=a.reject,c=$y(function(){var l=Uy(t.resolve),f=[],v=0,h=1,y=!1;Ky(r,function(p){var P=v++,R=!1;h++,ky(l,t,p).then(function(w){R||y||(y=!0,u(w))},function(w){R||y||(R=!0,f[P]=w,--h||s(new n(f,ec)))})}),--h||s(new n(f,ec))});return c.error&&s(c.value),a.promise},"any")})});var ic=o(()=>{"use strict";var Hy=E(),Wy=F(),br=z(),zy=b(),nc=G(),ac=g(),Jy=Lt(),tc=pn(),Qy=V(),hn=br&&br.prototype,Xy=!!br&&zy(function(){hn.finally.call({then:function(){}},function(){})});Hy({target:"Promise",proto:!0,real:!0,forced:Xy},{finally:function(e){var r=Jy(this,nc("Promise")),t=ac(e);return this.then(t?function(n){return tc(r,e()).then(function(){return n})}:e,t?function(n){return tc(r,e()).then(function(){throw n})}:e)}});!Wy&&ac(br)&&(gn=nc("Promise").prototype.finally,hn.finally!==gn&&Qy(hn,"finally",gn,{unsafe:!0}));var gn});var cc=o((PS,sc)=>{var yn=S(),Zy=Ze(),eP=cr(),rP=Fe(),tP=yn("".charAt),oc=yn("".charCodeAt),nP=yn("".slice),uc=i(function(e){return function(r,t){var n=eP(rP(r)),a=Zy(t),u=n.length,s,c;return a<0||a>=u?e?"":void 0:(s=oc(n,a),s<55296||s>56319||a+1===u||(c=oc(n,a+1))<56320||c>57343?e?tP(n,a):s:e?nP(n,a,a+2):(s-55296<<10)+(c-56320)+65536)}},"createMethod");sc.exports={codeAt:uc(!1),charAt:uc(!0)}});var dc=o(()=>{"use strict";var aP=cc().charAt,iP=cr(),vc=me(),oP=At(),lc=Mt(),fc="String Iterator",uP=vc.set,sP=vc.getterFor(fc);oP(String,"String",function(e){uP(this,{type:fc,string:iP(e),index:0})},i(function(){var r=sP(this),t=r.string,n=r.index,a;return n>=t.length?lc(void 0,!0):(a=aP(t,n),r.index+=a.length,lc(a,!1))},"next"))});var gc=o((SS,pc)=>{var cP=q();pc.exports=cP});var yc=o((IS,hc)=>{No();jt();uu();Xs();Zs();rc();ic();dc();var lP=gc();hc.exports=lP.Promise});var qc=o((xS,Pc)=>{Pc.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}});var Ic=o((bS,Sc)=>{var vP=Pe(),Pn=vP("span").classList,mc=Pn&&Pn.constructor&&Pn.constructor.prototype;Sc.exports=mc===Object.prototype?void 0:mc});var Ec=o(()=>{var xc=q(),Tc=qc(),fP=Ic(),je=jt(),qn=B(),Oc=I(),mn=Oc("iterator"),bc=Oc("toStringTag"),Sn=je.values,Rc=i(function(e,r){if(e){if(e[mn]!==Sn)try{qn(e,mn,Sn)}catch{e[mn]=Sn}if(e[bc]||qn(e,bc,r),Tc[r]){for(var t in je)if(e[t]!==je[t])try{qn(e,t,je[t])}catch{e[t]=je[t]}}}},"handlePrototype");for(Tr in Tc)Rc(xc[Tr]&&xc[Tr].prototype,Tr);var Tr;Rc(fP,"DOMTokenList")});var Cc=o((RS,wc)=>{var dP=yc();Ec();wc.exports=dP});var Mc=o((ES,Ac)=>{var pP=Cc();Ac.exports=pP});var RP={};Bc(RP,{generateLearnCard:()=>_c,getTestCache:()=>bP,getTestIndex:()=>TP,getTestStorage:()=>OP});module.exports=Vc(RP);var wS=Rr(Mc()),CS=require("isomorphic-fetch"),Or=Rr(require("abort-controller/dist/abort-controller.js")),_e=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:void 0;_e&&(typeof _e.AbortController>"u"&&(_e.AbortController=Or.AbortController),typeof _e.AbortSignal>"u"&&(_e.AbortSignal=Or.AbortSignal));var In=i((e,r)=>e.reduce((t,n)=>t!==void 0?t:r(n),void 0),"findFirstResult"),m=i((e,r)=>r==="read"?"get"in(e.read??{}):r==="store"?"upload"in(e.store??{}):r==="index"?"get"in(e.index??{}):r==="cache"?"getIndex"in(e.cache??{}):r==="id"?"did"in(e.id??{}):!1,"pluginImplementsPlane"),d=i((e,r)=>r==="read"?"read"in e:r==="store"?"store"in e:r==="index"?"index"in e:r==="cache"?"cache"in e:r==="id"?"id"in e:!1,"learnCardImplementsPlane"),Nc=i((e,r)=>Object.fromEntries(Object.entries(e).map(([t,n],a)=>[t,r(n,a)])),"mapObject"),le=i(e=>e.status==="fulfilled"&&!!e.value,"isFulfilledAndNotEmpty"),jc=i((e,r)=>[...new Map(e.map(t=>[r instanceof Function?r(t):t[r],t])).values()],"uniqBy");var Le=i((e,r)=>e.reduce((t,n)=>(r in n&&(t[n.name]={name:n.name,displayName:n.displayName,description:n.description}),t),{}),"getPlaneProviders"),xn=i((e,r)=>Nc(r,t=>t.bind(e,e)),"bindLearnCardToFunctionsObject"),gP=i(async(e,r)=>(e.debug?.("Adding plugin",r.name),_c({plugins:[...e.plugins,r],debug:e.debug})),"addPluginToLearnCard"),hP=i(e=>({get:async(r,{cache:t="cache-first"}={})=>{if(e.debug?.("learnCard.read.get",r),!r)return;if(t==="cache-only"&&!d(e,"cache"))throw new Error("Cannot read from cache. Cache Plane is not implemented!");if(d(e,"cache")&&t!=="skip-cache"){let u=await e.cache.getVc(r);if(u)return t==="cache-first"&&d(e,"read")&&e.read.get(r,{cache:"skip-cache"}).then(s=>e.cache.setVc(r,s)),u}let a=(await Promise.allSettled(e.plugins.map(async u=>{if(!m(u,"read"))throw new Error("Plugin is not a Read Plugin");return u.read.get(e,r)}))).find(le)?.value;return a&&d(e,"cache")&&t!=="skip-cache"&&await e.cache.setVc(r,a),a},providers:Le(e.plugins,"read")}),"generateReadPlane"),yP=i(e=>({upload:async(r,t,{cache:n="cache-first"}={})=>{let a=await e.upload(r,t);return n!=="skip-cache"&&d(r,"cache")&&await r.cache.setVc(a,t),a},..."uploadMany"in e?{uploadMany:e.uploadMany}:{},..."uploadEncrypted"in e?{uploadEncrypted:async(r,t,n,{cache:a="cache-first"}={})=>{let u=await e.uploadEncrypted?.(r,t,n);return a!=="skip-cache"&&d(r,"cache")&&await r.cache.setVc(u,t),u}}:{}}),"addCachingToStorePlane"),PP=i(e=>({...e.plugins.reduce((t,n)=>(m(n,"store")&&(t[n.name]=xn(e,yP(n.store))),t),{}),providers:Le(e.plugins,"store")}),"generateStorePlane"),qP=i((e,r)=>({get:async(t,n,{cache:a="cache-first"}={})=>{if(a==="cache-only"&&!d(t,"cache"))throw new Error("Cannot read from cache. Cache Plane is not implemented!");if(d(t,"cache")&&a!=="skip-cache"){let s=await t.cache.getIndex(r,n??{});if(s)return a==="cache-first"&&e.get(t,n,{cache:"skip-cache"}).then(c=>{t.cache.setIndex(r,n??{},c)}),s}let u=await e.get(t,n);return u&&d(t,"cache")&&a!=="skip-cache"&&await t.cache.setIndex(r,n??{},u),u},...e.getPage?{getPage:async(t,n,a,{cache:u="cache-first"}={})=>{if(u==="cache-only"&&!d(t,"cache"))throw new Error("Cannot read from cache. Cache Plane is not implemented!");if(d(t,"cache")&&u!=="skip-cache"){let c=await t.cache.getIndexPage(r,n??{},a);if(c)return u==="cache-first"&&e.getPage?.(t,n,a,{cache:"skip-cache"}).then(l=>{t.cache.setIndexPage(r,n??{},l,a)}),c}let s=await e.getPage?.(t,n,a);return s&&d(t,"cache")&&u!=="skip-cache"&&await t.cache.setIndexPage(r,n??{},s,a),s}}:{},...e.getCount?{getCount:async(t,n,{cache:a="cache-first"}={})=>{if(a==="cache-only"&&!d(t,"cache"))throw new Error("Cannot read from cache. Cache Plane is not implemented!");if(d(t,"cache")&&a!=="skip-cache"){let s=await t.cache.getIndexCount?.(r,n??{});if(s)return a==="cache-first"&&e.getCount?.(t,n,{cache:"skip-cache"}).then(c=>t.cache.setIndexCount?.(r,n??{},c)),s}let u=await e.getCount?.(t,n);return u&&d(t,"cache")&&a!=="skip-cache"&&await t.cache.setIndexCount?.(r,n??{},u),u}}:{},add:async(t,n,{cache:a="cache-first"}={})=>{let u=await e.add(t,n);return a!=="skip-cache"&&d(t,"cache")&&await t.cache.flushIndex(),u},...e.addMany?{addMany:async(t,n,{cache:a="cache-first"}={})=>{let u=await e.addMany?.(t,n);return a!=="skip-cache"&&d(t,"cache")&&await t.cache.flushIndex(),u}}:{},update:async(t,n,a,{cache:u="cache-first"}={})=>{let s=await e.update(t,n,a);return u!=="skip-cache"&&d(t,"cache")&&await t.cache.flushIndex(),s},remove:async(t,n,{cache:a="cache-first"}={})=>{let u=await e.remove(t,n);return a!=="skip-cache"&&d(t,"cache")&&await t.cache.flushIndex(),u},...e.removeAll?{removeAll:async(t,{cache:n="cache-first"}={})=>{let a=await e.removeAll?.(t);return n!=="skip-cache"&&d(t,"cache")&&await t.cache.flushIndex(),a}}:{}}),"addCachingToIndexPlane"),mP=i(e=>({...e.plugins.reduce((n,a)=>(m(a,"index")&&(n[a.name]=xn(e,qP(a.index,a.name))),n),{}),all:{get:async(n,{cache:a="cache-first"}={})=>{if(e.debug?.("learnCard.index.all.get"),a==="cache-only"&&!d(e,"cache"))throw new Error("Cannot read from cache. Cache Plane is not implemented!");if(d(e,"cache")&&a!=="skip-cache"){let c=await e.cache.getIndex("all",n??{});if(c)return a==="cache-first"&&d(e,"index")&&e.index.all.get(n,{cache:"skip-cache"}).then(l=>e.cache.setIndex("all",n??{},l)),c}let u=(await Promise.all(e.plugins.map(async c=>m(c,"index")?c.index.get(e,n):[]))).flat(),s=jc(u,"id");return s&&d(e,"cache")&&a!=="skip-cache"&&await e.cache.setIndex("all",n??{},s),s}},providers:Le(e.plugins,"index")}),"generateIndexPlane"),SP=i(e=>({getIndex:async(r,t)=>{e.debug?.("learnCard.cache.getIndex");try{return(await Promise.allSettled(e.plugins.map(async u=>{if(!m(u,"cache"))throw new Error("Plugin is not a Cache Plugin");return u.cache.getIndex(e,r,t)}))).find(le)?.value}catch{return}},setIndex:async(r,t,n)=>(e.debug?.("learnCard.cache.setIndex"),(await Promise.allSettled(e.plugins.map(async u=>{if(!m(u,"cache"))throw new Error("Plugin is not a Cache Plugin");return u.cache.setIndex(e,r,t,n)}))).some(u=>u.status==="fulfilled")),getIndexPage:async(r,t,n)=>{e.debug?.("learnCard.cache.getIndex");try{return(await Promise.allSettled(e.plugins.map(async s=>{if(!m(s,"cache"))throw new Error("Plugin is not a Cache Plugin");return s.cache.getIndexPage(e,r,t,n)}))).find(le)?.value}catch{return}},setIndexPage:async(r,t,n,a)=>(e.debug?.("learnCard.cache.setIndex"),(await Promise.allSettled(e.plugins.map(async s=>{if(!m(s,"cache"))throw new Error("Plugin is not a Cache Plugin");return s.cache.setIndexPage(e,r,t,n,a)}))).some(s=>s.status==="fulfilled")),getIndexCount:async(r,t)=>{e.debug?.("learnCard.cache.getIndex");try{return(await Promise.allSettled(e.plugins.map(async u=>{if(!m(u,"cache"))throw new Error("Plugin is not a Cache Plugin");return u.cache.getIndexCount?.(e,r,t)}))).find(le)?.value}catch{return}},setIndexCount:async(r,t,n)=>(e.debug?.("learnCard.cache.setIndex"),(await Promise.allSettled(e.plugins.map(async u=>{if(!m(u,"cache"))throw new Error("Plugin is not a Cache Plugin");return u.cache.setIndexCount?.(e,r,t,n)}))).some(u=>u.status==="fulfilled")),flushIndex:async()=>(e.debug?.("learnCard.cache.flushIndex"),(await Promise.allSettled(e.plugins.map(async t=>{if(!m(t,"cache"))throw new Error("Plugin is not a Cache Plugin");return t.cache.flushIndex(e)}))).some(t=>t.status==="fulfilled")),getVc:async r=>{e.debug?.("learnCard.cache.getVc");try{return(await Promise.allSettled(e.plugins.map(async a=>{if(!m(a,"cache"))throw new Error("Plugin is not a Cache Plugin");return a.cache.getVc(e,r)}))).find(le)?.value}catch{return}},setVc:async(r,t)=>(e.debug?.("learnCard.cache.setVc"),(await Promise.allSettled(e.plugins.map(async a=>{if(!m(a,"cache"))throw new Error("Plugin is not a Cache Plugin");return a.cache.setVc(e,r,t)}))).some(a=>a.status==="fulfilled")),flushVc:async()=>(e.debug?.("learnCard.cache.flushVc"),(await Promise.allSettled(e.plugins.map(async t=>{if(!m(t,"cache"))throw new Error("Plugin is not a Cache Plugin");return t.cache.flushVc(e)}))).some(t=>t.status==="fulfilled")),providers:Le(e.plugins,"cache")}),"generateCachePlane"),IP=i(e=>({did:r=>{e.debug?.("learnCard.id.did",r);let t=In([...e.plugins].reverse(),n=>{try{return m(n,"id")?n.id.did(e,r):void 0}catch{return}});if(!t)throw new Error(`No plugin supports did method ${r}`);return t},keypair:r=>{e.debug?.("learnCard.id.keypair",r);let t=In(e.plugins,n=>{try{return m(n,"id")?n.id.keypair(e,r):void 0}catch{return}});if(!t)throw new Error(`No plugin supports keypair type ${r}`);return t},providers:Le(e.plugins,"id")}),"generateIdPlane"),xP=i((e,r)=>xn(e,r),"bindMethods"),_c=i(async(e={})=>{let{plugins:r=[]}=e,t=r.reduce((a,u)=>({...a,...u.methods}),{}),n={read:{},store:{},index:{},cache:{},id:{},plugins:r,invoke:t,addPlugin:function(a){return gP(this,a)},debug:e.debug};return n.read=hP(n),n.store=PP(n),n.index=mP(n),n.cache=SP(n),n.id=IP(n),t&&(n.invoke=xP(n,t)),n},"generateLearnCard");var Lc=Rr(require("isomorphic-webcrypto"));typeof window>"u"&&!globalThis.crypto&&(globalThis.crypto=Lc.default);var bP=i(()=>{let e={},r={},t={};return{name:"Test Cache",displayName:"Test Cache",description:"[Testing] Tests Caching Implementation",cache:{getIndex:async(n,a,u)=>(n.debug?.("Test Cache, getIndex",{name:a,query:u,value:e}),e[a]),setIndex:async(n,a,u,s)=>(n.debug?.("Test Cache, setIndex",{name:a,query:u,value:s}),e[a]=s,!0),getIndexPage:async(n,a,u,s)=>(n.debug?.("Test Cache, getIndex",{name:a,query:u,paginationOptions:s,value:e}),r[a]),setIndexPage:async(n,a,u,s,c)=>(n.debug?.("Test Cache, setIndex",{name:a,query:u,paginationOptions:c,value:s}),r[a]=s,!0),flushIndex:async n=>(n.debug?.("Test Cache, flushIndex"),e={},!0),getVc:async(n,a)=>(n.debug?.("Test Cache, getVc",{uri:a,value:t[a]}),t[a]),setVc:async(n,a,u)=>(n.debug?.("Test Cache, setVc",{uri:a,value:u}),t[a]=u,!0),flushVc:async n=>(n.debug?.("Test Cache, flushVc"),t={},!0)},methods:{}}},"getTestCache");var TP=i(()=>{let e=[];return{name:"Test Index",displayName:"Test Index",description:"[Testing] Tests Index Implementations",index:{get:async(r,t)=>(r.debug?.("Test Storage, index, get",{query:t}),e),add:async(r,t)=>(r.debug?.("Test Storage, index, add",{record:t}),e.push(t),!0),update:async()=>!1,remove:async(r,t)=>{r.debug?.("Test Storage, index, remove",{id:t});let n=e.findIndex(a=>a.id===t);return e.splice(n,1),!0}},methods:{}}},"getTestIndex");var OP=i(()=>{let e=[],r=[];return{name:"Test Storage",displayName:"Test Storage",description:"[Testing] Tests Storage Implementations",read:{get:async(t,n)=>{if(t.debug?.("Test Storage, read, get",{uri:n}),!n)return;let[a,u,s]=n.split(":");if(u==="test")return r[Number.parseInt(s)]}},store:{upload:async(t,n)=>{t.debug?.("Test Storage, store, upload",{vc:n});let a=r.length;return r.push(n),`lc:test:${a}`}},index:{get:async(t,n)=>(t.debug?.("Test Storage, index, get",{query:n}),e),add:async(t,n)=>(t.debug?.("Test Storage, index, add",{record:n}),e.push(n),!0),update:async()=>!1,remove:async(t,n)=>{t.debug?.("Test Storage, index, remove",{id:n});let a=e.findIndex(u=>u.id===n);return e.splice(a,1),!0}},methods:{}}},"getTestStorage");
|
949
2
|
//# sourceMappingURL=core.cjs.production.min.js.map
|