@timeback/sdk 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/README.md +91 -2
  2. package/dist/chunk-07j8zre9.js +2 -0
  3. package/dist/chunk-3886xy48.js +8 -0
  4. package/dist/chunk-9se82640.js +1 -0
  5. package/dist/chunk-ahy54f2r.js +2 -0
  6. package/dist/chunk-ewsp6v3b.js +16 -0
  7. package/dist/chunk-j1xdrfqj.js +2 -0
  8. package/dist/chunk-qaa129bd.js +2 -0
  9. package/dist/chunk-qr0bbnsr.js +1 -0
  10. package/dist/chunk-rgbpvxbv.js +1 -0
  11. package/dist/chunk-whc53e0y.js +11 -0
  12. package/dist/client/adapters/react/hooks/types.d.ts +46 -0
  13. package/dist/client/adapters/react/hooks/types.d.ts.map +1 -1
  14. package/dist/client/adapters/react/hooks/useTimebackProfile.d.ts +42 -0
  15. package/dist/client/adapters/react/hooks/useTimebackProfile.d.ts.map +1 -0
  16. package/dist/client/adapters/react/index.d.ts +2 -1
  17. package/dist/client/adapters/react/index.d.ts.map +1 -1
  18. package/dist/client/adapters/react/index.js +2 -494
  19. package/dist/client/adapters/solid/index.d.ts +3 -0
  20. package/dist/client/adapters/solid/index.d.ts.map +1 -1
  21. package/dist/client/adapters/solid/index.ts +12 -0
  22. package/dist/client/adapters/solid/primitives/createTimebackProfile.d.ts +58 -0
  23. package/dist/client/adapters/solid/primitives/createTimebackProfile.d.ts.map +1 -0
  24. package/dist/client/adapters/solid/primitives/createTimebackProfile.ts +209 -0
  25. package/dist/client/adapters/solid/primitives/createTimebackVerification.d.ts +36 -0
  26. package/dist/client/adapters/solid/primitives/createTimebackVerification.d.ts.map +1 -0
  27. package/dist/client/adapters/solid/primitives/createTimebackVerification.ts +133 -0
  28. package/dist/client/adapters/solid/types.d.ts +86 -0
  29. package/dist/client/adapters/solid/types.d.ts.map +1 -0
  30. package/dist/client/adapters/solid/types.ts +85 -0
  31. package/dist/client/adapters/svelte/index.d.ts +2 -1
  32. package/dist/client/adapters/svelte/index.d.ts.map +1 -1
  33. package/dist/client/adapters/svelte/index.ts +11 -2
  34. package/dist/client/adapters/svelte/{stores.d.ts → stores/client.d.ts} +11 -9
  35. package/dist/client/adapters/svelte/stores/client.d.ts.map +1 -0
  36. package/dist/client/adapters/svelte/{stores.ts → stores/client.ts} +24 -52
  37. package/dist/client/adapters/svelte/stores/index.d.ts +10 -0
  38. package/dist/client/adapters/svelte/stores/index.d.ts.map +1 -0
  39. package/dist/client/adapters/svelte/stores/index.ts +22 -0
  40. package/dist/client/adapters/svelte/stores/profile.d.ts +66 -0
  41. package/dist/client/adapters/svelte/stores/profile.d.ts.map +1 -0
  42. package/dist/client/adapters/svelte/stores/profile.ts +168 -0
  43. package/dist/client/adapters/svelte/stores/verification.d.ts +43 -0
  44. package/dist/client/adapters/svelte/stores/verification.d.ts.map +1 -0
  45. package/dist/client/adapters/svelte/stores/verification.ts +126 -0
  46. package/dist/client/adapters/svelte/types.d.ts +35 -0
  47. package/dist/client/adapters/svelte/types.d.ts.map +1 -0
  48. package/dist/client/adapters/vue/composables/useTimebackProfile.d.ts +51 -0
  49. package/dist/client/adapters/vue/composables/useTimebackProfile.d.ts.map +1 -0
  50. package/dist/client/adapters/vue/composables/useTimebackProfile.ts +186 -0
  51. package/dist/client/adapters/vue/composables/useTimebackVerification.d.ts +44 -0
  52. package/dist/client/adapters/vue/composables/useTimebackVerification.d.ts.map +1 -0
  53. package/dist/client/adapters/vue/composables/useTimebackVerification.ts +128 -0
  54. package/dist/client/adapters/vue/index.d.ts +3 -0
  55. package/dist/client/adapters/vue/index.d.ts.map +1 -1
  56. package/dist/client/adapters/vue/index.ts +12 -1
  57. package/dist/client/adapters/vue/types.d.ts +86 -0
  58. package/dist/client/adapters/vue/types.d.ts.map +1 -0
  59. package/dist/client/adapters/vue/types.ts +85 -0
  60. package/dist/client/lib/activity/activity.class.d.ts +5 -5
  61. package/dist/client/lib/activity/activity.class.d.ts.map +1 -1
  62. package/dist/client/lib/user-cache.d.ts +39 -0
  63. package/dist/client/lib/user-cache.d.ts.map +1 -0
  64. package/dist/client/lib/user-cache.ts +168 -0
  65. package/dist/client/namespaces/activity.d.ts +2 -3
  66. package/dist/client/namespaces/activity.d.ts.map +1 -1
  67. package/dist/client.d.ts +1 -1
  68. package/dist/client.js +1 -257
  69. package/dist/edge.js +1 -86271
  70. package/dist/identity.js +1 -86131
  71. package/dist/index.js +22 -104883
  72. package/dist/server/adapters/express.js +1 -85973
  73. package/dist/server/adapters/native.js +2 -221
  74. package/dist/server/adapters/nextjs.js +1 -233
  75. package/dist/server/adapters/nuxt.js +1 -86046
  76. package/dist/server/adapters/solid-start.js +1 -85945
  77. package/dist/server/adapters/svelte-kit.js +1 -279
  78. package/dist/server/adapters/tanstack-start.js +1 -85918
  79. package/dist/server/handlers/activity/attempts.d.ts +51 -0
  80. package/dist/server/handlers/activity/attempts.d.ts.map +1 -0
  81. package/dist/server/handlers/activity/caliper.d.ts +46 -5
  82. package/dist/server/handlers/activity/caliper.d.ts.map +1 -1
  83. package/dist/server/handlers/activity/completion.d.ts +43 -0
  84. package/dist/server/handlers/activity/completion.d.ts.map +1 -0
  85. package/dist/server/handlers/activity/handler.d.ts +18 -1
  86. package/dist/server/handlers/activity/handler.d.ts.map +1 -1
  87. package/dist/server/handlers/activity/progress.d.ts +47 -0
  88. package/dist/server/handlers/activity/progress.d.ts.map +1 -0
  89. package/dist/server/handlers/activity/schema.d.ts +1 -2
  90. package/dist/server/handlers/activity/schema.d.ts.map +1 -1
  91. package/dist/server/handlers/activity/types.d.ts +1 -2
  92. package/dist/server/handlers/activity/types.d.ts.map +1 -1
  93. package/dist/server/lib/index.d.ts +1 -1
  94. package/dist/server/lib/index.d.ts.map +1 -1
  95. package/dist/server/lib/utils.d.ts +61 -0
  96. package/dist/server/lib/utils.d.ts.map +1 -1
  97. package/dist/server/timeback.d.ts.map +1 -1
  98. package/dist/server/types.d.ts +7 -1
  99. package/dist/server/types.d.ts.map +1 -1
  100. package/dist/shared/constants.d.ts +6 -0
  101. package/dist/shared/constants.d.ts.map +1 -1
  102. package/dist/shared/types.d.ts +62 -8
  103. package/dist/shared/types.d.ts.map +1 -1
  104. package/dist/shared/xp-calculator.d.ts +25 -0
  105. package/dist/shared/xp-calculator.d.ts.map +1 -0
  106. package/package.json +4 -2
  107. package/dist/client/adapters/svelte/stores.d.ts.map +0 -1
  108. package/dist/server/handlers/activity/gradebook.d.ts +0 -56
  109. package/dist/server/handlers/activity/gradebook.d.ts.map +0 -1
@@ -0,0 +1,8 @@
1
+ import{d as uQ,e as h0,f as rY,g as cX,h as pX,i as eX,j as YJ,k as JJ}from"./chunk-whc53e0y.js";var HU={};cX(HU,{transcode:()=>pY,resolveObjectURL:()=>yY,kStringMaxLength:()=>qZ,kMaxLength:()=>iU,isUtf8:()=>fY,isAscii:()=>cY,default:()=>hY,constants:()=>$Y,btoa:()=>VY,atob:()=>GY,INSPECT_MAX_BYTES:()=>RZ,File:()=>KY,Buffer:()=>I0,Blob:()=>IY});function XY(K){var W=K.length;if(W%4>0)throw Error("Invalid string. Length must be a multiple of 4");var H=K.indexOf("=");if(H===-1)H=W;var T=H===W?0:4-H%4;return[H,T]}function ZY(K,W){return(K+W)*3/4-W}function QY(K){var W,H=XY(K),T=H[0],O=H[1],L=new Uint8Array(ZY(T,O)),V=0,P=O>0?T-4:T,S;for(S=0;S<P;S+=4)W=PU[K.charCodeAt(S)]<<18|PU[K.charCodeAt(S+1)]<<12|PU[K.charCodeAt(S+2)]<<6|PU[K.charCodeAt(S+3)],L[V++]=W>>16&255,L[V++]=W>>8&255,L[V++]=W&255;if(O===2)W=PU[K.charCodeAt(S)]<<2|PU[K.charCodeAt(S+1)]>>4,L[V++]=W&255;if(O===1)W=PU[K.charCodeAt(S)]<<10|PU[K.charCodeAt(S+1)]<<4|PU[K.charCodeAt(S+2)]>>2,L[V++]=W>>8&255,L[V++]=W&255;return L}function YY(K){return jU[K>>18&63]+jU[K>>12&63]+jU[K>>6&63]+jU[K&63]}function JY(K,W,H){var T,O=[];for(var L=W;L<H;L+=3)T=(K[L]<<16&16711680)+(K[L+1]<<8&65280)+(K[L+2]&255),O.push(YY(T));return O.join("")}function TZ(K){var W,H=K.length,T=H%3,O=[],L=16383;for(var V=0,P=H-T;V<P;V+=L)O.push(JY(K,V,V+L>P?P:V+L));if(T===1)W=K[H-1],O.push(jU[W>>2]+jU[W<<4&63]+"==");else if(T===2)W=(K[H-2]<<8)+K[H-1],O.push(jU[W>>10]+jU[W>>4&63]+jU[W<<2&63]+"=");return O.join("")}function OX(K,W,H,T,O){var L,V,P=O*8-T-1,S=(1<<P)-1,M=S>>1,z=-7,A=H?O-1:0,D=H?-1:1,R=K[W+A];A+=D,L=R&(1<<-z)-1,R>>=-z,z+=P;for(;z>0;L=L*256+K[W+A],A+=D,z-=8);V=L&(1<<-z)-1,L>>=-z,z+=T;for(;z>0;V=V*256+K[W+A],A+=D,z-=8);if(L===0)L=1-M;else if(L===S)return V?NaN:(R?-1:1)*(1/0);else V=V+Math.pow(2,T),L=L-M;return(R?-1:1)*V*Math.pow(2,L-T)}function EZ(K,W,H,T,O,L){var V,P,S,M=L*8-O-1,z=(1<<M)-1,A=z>>1,D=O===23?Math.pow(2,-24)-Math.pow(2,-77):0,R=T?0:L-1,q=T?1:-1,v=W<0||W===0&&1/W<0?1:0;if(W=Math.abs(W),isNaN(W)||W===1/0)P=isNaN(W)?1:0,V=z;else{if(V=Math.floor(Math.log(W)/Math.LN2),W*(S=Math.pow(2,-V))<1)V--,S*=2;if(V+A>=1)W+=D/S;else W+=D*Math.pow(2,1-A);if(W*S>=2)V++,S/=2;if(V+A>=z)P=0,V=z;else if(V+A>=1)P=(W*S-1)*Math.pow(2,O),V=V+A;else P=W*Math.pow(2,A-1)*Math.pow(2,O),V=0}for(;O>=8;K[H+R]=P&255,R+=q,P/=256,O-=8);V=V<<O|P,M+=O;for(;M>0;K[H+R]=V&255,R+=q,V/=256,M-=8);K[H+R-q]|=v*128}function xU(K){if(K>iU)throw RangeError('The value "'+K+'" is invalid for option "size"');let W=new Uint8Array(K);return Object.setPrototypeOf(W,I0.prototype),W}function hX(K,W,H){return class extends H{constructor(){super();Object.defineProperty(this,"message",{value:W.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${K}]`,this.stack,delete this.name}get code(){return K}set code(T){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:T,writable:!0})}toString(){return`${this.name} [${K}]: ${this.message}`}}}function I0(K,W,H){if(typeof K==="number"){if(typeof W==="string")throw TypeError('The "string" argument must be of type string. Received type number');return uX(K)}return SZ(K,W,H)}function SZ(K,W,H){if(typeof K==="string")return OY(K,W);if(ArrayBuffer.isView(K))return AY(K);if(K==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof K);if(vU(K,ArrayBuffer)||K&&vU(K.buffer,ArrayBuffer))return yX(K,W,H);if(typeof SharedArrayBuffer<"u"&&(vU(K,SharedArrayBuffer)||K&&vU(K.buffer,SharedArrayBuffer)))return yX(K,W,H);if(typeof K==="number")throw TypeError('The "value" argument must not be of type number. Received type number');let T=K.valueOf&&K.valueOf();if(T!=null&&T!==K)return I0.from(T,W,H);let O=CY(K);if(O)return O;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof K[Symbol.toPrimitive]==="function")return I0.from(K[Symbol.toPrimitive]("string"),W,H);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof K)}function PZ(K){if(typeof K!=="number")throw TypeError('"size" argument must be of type number');else if(K<0)throw RangeError('The value "'+K+'" is invalid for option "size"')}function HY(K,W,H){if(PZ(K),K<=0)return xU(K);if(W!==void 0)return typeof H==="string"?xU(K).fill(W,H):xU(K).fill(W);return xU(K)}function uX(K){return PZ(K),xU(K<0?0:bX(K)|0)}function OY(K,W){if(typeof W!=="string"||W==="")W="utf8";if(!I0.isEncoding(W))throw TypeError("Unknown encoding: "+W);let H=kZ(K,W)|0,T=xU(H),O=T.write(K,W);if(O!==H)T=T.slice(0,O);return T}function wX(K){let W=K.length<0?0:bX(K.length)|0,H=xU(W);for(let T=0;T<W;T+=1)H[T]=K[T]&255;return H}function AY(K){if(vU(K,Uint8Array)){let W=new Uint8Array(K);return yX(W.buffer,W.byteOffset,W.byteLength)}return wX(K)}function yX(K,W,H){if(W<0||K.byteLength<W)throw RangeError('"offset" is outside of buffer bounds');if(K.byteLength<W+(H||0))throw RangeError('"length" is outside of buffer bounds');let T;if(W===void 0&&H===void 0)T=new Uint8Array(K);else if(H===void 0)T=new Uint8Array(K,W);else T=new Uint8Array(K,W,H);return Object.setPrototypeOf(T,I0.prototype),T}function CY(K){if(I0.isBuffer(K)){let W=bX(K.length)|0,H=xU(W);if(H.length===0)return H;return K.copy(H,0,0,W),H}if(K.length!==void 0){if(typeof K.length!=="number"||Number.isNaN(K.length))return xU(0);return wX(K)}if(K.type==="Buffer"&&Array.isArray(K.data))return wX(K.data)}function bX(K){if(K>=iU)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+iU.toString(16)+" bytes");return K|0}function kZ(K,W){if(I0.isBuffer(K))return K.length;if(ArrayBuffer.isView(K)||vU(K,ArrayBuffer))return K.byteLength;if(typeof K!=="string")throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof K);let H=K.length,T=arguments.length>2&&arguments[2]===!0;if(!T&&H===0)return 0;let O=!1;for(;;)switch(W){case"ascii":case"latin1":case"binary":return H;case"utf8":case"utf-8":return fX(K).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return H*2;case"hex":return H>>>1;case"base64":return yZ(K).length;default:if(O)return T?-1:fX(K).length;W=(""+W).toLowerCase(),O=!0}}function TY(K,W,H){let T=!1;if(W===void 0||W<0)W=0;if(W>this.length)return"";if(H===void 0||H>this.length)H=this.length;if(H<=0)return"";if(H>>>=0,W>>>=0,H<=W)return"";if(!K)K="utf8";while(!0)switch(K){case"hex":return kY(this,W,H);case"utf8":case"utf-8":return vZ(this,W,H);case"ascii":return SY(this,W,H);case"latin1":case"binary":return PY(this,W,H);case"base64":return RY(this,W,H);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return jY(this,W,H);default:if(T)throw TypeError("Unknown encoding: "+K);K=(K+"").toLowerCase(),T=!0}}function dU(K,W,H){let T=K[W];K[W]=K[H],K[H]=T}function jZ(K,W,H,T,O){if(K.length===0)return-1;if(typeof H==="string")T=H,H=0;else if(H>2147483647)H=2147483647;else if(H<-2147483648)H=-2147483648;if(H=+H,Number.isNaN(H))H=O?0:K.length-1;if(H<0)H=K.length+H;if(H>=K.length)if(O)return-1;else H=K.length-1;else if(H<0)if(O)H=0;else return-1;if(typeof W==="string")W=I0.from(W,T);if(I0.isBuffer(W)){if(W.length===0)return-1;return zZ(K,W,H,T,O)}else if(typeof W==="number"){if(W=W&255,typeof Uint8Array.prototype.indexOf==="function")if(O)return Uint8Array.prototype.indexOf.call(K,W,H);else return Uint8Array.prototype.lastIndexOf.call(K,W,H);return zZ(K,[W],H,T,O)}throw TypeError("val must be string, number or Buffer")}function zZ(K,W,H,T,O){let L=1,V=K.length,P=W.length;if(T!==void 0){if(T=String(T).toLowerCase(),T==="ucs2"||T==="ucs-2"||T==="utf16le"||T==="utf-16le"){if(K.length<2||W.length<2)return-1;L=2,V/=2,P/=2,H/=2}}function S(z,A){if(L===1)return z[A];else return z.readUInt16BE(A*L)}let M;if(O){let z=-1;for(M=H;M<V;M++)if(S(K,M)===S(W,z===-1?0:M-z)){if(z===-1)z=M;if(M-z+1===P)return z*L}else{if(z!==-1)M-=M-z;z=-1}}else{if(H+P>V)H=V-P;for(M=H;M>=0;M--){let z=!0;for(let A=0;A<P;A++)if(S(K,M+A)!==S(W,A)){z=!1;break}if(z)return M}}return-1}function DY(K,W,H,T){H=Number(H)||0;let O=K.length-H;if(!T)T=O;else if(T=Number(T),T>O)T=O;let L=W.length;if(T>L/2)T=L/2;let V;for(V=0;V<T;++V){let P=parseInt(W.substr(V*2,2),16);if(Number.isNaN(P))return V;K[H+V]=P}return V}function zY(K,W,H,T){return AX(fX(W,K.length-H),K,H,T)}function MY(K,W,H,T){return AX(xY(W),K,H,T)}function LY(K,W,H,T){return AX(yZ(W),K,H,T)}function EY(K,W,H,T){return AX(NY(W,K.length-H),K,H,T)}function RY(K,W,H){if(W===0&&H===K.length)return TZ(K);else return TZ(K.slice(W,H))}function vZ(K,W,H){H=Math.min(K.length,H);let T=[],O=W;while(O<H){let L=K[O],V=null,P=L>239?4:L>223?3:L>191?2:1;if(O+P<=H){let S,M,z,A;switch(P){case 1:if(L<128)V=L;break;case 2:if(S=K[O+1],(S&192)===128){if(A=(L&31)<<6|S&63,A>127)V=A}break;case 3:if(S=K[O+1],M=K[O+2],(S&192)===128&&(M&192)===128){if(A=(L&15)<<12|(S&63)<<6|M&63,A>2047&&(A<55296||A>57343))V=A}break;case 4:if(S=K[O+1],M=K[O+2],z=K[O+3],(S&192)===128&&(M&192)===128&&(z&192)===128){if(A=(L&15)<<18|(S&63)<<12|(M&63)<<6|z&63,A>65535&&A<1114112)V=A}}}if(V===null)V=65533,P=1;else if(V>65535)V-=65536,T.push(V>>>10&1023|55296),V=56320|V&1023;T.push(V),O+=P}return qY(T)}function qY(K){let W=K.length;if(W<=MZ)return String.fromCharCode.apply(String,K);let H="",T=0;while(T<W)H+=String.fromCharCode.apply(String,K.slice(T,T+=MZ));return H}function SY(K,W,H){let T="";H=Math.min(K.length,H);for(let O=W;O<H;++O)T+=String.fromCharCode(K[O]&127);return T}function PY(K,W,H){let T="";H=Math.min(K.length,H);for(let O=W;O<H;++O)T+=String.fromCharCode(K[O]);return T}function kY(K,W,H){let T=K.length;if(!W||W<0)W=0;if(!H||H<0||H>T)H=T;let O="";for(let L=W;L<H;++L)O+=gY[K[L]];return O}function jY(K,W,H){let T=K.slice(W,H),O="";for(let L=0;L<T.length-1;L+=2)O+=String.fromCharCode(T[L]+T[L+1]*256);return O}function FU(K,W,H){if(K%1!==0||K<0)throw RangeError("offset is not uint");if(K+W>H)throw RangeError("Trying to access beyond buffer length")}function LU(K,W,H,T,O,L){if(!I0.isBuffer(K))throw TypeError('"buffer" argument must be a Buffer instance');if(W>O||W<L)throw RangeError('"value" argument is out of bounds');if(H+T>K.length)throw RangeError("Index out of range")}function _Z(K,W,H,T,O){wZ(W,T,O,K,H,7);let L=Number(W&BigInt(4294967295));K[H++]=L,L=L>>8,K[H++]=L,L=L>>8,K[H++]=L,L=L>>8,K[H++]=L;let V=Number(W>>BigInt(32)&BigInt(4294967295));return K[H++]=V,V=V>>8,K[H++]=V,V=V>>8,K[H++]=V,V=V>>8,K[H++]=V,H}function BZ(K,W,H,T,O){wZ(W,T,O,K,H,7);let L=Number(W&BigInt(4294967295));K[H+7]=L,L=L>>8,K[H+6]=L,L=L>>8,K[H+5]=L,L=L>>8,K[H+4]=L;let V=Number(W>>BigInt(32)&BigInt(4294967295));return K[H+3]=V,V=V>>8,K[H+2]=V,V=V>>8,K[H+1]=V,V=V>>8,K[H]=V,H+8}function xZ(K,W,H,T,O,L){if(H+T>K.length)throw RangeError("Index out of range");if(H<0)throw RangeError("Index out of range")}function NZ(K,W,H,T,O){if(W=+W,H=H>>>0,!O)xZ(K,W,H,4,340282346638528860000000000000000000000,-340282346638528860000000000000000000000);return EZ(K,W,H,T,23,4),H+4}function gZ(K,W,H,T,O){if(W=+W,H=H>>>0,!O)xZ(K,W,H,8,179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000);return EZ(K,W,H,T,52,8),H+8}function LZ(K){let W="",H=K.length,T=K[0]==="-"?1:0;for(;H>=T+4;H-=3)W=`_${K.slice(H-3,H)}${W}`;return`${K.slice(0,H)}${W}`}function vY(K,W,H){if(tU(W,"offset"),K[W]===void 0||K[W+H]===void 0)UX(W,K.length-(H+1))}function wZ(K,W,H,T,O,L){if(K>H||K<W){let V=typeof W==="bigint"?"n":"",P;if(L>3)if(W===0||W===BigInt(0))P=`>= 0${V} and < 2${V} ** ${(L+1)*8}${V}`;else P=`>= -(2${V} ** ${(L+1)*8-1}${V}) and < 2 ** ${(L+1)*8-1}${V}`;else P=`>= ${W}${V} and <= ${H}${V}`;throw new gX("value",P,K)}vY(T,O,L)}function tU(K,W){if(typeof K!=="number")throw new FY(W,"number",K)}function UX(K,W,H){if(Math.floor(K)!==K)throw tU(K,H),new gX(H||"offset","an integer",K);if(W<0)throw new WY;throw new gX(H||"offset",`>= ${H?1:0} and <= ${W}`,K)}function BY(K){if(K=K.split("=")[0],K=K.trim().replace(_Y,""),K.length<2)return"";while(K.length%4!==0)K=K+"=";return K}function fX(K,W){W=W||1/0;let H,T=K.length,O=null,L=[];for(let V=0;V<T;++V){if(H=K.charCodeAt(V),H>55295&&H<57344){if(!O){if(H>56319){if((W-=3)>-1)L.push(239,191,189);continue}else if(V+1===T){if((W-=3)>-1)L.push(239,191,189);continue}O=H;continue}if(H<56320){if((W-=3)>-1)L.push(239,191,189);O=H;continue}H=(O-55296<<10|H-56320)+65536}else if(O){if((W-=3)>-1)L.push(239,191,189)}if(O=null,H<128){if((W-=1)<0)break;L.push(H)}else if(H<2048){if((W-=2)<0)break;L.push(H>>6|192,H&63|128)}else if(H<65536){if((W-=3)<0)break;L.push(H>>12|224,H>>6&63|128,H&63|128)}else if(H<1114112){if((W-=4)<0)break;L.push(H>>18|240,H>>12&63|128,H>>6&63|128,H&63|128)}else throw Error("Invalid code point")}return L}function xY(K){let W=[];for(let H=0;H<K.length;++H)W.push(K.charCodeAt(H)&255);return W}function NY(K,W){let H,T,O,L=[];for(let V=0;V<K.length;++V){if((W-=2)<0)break;H=K.charCodeAt(V),T=H>>8,O=H%256,L.push(O),L.push(T)}return L}function yZ(K){return QY(BY(K))}function AX(K,W,H,T){let O;for(O=0;O<T;++O){if(O+H>=W.length||O>=K.length)break;W[O+H]=K[O]}return O}function vU(K,W){return K instanceof W||K!=null&&K.constructor!=null&&K.constructor.name!=null&&K.constructor.name===W.name}function cU(K){return typeof BigInt>"u"?wY:K}function wY(){throw Error("BigInt not supported")}function dX(K){return()=>{throw Error(K+" is not implemented for node:buffer browser polyfill")}}var jU,PU,NX="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bU,CZ,DZ,RZ=50,iU=2147483647,qZ=536870888,VY,GY,KY,IY,$Y,WY,FY,gX,MZ=4096,_Y,gY,yY,fY,cY=(K)=>{for(let W of K)if(W.charCodeAt(0)>127)return!1;return!0},pY,hY;var OU=pX(()=>{jU=[],PU=[];for(bU=0,CZ=NX.length;bU<CZ;++bU)jU[bU]=NX[bU],PU[NX.charCodeAt(bU)]=bU;PU[45]=62;PU[95]=63;DZ=typeof Symbol==="function"&&typeof Symbol.for==="function"?Symbol.for("nodejs.util.inspect.custom"):null,VY=globalThis.btoa,GY=globalThis.atob,KY=globalThis.File,IY=globalThis.Blob,$Y={MAX_LENGTH:iU,MAX_STRING_LENGTH:qZ};WY=hX("ERR_BUFFER_OUT_OF_BOUNDS",function(K){if(K)return`${K} is outside of buffer bounds`;return"Attempt to access memory outside buffer bounds"},RangeError),FY=hX("ERR_INVALID_ARG_TYPE",function(K,W){return`The "${K}" argument must be of type number. Received type ${typeof W}`},TypeError),gX=hX("ERR_OUT_OF_RANGE",function(K,W,H){let T=`The value of "${K}" is out of range.`,O=H;if(Number.isInteger(H)&&Math.abs(H)>4294967296)O=LZ(String(H));else if(typeof H==="bigint"){if(O=String(H),H>BigInt(2)**BigInt(32)||H<-(BigInt(2)**BigInt(32)))O=LZ(O);O+="n"}return T+=` It must be ${W}. Received ${O}`,T},RangeError);Object.defineProperty(I0.prototype,"parent",{enumerable:!0,get:function(){if(!I0.isBuffer(this))return;return this.buffer}});Object.defineProperty(I0.prototype,"offset",{enumerable:!0,get:function(){if(!I0.isBuffer(this))return;return this.byteOffset}});I0.poolSize=8192;I0.from=function(K,W,H){return SZ(K,W,H)};Object.setPrototypeOf(I0.prototype,Uint8Array.prototype);Object.setPrototypeOf(I0,Uint8Array);I0.alloc=function(K,W,H){return HY(K,W,H)};I0.allocUnsafe=function(K){return uX(K)};I0.allocUnsafeSlow=function(K){return uX(K)};I0.isBuffer=function(K){return K!=null&&K._isBuffer===!0&&K!==I0.prototype};I0.compare=function(K,W){if(vU(K,Uint8Array))K=I0.from(K,K.offset,K.byteLength);if(vU(W,Uint8Array))W=I0.from(W,W.offset,W.byteLength);if(!I0.isBuffer(K)||!I0.isBuffer(W))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(K===W)return 0;let H=K.length,T=W.length;for(let O=0,L=Math.min(H,T);O<L;++O)if(K[O]!==W[O]){H=K[O],T=W[O];break}if(H<T)return-1;if(T<H)return 1;return 0};I0.isEncoding=function(K){switch(String(K).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}};I0.concat=function(K,W){if(!Array.isArray(K))throw TypeError('"list" argument must be an Array of Buffers');if(K.length===0)return I0.alloc(0);let H;if(W===void 0){W=0;for(H=0;H<K.length;++H)W+=K[H].length}let T=I0.allocUnsafe(W),O=0;for(H=0;H<K.length;++H){let L=K[H];if(vU(L,Uint8Array))if(O+L.length>T.length){if(!I0.isBuffer(L))L=I0.from(L);L.copy(T,O)}else Uint8Array.prototype.set.call(T,L,O);else if(!I0.isBuffer(L))throw TypeError('"list" argument must be an Array of Buffers');else L.copy(T,O);O+=L.length}return T};I0.byteLength=kZ;I0.prototype._isBuffer=!0;I0.prototype.swap16=function(){let K=this.length;if(K%2!==0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let W=0;W<K;W+=2)dU(this,W,W+1);return this};I0.prototype.swap32=function(){let K=this.length;if(K%4!==0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let W=0;W<K;W+=4)dU(this,W,W+3),dU(this,W+1,W+2);return this};I0.prototype.swap64=function(){let K=this.length;if(K%8!==0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let W=0;W<K;W+=8)dU(this,W,W+7),dU(this,W+1,W+6),dU(this,W+2,W+5),dU(this,W+3,W+4);return this};I0.prototype.toString=function(){let K=this.length;if(K===0)return"";if(arguments.length===0)return vZ(this,0,K);return TY.apply(this,arguments)};I0.prototype.toLocaleString=I0.prototype.toString;I0.prototype.equals=function(K){if(!I0.isBuffer(K))throw TypeError("Argument must be a Buffer");if(this===K)return!0;return I0.compare(this,K)===0};I0.prototype.inspect=function(){let K="",W=RZ;if(K=this.toString("hex",0,W).replace(/(.{2})/g,"$1 ").trim(),this.length>W)K+=" ... ";return"<Buffer "+K+">"};if(DZ)I0.prototype[DZ]=I0.prototype.inspect;I0.prototype.compare=function(K,W,H,T,O){if(vU(K,Uint8Array))K=I0.from(K,K.offset,K.byteLength);if(!I0.isBuffer(K))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof K);if(W===void 0)W=0;if(H===void 0)H=K?K.length:0;if(T===void 0)T=0;if(O===void 0)O=this.length;if(W<0||H>K.length||T<0||O>this.length)throw RangeError("out of range index");if(T>=O&&W>=H)return 0;if(T>=O)return-1;if(W>=H)return 1;if(W>>>=0,H>>>=0,T>>>=0,O>>>=0,this===K)return 0;let L=O-T,V=H-W,P=Math.min(L,V),S=this.slice(T,O),M=K.slice(W,H);for(let z=0;z<P;++z)if(S[z]!==M[z]){L=S[z],V=M[z];break}if(L<V)return-1;if(V<L)return 1;return 0};I0.prototype.includes=function(K,W,H){return this.indexOf(K,W,H)!==-1};I0.prototype.indexOf=function(K,W,H){return jZ(this,K,W,H,!0)};I0.prototype.lastIndexOf=function(K,W,H){return jZ(this,K,W,H,!1)};I0.prototype.write=function(K,W,H,T){if(W===void 0)T="utf8",H=this.length,W=0;else if(H===void 0&&typeof W==="string")T=W,H=this.length,W=0;else if(isFinite(W))if(W=W>>>0,isFinite(H)){if(H=H>>>0,T===void 0)T="utf8"}else T=H,H=void 0;else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let O=this.length-W;if(H===void 0||H>O)H=O;if(K.length>0&&(H<0||W<0)||W>this.length)throw RangeError("Attempt to write outside buffer bounds");if(!T)T="utf8";let L=!1;for(;;)switch(T){case"hex":return DY(this,K,W,H);case"utf8":case"utf-8":return zY(this,K,W,H);case"ascii":case"latin1":case"binary":return MY(this,K,W,H);case"base64":return LY(this,K,W,H);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return EY(this,K,W,H);default:if(L)throw TypeError("Unknown encoding: "+T);T=(""+T).toLowerCase(),L=!0}};I0.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};I0.prototype.slice=function(K,W){let H=this.length;if(K=~~K,W=W===void 0?H:~~W,K<0){if(K+=H,K<0)K=0}else if(K>H)K=H;if(W<0){if(W+=H,W<0)W=0}else if(W>H)W=H;if(W<K)W=K;let T=this.subarray(K,W);return Object.setPrototypeOf(T,I0.prototype),T};I0.prototype.readUintLE=I0.prototype.readUIntLE=function(K,W,H){if(K=K>>>0,W=W>>>0,!H)FU(K,W,this.length);let T=this[K],O=1,L=0;while(++L<W&&(O*=256))T+=this[K+L]*O;return T};I0.prototype.readUintBE=I0.prototype.readUIntBE=function(K,W,H){if(K=K>>>0,W=W>>>0,!H)FU(K,W,this.length);let T=this[K+--W],O=1;while(W>0&&(O*=256))T+=this[K+--W]*O;return T};I0.prototype.readUint8=I0.prototype.readUInt8=function(K,W){if(K=K>>>0,!W)FU(K,1,this.length);return this[K]};I0.prototype.readUint16LE=I0.prototype.readUInt16LE=function(K,W){if(K=K>>>0,!W)FU(K,2,this.length);return this[K]|this[K+1]<<8};I0.prototype.readUint16BE=I0.prototype.readUInt16BE=function(K,W){if(K=K>>>0,!W)FU(K,2,this.length);return this[K]<<8|this[K+1]};I0.prototype.readUint32LE=I0.prototype.readUInt32LE=function(K,W){if(K=K>>>0,!W)FU(K,4,this.length);return(this[K]|this[K+1]<<8|this[K+2]<<16)+this[K+3]*16777216};I0.prototype.readUint32BE=I0.prototype.readUInt32BE=function(K,W){if(K=K>>>0,!W)FU(K,4,this.length);return this[K]*16777216+(this[K+1]<<16|this[K+2]<<8|this[K+3])};I0.prototype.readBigUInt64LE=cU(function(K){K=K>>>0,tU(K,"offset");let W=this[K],H=this[K+7];if(W===void 0||H===void 0)UX(K,this.length-8);let T=W+this[++K]*256+this[++K]*65536+this[++K]*16777216,O=this[++K]+this[++K]*256+this[++K]*65536+H*16777216;return BigInt(T)+(BigInt(O)<<BigInt(32))});I0.prototype.readBigUInt64BE=cU(function(K){K=K>>>0,tU(K,"offset");let W=this[K],H=this[K+7];if(W===void 0||H===void 0)UX(K,this.length-8);let T=W*16777216+this[++K]*65536+this[++K]*256+this[++K],O=this[++K]*16777216+this[++K]*65536+this[++K]*256+H;return(BigInt(T)<<BigInt(32))+BigInt(O)});I0.prototype.readIntLE=function(K,W,H){if(K=K>>>0,W=W>>>0,!H)FU(K,W,this.length);let T=this[K],O=1,L=0;while(++L<W&&(O*=256))T+=this[K+L]*O;if(O*=128,T>=O)T-=Math.pow(2,8*W);return T};I0.prototype.readIntBE=function(K,W,H){if(K=K>>>0,W=W>>>0,!H)FU(K,W,this.length);let T=W,O=1,L=this[K+--T];while(T>0&&(O*=256))L+=this[K+--T]*O;if(O*=128,L>=O)L-=Math.pow(2,8*W);return L};I0.prototype.readInt8=function(K,W){if(K=K>>>0,!W)FU(K,1,this.length);if(!(this[K]&128))return this[K];return(255-this[K]+1)*-1};I0.prototype.readInt16LE=function(K,W){if(K=K>>>0,!W)FU(K,2,this.length);let H=this[K]|this[K+1]<<8;return H&32768?H|4294901760:H};I0.prototype.readInt16BE=function(K,W){if(K=K>>>0,!W)FU(K,2,this.length);let H=this[K+1]|this[K]<<8;return H&32768?H|4294901760:H};I0.prototype.readInt32LE=function(K,W){if(K=K>>>0,!W)FU(K,4,this.length);return this[K]|this[K+1]<<8|this[K+2]<<16|this[K+3]<<24};I0.prototype.readInt32BE=function(K,W){if(K=K>>>0,!W)FU(K,4,this.length);return this[K]<<24|this[K+1]<<16|this[K+2]<<8|this[K+3]};I0.prototype.readBigInt64LE=cU(function(K){K=K>>>0,tU(K,"offset");let W=this[K],H=this[K+7];if(W===void 0||H===void 0)UX(K,this.length-8);let T=this[K+4]+this[K+5]*256+this[K+6]*65536+(H<<24);return(BigInt(T)<<BigInt(32))+BigInt(W+this[++K]*256+this[++K]*65536+this[++K]*16777216)});I0.prototype.readBigInt64BE=cU(function(K){K=K>>>0,tU(K,"offset");let W=this[K],H=this[K+7];if(W===void 0||H===void 0)UX(K,this.length-8);let T=(W<<24)+this[++K]*65536+this[++K]*256+this[++K];return(BigInt(T)<<BigInt(32))+BigInt(this[++K]*16777216+this[++K]*65536+this[++K]*256+H)});I0.prototype.readFloatLE=function(K,W){if(K=K>>>0,!W)FU(K,4,this.length);return OX(this,K,!0,23,4)};I0.prototype.readFloatBE=function(K,W){if(K=K>>>0,!W)FU(K,4,this.length);return OX(this,K,!1,23,4)};I0.prototype.readDoubleLE=function(K,W){if(K=K>>>0,!W)FU(K,8,this.length);return OX(this,K,!0,52,8)};I0.prototype.readDoubleBE=function(K,W){if(K=K>>>0,!W)FU(K,8,this.length);return OX(this,K,!1,52,8)};I0.prototype.writeUintLE=I0.prototype.writeUIntLE=function(K,W,H,T){if(K=+K,W=W>>>0,H=H>>>0,!T){let V=Math.pow(2,8*H)-1;LU(this,K,W,H,V,0)}let O=1,L=0;this[W]=K&255;while(++L<H&&(O*=256))this[W+L]=K/O&255;return W+H};I0.prototype.writeUintBE=I0.prototype.writeUIntBE=function(K,W,H,T){if(K=+K,W=W>>>0,H=H>>>0,!T){let V=Math.pow(2,8*H)-1;LU(this,K,W,H,V,0)}let O=H-1,L=1;this[W+O]=K&255;while(--O>=0&&(L*=256))this[W+O]=K/L&255;return W+H};I0.prototype.writeUint8=I0.prototype.writeUInt8=function(K,W,H){if(K=+K,W=W>>>0,!H)LU(this,K,W,1,255,0);return this[W]=K&255,W+1};I0.prototype.writeUint16LE=I0.prototype.writeUInt16LE=function(K,W,H){if(K=+K,W=W>>>0,!H)LU(this,K,W,2,65535,0);return this[W]=K&255,this[W+1]=K>>>8,W+2};I0.prototype.writeUint16BE=I0.prototype.writeUInt16BE=function(K,W,H){if(K=+K,W=W>>>0,!H)LU(this,K,W,2,65535,0);return this[W]=K>>>8,this[W+1]=K&255,W+2};I0.prototype.writeUint32LE=I0.prototype.writeUInt32LE=function(K,W,H){if(K=+K,W=W>>>0,!H)LU(this,K,W,4,4294967295,0);return this[W+3]=K>>>24,this[W+2]=K>>>16,this[W+1]=K>>>8,this[W]=K&255,W+4};I0.prototype.writeUint32BE=I0.prototype.writeUInt32BE=function(K,W,H){if(K=+K,W=W>>>0,!H)LU(this,K,W,4,4294967295,0);return this[W]=K>>>24,this[W+1]=K>>>16,this[W+2]=K>>>8,this[W+3]=K&255,W+4};I0.prototype.writeBigUInt64LE=cU(function(K,W=0){return _Z(this,K,W,BigInt(0),BigInt("0xffffffffffffffff"))});I0.prototype.writeBigUInt64BE=cU(function(K,W=0){return BZ(this,K,W,BigInt(0),BigInt("0xffffffffffffffff"))});I0.prototype.writeIntLE=function(K,W,H,T){if(K=+K,W=W>>>0,!T){let P=Math.pow(2,8*H-1);LU(this,K,W,H,P-1,-P)}let O=0,L=1,V=0;this[W]=K&255;while(++O<H&&(L*=256)){if(K<0&&V===0&&this[W+O-1]!==0)V=1;this[W+O]=(K/L>>0)-V&255}return W+H};I0.prototype.writeIntBE=function(K,W,H,T){if(K=+K,W=W>>>0,!T){let P=Math.pow(2,8*H-1);LU(this,K,W,H,P-1,-P)}let O=H-1,L=1,V=0;this[W+O]=K&255;while(--O>=0&&(L*=256)){if(K<0&&V===0&&this[W+O+1]!==0)V=1;this[W+O]=(K/L>>0)-V&255}return W+H};I0.prototype.writeInt8=function(K,W,H){if(K=+K,W=W>>>0,!H)LU(this,K,W,1,127,-128);if(K<0)K=255+K+1;return this[W]=K&255,W+1};I0.prototype.writeInt16LE=function(K,W,H){if(K=+K,W=W>>>0,!H)LU(this,K,W,2,32767,-32768);return this[W]=K&255,this[W+1]=K>>>8,W+2};I0.prototype.writeInt16BE=function(K,W,H){if(K=+K,W=W>>>0,!H)LU(this,K,W,2,32767,-32768);return this[W]=K>>>8,this[W+1]=K&255,W+2};I0.prototype.writeInt32LE=function(K,W,H){if(K=+K,W=W>>>0,!H)LU(this,K,W,4,2147483647,-2147483648);return this[W]=K&255,this[W+1]=K>>>8,this[W+2]=K>>>16,this[W+3]=K>>>24,W+4};I0.prototype.writeInt32BE=function(K,W,H){if(K=+K,W=W>>>0,!H)LU(this,K,W,4,2147483647,-2147483648);if(K<0)K=4294967295+K+1;return this[W]=K>>>24,this[W+1]=K>>>16,this[W+2]=K>>>8,this[W+3]=K&255,W+4};I0.prototype.writeBigInt64LE=cU(function(K,W=0){return _Z(this,K,W,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});I0.prototype.writeBigInt64BE=cU(function(K,W=0){return BZ(this,K,W,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});I0.prototype.writeFloatLE=function(K,W,H){return NZ(this,K,W,!0,H)};I0.prototype.writeFloatBE=function(K,W,H){return NZ(this,K,W,!1,H)};I0.prototype.writeDoubleLE=function(K,W,H){return gZ(this,K,W,!0,H)};I0.prototype.writeDoubleBE=function(K,W,H){return gZ(this,K,W,!1,H)};I0.prototype.copy=function(K,W,H,T){if(!I0.isBuffer(K))throw TypeError("argument should be a Buffer");if(!H)H=0;if(!T&&T!==0)T=this.length;if(W>=K.length)W=K.length;if(!W)W=0;if(T>0&&T<H)T=H;if(T===H)return 0;if(K.length===0||this.length===0)return 0;if(W<0)throw RangeError("targetStart out of bounds");if(H<0||H>=this.length)throw RangeError("Index out of range");if(T<0)throw RangeError("sourceEnd out of bounds");if(T>this.length)T=this.length;if(K.length-W<T-H)T=K.length-W+H;let O=T-H;if(this===K&&typeof Uint8Array.prototype.copyWithin==="function")this.copyWithin(W,H,T);else Uint8Array.prototype.set.call(K,this.subarray(H,T),W);return O};I0.prototype.fill=function(K,W,H,T){if(typeof K==="string"){if(typeof W==="string")T=W,W=0,H=this.length;else if(typeof H==="string")T=H,H=this.length;if(T!==void 0&&typeof T!=="string")throw TypeError("encoding must be a string");if(typeof T==="string"&&!I0.isEncoding(T))throw TypeError("Unknown encoding: "+T);if(K.length===1){let L=K.charCodeAt(0);if(T==="utf8"&&L<128||T==="latin1")K=L}}else if(typeof K==="number")K=K&255;else if(typeof K==="boolean")K=Number(K);if(W<0||this.length<W||this.length<H)throw RangeError("Out of range index");if(H<=W)return this;if(W=W>>>0,H=H===void 0?this.length:H>>>0,!K)K=0;let O;if(typeof K==="number")for(O=W;O<H;++O)this[O]=K;else{let L=I0.isBuffer(K)?K:I0.from(K,T),V=L.length;if(V===0)throw TypeError('The value "'+K+'" is invalid for argument "value"');for(O=0;O<H-W;++O)this[O+W]=L[O%V]}return this};_Y=/[^+/0-9A-Za-z-_]/g;gY=function(){let K=Array(256);for(let W=0;W<16;++W){let H=W*16;for(let T=0;T<16;++T)K[H+T]="0123456789abcdef"[W]+"0123456789abcdef"[T]}return K}();yY=dX("resolveObjectURL"),fY=dX("isUtf8"),pY=dX("transcode"),hY=I0});var ZX={};cX(ZX,{setMaxListeners:()=>mZ,once:()=>oZ,listenerCount:()=>sZ,init:()=>pU,getMaxListeners:()=>rZ,getEventListeners:()=>nZ,default:()=>tY,captureRejectionSymbol:()=>uZ,addAbortListener:()=>aZ,EventEmitter:()=>pU});function bZ(K,W){var{_events:H}=K;if(W[0]??=Error("Unhandled error."),!H)throw W[0];var T=H[hZ];if(T)for(var O of cZ.call(T))O.apply(K,W);var L=H.error;if(!L)throw W[0];for(var O of cZ.call(L))O.apply(K,W);return!0}function dY(K,W,H,T){W.then(void 0,function(O){queueMicrotask(()=>lY(K,O,H,T))})}function lY(K,W,H,T){if(typeof K[fZ]==="function")K[fZ](W,H,...T);else try{K[lU]=!1,K.emit("error",W)}finally{K[lU]=!0}}function dZ(K,W,H){H.warned=!0;let T=Error(`Possible EventEmitter memory leak detected. ${H.length} ${String(W)} listeners added to [${K.constructor.name}]. Use emitter.setMaxListeners() to increase limit`);T.name="MaxListenersExceededWarning",T.emitter=K,T.type=W,T.count=H.length,console.warn(T)}function lZ(K,W,...H){this.removeListener(K,W),W.apply(this,H)}function oZ(K,W,H){var T=H?.signal;if(tZ(T,"options.signal"),T?.aborted)throw new lX(void 0,{cause:T?.reason});let{resolve:O,reject:L,promise:V}=$newPromiseCapability(Promise),P=(z)=>{if(K.removeListener(W,S),T!=null)CX(T,"abort",M);L(z)},S=(...z)=>{if(typeof K.removeListener==="function")K.removeListener("error",P);if(T!=null)CX(T,"abort",M);O(z)};if(pZ(K,W,S,{once:!0}),W!=="error"&&typeof K.once==="function")K.once("error",P);function M(){CX(K,W,S),CX(K,"error",P),L(new lX(void 0,{cause:T?.reason}))}if(T!=null)pZ(T,"abort",M,{once:!0});return V}function nZ(K,W){return K.listeners(W)}function mZ(K,...W){nX(K,"setMaxListeners",0);var H;if(W&&(H=W.length))for(let T=0;T<H;T++)W[T].setMaxListeners(K);else oU=K}function sZ(K,W){return K.listenerCount(W)}function CX(K,W,H,T){if(typeof K.removeListener==="function")K.removeListener(W,H);else K.removeEventListener(W,H,T)}function pZ(K,W,H,T){if(typeof K.on==="function")if(T.once)K.once(W,H);else K.on(W,H);else K.addEventListener(W,H,T)}function rU(K,W,H){let T=TypeError(`The "${K}" argument must be of type ${W}. Received ${H}`);return T.code="ERR_INVALID_ARG_TYPE",T}function mY(K,W,H){let T=RangeError(`The "${K}" argument is out of range. It must be ${W}. Received ${H}`);return T.code="ERR_OUT_OF_RANGE",T}function tZ(K,W){if(K!==void 0&&(K===null||typeof K!=="object"||!("aborted"in K)))throw rU(W,"AbortSignal",K)}function nX(K,W,H,T){if(typeof K!=="number")throw rU(W,"number",K);if(H!=null&&K<H||T!=null&&K>T||(H!=null||T!=null)&&Number.isNaN(K))throw mY(W,`${H!=null?`>= ${H}`:""}${H!=null&&T!=null?" && ":""}${T!=null?`<= ${T}`:""}`,K)}function XX(K){if(typeof K!=="function")throw TypeError("The listener must be a function")}function sY(K,W){if(typeof K!=="boolean")throw rU(W,"boolean",K)}function rZ(K){return K?._maxListeners??oU}function aZ(K,W){if(K===void 0)throw rU("signal","AbortSignal",K);if(tZ(K,"signal"),typeof W!=="function")throw rU("listener","function",W);let H;if(K.aborted)queueMicrotask(()=>W());else K.addEventListener("abort",W,{__proto__:null,once:!0}),H=()=>{K.removeEventListener("abort",W)};return{__proto__:null,[Symbol.dispose](){H?.()}}}var oX,lU,hZ,uY,bY,fZ,uZ,cZ,oU=10,pU=function(K){if(this._events===void 0||this._events===this.__proto__._events)this._events={__proto__:null},this._eventsCount=0;if(this._maxListeners??=void 0,this[lU]=K?.captureRejections?Boolean(K?.captureRejections):l0[lU])this.emit=nY},l0,oY=function(K,...W){if(K==="error")return bZ(this,W);var{_events:H}=this;if(H===void 0)return!1;var T=H[K];if(T===void 0)return!1;let O=T.length>1?T.slice():T;for(let L=0,{length:V}=O;L<V;L++){let P=O[L];switch(W.length){case 0:P.call(this);break;case 1:P.call(this,W[0]);break;case 2:P.call(this,W[0],W[1]);break;case 3:P.call(this,W[0],W[1],W[2]);break;default:P.apply(this,W);break}}return!0},nY=function(K,...W){if(K==="error")return bZ(this,W);var{_events:H}=this;if(H===void 0)return!1;var T=H[K];if(T===void 0)return!1;let O=T.length>1?T.slice():T;for(let L=0,{length:V}=O;L<V;L++){let P=O[L],S;switch(W.length){case 0:S=P.call(this);break;case 1:S=P.call(this,W[0]);break;case 2:S=P.call(this,W[0],W[1]);break;case 3:S=P.call(this,W[0],W[1],W[2]);break;default:S=P.apply(this,W);break}if(S!==void 0&&typeof S?.then==="function"&&S.then===Promise.prototype.then)dY(this,S,K,W)}return!0},lX,tY;var QX=pX(()=>{oX=Symbol.for,lU=Symbol("kCapture"),hZ=oX("events.errorMonitor"),uY=Symbol("events.maxEventTargetListeners"),bY=Symbol("events.maxEventTargetListenersWarned"),fZ=oX("nodejs.rejection"),uZ=oX("nodejs.rejection"),cZ=Array.prototype.slice,l0=pU.prototype={};l0._events=void 0;l0._eventsCount=0;l0._maxListeners=void 0;l0.setMaxListeners=function(K){return nX(K,"setMaxListeners",0),this._maxListeners=K,this};l0.constructor=pU;l0.getMaxListeners=function(){return this?._maxListeners??oU};l0.emit=oY;l0.addListener=function(K,W){XX(W);var H=this._events;if(!H)H=this._events={__proto__:null},this._eventsCount=0;else if(H.newListener)this.emit("newListener",K,W.listener??W);var T=H[K];if(!T)H[K]=[W],this._eventsCount++;else{T.push(W);var O=this._maxListeners??oU;if(O>0&&T.length>O&&!T.warned)dZ(this,K,T)}return this};l0.on=l0.addListener;l0.prependListener=function(K,W){XX(W);var H=this._events;if(!H)H=this._events={__proto__:null},this._eventsCount=0;else if(H.newListener)this.emit("newListener",K,W.listener??W);var T=H[K];if(!T)H[K]=[W],this._eventsCount++;else{T.unshift(W);var O=this._maxListeners??oU;if(O>0&&T.length>O&&!T.warned)dZ(this,K,T)}return this};l0.once=function(K,W){XX(W);let H=lZ.bind(this,K,W);return H.listener=W,this.addListener(K,H),this};l0.prependOnceListener=function(K,W){XX(W);let H=lZ.bind(this,K,W);return H.listener=W,this.prependListener(K,H),this};l0.removeListener=function(K,W){XX(W);var{_events:H}=this;if(!H)return this;var T=H[K];if(!T)return this;var O=T.length;let L=-1;for(let V=O-1;V>=0;V--)if(T[V]===W||T[V].listener===W){L=V;break}if(L<0)return this;if(L===0)T.shift();else T.splice(L,1);if(T.length===0)delete H[K],this._eventsCount--;return this};l0.off=l0.removeListener;l0.removeAllListeners=function(K){var{_events:W}=this;if(K&&W){if(W[K])delete W[K],this._eventsCount--}else this._events={__proto__:null};return this};l0.listeners=function(K){var{_events:W}=this;if(!W)return[];var H=W[K];if(!H)return[];return H.map((T)=>T.listener??T)};l0.rawListeners=function(K){var{_events:W}=this;if(!W)return[];var H=W[K];if(!H)return[];return H.slice()};l0.listenerCount=function(K){var{_events:W}=this;if(!W)return 0;return W[K]?.length??0};l0.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};l0[lU]=!1;lX=class lX extends Error{constructor(K="The operation was aborted",W=void 0){if(W!==void 0&&typeof W!=="object")throw rU("options","Object",W);super(K,W);this.code="ABORT_ERR",this.name="AbortError"}};Object.defineProperties(pU,{captureRejections:{get(){return l0[lU]},set(K){sY(K,"EventEmitter.captureRejections"),l0[lU]=K},enumerable:!0},defaultMaxListeners:{enumerable:!0,get:()=>{return oU},set:(K)=>{nX(K,"defaultMaxListeners",0),oU=K}},kMaxEventTargetListeners:{value:uY,enumerable:!1,configurable:!1,writable:!1},kMaxEventTargetListenersWarned:{value:bY,enumerable:!1,configurable:!1,writable:!1}});Object.assign(pU,{once:oZ,getEventListeners:nZ,getMaxListeners:rZ,setMaxListeners:mZ,EventEmitter:pU,usingDomains:!1,captureRejectionSymbol:uZ,errorMonitor:hZ,addAbortListener:aZ,init:pU,listenerCount:sZ});tY=pU});var rX=rY((rG,JQ)=>{var u0=(K,W)=>()=>(W||K((W={exports:{}}).exports,W),W.exports),o0=u0((K,W)=>{class H extends Error{constructor(T){if(!Array.isArray(T))throw TypeError(`Expected input to be an Array, got ${typeof T}`);let O="";for(let L=0;L<T.length;L++)O+=` ${T[L].stack}
2
+ `;super(O);this.name="AggregateError",this.errors=T}}W.exports={AggregateError:H,ArrayIsArray(T){return Array.isArray(T)},ArrayPrototypeIncludes(T,O){return T.includes(O)},ArrayPrototypeIndexOf(T,O){return T.indexOf(O)},ArrayPrototypeJoin(T,O){return T.join(O)},ArrayPrototypeMap(T,O){return T.map(O)},ArrayPrototypePop(T,O){return T.pop(O)},ArrayPrototypePush(T,O){return T.push(O)},ArrayPrototypeSlice(T,O,L){return T.slice(O,L)},Error,FunctionPrototypeCall(T,O,...L){return T.call(O,...L)},FunctionPrototypeSymbolHasInstance(T,O){return Function.prototype[Symbol.hasInstance].call(T,O)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(T,O){return Object.defineProperties(T,O)},ObjectDefineProperty(T,O,L){return Object.defineProperty(T,O,L)},ObjectGetOwnPropertyDescriptor(T,O){return Object.getOwnPropertyDescriptor(T,O)},ObjectKeys(T){return Object.keys(T)},ObjectSetPrototypeOf(T,O){return Object.setPrototypeOf(T,O)},Promise,PromisePrototypeCatch(T,O){return T.catch(O)},PromisePrototypeThen(T,O,L){return T.then(O,L)},PromiseReject(T){return Promise.reject(T)},PromiseResolve(T){return Promise.resolve(T)},ReflectApply:Reflect.apply,RegExpPrototypeTest(T,O){return T.test(O)},SafeSet:Set,String,StringPrototypeSlice(T,O,L){return T.slice(O,L)},StringPrototypeToLowerCase(T){return T.toLowerCase()},StringPrototypeToUpperCase(T){return T.toUpperCase()},StringPrototypeTrim(T){return T.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(T,O,L){return T.set(O,L)},Boolean,Uint8Array}}),eZ=u0((K,W)=>{W.exports={format(H,...T){return H.replace(/%([sdifj])/g,function(...[O,L]){let V=T.shift();if(L==="f")return V.toFixed(6);else if(L==="j")return JSON.stringify(V);else if(L==="s"&&typeof V==="object")return`${V.constructor!==Object?V.constructor.name:""} {}`.trim();else return V.toString()})},inspect(H){switch(typeof H){case"string":if(H.includes("'")){if(!H.includes('"'))return`"${H}"`;else if(!H.includes("`")&&!H.includes("${"))return`\`${H}\``}return`'${H}'`;case"number":if(isNaN(H))return"NaN";else if(Object.is(H,-0))return String(H);return H;case"bigint":return`${String(H)}n`;case"boolean":case"undefined":return String(H);case"object":return"{}"}}}}),zU=u0((K,W)=>{var{format:H,inspect:T}=eZ(),{AggregateError:O}=o0(),L=globalThis.AggregateError||O,V=Symbol("kIsNodeError"),P=["string","function","number","object","Function","Object","boolean","bigint","symbol"],S=/^([A-Z][a-z0-9]*)+$/,M={};function z(B,_){if(!B)throw new M.ERR_INTERNAL_ASSERTION(_)}function A(B){let _="",x=B.length,w=B[0]==="-"?1:0;for(;x>=w+4;x-=3)_=`_${B.slice(x-3,x)}${_}`;return`${B.slice(0,x)}${_}`}function D(B,_,x){if(typeof _==="function")return z(_.length<=x.length,`Code: ${B}; The provided arguments length (${x.length}) does not match the required ones (${_.length}).`),_(...x);let w=(_.match(/%[dfijoOs]/g)||[]).length;if(z(w===x.length,`Code: ${B}; The provided arguments length (${x.length}) does not match the required ones (${w}).`),x.length===0)return _;return H(_,...x)}function R(B,_,x){if(!x)x=Error;class w extends x{constructor(...y){super(D(B,_,y))}toString(){return`${this.name} [${B}]: ${this.message}`}}Object.defineProperties(w.prototype,{name:{value:x.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${B}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),w.prototype.code=B,w.prototype[V]=!0,M[B]=w}function q(B){let _="__node_internal_"+B.name;return Object.defineProperty(B,"name",{value:_}),B}function v(B,_){if(B&&_&&B!==_){if(Array.isArray(_.errors))return _.errors.push(B),_;let x=new L([_,B],_.message);return x.code=_.code,x}return B||_}class k extends Error{constructor(B="The operation was aborted",_=void 0){if(_!==void 0&&typeof _!=="object")throw new M.ERR_INVALID_ARG_TYPE("options","Object",_);super(B,_);this.code="ABORT_ERR",this.name="AbortError"}}R("ERR_ASSERTION","%s",Error),R("ERR_INVALID_ARG_TYPE",(B,_,x)=>{if(z(typeof B==="string","'name' must be a string"),!Array.isArray(_))_=[_];let w="The ";if(B.endsWith(" argument"))w+=`${B} `;else w+=`"${B}" ${B.includes(".")?"property":"argument"} `;w+="must be ";let y=[],l=[],J0=[];for(let V0 of _)if(z(typeof V0==="string","All expected entries have to be of type string"),P.includes(V0))y.push(V0.toLowerCase());else if(S.test(V0))l.push(V0);else z(V0!=="object",'The value "object" should be written as "Object"'),J0.push(V0);if(l.length>0){let V0=y.indexOf("object");if(V0!==-1)y.splice(y,V0,1),l.push("Object")}if(y.length>0){switch(y.length){case 1:w+=`of type ${y[0]}`;break;case 2:w+=`one of type ${y[0]} or ${y[1]}`;break;default:{let V0=y.pop();w+=`one of type ${y.join(", ")}, or ${V0}`}}if(l.length>0||J0.length>0)w+=" or "}if(l.length>0){switch(l.length){case 1:w+=`an instance of ${l[0]}`;break;case 2:w+=`an instance of ${l[0]} or ${l[1]}`;break;default:{let V0=l.pop();w+=`an instance of ${l.join(", ")}, or ${V0}`}}if(J0.length>0)w+=" or "}switch(J0.length){case 0:break;case 1:if(J0[0].toLowerCase()!==J0[0])w+="an ";w+=`${J0[0]}`;break;case 2:w+=`one of ${J0[0]} or ${J0[1]}`;break;default:{let V0=J0.pop();w+=`one of ${J0.join(", ")}, or ${V0}`}}if(x==null)w+=`. Received ${x}`;else if(typeof x==="function"&&x.name)w+=`. Received function ${x.name}`;else if(typeof x==="object"){var K0;if((K0=x.constructor)!==null&&K0!==void 0&&K0.name)w+=`. Received an instance of ${x.constructor.name}`;else{let V0=T(x,{depth:-1});w+=`. Received ${V0}`}}else{let V0=T(x,{colors:!1});if(V0.length>25)V0=`${V0.slice(0,25)}...`;w+=`. Received type ${typeof x} (${V0})`}return w},TypeError),R("ERR_INVALID_ARG_VALUE",(B,_,x="is invalid")=>{let w=T(_);if(w.length>128)w=w.slice(0,128)+"...";return`The ${B.includes(".")?"property":"argument"} '${B}' ${x}. Received ${w}`},TypeError),R("ERR_INVALID_RETURN_VALUE",(B,_,x)=>{var w;let y=x!==null&&x!==void 0&&(w=x.constructor)!==null&&w!==void 0&&w.name?`instance of ${x.constructor.name}`:`type ${typeof x}`;return`Expected ${B} to be returned from the "${_}" function but got ${y}.`},TypeError),R("ERR_MISSING_ARGS",(...B)=>{z(B.length>0,"At least one arg needs to be specified");let _,x=B.length;switch(B=(Array.isArray(B)?B:[B]).map((w)=>`"${w}"`).join(" or "),x){case 1:_+=`The ${B[0]} argument`;break;case 2:_+=`The ${B[0]} and ${B[1]} arguments`;break;default:{let w=B.pop();_+=`The ${B.join(", ")}, and ${w} arguments`}break}return`${_} must be specified`},TypeError),R("ERR_OUT_OF_RANGE",(B,_,x)=>{z(_,'Missing "range" argument');let w;if(Number.isInteger(x)&&Math.abs(x)>4294967296)w=A(String(x));else if(typeof x==="bigint"){w=String(x);let y=BigInt(2)**BigInt(32);if(x>y||x<-y)w=A(w);w+="n"}else w=T(x);return`The value of "${B}" is out of range. It must be ${_}. Received ${w}`},RangeError),R("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),R("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),R("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),R("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),R("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),R("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),R("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),R("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),R("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),R("ERR_STREAM_WRITE_AFTER_END","write after end",Error),R("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),W.exports={AbortError:k,aggregateTwoErrors:q(v),hideStackFrames:q,codes:M}}),aY=u0((K,W)=>{Object.defineProperty(K,"__esModule",{value:!0});var H=new WeakMap,T=new WeakMap;function O(u){let X0=H.get(u);return console.assert(X0!=null,"'this' is expected an Event object, but got",u),X0}function L(u){if(u.passiveListener!=null){if(typeof console<"u"&&typeof console.error==="function")console.error("Unable to preventDefault inside passive event listener invocation.",u.passiveListener);return}if(!u.event.cancelable)return;if(u.canceled=!0,typeof u.event.preventDefault==="function")u.event.preventDefault()}function V(u,X0){H.set(this,{eventTarget:u,event:X0,eventPhase:2,currentTarget:u,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:X0.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});let U=Object.keys(X0);for(let Q=0;Q<U.length;++Q){let J=U[Q];if(!(J in this))Object.defineProperty(this,J,P(J))}}if(V.prototype={get type(){return O(this).event.type},get target(){return O(this).eventTarget},get currentTarget(){return O(this).currentTarget},composedPath(){let u=O(this).currentTarget;if(u==null)return[];return[u]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return O(this).eventPhase},stopPropagation(){let u=O(this);if(u.stopped=!0,typeof u.event.stopPropagation==="function")u.event.stopPropagation()},stopImmediatePropagation(){let u=O(this);if(u.stopped=!0,u.immediateStopped=!0,typeof u.event.stopImmediatePropagation==="function")u.event.stopImmediatePropagation()},get bubbles(){return Boolean(O(this).event.bubbles)},get cancelable(){return Boolean(O(this).event.cancelable)},preventDefault(){L(O(this))},get defaultPrevented(){return O(this).canceled},get composed(){return Boolean(O(this).event.composed)},get timeStamp(){return O(this).timeStamp},get srcElement(){return O(this).eventTarget},get cancelBubble(){return O(this).stopped},set cancelBubble(u){if(!u)return;let X0=O(this);if(X0.stopped=!0,typeof X0.event.cancelBubble==="boolean")X0.event.cancelBubble=!0},get returnValue(){return!O(this).canceled},set returnValue(u){if(!u)L(O(this))},initEvent(){}},Object.defineProperty(V.prototype,"constructor",{value:V,configurable:!0,writable:!0}),typeof window<"u"&&typeof window.Event<"u")Object.setPrototypeOf(V.prototype,window.Event.prototype),T.set(window.Event.prototype,V);function P(u){return{get(){return O(this).event[u]},set(X0){O(this).event[u]=X0},configurable:!0,enumerable:!0}}function S(u){return{value(){let X0=O(this).event;return X0[u].apply(X0,arguments)},configurable:!0,enumerable:!0}}function M(u,X0){let U=Object.keys(X0);if(U.length===0)return u;function Q(J,Z){u.call(this,J,Z)}Q.prototype=Object.create(u.prototype,{constructor:{value:Q,configurable:!0,writable:!0}});for(let J=0;J<U.length;++J){let Z=U[J];if(!(Z in u.prototype)){let Y=typeof Object.getOwnPropertyDescriptor(X0,Z).value==="function";Object.defineProperty(Q.prototype,Z,Y?S(Z):P(Z))}}return Q}function z(u){if(u==null||u===Object.prototype)return V;let X0=T.get(u);if(X0==null)X0=M(z(Object.getPrototypeOf(u)),u),T.set(u,X0);return X0}function A(u,X0){return new(z(Object.getPrototypeOf(X0)))(u,X0)}function D(u){return O(u).immediateStopped}function R(u,X0){O(u).eventPhase=X0}function q(u,X0){O(u).currentTarget=X0}function v(u,X0){O(u).passiveListener=X0}var k=new WeakMap,B=1,_=2,x=3;function w(u){return u!==null&&typeof u==="object"}function y(u){let X0=k.get(u);if(X0==null)throw TypeError("'this' is expected an EventTarget object, but got another value.");return X0}function l(u){return{get(){let X0=y(this).get(u);while(X0!=null){if(X0.listenerType===x)return X0.listener;X0=X0.next}return null},set(X0){if(typeof X0!=="function"&&!w(X0))X0=null;let U=y(this),Q=null,J=U.get(u);while(J!=null){if(J.listenerType===x)if(Q!==null)Q.next=J.next;else if(J.next!==null)U.set(u,J.next);else U.delete(u);else Q=J;J=J.next}if(X0!==null){let Z={listener:X0,listenerType:x,passive:!1,once:!1,next:null};if(Q===null)U.set(u,Z);else Q.next=Z}},configurable:!0,enumerable:!0}}function J0(u,X0){Object.defineProperty(u,`on${X0}`,l(X0))}function K0(u){function X0(){V0.call(this)}X0.prototype=Object.create(V0.prototype,{constructor:{value:X0,configurable:!0,writable:!0}});for(let U=0;U<u.length;++U)J0(X0.prototype,u[U]);return X0}function V0(){if(this instanceof V0){k.set(this,new Map);return}if(arguments.length===1&&Array.isArray(arguments[0]))return K0(arguments[0]);if(arguments.length>0){let u=Array(arguments.length);for(let X0=0;X0<arguments.length;++X0)u[X0]=arguments[X0];return K0(u)}throw TypeError("Cannot call a class as a function")}if(V0.prototype={addEventListener(u,X0,U){if(X0==null)return;if(typeof X0!=="function"&&!w(X0))throw TypeError("'listener' should be a function or an object.");let Q=y(this),J=w(U),Z=(J?Boolean(U.capture):Boolean(U))?B:_,Y={listener:X0,listenerType:Z,passive:J&&Boolean(U.passive),once:J&&Boolean(U.once),next:null},$=Q.get(u);if($===void 0){Q.set(u,Y);return}let F=null;while($!=null){if($.listener===X0&&$.listenerType===Z)return;F=$,$=$.next}F.next=Y},removeEventListener(u,X0,U){if(X0==null)return;let Q=y(this),J=(w(U)?Boolean(U.capture):Boolean(U))?B:_,Z=null,Y=Q.get(u);while(Y!=null){if(Y.listener===X0&&Y.listenerType===J){if(Z!==null)Z.next=Y.next;else if(Y.next!==null)Q.set(u,Y.next);else Q.delete(u);return}Z=Y,Y=Y.next}},dispatchEvent(u){if(u==null||typeof u.type!=="string")throw TypeError('"event.type" should be a string.');let X0=y(this),U=u.type,Q=X0.get(U);if(Q==null)return!0;let J=A(this,u),Z=null;while(Q!=null){if(Q.once)if(Z!==null)Z.next=Q.next;else if(Q.next!==null)X0.set(U,Q.next);else X0.delete(U);else Z=Q;if(v(J,Q.passive?Q.listener:null),typeof Q.listener==="function")try{Q.listener.call(this,J)}catch(Y){if(typeof console<"u"&&typeof console.error==="function")console.error(Y)}else if(Q.listenerType!==x&&typeof Q.listener.handleEvent==="function")Q.listener.handleEvent(J);if(D(J))break;Q=Q.next}return v(J,null),R(J,0),q(J,null),!J.defaultPrevented}},Object.defineProperty(V0.prototype,"constructor",{value:V0,configurable:!0,writable:!0}),typeof window<"u"&&typeof window.EventTarget<"u")Object.setPrototypeOf(V0.prototype,window.EventTarget.prototype);K.defineEventAttribute=J0,K.EventTarget=V0,K.default=V0,W.exports=V0,W.exports.EventTarget=W.exports.default=V0,W.exports.defineEventAttribute=J0}),YX=u0((K,W)=>{Object.defineProperty(K,"__esModule",{value:!0});var H=aY();class T extends H.EventTarget{constructor(){super();throw TypeError("AbortSignal cannot be constructed directly")}get aborted(){let z=V.get(this);if(typeof z!=="boolean")throw TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this===null?"null":typeof this}`);return z}}H.defineEventAttribute(T.prototype,"abort");function O(){let z=Object.create(T.prototype);return H.EventTarget.call(z),V.set(z,!1),z}function L(z){if(V.get(z)!==!1)return;V.set(z,!0),z.dispatchEvent({type:"abort"})}var V=new WeakMap;if(Object.defineProperties(T.prototype,{aborted:{enumerable:!0}}),typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol")Object.defineProperty(T.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortSignal"});class P{constructor(){S.set(this,O())}get signal(){return M(this)}abort(){L(M(this))}}var S=new WeakMap;function M(z){let A=S.get(z);if(A==null)throw TypeError(`Expected 'this' to be an 'AbortController' object, but got ${z===null?"null":typeof z}`);return A}if(Object.defineProperties(P.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}}),typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol")Object.defineProperty(P.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortController"});K.AbortController=P,K.AbortSignal=T,K.default=P,W.exports=P,W.exports.AbortController=W.exports.default=P,W.exports.AbortSignal=T}),EU=u0((K,W)=>{var H=(OU(),h0(HU)),{format:T,inspect:O}=eZ(),{codes:{ERR_INVALID_ARG_TYPE:L}}=zU(),{kResistStopPropagation:V,AggregateError:P,SymbolDispose:S}=o0(),M=globalThis.AbortSignal||YX().AbortSignal,z=globalThis.AbortController||YX().AbortController,A=Object.getPrototypeOf(async function(){}).constructor,D=globalThis.Blob||H.Blob,R=typeof D<"u"?function(k){return k instanceof D}:function(k){return!1},q=(k,B)=>{if(k!==void 0&&(k===null||typeof k!=="object"||!("aborted"in k)))throw new L(B,"AbortSignal",k)},v=(k,B)=>{if(typeof k!=="function")throw new L(B,"Function",k)};W.exports={AggregateError:P,kEmptyObject:Object.freeze({}),once(k){let B=!1;return function(..._){if(B)return;B=!0,k.apply(this,_)}},createDeferredPromise:function(){let k,B;return{promise:new Promise((_,x)=>{k=_,B=x}),resolve:k,reject:B}},promisify(k){return new Promise((B,_)=>{k((x,...w)=>{if(x)return _(x);return B(...w)})})},debuglog(){return function(){}},format:T,inspect:O,types:{isAsyncFunction(k){return k instanceof A},isArrayBufferView(k){return ArrayBuffer.isView(k)}},isBlob:R,deprecate(k,B){return k},addAbortListener:(QX(),h0(ZX)).addAbortListener||function(k,B){if(k===void 0)throw new L("signal","AbortSignal",k);q(k,"signal"),v(B,"listener");let _;if(k.aborted)queueMicrotask(()=>B());else k.addEventListener("abort",B,{__proto__:null,once:!0,[V]:!0}),_=()=>{k.removeEventListener("abort",B)};return{__proto__:null,[S](){var x;(x=_)===null||x===void 0||x()}}},AbortSignalAny:M.any||function(k){if(k.length===1)return k[0];let B=new z,_=()=>B.abort();return k.forEach((x)=>{q(x,"signals"),x.addEventListener("abort",_,{once:!0})}),B.signal.addEventListener("abort",()=>{k.forEach((x)=>x.removeEventListener("abort",_))},{once:!0}),B.signal}},W.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),JX=u0((K,W)=>{var{ArrayIsArray:H,ArrayPrototypeIncludes:T,ArrayPrototypeJoin:O,ArrayPrototypeMap:L,NumberIsInteger:V,NumberIsNaN:P,NumberMAX_SAFE_INTEGER:S,NumberMIN_SAFE_INTEGER:M,NumberParseInt:z,ObjectPrototypeHasOwnProperty:A,RegExpPrototypeExec:D,String:R,StringPrototypeToUpperCase:q,StringPrototypeTrim:v}=o0(),{hideStackFrames:k,codes:{ERR_SOCKET_BAD_PORT:B,ERR_INVALID_ARG_TYPE:_,ERR_INVALID_ARG_VALUE:x,ERR_OUT_OF_RANGE:w,ERR_UNKNOWN_SIGNAL:y}}=zU(),{normalizeEncoding:l}=EU(),{isAsyncFunction:J0,isArrayBufferView:K0}=EU().types,V0={};function u(c){return c===(c|0)}function X0(c){return c===c>>>0}var U=/^[0-7]+$/,Q="must be a 32-bit unsigned integer or an octal string";function J(c,o,N0){if(typeof c>"u")c=N0;if(typeof c==="string"){if(D(U,c)===null)throw new x(o,c,Q);c=z(c,8)}return $(c,o),c}var Z=k((c,o,N0=M,s=S)=>{if(typeof c!=="number")throw new _(o,"number",c);if(!V(c))throw new w(o,"an integer",c);if(c<N0||c>s)throw new w(o,`>= ${N0} && <= ${s}`,c)}),Y=k((c,o,N0=-2147483648,s=2147483647)=>{if(typeof c!=="number")throw new _(o,"number",c);if(!V(c))throw new w(o,"an integer",c);if(c<N0||c>s)throw new w(o,`>= ${N0} && <= ${s}`,c)}),$=k((c,o,N0=!1)=>{if(typeof c!=="number")throw new _(o,"number",c);if(!V(c))throw new w(o,"an integer",c);let s=N0?1:0,Z0=4294967295;if(c<s||c>Z0)throw new w(o,`>= ${s} && <= ${Z0}`,c)});function F(c,o){if(typeof c!=="string")throw new _(o,"string",c)}function G(c,o,N0=void 0,s){if(typeof c!=="number")throw new _(o,"number",c);if(N0!=null&&c<N0||s!=null&&c>s||(N0!=null||s!=null)&&P(c))throw new w(o,`${N0!=null?`>= ${N0}`:""}${N0!=null&&s!=null?" && ":""}${s!=null?`<= ${s}`:""}`,c)}var X=k((c,o,N0)=>{if(!T(N0,c)){let s="must be one of: "+O(L(N0,(Z0)=>typeof Z0==="string"?`'${Z0}'`:R(Z0)),", ");throw new x(o,c,s)}});function I(c,o){if(typeof c!=="boolean")throw new _(o,"boolean",c)}function E(c,o,N0){return c==null||!A(c,o)?N0:c[o]}var C=k((c,o,N0=null)=>{let s=E(N0,"allowArray",!1),Z0=E(N0,"allowFunction",!1);if(!E(N0,"nullable",!1)&&c===null||!s&&H(c)||typeof c!=="object"&&(!Z0||typeof c!=="function"))throw new _(o,"Object",c)}),j=k((c,o)=>{if(c!=null&&typeof c!=="object"&&typeof c!=="function")throw new _(o,"a dictionary",c)}),g=k((c,o,N0=0)=>{if(!H(c))throw new _(o,"Array",c);if(c.length<N0){let s=`must be longer than ${N0}`;throw new x(o,c,s)}});function p(c,o){g(c,o);for(let N0=0;N0<c.length;N0++)F(c[N0],`${o}[${N0}]`)}function n(c,o){g(c,o);for(let N0=0;N0<c.length;N0++)I(c[N0],`${o}[${N0}]`)}function $0(c,o){g(c,o);for(let N0=0;N0<c.length;N0++){let s=c[N0],Z0=`${o}[${N0}]`;if(s==null)throw new _(Z0,"AbortSignal",s);i(s,Z0)}}function r(c,o="signal"){if(F(c,o),V0[c]===void 0){if(V0[q(c)]!==void 0)throw new y(c+" (signals must use all capital letters)");throw new y(c)}}var d=k((c,o="buffer")=>{if(!K0(c))throw new _(o,["Buffer","TypedArray","DataView"],c)});function Q0(c,o){let N0=l(o),s=c.length;if(N0==="hex"&&s%2!==0)throw new x("encoding",o,`is invalid for data of length ${s}`)}function m(c,o="Port",N0=!0){if(typeof c!=="number"&&typeof c!=="string"||typeof c==="string"&&v(c).length===0||+c!==+c>>>0||c>65535||c===0&&!N0)throw new B(o,c,N0);return c|0}var i=k((c,o)=>{if(c!==void 0&&(c===null||typeof c!=="object"||!("aborted"in c)))throw new _(o,"AbortSignal",c)}),g0=k((c,o)=>{if(typeof c!=="function")throw new _(o,"Function",c)}),f=k((c,o)=>{if(typeof c!=="function"||J0(c))throw new _(o,"Function",c)}),h=k((c,o)=>{if(c!==void 0)throw new _(o,"undefined",c)});function Y0(c,o,N0){if(!T(N0,c))throw new _(o,`('${O(N0,"|")}')`,c)}var t=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function e(c,o){if(typeof c>"u"||!D(t,c))throw new x(o,c,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function M0(c){if(typeof c==="string")return e(c,"hints"),c;else if(H(c)){let o=c.length,N0="";if(o===0)return N0;for(let s=0;s<o;s++){let Z0=c[s];if(e(Z0,"hints"),N0+=Z0,s!==o-1)N0+=", "}return N0}throw new x("hints",c,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}W.exports={isInt32:u,isUint32:X0,parseFileMode:J,validateArray:g,validateStringArray:p,validateBooleanArray:n,validateAbortSignalArray:$0,validateBoolean:I,validateBuffer:d,validateDictionary:j,validateEncoding:Q0,validateFunction:g0,validateInt32:Y,validateInteger:Z,validateNumber:G,validateObject:C,validateOneOf:X,validatePlainFunction:f,validatePort:m,validateSignalName:r,validateString:F,validateUint32:$,validateUndefined:h,validateUnion:Y0,validateAbortSignal:i,validateLinkHeaderValue:M0}}),nU=u0((K,W)=>{W.exports=globalThis.process}),gU=u0((K,W)=>{var{SymbolAsyncIterator:H,SymbolIterator:T,SymbolFor:O}=o0(),L=O("nodejs.stream.destroyed"),V=O("nodejs.stream.errored"),P=O("nodejs.stream.readable"),S=O("nodejs.stream.writable"),M=O("nodejs.stream.disturbed"),z=O("nodejs.webstream.isClosedPromise"),A=O("nodejs.webstream.controllerErrorFunction");function D(E,C=!1){var j;return!!(E&&typeof E.pipe==="function"&&typeof E.on==="function"&&(!C||typeof E.pause==="function"&&typeof E.resume==="function")&&(!E._writableState||((j=E._readableState)===null||j===void 0?void 0:j.readable)!==!1)&&(!E._writableState||E._readableState))}function R(E){var C;return!!(E&&typeof E.write==="function"&&typeof E.on==="function"&&(!E._readableState||((C=E._writableState)===null||C===void 0?void 0:C.writable)!==!1))}function q(E){return!!(E&&typeof E.pipe==="function"&&E._readableState&&typeof E.on==="function"&&typeof E.write==="function")}function v(E){return E&&(E._readableState||E._writableState||typeof E.write==="function"&&typeof E.on==="function"||typeof E.pipe==="function"&&typeof E.on==="function")}function k(E){return!!(E&&!v(E)&&typeof E.pipeThrough==="function"&&typeof E.getReader==="function"&&typeof E.cancel==="function")}function B(E){return!!(E&&!v(E)&&typeof E.getWriter==="function"&&typeof E.abort==="function")}function _(E){return!!(E&&!v(E)&&typeof E.readable==="object"&&typeof E.writable==="object")}function x(E){return k(E)||B(E)||_(E)}function w(E,C){if(E==null)return!1;if(C===!0)return typeof E[H]==="function";if(C===!1)return typeof E[T]==="function";return typeof E[H]==="function"||typeof E[T]==="function"}function y(E){if(!v(E))return null;let{_writableState:C,_readableState:j}=E,g=C||j;return!!(E.destroyed||E[L]||g!==null&&g!==void 0&&g.destroyed)}function l(E){if(!R(E))return null;if(E.writableEnded===!0)return!0;let C=E._writableState;if(C!==null&&C!==void 0&&C.errored)return!1;if(typeof(C===null||C===void 0?void 0:C.ended)!=="boolean")return null;return C.ended}function J0(E,C){if(!R(E))return null;if(E.writableFinished===!0)return!0;let j=E._writableState;if(j!==null&&j!==void 0&&j.errored)return!1;if(typeof(j===null||j===void 0?void 0:j.finished)!=="boolean")return null;return!!(j.finished||C===!1&&j.ended===!0&&j.length===0)}function K0(E){if(!D(E))return null;if(E.readableEnded===!0)return!0;let C=E._readableState;if(!C||C.errored)return!1;if(typeof(C===null||C===void 0?void 0:C.ended)!=="boolean")return null;return C.ended}function V0(E,C){if(!D(E))return null;let j=E._readableState;if(j!==null&&j!==void 0&&j.errored)return!1;if(typeof(j===null||j===void 0?void 0:j.endEmitted)!=="boolean")return null;return!!(j.endEmitted||C===!1&&j.ended===!0&&j.length===0)}function u(E){if(E&&E[P]!=null)return E[P];if(typeof(E===null||E===void 0?void 0:E.readable)!=="boolean")return null;if(y(E))return!1;return D(E)&&E.readable&&!V0(E)}function X0(E){if(E&&E[S]!=null)return E[S];if(typeof(E===null||E===void 0?void 0:E.writable)!=="boolean")return null;if(y(E))return!1;return R(E)&&E.writable&&!l(E)}function U(E,C){if(!v(E))return null;if(y(E))return!0;if((C===null||C===void 0?void 0:C.readable)!==!1&&u(E))return!1;if((C===null||C===void 0?void 0:C.writable)!==!1&&X0(E))return!1;return!0}function Q(E){var C,j;if(!v(E))return null;if(E.writableErrored)return E.writableErrored;return(C=(j=E._writableState)===null||j===void 0?void 0:j.errored)!==null&&C!==void 0?C:null}function J(E){var C,j;if(!v(E))return null;if(E.readableErrored)return E.readableErrored;return(C=(j=E._readableState)===null||j===void 0?void 0:j.errored)!==null&&C!==void 0?C:null}function Z(E){if(!v(E))return null;if(typeof E.closed==="boolean")return E.closed;let{_writableState:C,_readableState:j}=E;if(typeof(C===null||C===void 0?void 0:C.closed)==="boolean"||typeof(j===null||j===void 0?void 0:j.closed)==="boolean")return(C===null||C===void 0?void 0:C.closed)||(j===null||j===void 0?void 0:j.closed);if(typeof E._closed==="boolean"&&Y(E))return E._closed;return null}function Y(E){return typeof E._closed==="boolean"&&typeof E._defaultKeepAlive==="boolean"&&typeof E._removedConnection==="boolean"&&typeof E._removedContLen==="boolean"}function $(E){return typeof E._sent100==="boolean"&&Y(E)}function F(E){var C;return typeof E._consuming==="boolean"&&typeof E._dumped==="boolean"&&((C=E.req)===null||C===void 0?void 0:C.upgradeOrConnect)===void 0}function G(E){if(!v(E))return null;let{_writableState:C,_readableState:j}=E,g=C||j;return!g&&$(E)||!!(g&&g.autoDestroy&&g.emitClose&&g.closed===!1)}function X(E){var C;return!!(E&&((C=E[M])!==null&&C!==void 0?C:E.readableDidRead||E.readableAborted))}function I(E){var C,j,g,p,n,$0,r,d,Q0,m;return!!(E&&((C=(j=(g=(p=(n=($0=E[V])!==null&&$0!==void 0?$0:E.readableErrored)!==null&&n!==void 0?n:E.writableErrored)!==null&&p!==void 0?p:(r=E._readableState)===null||r===void 0?void 0:r.errorEmitted)!==null&&g!==void 0?g:(d=E._writableState)===null||d===void 0?void 0:d.errorEmitted)!==null&&j!==void 0?j:(Q0=E._readableState)===null||Q0===void 0?void 0:Q0.errored)!==null&&C!==void 0?C:(m=E._writableState)===null||m===void 0?void 0:m.errored))}W.exports={isDestroyed:y,kIsDestroyed:L,isDisturbed:X,kIsDisturbed:M,isErrored:I,kIsErrored:V,isReadable:u,kIsReadable:P,kIsClosedPromise:z,kControllerErrorFunction:A,kIsWritable:S,isClosed:Z,isDuplexNodeStream:q,isFinished:U,isIterable:w,isReadableNodeStream:D,isReadableStream:k,isReadableEnded:K0,isReadableFinished:V0,isReadableErrored:J,isNodeStream:v,isWebStream:x,isWritable:X0,isWritableNodeStream:R,isWritableStream:B,isWritableEnded:l,isWritableFinished:J0,isWritableErrored:Q,isServerRequest:F,isServerResponse:$,willEmitClose:G,isTransformStream:_}}),hU=u0((K,W)=>{var H=nU(),{AbortError:T,codes:O}=zU(),{ERR_INVALID_ARG_TYPE:L,ERR_STREAM_PREMATURE_CLOSE:V}=O,{kEmptyObject:P,once:S}=EU(),{validateAbortSignal:M,validateFunction:z,validateObject:A,validateBoolean:D}=JX(),{Promise:R,PromisePrototypeThen:q,SymbolDispose:v}=o0(),{isClosed:k,isReadable:B,isReadableNodeStream:_,isReadableStream:x,isReadableFinished:w,isReadableErrored:y,isWritable:l,isWritableNodeStream:J0,isWritableStream:K0,isWritableFinished:V0,isWritableErrored:u,isNodeStream:X0,willEmitClose:U,kIsClosedPromise:Q}=gU(),J;function Z(X){return X.setHeader&&typeof X.abort==="function"}var Y=()=>{};function $(X,I,E){var C,j;if(arguments.length===2)E=I,I=P;else if(I==null)I=P;else A(I,"options");if(z(E,"callback"),M(I.signal,"options.signal"),E=S(E),x(X)||K0(X))return F(X,I,E);if(!X0(X))throw new L("stream",["ReadableStream","WritableStream","Stream"],X);let g=(C=I.readable)!==null&&C!==void 0?C:_(X),p=(j=I.writable)!==null&&j!==void 0?j:J0(X),n=X._writableState,$0=X._readableState,r=()=>{if(!X.writable)m()},d=U(X)&&_(X)===g&&J0(X)===p,Q0=V0(X,!1),m=()=>{if(Q0=!0,X.destroyed)d=!1;if(d&&(!X.readable||g))return;if(!g||i)E.call(X)},i=w(X,!1),g0=()=>{if(i=!0,X.destroyed)d=!1;if(d&&(!X.writable||p))return;if(!p||Q0)E.call(X)},f=(c)=>{E.call(X,c)},h=k(X),Y0=()=>{h=!0;let c=u(X)||y(X);if(c&&typeof c!=="boolean")return E.call(X,c);if(g&&!i&&_(X,!0)){if(!w(X,!1))return E.call(X,new V)}if(p&&!Q0){if(!V0(X,!1))return E.call(X,new V)}E.call(X)},t=()=>{h=!0;let c=u(X)||y(X);if(c&&typeof c!=="boolean")return E.call(X,c);E.call(X)},e=()=>{X.req.on("finish",m)};if(Z(X)){if(X.on("complete",m),!d)X.on("abort",Y0);if(X.req)e();else X.on("request",e)}else if(p&&!n)X.on("end",r),X.on("close",r);if(!d&&typeof X.aborted==="boolean")X.on("aborted",Y0);if(X.on("end",g0),X.on("finish",m),I.error!==!1)X.on("error",f);if(X.on("close",Y0),h)H.nextTick(Y0);else if(n!==null&&n!==void 0&&n.errorEmitted||$0!==null&&$0!==void 0&&$0.errorEmitted){if(!d)H.nextTick(t)}else if(!g&&(!d||B(X))&&(Q0||l(X)===!1))H.nextTick(t);else if(!p&&(!d||l(X))&&(i||B(X)===!1))H.nextTick(t);else if($0&&X.req&&X.aborted)H.nextTick(t);let M0=()=>{if(E=Y,X.removeListener("aborted",Y0),X.removeListener("complete",m),X.removeListener("abort",Y0),X.removeListener("request",e),X.req)X.req.removeListener("finish",m);X.removeListener("end",r),X.removeListener("close",r),X.removeListener("finish",m),X.removeListener("end",g0),X.removeListener("error",f),X.removeListener("close",Y0)};if(I.signal&&!h){let c=()=>{let o=E;M0(),o.call(X,new T(void 0,{cause:I.signal.reason}))};if(I.signal.aborted)H.nextTick(c);else{J=J||EU().addAbortListener;let o=J(I.signal,c),N0=E;E=S((...s)=>{o[v](),N0.apply(X,s)})}}return M0}function F(X,I,E){let C=!1,j=Y;if(I.signal)if(j=()=>{C=!0,E.call(X,new T(void 0,{cause:I.signal.reason}))},I.signal.aborted)H.nextTick(j);else{J=J||EU().addAbortListener;let p=J(I.signal,j),n=E;E=S((...$0)=>{p[v](),n.apply(X,$0)})}let g=(...p)=>{if(!C)H.nextTick(()=>E.apply(X,p))};return q(X[Q].promise,g,g),Y}function G(X,I){var E;let C=!1;if(I===null)I=P;if((E=I)!==null&&E!==void 0&&E.cleanup)D(I.cleanup,"cleanup"),C=I.cleanup;return new R((j,g)=>{let p=$(X,I,(n)=>{if(C)p();if(n)g(n);else j()})})}W.exports=$,W.exports.finished=G}),aU=u0((K,W)=>{var H=nU(),{aggregateTwoErrors:T,codes:{ERR_MULTIPLE_CALLBACK:O},AbortError:L}=zU(),{Symbol:V}=o0(),{kIsDestroyed:P,isDestroyed:S,isFinished:M,isServerRequest:z}=gU(),A=V("kDestroy"),D=V("kConstruct");function R(U,Q,J){if(U){if(U.stack,Q&&!Q.errored)Q.errored=U;if(J&&!J.errored)J.errored=U}}function q(U,Q){let J=this._readableState,Z=this._writableState,Y=Z||J;if(Z!==null&&Z!==void 0&&Z.destroyed||J!==null&&J!==void 0&&J.destroyed){if(typeof Q==="function")Q();return this}if(R(U,Z,J),Z)Z.destroyed=!0;if(J)J.destroyed=!0;if(!Y.constructed)this.once(A,function($){v(this,T($,U),Q)});else v(this,U,Q);return this}function v(U,Q,J){let Z=!1;function Y($){if(Z)return;Z=!0;let{_readableState:F,_writableState:G}=U;if(R($,G,F),G)G.closed=!0;if(F)F.closed=!0;if(typeof J==="function")J($);if($)H.nextTick(k,U,$);else H.nextTick(B,U)}try{U._destroy(Q||null,Y)}catch($){Y($)}}function k(U,Q){_(U,Q),B(U)}function B(U){let{_readableState:Q,_writableState:J}=U;if(J)J.closeEmitted=!0;if(Q)Q.closeEmitted=!0;if(J!==null&&J!==void 0&&J.emitClose||Q!==null&&Q!==void 0&&Q.emitClose)U.emit("close")}function _(U,Q){let{_readableState:J,_writableState:Z}=U;if(Z!==null&&Z!==void 0&&Z.errorEmitted||J!==null&&J!==void 0&&J.errorEmitted)return;if(Z)Z.errorEmitted=!0;if(J)J.errorEmitted=!0;U.emit("error",Q)}function x(){let U=this._readableState,Q=this._writableState;if(U)U.constructed=!0,U.closed=!1,U.closeEmitted=!1,U.destroyed=!1,U.errored=null,U.errorEmitted=!1,U.reading=!1,U.ended=U.readable===!1,U.endEmitted=U.readable===!1;if(Q)Q.constructed=!0,Q.destroyed=!1,Q.closed=!1,Q.closeEmitted=!1,Q.errored=null,Q.errorEmitted=!1,Q.finalCalled=!1,Q.prefinished=!1,Q.ended=Q.writable===!1,Q.ending=Q.writable===!1,Q.finished=Q.writable===!1}function w(U,Q,J){let{_readableState:Z,_writableState:Y}=U;if(Y!==null&&Y!==void 0&&Y.destroyed||Z!==null&&Z!==void 0&&Z.destroyed)return this;if(Z!==null&&Z!==void 0&&Z.autoDestroy||Y!==null&&Y!==void 0&&Y.autoDestroy)U.destroy(Q);else if(Q){if(Q.stack,Y&&!Y.errored)Y.errored=Q;if(Z&&!Z.errored)Z.errored=Q;if(J)H.nextTick(_,U,Q);else _(U,Q)}}function y(U,Q){if(typeof U._construct!=="function")return;let{_readableState:J,_writableState:Z}=U;if(J)J.constructed=!1;if(Z)Z.constructed=!1;if(U.once(D,Q),U.listenerCount(D)>1)return;H.nextTick(l,U)}function l(U){let Q=!1;function J(Z){if(Q){w(U,Z!==null&&Z!==void 0?Z:new O);return}Q=!0;let{_readableState:Y,_writableState:$}=U,F=$||Y;if(Y)Y.constructed=!0;if($)$.constructed=!0;if(F.destroyed)U.emit(A,Z);else if(Z)w(U,Z,!0);else H.nextTick(J0,U)}try{U._construct((Z)=>{H.nextTick(J,Z)})}catch(Z){H.nextTick(J,Z)}}function J0(U){U.emit(D)}function K0(U){return(U===null||U===void 0?void 0:U.setHeader)&&typeof U.abort==="function"}function V0(U){U.emit("close")}function u(U,Q){U.emit("error",Q),H.nextTick(V0,U)}function X0(U,Q){if(!U||S(U))return;if(!Q&&!M(U))Q=new L;if(z(U))U.socket=null,U.destroy(Q);else if(K0(U))U.abort();else if(K0(U.req))U.req.abort();else if(typeof U.destroy==="function")U.destroy(Q);else if(typeof U.close==="function")U.close();else if(Q)H.nextTick(u,U,Q);else H.nextTick(V0,U);if(!U.destroyed)U[P]=!0}W.exports={construct:y,destroyer:X0,destroy:q,undestroy:x,errorOrDestroy:w}}),mX=u0((K,W)=>{var{ArrayIsArray:H,ObjectSetPrototypeOf:T}=o0(),{EventEmitter:O}=(QX(),h0(ZX));function L(P){O.call(this,P)}T(L.prototype,O.prototype),T(L,O),L.prototype.pipe=function(P,S){let M=this;function z(B){if(P.writable&&P.write(B)===!1&&M.pause)M.pause()}M.on("data",z);function A(){if(M.readable&&M.resume)M.resume()}if(P.on("drain",A),!P._isStdio&&(!S||S.end!==!1))M.on("end",R),M.on("close",q);let D=!1;function R(){if(D)return;D=!0,P.end()}function q(){if(D)return;if(D=!0,typeof P.destroy==="function")P.destroy()}function v(B){if(k(),O.listenerCount(this,"error")===0)this.emit("error",B)}V(M,"error",v),V(P,"error",v);function k(){M.removeListener("data",z),P.removeListener("drain",A),M.removeListener("end",R),M.removeListener("close",q),M.removeListener("error",v),P.removeListener("error",v),M.removeListener("end",k),M.removeListener("close",k),P.removeListener("close",k)}return M.on("end",k),M.on("close",k),P.on("close",k),P.emit("pipe",M),P};function V(P,S,M){if(typeof P.prependListener==="function")return P.prependListener(S,M);if(!P._events||!P._events[S])P.on(S,M);else if(H(P._events[S]))P._events[S].unshift(M);else P._events[S]=[M,P._events[S]]}W.exports={Stream:L,prependListener:V}}),TX=u0((K,W)=>{var{SymbolDispose:H}=o0(),{AbortError:T,codes:O}=zU(),{isNodeStream:L,isWebStream:V,kControllerErrorFunction:P}=gU(),S=hU(),{ERR_INVALID_ARG_TYPE:M}=O,z,A=(D,R)=>{if(typeof D!=="object"||!("aborted"in D))throw new M(R,"AbortSignal",D)};W.exports.addAbortSignal=function(D,R){if(A(D,"signal"),!L(R)&&!V(R))throw new M("stream",["ReadableStream","WritableStream","Stream"],R);return W.exports.addAbortSignalNoValidate(D,R)},W.exports.addAbortSignalNoValidate=function(D,R){if(typeof D!=="object"||!("aborted"in D))return R;let q=L(R)?()=>{R.destroy(new T(void 0,{cause:D.reason}))}:()=>{R[P](new T(void 0,{cause:D.reason}))};if(D.aborted)q();else{z=z||EU().addAbortListener;let v=z(D,q);S(R,v[H])}return R}}),eY=u0((K,W)=>{var{StringPrototypeSlice:H,SymbolIterator:T,TypedArrayPrototypeSet:O,Uint8Array:L}=o0(),{Buffer:V}=(OU(),h0(HU)),{inspect:P}=EU();W.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(S){let M={data:S,next:null};if(this.length>0)this.tail.next=M;else this.head=M;this.tail=M,++this.length}unshift(S){let M={data:S,next:this.head};if(this.length===0)this.tail=M;this.head=M,++this.length}shift(){if(this.length===0)return;let S=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,S}clear(){this.head=this.tail=null,this.length=0}join(S){if(this.length===0)return"";let M=this.head,z=""+M.data;while((M=M.next)!==null)z+=S+M.data;return z}concat(S){if(this.length===0)return V.alloc(0);let M=V.allocUnsafe(S>>>0),z=this.head,A=0;while(z)O(M,z.data,A),A+=z.data.length,z=z.next;return M}consume(S,M){let z=this.head.data;if(S<z.length){let A=z.slice(0,S);return this.head.data=z.slice(S),A}if(S===z.length)return this.shift();return M?this._getString(S):this._getBuffer(S)}first(){return this.head.data}*[T](){for(let S=this.head;S;S=S.next)yield S.data}_getString(S){let M="",z=this.head,A=0;do{let D=z.data;if(S>D.length)M+=D,S-=D.length;else{if(S===D.length)if(M+=D,++A,z.next)this.head=z.next;else this.head=this.tail=null;else M+=H(D,0,S),this.head=z,z.data=H(D,S);break}++A}while((z=z.next)!==null);return this.length-=A,M}_getBuffer(S){let M=V.allocUnsafe(S),z=S,A=this.head,D=0;do{let R=A.data;if(S>R.length)O(M,R,z-S),S-=R.length;else{if(S===R.length)if(O(M,R,z-S),++D,A.next)this.head=A.next;else this.head=this.tail=null;else O(M,new L(R.buffer,R.byteOffset,S),z-S),this.head=A,A.data=R.slice(S);break}++D}while((A=A.next)!==null);return this.length-=D,M}[Symbol.for("nodejs.util.inspect.custom")](S,M){return P(this,{...M,depth:0,customInspect:!1})}}}),DX=u0((K,W)=>{var{MathFloor:H,NumberIsInteger:T}=o0(),{validateInteger:O}=JX(),{ERR_INVALID_ARG_VALUE:L}=zU().codes,V=16384,P=16;function S(D,R,q){return D.highWaterMark!=null?D.highWaterMark:R?D[q]:null}function M(D){return D?P:V}function z(D,R){if(O(R,"value",0),D)P=R;else V=R}function A(D,R,q,v){let k=S(R,v,q);if(k!=null){if(!T(k)||k<0){let B=v?`options.${q}`:"options.highWaterMark";throw new L(B,k)}return H(k)}return M(D.objectMode)}W.exports={getHighWaterMark:A,getDefaultHighWaterMark:M,setDefaultHighWaterMark:z}}),iY=u0((K,W)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var H=(OU(),h0(HU)),T=H.Buffer;function O(V,P){for(var S in V)P[S]=V[S]}if(T.from&&T.alloc&&T.allocUnsafe&&T.allocUnsafeSlow)W.exports=H;else O(H,K),K.Buffer=L;function L(V,P,S){return T(V,P,S)}L.prototype=Object.create(T.prototype),O(T,L),L.from=function(V,P,S){if(typeof V==="number")throw TypeError("Argument must not be a number");return T(V,P,S)},L.alloc=function(V,P,S){if(typeof V!=="number")throw TypeError("Argument must be a number");var M=T(V);if(P!==void 0)if(typeof S==="string")M.fill(P,S);else M.fill(P);else M.fill(0);return M},L.allocUnsafe=function(V){if(typeof V!=="number")throw TypeError("Argument must be a number");return T(V)},L.allocUnsafeSlow=function(V){if(typeof V!=="number")throw TypeError("Argument must be a number");return H.SlowBuffer(V)}}),UJ=u0((K)=>{var W=iY().Buffer,H=W.isEncoding||function(_){switch(_=""+_,_&&_.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function T(_){if(!_)return"utf8";var x;while(!0)switch(_){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return _;default:if(x)return;_=(""+_).toLowerCase(),x=!0}}function O(_){var x=T(_);if(typeof x!=="string"&&(W.isEncoding===H||!H(_)))throw Error("Unknown encoding: "+_);return x||_}K.StringDecoder=L;function L(_){this.encoding=O(_);var x;switch(this.encoding){case"utf16le":this.text=D,this.end=R,x=4;break;case"utf8":this.fillLast=M,x=4;break;case"base64":this.text=q,this.end=v,x=3;break;default:this.write=k,this.end=B;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=W.allocUnsafe(x)}L.prototype.write=function(_){if(_.length===0)return"";var x,w;if(this.lastNeed){if(x=this.fillLast(_),x===void 0)return"";w=this.lastNeed,this.lastNeed=0}else w=0;if(w<_.length)return x?x+this.text(_,w):this.text(_,w);return x||""},L.prototype.end=A,L.prototype.text=z,L.prototype.fillLast=function(_){if(this.lastNeed<=_.length)return _.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);_.copy(this.lastChar,this.lastTotal-this.lastNeed,0,_.length),this.lastNeed-=_.length};function V(_){if(_<=127)return 0;else if(_>>5===6)return 2;else if(_>>4===14)return 3;else if(_>>3===30)return 4;return _>>6===2?-1:-2}function P(_,x,w){var y=x.length-1;if(y<w)return 0;var l=V(x[y]);if(l>=0){if(l>0)_.lastNeed=l-1;return l}if(--y<w||l===-2)return 0;if(l=V(x[y]),l>=0){if(l>0)_.lastNeed=l-2;return l}if(--y<w||l===-2)return 0;if(l=V(x[y]),l>=0){if(l>0)if(l===2)l=0;else _.lastNeed=l-3;return l}return 0}function S(_,x,w){if((x[0]&192)!==128)return _.lastNeed=0,"�";if(_.lastNeed>1&&x.length>1){if((x[1]&192)!==128)return _.lastNeed=1,"�";if(_.lastNeed>2&&x.length>2){if((x[2]&192)!==128)return _.lastNeed=2,"�"}}}function M(_){var x=this.lastTotal-this.lastNeed,w=S(this,_,x);if(w!==void 0)return w;if(this.lastNeed<=_.length)return _.copy(this.lastChar,x,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);_.copy(this.lastChar,x,0,_.length),this.lastNeed-=_.length}function z(_,x){var w=P(this,_,x);if(!this.lastNeed)return _.toString("utf8",x);this.lastTotal=w;var y=_.length-(w-this.lastNeed);return _.copy(this.lastChar,0,y),_.toString("utf8",x,y)}function A(_){var x=_&&_.length?this.write(_):"";if(this.lastNeed)return x+"�";return x}function D(_,x){if((_.length-x)%2===0){var w=_.toString("utf16le",x);if(w){var y=w.charCodeAt(w.length-1);if(y>=55296&&y<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=_[_.length-2],this.lastChar[1]=_[_.length-1],w.slice(0,-1)}return w}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=_[_.length-1],_.toString("utf16le",x,_.length-1)}function R(_){var x=_&&_.length?this.write(_):"";if(this.lastNeed){var w=this.lastTotal-this.lastNeed;return x+this.lastChar.toString("utf16le",0,w)}return x}function q(_,x){var w=(_.length-x)%3;if(w===0)return _.toString("base64",x);if(this.lastNeed=3-w,this.lastTotal=3,w===1)this.lastChar[0]=_[_.length-1];else this.lastChar[0]=_[_.length-2],this.lastChar[1]=_[_.length-1];return _.toString("base64",x,_.length-w)}function v(_){var x=_&&_.length?this.write(_):"";if(this.lastNeed)return x+this.lastChar.toString("base64",0,3-this.lastNeed);return x}function k(_){return _.toString(this.encoding)}function B(_){return _&&_.length?this.write(_):""}}),iZ=u0((K,W)=>{var H=nU(),{PromisePrototypeThen:T,SymbolAsyncIterator:O,SymbolIterator:L}=o0(),{Buffer:V}=(OU(),h0(HU)),{ERR_INVALID_ARG_TYPE:P,ERR_STREAM_NULL_VALUES:S}=zU().codes;function M(z,A,D){let R;if(typeof A==="string"||A instanceof V)return new z({objectMode:!0,...D,read(){this.push(A),this.push(null)}});let q;if(A&&A[O])q=!0,R=A[O]();else if(A&&A[L])q=!1,R=A[L]();else throw new P("iterable",["Iterable"],A);let v=new z({objectMode:!0,highWaterMark:1,...D}),k=!1;v._read=function(){if(!k)k=!0,_()},v._destroy=function(x,w){T(B(x),()=>H.nextTick(w,x),(y)=>H.nextTick(w,y||x))};async function B(x){let w=x!==void 0&&x!==null,y=typeof R.throw==="function";if(w&&y){let{value:l,done:J0}=await R.throw(x);if(await l,J0)return}if(typeof R.return==="function"){let{value:l}=await R.return();await l}}async function _(){for(;;){try{let{value:x,done:w}=q?await R.next():R.next();if(w)v.push(null);else{let y=x&&typeof x.then==="function"?await x:x;if(y===null)throw k=!1,new S;else if(v.push(y))continue;else k=!1}}catch(x){v.destroy(x)}break}}return v}W.exports=M}),zX=u0((K,W)=>{var H=nU(),{ArrayPrototypeIndexOf:T,NumberIsInteger:O,NumberIsNaN:L,NumberParseInt:V,ObjectDefineProperties:P,ObjectKeys:S,ObjectSetPrototypeOf:M,Promise:z,SafeSet:A,SymbolAsyncDispose:D,SymbolAsyncIterator:R,Symbol:q}=o0();W.exports=s,s.ReadableState=N0;var{EventEmitter:v}=(QX(),h0(ZX)),{Stream:k,prependListener:B}=mX(),{Buffer:_}=(OU(),h0(HU)),{addAbortSignal:x}=TX(),w=hU(),y=EU().debuglog("stream",(N)=>{y=N}),l=eY(),J0=aU(),{getHighWaterMark:K0,getDefaultHighWaterMark:V0}=DX(),{aggregateTwoErrors:u,codes:{ERR_INVALID_ARG_TYPE:X0,ERR_METHOD_NOT_IMPLEMENTED:U,ERR_OUT_OF_RANGE:Q,ERR_STREAM_PUSH_AFTER_EOF:J,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:Z},AbortError:Y}=zU(),{validateObject:$}=JX(),F=q("kPaused"),{StringDecoder:G}=UJ(),X=iZ();M(s.prototype,k.prototype),M(s,k);var I=()=>{},{errorOrDestroy:E}=J0,C=1,j=2,g=4,p=8,n=16,$0=32,r=64,d=128,Q0=256,m=512,i=1024,g0=2048,f=4096,h=8192,Y0=16384,t=32768,e=65536,M0=131072,c=262144;function o(N){return{enumerable:!1,get(){return(this.state&N)!==0},set(b){if(b)this.state|=N;else this.state&=~N}}}P(N0.prototype,{objectMode:o(C),ended:o(j),endEmitted:o(g),reading:o(p),constructed:o(n),sync:o($0),needReadable:o(r),emittedReadable:o(d),readableListening:o(Q0),resumeScheduled:o(m),errorEmitted:o(i),emitClose:o(g0),autoDestroy:o(f),destroyed:o(h),closed:o(Y0),closeEmitted:o(t),multiAwaitDrain:o(e),readingMore:o(M0),dataEmitted:o(c)});function N0(N,b,a){if(typeof a!=="boolean")a=b instanceof NU();if(this.state=g0|f|n|$0,N&&N.objectMode)this.state|=C;if(a&&N&&N.readableObjectMode)this.state|=C;if(this.highWaterMark=N?K0(this,N,"readableHighWaterMark",a):V0(!1),this.buffer=new l,this.length=0,this.pipes=[],this.flowing=null,this[F]=null,N&&N.emitClose===!1)this.state&=~g0;if(N&&N.autoDestroy===!1)this.state&=~f;if(this.errored=null,this.defaultEncoding=N&&N.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,N&&N.encoding)this.decoder=new G(N.encoding),this.encoding=N.encoding}function s(N){if(!(this instanceof s))return new s(N);let b=this instanceof NU();if(this._readableState=new N0(N,this,b),N){if(typeof N.read==="function")this._read=N.read;if(typeof N.destroy==="function")this._destroy=N.destroy;if(typeof N.construct==="function")this._construct=N.construct;if(N.signal&&!b)x(N.signal,this)}k.call(this,N),J0.construct(this,()=>{if(this._readableState.needReadable)D0(this,this._readableState)})}s.prototype.destroy=J0.destroy,s.prototype._undestroy=J0.undestroy,s.prototype._destroy=function(N,b){b(N)},s.prototype[v.captureRejectionSymbol]=function(N){this.destroy(N)},s.prototype[D]=function(){let N;if(!this.destroyed)N=this.readableEnded?null:new Y,this.destroy(N);return new z((b,a)=>w(this,(U0)=>U0&&U0!==N?a(U0):b(null)))},s.prototype.push=function(N,b){return Z0(this,N,b,!1)},s.prototype.unshift=function(N,b){return Z0(this,N,b,!0)};function Z0(N,b,a,U0){y("readableAddChunk",b);let w0=N._readableState,F0;if((w0.state&C)===0){if(typeof b==="string"){if(a=a||w0.defaultEncoding,w0.encoding!==a)if(U0&&w0.encoding)b=_.from(b,a).toString(w0.encoding);else b=_.from(b,a),a=""}else if(b instanceof _)a="";else if(k._isUint8Array(b))b=k._uint8ArrayToBuffer(b),a="";else if(b!=null)F0=new X0("chunk",["string","Buffer","Uint8Array"],b)}if(F0)E(N,F0);else if(b===null)w0.state&=~p,W0(N,w0);else if((w0.state&C)!==0||b&&b.length>0)if(U0)if((w0.state&g)!==0)E(N,new Z);else if(w0.destroyed||w0.errored)return!1;else y0(N,w0,b,!0);else if(w0.ended)E(N,new J);else if(w0.destroyed||w0.errored)return!1;else if(w0.state&=~p,w0.decoder&&!a)if(b=w0.decoder.write(b),w0.objectMode||b.length!==0)y0(N,w0,b,!1);else D0(N,w0);else y0(N,w0,b,!1);else if(!U0)w0.state&=~p,D0(N,w0);return!w0.ended&&(w0.length<w0.highWaterMark||w0.length===0)}function y0(N,b,a,U0){if(b.flowing&&b.length===0&&!b.sync&&N.listenerCount("data")>0){if((b.state&e)!==0)b.awaitDrainWriters.clear();else b.awaitDrainWriters=null;b.dataEmitted=!0,N.emit("data",a)}else{if(b.length+=b.objectMode?1:a.length,U0)b.buffer.unshift(a);else b.buffer.push(a);if((b.state&r)!==0)A0(N)}D0(N,b)}s.prototype.isPaused=function(){let N=this._readableState;return N[F]===!0||N.flowing===!1},s.prototype.setEncoding=function(N){let b=new G(N);this._readableState.decoder=b,this._readableState.encoding=this._readableState.decoder.encoding;let a=this._readableState.buffer,U0="";for(let w0 of a)U0+=b.write(w0);if(a.clear(),U0!=="")a.push(U0);return this._readableState.length=U0.length,this};var H0=1073741824;function O0(N){if(N>H0)throw new Q("size","<= 1GiB",N);else N--,N|=N>>>1,N|=N>>>2,N|=N>>>4,N|=N>>>8,N|=N>>>16,N++;return N}function n0(N,b){if(N<=0||b.length===0&&b.ended)return 0;if((b.state&C)!==0)return 1;if(L(N)){if(b.flowing&&b.length)return b.buffer.first().length;return b.length}if(N<=b.length)return N;return b.ended?b.length:0}s.prototype.read=function(N){if(y("read",N),N===void 0)N=NaN;else if(!O(N))N=V(N,10);let b=this._readableState,a=N;if(N>b.highWaterMark)b.highWaterMark=O0(N);if(N!==0)b.state&=~d;if(N===0&&b.needReadable&&((b.highWaterMark!==0?b.length>=b.highWaterMark:b.length>0)||b.ended)){if(y("read: emitReadable",b.length,b.ended),b.length===0&&b.ended)$U(this);else A0(this);return null}if(N=n0(N,b),N===0&&b.ended){if(b.length===0)$U(this);return null}let U0=(b.state&r)!==0;if(y("need readable",U0),b.length===0||b.length-N<b.highWaterMark)U0=!0,y("length less than watermark",U0);if(b.ended||b.reading||b.destroyed||b.errored||!b.constructed)U0=!1,y("reading, ended or constructing",U0);else if(U0){if(y("do read"),b.state|=p|$0,b.length===0)b.state|=r;try{this._read(b.highWaterMark)}catch(F0){E(this,F0)}if(b.state&=~$0,!b.reading)N=n0(a,b)}let w0;if(N>0)w0=R0(N,b);else w0=null;if(w0===null)b.needReadable=b.length<=b.highWaterMark,N=0;else if(b.length-=N,b.multiAwaitDrain)b.awaitDrainWriters.clear();else b.awaitDrainWriters=null;if(b.length===0){if(!b.ended)b.needReadable=!0;if(a!==N&&b.ended)$U(this)}if(w0!==null&&!b.errorEmitted&&!b.closeEmitted)b.dataEmitted=!0,this.emit("data",w0);return w0};function W0(N,b){if(y("onEofChunk"),b.ended)return;if(b.decoder){let a=b.decoder.end();if(a&&a.length)b.buffer.push(a),b.length+=b.objectMode?1:a.length}if(b.ended=!0,b.sync)A0(N);else b.needReadable=!1,b.emittedReadable=!0,t0(N)}function A0(N){let b=N._readableState;if(y("emitReadable",b.needReadable,b.emittedReadable),b.needReadable=!1,!b.emittedReadable)y("emitReadable",b.flowing),b.emittedReadable=!0,H.nextTick(t0,N)}function t0(N){let b=N._readableState;if(y("emitReadable_",b.destroyed,b.length,b.ended),!b.destroyed&&!b.errored&&(b.length||b.ended))N.emit("readable"),b.emittedReadable=!1;b.needReadable=!b.flowing&&!b.ended&&b.length<=b.highWaterMark,E0(N)}function D0(N,b){if(!b.readingMore&&b.constructed)b.readingMore=!0,H.nextTick(T0,N,b)}function T0(N,b){while(!b.reading&&!b.ended&&(b.length<b.highWaterMark||b.flowing&&b.length===0)){let a=b.length;if(y("maybeReadMore read 0"),N.read(0),a===b.length)break}b.readingMore=!1}s.prototype._read=function(N){throw new U("_read()")},s.prototype.pipe=function(N,b){let a=this,U0=this._readableState;if(U0.pipes.length===1){if(!U0.multiAwaitDrain)U0.multiAwaitDrain=!0,U0.awaitDrainWriters=new A(U0.awaitDrainWriters?[U0.awaitDrainWriters]:[])}U0.pipes.push(N),y("pipe count=%d opts=%j",U0.pipes.length,b);let w0=(!b||b.end!==!1)&&N!==H.stdout&&N!==H.stderr?C0:f0;if(U0.endEmitted)H.nextTick(w0);else a.once("end",w0);N.on("unpipe",F0);function F0(d0,b0){if(y("onunpipe"),d0===a){if(b0&&b0.hasUnpiped===!1)b0.hasUnpiped=!0,x0()}}function C0(){y("onend"),N.end()}let m0,S0=!1;function x0(){if(y("cleanup"),N.removeListener("close",s0),N.removeListener("finish",c0),m0)N.removeListener("drain",m0);if(N.removeListener("error",z0),N.removeListener("unpipe",F0),a.removeListener("end",C0),a.removeListener("end",f0),a.removeListener("data",P0),S0=!0,m0&&U0.awaitDrainWriters&&(!N._writableState||N._writableState.needDrain))m0()}function CU(){if(!S0){if(U0.pipes.length===1&&U0.pipes[0]===N)y("false write response, pause",0),U0.awaitDrainWriters=N,U0.multiAwaitDrain=!1;else if(U0.pipes.length>1&&U0.pipes.includes(N))y("false write response, pause",U0.awaitDrainWriters.size),U0.awaitDrainWriters.add(N);a.pause()}if(!m0)m0=TU(a,N),N.on("drain",m0)}a.on("data",P0);function P0(d0){y("ondata");let b0=N.write(d0);if(y("dest.write",b0),b0===!1)CU()}function z0(d0){if(y("onerror",d0),f0(),N.removeListener("error",z0),N.listenerCount("error")===0){let b0=N._writableState||N._readableState;if(b0&&!b0.errorEmitted)E(N,d0);else N.emit("error",d0)}}B(N,"error",z0);function s0(){N.removeListener("finish",c0),f0()}N.once("close",s0);function c0(){y("onfinish"),N.removeListener("close",s0),f0()}N.once("finish",c0);function f0(){y("unpipe"),a.unpipe(N)}if(N.emit("pipe",a),N.writableNeedDrain===!0)CU();else if(!U0.flowing)y("pipe resume"),a.resume();return N};function TU(N,b){return function(){let a=N._readableState;if(a.awaitDrainWriters===b)y("pipeOnDrain",1),a.awaitDrainWriters=null;else if(a.multiAwaitDrain)y("pipeOnDrain",a.awaitDrainWriters.size),a.awaitDrainWriters.delete(b);if((!a.awaitDrainWriters||a.awaitDrainWriters.size===0)&&N.listenerCount("data"))N.resume()}}s.prototype.unpipe=function(N){let b=this._readableState,a={hasUnpiped:!1};if(b.pipes.length===0)return this;if(!N){let w0=b.pipes;b.pipes=[],this.pause();for(let F0=0;F0<w0.length;F0++)w0[F0].emit("unpipe",this,{hasUnpiped:!1});return this}let U0=T(b.pipes,N);if(U0===-1)return this;if(b.pipes.splice(U0,1),b.pipes.length===0)this.pause();return N.emit("unpipe",this,a),this},s.prototype.on=function(N,b){let a=k.prototype.on.call(this,N,b),U0=this._readableState;if(N==="data"){if(U0.readableListening=this.listenerCount("readable")>0,U0.flowing!==!1)this.resume()}else if(N==="readable"){if(!U0.endEmitted&&!U0.readableListening){if(U0.readableListening=U0.needReadable=!0,U0.flowing=!1,U0.emittedReadable=!1,y("on readable",U0.length,U0.reading),U0.length)A0(this);else if(!U0.reading)H.nextTick(k0,this)}}return a},s.prototype.addListener=s.prototype.on,s.prototype.removeListener=function(N,b){let a=k.prototype.removeListener.call(this,N,b);if(N==="readable")H.nextTick(L0,this);return a},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(N){let b=k.prototype.removeAllListeners.apply(this,arguments);if(N==="readable"||N===void 0)H.nextTick(L0,this);return b};function L0(N){let b=N._readableState;if(b.readableListening=N.listenerCount("readable")>0,b.resumeScheduled&&b[F]===!1)b.flowing=!0;else if(N.listenerCount("data")>0)N.resume();else if(!b.readableListening)b.flowing=null}function k0(N){y("readable nexttick read 0"),N.read(0)}s.prototype.resume=function(){let N=this._readableState;if(!N.flowing)y("resume"),N.flowing=!N.readableListening,DU(this,N);return N[F]=!1,this};function DU(N,b){if(!b.resumeScheduled)b.resumeScheduled=!0,H.nextTick(j0,N,b)}function j0(N,b){if(y("resume",b.reading),!b.reading)N.read(0);if(b.resumeScheduled=!1,N.emit("resume"),E0(N),b.flowing&&!b.reading)N.read(0)}s.prototype.pause=function(){if(y("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)y("pause"),this._readableState.flowing=!1,this.emit("pause");return this._readableState[F]=!0,this};function E0(N){let b=N._readableState;y("flow",b.flowing);while(b.flowing&&N.read()!==null);}s.prototype.wrap=function(N){let b=!1;N.on("data",(U0)=>{if(!this.push(U0)&&N.pause)b=!0,N.pause()}),N.on("end",()=>{this.push(null)}),N.on("error",(U0)=>{E(this,U0)}),N.on("close",()=>{this.destroy()}),N.on("destroy",()=>{this.destroy()}),this._read=()=>{if(b&&N.resume)b=!1,N.resume()};let a=S(N);for(let U0=1;U0<a.length;U0++){let w0=a[U0];if(this[w0]===void 0&&typeof N[w0]==="function")this[w0]=N[w0].bind(N)}return this},s.prototype[R]=function(){return AU(this)},s.prototype.iterator=function(N){if(N!==void 0)$(N,"options");return AU(this,N)};function AU(N,b){if(typeof N.read!=="function")N=s.wrap(N,{objectMode:!0});let a=v0(N,b);return a.stream=N,a}async function*v0(N,b){let a=I;function U0(C0){if(this===N)a(),a=I;else a=C0}N.on("readable",U0);let w0,F0=w(N,{writable:!1},(C0)=>{w0=C0?u(w0,C0):null,a(),a=I});try{while(!0){let C0=N.destroyed?null:N.read();if(C0!==null)yield C0;else if(w0)throw w0;else if(w0===null)return;else await new z(U0)}}catch(C0){throw w0=u(w0,C0),w0}finally{if((w0||(b===null||b===void 0?void 0:b.destroyOnReturn)!==!1)&&(w0===void 0||N._readableState.autoDestroy))J0.destroyer(N,null);else N.off("readable",U0),F0()}}P(s.prototype,{readable:{__proto__:null,get(){let N=this._readableState;return!!N&&N.readable!==!1&&!N.destroyed&&!N.errorEmitted&&!N.endEmitted},set(N){if(this._readableState)this._readableState.readable=!!N}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(N){if(this._readableState)this._readableState.flowing=N}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(N){if(!this._readableState)return;this._readableState.destroyed=N}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),P(N0.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[F]!==!1},set(N){this[F]=!!N}}}),s._fromList=R0;function R0(N,b){if(b.length===0)return null;let a;if(b.objectMode)a=b.buffer.shift();else if(!N||N>=b.length){if(b.decoder)a=b.buffer.join("");else if(b.buffer.length===1)a=b.buffer.first();else a=b.buffer.concat(b.length);b.buffer.clear()}else a=b.buffer.consume(N,b.decoder);return a}function $U(N){let b=N._readableState;if(y("endReadable",b.endEmitted),!b.endEmitted)b.ended=!0,H.nextTick(_0,b,N)}function _0(N,b){if(y("endReadableNT",N.endEmitted,N.length),!N.errored&&!N.closeEmitted&&!N.endEmitted&&N.length===0){if(N.endEmitted=!0,b.emit("end"),b.writable&&b.allowHalfOpen===!1)H.nextTick(B0,b);else if(N.autoDestroy){let a=b._writableState;if(!a||a.autoDestroy&&(a.finished||a.writable===!1))b.destroy()}}}function B0(N){if(N.writable&&!N.writableEnded&&!N.destroyed)N.end()}s.from=function(N,b){return X(s,N,b)};var WU;function q0(){if(WU===void 0)WU={};return WU}s.fromWeb=function(N,b){return q0().newStreamReadableFromReadableStream(N,b)},s.toWeb=function(N,b){return q0().newReadableStreamFromStreamReadable(N,b)},s.wrap=function(N,b){var a,U0;return new s({objectMode:(a=(U0=N.readableObjectMode)!==null&&U0!==void 0?U0:N.objectMode)!==null&&a!==void 0?a:!0,...b,destroy(w0,F0){J0.destroyer(N,w0),F0(w0)}}).wrap(N)}}),sX=u0((K,W)=>{var H=nU(),{ArrayPrototypeSlice:T,Error:O,FunctionPrototypeSymbolHasInstance:L,ObjectDefineProperty:V,ObjectDefineProperties:P,ObjectSetPrototypeOf:S,StringPrototypeToLowerCase:M,Symbol:z,SymbolHasInstance:A}=o0();W.exports=$,$.WritableState=Z;var{EventEmitter:D}=(QX(),h0(ZX)),R=mX().Stream,{Buffer:q}=(OU(),h0(HU)),v=aU(),{addAbortSignal:k}=TX(),{getHighWaterMark:B,getDefaultHighWaterMark:_}=DX(),{ERR_INVALID_ARG_TYPE:x,ERR_METHOD_NOT_IMPLEMENTED:w,ERR_MULTIPLE_CALLBACK:y,ERR_STREAM_CANNOT_PIPE:l,ERR_STREAM_DESTROYED:J0,ERR_STREAM_ALREADY_FINISHED:K0,ERR_STREAM_NULL_VALUES:V0,ERR_STREAM_WRITE_AFTER_END:u,ERR_UNKNOWN_ENCODING:X0}=zU().codes,{errorOrDestroy:U}=v;S($.prototype,R.prototype),S($,R);function Q(){}var J=z("kOnFinished");function Z(f,h,Y0){if(typeof Y0!=="boolean")Y0=h instanceof NU();if(this.objectMode=!!(f&&f.objectMode),Y0)this.objectMode=this.objectMode||!!(f&&f.writableObjectMode);this.highWaterMark=f?B(this,f,"writableHighWaterMark",Y0):_(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let t=!!(f&&f.decodeStrings===!1);this.decodeStrings=!t,this.defaultEncoding=f&&f.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=E.bind(void 0,h),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,Y(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!f||f.emitClose!==!1,this.autoDestroy=!f||f.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[J]=[]}function Y(f){f.buffered=[],f.bufferedIndex=0,f.allBuffers=!0,f.allNoop=!0}Z.prototype.getBuffer=function(){return T(this.buffered,this.bufferedIndex)},V(Z.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function $(f){let h=this instanceof NU();if(!h&&!L($,this))return new $(f);if(this._writableState=new Z(f,this,h),f){if(typeof f.write==="function")this._write=f.write;if(typeof f.writev==="function")this._writev=f.writev;if(typeof f.destroy==="function")this._destroy=f.destroy;if(typeof f.final==="function")this._final=f.final;if(typeof f.construct==="function")this._construct=f.construct;if(f.signal)k(f.signal,this)}R.call(this,f),v.construct(this,()=>{let Y0=this._writableState;if(!Y0.writing)p(this,Y0);d(this,Y0)})}V($,A,{__proto__:null,value:function(f){if(L(this,f))return!0;if(this!==$)return!1;return f&&f._writableState instanceof Z}}),$.prototype.pipe=function(){U(this,new l)};function F(f,h,Y0,t){let e=f._writableState;if(typeof Y0==="function")t=Y0,Y0=e.defaultEncoding;else{if(!Y0)Y0=e.defaultEncoding;else if(Y0!=="buffer"&&!q.isEncoding(Y0))throw new X0(Y0);if(typeof t!=="function")t=Q}if(h===null)throw new V0;else if(!e.objectMode)if(typeof h==="string"){if(e.decodeStrings!==!1)h=q.from(h,Y0),Y0="buffer"}else if(h instanceof q)Y0="buffer";else if(R._isUint8Array(h))h=R._uint8ArrayToBuffer(h),Y0="buffer";else throw new x("chunk",["string","Buffer","Uint8Array"],h);let M0;if(e.ending)M0=new u;else if(e.destroyed)M0=new J0("write");if(M0)return H.nextTick(t,M0),U(f,M0,!0),M0;return e.pendingcb++,G(f,e,h,Y0,t)}$.prototype.write=function(f,h,Y0){return F(this,f,h,Y0)===!0},$.prototype.cork=function(){this._writableState.corked++},$.prototype.uncork=function(){let f=this._writableState;if(f.corked){if(f.corked--,!f.writing)p(this,f)}},$.prototype.setDefaultEncoding=function(f){if(typeof f==="string")f=M(f);if(!q.isEncoding(f))throw new X0(f);return this._writableState.defaultEncoding=f,this};function G(f,h,Y0,t,e){let M0=h.objectMode?1:Y0.length;h.length+=M0;let c=h.length<h.highWaterMark;if(!c)h.needDrain=!0;if(h.writing||h.corked||h.errored||!h.constructed){if(h.buffered.push({chunk:Y0,encoding:t,callback:e}),h.allBuffers&&t!=="buffer")h.allBuffers=!1;if(h.allNoop&&e!==Q)h.allNoop=!1}else h.writelen=M0,h.writecb=e,h.writing=!0,h.sync=!0,f._write(Y0,t,h.onwrite),h.sync=!1;return c&&!h.errored&&!h.destroyed}function X(f,h,Y0,t,e,M0,c){if(h.writelen=t,h.writecb=c,h.writing=!0,h.sync=!0,h.destroyed)h.onwrite(new J0("write"));else if(Y0)f._writev(e,h.onwrite);else f._write(e,M0,h.onwrite);h.sync=!1}function I(f,h,Y0,t){--h.pendingcb,t(Y0),g(h),U(f,Y0)}function E(f,h){let Y0=f._writableState,t=Y0.sync,e=Y0.writecb;if(typeof e!=="function"){U(f,new y);return}if(Y0.writing=!1,Y0.writecb=null,Y0.length-=Y0.writelen,Y0.writelen=0,h){if(h.stack,!Y0.errored)Y0.errored=h;if(f._readableState&&!f._readableState.errored)f._readableState.errored=h;if(t)H.nextTick(I,f,Y0,h,e);else I(f,Y0,h,e)}else{if(Y0.buffered.length>Y0.bufferedIndex)p(f,Y0);if(t)if(Y0.afterWriteTickInfo!==null&&Y0.afterWriteTickInfo.cb===e)Y0.afterWriteTickInfo.count++;else Y0.afterWriteTickInfo={count:1,cb:e,stream:f,state:Y0},H.nextTick(C,Y0.afterWriteTickInfo);else j(f,Y0,1,e)}}function C({stream:f,state:h,count:Y0,cb:t}){return h.afterWriteTickInfo=null,j(f,h,Y0,t)}function j(f,h,Y0,t){if(!h.ending&&!f.destroyed&&h.length===0&&h.needDrain)h.needDrain=!1,f.emit("drain");while(Y0-- >0)h.pendingcb--,t();if(h.destroyed)g(h);d(f,h)}function g(f){if(f.writing)return;for(let e=f.bufferedIndex;e<f.buffered.length;++e){var h;let{chunk:M0,callback:c}=f.buffered[e],o=f.objectMode?1:M0.length;f.length-=o,c((h=f.errored)!==null&&h!==void 0?h:new J0("write"))}let Y0=f[J].splice(0);for(let e=0;e<Y0.length;e++){var t;Y0[e]((t=f.errored)!==null&&t!==void 0?t:new J0("end"))}Y(f)}function p(f,h){if(h.corked||h.bufferProcessing||h.destroyed||!h.constructed)return;let{buffered:Y0,bufferedIndex:t,objectMode:e}=h,M0=Y0.length-t;if(!M0)return;let c=t;if(h.bufferProcessing=!0,M0>1&&f._writev){h.pendingcb-=M0-1;let o=h.allNoop?Q:(s)=>{for(let Z0=c;Z0<Y0.length;++Z0)Y0[Z0].callback(s)},N0=h.allNoop&&c===0?Y0:T(Y0,c);N0.allBuffers=h.allBuffers,X(f,h,!0,h.length,N0,"",o),Y(h)}else{do{let{chunk:o,encoding:N0,callback:s}=Y0[c];Y0[c++]=null;let Z0=e?1:o.length;X(f,h,!1,Z0,o,N0,s)}while(c<Y0.length&&!h.writing);if(c===Y0.length)Y(h);else if(c>256)Y0.splice(0,c),h.bufferedIndex=0;else h.bufferedIndex=c}h.bufferProcessing=!1}$.prototype._write=function(f,h,Y0){if(this._writev)this._writev([{chunk:f,encoding:h}],Y0);else throw new w("_write()")},$.prototype._writev=null,$.prototype.end=function(f,h,Y0){let t=this._writableState;if(typeof f==="function")Y0=f,f=null,h=null;else if(typeof h==="function")Y0=h,h=null;let e;if(f!==null&&f!==void 0){let M0=F(this,f,h);if(M0 instanceof O)e=M0}if(t.corked)t.corked=1,this.uncork();if(e);else if(!t.errored&&!t.ending)t.ending=!0,d(this,t,!0),t.ended=!0;else if(t.finished)e=new K0("end");else if(t.destroyed)e=new J0("end");if(typeof Y0==="function")if(e||t.finished)H.nextTick(Y0,e);else t[J].push(Y0);return this};function n(f){return f.ending&&!f.destroyed&&f.constructed&&f.length===0&&!f.errored&&f.buffered.length===0&&!f.finished&&!f.writing&&!f.errorEmitted&&!f.closeEmitted}function $0(f,h){let Y0=!1;function t(e){if(Y0){U(f,e!==null&&e!==void 0?e:y());return}if(Y0=!0,h.pendingcb--,e){let M0=h[J].splice(0);for(let c=0;c<M0.length;c++)M0[c](e);U(f,e,h.sync)}else if(n(h))h.prefinished=!0,f.emit("prefinish"),h.pendingcb++,H.nextTick(Q0,f,h)}h.sync=!0,h.pendingcb++;try{f._final(t)}catch(e){t(e)}h.sync=!1}function r(f,h){if(!h.prefinished&&!h.finalCalled)if(typeof f._final==="function"&&!h.destroyed)h.finalCalled=!0,$0(f,h);else h.prefinished=!0,f.emit("prefinish")}function d(f,h,Y0){if(n(h)){if(r(f,h),h.pendingcb===0){if(Y0)h.pendingcb++,H.nextTick((t,e)=>{if(n(e))Q0(t,e);else e.pendingcb--},f,h);else if(n(h))h.pendingcb++,Q0(f,h)}}}function Q0(f,h){h.pendingcb--,h.finished=!0;let Y0=h[J].splice(0);for(let t=0;t<Y0.length;t++)Y0[t]();if(f.emit("finish"),h.autoDestroy){let t=f._readableState;if(!t||t.autoDestroy&&(t.endEmitted||t.readable===!1))f.destroy()}}P($.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(f){if(this._writableState)this._writableState.destroyed=f}},writable:{__proto__:null,get(){let f=this._writableState;return!!f&&f.writable!==!1&&!f.destroyed&&!f.errored&&!f.ending&&!f.ended},set(f){if(this._writableState)this._writableState.writable=!!f}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){let f=this._writableState;if(!f)return!1;return!f.destroyed&&!f.ending&&f.needDrain}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});var m=v.destroy;$.prototype.destroy=function(f,h){let Y0=this._writableState;if(!Y0.destroyed&&(Y0.bufferedIndex<Y0.buffered.length||Y0[J].length))H.nextTick(g,Y0);return m.call(this,f,h),this},$.prototype._undestroy=v.undestroy,$.prototype._destroy=function(f,h){h(f)},$.prototype[D.captureRejectionSymbol]=function(f){this.destroy(f)};var i;function g0(){if(i===void 0)i={};return i}$.fromWeb=function(f,h){return g0().newStreamWritableFromWritableStream(f,h)},$.toWeb=function(f){return g0().newWritableStreamFromStreamWritable(f)}}),XJ=u0((K,W)=>{var H=nU(),T=(OU(),h0(HU)),{isReadable:O,isWritable:L,isIterable:V,isNodeStream:P,isReadableNodeStream:S,isWritableNodeStream:M,isDuplexNodeStream:z,isReadableStream:A,isWritableStream:D}=gU(),R=hU(),{AbortError:q,codes:{ERR_INVALID_ARG_TYPE:v,ERR_INVALID_RETURN_VALUE:k}}=zU(),{destroyer:B}=aU(),_=NU(),x=zX(),w=sX(),{createDeferredPromise:y}=EU(),l=iZ(),J0=globalThis.Blob||T.Blob,K0=typeof J0<"u"?function(J){return J instanceof J0}:function(J){return!1},V0=globalThis.AbortController||YX().AbortController,{FunctionPrototypeCall:u}=o0();class X0 extends _{constructor(J){super(J);if((J===null||J===void 0?void 0:J.readable)===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if((J===null||J===void 0?void 0:J.writable)===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}}W.exports=function J(Z,Y){if(z(Z))return Z;if(S(Z))return Q({readable:Z});if(M(Z))return Q({writable:Z});if(P(Z))return Q({writable:!1,readable:!1});if(A(Z))return Q({readable:x.fromWeb(Z)});if(D(Z))return Q({writable:w.fromWeb(Z)});if(typeof Z==="function"){let{value:F,write:G,final:X,destroy:I}=U(Z);if(V(F))return l(X0,F,{objectMode:!0,write:G,final:X,destroy:I});let E=F===null||F===void 0?void 0:F.then;if(typeof E==="function"){let C,j=u(E,F,(g)=>{if(g!=null)throw new k("nully","body",g)},(g)=>{B(C,g)});return C=new X0({objectMode:!0,readable:!1,write:G,final(g){X(async()=>{try{await j,H.nextTick(g,null)}catch(p){H.nextTick(g,p)}})},destroy:I})}throw new k("Iterable, AsyncIterable or AsyncFunction",Y,F)}if(K0(Z))return J(Z.arrayBuffer());if(V(Z))return l(X0,Z,{objectMode:!0,writable:!1});if(A(Z===null||Z===void 0?void 0:Z.readable)&&D(Z===null||Z===void 0?void 0:Z.writable))return X0.fromWeb(Z);if(typeof(Z===null||Z===void 0?void 0:Z.writable)==="object"||typeof(Z===null||Z===void 0?void 0:Z.readable)==="object"){let F=Z!==null&&Z!==void 0&&Z.readable?S(Z===null||Z===void 0?void 0:Z.readable)?Z===null||Z===void 0?void 0:Z.readable:J(Z.readable):void 0,G=Z!==null&&Z!==void 0&&Z.writable?M(Z===null||Z===void 0?void 0:Z.writable)?Z===null||Z===void 0?void 0:Z.writable:J(Z.writable):void 0;return Q({readable:F,writable:G})}let $=Z===null||Z===void 0?void 0:Z.then;if(typeof $==="function"){let F;return u($,Z,(G)=>{if(G!=null)F.push(G);F.push(null)},(G)=>{B(F,G)}),F=new X0({objectMode:!0,writable:!1,read(){}})}throw new v(Y,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],Z)};function U(J){let{promise:Z,resolve:Y}=y(),$=new V0,F=$.signal;return{value:J(async function*(){while(!0){let G=Z;Z=null;let{chunk:X,done:I,cb:E}=await G;if(H.nextTick(E),I)return;if(F.aborted)throw new q(void 0,{cause:F.reason});({promise:Z,resolve:Y}=y()),yield X}}(),{signal:F}),write(G,X,I){let E=Y;Y=null,E({chunk:G,done:!1,cb:I})},final(G){let X=Y;Y=null,X({done:!0,cb:G})},destroy(G,X){$.abort(),X(G)}}}function Q(J){let Z=J.readable&&typeof J.readable.read!=="function"?x.wrap(J.readable):J.readable,Y=J.writable,$=!!O(Z),F=!!L(Y),G,X,I,E,C;function j(g){let p=E;if(E=null,p)p(g);else if(g)C.destroy(g)}if(C=new X0({readableObjectMode:!!(Z!==null&&Z!==void 0&&Z.readableObjectMode),writableObjectMode:!!(Y!==null&&Y!==void 0&&Y.writableObjectMode),readable:$,writable:F}),F)R(Y,(g)=>{if(F=!1,g)B(Z,g);j(g)}),C._write=function(g,p,n){if(Y.write(g,p))n();else G=n},C._final=function(g){Y.end(),X=g},Y.on("drain",function(){if(G){let g=G;G=null,g()}}),Y.on("finish",function(){if(X){let g=X;X=null,g()}});if($)R(Z,(g)=>{if($=!1,g)B(Z,g);j(g)}),Z.on("readable",function(){if(I){let g=I;I=null,g()}}),Z.on("end",function(){C.push(null)}),C._read=function(){while(!0){let g=Z.read();if(g===null){I=C._read;return}if(!C.push(g))return}};return C._destroy=function(g,p){if(!g&&E!==null)g=new q;if(I=null,G=null,X=null,E===null)p(g);else E=p,B(Y,g),B(Z,g)},C}}),NU=u0((K,W)=>{var{ObjectDefineProperties:H,ObjectGetOwnPropertyDescriptor:T,ObjectKeys:O,ObjectSetPrototypeOf:L}=o0();W.exports=S;var V=zX(),P=sX();L(S.prototype,V.prototype),L(S,V);{let D=O(P.prototype);for(let R=0;R<D.length;R++){let q=D[R];if(!S.prototype[q])S.prototype[q]=P.prototype[q]}}function S(D){if(!(this instanceof S))return new S(D);if(V.call(this,D),P.call(this,D),D){if(this.allowHalfOpen=D.allowHalfOpen!==!1,D.readable===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if(D.writable===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}else this.allowHalfOpen=!0}H(S.prototype,{writable:{__proto__:null,...T(P.prototype,"writable")},writableHighWaterMark:{__proto__:null,...T(P.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...T(P.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...T(P.prototype,"writableBuffer")},writableLength:{__proto__:null,...T(P.prototype,"writableLength")},writableFinished:{__proto__:null,...T(P.prototype,"writableFinished")},writableCorked:{__proto__:null,...T(P.prototype,"writableCorked")},writableEnded:{__proto__:null,...T(P.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...T(P.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set(D){if(this._readableState&&this._writableState)this._readableState.destroyed=D,this._writableState.destroyed=D}}});var M;function z(){if(M===void 0)M={};return M}S.fromWeb=function(D,R){return z().newStreamDuplexFromReadableWritablePair(D,R)},S.toWeb=function(D){return z().newReadableWritablePairFromDuplex(D)};var A;S.from=function(D){if(!A)A=XJ();return A(D,"body")}}),UQ=u0((K,W)=>{var{ObjectSetPrototypeOf:H,Symbol:T}=o0();W.exports=S;var{ERR_METHOD_NOT_IMPLEMENTED:O}=zU().codes,L=NU(),{getHighWaterMark:V}=DX();H(S.prototype,L.prototype),H(S,L);var P=T("kCallback");function S(A){if(!(this instanceof S))return new S(A);let D=A?V(this,A,"readableHighWaterMark",!0):null;if(D===0)A={...A,highWaterMark:null,readableHighWaterMark:D,writableHighWaterMark:A.writableHighWaterMark||0};if(L.call(this,A),this._readableState.sync=!1,this[P]=null,A){if(typeof A.transform==="function")this._transform=A.transform;if(typeof A.flush==="function")this._flush=A.flush}this.on("prefinish",z)}function M(A){if(typeof this._flush==="function"&&!this.destroyed)this._flush((D,R)=>{if(D){if(A)A(D);else this.destroy(D);return}if(R!=null)this.push(R);if(this.push(null),A)A()});else if(this.push(null),A)A()}function z(){if(this._final!==M)M.call(this)}S.prototype._final=M,S.prototype._transform=function(A,D,R){throw new O("_transform()")},S.prototype._write=function(A,D,R){let q=this._readableState,v=this._writableState,k=q.length;this._transform(A,D,(B,_)=>{if(B){R(B);return}if(_!=null)this.push(_);if(v.ended||k===q.length||q.length<q.highWaterMark)R();else this[P]=R})},S.prototype._read=function(){if(this[P]){let A=this[P];this[P]=null,A()}}}),XQ=u0((K,W)=>{var{ObjectSetPrototypeOf:H}=o0();W.exports=O;var T=UQ();H(O.prototype,T.prototype),H(O,T);function O(L){if(!(this instanceof O))return new O(L);T.call(this,L)}O.prototype._transform=function(L,V,P){P(null,L)}}),tX=u0((K,W)=>{var H=nU(),{ArrayIsArray:T,Promise:O,SymbolAsyncIterator:L,SymbolDispose:V}=o0(),P=hU(),{once:S}=EU(),M=aU(),z=NU(),{aggregateTwoErrors:A,codes:{ERR_INVALID_ARG_TYPE:D,ERR_INVALID_RETURN_VALUE:R,ERR_MISSING_ARGS:q,ERR_STREAM_DESTROYED:v,ERR_STREAM_PREMATURE_CLOSE:k},AbortError:B}=zU(),{validateFunction:_,validateAbortSignal:x}=JX(),{isIterable:w,isReadable:y,isReadableNodeStream:l,isNodeStream:J0,isTransformStream:K0,isWebStream:V0,isReadableStream:u,isReadableFinished:X0}=gU(),U=globalThis.AbortController||YX().AbortController,Q,J,Z;function Y(g,p,n){let $0=!1;g.on("close",()=>{$0=!0});let r=P(g,{readable:p,writable:n},(d)=>{$0=!d});return{destroy:(d)=>{if($0)return;$0=!0,M.destroyer(g,d||new v("pipe"))},cleanup:r}}function $(g){return _(g[g.length-1],"streams[stream.length - 1]"),g.pop()}function F(g){if(w(g))return g;else if(l(g))return G(g);throw new D("val",["Readable","Iterable","AsyncIterable"],g)}async function*G(g){if(!J)J=zX();yield*J.prototype[L].call(g)}async function X(g,p,n,{end:$0}){let r,d=null,Q0=(g0)=>{if(g0)r=g0;if(d){let f=d;d=null,f()}},m=()=>new O((g0,f)=>{if(r)f(r);else d=()=>{if(r)f(r);else g0()}});p.on("drain",Q0);let i=P(p,{readable:!1},Q0);try{if(p.writableNeedDrain)await m();for await(let g0 of g)if(!p.write(g0))await m();if($0)p.end(),await m();n()}catch(g0){n(r!==g0?A(r,g0):g0)}finally{i(),p.off("drain",Q0)}}async function I(g,p,n,{end:$0}){if(K0(p))p=p.writable;let r=p.getWriter();try{for await(let d of g)await r.ready,r.write(d).catch(()=>{});if(await r.ready,$0)await r.close();n()}catch(d){try{await r.abort(d),n(d)}catch(Q0){n(Q0)}}}function E(...g){return C(g,S($(g)))}function C(g,p,n){if(g.length===1&&T(g[0]))g=g[0];if(g.length<2)throw new q("streams");let $0=new U,r=$0.signal,d=n===null||n===void 0?void 0:n.signal,Q0=[];x(d,"options.signal");function m(){e(new B)}Z=Z||EU().addAbortListener;let i;if(d)i=Z(d,m);let g0,f,h=[],Y0=0;function t(s){e(s,--Y0===0)}function e(s,Z0){var y0;if(s&&(!g0||g0.code==="ERR_STREAM_PREMATURE_CLOSE"))g0=s;if(!g0&&!Z0)return;while(h.length)h.shift()(g0);if((y0=i)===null||y0===void 0||y0[V](),$0.abort(),Z0){if(!g0)Q0.forEach((H0)=>H0());H.nextTick(p,g0,f)}}let M0;for(let s=0;s<g.length;s++){let Z0=g[s],y0=s<g.length-1,H0=s>0,O0=y0||(n===null||n===void 0?void 0:n.end)!==!1,n0=s===g.length-1;if(J0(Z0)){let W0=function(A0){if(A0&&A0.name!=="AbortError"&&A0.code!=="ERR_STREAM_PREMATURE_CLOSE")t(A0)};var c=W0;if(O0){let{destroy:A0,cleanup:t0}=Y(Z0,y0,H0);if(h.push(A0),y(Z0)&&n0)Q0.push(t0)}if(Z0.on("error",W0),y(Z0)&&n0)Q0.push(()=>{Z0.removeListener("error",W0)})}if(s===0)if(typeof Z0==="function"){if(M0=Z0({signal:r}),!w(M0))throw new R("Iterable, AsyncIterable or Stream","source",M0)}else if(w(Z0)||l(Z0)||K0(Z0))M0=Z0;else M0=z.from(Z0);else if(typeof Z0==="function"){if(K0(M0)){var o;M0=F((o=M0)===null||o===void 0?void 0:o.readable)}else M0=F(M0);if(M0=Z0(M0,{signal:r}),y0){if(!w(M0,!0))throw new R("AsyncIterable",`transform[${s-1}]`,M0)}else{var N0;if(!Q)Q=XQ();let W0=new Q({objectMode:!0}),A0=(N0=M0)===null||N0===void 0?void 0:N0.then;if(typeof A0==="function")Y0++,A0.call(M0,(T0)=>{if(f=T0,T0!=null)W0.write(T0);if(O0)W0.end();H.nextTick(t)},(T0)=>{W0.destroy(T0),H.nextTick(t,T0)});else if(w(M0,!0))Y0++,X(M0,W0,t,{end:O0});else if(u(M0)||K0(M0)){let T0=M0.readable||M0;Y0++,X(T0,W0,t,{end:O0})}else throw new R("AsyncIterable or Promise","destination",M0);M0=W0;let{destroy:t0,cleanup:D0}=Y(M0,!1,!0);if(h.push(t0),n0)Q0.push(D0)}}else if(J0(Z0)){if(l(M0)){Y0+=2;let W0=j(M0,Z0,t,{end:O0});if(y(Z0)&&n0)Q0.push(W0)}else if(K0(M0)||u(M0)){let W0=M0.readable||M0;Y0++,X(W0,Z0,t,{end:O0})}else if(w(M0))Y0++,X(M0,Z0,t,{end:O0});else throw new D("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],M0);M0=Z0}else if(V0(Z0)){if(l(M0))Y0++,I(F(M0),Z0,t,{end:O0});else if(u(M0)||w(M0))Y0++,I(M0,Z0,t,{end:O0});else if(K0(M0))Y0++,I(M0.readable,Z0,t,{end:O0});else throw new D("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],M0);M0=Z0}else M0=z.from(Z0)}if(r!==null&&r!==void 0&&r.aborted||d!==null&&d!==void 0&&d.aborted)H.nextTick(m);return M0}function j(g,p,n,{end:$0}){let r=!1;if(p.on("close",()=>{if(!r)n(new k)}),g.pipe(p,{end:!1}),$0){let Q0=function(){r=!0,p.end()};var d=Q0;if(X0(g))H.nextTick(Q0);else g.once("end",Q0)}else n();return P(g,{readable:!0,writable:!1},(Q0)=>{let m=g._readableState;if(Q0&&Q0.code==="ERR_STREAM_PREMATURE_CLOSE"&&m&&m.ended&&!m.errored&&!m.errorEmitted)g.once("end",n).once("error",n);else n(Q0)}),P(p,{readable:!1,writable:!0},n)}W.exports={pipelineImpl:C,pipeline:E}}),ZQ=u0((K,W)=>{var{pipeline:H}=tX(),T=NU(),{destroyer:O}=aU(),{isNodeStream:L,isReadable:V,isWritable:P,isWebStream:S,isTransformStream:M,isWritableStream:z,isReadableStream:A}=gU(),{AbortError:D,codes:{ERR_INVALID_ARG_VALUE:R,ERR_MISSING_ARGS:q}}=zU(),v=hU();W.exports=function(...k){if(k.length===0)throw new q("streams");if(k.length===1)return T.from(k[0]);let B=[...k];if(typeof k[0]==="function")k[0]=T.from(k[0]);if(typeof k[k.length-1]==="function"){let U=k.length-1;k[U]=T.from(k[U])}for(let U=0;U<k.length;++U){if(!L(k[U])&&!S(k[U]))continue;if(U<k.length-1&&!(V(k[U])||A(k[U])||M(k[U])))throw new R(`streams[${U}]`,B[U],"must be readable");if(U>0&&!(P(k[U])||z(k[U])||M(k[U])))throw new R(`streams[${U}]`,B[U],"must be writable")}let _,x,w,y,l;function J0(U){let Q=y;if(y=null,Q)Q(U);else if(U)l.destroy(U);else if(!X0&&!u)l.destroy()}let K0=k[0],V0=H(k,J0),u=!!(P(K0)||z(K0)||M(K0)),X0=!!(V(V0)||A(V0)||M(V0));if(l=new T({writableObjectMode:!!(K0!==null&&K0!==void 0&&K0.writableObjectMode),readableObjectMode:!!(V0!==null&&V0!==void 0&&V0.readableObjectMode),writable:u,readable:X0}),u){if(L(K0))l._write=function(Q,J,Z){if(K0.write(Q,J))Z();else _=Z},l._final=function(Q){K0.end(),x=Q},K0.on("drain",function(){if(_){let Q=_;_=null,Q()}});else if(S(K0)){let Q=(M(K0)?K0.writable:K0).getWriter();l._write=async function(J,Z,Y){try{await Q.ready,Q.write(J).catch(()=>{}),Y()}catch($){Y($)}},l._final=async function(J){try{await Q.ready,Q.close().catch(()=>{}),x=J}catch(Z){J(Z)}}}let U=M(V0)?V0.readable:V0;v(U,()=>{if(x){let Q=x;x=null,Q()}})}if(X0){if(L(V0))V0.on("readable",function(){if(w){let U=w;w=null,U()}}),V0.on("end",function(){l.push(null)}),l._read=function(){while(!0){let U=V0.read();if(U===null){w=l._read;return}if(!l.push(U))return}};else if(S(V0)){let U=(M(V0)?V0.readable:V0).getReader();l._read=async function(){while(!0)try{let{value:Q,done:J}=await U.read();if(!l.push(Q))return;if(J){l.push(null);return}}catch{return}}}}return l._destroy=function(U,Q){if(!U&&y!==null)U=new D;if(w=null,_=null,x=null,y===null)Q(U);else if(y=Q,L(V0))O(V0,U)},l}}),ZJ=u0((K,W)=>{var H=globalThis.AbortController||YX().AbortController,{codes:{ERR_INVALID_ARG_VALUE:T,ERR_INVALID_ARG_TYPE:O,ERR_MISSING_ARGS:L,ERR_OUT_OF_RANGE:V},AbortError:P}=zU(),{validateAbortSignal:S,validateInteger:M,validateObject:z}=JX(),A=o0().Symbol("kWeak"),D=o0().Symbol("kResistStopPropagation"),{finished:R}=hU(),q=ZQ(),{addAbortSignalNoValidate:v}=TX(),{isWritable:k,isNodeStream:B}=gU(),{deprecate:_}=EU(),{ArrayPrototypePush:x,Boolean:w,MathFloor:y,Number:l,NumberIsNaN:J0,Promise:K0,PromiseReject:V0,PromiseResolve:u,PromisePrototypeThen:X0,Symbol:U}=o0(),Q=U("kEmpty"),J=U("kEof");function Z(d,Q0){if(Q0!=null)z(Q0,"options");if((Q0===null||Q0===void 0?void 0:Q0.signal)!=null)S(Q0.signal,"options.signal");if(B(d)&&!k(d))throw new T("stream",d,"must be writable");let m=q(this,d);if(Q0!==null&&Q0!==void 0&&Q0.signal)v(Q0.signal,m);return m}function Y(d,Q0){if(typeof d!=="function")throw new O("fn",["Function","AsyncFunction"],d);if(Q0!=null)z(Q0,"options");if((Q0===null||Q0===void 0?void 0:Q0.signal)!=null)S(Q0.signal,"options.signal");let m=1;if((Q0===null||Q0===void 0?void 0:Q0.concurrency)!=null)m=y(Q0.concurrency);let i=m-1;if((Q0===null||Q0===void 0?void 0:Q0.highWaterMark)!=null)i=y(Q0.highWaterMark);return M(m,"options.concurrency",1),M(i,"options.highWaterMark",0),i+=m,async function*(){let g0=EU().AbortSignalAny([Q0===null||Q0===void 0?void 0:Q0.signal].filter(w)),f=this,h=[],Y0={signal:g0},t,e,M0=!1,c=0;function o(){M0=!0,N0()}function N0(){c-=1,s()}function s(){if(e&&!M0&&c<m&&h.length<i)e(),e=null}async function Z0(){try{for await(let y0 of f){if(M0)return;if(g0.aborted)throw new P;try{if(y0=d(y0,Y0),y0===Q)continue;y0=u(y0)}catch(H0){y0=V0(H0)}if(c+=1,X0(y0,N0,o),h.push(y0),t)t(),t=null;if(!M0&&(h.length>=i||c>=m))await new K0((H0)=>{e=H0})}h.push(J)}catch(y0){let H0=V0(y0);X0(H0,N0,o),h.push(H0)}finally{if(M0=!0,t)t(),t=null}}Z0();try{while(!0){while(h.length>0){let y0=await h[0];if(y0===J)return;if(g0.aborted)throw new P;if(y0!==Q)yield y0;h.shift(),s()}await new K0((y0)=>{t=y0})}}finally{if(M0=!0,e)e(),e=null}}.call(this)}function $(d=void 0){if(d!=null)z(d,"options");if((d===null||d===void 0?void 0:d.signal)!=null)S(d.signal,"options.signal");return async function*(){let Q0=0;for await(let i of this){var m;if(d!==null&&d!==void 0&&(m=d.signal)!==null&&m!==void 0&&m.aborted)throw new P({cause:d.signal.reason});yield[Q0++,i]}}.call(this)}async function F(d,Q0=void 0){for await(let m of E.call(this,d,Q0))return!0;return!1}async function G(d,Q0=void 0){if(typeof d!=="function")throw new O("fn",["Function","AsyncFunction"],d);return!await F.call(this,async(...m)=>{return!await d(...m)},Q0)}async function X(d,Q0){for await(let m of E.call(this,d,Q0))return m;return}async function I(d,Q0){if(typeof d!=="function")throw new O("fn",["Function","AsyncFunction"],d);async function m(i,g0){return await d(i,g0),Q}for await(let i of Y.call(this,m,Q0));}function E(d,Q0){if(typeof d!=="function")throw new O("fn",["Function","AsyncFunction"],d);async function m(i,g0){if(await d(i,g0))return i;return Q}return Y.call(this,m,Q0)}class C extends L{constructor(){super("reduce");this.message="Reduce of an empty stream requires an initial value"}}async function j(d,Q0,m){var i;if(typeof d!=="function")throw new O("reducer",["Function","AsyncFunction"],d);if(m!=null)z(m,"options");if((m===null||m===void 0?void 0:m.signal)!=null)S(m.signal,"options.signal");let g0=arguments.length>1;if(m!==null&&m!==void 0&&(i=m.signal)!==null&&i!==void 0&&i.aborted){let e=new P(void 0,{cause:m.signal.reason});throw this.once("error",()=>{}),await R(this.destroy(e)),e}let f=new H,h=f.signal;if(m!==null&&m!==void 0&&m.signal){let e={once:!0,[A]:this,[D]:!0};m.signal.addEventListener("abort",()=>f.abort(),e)}let Y0=!1;try{for await(let e of this){var t;if(Y0=!0,m!==null&&m!==void 0&&(t=m.signal)!==null&&t!==void 0&&t.aborted)throw new P;if(!g0)Q0=e,g0=!0;else Q0=await d(Q0,e,{signal:h})}if(!Y0&&!g0)throw new C}finally{f.abort()}return Q0}async function g(d){if(d!=null)z(d,"options");if((d===null||d===void 0?void 0:d.signal)!=null)S(d.signal,"options.signal");let Q0=[];for await(let i of this){var m;if(d!==null&&d!==void 0&&(m=d.signal)!==null&&m!==void 0&&m.aborted)throw new P(void 0,{cause:d.signal.reason});x(Q0,i)}return Q0}function p(d,Q0){let m=Y.call(this,d,Q0);return async function*(){for await(let i of m)yield*i}.call(this)}function n(d){if(d=l(d),J0(d))return 0;if(d<0)throw new V("number",">= 0",d);return d}function $0(d,Q0=void 0){if(Q0!=null)z(Q0,"options");if((Q0===null||Q0===void 0?void 0:Q0.signal)!=null)S(Q0.signal,"options.signal");return d=n(d),async function*(){var m;if(Q0!==null&&Q0!==void 0&&(m=Q0.signal)!==null&&m!==void 0&&m.aborted)throw new P;for await(let g0 of this){var i;if(Q0!==null&&Q0!==void 0&&(i=Q0.signal)!==null&&i!==void 0&&i.aborted)throw new P;if(d--<=0)yield g0}}.call(this)}function r(d,Q0=void 0){if(Q0!=null)z(Q0,"options");if((Q0===null||Q0===void 0?void 0:Q0.signal)!=null)S(Q0.signal,"options.signal");return d=n(d),async function*(){var m;if(Q0!==null&&Q0!==void 0&&(m=Q0.signal)!==null&&m!==void 0&&m.aborted)throw new P;for await(let g0 of this){var i;if(Q0!==null&&Q0!==void 0&&(i=Q0.signal)!==null&&i!==void 0&&i.aborted)throw new P;if(d-- >0)yield g0;if(d<=0)return}}.call(this)}W.exports.streamReturningOperators={asIndexedPairs:_($,"readable.asIndexedPairs will be removed in a future version."),drop:$0,filter:E,flatMap:p,map:Y,take:r,compose:Z},W.exports.promiseReturningOperators={every:G,forEach:I,reduce:j,toArray:g,some:F,find:X}}),QQ=u0((K,W)=>{var{ArrayPrototypePop:H,Promise:T}=o0(),{isIterable:O,isNodeStream:L,isWebStream:V}=gU(),{pipelineImpl:P}=tX(),{finished:S}=hU();YQ();function M(...z){return new T((A,D)=>{let R,q,v=z[z.length-1];if(v&&typeof v==="object"&&!L(v)&&!O(v)&&!V(v)){let k=H(z);R=k.signal,q=k.end}P(z,(k,B)=>{if(k)D(k);else A(B)},{signal:R,end:q})})}W.exports={finished:S,pipeline:M}}),YQ=u0((K,W)=>{var{Buffer:H}=(OU(),h0(HU)),{ObjectDefineProperty:T,ObjectKeys:O,ReflectApply:L}=o0(),{promisify:{custom:V}}=EU(),{streamReturningOperators:P,promiseReturningOperators:S}=ZJ(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:M}}=zU(),z=ZQ(),{setDefaultHighWaterMark:A,getDefaultHighWaterMark:D}=DX(),{pipeline:R}=tX(),{destroyer:q}=aU(),v=hU(),k=QQ(),B=gU(),_=W.exports=mX().Stream;_.isDestroyed=B.isDestroyed,_.isDisturbed=B.isDisturbed,_.isErrored=B.isErrored,_.isReadable=B.isReadable,_.isWritable=B.isWritable,_.Readable=zX();for(let w of O(P)){let y=function(...J0){if(new.target)throw M();return _.Readable.from(L(l,this,J0))},l=P[w];T(y,"name",{__proto__:null,value:l.name}),T(y,"length",{__proto__:null,value:l.length}),T(_.Readable.prototype,w,{__proto__:null,value:y,enumerable:!1,configurable:!0,writable:!0})}for(let w of O(S)){let y=function(...J0){if(new.target)throw M();return L(l,this,J0)},l=S[w];T(y,"name",{__proto__:null,value:l.name}),T(y,"length",{__proto__:null,value:l.length}),T(_.Readable.prototype,w,{__proto__:null,value:y,enumerable:!1,configurable:!0,writable:!0})}_.Writable=sX(),_.Duplex=NU(),_.Transform=UQ(),_.PassThrough=XQ(),_.pipeline=R;var{addAbortSignal:x}=TX();_.addAbortSignal=x,_.finished=v,_.destroy=q,_.compose=z,_.setDefaultHighWaterMark=A,_.getDefaultHighWaterMark=D,T(_,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return k}}),T(R,V,{__proto__:null,enumerable:!0,get(){return k.pipeline}}),T(v,V,{__proto__:null,enumerable:!0,get(){return k.finished}}),_.Stream=_,_._isUint8Array=function(w){return w instanceof Uint8Array},_._uint8ArrayToBuffer=function(w){return H.from(w.buffer,w.byteOffset,w.byteLength)}}),QJ=u0((K,W)=>{var H=rX();{let T=YQ(),O=QQ(),L=T.Readable.destroy;W.exports=T.Readable,W.exports._uint8ArrayToBuffer=T._uint8ArrayToBuffer,W.exports._isUint8Array=T._isUint8Array,W.exports.isDisturbed=T.isDisturbed,W.exports.isErrored=T.isErrored,W.exports.isReadable=T.isReadable,W.exports.Readable=T.Readable,W.exports.Writable=T.Writable,W.exports.Duplex=T.Duplex,W.exports.Transform=T.Transform,W.exports.PassThrough=T.PassThrough,W.exports.addAbortSignal=T.addAbortSignal,W.exports.finished=T.finished,W.exports.destroy=T.destroy,W.exports.destroy=L,W.exports.pipeline=T.pipeline,W.exports.compose=T.compose,Object.defineProperty(T,"promises",{configurable:!0,enumerable:!0,get(){return O}}),W.exports.Stream=T.Stream}W.exports.default=W.exports});JQ.exports=QJ()});var SU={};cX(SU,{webcrypto:()=>BG,rng:()=>lV,randomUUID:()=>jG,randomFillSync:()=>RG,randomFill:()=>EG,randomBytes:()=>oV,publicEncrypt:()=>DG,publicDecrypt:()=>MG,pseudoRandomBytes:()=>dV,prng:()=>bV,privateEncrypt:()=>zG,privateDecrypt:()=>LG,pbkdf2Sync:()=>aV,pbkdf2:()=>rV,listCiphers:()=>GG,getRandomValues:()=>kG,getHashes:()=>tV,getDiffieHellman:()=>$G,getCurves:()=>_G,getCiphers:()=>VG,default:()=>xG,createVerify:()=>AG,createSign:()=>HG,createHmac:()=>sV,createHash:()=>wQ,createECDH:()=>TG,createDiffieHellmanGroup:()=>IG,createDiffieHellman:()=>WG,createDecipheriv:()=>JG,createDecipher:()=>QG,createCredentials:()=>qG,createCipheriv:()=>XG,createCipher:()=>iV,constants:()=>SG,Verify:()=>CG,Sign:()=>OG,Hmac:()=>mV,Hash:()=>nV,DiffieHellmanGroup:()=>KG,DiffieHellman:()=>FG,Decipheriv:()=>YG,Decipher:()=>ZG,DEFAULT_ENCODING:()=>PG,Cipheriv:()=>UG,Cipher:()=>eV});function _G(){return vG}var VJ,GJ,VQ,KJ,IJ,$J=(K,W,H)=>{H=K!=null?VJ(GJ(K)):{};let T=W||!K||!K.__esModule?VQ(H,"default",{value:K,enumerable:!0}):H;for(let O of KJ(K))if(!IJ.call(T,O))VQ(T,O,{get:()=>K[O],enumerable:!0});return T},G0=(K,W)=>()=>(W||K((W={exports:{}}).exports,W),W.exports),MX,LX,KQ,WJ,iX,UZ,MU,FJ,GX,IQ,HJ,OJ,AJ,CJ,$Q,TJ,DJ,zJ,MJ,LJ,EJ,RJ,qJ,SJ,PJ,KX,EX,WQ,kJ,FQ,HQ,jJ,IX,XZ,ZZ,vJ,OQ,QZ,_J,AQ,BJ,CQ,TQ,xJ,NJ,gJ,wJ,yJ,fJ,cJ,pJ,hJ,uJ,bJ,dJ,lJ,oJ,YZ,DQ,nJ,zQ,mJ,sJ,tJ,rJ,wU,uU,MQ,kU,LQ,RX,aJ,qU,eJ,iJ,UV,EQ,_U,$X,RQ,XV,qQ,ZV,SQ,QV,YV,JV,VV,JZ,GV,VZ,KV,IV,$V,WV,FV,HV,OV,AV,CV,TV,DV,zV,MV,LV,GQ,EV,VX,RV,PQ,kQ,qV,SV,jQ,PV,kV,WX,jV,vV,_V,BV,xV,NV,vQ,gV,_Q,BQ,xQ,GZ,NQ,wV,gQ,yV,fV,aX,cV,pV,hV,uV,p0,bV,dV,lV,oV,nV,wQ,mV,sV,tV,rV,aV,eV,iV,UG,XG,ZG,QG,YG,JG,VG,GG,KG,IG,$G,WG,FG,HG,OG,AG,CG,TG,DG,zG,MG,LG,EG,RG,qG,SG,PG="buffer",kG=(K)=>{return crypto.getRandomValues(K)},jG=()=>{return crypto.randomUUID()},vG,BG,xG;var RU=pX(()=>{VJ=Object.create,{getPrototypeOf:GJ,defineProperty:VQ,getOwnPropertyNames:KJ}=Object,IJ=Object.prototype.hasOwnProperty,MX=G0((K,W)=>{W.exports=(RU(),h0(SU)).randomBytes}),LX=G0((K,W)=>{W.exports=(RU(),h0(SU)).createHash}),KQ=G0((K,W)=>{W.exports=(RU(),h0(SU)).createHmac}),WJ=G0((K,W)=>{W.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}}),iX=G0((K,W)=>{var H=isFinite,T=Math.pow(2,30)-1;W.exports=function(O,L){if(typeof O!=="number")throw TypeError("Iterations not a number");if(O<0||!H(O))throw TypeError("Bad iterations");if(typeof L!=="number")throw TypeError("Key length not a number");if(L<0||L>T||L!==L)throw TypeError("Bad key length")}}),UZ=G0((K,W)=>{var H;if(globalThis.process&&globalThis.process.browser)H="utf-8";else if(globalThis.process&&globalThis.process.version)T=parseInt(process.version.split(".")[0].slice(1),10),H=T>=6?"utf-8":"binary";else H="utf-8";var T;W.exports=H}),MU=G0((K,W)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var H=(OU(),h0(HU)),T=H.Buffer;function O(V,P){for(var S in V)P[S]=V[S]}if(T.from&&T.alloc&&T.allocUnsafe&&T.allocUnsafeSlow)W.exports=H;else O(H,K),K.Buffer=L;function L(V,P,S){return T(V,P,S)}L.prototype=Object.create(T.prototype),O(T,L),L.from=function(V,P,S){if(typeof V==="number")throw TypeError("Argument must not be a number");return T(V,P,S)},L.alloc=function(V,P,S){if(typeof V!=="number")throw TypeError("Argument must be a number");var M=T(V);if(P!==void 0)if(typeof S==="string")M.fill(P,S);else M.fill(P);else M.fill(0);return M},L.allocUnsafe=function(V){if(typeof V!=="number")throw TypeError("Argument must be a number");return T(V)},L.allocUnsafeSlow=function(V){if(typeof V!=="number")throw TypeError("Argument must be a number");return H.SlowBuffer(V)}}),FJ=G0((K,W)=>{var H={}.toString;W.exports=Array.isArray||function(T){return H.call(T)=="[object Array]"}}),GX=G0((K,W)=>{W.exports=TypeError}),IQ=G0((K,W)=>{W.exports=Object}),HJ=G0((K,W)=>{W.exports=Error}),OJ=G0((K,W)=>{W.exports=EvalError}),AJ=G0((K,W)=>{W.exports=RangeError}),CJ=G0((K,W)=>{W.exports=ReferenceError}),$Q=G0((K,W)=>{W.exports=SyntaxError}),TJ=G0((K,W)=>{W.exports=URIError}),DJ=G0((K,W)=>{W.exports=Math.abs}),zJ=G0((K,W)=>{W.exports=Math.floor}),MJ=G0((K,W)=>{W.exports=Math.max}),LJ=G0((K,W)=>{W.exports=Math.min}),EJ=G0((K,W)=>{W.exports=Math.pow}),RJ=G0((K,W)=>{W.exports=Math.round}),qJ=G0((K,W)=>{W.exports=Number.isNaN||function(H){return H!==H}}),SJ=G0((K,W)=>{var H=qJ();W.exports=function(T){if(H(T)||T===0)return T;return T<0?-1:1}}),PJ=G0((K,W)=>{W.exports=Object.getOwnPropertyDescriptor}),KX=G0((K,W)=>{var H=PJ();if(H)try{H([],"length")}catch(T){H=null}W.exports=H}),EX=G0((K,W)=>{var H=Object.defineProperty||!1;if(H)try{H({},"a",{value:1})}catch(T){H=!1}W.exports=H}),WQ=G0((K,W)=>{W.exports=function(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var H={},T=Symbol("test"),O=Object(T);if(typeof T==="string")return!1;if(Object.prototype.toString.call(T)!=="[object Symbol]")return!1;if(Object.prototype.toString.call(O)!=="[object Symbol]")return!1;var L=42;H[T]=L;for(var V in H)return!1;if(typeof Object.keys==="function"&&Object.keys(H).length!==0)return!1;if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(H).length!==0)return!1;var P=Object.getOwnPropertySymbols(H);if(P.length!==1||P[0]!==T)return!1;if(!Object.prototype.propertyIsEnumerable.call(H,T))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var S=Object.getOwnPropertyDescriptor(H,T);if(S.value!==L||S.enumerable!==!0)return!1}return!0}}),kJ=G0((K,W)=>{var H=typeof Symbol<"u"&&Symbol,T=WQ();W.exports=function(){if(typeof H!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof H("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return T()}}),FQ=G0((K,W)=>{W.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}),HQ=G0((K,W)=>{var H=IQ();W.exports=H.getPrototypeOf||null}),jJ=G0((K,W)=>{var H="Function.prototype.bind called on incompatible ",T=Object.prototype.toString,O=Math.max,L="[object Function]",V=function(M,z){var A=[];for(var D=0;D<M.length;D+=1)A[D]=M[D];for(var R=0;R<z.length;R+=1)A[R+M.length]=z[R];return A},P=function(M,z){var A=[];for(var D=z||0,R=0;D<M.length;D+=1,R+=1)A[R]=M[D];return A},S=function(M,z){var A="";for(var D=0;D<M.length;D+=1)if(A+=M[D],D+1<M.length)A+=z;return A};W.exports=function(M){var z=this;if(typeof z!=="function"||T.apply(z)!==L)throw TypeError(H+z);var A=P(arguments,1),D,R=function(){if(this instanceof D){var _=z.apply(this,V(A,arguments));if(Object(_)===_)return _;return this}return z.apply(M,V(A,arguments))},q=O(0,z.length-A.length),v=[];for(var k=0;k<q;k++)v[k]="$"+k;if(D=Function("binder","return function ("+S(v,",")+"){ return binder.apply(this,arguments); }")(R),z.prototype){var B=function(){};B.prototype=z.prototype,D.prototype=new B,B.prototype=null}return D}}),IX=G0((K,W)=>{var H=jJ();W.exports=Function.prototype.bind||H}),XZ=G0((K,W)=>{W.exports=Function.prototype.call}),ZZ=G0((K,W)=>{W.exports=Function.prototype.apply}),vJ=G0((K,W)=>{W.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply}),OQ=G0((K,W)=>{var H=IX(),T=ZZ(),O=XZ(),L=vJ();W.exports=L||H.call(O,T)}),QZ=G0((K,W)=>{var H=IX(),T=GX(),O=XZ(),L=OQ();W.exports=function(V){if(V.length<1||typeof V[0]!=="function")throw new T("a function is required");return L(H,O,V)}}),_J=G0((K,W)=>{var H=QZ(),T=KX(),O;try{O=[].__proto__===Array.prototype}catch(S){if(!S||typeof S!=="object"||!("code"in S)||S.code!=="ERR_PROTO_ACCESS")throw S}var L=!!O&&T&&T(Object.prototype,"__proto__"),V=Object,P=V.getPrototypeOf;W.exports=L&&typeof L.get==="function"?H([L.get]):typeof P==="function"?function(S){return P(S==null?S:V(S))}:!1}),AQ=G0((K,W)=>{var H=FQ(),T=HQ(),O=_J();W.exports=H?function(L){return H(L)}:T?function(L){if(!L||typeof L!=="object"&&typeof L!=="function")throw TypeError("getProto: not an object");return T(L)}:O?function(L){return O(L)}:null}),BJ=G0((K,W)=>{var H=Function.prototype.call,T=Object.prototype.hasOwnProperty,O=IX();W.exports=O.call(H,T)}),CQ=G0((K,W)=>{var H,T=IQ(),O=HJ(),L=OJ(),V=AJ(),P=CJ(),S=$Q(),M=GX(),z=TJ(),A=DJ(),D=zJ(),R=MJ(),q=LJ(),v=EJ(),k=RJ(),B=SJ(),_=Function,x=function(Q0){try{return _('"use strict"; return ('+Q0+").constructor;")()}catch(m){}},w=KX(),y=EX(),l=function(){throw new M},J0=w?function(){try{return arguments.callee,l}catch(Q0){try{return w(arguments,"callee").get}catch(m){return l}}}():l,K0=kJ()(),V0=AQ(),u=HQ(),X0=FQ(),U=ZZ(),Q=XZ(),J={},Z=typeof Uint8Array>"u"||!V0?H:V0(Uint8Array),Y={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?H:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?H:ArrayBuffer,"%ArrayIteratorPrototype%":K0&&V0?V0([][Symbol.iterator]()):H,"%AsyncFromSyncIteratorPrototype%":H,"%AsyncFunction%":J,"%AsyncGenerator%":J,"%AsyncGeneratorFunction%":J,"%AsyncIteratorPrototype%":J,"%Atomics%":typeof Atomics>"u"?H:Atomics,"%BigInt%":typeof BigInt>"u"?H:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?H:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?H:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?H:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":O,"%eval%":eval,"%EvalError%":L,"%Float16Array%":typeof Float16Array>"u"?H:Float16Array,"%Float32Array%":typeof Float32Array>"u"?H:Float32Array,"%Float64Array%":typeof Float64Array>"u"?H:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?H:FinalizationRegistry,"%Function%":_,"%GeneratorFunction%":J,"%Int8Array%":typeof Int8Array>"u"?H:Int8Array,"%Int16Array%":typeof Int16Array>"u"?H:Int16Array,"%Int32Array%":typeof Int32Array>"u"?H:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":K0&&V0?V0(V0([][Symbol.iterator]())):H,"%JSON%":typeof JSON==="object"?JSON:H,"%Map%":typeof Map>"u"?H:Map,"%MapIteratorPrototype%":typeof Map>"u"||!K0||!V0?H:V0(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":T,"%Object.getOwnPropertyDescriptor%":w,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?H:Promise,"%Proxy%":typeof Proxy>"u"?H:Proxy,"%RangeError%":V,"%ReferenceError%":P,"%Reflect%":typeof Reflect>"u"?H:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?H:Set,"%SetIteratorPrototype%":typeof Set>"u"||!K0||!V0?H:V0(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?H:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":K0&&V0?V0(""[Symbol.iterator]()):H,"%Symbol%":K0?Symbol:H,"%SyntaxError%":S,"%ThrowTypeError%":J0,"%TypedArray%":Z,"%TypeError%":M,"%Uint8Array%":typeof Uint8Array>"u"?H:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?H:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?H:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?H:Uint32Array,"%URIError%":z,"%WeakMap%":typeof WeakMap>"u"?H:WeakMap,"%WeakRef%":typeof WeakRef>"u"?H:WeakRef,"%WeakSet%":typeof WeakSet>"u"?H:WeakSet,"%Function.prototype.call%":Q,"%Function.prototype.apply%":U,"%Object.defineProperty%":y,"%Object.getPrototypeOf%":u,"%Math.abs%":A,"%Math.floor%":D,"%Math.max%":R,"%Math.min%":q,"%Math.pow%":v,"%Math.round%":k,"%Math.sign%":B,"%Reflect.getPrototypeOf%":X0};if(V0)try{null.error}catch(Q0){$=V0(V0(Q0)),Y["%Error.prototype%"]=$}var $,F=function Q0(m){var i;if(m==="%AsyncFunction%")i=x("async function () {}");else if(m==="%GeneratorFunction%")i=x("function* () {}");else if(m==="%AsyncGeneratorFunction%")i=x("async function* () {}");else if(m==="%AsyncGenerator%"){var g0=Q0("%AsyncGeneratorFunction%");if(g0)i=g0.prototype}else if(m==="%AsyncIteratorPrototype%"){var f=Q0("%AsyncGenerator%");if(f&&V0)i=V0(f.prototype)}return Y[m]=i,i},G={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},X=IX(),I=BJ(),E=X.call(Q,Array.prototype.concat),C=X.call(U,Array.prototype.splice),j=X.call(Q,String.prototype.replace),g=X.call(Q,String.prototype.slice),p=X.call(Q,RegExp.prototype.exec),n=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,$0=/\\(\\)?/g,r=function(Q0){var m=g(Q0,0,1),i=g(Q0,-1);if(m==="%"&&i!=="%")throw new S("invalid intrinsic syntax, expected closing `%`");else if(i==="%"&&m!=="%")throw new S("invalid intrinsic syntax, expected opening `%`");var g0=[];return j(Q0,n,function(f,h,Y0,t){g0[g0.length]=Y0?j(t,$0,"$1"):h||f}),g0},d=function(Q0,m){var i=Q0,g0;if(I(G,i))g0=G[i],i="%"+g0[0]+"%";if(I(Y,i)){var f=Y[i];if(f===J)f=F(i);if(typeof f>"u"&&!m)throw new M("intrinsic "+Q0+" exists, but is not available. Please file an issue!");return{alias:g0,name:i,value:f}}throw new S("intrinsic "+Q0+" does not exist!")};W.exports=function(Q0,m){if(typeof Q0!=="string"||Q0.length===0)throw new M("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof m!=="boolean")throw new M('"allowMissing" argument must be a boolean');if(p(/^%?[^%]*%?$/,Q0)===null)throw new S("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=r(Q0),g0=i.length>0?i[0]:"",f=d("%"+g0+"%",m),h=f.name,Y0=f.value,t=!1,e=f.alias;if(e)g0=e[0],C(i,E([0,1],e));for(var M0=1,c=!0;M0<i.length;M0+=1){var o=i[M0],N0=g(o,0,1),s=g(o,-1);if((N0==='"'||N0==="'"||N0==="`"||(s==='"'||s==="'"||s==="`"))&&N0!==s)throw new S("property names with quotes must have matching quotes");if(o==="constructor"||!c)t=!0;if(g0+="."+o,h="%"+g0+"%",I(Y,h))Y0=Y[h];else if(Y0!=null){if(!(o in Y0)){if(!m)throw new M("base intrinsic for "+Q0+" exists, but the property is not available.");return}if(w&&M0+1>=i.length){var Z0=w(Y0,o);if(c=!!Z0,c&&"get"in Z0&&!("originalValue"in Z0.get))Y0=Z0.get;else Y0=Y0[o]}else c=I(Y0,o),Y0=Y0[o];if(c&&!t)Y[h]=Y0}}return Y0}}),TQ=G0((K,W)=>{var H=CQ(),T=QZ(),O=T([H("%String.prototype.indexOf%")]);W.exports=function(L,V){var P=H(L,!!V);if(typeof P==="function"&&O(L,".prototype.")>-1)return T([P]);return P}}),xJ=G0((K,W)=>{var H=Function.prototype.toString,T=typeof Reflect==="object"&&Reflect!==null&&Reflect.apply,O,L;if(typeof T==="function"&&typeof Object.defineProperty==="function")try{O=Object.defineProperty({},"length",{get:function(){throw L}}),L={},T(function(){throw 42},null,O)}catch(w){if(w!==L)T=null}else T=null;var V=/^\s*class\b/,P=function(w){try{var y=H.call(w);return V.test(y)}catch(l){return!1}},S=function(w){try{if(P(w))return!1;return H.call(w),!0}catch(y){return!1}},M=Object.prototype.toString,z="[object Object]",A="[object Function]",D="[object GeneratorFunction]",R="[object HTMLAllCollection]",q="[object HTML document.all class]",v="[object HTMLCollection]",k=typeof Symbol==="function"&&!!Symbol.toStringTag,B=!(0 in[,]),_=function(){return!1};if(typeof document==="object"){if(x=document.all,M.call(x)===M.call(document.all))_=function(w){if((B||!w)&&(typeof w>"u"||typeof w==="object"))try{var y=M.call(w);return(y===R||y===q||y===v||y===z)&&w("")==null}catch(l){}return!1}}var x;W.exports=T?function(w){if(_(w))return!0;if(!w)return!1;if(typeof w!=="function"&&typeof w!=="object")return!1;try{T(w,null,O)}catch(y){if(y!==L)return!1}return!P(w)&&S(w)}:function(w){if(_(w))return!0;if(!w)return!1;if(typeof w!=="function"&&typeof w!=="object")return!1;if(k)return S(w);if(P(w))return!1;var y=M.call(w);if(y!==A&&y!==D&&!/^\[object HTML/.test(y))return!1;return S(w)}}),NJ=G0((K,W)=>{var H=xJ(),T=Object.prototype.toString,O=Object.prototype.hasOwnProperty,L=function(M,z,A){for(var D=0,R=M.length;D<R;D++)if(O.call(M,D))if(A==null)z(M[D],D,M);else z.call(A,M[D],D,M)},V=function(M,z,A){for(var D=0,R=M.length;D<R;D++)if(A==null)z(M.charAt(D),D,M);else z.call(A,M.charAt(D),D,M)},P=function(M,z,A){for(var D in M)if(O.call(M,D))if(A==null)z(M[D],D,M);else z.call(A,M[D],D,M)};function S(M){return T.call(M)==="[object Array]"}W.exports=function(M,z,A){if(!H(z))throw TypeError("iterator must be a function");var D;if(arguments.length>=3)D=A;if(S(M))L(M,z,D);else if(typeof M==="string")V(M,z,D);else P(M,z,D)}}),gJ=G0((K,W)=>{W.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]}),wJ=G0((K,W)=>{var H=gJ(),T=typeof globalThis>"u"?globalThis:globalThis;W.exports=function(){var O=[];for(var L=0;L<H.length;L++)if(typeof T[H[L]]==="function")O[O.length]=H[L];return O}}),yJ=G0((K,W)=>{var H=EX(),T=$Q(),O=GX(),L=KX();W.exports=function(V,P,S){if(!V||typeof V!=="object"&&typeof V!=="function")throw new O("`obj` must be an object or a function`");if(typeof P!=="string"&&typeof P!=="symbol")throw new O("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!=="boolean"&&arguments[3]!==null)throw new O("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!=="boolean"&&arguments[4]!==null)throw new O("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!=="boolean"&&arguments[5]!==null)throw new O("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!=="boolean")throw new O("`loose`, if provided, must be a boolean");var M=arguments.length>3?arguments[3]:null,z=arguments.length>4?arguments[4]:null,A=arguments.length>5?arguments[5]:null,D=arguments.length>6?arguments[6]:!1,R=!!L&&L(V,P);if(H)H(V,P,{configurable:A===null&&R?R.configurable:!A,enumerable:M===null&&R?R.enumerable:!M,value:S,writable:z===null&&R?R.writable:!z});else if(D||!M&&!z&&!A)V[P]=S;else throw new T("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}),fJ=G0((K,W)=>{var H=EX(),T=function(){return!!H};T.hasArrayLengthDefineBug=function(){if(!H)return null;try{return H([],"length",{value:1}).length!==1}catch(O){return!0}},W.exports=T}),cJ=G0((K,W)=>{var H=CQ(),T=yJ(),O=fJ()(),L=KX(),V=GX(),P=H("%Math.floor%");W.exports=function(S,M){if(typeof S!=="function")throw new V("`fn` is not a function");if(typeof M!=="number"||M<0||M>4294967295||P(M)!==M)throw new V("`length` must be a positive 32-bit integer");var z=arguments.length>2&&!!arguments[2],A=!0,D=!0;if("length"in S&&L){var R=L(S,"length");if(R&&!R.configurable)A=!1;if(R&&!R.writable)D=!1}if(A||D||!z)if(O)T(S,"length",M,!0,!0);else T(S,"length",M);return S}}),pJ=G0((K,W)=>{var H=IX(),T=ZZ(),O=OQ();W.exports=function(){return O(H,T,arguments)}}),hJ=G0((K,W)=>{var H=cJ(),T=EX(),O=QZ(),L=pJ();if(W.exports=function(V){var P=O(arguments),S=V.length-(arguments.length-1);return H(P,1+(S>0?S:0),!0)},T)T(W.exports,"apply",{value:L});else W.exports.apply=L}),uJ=G0((K,W)=>{var H=WQ();W.exports=function(){return H()&&!!Symbol.toStringTag}}),bJ=G0((K,W)=>{var H=NJ(),T=wJ(),O=hJ(),L=TQ(),V=KX(),P=AQ(),S=L("Object.prototype.toString"),M=uJ()(),z=typeof globalThis>"u"?globalThis:globalThis,A=T(),D=L("String.prototype.slice"),R=L("Array.prototype.indexOf",!0)||function(B,_){for(var x=0;x<B.length;x+=1)if(B[x]===_)return x;return-1},q={__proto__:null};if(M&&V&&P)H(A,function(B){var _=new z[B];if(Symbol.toStringTag in _&&P){var x=P(_),w=V(x,Symbol.toStringTag);if(!w&&x){var y=P(x);w=V(y,Symbol.toStringTag)}q["$"+B]=O(w.get)}});else H(A,function(B){var _=new z[B],x=_.slice||_.set;if(x)q["$"+B]=O(x)});var v=function(B){var _=!1;return H(q,function(x,w){if(!_)try{if("$"+x(B)===w)_=D(w,1)}catch(y){}}),_},k=function(B){var _=!1;return H(q,function(x,w){if(!_)try{x(B),_=D(w,1)}catch(y){}}),_};W.exports=function(B){if(!B||typeof B!=="object")return!1;if(!M){var _=D(S(B),8,-1);if(R(A,_)>-1)return _;if(_!=="Object")return!1;return k(B)}if(!V)return null;return v(B)}}),dJ=G0((K,W)=>{var H=bJ();W.exports=function(T){return!!H(T)}}),lJ=G0((K,W)=>{var H=GX(),T=TQ(),O=T("TypedArray.prototype.buffer",!0),L=dJ();W.exports=O||function(V){if(!L(V))throw new H("Not a Typed Array");return V.buffer}}),oJ=G0((K,W)=>{var H=MU().Buffer,T=FJ(),O=lJ(),L=ArrayBuffer.isView||function(M){try{return O(M),!0}catch(z){return!1}},V=typeof Uint8Array<"u",P=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",S=P&&(H.prototype instanceof Uint8Array||H.TYPED_ARRAY_SUPPORT);W.exports=function(M,z){if(H.isBuffer(M)){if(M.constructor&&!("isBuffer"in M))return H.from(M);return M}if(typeof M==="string")return H.from(M,z);if(P&&L(M)){if(M.byteLength===0)return H.alloc(0);if(S){var A=H.from(M.buffer,M.byteOffset,M.byteLength);if(A.byteLength===M.byteLength)return A}var D=M instanceof Uint8Array?M:new Uint8Array(M.buffer,M.byteOffset,M.byteLength),R=H.from(D);if(R.length===M.byteLength)return R}if(V&&M instanceof Uint8Array)return H.from(M);var q=T(M);if(q)for(var v=0;v<M.length;v+=1){var k=M[v];if(typeof k!=="number"||k<0||k>255||~~k!==k)throw RangeError("Array items must be numbers in the range 0-255.")}if(q||H.isBuffer(M)&&M.constructor&&typeof M.constructor.isBuffer==="function"&&M.constructor.isBuffer(M))return H.from(M);throw TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}}),YZ=G0((K,W)=>{var H=MU().Buffer,T=oJ(),O=typeof Uint8Array<"u",L=O&&typeof ArrayBuffer<"u",V=L&&ArrayBuffer.isView;W.exports=function(P,S,M){if(typeof P==="string"||H.isBuffer(P)||O&&P instanceof Uint8Array||V&&V(P))return T(P,S);throw TypeError(M+" must be a string, a Buffer, a Uint8Array, or a DataView")}}),DQ=G0((K,W)=>{var H={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,rmd160:20,ripemd160:20},T={__proto__:null,"sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512","ripemd-160":"ripemd160"},O=KQ(),L=MU().Buffer,V=iX(),P=UZ(),S=YZ();function M(z,A,D,R,q){V(D,R),z=S(z,P,"Password"),A=S(A,P,"Salt");var v=(q||"sha1").toLowerCase(),k=T[v]||v,B=H[k];if(typeof B!=="number"||!B)throw TypeError("Digest algorithm not supported: "+q);var _=L.allocUnsafe(R),x=L.allocUnsafe(A.length+4);A.copy(x,0,0,A.length);var w=0,y=B,l=Math.ceil(R/y);for(var J0=1;J0<=l;J0++){x.writeUInt32BE(J0,A.length);var K0=O(k,z).update(x).digest(),V0=K0;for(var u=1;u<D;u++){V0=O(k,z).update(V0).digest();for(var X0=0;X0<y;X0++)K0[X0]^=V0[X0]}K0.copy(_,w),w+=y}return _}W.exports=M}),nJ=G0((K,W)=>{var H=MU().Buffer,T=iX(),O=UZ(),L=DQ(),V=YZ(),P,S=globalThis.crypto&&globalThis.crypto.subtle,M={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},z=[],A;function D(){if(A)return A;if(globalThis.process&&globalThis.process.nextTick)A=globalThis.process.nextTick;else if(globalThis.queueMicrotask)A=globalThis.queueMicrotask;else if(globalThis.setImmediate)A=globalThis.setImmediate;else A=globalThis.setTimeout;return A}function R(k,B,_,x,w){return S.importKey("raw",k,{name:"PBKDF2"},!1,["deriveBits"]).then(function(y){return S.deriveBits({name:"PBKDF2",salt:B,iterations:_,hash:{name:w}},y,x<<3)}).then(function(y){return H.from(y)})}function q(k){if(globalThis.process&&!globalThis.process.browser)return Promise.resolve(!1);if(!S||!S.importKey||!S.deriveBits)return Promise.resolve(!1);if(z[k]!==void 0)return z[k];P=P||H.alloc(8);var B=R(P,P,10,128,k).then(function(){return!0},function(){return!1});return z[k]=B,B}function v(k,B){k.then(function(_){D()(function(){B(null,_)})},function(_){D()(function(){B(_)})})}W.exports=function(k,B,_,x,w,y){if(typeof w==="function")y=w,w=void 0;if(T(_,x),k=V(k,O,"Password"),B=V(B,O,"Salt"),typeof y!=="function")throw Error("No callback provided to pbkdf2");w=w||"sha1";var l=M[w.toLowerCase()];if(!l||typeof globalThis.Promise!=="function"){D()(function(){var J0;try{J0=L(k,B,_,x,w)}catch(K0){y(K0);return}y(null,J0)});return}v(q(l).then(function(J0){if(J0)return R(k,B,_,x,l);return L(k,B,_,x,w)}),y)}}),zQ=G0((K)=>{var W=(RU(),h0(SU)),H=iX(),T=UZ(),O=YZ();function L(P,S,M,z,A,D){if(H(M,z),P=O(P,T,"Password"),S=O(S,T,"Salt"),typeof A==="function")D=A,A="sha1";if(typeof D!=="function")throw Error("No callback provided to pbkdf2");return W.pbkdf2(P,S,M,z,A,D)}function V(P,S,M,z,A){return H(M,z),P=O(P,T,"Password"),S=O(S,T,"Salt"),A=A||"sha1",W.pbkdf2Sync(P,S,M,z,A)}if(!W.pbkdf2Sync||W.pbkdf2Sync.toString().indexOf("keylen, digest")===-1)K.pbkdf2Sync=DQ(),K.pbkdf2=nJ();else K.pbkdf2Sync=V,K.pbkdf2=L}),mJ=G0((K)=>{var W=(RU(),h0(SU));K.createCipher=K.Cipher=W.createCipher,K.createCipheriv=K.Cipheriv=W.createCipheriv,K.createDecipher=K.Decipher=W.createDecipher,K.createDecipheriv=K.Decipheriv=W.createDecipheriv,K.listCiphers=K.getCiphers=W.getCiphers}),sJ=G0((K)=>{var W=(RU(),h0(SU));K.DiffieHellmanGroup=W.DiffieHellmanGroup,K.createDiffieHellmanGroup=W.createDiffieHellmanGroup,K.getDiffieHellman=W.getDiffieHellman,K.createDiffieHellman=W.createDiffieHellman,K.DiffieHellman=W.DiffieHellman}),tJ=G0((K)=>{var W=(RU(),h0(SU));K.createSign=W.createSign,K.Sign=W.Sign,K.createVerify=W.createVerify,K.Verify=W.Verify}),rJ=G0((K,W)=>{W.exports={name:"elliptic",version:"6.6.1",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"}}}),wU=G0((K,W)=>{(function(H,T){function O(U,Q){if(!U)throw Error(Q||"Assertion failed")}function L(U,Q){U.super_=Q;var J=function(){};J.prototype=Q.prototype,U.prototype=new J,U.prototype.constructor=U}function V(U,Q,J){if(V.isBN(U))return U;if(this.negative=0,this.words=null,this.length=0,this.red=null,U!==null){if(Q==="le"||Q==="be")J=Q,Q=10;this._init(U||0,Q||10,J||"be")}}if(typeof H==="object")H.exports=V;else T.BN=V;V.BN=V,V.wordSize=26;var P;try{if(typeof window<"u"&&typeof window.Buffer<"u")P=window.Buffer;else P=(OU(),h0(HU)).Buffer}catch(U){}V.isBN=function(U){if(U instanceof V)return!0;return U!==null&&typeof U==="object"&&U.constructor.wordSize===V.wordSize&&Array.isArray(U.words)},V.max=function(U,Q){if(U.cmp(Q)>0)return U;return Q},V.min=function(U,Q){if(U.cmp(Q)<0)return U;return Q},V.prototype._init=function(U,Q,J){if(typeof U==="number")return this._initNumber(U,Q,J);if(typeof U==="object")return this._initArray(U,Q,J);if(Q==="hex")Q=16;O(Q===(Q|0)&&Q>=2&&Q<=36),U=U.toString().replace(/\s+/g,"");var Z=0;if(U[0]==="-")Z++,this.negative=1;if(Z<U.length){if(Q===16)this._parseHex(U,Z,J);else if(this._parseBase(U,Q,Z),J==="le")this._initArray(this.toArray(),Q,J)}},V.prototype._initNumber=function(U,Q,J){if(U<0)this.negative=1,U=-U;if(U<67108864)this.words=[U&67108863],this.length=1;else if(U<4503599627370496)this.words=[U&67108863,U/67108864&67108863],this.length=2;else O(U<9007199254740992),this.words=[U&67108863,U/67108864&67108863,1],this.length=3;if(J!=="le")return;this._initArray(this.toArray(),Q,J)},V.prototype._initArray=function(U,Q,J){if(O(typeof U.length==="number"),U.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(U.length/3),this.words=Array(this.length);for(var Z=0;Z<this.length;Z++)this.words[Z]=0;var Y,$,F=0;if(J==="be"){for(Z=U.length-1,Y=0;Z>=0;Z-=3)if($=U[Z]|U[Z-1]<<8|U[Z-2]<<16,this.words[Y]|=$<<F&67108863,this.words[Y+1]=$>>>26-F&67108863,F+=24,F>=26)F-=26,Y++}else if(J==="le"){for(Z=0,Y=0;Z<U.length;Z+=3)if($=U[Z]|U[Z+1]<<8|U[Z+2]<<16,this.words[Y]|=$<<F&67108863,this.words[Y+1]=$>>>26-F&67108863,F+=24,F>=26)F-=26,Y++}return this.strip()};function S(U,Q){var J=U.charCodeAt(Q);if(J>=65&&J<=70)return J-55;else if(J>=97&&J<=102)return J-87;else return J-48&15}function M(U,Q,J){var Z=S(U,J);if(J-1>=Q)Z|=S(U,J-1)<<4;return Z}V.prototype._parseHex=function(U,Q,J){this.length=Math.ceil((U.length-Q)/6),this.words=Array(this.length);for(var Z=0;Z<this.length;Z++)this.words[Z]=0;var Y=0,$=0,F;if(J==="be")for(Z=U.length-1;Z>=Q;Z-=2)if(F=M(U,Q,Z)<<Y,this.words[$]|=F&67108863,Y>=18)Y-=18,$+=1,this.words[$]|=F>>>26;else Y+=8;else{var G=U.length-Q;for(Z=G%2===0?Q+1:Q;Z<U.length;Z+=2)if(F=M(U,Q,Z)<<Y,this.words[$]|=F&67108863,Y>=18)Y-=18,$+=1,this.words[$]|=F>>>26;else Y+=8}this.strip()};function z(U,Q,J,Z){var Y=0,$=Math.min(U.length,J);for(var F=Q;F<$;F++){var G=U.charCodeAt(F)-48;if(Y*=Z,G>=49)Y+=G-49+10;else if(G>=17)Y+=G-17+10;else Y+=G}return Y}V.prototype._parseBase=function(U,Q,J){this.words=[0],this.length=1;for(var Z=0,Y=1;Y<=67108863;Y*=Q)Z++;Z--,Y=Y/Q|0;var $=U.length-J,F=$%Z,G=Math.min($,$-F)+J,X=0;for(var I=J;I<G;I+=Z)if(X=z(U,I,I+Z,Q),this.imuln(Y),this.words[0]+X<67108864)this.words[0]+=X;else this._iaddn(X);if(F!==0){var E=1;X=z(U,I,U.length,Q);for(I=0;I<F;I++)E*=Q;if(this.imuln(E),this.words[0]+X<67108864)this.words[0]+=X;else this._iaddn(X)}this.strip()},V.prototype.copy=function(U){U.words=Array(this.length);for(var Q=0;Q<this.length;Q++)U.words[Q]=this.words[Q];U.length=this.length,U.negative=this.negative,U.red=this.red},V.prototype.clone=function(){var U=new V(null);return this.copy(U),U},V.prototype._expand=function(U){while(this.length<U)this.words[this.length++]=0;return this},V.prototype.strip=function(){while(this.length>1&&this.words[this.length-1]===0)this.length--;return this._normSign()},V.prototype._normSign=function(){if(this.length===1&&this.words[0]===0)this.negative=0;return this},V.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var A=["","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"],D=[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],R=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];if(V.prototype.toString=function(U,Q){U=U||10,Q=Q|0||1;var J;if(U===16||U==="hex"){J="";var Z=0,Y=0;for(var $=0;$<this.length;$++){var F=this.words[$],G=((F<<Z|Y)&16777215).toString(16);if(Y=F>>>24-Z&16777215,Z+=2,Z>=26)Z-=26,$--;if(Y!==0||$!==this.length-1)J=A[6-G.length]+G+J;else J=G+J}if(Y!==0)J=Y.toString(16)+J;while(J.length%Q!==0)J="0"+J;if(this.negative!==0)J="-"+J;return J}if(U===(U|0)&&U>=2&&U<=36){var X=D[U],I=R[U];J="";var E=this.clone();E.negative=0;while(!E.isZero()){var C=E.modn(I).toString(U);if(E=E.idivn(I),!E.isZero())J=A[X-C.length]+C+J;else J=C+J}if(this.isZero())J="0"+J;while(J.length%Q!==0)J="0"+J;if(this.negative!==0)J="-"+J;return J}O(!1,"Base should be between 2 and 36")},V.prototype.toNumber=function(){var U=this.words[0];if(this.length===2)U+=this.words[1]*67108864;else if(this.length===3&&this.words[2]===1)U+=4503599627370496+this.words[1]*67108864;else if(this.length>2)O(!1,"Number can only safely store up to 53 bits");return this.negative!==0?-U:U},V.prototype.toJSON=function(){return this.toString(16)},V.prototype.toBuffer=function(U,Q){return O(typeof P<"u"),this.toArrayLike(P,U,Q)},V.prototype.toArray=function(U,Q){return this.toArrayLike(Array,U,Q)},V.prototype.toArrayLike=function(U,Q,J){var Z=this.byteLength(),Y=J||Math.max(1,Z);O(Z<=Y,"byte array longer than desired length"),O(Y>0,"Requested array length <= 0"),this.strip();var $=Q==="le",F=new U(Y),G,X,I=this.clone();if(!$){for(X=0;X<Y-Z;X++)F[X]=0;for(X=0;!I.isZero();X++)G=I.andln(255),I.iushrn(8),F[Y-X-1]=G}else{for(X=0;!I.isZero();X++)G=I.andln(255),I.iushrn(8),F[X]=G;for(;X<Y;X++)F[X]=0}return F},Math.clz32)V.prototype._countBits=function(U){return 32-Math.clz32(U)};else V.prototype._countBits=function(U){var Q=U,J=0;if(Q>=4096)J+=13,Q>>>=13;if(Q>=64)J+=7,Q>>>=7;if(Q>=8)J+=4,Q>>>=4;if(Q>=2)J+=2,Q>>>=2;return J+Q};V.prototype._zeroBits=function(U){if(U===0)return 26;var Q=U,J=0;if((Q&8191)===0)J+=13,Q>>>=13;if((Q&127)===0)J+=7,Q>>>=7;if((Q&15)===0)J+=4,Q>>>=4;if((Q&3)===0)J+=2,Q>>>=2;if((Q&1)===0)J++;return J},V.prototype.bitLength=function(){var U=this.words[this.length-1],Q=this._countBits(U);return(this.length-1)*26+Q};function q(U){var Q=Array(U.bitLength());for(var J=0;J<Q.length;J++){var Z=J/26|0,Y=J%26;Q[J]=(U.words[Z]&1<<Y)>>>Y}return Q}V.prototype.zeroBits=function(){if(this.isZero())return 0;var U=0;for(var Q=0;Q<this.length;Q++){var J=this._zeroBits(this.words[Q]);if(U+=J,J!==26)break}return U},V.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},V.prototype.toTwos=function(U){if(this.negative!==0)return this.abs().inotn(U).iaddn(1);return this.clone()},V.prototype.fromTwos=function(U){if(this.testn(U-1))return this.notn(U).iaddn(1).ineg();return this.clone()},V.prototype.isNeg=function(){return this.negative!==0},V.prototype.neg=function(){return this.clone().ineg()},V.prototype.ineg=function(){if(!this.isZero())this.negative^=1;return this},V.prototype.iuor=function(U){while(this.length<U.length)this.words[this.length++]=0;for(var Q=0;Q<U.length;Q++)this.words[Q]=this.words[Q]|U.words[Q];return this.strip()},V.prototype.ior=function(U){return O((this.negative|U.negative)===0),this.iuor(U)},V.prototype.or=function(U){if(this.length>U.length)return this.clone().ior(U);return U.clone().ior(this)},V.prototype.uor=function(U){if(this.length>U.length)return this.clone().iuor(U);return U.clone().iuor(this)},V.prototype.iuand=function(U){var Q;if(this.length>U.length)Q=U;else Q=this;for(var J=0;J<Q.length;J++)this.words[J]=this.words[J]&U.words[J];return this.length=Q.length,this.strip()},V.prototype.iand=function(U){return O((this.negative|U.negative)===0),this.iuand(U)},V.prototype.and=function(U){if(this.length>U.length)return this.clone().iand(U);return U.clone().iand(this)},V.prototype.uand=function(U){if(this.length>U.length)return this.clone().iuand(U);return U.clone().iuand(this)},V.prototype.iuxor=function(U){var Q,J;if(this.length>U.length)Q=this,J=U;else Q=U,J=this;for(var Z=0;Z<J.length;Z++)this.words[Z]=Q.words[Z]^J.words[Z];if(this!==Q)for(;Z<Q.length;Z++)this.words[Z]=Q.words[Z];return this.length=Q.length,this.strip()},V.prototype.ixor=function(U){return O((this.negative|U.negative)===0),this.iuxor(U)},V.prototype.xor=function(U){if(this.length>U.length)return this.clone().ixor(U);return U.clone().ixor(this)},V.prototype.uxor=function(U){if(this.length>U.length)return this.clone().iuxor(U);return U.clone().iuxor(this)},V.prototype.inotn=function(U){O(typeof U==="number"&&U>=0);var Q=Math.ceil(U/26)|0,J=U%26;if(this._expand(Q),J>0)Q--;for(var Z=0;Z<Q;Z++)this.words[Z]=~this.words[Z]&67108863;if(J>0)this.words[Z]=~this.words[Z]&67108863>>26-J;return this.strip()},V.prototype.notn=function(U){return this.clone().inotn(U)},V.prototype.setn=function(U,Q){O(typeof U==="number"&&U>=0);var J=U/26|0,Z=U%26;if(this._expand(J+1),Q)this.words[J]=this.words[J]|1<<Z;else this.words[J]=this.words[J]&~(1<<Z);return this.strip()},V.prototype.iadd=function(U){var Q;if(this.negative!==0&&U.negative===0)return this.negative=0,Q=this.isub(U),this.negative^=1,this._normSign();else if(this.negative===0&&U.negative!==0)return U.negative=0,Q=this.isub(U),U.negative=1,Q._normSign();var J,Z;if(this.length>U.length)J=this,Z=U;else J=U,Z=this;var Y=0;for(var $=0;$<Z.length;$++)Q=(J.words[$]|0)+(Z.words[$]|0)+Y,this.words[$]=Q&67108863,Y=Q>>>26;for(;Y!==0&&$<J.length;$++)Q=(J.words[$]|0)+Y,this.words[$]=Q&67108863,Y=Q>>>26;if(this.length=J.length,Y!==0)this.words[this.length]=Y,this.length++;else if(J!==this)for(;$<J.length;$++)this.words[$]=J.words[$];return this},V.prototype.add=function(U){var Q;if(U.negative!==0&&this.negative===0)return U.negative=0,Q=this.sub(U),U.negative^=1,Q;else if(U.negative===0&&this.negative!==0)return this.negative=0,Q=U.sub(this),this.negative=1,Q;if(this.length>U.length)return this.clone().iadd(U);return U.clone().iadd(this)},V.prototype.isub=function(U){if(U.negative!==0){U.negative=0;var Q=this.iadd(U);return U.negative=1,Q._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(U),this.negative=1,this._normSign();var J=this.cmp(U);if(J===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Z,Y;if(J>0)Z=this,Y=U;else Z=U,Y=this;var $=0;for(var F=0;F<Y.length;F++)Q=(Z.words[F]|0)-(Y.words[F]|0)+$,$=Q>>26,this.words[F]=Q&67108863;for(;$!==0&&F<Z.length;F++)Q=(Z.words[F]|0)+$,$=Q>>26,this.words[F]=Q&67108863;if($===0&&F<Z.length&&Z!==this)for(;F<Z.length;F++)this.words[F]=Z.words[F];if(this.length=Math.max(this.length,F),Z!==this)this.negative=1;return this.strip()},V.prototype.sub=function(U){return this.clone().isub(U)};function v(U,Q,J){J.negative=Q.negative^U.negative;var Z=U.length+Q.length|0;J.length=Z,Z=Z-1|0;var Y=U.words[0]|0,$=Q.words[0]|0,F=Y*$,G=F&67108863,X=F/67108864|0;J.words[0]=G;for(var I=1;I<Z;I++){var E=X>>>26,C=X&67108863,j=Math.min(I,Q.length-1);for(var g=Math.max(0,I-U.length+1);g<=j;g++){var p=I-g|0;Y=U.words[p]|0,$=Q.words[g]|0,F=Y*$+C,E+=F/67108864|0,C=F&67108863}J.words[I]=C|0,X=E|0}if(X!==0)J.words[I]=X|0;else J.length--;return J.strip()}var k=function(U,Q,J){var Z=U.words,Y=Q.words,$=J.words,F=0,G,X,I,E=Z[0]|0,C=E&8191,j=E>>>13,g=Z[1]|0,p=g&8191,n=g>>>13,$0=Z[2]|0,r=$0&8191,d=$0>>>13,Q0=Z[3]|0,m=Q0&8191,i=Q0>>>13,g0=Z[4]|0,f=g0&8191,h=g0>>>13,Y0=Z[5]|0,t=Y0&8191,e=Y0>>>13,M0=Z[6]|0,c=M0&8191,o=M0>>>13,N0=Z[7]|0,s=N0&8191,Z0=N0>>>13,y0=Z[8]|0,H0=y0&8191,O0=y0>>>13,n0=Z[9]|0,W0=n0&8191,A0=n0>>>13,t0=Y[0]|0,D0=t0&8191,T0=t0>>>13,TU=Y[1]|0,L0=TU&8191,k0=TU>>>13,DU=Y[2]|0,j0=DU&8191,E0=DU>>>13,AU=Y[3]|0,v0=AU&8191,R0=AU>>>13,$U=Y[4]|0,_0=$U&8191,B0=$U>>>13,WU=Y[5]|0,q0=WU&8191,N=WU>>>13,b=Y[6]|0,a=b&8191,U0=b>>>13,w0=Y[7]|0,F0=w0&8191,C0=w0>>>13,m0=Y[8]|0,S0=m0&8191,x0=m0>>>13,CU=Y[9]|0,P0=CU&8191,z0=CU>>>13;J.negative=U.negative^Q.negative,J.length=19,G=Math.imul(C,D0),X=Math.imul(C,T0),X=X+Math.imul(j,D0)|0,I=Math.imul(j,T0);var s0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(s0>>>26)|0,s0&=67108863,G=Math.imul(p,D0),X=Math.imul(p,T0),X=X+Math.imul(n,D0)|0,I=Math.imul(n,T0),G=G+Math.imul(C,L0)|0,X=X+Math.imul(C,k0)|0,X=X+Math.imul(j,L0)|0,I=I+Math.imul(j,k0)|0;var c0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(c0>>>26)|0,c0&=67108863,G=Math.imul(r,D0),X=Math.imul(r,T0),X=X+Math.imul(d,D0)|0,I=Math.imul(d,T0),G=G+Math.imul(p,L0)|0,X=X+Math.imul(p,k0)|0,X=X+Math.imul(n,L0)|0,I=I+Math.imul(n,k0)|0,G=G+Math.imul(C,j0)|0,X=X+Math.imul(C,E0)|0,X=X+Math.imul(j,j0)|0,I=I+Math.imul(j,E0)|0;var f0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(f0>>>26)|0,f0&=67108863,G=Math.imul(m,D0),X=Math.imul(m,T0),X=X+Math.imul(i,D0)|0,I=Math.imul(i,T0),G=G+Math.imul(r,L0)|0,X=X+Math.imul(r,k0)|0,X=X+Math.imul(d,L0)|0,I=I+Math.imul(d,k0)|0,G=G+Math.imul(p,j0)|0,X=X+Math.imul(p,E0)|0,X=X+Math.imul(n,j0)|0,I=I+Math.imul(n,E0)|0,G=G+Math.imul(C,v0)|0,X=X+Math.imul(C,R0)|0,X=X+Math.imul(j,v0)|0,I=I+Math.imul(j,R0)|0;var d0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(d0>>>26)|0,d0&=67108863,G=Math.imul(f,D0),X=Math.imul(f,T0),X=X+Math.imul(h,D0)|0,I=Math.imul(h,T0),G=G+Math.imul(m,L0)|0,X=X+Math.imul(m,k0)|0,X=X+Math.imul(i,L0)|0,I=I+Math.imul(i,k0)|0,G=G+Math.imul(r,j0)|0,X=X+Math.imul(r,E0)|0,X=X+Math.imul(d,j0)|0,I=I+Math.imul(d,E0)|0,G=G+Math.imul(p,v0)|0,X=X+Math.imul(p,R0)|0,X=X+Math.imul(n,v0)|0,I=I+Math.imul(n,R0)|0,G=G+Math.imul(C,_0)|0,X=X+Math.imul(C,B0)|0,X=X+Math.imul(j,_0)|0,I=I+Math.imul(j,B0)|0;var b0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(b0>>>26)|0,b0&=67108863,G=Math.imul(t,D0),X=Math.imul(t,T0),X=X+Math.imul(e,D0)|0,I=Math.imul(e,T0),G=G+Math.imul(f,L0)|0,X=X+Math.imul(f,k0)|0,X=X+Math.imul(h,L0)|0,I=I+Math.imul(h,k0)|0,G=G+Math.imul(m,j0)|0,X=X+Math.imul(m,E0)|0,X=X+Math.imul(i,j0)|0,I=I+Math.imul(i,E0)|0,G=G+Math.imul(r,v0)|0,X=X+Math.imul(r,R0)|0,X=X+Math.imul(d,v0)|0,I=I+Math.imul(d,R0)|0,G=G+Math.imul(p,_0)|0,X=X+Math.imul(p,B0)|0,X=X+Math.imul(n,_0)|0,I=I+Math.imul(n,B0)|0,G=G+Math.imul(C,q0)|0,X=X+Math.imul(C,N)|0,X=X+Math.imul(j,q0)|0,I=I+Math.imul(j,N)|0;var r0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(r0>>>26)|0,r0&=67108863,G=Math.imul(c,D0),X=Math.imul(c,T0),X=X+Math.imul(o,D0)|0,I=Math.imul(o,T0),G=G+Math.imul(t,L0)|0,X=X+Math.imul(t,k0)|0,X=X+Math.imul(e,L0)|0,I=I+Math.imul(e,k0)|0,G=G+Math.imul(f,j0)|0,X=X+Math.imul(f,E0)|0,X=X+Math.imul(h,j0)|0,I=I+Math.imul(h,E0)|0,G=G+Math.imul(m,v0)|0,X=X+Math.imul(m,R0)|0,X=X+Math.imul(i,v0)|0,I=I+Math.imul(i,R0)|0,G=G+Math.imul(r,_0)|0,X=X+Math.imul(r,B0)|0,X=X+Math.imul(d,_0)|0,I=I+Math.imul(d,B0)|0,G=G+Math.imul(p,q0)|0,X=X+Math.imul(p,N)|0,X=X+Math.imul(n,q0)|0,I=I+Math.imul(n,N)|0,G=G+Math.imul(C,a)|0,X=X+Math.imul(C,U0)|0,X=X+Math.imul(j,a)|0,I=I+Math.imul(j,U0)|0;var a0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(a0>>>26)|0,a0&=67108863,G=Math.imul(s,D0),X=Math.imul(s,T0),X=X+Math.imul(Z0,D0)|0,I=Math.imul(Z0,T0),G=G+Math.imul(c,L0)|0,X=X+Math.imul(c,k0)|0,X=X+Math.imul(o,L0)|0,I=I+Math.imul(o,k0)|0,G=G+Math.imul(t,j0)|0,X=X+Math.imul(t,E0)|0,X=X+Math.imul(e,j0)|0,I=I+Math.imul(e,E0)|0,G=G+Math.imul(f,v0)|0,X=X+Math.imul(f,R0)|0,X=X+Math.imul(h,v0)|0,I=I+Math.imul(h,R0)|0,G=G+Math.imul(m,_0)|0,X=X+Math.imul(m,B0)|0,X=X+Math.imul(i,_0)|0,I=I+Math.imul(i,B0)|0,G=G+Math.imul(r,q0)|0,X=X+Math.imul(r,N)|0,X=X+Math.imul(d,q0)|0,I=I+Math.imul(d,N)|0,G=G+Math.imul(p,a)|0,X=X+Math.imul(p,U0)|0,X=X+Math.imul(n,a)|0,I=I+Math.imul(n,U0)|0,G=G+Math.imul(C,F0)|0,X=X+Math.imul(C,C0)|0,X=X+Math.imul(j,F0)|0,I=I+Math.imul(j,C0)|0;var e0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(e0>>>26)|0,e0&=67108863,G=Math.imul(H0,D0),X=Math.imul(H0,T0),X=X+Math.imul(O0,D0)|0,I=Math.imul(O0,T0),G=G+Math.imul(s,L0)|0,X=X+Math.imul(s,k0)|0,X=X+Math.imul(Z0,L0)|0,I=I+Math.imul(Z0,k0)|0,G=G+Math.imul(c,j0)|0,X=X+Math.imul(c,E0)|0,X=X+Math.imul(o,j0)|0,I=I+Math.imul(o,E0)|0,G=G+Math.imul(t,v0)|0,X=X+Math.imul(t,R0)|0,X=X+Math.imul(e,v0)|0,I=I+Math.imul(e,R0)|0,G=G+Math.imul(f,_0)|0,X=X+Math.imul(f,B0)|0,X=X+Math.imul(h,_0)|0,I=I+Math.imul(h,B0)|0,G=G+Math.imul(m,q0)|0,X=X+Math.imul(m,N)|0,X=X+Math.imul(i,q0)|0,I=I+Math.imul(i,N)|0,G=G+Math.imul(r,a)|0,X=X+Math.imul(r,U0)|0,X=X+Math.imul(d,a)|0,I=I+Math.imul(d,U0)|0,G=G+Math.imul(p,F0)|0,X=X+Math.imul(p,C0)|0,X=X+Math.imul(n,F0)|0,I=I+Math.imul(n,C0)|0,G=G+Math.imul(C,S0)|0,X=X+Math.imul(C,x0)|0,X=X+Math.imul(j,S0)|0,I=I+Math.imul(j,x0)|0;var i0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(i0>>>26)|0,i0&=67108863,G=Math.imul(W0,D0),X=Math.imul(W0,T0),X=X+Math.imul(A0,D0)|0,I=Math.imul(A0,T0),G=G+Math.imul(H0,L0)|0,X=X+Math.imul(H0,k0)|0,X=X+Math.imul(O0,L0)|0,I=I+Math.imul(O0,k0)|0,G=G+Math.imul(s,j0)|0,X=X+Math.imul(s,E0)|0,X=X+Math.imul(Z0,j0)|0,I=I+Math.imul(Z0,E0)|0,G=G+Math.imul(c,v0)|0,X=X+Math.imul(c,R0)|0,X=X+Math.imul(o,v0)|0,I=I+Math.imul(o,R0)|0,G=G+Math.imul(t,_0)|0,X=X+Math.imul(t,B0)|0,X=X+Math.imul(e,_0)|0,I=I+Math.imul(e,B0)|0,G=G+Math.imul(f,q0)|0,X=X+Math.imul(f,N)|0,X=X+Math.imul(h,q0)|0,I=I+Math.imul(h,N)|0,G=G+Math.imul(m,a)|0,X=X+Math.imul(m,U0)|0,X=X+Math.imul(i,a)|0,I=I+Math.imul(i,U0)|0,G=G+Math.imul(r,F0)|0,X=X+Math.imul(r,C0)|0,X=X+Math.imul(d,F0)|0,I=I+Math.imul(d,C0)|0,G=G+Math.imul(p,S0)|0,X=X+Math.imul(p,x0)|0,X=X+Math.imul(n,S0)|0,I=I+Math.imul(n,x0)|0,G=G+Math.imul(C,P0)|0,X=X+Math.imul(C,z0)|0,X=X+Math.imul(j,P0)|0,I=I+Math.imul(j,z0)|0;var UU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(UU>>>26)|0,UU&=67108863,G=Math.imul(W0,L0),X=Math.imul(W0,k0),X=X+Math.imul(A0,L0)|0,I=Math.imul(A0,k0),G=G+Math.imul(H0,j0)|0,X=X+Math.imul(H0,E0)|0,X=X+Math.imul(O0,j0)|0,I=I+Math.imul(O0,E0)|0,G=G+Math.imul(s,v0)|0,X=X+Math.imul(s,R0)|0,X=X+Math.imul(Z0,v0)|0,I=I+Math.imul(Z0,R0)|0,G=G+Math.imul(c,_0)|0,X=X+Math.imul(c,B0)|0,X=X+Math.imul(o,_0)|0,I=I+Math.imul(o,B0)|0,G=G+Math.imul(t,q0)|0,X=X+Math.imul(t,N)|0,X=X+Math.imul(e,q0)|0,I=I+Math.imul(e,N)|0,G=G+Math.imul(f,a)|0,X=X+Math.imul(f,U0)|0,X=X+Math.imul(h,a)|0,I=I+Math.imul(h,U0)|0,G=G+Math.imul(m,F0)|0,X=X+Math.imul(m,C0)|0,X=X+Math.imul(i,F0)|0,I=I+Math.imul(i,C0)|0,G=G+Math.imul(r,S0)|0,X=X+Math.imul(r,x0)|0,X=X+Math.imul(d,S0)|0,I=I+Math.imul(d,x0)|0,G=G+Math.imul(p,P0)|0,X=X+Math.imul(p,z0)|0,X=X+Math.imul(n,P0)|0,I=I+Math.imul(n,z0)|0;var XU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(XU>>>26)|0,XU&=67108863,G=Math.imul(W0,j0),X=Math.imul(W0,E0),X=X+Math.imul(A0,j0)|0,I=Math.imul(A0,E0),G=G+Math.imul(H0,v0)|0,X=X+Math.imul(H0,R0)|0,X=X+Math.imul(O0,v0)|0,I=I+Math.imul(O0,R0)|0,G=G+Math.imul(s,_0)|0,X=X+Math.imul(s,B0)|0,X=X+Math.imul(Z0,_0)|0,I=I+Math.imul(Z0,B0)|0,G=G+Math.imul(c,q0)|0,X=X+Math.imul(c,N)|0,X=X+Math.imul(o,q0)|0,I=I+Math.imul(o,N)|0,G=G+Math.imul(t,a)|0,X=X+Math.imul(t,U0)|0,X=X+Math.imul(e,a)|0,I=I+Math.imul(e,U0)|0,G=G+Math.imul(f,F0)|0,X=X+Math.imul(f,C0)|0,X=X+Math.imul(h,F0)|0,I=I+Math.imul(h,C0)|0,G=G+Math.imul(m,S0)|0,X=X+Math.imul(m,x0)|0,X=X+Math.imul(i,S0)|0,I=I+Math.imul(i,x0)|0,G=G+Math.imul(r,P0)|0,X=X+Math.imul(r,z0)|0,X=X+Math.imul(d,P0)|0,I=I+Math.imul(d,z0)|0;var ZU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(ZU>>>26)|0,ZU&=67108863,G=Math.imul(W0,v0),X=Math.imul(W0,R0),X=X+Math.imul(A0,v0)|0,I=Math.imul(A0,R0),G=G+Math.imul(H0,_0)|0,X=X+Math.imul(H0,B0)|0,X=X+Math.imul(O0,_0)|0,I=I+Math.imul(O0,B0)|0,G=G+Math.imul(s,q0)|0,X=X+Math.imul(s,N)|0,X=X+Math.imul(Z0,q0)|0,I=I+Math.imul(Z0,N)|0,G=G+Math.imul(c,a)|0,X=X+Math.imul(c,U0)|0,X=X+Math.imul(o,a)|0,I=I+Math.imul(o,U0)|0,G=G+Math.imul(t,F0)|0,X=X+Math.imul(t,C0)|0,X=X+Math.imul(e,F0)|0,I=I+Math.imul(e,C0)|0,G=G+Math.imul(f,S0)|0,X=X+Math.imul(f,x0)|0,X=X+Math.imul(h,S0)|0,I=I+Math.imul(h,x0)|0,G=G+Math.imul(m,P0)|0,X=X+Math.imul(m,z0)|0,X=X+Math.imul(i,P0)|0,I=I+Math.imul(i,z0)|0;var QU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(QU>>>26)|0,QU&=67108863,G=Math.imul(W0,_0),X=Math.imul(W0,B0),X=X+Math.imul(A0,_0)|0,I=Math.imul(A0,B0),G=G+Math.imul(H0,q0)|0,X=X+Math.imul(H0,N)|0,X=X+Math.imul(O0,q0)|0,I=I+Math.imul(O0,N)|0,G=G+Math.imul(s,a)|0,X=X+Math.imul(s,U0)|0,X=X+Math.imul(Z0,a)|0,I=I+Math.imul(Z0,U0)|0,G=G+Math.imul(c,F0)|0,X=X+Math.imul(c,C0)|0,X=X+Math.imul(o,F0)|0,I=I+Math.imul(o,C0)|0,G=G+Math.imul(t,S0)|0,X=X+Math.imul(t,x0)|0,X=X+Math.imul(e,S0)|0,I=I+Math.imul(e,x0)|0,G=G+Math.imul(f,P0)|0,X=X+Math.imul(f,z0)|0,X=X+Math.imul(h,P0)|0,I=I+Math.imul(h,z0)|0;var YU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(YU>>>26)|0,YU&=67108863,G=Math.imul(W0,q0),X=Math.imul(W0,N),X=X+Math.imul(A0,q0)|0,I=Math.imul(A0,N),G=G+Math.imul(H0,a)|0,X=X+Math.imul(H0,U0)|0,X=X+Math.imul(O0,a)|0,I=I+Math.imul(O0,U0)|0,G=G+Math.imul(s,F0)|0,X=X+Math.imul(s,C0)|0,X=X+Math.imul(Z0,F0)|0,I=I+Math.imul(Z0,C0)|0,G=G+Math.imul(c,S0)|0,X=X+Math.imul(c,x0)|0,X=X+Math.imul(o,S0)|0,I=I+Math.imul(o,x0)|0,G=G+Math.imul(t,P0)|0,X=X+Math.imul(t,z0)|0,X=X+Math.imul(e,P0)|0,I=I+Math.imul(e,z0)|0;var JU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(JU>>>26)|0,JU&=67108863,G=Math.imul(W0,a),X=Math.imul(W0,U0),X=X+Math.imul(A0,a)|0,I=Math.imul(A0,U0),G=G+Math.imul(H0,F0)|0,X=X+Math.imul(H0,C0)|0,X=X+Math.imul(O0,F0)|0,I=I+Math.imul(O0,C0)|0,G=G+Math.imul(s,S0)|0,X=X+Math.imul(s,x0)|0,X=X+Math.imul(Z0,S0)|0,I=I+Math.imul(Z0,x0)|0,G=G+Math.imul(c,P0)|0,X=X+Math.imul(c,z0)|0,X=X+Math.imul(o,P0)|0,I=I+Math.imul(o,z0)|0;var VU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(VU>>>26)|0,VU&=67108863,G=Math.imul(W0,F0),X=Math.imul(W0,C0),X=X+Math.imul(A0,F0)|0,I=Math.imul(A0,C0),G=G+Math.imul(H0,S0)|0,X=X+Math.imul(H0,x0)|0,X=X+Math.imul(O0,S0)|0,I=I+Math.imul(O0,x0)|0,G=G+Math.imul(s,P0)|0,X=X+Math.imul(s,z0)|0,X=X+Math.imul(Z0,P0)|0,I=I+Math.imul(Z0,z0)|0;var GU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(GU>>>26)|0,GU&=67108863,G=Math.imul(W0,S0),X=Math.imul(W0,x0),X=X+Math.imul(A0,S0)|0,I=Math.imul(A0,x0),G=G+Math.imul(H0,P0)|0,X=X+Math.imul(H0,z0)|0,X=X+Math.imul(O0,P0)|0,I=I+Math.imul(O0,z0)|0;var KU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(KU>>>26)|0,KU&=67108863,G=Math.imul(W0,P0),X=Math.imul(W0,z0),X=X+Math.imul(A0,P0)|0,I=Math.imul(A0,z0);var IU=(F+G|0)+((X&8191)<<13)|0;if(F=(I+(X>>>13)|0)+(IU>>>26)|0,IU&=67108863,$[0]=s0,$[1]=c0,$[2]=f0,$[3]=d0,$[4]=b0,$[5]=r0,$[6]=a0,$[7]=e0,$[8]=i0,$[9]=UU,$[10]=XU,$[11]=ZU,$[12]=QU,$[13]=YU,$[14]=JU,$[15]=VU,$[16]=GU,$[17]=KU,$[18]=IU,F!==0)$[19]=F,J.length++;return J};if(!Math.imul)k=v;function B(U,Q,J){J.negative=Q.negative^U.negative,J.length=U.length+Q.length;var Z=0,Y=0;for(var $=0;$<J.length-1;$++){var F=Y;Y=0;var G=Z&67108863,X=Math.min($,Q.length-1);for(var I=Math.max(0,$-U.length+1);I<=X;I++){var E=$-I,C=U.words[E]|0,j=Q.words[I]|0,g=C*j,p=g&67108863;F=F+(g/67108864|0)|0,p=p+G|0,G=p&67108863,F=F+(p>>>26)|0,Y+=F>>>26,F&=67108863}J.words[$]=G,Z=F,F=Y}if(Z!==0)J.words[$]=Z;else J.length--;return J.strip()}function _(U,Q,J){var Z=new x;return Z.mulp(U,Q,J)}V.prototype.mulTo=function(U,Q){var J,Z=this.length+U.length;if(this.length===10&&U.length===10)J=k(this,U,Q);else if(Z<63)J=v(this,U,Q);else if(Z<1024)J=B(this,U,Q);else J=_(this,U,Q);return J};function x(U,Q){this.x=U,this.y=Q}x.prototype.makeRBT=function(U){var Q=Array(U),J=V.prototype._countBits(U)-1;for(var Z=0;Z<U;Z++)Q[Z]=this.revBin(Z,J,U);return Q},x.prototype.revBin=function(U,Q,J){if(U===0||U===J-1)return U;var Z=0;for(var Y=0;Y<Q;Y++)Z|=(U&1)<<Q-Y-1,U>>=1;return Z},x.prototype.permute=function(U,Q,J,Z,Y,$){for(var F=0;F<$;F++)Z[F]=Q[U[F]],Y[F]=J[U[F]]},x.prototype.transform=function(U,Q,J,Z,Y,$){this.permute($,U,Q,J,Z,Y);for(var F=1;F<Y;F<<=1){var G=F<<1,X=Math.cos(2*Math.PI/G),I=Math.sin(2*Math.PI/G);for(var E=0;E<Y;E+=G){var C=X,j=I;for(var g=0;g<F;g++){var p=J[E+g],n=Z[E+g],$0=J[E+g+F],r=Z[E+g+F],d=C*$0-j*r;if(r=C*r+j*$0,$0=d,J[E+g]=p+$0,Z[E+g]=n+r,J[E+g+F]=p-$0,Z[E+g+F]=n-r,g!==G)d=X*C-I*j,j=X*j+I*C,C=d}}}},x.prototype.guessLen13b=function(U,Q){var J=Math.max(Q,U)|1,Z=J&1,Y=0;for(J=J/2|0;J;J=J>>>1)Y++;return 1<<Y+1+Z},x.prototype.conjugate=function(U,Q,J){if(J<=1)return;for(var Z=0;Z<J/2;Z++){var Y=U[Z];U[Z]=U[J-Z-1],U[J-Z-1]=Y,Y=Q[Z],Q[Z]=-Q[J-Z-1],Q[J-Z-1]=-Y}},x.prototype.normalize13b=function(U,Q){var J=0;for(var Z=0;Z<Q/2;Z++){var Y=Math.round(U[2*Z+1]/Q)*8192+Math.round(U[2*Z]/Q)+J;if(U[Z]=Y&67108863,Y<67108864)J=0;else J=Y/67108864|0}return U},x.prototype.convert13b=function(U,Q,J,Z){var Y=0;for(var $=0;$<Q;$++)Y=Y+(U[$]|0),J[2*$]=Y&8191,Y=Y>>>13,J[2*$+1]=Y&8191,Y=Y>>>13;for($=2*Q;$<Z;++$)J[$]=0;O(Y===0),O((Y&-8192)===0)},x.prototype.stub=function(U){var Q=Array(U);for(var J=0;J<U;J++)Q[J]=0;return Q},x.prototype.mulp=function(U,Q,J){var Z=2*this.guessLen13b(U.length,Q.length),Y=this.makeRBT(Z),$=this.stub(Z),F=Array(Z),G=Array(Z),X=Array(Z),I=Array(Z),E=Array(Z),C=Array(Z),j=J.words;j.length=Z,this.convert13b(U.words,U.length,F,Z),this.convert13b(Q.words,Q.length,I,Z),this.transform(F,$,G,X,Z,Y),this.transform(I,$,E,C,Z,Y);for(var g=0;g<Z;g++){var p=G[g]*E[g]-X[g]*C[g];X[g]=G[g]*C[g]+X[g]*E[g],G[g]=p}return this.conjugate(G,X,Z),this.transform(G,X,j,$,Z,Y),this.conjugate(j,$,Z),this.normalize13b(j,Z),J.negative=U.negative^Q.negative,J.length=U.length+Q.length,J.strip()},V.prototype.mul=function(U){var Q=new V(null);return Q.words=Array(this.length+U.length),this.mulTo(U,Q)},V.prototype.mulf=function(U){var Q=new V(null);return Q.words=Array(this.length+U.length),_(this,U,Q)},V.prototype.imul=function(U){return this.clone().mulTo(U,this)},V.prototype.imuln=function(U){O(typeof U==="number"),O(U<67108864);var Q=0;for(var J=0;J<this.length;J++){var Z=(this.words[J]|0)*U,Y=(Z&67108863)+(Q&67108863);Q>>=26,Q+=Z/67108864|0,Q+=Y>>>26,this.words[J]=Y&67108863}if(Q!==0)this.words[J]=Q,this.length++;return this.length=U===0?1:this.length,this},V.prototype.muln=function(U){return this.clone().imuln(U)},V.prototype.sqr=function(){return this.mul(this)},V.prototype.isqr=function(){return this.imul(this.clone())},V.prototype.pow=function(U){var Q=q(U);if(Q.length===0)return new V(1);var J=this;for(var Z=0;Z<Q.length;Z++,J=J.sqr())if(Q[Z]!==0)break;if(++Z<Q.length)for(var Y=J.sqr();Z<Q.length;Z++,Y=Y.sqr()){if(Q[Z]===0)continue;J=J.mul(Y)}return J},V.prototype.iushln=function(U){O(typeof U==="number"&&U>=0);var Q=U%26,J=(U-Q)/26,Z=67108863>>>26-Q<<26-Q,Y;if(Q!==0){var $=0;for(Y=0;Y<this.length;Y++){var F=this.words[Y]&Z,G=(this.words[Y]|0)-F<<Q;this.words[Y]=G|$,$=F>>>26-Q}if($)this.words[Y]=$,this.length++}if(J!==0){for(Y=this.length-1;Y>=0;Y--)this.words[Y+J]=this.words[Y];for(Y=0;Y<J;Y++)this.words[Y]=0;this.length+=J}return this.strip()},V.prototype.ishln=function(U){return O(this.negative===0),this.iushln(U)},V.prototype.iushrn=function(U,Q,J){O(typeof U==="number"&&U>=0);var Z;if(Q)Z=(Q-Q%26)/26;else Z=0;var Y=U%26,$=Math.min((U-Y)/26,this.length),F=67108863^67108863>>>Y<<Y,G=J;if(Z-=$,Z=Math.max(0,Z),G){for(var X=0;X<$;X++)G.words[X]=this.words[X];G.length=$}if($===0);else if(this.length>$){this.length-=$;for(X=0;X<this.length;X++)this.words[X]=this.words[X+$]}else this.words[0]=0,this.length=1;var I=0;for(X=this.length-1;X>=0&&(I!==0||X>=Z);X--){var E=this.words[X]|0;this.words[X]=I<<26-Y|E>>>Y,I=E&F}if(G&&I!==0)G.words[G.length++]=I;if(this.length===0)this.words[0]=0,this.length=1;return this.strip()},V.prototype.ishrn=function(U,Q,J){return O(this.negative===0),this.iushrn(U,Q,J)},V.prototype.shln=function(U){return this.clone().ishln(U)},V.prototype.ushln=function(U){return this.clone().iushln(U)},V.prototype.shrn=function(U){return this.clone().ishrn(U)},V.prototype.ushrn=function(U){return this.clone().iushrn(U)},V.prototype.testn=function(U){O(typeof U==="number"&&U>=0);var Q=U%26,J=(U-Q)/26,Z=1<<Q;if(this.length<=J)return!1;var Y=this.words[J];return!!(Y&Z)},V.prototype.imaskn=function(U){O(typeof U==="number"&&U>=0);var Q=U%26,J=(U-Q)/26;if(O(this.negative===0,"imaskn works only with positive numbers"),this.length<=J)return this;if(Q!==0)J++;if(this.length=Math.min(J,this.length),Q!==0){var Z=67108863^67108863>>>Q<<Q;this.words[this.length-1]&=Z}return this.strip()},V.prototype.maskn=function(U){return this.clone().imaskn(U)},V.prototype.iaddn=function(U){if(O(typeof U==="number"),O(U<67108864),U<0)return this.isubn(-U);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<U)return this.words[0]=U-(this.words[0]|0),this.negative=0,this;return this.negative=0,this.isubn(U),this.negative=1,this}return this._iaddn(U)},V.prototype._iaddn=function(U){this.words[0]+=U;for(var Q=0;Q<this.length&&this.words[Q]>=67108864;Q++)if(this.words[Q]-=67108864,Q===this.length-1)this.words[Q+1]=1;else this.words[Q+1]++;return this.length=Math.max(this.length,Q+1),this},V.prototype.isubn=function(U){if(O(typeof U==="number"),O(U<67108864),U<0)return this.iaddn(-U);if(this.negative!==0)return this.negative=0,this.iaddn(U),this.negative=1,this;if(this.words[0]-=U,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Q=0;Q<this.length&&this.words[Q]<0;Q++)this.words[Q]+=67108864,this.words[Q+1]-=1;return this.strip()},V.prototype.addn=function(U){return this.clone().iaddn(U)},V.prototype.subn=function(U){return this.clone().isubn(U)},V.prototype.iabs=function(){return this.negative=0,this},V.prototype.abs=function(){return this.clone().iabs()},V.prototype._ishlnsubmul=function(U,Q,J){var Z=U.length+J,Y;this._expand(Z);var $,F=0;for(Y=0;Y<U.length;Y++){$=(this.words[Y+J]|0)+F;var G=(U.words[Y]|0)*Q;$-=G&67108863,F=($>>26)-(G/67108864|0),this.words[Y+J]=$&67108863}for(;Y<this.length-J;Y++)$=(this.words[Y+J]|0)+F,F=$>>26,this.words[Y+J]=$&67108863;if(F===0)return this.strip();O(F===-1),F=0;for(Y=0;Y<this.length;Y++)$=-(this.words[Y]|0)+F,F=$>>26,this.words[Y]=$&67108863;return this.negative=1,this.strip()},V.prototype._wordDiv=function(U,Q){var J=this.length-U.length,Z=this.clone(),Y=U,$=Y.words[Y.length-1]|0,F=this._countBits($);if(J=26-F,J!==0)Y=Y.ushln(J),Z.iushln(J),$=Y.words[Y.length-1]|0;var G=Z.length-Y.length,X;if(Q!=="mod"){X=new V(null),X.length=G+1,X.words=Array(X.length);for(var I=0;I<X.length;I++)X.words[I]=0}var E=Z.clone()._ishlnsubmul(Y,1,G);if(E.negative===0){if(Z=E,X)X.words[G]=1}for(var C=G-1;C>=0;C--){var j=(Z.words[Y.length+C]|0)*67108864+(Z.words[Y.length+C-1]|0);j=Math.min(j/$|0,67108863),Z._ishlnsubmul(Y,j,C);while(Z.negative!==0)if(j--,Z.negative=0,Z._ishlnsubmul(Y,1,C),!Z.isZero())Z.negative^=1;if(X)X.words[C]=j}if(X)X.strip();if(Z.strip(),Q!=="div"&&J!==0)Z.iushrn(J);return{div:X||null,mod:Z}},V.prototype.divmod=function(U,Q,J){if(O(!U.isZero()),this.isZero())return{div:new V(0),mod:new V(0)};var Z,Y,$;if(this.negative!==0&&U.negative===0){if($=this.neg().divmod(U,Q),Q!=="mod")Z=$.div.neg();if(Q!=="div"){if(Y=$.mod.neg(),J&&Y.negative!==0)Y.iadd(U)}return{div:Z,mod:Y}}if(this.negative===0&&U.negative!==0){if($=this.divmod(U.neg(),Q),Q!=="mod")Z=$.div.neg();return{div:Z,mod:$.mod}}if((this.negative&U.negative)!==0){if($=this.neg().divmod(U.neg(),Q),Q!=="div"){if(Y=$.mod.neg(),J&&Y.negative!==0)Y.isub(U)}return{div:$.div,mod:Y}}if(U.length>this.length||this.cmp(U)<0)return{div:new V(0),mod:this};if(U.length===1){if(Q==="div")return{div:this.divn(U.words[0]),mod:null};if(Q==="mod")return{div:null,mod:new V(this.modn(U.words[0]))};return{div:this.divn(U.words[0]),mod:new V(this.modn(U.words[0]))}}return this._wordDiv(U,Q)},V.prototype.div=function(U){return this.divmod(U,"div",!1).div},V.prototype.mod=function(U){return this.divmod(U,"mod",!1).mod},V.prototype.umod=function(U){return this.divmod(U,"mod",!0).mod},V.prototype.divRound=function(U){var Q=this.divmod(U);if(Q.mod.isZero())return Q.div;var J=Q.div.negative!==0?Q.mod.isub(U):Q.mod,Z=U.ushrn(1),Y=U.andln(1),$=J.cmp(Z);if($<0||Y===1&&$===0)return Q.div;return Q.div.negative!==0?Q.div.isubn(1):Q.div.iaddn(1)},V.prototype.modn=function(U){O(U<=67108863);var Q=67108864%U,J=0;for(var Z=this.length-1;Z>=0;Z--)J=(Q*J+(this.words[Z]|0))%U;return J},V.prototype.idivn=function(U){O(U<=67108863);var Q=0;for(var J=this.length-1;J>=0;J--){var Z=(this.words[J]|0)+Q*67108864;this.words[J]=Z/U|0,Q=Z%U}return this.strip()},V.prototype.divn=function(U){return this.clone().idivn(U)},V.prototype.egcd=function(U){O(U.negative===0),O(!U.isZero());var Q=this,J=U.clone();if(Q.negative!==0)Q=Q.umod(U);else Q=Q.clone();var Z=new V(1),Y=new V(0),$=new V(0),F=new V(1),G=0;while(Q.isEven()&&J.isEven())Q.iushrn(1),J.iushrn(1),++G;var X=J.clone(),I=Q.clone();while(!Q.isZero()){for(var E=0,C=1;(Q.words[0]&C)===0&&E<26;++E,C<<=1);if(E>0){Q.iushrn(E);while(E-- >0){if(Z.isOdd()||Y.isOdd())Z.iadd(X),Y.isub(I);Z.iushrn(1),Y.iushrn(1)}}for(var j=0,g=1;(J.words[0]&g)===0&&j<26;++j,g<<=1);if(j>0){J.iushrn(j);while(j-- >0){if($.isOdd()||F.isOdd())$.iadd(X),F.isub(I);$.iushrn(1),F.iushrn(1)}}if(Q.cmp(J)>=0)Q.isub(J),Z.isub($),Y.isub(F);else J.isub(Q),$.isub(Z),F.isub(Y)}return{a:$,b:F,gcd:J.iushln(G)}},V.prototype._invmp=function(U){O(U.negative===0),O(!U.isZero());var Q=this,J=U.clone();if(Q.negative!==0)Q=Q.umod(U);else Q=Q.clone();var Z=new V(1),Y=new V(0),$=J.clone();while(Q.cmpn(1)>0&&J.cmpn(1)>0){for(var F=0,G=1;(Q.words[0]&G)===0&&F<26;++F,G<<=1);if(F>0){Q.iushrn(F);while(F-- >0){if(Z.isOdd())Z.iadd($);Z.iushrn(1)}}for(var X=0,I=1;(J.words[0]&I)===0&&X<26;++X,I<<=1);if(X>0){J.iushrn(X);while(X-- >0){if(Y.isOdd())Y.iadd($);Y.iushrn(1)}}if(Q.cmp(J)>=0)Q.isub(J),Z.isub(Y);else J.isub(Q),Y.isub(Z)}var E;if(Q.cmpn(1)===0)E=Z;else E=Y;if(E.cmpn(0)<0)E.iadd(U);return E},V.prototype.gcd=function(U){if(this.isZero())return U.abs();if(U.isZero())return this.abs();var Q=this.clone(),J=U.clone();Q.negative=0,J.negative=0;for(var Z=0;Q.isEven()&&J.isEven();Z++)Q.iushrn(1),J.iushrn(1);do{while(Q.isEven())Q.iushrn(1);while(J.isEven())J.iushrn(1);var Y=Q.cmp(J);if(Y<0){var $=Q;Q=J,J=$}else if(Y===0||J.cmpn(1)===0)break;Q.isub(J)}while(!0);return J.iushln(Z)},V.prototype.invm=function(U){return this.egcd(U).a.umod(U)},V.prototype.isEven=function(){return(this.words[0]&1)===0},V.prototype.isOdd=function(){return(this.words[0]&1)===1},V.prototype.andln=function(U){return this.words[0]&U},V.prototype.bincn=function(U){O(typeof U==="number");var Q=U%26,J=(U-Q)/26,Z=1<<Q;if(this.length<=J)return this._expand(J+1),this.words[J]|=Z,this;var Y=Z;for(var $=J;Y!==0&&$<this.length;$++){var F=this.words[$]|0;F+=Y,Y=F>>>26,F&=67108863,this.words[$]=F}if(Y!==0)this.words[$]=Y,this.length++;return this},V.prototype.isZero=function(){return this.length===1&&this.words[0]===0},V.prototype.cmpn=function(U){var Q=U<0;if(this.negative!==0&&!Q)return-1;if(this.negative===0&&Q)return 1;this.strip();var J;if(this.length>1)J=1;else{if(Q)U=-U;O(U<=67108863,"Number is too big");var Z=this.words[0]|0;J=Z===U?0:Z<U?-1:1}if(this.negative!==0)return-J|0;return J},V.prototype.cmp=function(U){if(this.negative!==0&&U.negative===0)return-1;if(this.negative===0&&U.negative!==0)return 1;var Q=this.ucmp(U);if(this.negative!==0)return-Q|0;return Q},V.prototype.ucmp=function(U){if(this.length>U.length)return 1;if(this.length<U.length)return-1;var Q=0;for(var J=this.length-1;J>=0;J--){var Z=this.words[J]|0,Y=U.words[J]|0;if(Z===Y)continue;if(Z<Y)Q=-1;else if(Z>Y)Q=1;break}return Q},V.prototype.gtn=function(U){return this.cmpn(U)===1},V.prototype.gt=function(U){return this.cmp(U)===1},V.prototype.gten=function(U){return this.cmpn(U)>=0},V.prototype.gte=function(U){return this.cmp(U)>=0},V.prototype.ltn=function(U){return this.cmpn(U)===-1},V.prototype.lt=function(U){return this.cmp(U)===-1},V.prototype.lten=function(U){return this.cmpn(U)<=0},V.prototype.lte=function(U){return this.cmp(U)<=0},V.prototype.eqn=function(U){return this.cmpn(U)===0},V.prototype.eq=function(U){return this.cmp(U)===0},V.red=function(U){return new u(U)},V.prototype.toRed=function(U){return O(!this.red,"Already a number in reduction context"),O(this.negative===0,"red works only with positives"),U.convertTo(this)._forceRed(U)},V.prototype.fromRed=function(){return O(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},V.prototype._forceRed=function(U){return this.red=U,this},V.prototype.forceRed=function(U){return O(!this.red,"Already a number in reduction context"),this._forceRed(U)},V.prototype.redAdd=function(U){return O(this.red,"redAdd works only with red numbers"),this.red.add(this,U)},V.prototype.redIAdd=function(U){return O(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,U)},V.prototype.redSub=function(U){return O(this.red,"redSub works only with red numbers"),this.red.sub(this,U)},V.prototype.redISub=function(U){return O(this.red,"redISub works only with red numbers"),this.red.isub(this,U)},V.prototype.redShl=function(U){return O(this.red,"redShl works only with red numbers"),this.red.shl(this,U)},V.prototype.redMul=function(U){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,U),this.red.mul(this,U)},V.prototype.redIMul=function(U){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,U),this.red.imul(this,U)},V.prototype.redSqr=function(){return O(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},V.prototype.redISqr=function(){return O(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},V.prototype.redSqrt=function(){return O(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},V.prototype.redInvm=function(){return O(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},V.prototype.redNeg=function(){return O(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},V.prototype.redPow=function(U){return O(this.red&&!U.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,U)};var w={k256:null,p224:null,p192:null,p25519:null};function y(U,Q){this.name=U,this.p=new V(Q,16),this.n=this.p.bitLength(),this.k=new V(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}y.prototype._tmp=function(){var U=new V(null);return U.words=Array(Math.ceil(this.n/13)),U},y.prototype.ireduce=function(U){var Q=U,J;do this.split(Q,this.tmp),Q=this.imulK(Q),Q=Q.iadd(this.tmp),J=Q.bitLength();while(J>this.n);var Z=J<this.n?-1:Q.ucmp(this.p);if(Z===0)Q.words[0]=0,Q.length=1;else if(Z>0)Q.isub(this.p);else if(Q.strip!==void 0)Q.strip();else Q._strip();return Q},y.prototype.split=function(U,Q){U.iushrn(this.n,0,Q)},y.prototype.imulK=function(U){return U.imul(this.k)};function l(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}L(l,y),l.prototype.split=function(U,Q){var J=4194303,Z=Math.min(U.length,9);for(var Y=0;Y<Z;Y++)Q.words[Y]=U.words[Y];if(Q.length=Z,U.length<=9){U.words[0]=0,U.length=1;return}var $=U.words[9];Q.words[Q.length++]=$&J;for(Y=10;Y<U.length;Y++){var F=U.words[Y]|0;U.words[Y-10]=(F&J)<<4|$>>>22,$=F}if($>>>=22,U.words[Y-10]=$,$===0&&U.length>10)U.length-=10;else U.length-=9},l.prototype.imulK=function(U){U.words[U.length]=0,U.words[U.length+1]=0,U.length+=2;var Q=0;for(var J=0;J<U.length;J++){var Z=U.words[J]|0;Q+=Z*977,U.words[J]=Q&67108863,Q=Z*64+(Q/67108864|0)}if(U.words[U.length-1]===0){if(U.length--,U.words[U.length-1]===0)U.length--}return U};function J0(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}L(J0,y);function K0(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}L(K0,y);function V0(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}L(V0,y),V0.prototype.imulK=function(U){var Q=0;for(var J=0;J<U.length;J++){var Z=(U.words[J]|0)*19+Q,Y=Z&67108863;Z>>>=26,U.words[J]=Y,Q=Z}if(Q!==0)U.words[U.length++]=Q;return U},V._prime=function(U){if(w[U])return w[U];var Q;if(U==="k256")Q=new l;else if(U==="p224")Q=new J0;else if(U==="p192")Q=new K0;else if(U==="p25519")Q=new V0;else throw Error("Unknown prime "+U);return w[U]=Q,Q};function u(U){if(typeof U==="string"){var Q=V._prime(U);this.m=Q.p,this.prime=Q}else O(U.gtn(1),"modulus must be greater than 1"),this.m=U,this.prime=null}u.prototype._verify1=function(U){O(U.negative===0,"red works only with positives"),O(U.red,"red works only with red numbers")},u.prototype._verify2=function(U,Q){O((U.negative|Q.negative)===0,"red works only with positives"),O(U.red&&U.red===Q.red,"red works only with red numbers")},u.prototype.imod=function(U){if(this.prime)return this.prime.ireduce(U)._forceRed(this);return U.umod(this.m)._forceRed(this)},u.prototype.neg=function(U){if(U.isZero())return U.clone();return this.m.sub(U)._forceRed(this)},u.prototype.add=function(U,Q){this._verify2(U,Q);var J=U.add(Q);if(J.cmp(this.m)>=0)J.isub(this.m);return J._forceRed(this)},u.prototype.iadd=function(U,Q){this._verify2(U,Q);var J=U.iadd(Q);if(J.cmp(this.m)>=0)J.isub(this.m);return J},u.prototype.sub=function(U,Q){this._verify2(U,Q);var J=U.sub(Q);if(J.cmpn(0)<0)J.iadd(this.m);return J._forceRed(this)},u.prototype.isub=function(U,Q){this._verify2(U,Q);var J=U.isub(Q);if(J.cmpn(0)<0)J.iadd(this.m);return J},u.prototype.shl=function(U,Q){return this._verify1(U),this.imod(U.ushln(Q))},u.prototype.imul=function(U,Q){return this._verify2(U,Q),this.imod(U.imul(Q))},u.prototype.mul=function(U,Q){return this._verify2(U,Q),this.imod(U.mul(Q))},u.prototype.isqr=function(U){return this.imul(U,U.clone())},u.prototype.sqr=function(U){return this.mul(U,U)},u.prototype.sqrt=function(U){if(U.isZero())return U.clone();var Q=this.m.andln(3);if(O(Q%2===1),Q===3){var J=this.m.add(new V(1)).iushrn(2);return this.pow(U,J)}var Z=this.m.subn(1),Y=0;while(!Z.isZero()&&Z.andln(1)===0)Y++,Z.iushrn(1);O(!Z.isZero());var $=new V(1).toRed(this),F=$.redNeg(),G=this.m.subn(1).iushrn(1),X=this.m.bitLength();X=new V(2*X*X).toRed(this);while(this.pow(X,G).cmp(F)!==0)X.redIAdd(F);var I=this.pow(X,Z),E=this.pow(U,Z.addn(1).iushrn(1)),C=this.pow(U,Z),j=Y;while(C.cmp($)!==0){var g=C;for(var p=0;g.cmp($)!==0;p++)g=g.redSqr();O(p<j);var n=this.pow(I,new V(1).iushln(j-p-1));E=E.redMul(n),I=n.redSqr(),C=C.redMul(I),j=p}return E},u.prototype.invm=function(U){var Q=U._invmp(this.m);if(Q.negative!==0)return Q.negative=0,this.imod(Q).redNeg();else return this.imod(Q)},u.prototype.pow=function(U,Q){if(Q.isZero())return new V(1).toRed(this);if(Q.cmpn(1)===0)return U.clone();var J=4,Z=Array(1<<J);Z[0]=new V(1).toRed(this),Z[1]=U;for(var Y=2;Y<Z.length;Y++)Z[Y]=this.mul(Z[Y-1],U);var $=Z[0],F=0,G=0,X=Q.bitLength()%26;if(X===0)X=26;for(Y=Q.length-1;Y>=0;Y--){var I=Q.words[Y];for(var E=X-1;E>=0;E--){var C=I>>E&1;if($!==Z[0])$=this.sqr($);if(C===0&&F===0){G=0;continue}if(F<<=1,F|=C,G++,G!==J&&(Y!==0||E!==0))continue;$=this.mul($,Z[F]),G=0,F=0}X=26}return $},u.prototype.convertTo=function(U){var Q=U.umod(this.m);return Q===U?Q.clone():Q},u.prototype.convertFrom=function(U){var Q=U.clone();return Q.red=null,Q},V.mont=function(U){return new X0(U)};function X0(U){if(u.call(this,U),this.shift=this.m.bitLength(),this.shift%26!==0)this.shift+=26-this.shift%26;this.r=new V(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)}L(X0,u),X0.prototype.convertTo=function(U){return this.imod(U.ushln(this.shift))},X0.prototype.convertFrom=function(U){var Q=this.imod(U.mul(this.rinv));return Q.red=null,Q},X0.prototype.imul=function(U,Q){if(U.isZero()||Q.isZero())return U.words[0]=0,U.length=1,U;var J=U.imul(Q),Z=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=J.isub(Z).iushrn(this.shift),$=Y;if(Y.cmp(this.m)>=0)$=Y.isub(this.m);else if(Y.cmpn(0)<0)$=Y.iadd(this.m);return $._forceRed(this)},X0.prototype.mul=function(U,Q){if(U.isZero()||Q.isZero())return new V(0)._forceRed(this);var J=U.mul(Q),Z=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=J.isub(Z).iushrn(this.shift),$=Y;if(Y.cmp(this.m)>=0)$=Y.isub(this.m);else if(Y.cmpn(0)<0)$=Y.iadd(this.m);return $._forceRed(this)},X0.prototype.invm=function(U){var Q=this.imod(U._invmp(this.m).mul(this.r2));return Q._forceRed(this)}})(typeof W>"u"||W,K)}),uU=G0((K,W)=>{W.exports=H;function H(T,O){if(!T)throw Error(O||"Assertion failed")}H.equal=function(T,O,L){if(T!=O)throw Error(L||"Assertion failed: "+T+" != "+O)}}),MQ=G0((K)=>{var W=K;function H(L,V){if(Array.isArray(L))return L.slice();if(!L)return[];var P=[];if(typeof L!=="string"){for(var S=0;S<L.length;S++)P[S]=L[S]|0;return P}if(V==="hex"){if(L=L.replace(/[^a-z0-9]+/ig,""),L.length%2!==0)L="0"+L;for(var S=0;S<L.length;S+=2)P.push(parseInt(L[S]+L[S+1],16))}else for(var S=0;S<L.length;S++){var M=L.charCodeAt(S),z=M>>8,A=M&255;if(z)P.push(z,A);else P.push(A)}return P}W.toArray=H;function T(L){if(L.length===1)return"0"+L;else return L}W.zero2=T;function O(L){var V="";for(var P=0;P<L.length;P++)V+=T(L[P].toString(16));return V}W.toHex=O,W.encode=function(L,V){if(V==="hex")return O(L);else return L}}),kU=G0((K)=>{var W=K,H=wU(),T=uU(),O=MQ();W.assert=T,W.toArray=O.toArray,W.zero2=O.zero2,W.toHex=O.toHex,W.encode=O.encode;function L(z,A,D){var R=Array(Math.max(z.bitLength(),D)+1),q;for(q=0;q<R.length;q+=1)R[q]=0;var v=1<<A+1,k=z.clone();for(q=0;q<R.length;q++){var B,_=k.andln(v-1);if(k.isOdd()){if(_>(v>>1)-1)B=(v>>1)-_;else B=_;k.isubn(B)}else B=0;R[q]=B,k.iushrn(1)}return R}W.getNAF=L;function V(z,A){var D=[[],[]];z=z.clone(),A=A.clone();var R=0,q=0,v;while(z.cmpn(-R)>0||A.cmpn(-q)>0){var k=z.andln(3)+R&3,B=A.andln(3)+q&3;if(k===3)k=-1;if(B===3)B=-1;var _;if((k&1)===0)_=0;else if(v=z.andln(7)+R&7,(v===3||v===5)&&B===2)_=-k;else _=k;D[0].push(_);var x;if((B&1)===0)x=0;else if(v=A.andln(7)+q&7,(v===3||v===5)&&k===2)x=-B;else x=B;if(D[1].push(x),2*R===_+1)R=1-R;if(2*q===x+1)q=1-q;z.iushrn(1),A.iushrn(1)}return D}W.getJSF=V;function P(z,A,D){var R="_"+A;z.prototype[A]=function(){return this[R]!==void 0?this[R]:this[R]=D.call(this)}}W.cachedProperty=P;function S(z){return typeof z==="string"?W.toArray(z,"hex"):z}W.parseBytes=S;function M(z){return new H(z,"hex","le")}W.intFromLE=M}),LQ=G0((K,W)=>{var H;W.exports=function(L){if(!H)H=new T(null);return H.generate(L)};function T(L){this.rand=L}if(W.exports.Rand=T,T.prototype.generate=function(L){return this._rand(L)},T.prototype._rand=function(L){if(this.rand.getBytes)return this.rand.getBytes(L);var V=new Uint8Array(L);for(var P=0;P<V.length;P++)V[P]=this.rand.getByte();return V},typeof self==="object"){if(self.crypto&&self.crypto.getRandomValues)T.prototype._rand=function(L){var V=new Uint8Array(L);return self.crypto.getRandomValues(V),V};else if(self.msCrypto&&self.msCrypto.getRandomValues)T.prototype._rand=function(L){var V=new Uint8Array(L);return self.msCrypto.getRandomValues(V),V};else if(typeof window==="object")T.prototype._rand=function(){throw Error("Not implemented yet")}}else try{if(O=(RU(),h0(SU)),typeof O.randomBytes!=="function")throw Error("Not supported");T.prototype._rand=function(L){return O.randomBytes(L)}}catch(L){}var O}),RX=G0((K,W)=>{var H=wU(),T=kU(),O=T.getNAF,L=T.getJSF,V=T.assert;function P(M,z){this.type=M,this.p=new H(z.p,16),this.red=z.prime?H.red(z.prime):H.mont(this.p),this.zero=new H(0).toRed(this.red),this.one=new H(1).toRed(this.red),this.two=new H(2).toRed(this.red),this.n=z.n&&new H(z.n,16),this.g=z.g&&this.pointFromJSON(z.g,z.gRed),this._wnafT1=[,,,,],this._wnafT2=[,,,,],this._wnafT3=[,,,,],this._wnafT4=[,,,,],this._bitLength=this.n?this.n.bitLength():0;var A=this.n&&this.p.div(this.n);if(!A||A.cmpn(100)>0)this.redN=null;else this._maxwellTrick=!0,this.redN=this.n.toRed(this.red)}W.exports=P,P.prototype.point=function(){throw Error("Not implemented")},P.prototype.validate=function(){throw Error("Not implemented")},P.prototype._fixedNafMul=function(M,z){V(M.precomputed);var A=M._getDoubles(),D=O(z,1,this._bitLength),R=(1<<A.step+1)-(A.step%2===0?2:1);R/=3;var q=[],v,k;for(v=0;v<D.length;v+=A.step){k=0;for(var B=v+A.step-1;B>=v;B--)k=(k<<1)+D[B];q.push(k)}var _=this.jpoint(null,null,null),x=this.jpoint(null,null,null);for(var w=R;w>0;w--){for(v=0;v<q.length;v++)if(k=q[v],k===w)x=x.mixedAdd(A.points[v]);else if(k===-w)x=x.mixedAdd(A.points[v].neg());_=_.add(x)}return _.toP()},P.prototype._wnafMul=function(M,z){var A=4,D=M._getNAFPoints(A);A=D.wnd;var R=D.points,q=O(z,A,this._bitLength),v=this.jpoint(null,null,null);for(var k=q.length-1;k>=0;k--){for(var B=0;k>=0&&q[k]===0;k--)B++;if(k>=0)B++;if(v=v.dblp(B),k<0)break;var _=q[k];if(V(_!==0),M.type==="affine")if(_>0)v=v.mixedAdd(R[_-1>>1]);else v=v.mixedAdd(R[-_-1>>1].neg());else if(_>0)v=v.add(R[_-1>>1]);else v=v.add(R[-_-1>>1].neg())}return M.type==="affine"?v.toP():v},P.prototype._wnafMulAdd=function(M,z,A,D,R){var q=this._wnafT1,v=this._wnafT2,k=this._wnafT3,B=0,_,x,w;for(_=0;_<D;_++){w=z[_];var y=w._getNAFPoints(M);q[_]=y.wnd,v[_]=y.points}for(_=D-1;_>=1;_-=2){var l=_-1,J0=_;if(q[l]!==1||q[J0]!==1){k[l]=O(A[l],q[l],this._bitLength),k[J0]=O(A[J0],q[J0],this._bitLength),B=Math.max(k[l].length,B),B=Math.max(k[J0].length,B);continue}var K0=[z[l],null,null,z[J0]];if(z[l].y.cmp(z[J0].y)===0)K0[1]=z[l].add(z[J0]),K0[2]=z[l].toJ().mixedAdd(z[J0].neg());else if(z[l].y.cmp(z[J0].y.redNeg())===0)K0[1]=z[l].toJ().mixedAdd(z[J0]),K0[2]=z[l].add(z[J0].neg());else K0[1]=z[l].toJ().mixedAdd(z[J0]),K0[2]=z[l].toJ().mixedAdd(z[J0].neg());var V0=[-3,-1,-5,-7,0,7,5,1,3],u=L(A[l],A[J0]);B=Math.max(u[0].length,B),k[l]=Array(B),k[J0]=Array(B);for(x=0;x<B;x++){var X0=u[0][x]|0,U=u[1][x]|0;k[l][x]=V0[(X0+1)*3+(U+1)],k[J0][x]=0,v[l]=K0}}var Q=this.jpoint(null,null,null),J=this._wnafT4;for(_=B;_>=0;_--){var Z=0;while(_>=0){var Y=!0;for(x=0;x<D;x++)if(J[x]=k[x][_]|0,J[x]!==0)Y=!1;if(!Y)break;Z++,_--}if(_>=0)Z++;if(Q=Q.dblp(Z),_<0)break;for(x=0;x<D;x++){var $=J[x];if($===0)continue;else if($>0)w=v[x][$-1>>1];else if($<0)w=v[x][-$-1>>1].neg();if(w.type==="affine")Q=Q.mixedAdd(w);else Q=Q.add(w)}}for(_=0;_<D;_++)v[_]=null;if(R)return Q;else return Q.toP()};function S(M,z){this.curve=M,this.type=z,this.precomputed=null}P.BasePoint=S,S.prototype.eq=function(){throw Error("Not implemented")},S.prototype.validate=function(){return this.curve.validate(this)},P.prototype.decodePoint=function(M,z){M=T.toArray(M,z);var A=this.p.byteLength();if((M[0]===4||M[0]===6||M[0]===7)&&M.length-1===2*A){if(M[0]===6)V(M[M.length-1]%2===0);else if(M[0]===7)V(M[M.length-1]%2===1);var D=this.point(M.slice(1,1+A),M.slice(1+A,1+2*A));return D}else if((M[0]===2||M[0]===3)&&M.length-1===A)return this.pointFromX(M.slice(1,1+A),M[0]===3);throw Error("Unknown point format")},S.prototype.encodeCompressed=function(M){return this.encode(M,!0)},S.prototype._encode=function(M){var z=this.curve.p.byteLength(),A=this.getX().toArray("be",z);if(M)return[this.getY().isEven()?2:3].concat(A);return[4].concat(A,this.getY().toArray("be",z))},S.prototype.encode=function(M,z){return T.encode(this._encode(z),M)},S.prototype.precompute=function(M){if(this.precomputed)return this;var z={doubles:null,naf:null,beta:null};return z.naf=this._getNAFPoints(8),z.doubles=this._getDoubles(4,M),z.beta=this._getBeta(),this.precomputed=z,this},S.prototype._hasDoubles=function(M){if(!this.precomputed)return!1;var z=this.precomputed.doubles;if(!z)return!1;return z.points.length>=Math.ceil((M.bitLength()+1)/z.step)},S.prototype._getDoubles=function(M,z){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;var A=[this],D=this;for(var R=0;R<z;R+=M){for(var q=0;q<M;q++)D=D.dbl();A.push(D)}return{step:M,points:A}},S.prototype._getNAFPoints=function(M){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;var z=[this],A=(1<<M)-1,D=A===1?null:this.dbl();for(var R=1;R<A;R++)z[R]=z[R-1].add(D);return{wnd:M,points:z}},S.prototype._getBeta=function(){return null},S.prototype.dblp=function(M){var z=this;for(var A=0;A<M;A++)z=z.dbl();return z}}),aJ=G0((K,W)=>{if(typeof Object.create==="function")W.exports=function(H,T){if(T)H.super_=T,H.prototype=Object.create(T.prototype,{constructor:{value:H,enumerable:!1,writable:!0,configurable:!0}})};else W.exports=function(H,T){if(T){H.super_=T;var O=function(){};O.prototype=T.prototype,H.prototype=new O,H.prototype.constructor=H}}}),qU=G0((K,W)=>{try{if(H=(JJ(),h0(YJ)),typeof H.inherits!=="function")throw"";W.exports=H.inherits}catch(T){W.exports=aJ()}var H}),eJ=G0((K,W)=>{var H=kU(),T=wU(),O=qU(),L=RX(),V=H.assert;function P(z){L.call(this,"short",z),this.a=new T(z.a,16).toRed(this.red),this.b=new T(z.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(z),this._endoWnafT1=[,,,,],this._endoWnafT2=[,,,,]}O(P,L),W.exports=P,P.prototype._getEndomorphism=function(z){if(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)return;var A,D;if(z.beta)A=new T(z.beta,16).toRed(this.red);else{var R=this._getEndoRoots(this.p);A=R[0].cmp(R[1])<0?R[0]:R[1],A=A.toRed(this.red)}if(z.lambda)D=new T(z.lambda,16);else{var q=this._getEndoRoots(this.n);if(this.g.mul(q[0]).x.cmp(this.g.x.redMul(A))===0)D=q[0];else D=q[1],V(this.g.mul(D).x.cmp(this.g.x.redMul(A))===0)}var v;if(z.basis)v=z.basis.map(function(k){return{a:new T(k.a,16),b:new T(k.b,16)}});else v=this._getEndoBasis(D);return{beta:A,lambda:D,basis:v}},P.prototype._getEndoRoots=function(z){var A=z===this.p?this.red:T.mont(z),D=new T(2).toRed(A).redInvm(),R=D.redNeg(),q=new T(3).toRed(A).redNeg().redSqrt().redMul(D),v=R.redAdd(q).fromRed(),k=R.redSub(q).fromRed();return[v,k]},P.prototype._getEndoBasis=function(z){var A=this.n.ushrn(Math.floor(this.n.bitLength()/2)),D=z,R=this.n.clone(),q=new T(1),v=new T(0),k=new T(0),B=new T(1),_,x,w,y,l,J0,K0,V0=0,u,X0;while(D.cmpn(0)!==0){var U=R.div(D);u=R.sub(U.mul(D)),X0=k.sub(U.mul(q));var Q=B.sub(U.mul(v));if(!w&&u.cmp(A)<0)_=K0.neg(),x=q,w=u.neg(),y=X0;else if(w&&++V0===2)break;K0=u,R=D,D=u,k=q,q=X0,B=v,v=Q}l=u.neg(),J0=X0;var J=w.sqr().add(y.sqr()),Z=l.sqr().add(J0.sqr());if(Z.cmp(J)>=0)l=_,J0=x;if(w.negative)w=w.neg(),y=y.neg();if(l.negative)l=l.neg(),J0=J0.neg();return[{a:w,b:y},{a:l,b:J0}]},P.prototype._endoSplit=function(z){var A=this.endo.basis,D=A[0],R=A[1],q=R.b.mul(z).divRound(this.n),v=D.b.neg().mul(z).divRound(this.n),k=q.mul(D.a),B=v.mul(R.a),_=q.mul(D.b),x=v.mul(R.b),w=z.sub(k).sub(B),y=_.add(x).neg();return{k1:w,k2:y}},P.prototype.pointFromX=function(z,A){if(z=new T(z,16),!z.red)z=z.toRed(this.red);var D=z.redSqr().redMul(z).redIAdd(z.redMul(this.a)).redIAdd(this.b),R=D.redSqrt();if(R.redSqr().redSub(D).cmp(this.zero)!==0)throw Error("invalid point");var q=R.fromRed().isOdd();if(A&&!q||!A&&q)R=R.redNeg();return this.point(z,R)},P.prototype.validate=function(z){if(z.inf)return!0;var{x:A,y:D}=z,R=this.a.redMul(A),q=A.redSqr().redMul(A).redIAdd(R).redIAdd(this.b);return D.redSqr().redISub(q).cmpn(0)===0},P.prototype._endoWnafMulAdd=function(z,A,D){var R=this._endoWnafT1,q=this._endoWnafT2;for(var v=0;v<z.length;v++){var k=this._endoSplit(A[v]),B=z[v],_=B._getBeta();if(k.k1.negative)k.k1.ineg(),B=B.neg(!0);if(k.k2.negative)k.k2.ineg(),_=_.neg(!0);R[v*2]=B,R[v*2+1]=_,q[v*2]=k.k1,q[v*2+1]=k.k2}var x=this._wnafMulAdd(1,R,q,v*2,D);for(var w=0;w<v*2;w++)R[w]=null,q[w]=null;return x};function S(z,A,D,R){if(L.BasePoint.call(this,z,"affine"),A===null&&D===null)this.x=null,this.y=null,this.inf=!0;else{if(this.x=new T(A,16),this.y=new T(D,16),R)this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red);if(!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.y.red)this.y=this.y.toRed(this.curve.red);this.inf=!1}}O(S,L.BasePoint),P.prototype.point=function(z,A,D){return new S(this,z,A,D)},P.prototype.pointFromJSON=function(z,A){return S.fromJSON(this,z,A)},S.prototype._getBeta=function(){if(!this.curve.endo)return;var z=this.precomputed;if(z&&z.beta)return z.beta;var A=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(z){var D=this.curve,R=function(q){return D.point(q.x.redMul(D.endo.beta),q.y)};z.beta=A,A.precomputed={beta:null,naf:z.naf&&{wnd:z.naf.wnd,points:z.naf.points.map(R)},doubles:z.doubles&&{step:z.doubles.step,points:z.doubles.points.map(R)}}}return A},S.prototype.toJSON=function(){if(!this.precomputed)return[this.x,this.y];return[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)}}]},S.fromJSON=function(z,A,D){if(typeof A==="string")A=JSON.parse(A);var R=z.point(A[0],A[1],D);if(!A[2])return R;function q(k){return z.point(k[0],k[1],D)}var v=A[2];return R.precomputed={beta:null,doubles:v.doubles&&{step:v.doubles.step,points:[R].concat(v.doubles.points.map(q))},naf:v.naf&&{wnd:v.naf.wnd,points:[R].concat(v.naf.points.map(q))}},R},S.prototype.inspect=function(){if(this.isInfinity())return"<EC Point Infinity>";return"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},S.prototype.isInfinity=function(){return this.inf},S.prototype.add=function(z){if(this.inf)return z;if(z.inf)return this;if(this.eq(z))return this.dbl();if(this.neg().eq(z))return this.curve.point(null,null);if(this.x.cmp(z.x)===0)return this.curve.point(null,null);var A=this.y.redSub(z.y);if(A.cmpn(0)!==0)A=A.redMul(this.x.redSub(z.x).redInvm());var D=A.redSqr().redISub(this.x).redISub(z.x),R=A.redMul(this.x.redSub(D)).redISub(this.y);return this.curve.point(D,R)},S.prototype.dbl=function(){if(this.inf)return this;var z=this.y.redAdd(this.y);if(z.cmpn(0)===0)return this.curve.point(null,null);var A=this.curve.a,D=this.x.redSqr(),R=z.redInvm(),q=D.redAdd(D).redIAdd(D).redIAdd(A).redMul(R),v=q.redSqr().redISub(this.x.redAdd(this.x)),k=q.redMul(this.x.redSub(v)).redISub(this.y);return this.curve.point(v,k)},S.prototype.getX=function(){return this.x.fromRed()},S.prototype.getY=function(){return this.y.fromRed()},S.prototype.mul=function(z){if(z=new T(z,16),this.isInfinity())return this;else if(this._hasDoubles(z))return this.curve._fixedNafMul(this,z);else if(this.curve.endo)return this.curve._endoWnafMulAdd([this],[z]);else return this.curve._wnafMul(this,z)},S.prototype.mulAdd=function(z,A,D){var R=[this,A],q=[z,D];if(this.curve.endo)return this.curve._endoWnafMulAdd(R,q);else return this.curve._wnafMulAdd(1,R,q,2)},S.prototype.jmulAdd=function(z,A,D){var R=[this,A],q=[z,D];if(this.curve.endo)return this.curve._endoWnafMulAdd(R,q,!0);else return this.curve._wnafMulAdd(1,R,q,2,!0)},S.prototype.eq=function(z){return this===z||this.inf===z.inf&&(this.inf||this.x.cmp(z.x)===0&&this.y.cmp(z.y)===0)},S.prototype.neg=function(z){if(this.inf)return this;var A=this.curve.point(this.x,this.y.redNeg());if(z&&this.precomputed){var D=this.precomputed,R=function(q){return q.neg()};A.precomputed={naf:D.naf&&{wnd:D.naf.wnd,points:D.naf.points.map(R)},doubles:D.doubles&&{step:D.doubles.step,points:D.doubles.points.map(R)}}}return A},S.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var z=this.curve.jpoint(this.x,this.y,this.curve.one);return z};function M(z,A,D,R){if(L.BasePoint.call(this,z,"jacobian"),A===null&&D===null&&R===null)this.x=this.curve.one,this.y=this.curve.one,this.z=new T(0);else this.x=new T(A,16),this.y=new T(D,16),this.z=new T(R,16);if(!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.y.red)this.y=this.y.toRed(this.curve.red);if(!this.z.red)this.z=this.z.toRed(this.curve.red);this.zOne=this.z===this.curve.one}O(M,L.BasePoint),P.prototype.jpoint=function(z,A,D){return new M(this,z,A,D)},M.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var z=this.z.redInvm(),A=z.redSqr(),D=this.x.redMul(A),R=this.y.redMul(A).redMul(z);return this.curve.point(D,R)},M.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},M.prototype.add=function(z){if(this.isInfinity())return z;if(z.isInfinity())return this;var A=z.z.redSqr(),D=this.z.redSqr(),R=this.x.redMul(A),q=z.x.redMul(D),v=this.y.redMul(A.redMul(z.z)),k=z.y.redMul(D.redMul(this.z)),B=R.redSub(q),_=v.redSub(k);if(B.cmpn(0)===0)if(_.cmpn(0)!==0)return this.curve.jpoint(null,null,null);else return this.dbl();var x=B.redSqr(),w=x.redMul(B),y=R.redMul(x),l=_.redSqr().redIAdd(w).redISub(y).redISub(y),J0=_.redMul(y.redISub(l)).redISub(v.redMul(w)),K0=this.z.redMul(z.z).redMul(B);return this.curve.jpoint(l,J0,K0)},M.prototype.mixedAdd=function(z){if(this.isInfinity())return z.toJ();if(z.isInfinity())return this;var A=this.z.redSqr(),D=this.x,R=z.x.redMul(A),q=this.y,v=z.y.redMul(A).redMul(this.z),k=D.redSub(R),B=q.redSub(v);if(k.cmpn(0)===0)if(B.cmpn(0)!==0)return this.curve.jpoint(null,null,null);else return this.dbl();var _=k.redSqr(),x=_.redMul(k),w=D.redMul(_),y=B.redSqr().redIAdd(x).redISub(w).redISub(w),l=B.redMul(w.redISub(y)).redISub(q.redMul(x)),J0=this.z.redMul(k);return this.curve.jpoint(y,l,J0)},M.prototype.dblp=function(z){if(z===0)return this;if(this.isInfinity())return this;if(!z)return this.dbl();var A;if(this.curve.zeroA||this.curve.threeA){var D=this;for(A=0;A<z;A++)D=D.dbl();return D}var R=this.curve.a,q=this.curve.tinv,v=this.x,k=this.y,B=this.z,_=B.redSqr().redSqr(),x=k.redAdd(k);for(A=0;A<z;A++){var w=v.redSqr(),y=x.redSqr(),l=y.redSqr(),J0=w.redAdd(w).redIAdd(w).redIAdd(R.redMul(_)),K0=v.redMul(y),V0=J0.redSqr().redISub(K0.redAdd(K0)),u=K0.redISub(V0),X0=J0.redMul(u);X0=X0.redIAdd(X0).redISub(l);var U=x.redMul(B);if(A+1<z)_=_.redMul(l);v=V0,B=U,x=X0}return this.curve.jpoint(v,x.redMul(q),B)},M.prototype.dbl=function(){if(this.isInfinity())return this;if(this.curve.zeroA)return this._zeroDbl();else if(this.curve.threeA)return this._threeDbl();else return this._dbl()},M.prototype._zeroDbl=function(){var z,A,D;if(this.zOne){var R=this.x.redSqr(),q=this.y.redSqr(),v=q.redSqr(),k=this.x.redAdd(q).redSqr().redISub(R).redISub(v);k=k.redIAdd(k);var B=R.redAdd(R).redIAdd(R),_=B.redSqr().redISub(k).redISub(k),x=v.redIAdd(v);x=x.redIAdd(x),x=x.redIAdd(x),z=_,A=B.redMul(k.redISub(_)).redISub(x),D=this.y.redAdd(this.y)}else{var w=this.x.redSqr(),y=this.y.redSqr(),l=y.redSqr(),J0=this.x.redAdd(y).redSqr().redISub(w).redISub(l);J0=J0.redIAdd(J0);var K0=w.redAdd(w).redIAdd(w),V0=K0.redSqr(),u=l.redIAdd(l);u=u.redIAdd(u),u=u.redIAdd(u),z=V0.redISub(J0).redISub(J0),A=K0.redMul(J0.redISub(z)).redISub(u),D=this.y.redMul(this.z),D=D.redIAdd(D)}return this.curve.jpoint(z,A,D)},M.prototype._threeDbl=function(){var z,A,D;if(this.zOne){var R=this.x.redSqr(),q=this.y.redSqr(),v=q.redSqr(),k=this.x.redAdd(q).redSqr().redISub(R).redISub(v);k=k.redIAdd(k);var B=R.redAdd(R).redIAdd(R).redIAdd(this.curve.a),_=B.redSqr().redISub(k).redISub(k);z=_;var x=v.redIAdd(v);x=x.redIAdd(x),x=x.redIAdd(x),A=B.redMul(k.redISub(_)).redISub(x),D=this.y.redAdd(this.y)}else{var w=this.z.redSqr(),y=this.y.redSqr(),l=this.x.redMul(y),J0=this.x.redSub(w).redMul(this.x.redAdd(w));J0=J0.redAdd(J0).redIAdd(J0);var K0=l.redIAdd(l);K0=K0.redIAdd(K0);var V0=K0.redAdd(K0);z=J0.redSqr().redISub(V0),D=this.y.redAdd(this.z).redSqr().redISub(y).redISub(w);var u=y.redSqr();u=u.redIAdd(u),u=u.redIAdd(u),u=u.redIAdd(u),A=J0.redMul(K0.redISub(z)).redISub(u)}return this.curve.jpoint(z,A,D)},M.prototype._dbl=function(){var z=this.curve.a,A=this.x,D=this.y,R=this.z,q=R.redSqr().redSqr(),v=A.redSqr(),k=D.redSqr(),B=v.redAdd(v).redIAdd(v).redIAdd(z.redMul(q)),_=A.redAdd(A);_=_.redIAdd(_);var x=_.redMul(k),w=B.redSqr().redISub(x.redAdd(x)),y=x.redISub(w),l=k.redSqr();l=l.redIAdd(l),l=l.redIAdd(l),l=l.redIAdd(l);var J0=B.redMul(y).redISub(l),K0=D.redAdd(D).redMul(R);return this.curve.jpoint(w,J0,K0)},M.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var z=this.x.redSqr(),A=this.y.redSqr(),D=this.z.redSqr(),R=A.redSqr(),q=z.redAdd(z).redIAdd(z),v=q.redSqr(),k=this.x.redAdd(A).redSqr().redISub(z).redISub(R);k=k.redIAdd(k),k=k.redAdd(k).redIAdd(k),k=k.redISub(v);var B=k.redSqr(),_=R.redIAdd(R);_=_.redIAdd(_),_=_.redIAdd(_),_=_.redIAdd(_);var x=q.redIAdd(k).redSqr().redISub(v).redISub(B).redISub(_),w=A.redMul(x);w=w.redIAdd(w),w=w.redIAdd(w);var y=this.x.redMul(B).redISub(w);y=y.redIAdd(y),y=y.redIAdd(y);var l=this.y.redMul(x.redMul(_.redISub(x)).redISub(k.redMul(B)));l=l.redIAdd(l),l=l.redIAdd(l),l=l.redIAdd(l);var J0=this.z.redAdd(k).redSqr().redISub(D).redISub(B);return this.curve.jpoint(y,l,J0)},M.prototype.mul=function(z,A){return z=new T(z,A),this.curve._wnafMul(this,z)},M.prototype.eq=function(z){if(z.type==="affine")return this.eq(z.toJ());if(this===z)return!0;var A=this.z.redSqr(),D=z.z.redSqr();if(this.x.redMul(D).redISub(z.x.redMul(A)).cmpn(0)!==0)return!1;var R=A.redMul(this.z),q=D.redMul(z.z);return this.y.redMul(q).redISub(z.y.redMul(R)).cmpn(0)===0},M.prototype.eqXToP=function(z){var A=this.z.redSqr(),D=z.toRed(this.curve.red).redMul(A);if(this.x.cmp(D)===0)return!0;var R=z.clone(),q=this.curve.redN.redMul(A);for(;;){if(R.iadd(this.curve.n),R.cmp(this.curve.p)>=0)return!1;if(D.redIAdd(q),this.x.cmp(D)===0)return!0}},M.prototype.inspect=function(){if(this.isInfinity())return"<EC JPoint Infinity>";return"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},M.prototype.isInfinity=function(){return this.z.cmpn(0)===0}}),iJ=G0((K,W)=>{var H=wU(),T=qU(),O=RX(),L=kU();function V(S){O.call(this,"mont",S),this.a=new H(S.a,16).toRed(this.red),this.b=new H(S.b,16).toRed(this.red),this.i4=new H(4).toRed(this.red).redInvm(),this.two=new H(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}T(V,O),W.exports=V,V.prototype.validate=function(S){var M=S.normalize().x,z=M.redSqr(),A=z.redMul(M).redAdd(z.redMul(this.a)).redAdd(M),D=A.redSqrt();return D.redSqr().cmp(A)===0};function P(S,M,z){if(O.BasePoint.call(this,S,"projective"),M===null&&z===null)this.x=this.curve.one,this.z=this.curve.zero;else{if(this.x=new H(M,16),this.z=new H(z,16),!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.z.red)this.z=this.z.toRed(this.curve.red)}}T(P,O.BasePoint),V.prototype.decodePoint=function(S,M){return this.point(L.toArray(S,M),1)},V.prototype.point=function(S,M){return new P(this,S,M)},V.prototype.pointFromJSON=function(S){return P.fromJSON(this,S)},P.prototype.precompute=function(){},P.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},P.fromJSON=function(S,M){return new P(S,M[0],M[1]||S.one)},P.prototype.inspect=function(){if(this.isInfinity())return"<EC Point Infinity>";return"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},P.prototype.isInfinity=function(){return this.z.cmpn(0)===0},P.prototype.dbl=function(){var S=this.x.redAdd(this.z),M=S.redSqr(),z=this.x.redSub(this.z),A=z.redSqr(),D=M.redSub(A),R=M.redMul(A),q=D.redMul(A.redAdd(this.curve.a24.redMul(D)));return this.curve.point(R,q)},P.prototype.add=function(){throw Error("Not supported on Montgomery curve")},P.prototype.diffAdd=function(S,M){var z=this.x.redAdd(this.z),A=this.x.redSub(this.z),D=S.x.redAdd(S.z),R=S.x.redSub(S.z),q=R.redMul(z),v=D.redMul(A),k=M.z.redMul(q.redAdd(v).redSqr()),B=M.x.redMul(q.redISub(v).redSqr());return this.curve.point(k,B)},P.prototype.mul=function(S){var M=S.clone(),z=this,A=this.curve.point(null,null),D=this;for(var R=[];M.cmpn(0)!==0;M.iushrn(1))R.push(M.andln(1));for(var q=R.length-1;q>=0;q--)if(R[q]===0)z=z.diffAdd(A,D),A=A.dbl();else A=z.diffAdd(A,D),z=z.dbl();return A},P.prototype.mulAdd=function(){throw Error("Not supported on Montgomery curve")},P.prototype.jumlAdd=function(){throw Error("Not supported on Montgomery curve")},P.prototype.eq=function(S){return this.getX().cmp(S.getX())===0},P.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},P.prototype.getX=function(){return this.normalize(),this.x.fromRed()}}),UV=G0((K,W)=>{var H=kU(),T=wU(),O=qU(),L=RX(),V=H.assert;function P(M){this.twisted=(M.a|0)!==1,this.mOneA=this.twisted&&(M.a|0)===-1,this.extended=this.mOneA,L.call(this,"edwards",M),this.a=new T(M.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new T(M.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new T(M.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),V(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(M.c|0)===1}O(P,L),W.exports=P,P.prototype._mulA=function(M){if(this.mOneA)return M.redNeg();else return this.a.redMul(M)},P.prototype._mulC=function(M){if(this.oneC)return M;else return this.c.redMul(M)},P.prototype.jpoint=function(M,z,A,D){return this.point(M,z,A,D)},P.prototype.pointFromX=function(M,z){if(M=new T(M,16),!M.red)M=M.toRed(this.red);var A=M.redSqr(),D=this.c2.redSub(this.a.redMul(A)),R=this.one.redSub(this.c2.redMul(this.d).redMul(A)),q=D.redMul(R.redInvm()),v=q.redSqrt();if(v.redSqr().redSub(q).cmp(this.zero)!==0)throw Error("invalid point");var k=v.fromRed().isOdd();if(z&&!k||!z&&k)v=v.redNeg();return this.point(M,v)},P.prototype.pointFromY=function(M,z){if(M=new T(M,16),!M.red)M=M.toRed(this.red);var A=M.redSqr(),D=A.redSub(this.c2),R=A.redMul(this.d).redMul(this.c2).redSub(this.a),q=D.redMul(R.redInvm());if(q.cmp(this.zero)===0)if(z)throw Error("invalid point");else return this.point(this.zero,M);var v=q.redSqrt();if(v.redSqr().redSub(q).cmp(this.zero)!==0)throw Error("invalid point");if(v.fromRed().isOdd()!==z)v=v.redNeg();return this.point(v,M)},P.prototype.validate=function(M){if(M.isInfinity())return!0;M.normalize();var z=M.x.redSqr(),A=M.y.redSqr(),D=z.redMul(this.a).redAdd(A),R=this.c2.redMul(this.one.redAdd(this.d.redMul(z).redMul(A)));return D.cmp(R)===0};function S(M,z,A,D,R){if(L.BasePoint.call(this,M,"projective"),z===null&&A===null&&D===null)this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0;else{if(this.x=new T(z,16),this.y=new T(A,16),this.z=D?new T(D,16):this.curve.one,this.t=R&&new T(R,16),!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.y.red)this.y=this.y.toRed(this.curve.red);if(!this.z.red)this.z=this.z.toRed(this.curve.red);if(this.t&&!this.t.red)this.t=this.t.toRed(this.curve.red);if(this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t){if(this.t=this.x.redMul(this.y),!this.zOne)this.t=this.t.redMul(this.z.redInvm())}}}O(S,L.BasePoint),P.prototype.pointFromJSON=function(M){return S.fromJSON(this,M)},P.prototype.point=function(M,z,A,D){return new S(this,M,z,A,D)},S.fromJSON=function(M,z){return new S(M,z[0],z[1],z[2])},S.prototype.inspect=function(){if(this.isInfinity())return"<EC Point Infinity>";return"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},S.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},S.prototype._extDbl=function(){var M=this.x.redSqr(),z=this.y.redSqr(),A=this.z.redSqr();A=A.redIAdd(A);var D=this.curve._mulA(M),R=this.x.redAdd(this.y).redSqr().redISub(M).redISub(z),q=D.redAdd(z),v=q.redSub(A),k=D.redSub(z),B=R.redMul(v),_=q.redMul(k),x=R.redMul(k),w=v.redMul(q);return this.curve.point(B,_,w,x)},S.prototype._projDbl=function(){var M=this.x.redAdd(this.y).redSqr(),z=this.x.redSqr(),A=this.y.redSqr(),D,R,q,v,k,B;if(this.curve.twisted){v=this.curve._mulA(z);var _=v.redAdd(A);if(this.zOne)D=M.redSub(z).redSub(A).redMul(_.redSub(this.curve.two)),R=_.redMul(v.redSub(A)),q=_.redSqr().redSub(_).redSub(_);else k=this.z.redSqr(),B=_.redSub(k).redISub(k),D=M.redSub(z).redISub(A).redMul(B),R=_.redMul(v.redSub(A)),q=_.redMul(B)}else v=z.redAdd(A),k=this.curve._mulC(this.z).redSqr(),B=v.redSub(k).redSub(k),D=this.curve._mulC(M.redISub(v)).redMul(B),R=this.curve._mulC(v).redMul(z.redISub(A)),q=v.redMul(B);return this.curve.point(D,R,q)},S.prototype.dbl=function(){if(this.isInfinity())return this;if(this.curve.extended)return this._extDbl();else return this._projDbl()},S.prototype._extAdd=function(M){var z=this.y.redSub(this.x).redMul(M.y.redSub(M.x)),A=this.y.redAdd(this.x).redMul(M.y.redAdd(M.x)),D=this.t.redMul(this.curve.dd).redMul(M.t),R=this.z.redMul(M.z.redAdd(M.z)),q=A.redSub(z),v=R.redSub(D),k=R.redAdd(D),B=A.redAdd(z),_=q.redMul(v),x=k.redMul(B),w=q.redMul(B),y=v.redMul(k);return this.curve.point(_,x,y,w)},S.prototype._projAdd=function(M){var z=this.z.redMul(M.z),A=z.redSqr(),D=this.x.redMul(M.x),R=this.y.redMul(M.y),q=this.curve.d.redMul(D).redMul(R),v=A.redSub(q),k=A.redAdd(q),B=this.x.redAdd(this.y).redMul(M.x.redAdd(M.y)).redISub(D).redISub(R),_=z.redMul(v).redMul(B),x,w;if(this.curve.twisted)x=z.redMul(k).redMul(R.redSub(this.curve._mulA(D))),w=v.redMul(k);else x=z.redMul(k).redMul(R.redSub(D)),w=this.curve._mulC(v).redMul(k);return this.curve.point(_,x,w)},S.prototype.add=function(M){if(this.isInfinity())return M;if(M.isInfinity())return this;if(this.curve.extended)return this._extAdd(M);else return this._projAdd(M)},S.prototype.mul=function(M){if(this._hasDoubles(M))return this.curve._fixedNafMul(this,M);else return this.curve._wnafMul(this,M)},S.prototype.mulAdd=function(M,z,A){return this.curve._wnafMulAdd(1,[this,z],[M,A],2,!1)},S.prototype.jmulAdd=function(M,z,A){return this.curve._wnafMulAdd(1,[this,z],[M,A],2,!0)},S.prototype.normalize=function(){if(this.zOne)return this;var M=this.z.redInvm();if(this.x=this.x.redMul(M),this.y=this.y.redMul(M),this.t)this.t=this.t.redMul(M);return this.z=this.curve.one,this.zOne=!0,this},S.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},S.prototype.getX=function(){return this.normalize(),this.x.fromRed()},S.prototype.getY=function(){return this.normalize(),this.y.fromRed()},S.prototype.eq=function(M){return this===M||this.getX().cmp(M.getX())===0&&this.getY().cmp(M.getY())===0},S.prototype.eqXToP=function(M){var z=M.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(z)===0)return!0;var A=M.clone(),D=this.curve.redN.redMul(this.z);for(;;){if(A.iadd(this.curve.n),A.cmp(this.curve.p)>=0)return!1;if(z.redIAdd(D),this.x.cmp(z)===0)return!0}},S.prototype.toP=S.prototype.normalize,S.prototype.mixedAdd=S.prototype.add}),EQ=G0((K)=>{var W=K;W.base=RX(),W.short=eJ(),W.mont=iJ(),W.edwards=UV()}),_U=G0((K)=>{var W=uU(),H=qU();K.inherits=H;function T(Q,J){if((Q.charCodeAt(J)&64512)!==55296)return!1;if(J<0||J+1>=Q.length)return!1;return(Q.charCodeAt(J+1)&64512)===56320}function O(Q,J){if(Array.isArray(Q))return Q.slice();if(!Q)return[];var Z=[];if(typeof Q==="string"){if(!J){var Y=0;for(var $=0;$<Q.length;$++){var F=Q.charCodeAt($);if(F<128)Z[Y++]=F;else if(F<2048)Z[Y++]=F>>6|192,Z[Y++]=F&63|128;else if(T(Q,$))F=65536+((F&1023)<<10)+(Q.charCodeAt(++$)&1023),Z[Y++]=F>>18|240,Z[Y++]=F>>12&63|128,Z[Y++]=F>>6&63|128,Z[Y++]=F&63|128;else Z[Y++]=F>>12|224,Z[Y++]=F>>6&63|128,Z[Y++]=F&63|128}}else if(J==="hex"){if(Q=Q.replace(/[^a-z0-9]+/ig,""),Q.length%2!==0)Q="0"+Q;for($=0;$<Q.length;$+=2)Z.push(parseInt(Q[$]+Q[$+1],16))}}else for($=0;$<Q.length;$++)Z[$]=Q[$]|0;return Z}K.toArray=O;function L(Q){var J="";for(var Z=0;Z<Q.length;Z++)J+=S(Q[Z].toString(16));return J}K.toHex=L;function V(Q){var J=Q>>>24|Q>>>8&65280|Q<<8&16711680|(Q&255)<<24;return J>>>0}K.htonl=V;function P(Q,J){var Z="";for(var Y=0;Y<Q.length;Y++){var $=Q[Y];if(J==="little")$=V($);Z+=M($.toString(16))}return Z}K.toHex32=P;function S(Q){if(Q.length===1)return"0"+Q;else return Q}K.zero2=S;function M(Q){if(Q.length===7)return"0"+Q;else if(Q.length===6)return"00"+Q;else if(Q.length===5)return"000"+Q;else if(Q.length===4)return"0000"+Q;else if(Q.length===3)return"00000"+Q;else if(Q.length===2)return"000000"+Q;else if(Q.length===1)return"0000000"+Q;else return Q}K.zero8=M;function z(Q,J,Z,Y){var $=Z-J;W($%4===0);var F=Array($/4);for(var G=0,X=J;G<F.length;G++,X+=4){var I;if(Y==="big")I=Q[X]<<24|Q[X+1]<<16|Q[X+2]<<8|Q[X+3];else I=Q[X+3]<<24|Q[X+2]<<16|Q[X+1]<<8|Q[X];F[G]=I>>>0}return F}K.join32=z;function A(Q,J){var Z=Array(Q.length*4);for(var Y=0,$=0;Y<Q.length;Y++,$+=4){var F=Q[Y];if(J==="big")Z[$]=F>>>24,Z[$+1]=F>>>16&255,Z[$+2]=F>>>8&255,Z[$+3]=F&255;else Z[$+3]=F>>>24,Z[$+2]=F>>>16&255,Z[$+1]=F>>>8&255,Z[$]=F&255}return Z}K.split32=A;function D(Q,J){return Q>>>J|Q<<32-J}K.rotr32=D;function R(Q,J){return Q<<J|Q>>>32-J}K.rotl32=R;function q(Q,J){return Q+J>>>0}K.sum32=q;function v(Q,J,Z){return Q+J+Z>>>0}K.sum32_3=v;function k(Q,J,Z,Y){return Q+J+Z+Y>>>0}K.sum32_4=k;function B(Q,J,Z,Y,$){return Q+J+Z+Y+$>>>0}K.sum32_5=B;function _(Q,J,Z,Y){var $=Q[J],F=Q[J+1],G=Y+F>>>0,X=(G<Y?1:0)+Z+$;Q[J]=X>>>0,Q[J+1]=G}K.sum64=_;function x(Q,J,Z,Y){var $=J+Y>>>0,F=($<J?1:0)+Q+Z;return F>>>0}K.sum64_hi=x;function w(Q,J,Z,Y){var $=J+Y;return $>>>0}K.sum64_lo=w;function y(Q,J,Z,Y,$,F,G,X){var I=0,E=J;E=E+Y>>>0,I+=E<J?1:0,E=E+F>>>0,I+=E<F?1:0,E=E+X>>>0,I+=E<X?1:0;var C=Q+Z+$+G+I;return C>>>0}K.sum64_4_hi=y;function l(Q,J,Z,Y,$,F,G,X){var I=J+Y+F+X;return I>>>0}K.sum64_4_lo=l;function J0(Q,J,Z,Y,$,F,G,X,I,E){var C=0,j=J;j=j+Y>>>0,C+=j<J?1:0,j=j+F>>>0,C+=j<F?1:0,j=j+X>>>0,C+=j<X?1:0,j=j+E>>>0,C+=j<E?1:0;var g=Q+Z+$+G+I+C;return g>>>0}K.sum64_5_hi=J0;function K0(Q,J,Z,Y,$,F,G,X,I,E){var C=J+Y+F+X+E;return C>>>0}K.sum64_5_lo=K0;function V0(Q,J,Z){var Y=J<<32-Z|Q>>>Z;return Y>>>0}K.rotr64_hi=V0;function u(Q,J,Z){var Y=Q<<32-Z|J>>>Z;return Y>>>0}K.rotr64_lo=u;function X0(Q,J,Z){return Q>>>Z}K.shr64_hi=X0;function U(Q,J,Z){var Y=Q<<32-Z|J>>>Z;return Y>>>0}K.shr64_lo=U}),$X=G0((K)=>{var W=_U(),H=uU();function T(){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}K.BlockHash=T,T.prototype.update=function(O,L){if(O=W.toArray(O,L),!this.pending)this.pending=O;else this.pending=this.pending.concat(O);if(this.pendingTotal+=O.length,this.pending.length>=this._delta8){O=this.pending;var V=O.length%this._delta8;if(this.pending=O.slice(O.length-V,O.length),this.pending.length===0)this.pending=null;O=W.join32(O,0,O.length-V,this.endian);for(var P=0;P<O.length;P+=this._delta32)this._update(O,P,P+this._delta32)}return this},T.prototype.digest=function(O){return this.update(this._pad()),H(this.pending===null),this._digest(O)},T.prototype._pad=function(){var O=this.pendingTotal,L=this._delta8,V=L-(O+this.padLength)%L,P=Array(V+this.padLength);P[0]=128;for(var S=1;S<V;S++)P[S]=0;if(O<<=3,this.endian==="big"){for(var M=8;M<this.padLength;M++)P[S++]=0;P[S++]=0,P[S++]=0,P[S++]=0,P[S++]=0,P[S++]=O>>>24&255,P[S++]=O>>>16&255,P[S++]=O>>>8&255,P[S++]=O&255}else{P[S++]=O&255,P[S++]=O>>>8&255,P[S++]=O>>>16&255,P[S++]=O>>>24&255,P[S++]=0,P[S++]=0,P[S++]=0,P[S++]=0;for(M=8;M<this.padLength;M++)P[S++]=0}return P}}),RQ=G0((K)=>{var W=_U(),H=W.rotr32;function T(A,D,R,q){if(A===0)return O(D,R,q);if(A===1||A===3)return V(D,R,q);if(A===2)return L(D,R,q)}K.ft_1=T;function O(A,D,R){return A&D^~A&R}K.ch32=O;function L(A,D,R){return A&D^A&R^D&R}K.maj32=L;function V(A,D,R){return A^D^R}K.p32=V;function P(A){return H(A,2)^H(A,13)^H(A,22)}K.s0_256=P;function S(A){return H(A,6)^H(A,11)^H(A,25)}K.s1_256=S;function M(A){return H(A,7)^H(A,18)^A>>>3}K.g0_256=M;function z(A){return H(A,17)^H(A,19)^A>>>10}K.g1_256=z}),XV=G0((K,W)=>{var H=_U(),T=$X(),O=RQ(),L=H.rotl32,V=H.sum32,P=H.sum32_5,S=O.ft_1,M=T.BlockHash,z=[1518500249,1859775393,2400959708,3395469782];function A(){if(!(this instanceof A))return new A;M.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=Array(80)}H.inherits(A,M),W.exports=A,A.blockSize=512,A.outSize=160,A.hmacStrength=80,A.padLength=64,A.prototype._update=function(D,R){var q=this.W;for(var v=0;v<16;v++)q[v]=D[R+v];for(;v<q.length;v++)q[v]=L(q[v-3]^q[v-8]^q[v-14]^q[v-16],1);var k=this.h[0],B=this.h[1],_=this.h[2],x=this.h[3],w=this.h[4];for(v=0;v<q.length;v++){var y=~~(v/20),l=P(L(k,5),S(y,B,_,x),w,q[v],z[y]);w=x,x=_,_=L(B,30),B=k,k=l}this.h[0]=V(this.h[0],k),this.h[1]=V(this.h[1],B),this.h[2]=V(this.h[2],_),this.h[3]=V(this.h[3],x),this.h[4]=V(this.h[4],w)},A.prototype._digest=function(D){if(D==="hex")return H.toHex32(this.h,"big");else return H.split32(this.h,"big")}}),qQ=G0((K,W)=>{var H=_U(),T=$X(),O=RQ(),L=uU(),V=H.sum32,P=H.sum32_4,S=H.sum32_5,M=O.ch32,z=O.maj32,A=O.s0_256,D=O.s1_256,R=O.g0_256,q=O.g1_256,v=T.BlockHash,k=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function B(){if(!(this instanceof B))return new B;v.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=k,this.W=Array(64)}H.inherits(B,v),W.exports=B,B.blockSize=512,B.outSize=256,B.hmacStrength=192,B.padLength=64,B.prototype._update=function(_,x){var w=this.W;for(var y=0;y<16;y++)w[y]=_[x+y];for(;y<w.length;y++)w[y]=P(q(w[y-2]),w[y-7],R(w[y-15]),w[y-16]);var l=this.h[0],J0=this.h[1],K0=this.h[2],V0=this.h[3],u=this.h[4],X0=this.h[5],U=this.h[6],Q=this.h[7];L(this.k.length===w.length);for(y=0;y<w.length;y++){var J=S(Q,D(u),M(u,X0,U),this.k[y],w[y]),Z=V(A(l),z(l,J0,K0));Q=U,U=X0,X0=u,u=V(V0,J),V0=K0,K0=J0,J0=l,l=V(J,Z)}this.h[0]=V(this.h[0],l),this.h[1]=V(this.h[1],J0),this.h[2]=V(this.h[2],K0),this.h[3]=V(this.h[3],V0),this.h[4]=V(this.h[4],u),this.h[5]=V(this.h[5],X0),this.h[6]=V(this.h[6],U),this.h[7]=V(this.h[7],Q)},B.prototype._digest=function(_){if(_==="hex")return H.toHex32(this.h,"big");else return H.split32(this.h,"big")}}),ZV=G0((K,W)=>{var H=_U(),T=qQ();function O(){if(!(this instanceof O))return new O;T.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}H.inherits(O,T),W.exports=O,O.blockSize=512,O.outSize=224,O.hmacStrength=192,O.padLength=64,O.prototype._digest=function(L){if(L==="hex")return H.toHex32(this.h.slice(0,7),"big");else return H.split32(this.h.slice(0,7),"big")}}),SQ=G0((K,W)=>{var H=_U(),T=$X(),O=uU(),L=H.rotr64_hi,V=H.rotr64_lo,P=H.shr64_hi,S=H.shr64_lo,M=H.sum64,z=H.sum64_hi,A=H.sum64_lo,D=H.sum64_4_hi,R=H.sum64_4_lo,q=H.sum64_5_hi,v=H.sum64_5_lo,k=T.BlockHash,B=[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 _(){if(!(this instanceof _))return new _;k.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=B,this.W=Array(160)}H.inherits(_,k),W.exports=_,_.blockSize=1024,_.outSize=512,_.hmacStrength=192,_.padLength=128,_.prototype._prepareBlock=function(Z,Y){var $=this.W;for(var F=0;F<32;F++)$[F]=Z[Y+F];for(;F<$.length;F+=2){var G=Q($[F-4],$[F-3]),X=J($[F-4],$[F-3]),I=$[F-14],E=$[F-13],C=X0($[F-30],$[F-29]),j=U($[F-30],$[F-29]),g=$[F-32],p=$[F-31];$[F]=D(G,X,I,E,C,j,g,p),$[F+1]=R(G,X,I,E,C,j,g,p)}},_.prototype._update=function(Z,Y){this._prepareBlock(Z,Y);var $=this.W,F=this.h[0],G=this.h[1],X=this.h[2],I=this.h[3],E=this.h[4],C=this.h[5],j=this.h[6],g=this.h[7],p=this.h[8],n=this.h[9],$0=this.h[10],r=this.h[11],d=this.h[12],Q0=this.h[13],m=this.h[14],i=this.h[15];O(this.k.length===$.length);for(var g0=0;g0<$.length;g0+=2){var f=m,h=i,Y0=V0(p,n),t=u(p,n),e=x(p,n,$0,r,d,Q0),M0=w(p,n,$0,r,d,Q0),c=this.k[g0],o=this.k[g0+1],N0=$[g0],s=$[g0+1],Z0=q(f,h,Y0,t,e,M0,c,o,N0,s),y0=v(f,h,Y0,t,e,M0,c,o,N0,s);f=J0(F,G),h=K0(F,G),Y0=y(F,G,X,I,E,C),t=l(F,G,X,I,E,C);var H0=z(f,h,Y0,t),O0=A(f,h,Y0,t);m=d,i=Q0,d=$0,Q0=r,$0=p,r=n,p=z(j,g,Z0,y0),n=A(g,g,Z0,y0),j=E,g=C,E=X,C=I,X=F,I=G,F=z(Z0,y0,H0,O0),G=A(Z0,y0,H0,O0)}M(this.h,0,F,G),M(this.h,2,X,I),M(this.h,4,E,C),M(this.h,6,j,g),M(this.h,8,p,n),M(this.h,10,$0,r),M(this.h,12,d,Q0),M(this.h,14,m,i)},_.prototype._digest=function(Z){if(Z==="hex")return H.toHex32(this.h,"big");else return H.split32(this.h,"big")};function x(Z,Y,$,F,G){var X=Z&$^~Z&G;if(X<0)X+=4294967296;return X}function w(Z,Y,$,F,G,X){var I=Y&F^~Y&X;if(I<0)I+=4294967296;return I}function y(Z,Y,$,F,G){var X=Z&$^Z&G^$&G;if(X<0)X+=4294967296;return X}function l(Z,Y,$,F,G,X){var I=Y&F^Y&X^F&X;if(I<0)I+=4294967296;return I}function J0(Z,Y){var $=L(Z,Y,28),F=L(Y,Z,2),G=L(Y,Z,7),X=$^F^G;if(X<0)X+=4294967296;return X}function K0(Z,Y){var $=V(Z,Y,28),F=V(Y,Z,2),G=V(Y,Z,7),X=$^F^G;if(X<0)X+=4294967296;return X}function V0(Z,Y){var $=L(Z,Y,14),F=L(Z,Y,18),G=L(Y,Z,9),X=$^F^G;if(X<0)X+=4294967296;return X}function u(Z,Y){var $=V(Z,Y,14),F=V(Z,Y,18),G=V(Y,Z,9),X=$^F^G;if(X<0)X+=4294967296;return X}function X0(Z,Y){var $=L(Z,Y,1),F=L(Z,Y,8),G=P(Z,Y,7),X=$^F^G;if(X<0)X+=4294967296;return X}function U(Z,Y){var $=V(Z,Y,1),F=V(Z,Y,8),G=S(Z,Y,7),X=$^F^G;if(X<0)X+=4294967296;return X}function Q(Z,Y){var $=L(Z,Y,19),F=L(Y,Z,29),G=P(Z,Y,6),X=$^F^G;if(X<0)X+=4294967296;return X}function J(Z,Y){var $=V(Z,Y,19),F=V(Y,Z,29),G=S(Z,Y,6),X=$^F^G;if(X<0)X+=4294967296;return X}}),QV=G0((K,W)=>{var H=_U(),T=SQ();function O(){if(!(this instanceof O))return new O;T.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}H.inherits(O,T),W.exports=O,O.blockSize=1024,O.outSize=384,O.hmacStrength=192,O.padLength=128,O.prototype._digest=function(L){if(L==="hex")return H.toHex32(this.h.slice(0,12),"big");else return H.split32(this.h.slice(0,12),"big")}}),YV=G0((K)=>{K.sha1=XV(),K.sha224=ZV(),K.sha256=qQ(),K.sha384=QV(),K.sha512=SQ()}),JV=G0((K)=>{var W=_U(),H=$X(),T=W.rotl32,O=W.sum32,L=W.sum32_3,V=W.sum32_4,P=H.BlockHash;function S(){if(!(this instanceof S))return new S;P.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}W.inherits(S,P),K.ripemd160=S,S.blockSize=512,S.outSize=160,S.hmacStrength=192,S.padLength=64,S.prototype._update=function(k,B){var _=this.h[0],x=this.h[1],w=this.h[2],y=this.h[3],l=this.h[4],J0=_,K0=x,V0=w,u=y,X0=l;for(var U=0;U<80;U++){var Q=O(T(V(_,M(U,x,w,y),k[D[U]+B],z(U)),q[U]),l);_=l,l=y,y=T(w,10),w=x,x=Q,Q=O(T(V(J0,M(79-U,K0,V0,u),k[R[U]+B],A(U)),v[U]),X0),J0=X0,X0=u,u=T(V0,10),V0=K0,K0=Q}Q=L(this.h[1],w,u),this.h[1]=L(this.h[2],y,X0),this.h[2]=L(this.h[3],l,J0),this.h[3]=L(this.h[4],_,K0),this.h[4]=L(this.h[0],x,V0),this.h[0]=Q},S.prototype._digest=function(k){if(k==="hex")return W.toHex32(this.h,"little");else return W.split32(this.h,"little")};function M(k,B,_,x){if(k<=15)return B^_^x;else if(k<=31)return B&_|~B&x;else if(k<=47)return(B|~_)^x;else if(k<=63)return B&x|_&~x;else return B^(_|~x)}function z(k){if(k<=15)return 0;else if(k<=31)return 1518500249;else if(k<=47)return 1859775393;else if(k<=63)return 2400959708;else return 2840853838}function A(k){if(k<=15)return 1352829926;else if(k<=31)return 1548603684;else if(k<=47)return 1836072691;else if(k<=63)return 2053994217;else return 0}var D=[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],R=[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],q=[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],v=[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]}),VV=G0((K,W)=>{var H=_U(),T=uU();function O(L,V,P){if(!(this instanceof O))return new O(L,V,P);this.Hash=L,this.blockSize=L.blockSize/8,this.outSize=L.outSize/8,this.inner=null,this.outer=null,this._init(H.toArray(V,P))}W.exports=O,O.prototype._init=function(L){if(L.length>this.blockSize)L=new this.Hash().update(L).digest();T(L.length<=this.blockSize);for(var V=L.length;V<this.blockSize;V++)L.push(0);for(V=0;V<L.length;V++)L[V]^=54;this.inner=new this.Hash().update(L);for(V=0;V<L.length;V++)L[V]^=106;this.outer=new this.Hash().update(L)},O.prototype.update=function(L,V){return this.inner.update(L,V),this},O.prototype.digest=function(L){return this.outer.update(this.inner.digest()),this.outer.digest(L)}}),JZ=G0((K)=>{var W=K;W.utils=_U(),W.common=$X(),W.sha=YV(),W.ripemd=JV(),W.hmac=VV(),W.sha1=W.sha.sha1,W.sha256=W.sha.sha256,W.sha224=W.sha.sha224,W.sha384=W.sha.sha384,W.sha512=W.sha.sha512,W.ripemd160=W.ripemd.ripemd160}),GV=G0((K,W)=>{W.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"]]}}}),VZ=G0((K)=>{var W=K,H=JZ(),T=EQ(),O=kU(),L=O.assert;function V(M){if(M.type==="short")this.curve=new T.short(M);else if(M.type==="edwards")this.curve=new T.edwards(M);else this.curve=new T.mont(M);this.g=this.curve.g,this.n=this.curve.n,this.hash=M.hash,L(this.g.validate(),"Invalid curve"),L(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}W.PresetCurve=V;function P(M,z){Object.defineProperty(W,M,{configurable:!0,enumerable:!0,get:function(){var A=new V(z);return Object.defineProperty(W,M,{configurable:!0,enumerable:!0,value:A}),A}})}P("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:H.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),P("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:H.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),P("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:H.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),P("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:H.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"]}),P("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:H.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"]}),P("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:H.sha256,gRed:!1,g:["9"]}),P("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:H.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var S;try{S=GV()}catch(M){S=void 0}P("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:H.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",S]})}),KV=G0((K,W)=>{var H=JZ(),T=MQ(),O=uU();function L(V){if(!(this instanceof L))return new L(V);this.hash=V.hash,this.predResist=!!V.predResist,this.outLen=this.hash.outSize,this.minEntropy=V.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var P=T.toArray(V.entropy,V.entropyEnc||"hex"),S=T.toArray(V.nonce,V.nonceEnc||"hex"),M=T.toArray(V.pers,V.persEnc||"hex");O(P.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(P,S,M)}W.exports=L,L.prototype._init=function(V,P,S){var M=V.concat(P).concat(S);this.K=Array(this.outLen/8),this.V=Array(this.outLen/8);for(var z=0;z<this.V.length;z++)this.K[z]=0,this.V[z]=1;this._update(M),this._reseed=1,this.reseedInterval=281474976710656},L.prototype._hmac=function(){return new H.hmac(this.hash,this.K)},L.prototype._update=function(V){var P=this._hmac().update(this.V).update([0]);if(V)P=P.update(V);if(this.K=P.digest(),this.V=this._hmac().update(this.V).digest(),!V)return;this.K=this._hmac().update(this.V).update([1]).update(V).digest(),this.V=this._hmac().update(this.V).digest()},L.prototype.reseed=function(V,P,S,M){if(typeof P!=="string")M=S,S=P,P=null;V=T.toArray(V,P),S=T.toArray(S,M),O(V.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(V.concat(S||[])),this._reseed=1},L.prototype.generate=function(V,P,S,M){if(this._reseed>this.reseedInterval)throw Error("Reseed is required");if(typeof P!=="string")M=S,S=P,P=null;if(S)S=T.toArray(S,M||"hex"),this._update(S);var z=[];while(z.length<V)this.V=this._hmac().update(this.V).digest(),z=z.concat(this.V);var A=z.slice(0,V);return this._update(S),this._reseed++,T.encode(A,P)}}),IV=G0((K,W)=>{var H=wU(),T=kU(),O=T.assert;function L(V,P){if(this.ec=V,this.priv=null,this.pub=null,P.priv)this._importPrivate(P.priv,P.privEnc);if(P.pub)this._importPublic(P.pub,P.pubEnc)}W.exports=L,L.fromPublic=function(V,P,S){if(P instanceof L)return P;return new L(V,{pub:P,pubEnc:S})},L.fromPrivate=function(V,P,S){if(P instanceof L)return P;return new L(V,{priv:P,privEnc:S})},L.prototype.validate=function(){var V=this.getPublic();if(V.isInfinity())return{result:!1,reason:"Invalid public key"};if(!V.validate())return{result:!1,reason:"Public key is not a point"};if(!V.mul(this.ec.curve.n).isInfinity())return{result:!1,reason:"Public key * N != O"};return{result:!0,reason:null}},L.prototype.getPublic=function(V,P){if(typeof V==="string")P=V,V=null;if(!this.pub)this.pub=this.ec.g.mul(this.priv);if(!P)return this.pub;return this.pub.encode(P,V)},L.prototype.getPrivate=function(V){if(V==="hex")return this.priv.toString(16,2);else return this.priv},L.prototype._importPrivate=function(V,P){this.priv=new H(V,P||16),this.priv=this.priv.umod(this.ec.curve.n)},L.prototype._importPublic=function(V,P){if(V.x||V.y){if(this.ec.curve.type==="mont")O(V.x,"Need x coordinate");else if(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")O(V.x&&V.y,"Need both x and y coordinate");this.pub=this.ec.curve.point(V.x,V.y);return}this.pub=this.ec.curve.decodePoint(V,P)},L.prototype.derive=function(V){if(!V.validate())O(V.validate(),"public point not validated");return V.mul(this.priv).getX()},L.prototype.sign=function(V,P,S){return this.ec.sign(V,this,P,S)},L.prototype.verify=function(V,P,S){return this.ec.verify(V,P,this,void 0,S)},L.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}}),$V=G0((K,W)=>{var H=wU(),T=kU(),O=T.assert;function L(z,A){if(z instanceof L)return z;if(this._importDER(z,A))return;if(O(z.r&&z.s,"Signature without r or s"),this.r=new H(z.r,16),this.s=new H(z.s,16),z.recoveryParam===void 0)this.recoveryParam=null;else this.recoveryParam=z.recoveryParam}W.exports=L;function V(){this.place=0}function P(z,A){var D=z[A.place++];if(!(D&128))return D;var R=D&15;if(R===0||R>4)return!1;if(z[A.place]===0)return!1;var q=0;for(var v=0,k=A.place;v<R;v++,k++)q<<=8,q|=z[k],q>>>=0;if(q<=127)return!1;return A.place=k,q}function S(z){var A=0,D=z.length-1;while(!z[A]&&!(z[A+1]&128)&&A<D)A++;if(A===0)return z;return z.slice(A)}L.prototype._importDER=function(z,A){z=T.toArray(z,A);var D=new V;if(z[D.place++]!==48)return!1;var R=P(z,D);if(R===!1)return!1;if(R+D.place!==z.length)return!1;if(z[D.place++]!==2)return!1;var q=P(z,D);if(q===!1)return!1;if((z[D.place]&128)!==0)return!1;var v=z.slice(D.place,q+D.place);if(D.place+=q,z[D.place++]!==2)return!1;var k=P(z,D);if(k===!1)return!1;if(z.length!==k+D.place)return!1;if((z[D.place]&128)!==0)return!1;var B=z.slice(D.place,k+D.place);if(v[0]===0)if(v[1]&128)v=v.slice(1);else return!1;if(B[0]===0)if(B[1]&128)B=B.slice(1);else return!1;return this.r=new H(v),this.s=new H(B),this.recoveryParam=null,!0};function M(z,A){if(A<128){z.push(A);return}var D=1+(Math.log(A)/Math.LN2>>>3);z.push(D|128);while(--D)z.push(A>>>(D<<3)&255);z.push(A)}L.prototype.toDER=function(z){var A=this.r.toArray(),D=this.s.toArray();if(A[0]&128)A=[0].concat(A);if(D[0]&128)D=[0].concat(D);A=S(A),D=S(D);while(!D[0]&&!(D[1]&128))D=D.slice(1);var R=[2];M(R,A.length),R=R.concat(A),R.push(2),M(R,D.length);var q=R.concat(D),v=[48];return M(v,q.length),v=v.concat(q),T.encode(v,z)}}),WV=G0((K,W)=>{var H=wU(),T=KV(),O=kU(),L=VZ(),V=LQ(),P=O.assert,S=IV(),M=$V();function z(A){if(!(this instanceof z))return new z(A);if(typeof A==="string")P(Object.prototype.hasOwnProperty.call(L,A),"Unknown curve "+A),A=L[A];if(A instanceof L.PresetCurve)A={curve:A};this.curve=A.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=A.curve.g,this.g.precompute(A.curve.n.bitLength()+1),this.hash=A.hash||A.curve.hash}W.exports=z,z.prototype.keyPair=function(A){return new S(this,A)},z.prototype.keyFromPrivate=function(A,D){return S.fromPrivate(this,A,D)},z.prototype.keyFromPublic=function(A,D){return S.fromPublic(this,A,D)},z.prototype.genKeyPair=function(A){if(!A)A={};var D=new T({hash:this.hash,pers:A.pers,persEnc:A.persEnc||"utf8",entropy:A.entropy||V(this.hash.hmacStrength),entropyEnc:A.entropy&&A.entropyEnc||"utf8",nonce:this.n.toArray()}),R=this.n.byteLength(),q=this.n.sub(new H(2));for(;;){var v=new H(D.generate(R));if(v.cmp(q)>0)continue;return v.iaddn(1),this.keyFromPrivate(v)}},z.prototype._truncateToN=function(A,D,R){var q;if(H.isBN(A)||typeof A==="number")A=new H(A,16),q=A.byteLength();else if(typeof A==="object")q=A.length,A=new H(A,16);else{var v=A.toString();q=v.length+1>>>1,A=new H(v,16)}if(typeof R!=="number")R=q*8;var k=R-this.n.bitLength();if(k>0)A=A.ushrn(k);if(!D&&A.cmp(this.n)>=0)return A.sub(this.n);else return A},z.prototype.sign=function(A,D,R,q){if(typeof R==="object")q=R,R=null;if(!q)q={};if(typeof A!=="string"&&typeof A!=="number"&&!H.isBN(A)){P(typeof A==="object"&&A&&typeof A.length==="number","Expected message to be an array-like, a hex string, or a BN instance"),P(A.length>>>0===A.length);for(var v=0;v<A.length;v++)P((A[v]&255)===A[v])}D=this.keyFromPrivate(D,R),A=this._truncateToN(A,!1,q.msgBitLength),P(!A.isNeg(),"Can not sign a negative message");var k=this.n.byteLength(),B=D.getPrivate().toArray("be",k),_=A.toArray("be",k);P(new H(_).eq(A),"Can not sign message");var x=new T({hash:this.hash,entropy:B,nonce:_,pers:q.pers,persEnc:q.persEnc||"utf8"}),w=this.n.sub(new H(1));for(var y=0;;y++){var l=q.k?q.k(y):new H(x.generate(this.n.byteLength()));if(l=this._truncateToN(l,!0),l.cmpn(1)<=0||l.cmp(w)>=0)continue;var J0=this.g.mul(l);if(J0.isInfinity())continue;var K0=J0.getX(),V0=K0.umod(this.n);if(V0.cmpn(0)===0)continue;var u=l.invm(this.n).mul(V0.mul(D.getPrivate()).iadd(A));if(u=u.umod(this.n),u.cmpn(0)===0)continue;var X0=(J0.getY().isOdd()?1:0)|(K0.cmp(V0)!==0?2:0);if(q.canonical&&u.cmp(this.nh)>0)u=this.n.sub(u),X0^=1;return new M({r:V0,s:u,recoveryParam:X0})}},z.prototype.verify=function(A,D,R,q,v){if(!v)v={};A=this._truncateToN(A,!1,v.msgBitLength),R=this.keyFromPublic(R,q),D=new M(D,"hex");var{r:k,s:B}=D;if(k.cmpn(1)<0||k.cmp(this.n)>=0)return!1;if(B.cmpn(1)<0||B.cmp(this.n)>=0)return!1;var _=B.invm(this.n),x=_.mul(A).umod(this.n),w=_.mul(k).umod(this.n),y;if(!this.curve._maxwellTrick){if(y=this.g.mulAdd(x,R.getPublic(),w),y.isInfinity())return!1;return y.getX().umod(this.n).cmp(k)===0}if(y=this.g.jmulAdd(x,R.getPublic(),w),y.isInfinity())return!1;return y.eqXToP(k)},z.prototype.recoverPubKey=function(A,D,R,q){P((3&R)===R,"The recovery param is more than two bits"),D=new M(D,q);var v=this.n,k=new H(A),B=D.r,_=D.s,x=R&1,w=R>>1;if(B.cmp(this.curve.p.umod(this.curve.n))>=0&&w)throw Error("Unable to find sencond key candinate");if(w)B=this.curve.pointFromX(B.add(this.curve.n),x);else B=this.curve.pointFromX(B,x);var y=D.r.invm(v),l=v.sub(k).mul(y).umod(v),J0=_.mul(y).umod(v);return this.g.mulAdd(l,B,J0)},z.prototype.getKeyRecoveryParam=function(A,D,R,q){if(D=new M(D,q),D.recoveryParam!==null)return D.recoveryParam;for(var v=0;v<4;v++){var k;try{k=this.recoverPubKey(A,D,v)}catch(B){continue}if(k.eq(R))return v}throw Error("Unable to find valid recovery factor")}}),FV=G0((K,W)=>{var H=kU(),T=H.assert,O=H.parseBytes,L=H.cachedProperty;function V(P,S){if(this.eddsa=P,this._secret=O(S.secret),P.isPoint(S.pub))this._pub=S.pub;else this._pubBytes=O(S.pub)}V.fromPublic=function(P,S){if(S instanceof V)return S;return new V(P,{pub:S})},V.fromSecret=function(P,S){if(S instanceof V)return S;return new V(P,{secret:S})},V.prototype.secret=function(){return this._secret},L(V,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),L(V,"pub",function(){if(this._pubBytes)return this.eddsa.decodePoint(this._pubBytes);return this.eddsa.g.mul(this.priv())}),L(V,"privBytes",function(){var P=this.eddsa,S=this.hash(),M=P.encodingLength-1,z=S.slice(0,P.encodingLength);return z[0]&=248,z[M]&=127,z[M]|=64,z}),L(V,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),L(V,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),L(V,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),V.prototype.sign=function(P){return T(this._secret,"KeyPair can only verify"),this.eddsa.sign(P,this)},V.prototype.verify=function(P,S){return this.eddsa.verify(P,S,this)},V.prototype.getSecret=function(P){return T(this._secret,"KeyPair is public only"),H.encode(this.secret(),P)},V.prototype.getPublic=function(P){return H.encode(this.pubBytes(),P)},W.exports=V}),HV=G0((K,W)=>{var H=wU(),T=kU(),O=T.assert,L=T.cachedProperty,V=T.parseBytes;function P(S,M){if(this.eddsa=S,typeof M!=="object")M=V(M);if(Array.isArray(M))O(M.length===S.encodingLength*2,"Signature has invalid size"),M={R:M.slice(0,S.encodingLength),S:M.slice(S.encodingLength)};if(O(M.R&&M.S,"Signature without R or S"),S.isPoint(M.R))this._R=M.R;if(M.S instanceof H)this._S=M.S;this._Rencoded=Array.isArray(M.R)?M.R:M.Rencoded,this._Sencoded=Array.isArray(M.S)?M.S:M.Sencoded}L(P,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),L(P,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),L(P,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),L(P,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),P.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},P.prototype.toHex=function(){return T.encode(this.toBytes(),"hex").toUpperCase()},W.exports=P}),OV=G0((K,W)=>{var H=JZ(),T=VZ(),O=kU(),L=O.assert,V=O.parseBytes,P=FV(),S=HV();function M(z){if(L(z==="ed25519","only tested with ed25519 so far"),!(this instanceof M))return new M(z);z=T[z].curve,this.curve=z,this.g=z.g,this.g.precompute(z.n.bitLength()+1),this.pointClass=z.point().constructor,this.encodingLength=Math.ceil(z.n.bitLength()/8),this.hash=H.sha512}W.exports=M,M.prototype.sign=function(z,A){z=V(z);var D=this.keyFromSecret(A),R=this.hashInt(D.messagePrefix(),z),q=this.g.mul(R),v=this.encodePoint(q),k=this.hashInt(v,D.pubBytes(),z).mul(D.priv()),B=R.add(k).umod(this.curve.n);return this.makeSignature({R:q,S:B,Rencoded:v})},M.prototype.verify=function(z,A,D){if(z=V(z),A=this.makeSignature(A),A.S().gte(A.eddsa.curve.n)||A.S().isNeg())return!1;var R=this.keyFromPublic(D),q=this.hashInt(A.Rencoded(),R.pubBytes(),z),v=this.g.mul(A.S()),k=A.R().add(R.pub().mul(q));return k.eq(v)},M.prototype.hashInt=function(){var z=this.hash();for(var A=0;A<arguments.length;A++)z.update(arguments[A]);return O.intFromLE(z.digest()).umod(this.curve.n)},M.prototype.keyFromPublic=function(z){return P.fromPublic(this,z)},M.prototype.keyFromSecret=function(z){return P.fromSecret(this,z)},M.prototype.makeSignature=function(z){if(z instanceof S)return z;return new S(this,z)},M.prototype.encodePoint=function(z){var A=z.getY().toArray("le",this.encodingLength);return A[this.encodingLength-1]|=z.getX().isOdd()?128:0,A},M.prototype.decodePoint=function(z){z=O.parseBytes(z);var A=z.length-1,D=z.slice(0,A).concat(z[A]&-129),R=(z[A]&128)!==0,q=O.intFromLE(D);return this.curve.pointFromY(q,R)},M.prototype.encodeInt=function(z){return z.toArray("le",this.encodingLength)},M.prototype.decodeInt=function(z){return O.intFromLE(z)},M.prototype.isPoint=function(z){return z instanceof this.pointClass}}),AV=G0((K)=>{var W=K;W.version=rJ().version,W.utils=kU(),W.rand=LQ(),W.curve=EQ(),W.curves=VZ(),W.ec=WV(),W.eddsa=OV()}),CV=G0((K,W)=>{(function(H,T){function O(U,Q){if(!U)throw Error(Q||"Assertion failed")}function L(U,Q){U.super_=Q;var J=function(){};J.prototype=Q.prototype,U.prototype=new J,U.prototype.constructor=U}function V(U,Q,J){if(V.isBN(U))return U;if(this.negative=0,this.words=null,this.length=0,this.red=null,U!==null){if(Q==="le"||Q==="be")J=Q,Q=10;this._init(U||0,Q||10,J||"be")}}if(typeof H==="object")H.exports=V;else T.BN=V;V.BN=V,V.wordSize=26;var P;try{if(typeof window<"u"&&typeof window.Buffer<"u")P=window.Buffer;else P=(OU(),h0(HU)).Buffer}catch(U){}V.isBN=function(U){if(U instanceof V)return!0;return U!==null&&typeof U==="object"&&U.constructor.wordSize===V.wordSize&&Array.isArray(U.words)},V.max=function(U,Q){if(U.cmp(Q)>0)return U;return Q},V.min=function(U,Q){if(U.cmp(Q)<0)return U;return Q},V.prototype._init=function(U,Q,J){if(typeof U==="number")return this._initNumber(U,Q,J);if(typeof U==="object")return this._initArray(U,Q,J);if(Q==="hex")Q=16;O(Q===(Q|0)&&Q>=2&&Q<=36),U=U.toString().replace(/\s+/g,"");var Z=0;if(U[0]==="-")Z++,this.negative=1;if(Z<U.length){if(Q===16)this._parseHex(U,Z,J);else if(this._parseBase(U,Q,Z),J==="le")this._initArray(this.toArray(),Q,J)}},V.prototype._initNumber=function(U,Q,J){if(U<0)this.negative=1,U=-U;if(U<67108864)this.words=[U&67108863],this.length=1;else if(U<4503599627370496)this.words=[U&67108863,U/67108864&67108863],this.length=2;else O(U<9007199254740992),this.words=[U&67108863,U/67108864&67108863,1],this.length=3;if(J!=="le")return;this._initArray(this.toArray(),Q,J)},V.prototype._initArray=function(U,Q,J){if(O(typeof U.length==="number"),U.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(U.length/3),this.words=Array(this.length);for(var Z=0;Z<this.length;Z++)this.words[Z]=0;var Y,$,F=0;if(J==="be"){for(Z=U.length-1,Y=0;Z>=0;Z-=3)if($=U[Z]|U[Z-1]<<8|U[Z-2]<<16,this.words[Y]|=$<<F&67108863,this.words[Y+1]=$>>>26-F&67108863,F+=24,F>=26)F-=26,Y++}else if(J==="le"){for(Z=0,Y=0;Z<U.length;Z+=3)if($=U[Z]|U[Z+1]<<8|U[Z+2]<<16,this.words[Y]|=$<<F&67108863,this.words[Y+1]=$>>>26-F&67108863,F+=24,F>=26)F-=26,Y++}return this.strip()};function S(U,Q){var J=U.charCodeAt(Q);if(J>=65&&J<=70)return J-55;else if(J>=97&&J<=102)return J-87;else return J-48&15}function M(U,Q,J){var Z=S(U,J);if(J-1>=Q)Z|=S(U,J-1)<<4;return Z}V.prototype._parseHex=function(U,Q,J){this.length=Math.ceil((U.length-Q)/6),this.words=Array(this.length);for(var Z=0;Z<this.length;Z++)this.words[Z]=0;var Y=0,$=0,F;if(J==="be")for(Z=U.length-1;Z>=Q;Z-=2)if(F=M(U,Q,Z)<<Y,this.words[$]|=F&67108863,Y>=18)Y-=18,$+=1,this.words[$]|=F>>>26;else Y+=8;else{var G=U.length-Q;for(Z=G%2===0?Q+1:Q;Z<U.length;Z+=2)if(F=M(U,Q,Z)<<Y,this.words[$]|=F&67108863,Y>=18)Y-=18,$+=1,this.words[$]|=F>>>26;else Y+=8}this.strip()};function z(U,Q,J,Z){var Y=0,$=Math.min(U.length,J);for(var F=Q;F<$;F++){var G=U.charCodeAt(F)-48;if(Y*=Z,G>=49)Y+=G-49+10;else if(G>=17)Y+=G-17+10;else Y+=G}return Y}V.prototype._parseBase=function(U,Q,J){this.words=[0],this.length=1;for(var Z=0,Y=1;Y<=67108863;Y*=Q)Z++;Z--,Y=Y/Q|0;var $=U.length-J,F=$%Z,G=Math.min($,$-F)+J,X=0;for(var I=J;I<G;I+=Z)if(X=z(U,I,I+Z,Q),this.imuln(Y),this.words[0]+X<67108864)this.words[0]+=X;else this._iaddn(X);if(F!==0){var E=1;X=z(U,I,U.length,Q);for(I=0;I<F;I++)E*=Q;if(this.imuln(E),this.words[0]+X<67108864)this.words[0]+=X;else this._iaddn(X)}this.strip()},V.prototype.copy=function(U){U.words=Array(this.length);for(var Q=0;Q<this.length;Q++)U.words[Q]=this.words[Q];U.length=this.length,U.negative=this.negative,U.red=this.red},V.prototype.clone=function(){var U=new V(null);return this.copy(U),U},V.prototype._expand=function(U){while(this.length<U)this.words[this.length++]=0;return this},V.prototype.strip=function(){while(this.length>1&&this.words[this.length-1]===0)this.length--;return this._normSign()},V.prototype._normSign=function(){if(this.length===1&&this.words[0]===0)this.negative=0;return this},V.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var A=["","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"],D=[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],R=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];if(V.prototype.toString=function(U,Q){U=U||10,Q=Q|0||1;var J;if(U===16||U==="hex"){J="";var Z=0,Y=0;for(var $=0;$<this.length;$++){var F=this.words[$],G=((F<<Z|Y)&16777215).toString(16);if(Y=F>>>24-Z&16777215,Z+=2,Z>=26)Z-=26,$--;if(Y!==0||$!==this.length-1)J=A[6-G.length]+G+J;else J=G+J}if(Y!==0)J=Y.toString(16)+J;while(J.length%Q!==0)J="0"+J;if(this.negative!==0)J="-"+J;return J}if(U===(U|0)&&U>=2&&U<=36){var X=D[U],I=R[U];J="";var E=this.clone();E.negative=0;while(!E.isZero()){var C=E.modn(I).toString(U);if(E=E.idivn(I),!E.isZero())J=A[X-C.length]+C+J;else J=C+J}if(this.isZero())J="0"+J;while(J.length%Q!==0)J="0"+J;if(this.negative!==0)J="-"+J;return J}O(!1,"Base should be between 2 and 36")},V.prototype.toNumber=function(){var U=this.words[0];if(this.length===2)U+=this.words[1]*67108864;else if(this.length===3&&this.words[2]===1)U+=4503599627370496+this.words[1]*67108864;else if(this.length>2)O(!1,"Number can only safely store up to 53 bits");return this.negative!==0?-U:U},V.prototype.toJSON=function(){return this.toString(16)},V.prototype.toBuffer=function(U,Q){return O(typeof P<"u"),this.toArrayLike(P,U,Q)},V.prototype.toArray=function(U,Q){return this.toArrayLike(Array,U,Q)},V.prototype.toArrayLike=function(U,Q,J){var Z=this.byteLength(),Y=J||Math.max(1,Z);O(Z<=Y,"byte array longer than desired length"),O(Y>0,"Requested array length <= 0"),this.strip();var $=Q==="le",F=new U(Y),G,X,I=this.clone();if(!$){for(X=0;X<Y-Z;X++)F[X]=0;for(X=0;!I.isZero();X++)G=I.andln(255),I.iushrn(8),F[Y-X-1]=G}else{for(X=0;!I.isZero();X++)G=I.andln(255),I.iushrn(8),F[X]=G;for(;X<Y;X++)F[X]=0}return F},Math.clz32)V.prototype._countBits=function(U){return 32-Math.clz32(U)};else V.prototype._countBits=function(U){var Q=U,J=0;if(Q>=4096)J+=13,Q>>>=13;if(Q>=64)J+=7,Q>>>=7;if(Q>=8)J+=4,Q>>>=4;if(Q>=2)J+=2,Q>>>=2;return J+Q};V.prototype._zeroBits=function(U){if(U===0)return 26;var Q=U,J=0;if((Q&8191)===0)J+=13,Q>>>=13;if((Q&127)===0)J+=7,Q>>>=7;if((Q&15)===0)J+=4,Q>>>=4;if((Q&3)===0)J+=2,Q>>>=2;if((Q&1)===0)J++;return J},V.prototype.bitLength=function(){var U=this.words[this.length-1],Q=this._countBits(U);return(this.length-1)*26+Q};function q(U){var Q=Array(U.bitLength());for(var J=0;J<Q.length;J++){var Z=J/26|0,Y=J%26;Q[J]=(U.words[Z]&1<<Y)>>>Y}return Q}V.prototype.zeroBits=function(){if(this.isZero())return 0;var U=0;for(var Q=0;Q<this.length;Q++){var J=this._zeroBits(this.words[Q]);if(U+=J,J!==26)break}return U},V.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},V.prototype.toTwos=function(U){if(this.negative!==0)return this.abs().inotn(U).iaddn(1);return this.clone()},V.prototype.fromTwos=function(U){if(this.testn(U-1))return this.notn(U).iaddn(1).ineg();return this.clone()},V.prototype.isNeg=function(){return this.negative!==0},V.prototype.neg=function(){return this.clone().ineg()},V.prototype.ineg=function(){if(!this.isZero())this.negative^=1;return this},V.prototype.iuor=function(U){while(this.length<U.length)this.words[this.length++]=0;for(var Q=0;Q<U.length;Q++)this.words[Q]=this.words[Q]|U.words[Q];return this.strip()},V.prototype.ior=function(U){return O((this.negative|U.negative)===0),this.iuor(U)},V.prototype.or=function(U){if(this.length>U.length)return this.clone().ior(U);return U.clone().ior(this)},V.prototype.uor=function(U){if(this.length>U.length)return this.clone().iuor(U);return U.clone().iuor(this)},V.prototype.iuand=function(U){var Q;if(this.length>U.length)Q=U;else Q=this;for(var J=0;J<Q.length;J++)this.words[J]=this.words[J]&U.words[J];return this.length=Q.length,this.strip()},V.prototype.iand=function(U){return O((this.negative|U.negative)===0),this.iuand(U)},V.prototype.and=function(U){if(this.length>U.length)return this.clone().iand(U);return U.clone().iand(this)},V.prototype.uand=function(U){if(this.length>U.length)return this.clone().iuand(U);return U.clone().iuand(this)},V.prototype.iuxor=function(U){var Q,J;if(this.length>U.length)Q=this,J=U;else Q=U,J=this;for(var Z=0;Z<J.length;Z++)this.words[Z]=Q.words[Z]^J.words[Z];if(this!==Q)for(;Z<Q.length;Z++)this.words[Z]=Q.words[Z];return this.length=Q.length,this.strip()},V.prototype.ixor=function(U){return O((this.negative|U.negative)===0),this.iuxor(U)},V.prototype.xor=function(U){if(this.length>U.length)return this.clone().ixor(U);return U.clone().ixor(this)},V.prototype.uxor=function(U){if(this.length>U.length)return this.clone().iuxor(U);return U.clone().iuxor(this)},V.prototype.inotn=function(U){O(typeof U==="number"&&U>=0);var Q=Math.ceil(U/26)|0,J=U%26;if(this._expand(Q),J>0)Q--;for(var Z=0;Z<Q;Z++)this.words[Z]=~this.words[Z]&67108863;if(J>0)this.words[Z]=~this.words[Z]&67108863>>26-J;return this.strip()},V.prototype.notn=function(U){return this.clone().inotn(U)},V.prototype.setn=function(U,Q){O(typeof U==="number"&&U>=0);var J=U/26|0,Z=U%26;if(this._expand(J+1),Q)this.words[J]=this.words[J]|1<<Z;else this.words[J]=this.words[J]&~(1<<Z);return this.strip()},V.prototype.iadd=function(U){var Q;if(this.negative!==0&&U.negative===0)return this.negative=0,Q=this.isub(U),this.negative^=1,this._normSign();else if(this.negative===0&&U.negative!==0)return U.negative=0,Q=this.isub(U),U.negative=1,Q._normSign();var J,Z;if(this.length>U.length)J=this,Z=U;else J=U,Z=this;var Y=0;for(var $=0;$<Z.length;$++)Q=(J.words[$]|0)+(Z.words[$]|0)+Y,this.words[$]=Q&67108863,Y=Q>>>26;for(;Y!==0&&$<J.length;$++)Q=(J.words[$]|0)+Y,this.words[$]=Q&67108863,Y=Q>>>26;if(this.length=J.length,Y!==0)this.words[this.length]=Y,this.length++;else if(J!==this)for(;$<J.length;$++)this.words[$]=J.words[$];return this},V.prototype.add=function(U){var Q;if(U.negative!==0&&this.negative===0)return U.negative=0,Q=this.sub(U),U.negative^=1,Q;else if(U.negative===0&&this.negative!==0)return this.negative=0,Q=U.sub(this),this.negative=1,Q;if(this.length>U.length)return this.clone().iadd(U);return U.clone().iadd(this)},V.prototype.isub=function(U){if(U.negative!==0){U.negative=0;var Q=this.iadd(U);return U.negative=1,Q._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(U),this.negative=1,this._normSign();var J=this.cmp(U);if(J===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Z,Y;if(J>0)Z=this,Y=U;else Z=U,Y=this;var $=0;for(var F=0;F<Y.length;F++)Q=(Z.words[F]|0)-(Y.words[F]|0)+$,$=Q>>26,this.words[F]=Q&67108863;for(;$!==0&&F<Z.length;F++)Q=(Z.words[F]|0)+$,$=Q>>26,this.words[F]=Q&67108863;if($===0&&F<Z.length&&Z!==this)for(;F<Z.length;F++)this.words[F]=Z.words[F];if(this.length=Math.max(this.length,F),Z!==this)this.negative=1;return this.strip()},V.prototype.sub=function(U){return this.clone().isub(U)};function v(U,Q,J){J.negative=Q.negative^U.negative;var Z=U.length+Q.length|0;J.length=Z,Z=Z-1|0;var Y=U.words[0]|0,$=Q.words[0]|0,F=Y*$,G=F&67108863,X=F/67108864|0;J.words[0]=G;for(var I=1;I<Z;I++){var E=X>>>26,C=X&67108863,j=Math.min(I,Q.length-1);for(var g=Math.max(0,I-U.length+1);g<=j;g++){var p=I-g|0;Y=U.words[p]|0,$=Q.words[g]|0,F=Y*$+C,E+=F/67108864|0,C=F&67108863}J.words[I]=C|0,X=E|0}if(X!==0)J.words[I]=X|0;else J.length--;return J.strip()}var k=function(U,Q,J){var Z=U.words,Y=Q.words,$=J.words,F=0,G,X,I,E=Z[0]|0,C=E&8191,j=E>>>13,g=Z[1]|0,p=g&8191,n=g>>>13,$0=Z[2]|0,r=$0&8191,d=$0>>>13,Q0=Z[3]|0,m=Q0&8191,i=Q0>>>13,g0=Z[4]|0,f=g0&8191,h=g0>>>13,Y0=Z[5]|0,t=Y0&8191,e=Y0>>>13,M0=Z[6]|0,c=M0&8191,o=M0>>>13,N0=Z[7]|0,s=N0&8191,Z0=N0>>>13,y0=Z[8]|0,H0=y0&8191,O0=y0>>>13,n0=Z[9]|0,W0=n0&8191,A0=n0>>>13,t0=Y[0]|0,D0=t0&8191,T0=t0>>>13,TU=Y[1]|0,L0=TU&8191,k0=TU>>>13,DU=Y[2]|0,j0=DU&8191,E0=DU>>>13,AU=Y[3]|0,v0=AU&8191,R0=AU>>>13,$U=Y[4]|0,_0=$U&8191,B0=$U>>>13,WU=Y[5]|0,q0=WU&8191,N=WU>>>13,b=Y[6]|0,a=b&8191,U0=b>>>13,w0=Y[7]|0,F0=w0&8191,C0=w0>>>13,m0=Y[8]|0,S0=m0&8191,x0=m0>>>13,CU=Y[9]|0,P0=CU&8191,z0=CU>>>13;J.negative=U.negative^Q.negative,J.length=19,G=Math.imul(C,D0),X=Math.imul(C,T0),X=X+Math.imul(j,D0)|0,I=Math.imul(j,T0);var s0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(s0>>>26)|0,s0&=67108863,G=Math.imul(p,D0),X=Math.imul(p,T0),X=X+Math.imul(n,D0)|0,I=Math.imul(n,T0),G=G+Math.imul(C,L0)|0,X=X+Math.imul(C,k0)|0,X=X+Math.imul(j,L0)|0,I=I+Math.imul(j,k0)|0;var c0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(c0>>>26)|0,c0&=67108863,G=Math.imul(r,D0),X=Math.imul(r,T0),X=X+Math.imul(d,D0)|0,I=Math.imul(d,T0),G=G+Math.imul(p,L0)|0,X=X+Math.imul(p,k0)|0,X=X+Math.imul(n,L0)|0,I=I+Math.imul(n,k0)|0,G=G+Math.imul(C,j0)|0,X=X+Math.imul(C,E0)|0,X=X+Math.imul(j,j0)|0,I=I+Math.imul(j,E0)|0;var f0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(f0>>>26)|0,f0&=67108863,G=Math.imul(m,D0),X=Math.imul(m,T0),X=X+Math.imul(i,D0)|0,I=Math.imul(i,T0),G=G+Math.imul(r,L0)|0,X=X+Math.imul(r,k0)|0,X=X+Math.imul(d,L0)|0,I=I+Math.imul(d,k0)|0,G=G+Math.imul(p,j0)|0,X=X+Math.imul(p,E0)|0,X=X+Math.imul(n,j0)|0,I=I+Math.imul(n,E0)|0,G=G+Math.imul(C,v0)|0,X=X+Math.imul(C,R0)|0,X=X+Math.imul(j,v0)|0,I=I+Math.imul(j,R0)|0;var d0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(d0>>>26)|0,d0&=67108863,G=Math.imul(f,D0),X=Math.imul(f,T0),X=X+Math.imul(h,D0)|0,I=Math.imul(h,T0),G=G+Math.imul(m,L0)|0,X=X+Math.imul(m,k0)|0,X=X+Math.imul(i,L0)|0,I=I+Math.imul(i,k0)|0,G=G+Math.imul(r,j0)|0,X=X+Math.imul(r,E0)|0,X=X+Math.imul(d,j0)|0,I=I+Math.imul(d,E0)|0,G=G+Math.imul(p,v0)|0,X=X+Math.imul(p,R0)|0,X=X+Math.imul(n,v0)|0,I=I+Math.imul(n,R0)|0,G=G+Math.imul(C,_0)|0,X=X+Math.imul(C,B0)|0,X=X+Math.imul(j,_0)|0,I=I+Math.imul(j,B0)|0;var b0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(b0>>>26)|0,b0&=67108863,G=Math.imul(t,D0),X=Math.imul(t,T0),X=X+Math.imul(e,D0)|0,I=Math.imul(e,T0),G=G+Math.imul(f,L0)|0,X=X+Math.imul(f,k0)|0,X=X+Math.imul(h,L0)|0,I=I+Math.imul(h,k0)|0,G=G+Math.imul(m,j0)|0,X=X+Math.imul(m,E0)|0,X=X+Math.imul(i,j0)|0,I=I+Math.imul(i,E0)|0,G=G+Math.imul(r,v0)|0,X=X+Math.imul(r,R0)|0,X=X+Math.imul(d,v0)|0,I=I+Math.imul(d,R0)|0,G=G+Math.imul(p,_0)|0,X=X+Math.imul(p,B0)|0,X=X+Math.imul(n,_0)|0,I=I+Math.imul(n,B0)|0,G=G+Math.imul(C,q0)|0,X=X+Math.imul(C,N)|0,X=X+Math.imul(j,q0)|0,I=I+Math.imul(j,N)|0;var r0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(r0>>>26)|0,r0&=67108863,G=Math.imul(c,D0),X=Math.imul(c,T0),X=X+Math.imul(o,D0)|0,I=Math.imul(o,T0),G=G+Math.imul(t,L0)|0,X=X+Math.imul(t,k0)|0,X=X+Math.imul(e,L0)|0,I=I+Math.imul(e,k0)|0,G=G+Math.imul(f,j0)|0,X=X+Math.imul(f,E0)|0,X=X+Math.imul(h,j0)|0,I=I+Math.imul(h,E0)|0,G=G+Math.imul(m,v0)|0,X=X+Math.imul(m,R0)|0,X=X+Math.imul(i,v0)|0,I=I+Math.imul(i,R0)|0,G=G+Math.imul(r,_0)|0,X=X+Math.imul(r,B0)|0,X=X+Math.imul(d,_0)|0,I=I+Math.imul(d,B0)|0,G=G+Math.imul(p,q0)|0,X=X+Math.imul(p,N)|0,X=X+Math.imul(n,q0)|0,I=I+Math.imul(n,N)|0,G=G+Math.imul(C,a)|0,X=X+Math.imul(C,U0)|0,X=X+Math.imul(j,a)|0,I=I+Math.imul(j,U0)|0;var a0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(a0>>>26)|0,a0&=67108863,G=Math.imul(s,D0),X=Math.imul(s,T0),X=X+Math.imul(Z0,D0)|0,I=Math.imul(Z0,T0),G=G+Math.imul(c,L0)|0,X=X+Math.imul(c,k0)|0,X=X+Math.imul(o,L0)|0,I=I+Math.imul(o,k0)|0,G=G+Math.imul(t,j0)|0,X=X+Math.imul(t,E0)|0,X=X+Math.imul(e,j0)|0,I=I+Math.imul(e,E0)|0,G=G+Math.imul(f,v0)|0,X=X+Math.imul(f,R0)|0,X=X+Math.imul(h,v0)|0,I=I+Math.imul(h,R0)|0,G=G+Math.imul(m,_0)|0,X=X+Math.imul(m,B0)|0,X=X+Math.imul(i,_0)|0,I=I+Math.imul(i,B0)|0,G=G+Math.imul(r,q0)|0,X=X+Math.imul(r,N)|0,X=X+Math.imul(d,q0)|0,I=I+Math.imul(d,N)|0,G=G+Math.imul(p,a)|0,X=X+Math.imul(p,U0)|0,X=X+Math.imul(n,a)|0,I=I+Math.imul(n,U0)|0,G=G+Math.imul(C,F0)|0,X=X+Math.imul(C,C0)|0,X=X+Math.imul(j,F0)|0,I=I+Math.imul(j,C0)|0;var e0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(e0>>>26)|0,e0&=67108863,G=Math.imul(H0,D0),X=Math.imul(H0,T0),X=X+Math.imul(O0,D0)|0,I=Math.imul(O0,T0),G=G+Math.imul(s,L0)|0,X=X+Math.imul(s,k0)|0,X=X+Math.imul(Z0,L0)|0,I=I+Math.imul(Z0,k0)|0,G=G+Math.imul(c,j0)|0,X=X+Math.imul(c,E0)|0,X=X+Math.imul(o,j0)|0,I=I+Math.imul(o,E0)|0,G=G+Math.imul(t,v0)|0,X=X+Math.imul(t,R0)|0,X=X+Math.imul(e,v0)|0,I=I+Math.imul(e,R0)|0,G=G+Math.imul(f,_0)|0,X=X+Math.imul(f,B0)|0,X=X+Math.imul(h,_0)|0,I=I+Math.imul(h,B0)|0,G=G+Math.imul(m,q0)|0,X=X+Math.imul(m,N)|0,X=X+Math.imul(i,q0)|0,I=I+Math.imul(i,N)|0,G=G+Math.imul(r,a)|0,X=X+Math.imul(r,U0)|0,X=X+Math.imul(d,a)|0,I=I+Math.imul(d,U0)|0,G=G+Math.imul(p,F0)|0,X=X+Math.imul(p,C0)|0,X=X+Math.imul(n,F0)|0,I=I+Math.imul(n,C0)|0,G=G+Math.imul(C,S0)|0,X=X+Math.imul(C,x0)|0,X=X+Math.imul(j,S0)|0,I=I+Math.imul(j,x0)|0;var i0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(i0>>>26)|0,i0&=67108863,G=Math.imul(W0,D0),X=Math.imul(W0,T0),X=X+Math.imul(A0,D0)|0,I=Math.imul(A0,T0),G=G+Math.imul(H0,L0)|0,X=X+Math.imul(H0,k0)|0,X=X+Math.imul(O0,L0)|0,I=I+Math.imul(O0,k0)|0,G=G+Math.imul(s,j0)|0,X=X+Math.imul(s,E0)|0,X=X+Math.imul(Z0,j0)|0,I=I+Math.imul(Z0,E0)|0,G=G+Math.imul(c,v0)|0,X=X+Math.imul(c,R0)|0,X=X+Math.imul(o,v0)|0,I=I+Math.imul(o,R0)|0,G=G+Math.imul(t,_0)|0,X=X+Math.imul(t,B0)|0,X=X+Math.imul(e,_0)|0,I=I+Math.imul(e,B0)|0,G=G+Math.imul(f,q0)|0,X=X+Math.imul(f,N)|0,X=X+Math.imul(h,q0)|0,I=I+Math.imul(h,N)|0,G=G+Math.imul(m,a)|0,X=X+Math.imul(m,U0)|0,X=X+Math.imul(i,a)|0,I=I+Math.imul(i,U0)|0,G=G+Math.imul(r,F0)|0,X=X+Math.imul(r,C0)|0,X=X+Math.imul(d,F0)|0,I=I+Math.imul(d,C0)|0,G=G+Math.imul(p,S0)|0,X=X+Math.imul(p,x0)|0,X=X+Math.imul(n,S0)|0,I=I+Math.imul(n,x0)|0,G=G+Math.imul(C,P0)|0,X=X+Math.imul(C,z0)|0,X=X+Math.imul(j,P0)|0,I=I+Math.imul(j,z0)|0;var UU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(UU>>>26)|0,UU&=67108863,G=Math.imul(W0,L0),X=Math.imul(W0,k0),X=X+Math.imul(A0,L0)|0,I=Math.imul(A0,k0),G=G+Math.imul(H0,j0)|0,X=X+Math.imul(H0,E0)|0,X=X+Math.imul(O0,j0)|0,I=I+Math.imul(O0,E0)|0,G=G+Math.imul(s,v0)|0,X=X+Math.imul(s,R0)|0,X=X+Math.imul(Z0,v0)|0,I=I+Math.imul(Z0,R0)|0,G=G+Math.imul(c,_0)|0,X=X+Math.imul(c,B0)|0,X=X+Math.imul(o,_0)|0,I=I+Math.imul(o,B0)|0,G=G+Math.imul(t,q0)|0,X=X+Math.imul(t,N)|0,X=X+Math.imul(e,q0)|0,I=I+Math.imul(e,N)|0,G=G+Math.imul(f,a)|0,X=X+Math.imul(f,U0)|0,X=X+Math.imul(h,a)|0,I=I+Math.imul(h,U0)|0,G=G+Math.imul(m,F0)|0,X=X+Math.imul(m,C0)|0,X=X+Math.imul(i,F0)|0,I=I+Math.imul(i,C0)|0,G=G+Math.imul(r,S0)|0,X=X+Math.imul(r,x0)|0,X=X+Math.imul(d,S0)|0,I=I+Math.imul(d,x0)|0,G=G+Math.imul(p,P0)|0,X=X+Math.imul(p,z0)|0,X=X+Math.imul(n,P0)|0,I=I+Math.imul(n,z0)|0;var XU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(XU>>>26)|0,XU&=67108863,G=Math.imul(W0,j0),X=Math.imul(W0,E0),X=X+Math.imul(A0,j0)|0,I=Math.imul(A0,E0),G=G+Math.imul(H0,v0)|0,X=X+Math.imul(H0,R0)|0,X=X+Math.imul(O0,v0)|0,I=I+Math.imul(O0,R0)|0,G=G+Math.imul(s,_0)|0,X=X+Math.imul(s,B0)|0,X=X+Math.imul(Z0,_0)|0,I=I+Math.imul(Z0,B0)|0,G=G+Math.imul(c,q0)|0,X=X+Math.imul(c,N)|0,X=X+Math.imul(o,q0)|0,I=I+Math.imul(o,N)|0,G=G+Math.imul(t,a)|0,X=X+Math.imul(t,U0)|0,X=X+Math.imul(e,a)|0,I=I+Math.imul(e,U0)|0,G=G+Math.imul(f,F0)|0,X=X+Math.imul(f,C0)|0,X=X+Math.imul(h,F0)|0,I=I+Math.imul(h,C0)|0,G=G+Math.imul(m,S0)|0,X=X+Math.imul(m,x0)|0,X=X+Math.imul(i,S0)|0,I=I+Math.imul(i,x0)|0,G=G+Math.imul(r,P0)|0,X=X+Math.imul(r,z0)|0,X=X+Math.imul(d,P0)|0,I=I+Math.imul(d,z0)|0;var ZU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(ZU>>>26)|0,ZU&=67108863,G=Math.imul(W0,v0),X=Math.imul(W0,R0),X=X+Math.imul(A0,v0)|0,I=Math.imul(A0,R0),G=G+Math.imul(H0,_0)|0,X=X+Math.imul(H0,B0)|0,X=X+Math.imul(O0,_0)|0,I=I+Math.imul(O0,B0)|0,G=G+Math.imul(s,q0)|0,X=X+Math.imul(s,N)|0,X=X+Math.imul(Z0,q0)|0,I=I+Math.imul(Z0,N)|0,G=G+Math.imul(c,a)|0,X=X+Math.imul(c,U0)|0,X=X+Math.imul(o,a)|0,I=I+Math.imul(o,U0)|0,G=G+Math.imul(t,F0)|0,X=X+Math.imul(t,C0)|0,X=X+Math.imul(e,F0)|0,I=I+Math.imul(e,C0)|0,G=G+Math.imul(f,S0)|0,X=X+Math.imul(f,x0)|0,X=X+Math.imul(h,S0)|0,I=I+Math.imul(h,x0)|0,G=G+Math.imul(m,P0)|0,X=X+Math.imul(m,z0)|0,X=X+Math.imul(i,P0)|0,I=I+Math.imul(i,z0)|0;var QU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(QU>>>26)|0,QU&=67108863,G=Math.imul(W0,_0),X=Math.imul(W0,B0),X=X+Math.imul(A0,_0)|0,I=Math.imul(A0,B0),G=G+Math.imul(H0,q0)|0,X=X+Math.imul(H0,N)|0,X=X+Math.imul(O0,q0)|0,I=I+Math.imul(O0,N)|0,G=G+Math.imul(s,a)|0,X=X+Math.imul(s,U0)|0,X=X+Math.imul(Z0,a)|0,I=I+Math.imul(Z0,U0)|0,G=G+Math.imul(c,F0)|0,X=X+Math.imul(c,C0)|0,X=X+Math.imul(o,F0)|0,I=I+Math.imul(o,C0)|0,G=G+Math.imul(t,S0)|0,X=X+Math.imul(t,x0)|0,X=X+Math.imul(e,S0)|0,I=I+Math.imul(e,x0)|0,G=G+Math.imul(f,P0)|0,X=X+Math.imul(f,z0)|0,X=X+Math.imul(h,P0)|0,I=I+Math.imul(h,z0)|0;var YU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(YU>>>26)|0,YU&=67108863,G=Math.imul(W0,q0),X=Math.imul(W0,N),X=X+Math.imul(A0,q0)|0,I=Math.imul(A0,N),G=G+Math.imul(H0,a)|0,X=X+Math.imul(H0,U0)|0,X=X+Math.imul(O0,a)|0,I=I+Math.imul(O0,U0)|0,G=G+Math.imul(s,F0)|0,X=X+Math.imul(s,C0)|0,X=X+Math.imul(Z0,F0)|0,I=I+Math.imul(Z0,C0)|0,G=G+Math.imul(c,S0)|0,X=X+Math.imul(c,x0)|0,X=X+Math.imul(o,S0)|0,I=I+Math.imul(o,x0)|0,G=G+Math.imul(t,P0)|0,X=X+Math.imul(t,z0)|0,X=X+Math.imul(e,P0)|0,I=I+Math.imul(e,z0)|0;var JU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(JU>>>26)|0,JU&=67108863,G=Math.imul(W0,a),X=Math.imul(W0,U0),X=X+Math.imul(A0,a)|0,I=Math.imul(A0,U0),G=G+Math.imul(H0,F0)|0,X=X+Math.imul(H0,C0)|0,X=X+Math.imul(O0,F0)|0,I=I+Math.imul(O0,C0)|0,G=G+Math.imul(s,S0)|0,X=X+Math.imul(s,x0)|0,X=X+Math.imul(Z0,S0)|0,I=I+Math.imul(Z0,x0)|0,G=G+Math.imul(c,P0)|0,X=X+Math.imul(c,z0)|0,X=X+Math.imul(o,P0)|0,I=I+Math.imul(o,z0)|0;var VU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(VU>>>26)|0,VU&=67108863,G=Math.imul(W0,F0),X=Math.imul(W0,C0),X=X+Math.imul(A0,F0)|0,I=Math.imul(A0,C0),G=G+Math.imul(H0,S0)|0,X=X+Math.imul(H0,x0)|0,X=X+Math.imul(O0,S0)|0,I=I+Math.imul(O0,x0)|0,G=G+Math.imul(s,P0)|0,X=X+Math.imul(s,z0)|0,X=X+Math.imul(Z0,P0)|0,I=I+Math.imul(Z0,z0)|0;var GU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(GU>>>26)|0,GU&=67108863,G=Math.imul(W0,S0),X=Math.imul(W0,x0),X=X+Math.imul(A0,S0)|0,I=Math.imul(A0,x0),G=G+Math.imul(H0,P0)|0,X=X+Math.imul(H0,z0)|0,X=X+Math.imul(O0,P0)|0,I=I+Math.imul(O0,z0)|0;var KU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(KU>>>26)|0,KU&=67108863,G=Math.imul(W0,P0),X=Math.imul(W0,z0),X=X+Math.imul(A0,P0)|0,I=Math.imul(A0,z0);var IU=(F+G|0)+((X&8191)<<13)|0;if(F=(I+(X>>>13)|0)+(IU>>>26)|0,IU&=67108863,$[0]=s0,$[1]=c0,$[2]=f0,$[3]=d0,$[4]=b0,$[5]=r0,$[6]=a0,$[7]=e0,$[8]=i0,$[9]=UU,$[10]=XU,$[11]=ZU,$[12]=QU,$[13]=YU,$[14]=JU,$[15]=VU,$[16]=GU,$[17]=KU,$[18]=IU,F!==0)$[19]=F,J.length++;return J};if(!Math.imul)k=v;function B(U,Q,J){J.negative=Q.negative^U.negative,J.length=U.length+Q.length;var Z=0,Y=0;for(var $=0;$<J.length-1;$++){var F=Y;Y=0;var G=Z&67108863,X=Math.min($,Q.length-1);for(var I=Math.max(0,$-U.length+1);I<=X;I++){var E=$-I,C=U.words[E]|0,j=Q.words[I]|0,g=C*j,p=g&67108863;F=F+(g/67108864|0)|0,p=p+G|0,G=p&67108863,F=F+(p>>>26)|0,Y+=F>>>26,F&=67108863}J.words[$]=G,Z=F,F=Y}if(Z!==0)J.words[$]=Z;else J.length--;return J.strip()}function _(U,Q,J){var Z=new x;return Z.mulp(U,Q,J)}V.prototype.mulTo=function(U,Q){var J,Z=this.length+U.length;if(this.length===10&&U.length===10)J=k(this,U,Q);else if(Z<63)J=v(this,U,Q);else if(Z<1024)J=B(this,U,Q);else J=_(this,U,Q);return J};function x(U,Q){this.x=U,this.y=Q}x.prototype.makeRBT=function(U){var Q=Array(U),J=V.prototype._countBits(U)-1;for(var Z=0;Z<U;Z++)Q[Z]=this.revBin(Z,J,U);return Q},x.prototype.revBin=function(U,Q,J){if(U===0||U===J-1)return U;var Z=0;for(var Y=0;Y<Q;Y++)Z|=(U&1)<<Q-Y-1,U>>=1;return Z},x.prototype.permute=function(U,Q,J,Z,Y,$){for(var F=0;F<$;F++)Z[F]=Q[U[F]],Y[F]=J[U[F]]},x.prototype.transform=function(U,Q,J,Z,Y,$){this.permute($,U,Q,J,Z,Y);for(var F=1;F<Y;F<<=1){var G=F<<1,X=Math.cos(2*Math.PI/G),I=Math.sin(2*Math.PI/G);for(var E=0;E<Y;E+=G){var C=X,j=I;for(var g=0;g<F;g++){var p=J[E+g],n=Z[E+g],$0=J[E+g+F],r=Z[E+g+F],d=C*$0-j*r;if(r=C*r+j*$0,$0=d,J[E+g]=p+$0,Z[E+g]=n+r,J[E+g+F]=p-$0,Z[E+g+F]=n-r,g!==G)d=X*C-I*j,j=X*j+I*C,C=d}}}},x.prototype.guessLen13b=function(U,Q){var J=Math.max(Q,U)|1,Z=J&1,Y=0;for(J=J/2|0;J;J=J>>>1)Y++;return 1<<Y+1+Z},x.prototype.conjugate=function(U,Q,J){if(J<=1)return;for(var Z=0;Z<J/2;Z++){var Y=U[Z];U[Z]=U[J-Z-1],U[J-Z-1]=Y,Y=Q[Z],Q[Z]=-Q[J-Z-1],Q[J-Z-1]=-Y}},x.prototype.normalize13b=function(U,Q){var J=0;for(var Z=0;Z<Q/2;Z++){var Y=Math.round(U[2*Z+1]/Q)*8192+Math.round(U[2*Z]/Q)+J;if(U[Z]=Y&67108863,Y<67108864)J=0;else J=Y/67108864|0}return U},x.prototype.convert13b=function(U,Q,J,Z){var Y=0;for(var $=0;$<Q;$++)Y=Y+(U[$]|0),J[2*$]=Y&8191,Y=Y>>>13,J[2*$+1]=Y&8191,Y=Y>>>13;for($=2*Q;$<Z;++$)J[$]=0;O(Y===0),O((Y&-8192)===0)},x.prototype.stub=function(U){var Q=Array(U);for(var J=0;J<U;J++)Q[J]=0;return Q},x.prototype.mulp=function(U,Q,J){var Z=2*this.guessLen13b(U.length,Q.length),Y=this.makeRBT(Z),$=this.stub(Z),F=Array(Z),G=Array(Z),X=Array(Z),I=Array(Z),E=Array(Z),C=Array(Z),j=J.words;j.length=Z,this.convert13b(U.words,U.length,F,Z),this.convert13b(Q.words,Q.length,I,Z),this.transform(F,$,G,X,Z,Y),this.transform(I,$,E,C,Z,Y);for(var g=0;g<Z;g++){var p=G[g]*E[g]-X[g]*C[g];X[g]=G[g]*C[g]+X[g]*E[g],G[g]=p}return this.conjugate(G,X,Z),this.transform(G,X,j,$,Z,Y),this.conjugate(j,$,Z),this.normalize13b(j,Z),J.negative=U.negative^Q.negative,J.length=U.length+Q.length,J.strip()},V.prototype.mul=function(U){var Q=new V(null);return Q.words=Array(this.length+U.length),this.mulTo(U,Q)},V.prototype.mulf=function(U){var Q=new V(null);return Q.words=Array(this.length+U.length),_(this,U,Q)},V.prototype.imul=function(U){return this.clone().mulTo(U,this)},V.prototype.imuln=function(U){O(typeof U==="number"),O(U<67108864);var Q=0;for(var J=0;J<this.length;J++){var Z=(this.words[J]|0)*U,Y=(Z&67108863)+(Q&67108863);Q>>=26,Q+=Z/67108864|0,Q+=Y>>>26,this.words[J]=Y&67108863}if(Q!==0)this.words[J]=Q,this.length++;return this.length=U===0?1:this.length,this},V.prototype.muln=function(U){return this.clone().imuln(U)},V.prototype.sqr=function(){return this.mul(this)},V.prototype.isqr=function(){return this.imul(this.clone())},V.prototype.pow=function(U){var Q=q(U);if(Q.length===0)return new V(1);var J=this;for(var Z=0;Z<Q.length;Z++,J=J.sqr())if(Q[Z]!==0)break;if(++Z<Q.length)for(var Y=J.sqr();Z<Q.length;Z++,Y=Y.sqr()){if(Q[Z]===0)continue;J=J.mul(Y)}return J},V.prototype.iushln=function(U){O(typeof U==="number"&&U>=0);var Q=U%26,J=(U-Q)/26,Z=67108863>>>26-Q<<26-Q,Y;if(Q!==0){var $=0;for(Y=0;Y<this.length;Y++){var F=this.words[Y]&Z,G=(this.words[Y]|0)-F<<Q;this.words[Y]=G|$,$=F>>>26-Q}if($)this.words[Y]=$,this.length++}if(J!==0){for(Y=this.length-1;Y>=0;Y--)this.words[Y+J]=this.words[Y];for(Y=0;Y<J;Y++)this.words[Y]=0;this.length+=J}return this.strip()},V.prototype.ishln=function(U){return O(this.negative===0),this.iushln(U)},V.prototype.iushrn=function(U,Q,J){O(typeof U==="number"&&U>=0);var Z;if(Q)Z=(Q-Q%26)/26;else Z=0;var Y=U%26,$=Math.min((U-Y)/26,this.length),F=67108863^67108863>>>Y<<Y,G=J;if(Z-=$,Z=Math.max(0,Z),G){for(var X=0;X<$;X++)G.words[X]=this.words[X];G.length=$}if($===0);else if(this.length>$){this.length-=$;for(X=0;X<this.length;X++)this.words[X]=this.words[X+$]}else this.words[0]=0,this.length=1;var I=0;for(X=this.length-1;X>=0&&(I!==0||X>=Z);X--){var E=this.words[X]|0;this.words[X]=I<<26-Y|E>>>Y,I=E&F}if(G&&I!==0)G.words[G.length++]=I;if(this.length===0)this.words[0]=0,this.length=1;return this.strip()},V.prototype.ishrn=function(U,Q,J){return O(this.negative===0),this.iushrn(U,Q,J)},V.prototype.shln=function(U){return this.clone().ishln(U)},V.prototype.ushln=function(U){return this.clone().iushln(U)},V.prototype.shrn=function(U){return this.clone().ishrn(U)},V.prototype.ushrn=function(U){return this.clone().iushrn(U)},V.prototype.testn=function(U){O(typeof U==="number"&&U>=0);var Q=U%26,J=(U-Q)/26,Z=1<<Q;if(this.length<=J)return!1;var Y=this.words[J];return!!(Y&Z)},V.prototype.imaskn=function(U){O(typeof U==="number"&&U>=0);var Q=U%26,J=(U-Q)/26;if(O(this.negative===0,"imaskn works only with positive numbers"),this.length<=J)return this;if(Q!==0)J++;if(this.length=Math.min(J,this.length),Q!==0){var Z=67108863^67108863>>>Q<<Q;this.words[this.length-1]&=Z}return this.strip()},V.prototype.maskn=function(U){return this.clone().imaskn(U)},V.prototype.iaddn=function(U){if(O(typeof U==="number"),O(U<67108864),U<0)return this.isubn(-U);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<U)return this.words[0]=U-(this.words[0]|0),this.negative=0,this;return this.negative=0,this.isubn(U),this.negative=1,this}return this._iaddn(U)},V.prototype._iaddn=function(U){this.words[0]+=U;for(var Q=0;Q<this.length&&this.words[Q]>=67108864;Q++)if(this.words[Q]-=67108864,Q===this.length-1)this.words[Q+1]=1;else this.words[Q+1]++;return this.length=Math.max(this.length,Q+1),this},V.prototype.isubn=function(U){if(O(typeof U==="number"),O(U<67108864),U<0)return this.iaddn(-U);if(this.negative!==0)return this.negative=0,this.iaddn(U),this.negative=1,this;if(this.words[0]-=U,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Q=0;Q<this.length&&this.words[Q]<0;Q++)this.words[Q]+=67108864,this.words[Q+1]-=1;return this.strip()},V.prototype.addn=function(U){return this.clone().iaddn(U)},V.prototype.subn=function(U){return this.clone().isubn(U)},V.prototype.iabs=function(){return this.negative=0,this},V.prototype.abs=function(){return this.clone().iabs()},V.prototype._ishlnsubmul=function(U,Q,J){var Z=U.length+J,Y;this._expand(Z);var $,F=0;for(Y=0;Y<U.length;Y++){$=(this.words[Y+J]|0)+F;var G=(U.words[Y]|0)*Q;$-=G&67108863,F=($>>26)-(G/67108864|0),this.words[Y+J]=$&67108863}for(;Y<this.length-J;Y++)$=(this.words[Y+J]|0)+F,F=$>>26,this.words[Y+J]=$&67108863;if(F===0)return this.strip();O(F===-1),F=0;for(Y=0;Y<this.length;Y++)$=-(this.words[Y]|0)+F,F=$>>26,this.words[Y]=$&67108863;return this.negative=1,this.strip()},V.prototype._wordDiv=function(U,Q){var J=this.length-U.length,Z=this.clone(),Y=U,$=Y.words[Y.length-1]|0,F=this._countBits($);if(J=26-F,J!==0)Y=Y.ushln(J),Z.iushln(J),$=Y.words[Y.length-1]|0;var G=Z.length-Y.length,X;if(Q!=="mod"){X=new V(null),X.length=G+1,X.words=Array(X.length);for(var I=0;I<X.length;I++)X.words[I]=0}var E=Z.clone()._ishlnsubmul(Y,1,G);if(E.negative===0){if(Z=E,X)X.words[G]=1}for(var C=G-1;C>=0;C--){var j=(Z.words[Y.length+C]|0)*67108864+(Z.words[Y.length+C-1]|0);j=Math.min(j/$|0,67108863),Z._ishlnsubmul(Y,j,C);while(Z.negative!==0)if(j--,Z.negative=0,Z._ishlnsubmul(Y,1,C),!Z.isZero())Z.negative^=1;if(X)X.words[C]=j}if(X)X.strip();if(Z.strip(),Q!=="div"&&J!==0)Z.iushrn(J);return{div:X||null,mod:Z}},V.prototype.divmod=function(U,Q,J){if(O(!U.isZero()),this.isZero())return{div:new V(0),mod:new V(0)};var Z,Y,$;if(this.negative!==0&&U.negative===0){if($=this.neg().divmod(U,Q),Q!=="mod")Z=$.div.neg();if(Q!=="div"){if(Y=$.mod.neg(),J&&Y.negative!==0)Y.iadd(U)}return{div:Z,mod:Y}}if(this.negative===0&&U.negative!==0){if($=this.divmod(U.neg(),Q),Q!=="mod")Z=$.div.neg();return{div:Z,mod:$.mod}}if((this.negative&U.negative)!==0){if($=this.neg().divmod(U.neg(),Q),Q!=="div"){if(Y=$.mod.neg(),J&&Y.negative!==0)Y.isub(U)}return{div:$.div,mod:Y}}if(U.length>this.length||this.cmp(U)<0)return{div:new V(0),mod:this};if(U.length===1){if(Q==="div")return{div:this.divn(U.words[0]),mod:null};if(Q==="mod")return{div:null,mod:new V(this.modn(U.words[0]))};return{div:this.divn(U.words[0]),mod:new V(this.modn(U.words[0]))}}return this._wordDiv(U,Q)},V.prototype.div=function(U){return this.divmod(U,"div",!1).div},V.prototype.mod=function(U){return this.divmod(U,"mod",!1).mod},V.prototype.umod=function(U){return this.divmod(U,"mod",!0).mod},V.prototype.divRound=function(U){var Q=this.divmod(U);if(Q.mod.isZero())return Q.div;var J=Q.div.negative!==0?Q.mod.isub(U):Q.mod,Z=U.ushrn(1),Y=U.andln(1),$=J.cmp(Z);if($<0||Y===1&&$===0)return Q.div;return Q.div.negative!==0?Q.div.isubn(1):Q.div.iaddn(1)},V.prototype.modn=function(U){O(U<=67108863);var Q=67108864%U,J=0;for(var Z=this.length-1;Z>=0;Z--)J=(Q*J+(this.words[Z]|0))%U;return J},V.prototype.idivn=function(U){O(U<=67108863);var Q=0;for(var J=this.length-1;J>=0;J--){var Z=(this.words[J]|0)+Q*67108864;this.words[J]=Z/U|0,Q=Z%U}return this.strip()},V.prototype.divn=function(U){return this.clone().idivn(U)},V.prototype.egcd=function(U){O(U.negative===0),O(!U.isZero());var Q=this,J=U.clone();if(Q.negative!==0)Q=Q.umod(U);else Q=Q.clone();var Z=new V(1),Y=new V(0),$=new V(0),F=new V(1),G=0;while(Q.isEven()&&J.isEven())Q.iushrn(1),J.iushrn(1),++G;var X=J.clone(),I=Q.clone();while(!Q.isZero()){for(var E=0,C=1;(Q.words[0]&C)===0&&E<26;++E,C<<=1);if(E>0){Q.iushrn(E);while(E-- >0){if(Z.isOdd()||Y.isOdd())Z.iadd(X),Y.isub(I);Z.iushrn(1),Y.iushrn(1)}}for(var j=0,g=1;(J.words[0]&g)===0&&j<26;++j,g<<=1);if(j>0){J.iushrn(j);while(j-- >0){if($.isOdd()||F.isOdd())$.iadd(X),F.isub(I);$.iushrn(1),F.iushrn(1)}}if(Q.cmp(J)>=0)Q.isub(J),Z.isub($),Y.isub(F);else J.isub(Q),$.isub(Z),F.isub(Y)}return{a:$,b:F,gcd:J.iushln(G)}},V.prototype._invmp=function(U){O(U.negative===0),O(!U.isZero());var Q=this,J=U.clone();if(Q.negative!==0)Q=Q.umod(U);else Q=Q.clone();var Z=new V(1),Y=new V(0),$=J.clone();while(Q.cmpn(1)>0&&J.cmpn(1)>0){for(var F=0,G=1;(Q.words[0]&G)===0&&F<26;++F,G<<=1);if(F>0){Q.iushrn(F);while(F-- >0){if(Z.isOdd())Z.iadd($);Z.iushrn(1)}}for(var X=0,I=1;(J.words[0]&I)===0&&X<26;++X,I<<=1);if(X>0){J.iushrn(X);while(X-- >0){if(Y.isOdd())Y.iadd($);Y.iushrn(1)}}if(Q.cmp(J)>=0)Q.isub(J),Z.isub(Y);else J.isub(Q),Y.isub(Z)}var E;if(Q.cmpn(1)===0)E=Z;else E=Y;if(E.cmpn(0)<0)E.iadd(U);return E},V.prototype.gcd=function(U){if(this.isZero())return U.abs();if(U.isZero())return this.abs();var Q=this.clone(),J=U.clone();Q.negative=0,J.negative=0;for(var Z=0;Q.isEven()&&J.isEven();Z++)Q.iushrn(1),J.iushrn(1);do{while(Q.isEven())Q.iushrn(1);while(J.isEven())J.iushrn(1);var Y=Q.cmp(J);if(Y<0){var $=Q;Q=J,J=$}else if(Y===0||J.cmpn(1)===0)break;Q.isub(J)}while(!0);return J.iushln(Z)},V.prototype.invm=function(U){return this.egcd(U).a.umod(U)},V.prototype.isEven=function(){return(this.words[0]&1)===0},V.prototype.isOdd=function(){return(this.words[0]&1)===1},V.prototype.andln=function(U){return this.words[0]&U},V.prototype.bincn=function(U){O(typeof U==="number");var Q=U%26,J=(U-Q)/26,Z=1<<Q;if(this.length<=J)return this._expand(J+1),this.words[J]|=Z,this;var Y=Z;for(var $=J;Y!==0&&$<this.length;$++){var F=this.words[$]|0;F+=Y,Y=F>>>26,F&=67108863,this.words[$]=F}if(Y!==0)this.words[$]=Y,this.length++;return this},V.prototype.isZero=function(){return this.length===1&&this.words[0]===0},V.prototype.cmpn=function(U){var Q=U<0;if(this.negative!==0&&!Q)return-1;if(this.negative===0&&Q)return 1;this.strip();var J;if(this.length>1)J=1;else{if(Q)U=-U;O(U<=67108863,"Number is too big");var Z=this.words[0]|0;J=Z===U?0:Z<U?-1:1}if(this.negative!==0)return-J|0;return J},V.prototype.cmp=function(U){if(this.negative!==0&&U.negative===0)return-1;if(this.negative===0&&U.negative!==0)return 1;var Q=this.ucmp(U);if(this.negative!==0)return-Q|0;return Q},V.prototype.ucmp=function(U){if(this.length>U.length)return 1;if(this.length<U.length)return-1;var Q=0;for(var J=this.length-1;J>=0;J--){var Z=this.words[J]|0,Y=U.words[J]|0;if(Z===Y)continue;if(Z<Y)Q=-1;else if(Z>Y)Q=1;break}return Q},V.prototype.gtn=function(U){return this.cmpn(U)===1},V.prototype.gt=function(U){return this.cmp(U)===1},V.prototype.gten=function(U){return this.cmpn(U)>=0},V.prototype.gte=function(U){return this.cmp(U)>=0},V.prototype.ltn=function(U){return this.cmpn(U)===-1},V.prototype.lt=function(U){return this.cmp(U)===-1},V.prototype.lten=function(U){return this.cmpn(U)<=0},V.prototype.lte=function(U){return this.cmp(U)<=0},V.prototype.eqn=function(U){return this.cmpn(U)===0},V.prototype.eq=function(U){return this.cmp(U)===0},V.red=function(U){return new u(U)},V.prototype.toRed=function(U){return O(!this.red,"Already a number in reduction context"),O(this.negative===0,"red works only with positives"),U.convertTo(this)._forceRed(U)},V.prototype.fromRed=function(){return O(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},V.prototype._forceRed=function(U){return this.red=U,this},V.prototype.forceRed=function(U){return O(!this.red,"Already a number in reduction context"),this._forceRed(U)},V.prototype.redAdd=function(U){return O(this.red,"redAdd works only with red numbers"),this.red.add(this,U)},V.prototype.redIAdd=function(U){return O(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,U)},V.prototype.redSub=function(U){return O(this.red,"redSub works only with red numbers"),this.red.sub(this,U)},V.prototype.redISub=function(U){return O(this.red,"redISub works only with red numbers"),this.red.isub(this,U)},V.prototype.redShl=function(U){return O(this.red,"redShl works only with red numbers"),this.red.shl(this,U)},V.prototype.redMul=function(U){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,U),this.red.mul(this,U)},V.prototype.redIMul=function(U){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,U),this.red.imul(this,U)},V.prototype.redSqr=function(){return O(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},V.prototype.redISqr=function(){return O(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},V.prototype.redSqrt=function(){return O(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},V.prototype.redInvm=function(){return O(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},V.prototype.redNeg=function(){return O(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},V.prototype.redPow=function(U){return O(this.red&&!U.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,U)};var w={k256:null,p224:null,p192:null,p25519:null};function y(U,Q){this.name=U,this.p=new V(Q,16),this.n=this.p.bitLength(),this.k=new V(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}y.prototype._tmp=function(){var U=new V(null);return U.words=Array(Math.ceil(this.n/13)),U},y.prototype.ireduce=function(U){var Q=U,J;do this.split(Q,this.tmp),Q=this.imulK(Q),Q=Q.iadd(this.tmp),J=Q.bitLength();while(J>this.n);var Z=J<this.n?-1:Q.ucmp(this.p);if(Z===0)Q.words[0]=0,Q.length=1;else if(Z>0)Q.isub(this.p);else if(Q.strip!==void 0)Q.strip();else Q._strip();return Q},y.prototype.split=function(U,Q){U.iushrn(this.n,0,Q)},y.prototype.imulK=function(U){return U.imul(this.k)};function l(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}L(l,y),l.prototype.split=function(U,Q){var J=4194303,Z=Math.min(U.length,9);for(var Y=0;Y<Z;Y++)Q.words[Y]=U.words[Y];if(Q.length=Z,U.length<=9){U.words[0]=0,U.length=1;return}var $=U.words[9];Q.words[Q.length++]=$&J;for(Y=10;Y<U.length;Y++){var F=U.words[Y]|0;U.words[Y-10]=(F&J)<<4|$>>>22,$=F}if($>>>=22,U.words[Y-10]=$,$===0&&U.length>10)U.length-=10;else U.length-=9},l.prototype.imulK=function(U){U.words[U.length]=0,U.words[U.length+1]=0,U.length+=2;var Q=0;for(var J=0;J<U.length;J++){var Z=U.words[J]|0;Q+=Z*977,U.words[J]=Q&67108863,Q=Z*64+(Q/67108864|0)}if(U.words[U.length-1]===0){if(U.length--,U.words[U.length-1]===0)U.length--}return U};function J0(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}L(J0,y);function K0(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}L(K0,y);function V0(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}L(V0,y),V0.prototype.imulK=function(U){var Q=0;for(var J=0;J<U.length;J++){var Z=(U.words[J]|0)*19+Q,Y=Z&67108863;Z>>>=26,U.words[J]=Y,Q=Z}if(Q!==0)U.words[U.length++]=Q;return U},V._prime=function(U){if(w[U])return w[U];var Q;if(U==="k256")Q=new l;else if(U==="p224")Q=new J0;else if(U==="p192")Q=new K0;else if(U==="p25519")Q=new V0;else throw Error("Unknown prime "+U);return w[U]=Q,Q};function u(U){if(typeof U==="string"){var Q=V._prime(U);this.m=Q.p,this.prime=Q}else O(U.gtn(1),"modulus must be greater than 1"),this.m=U,this.prime=null}u.prototype._verify1=function(U){O(U.negative===0,"red works only with positives"),O(U.red,"red works only with red numbers")},u.prototype._verify2=function(U,Q){O((U.negative|Q.negative)===0,"red works only with positives"),O(U.red&&U.red===Q.red,"red works only with red numbers")},u.prototype.imod=function(U){if(this.prime)return this.prime.ireduce(U)._forceRed(this);return U.umod(this.m)._forceRed(this)},u.prototype.neg=function(U){if(U.isZero())return U.clone();return this.m.sub(U)._forceRed(this)},u.prototype.add=function(U,Q){this._verify2(U,Q);var J=U.add(Q);if(J.cmp(this.m)>=0)J.isub(this.m);return J._forceRed(this)},u.prototype.iadd=function(U,Q){this._verify2(U,Q);var J=U.iadd(Q);if(J.cmp(this.m)>=0)J.isub(this.m);return J},u.prototype.sub=function(U,Q){this._verify2(U,Q);var J=U.sub(Q);if(J.cmpn(0)<0)J.iadd(this.m);return J._forceRed(this)},u.prototype.isub=function(U,Q){this._verify2(U,Q);var J=U.isub(Q);if(J.cmpn(0)<0)J.iadd(this.m);return J},u.prototype.shl=function(U,Q){return this._verify1(U),this.imod(U.ushln(Q))},u.prototype.imul=function(U,Q){return this._verify2(U,Q),this.imod(U.imul(Q))},u.prototype.mul=function(U,Q){return this._verify2(U,Q),this.imod(U.mul(Q))},u.prototype.isqr=function(U){return this.imul(U,U.clone())},u.prototype.sqr=function(U){return this.mul(U,U)},u.prototype.sqrt=function(U){if(U.isZero())return U.clone();var Q=this.m.andln(3);if(O(Q%2===1),Q===3){var J=this.m.add(new V(1)).iushrn(2);return this.pow(U,J)}var Z=this.m.subn(1),Y=0;while(!Z.isZero()&&Z.andln(1)===0)Y++,Z.iushrn(1);O(!Z.isZero());var $=new V(1).toRed(this),F=$.redNeg(),G=this.m.subn(1).iushrn(1),X=this.m.bitLength();X=new V(2*X*X).toRed(this);while(this.pow(X,G).cmp(F)!==0)X.redIAdd(F);var I=this.pow(X,Z),E=this.pow(U,Z.addn(1).iushrn(1)),C=this.pow(U,Z),j=Y;while(C.cmp($)!==0){var g=C;for(var p=0;g.cmp($)!==0;p++)g=g.redSqr();O(p<j);var n=this.pow(I,new V(1).iushln(j-p-1));E=E.redMul(n),I=n.redSqr(),C=C.redMul(I),j=p}return E},u.prototype.invm=function(U){var Q=U._invmp(this.m);if(Q.negative!==0)return Q.negative=0,this.imod(Q).redNeg();else return this.imod(Q)},u.prototype.pow=function(U,Q){if(Q.isZero())return new V(1).toRed(this);if(Q.cmpn(1)===0)return U.clone();var J=4,Z=Array(1<<J);Z[0]=new V(1).toRed(this),Z[1]=U;for(var Y=2;Y<Z.length;Y++)Z[Y]=this.mul(Z[Y-1],U);var $=Z[0],F=0,G=0,X=Q.bitLength()%26;if(X===0)X=26;for(Y=Q.length-1;Y>=0;Y--){var I=Q.words[Y];for(var E=X-1;E>=0;E--){var C=I>>E&1;if($!==Z[0])$=this.sqr($);if(C===0&&F===0){G=0;continue}if(F<<=1,F|=C,G++,G!==J&&(Y!==0||E!==0))continue;$=this.mul($,Z[F]),G=0,F=0}X=26}return $},u.prototype.convertTo=function(U){var Q=U.umod(this.m);return Q===U?Q.clone():Q},u.prototype.convertFrom=function(U){var Q=U.clone();return Q.red=null,Q},V.mont=function(U){return new X0(U)};function X0(U){if(u.call(this,U),this.shift=this.m.bitLength(),this.shift%26!==0)this.shift+=26-this.shift%26;this.r=new V(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)}L(X0,u),X0.prototype.convertTo=function(U){return this.imod(U.ushln(this.shift))},X0.prototype.convertFrom=function(U){var Q=this.imod(U.mul(this.rinv));return Q.red=null,Q},X0.prototype.imul=function(U,Q){if(U.isZero()||Q.isZero())return U.words[0]=0,U.length=1,U;var J=U.imul(Q),Z=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=J.isub(Z).iushrn(this.shift),$=Y;if(Y.cmp(this.m)>=0)$=Y.isub(this.m);else if(Y.cmpn(0)<0)$=Y.iadd(this.m);return $._forceRed(this)},X0.prototype.mul=function(U,Q){if(U.isZero()||Q.isZero())return new V(0)._forceRed(this);var J=U.mul(Q),Z=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=J.isub(Z).iushrn(this.shift),$=Y;if(Y.cmp(this.m)>=0)$=Y.isub(this.m);else if(Y.cmpn(0)<0)$=Y.iadd(this.m);return $._forceRed(this)},X0.prototype.invm=function(U){var Q=this.imod(U._invmp(this.m).mul(this.r2));return Q._forceRed(this)}})(typeof W>"u"||W,K)}),TV=G0((K,W)=>{var H=AV(),T=CV();W.exports=function(P){return new L(P)};var O={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};O.p224=O.secp224r1,O.p256=O.secp256r1=O.prime256v1,O.p192=O.secp192r1=O.prime192v1,O.p384=O.secp384r1,O.p521=O.secp521r1;function L(P){if(this.curveType=O[P],!this.curveType)this.curveType={name:P};this.curve=new H.ec(this.curveType.name),this.keys=void 0}L.prototype.generateKeys=function(P,S){return this.keys=this.curve.genKeyPair(),this.getPublicKey(P,S)},L.prototype.computeSecret=function(P,S,M){if(S=S||"utf8",!Buffer.isBuffer(P))P=new Buffer(P,S);var z=this.curve.keyFromPublic(P).getPublic(),A=z.mul(this.keys.getPrivate()).getX();return V(A,M,this.curveType.byteLength)},L.prototype.getPublicKey=function(P,S){var M=this.keys.getPublic(S==="compressed",!0);if(S==="hybrid")if(M[M.length-1]%2)M[0]=7;else M[0]=6;return V(M,P)},L.prototype.getPrivateKey=function(P){return V(this.keys.getPrivate(),P)},L.prototype.setPublicKey=function(P,S){if(S=S||"utf8",!Buffer.isBuffer(P))P=new Buffer(P,S);return this.keys._importPublic(P),this},L.prototype.setPrivateKey=function(P,S){if(S=S||"utf8",!Buffer.isBuffer(P))P=new Buffer(P,S);var M=new T(P);return M=M.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(M),this};function V(P,S,M){if(!Array.isArray(P))P=P.toArray();var z=new Buffer(P);if(M&&z.length<M){var A=new Buffer(M-z.length);A.fill(0),z=Buffer.concat([A,z])}if(!S)return z;else return z.toString(S)}}),DV=G0((K,W)=>{var H=(RU(),h0(SU)).createECDH;W.exports=H||TV()}),zV=G0((K,W)=>{(function(H,T){function O(U,Q){if(!U)throw Error(Q||"Assertion failed")}function L(U,Q){U.super_=Q;var J=function(){};J.prototype=Q.prototype,U.prototype=new J,U.prototype.constructor=U}function V(U,Q,J){if(V.isBN(U))return U;if(this.negative=0,this.words=null,this.length=0,this.red=null,U!==null){if(Q==="le"||Q==="be")J=Q,Q=10;this._init(U||0,Q||10,J||"be")}}if(typeof H==="object")H.exports=V;else T.BN=V;V.BN=V,V.wordSize=26;var P;try{if(typeof window<"u"&&typeof window.Buffer<"u")P=window.Buffer;else P=(OU(),h0(HU)).Buffer}catch(U){}V.isBN=function(U){if(U instanceof V)return!0;return U!==null&&typeof U==="object"&&U.constructor.wordSize===V.wordSize&&Array.isArray(U.words)},V.max=function(U,Q){if(U.cmp(Q)>0)return U;return Q},V.min=function(U,Q){if(U.cmp(Q)<0)return U;return Q},V.prototype._init=function(U,Q,J){if(typeof U==="number")return this._initNumber(U,Q,J);if(typeof U==="object")return this._initArray(U,Q,J);if(Q==="hex")Q=16;O(Q===(Q|0)&&Q>=2&&Q<=36),U=U.toString().replace(/\s+/g,"");var Z=0;if(U[0]==="-")Z++,this.negative=1;if(Z<U.length){if(Q===16)this._parseHex(U,Z,J);else if(this._parseBase(U,Q,Z),J==="le")this._initArray(this.toArray(),Q,J)}},V.prototype._initNumber=function(U,Q,J){if(U<0)this.negative=1,U=-U;if(U<67108864)this.words=[U&67108863],this.length=1;else if(U<4503599627370496)this.words=[U&67108863,U/67108864&67108863],this.length=2;else O(U<9007199254740992),this.words=[U&67108863,U/67108864&67108863,1],this.length=3;if(J!=="le")return;this._initArray(this.toArray(),Q,J)},V.prototype._initArray=function(U,Q,J){if(O(typeof U.length==="number"),U.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(U.length/3),this.words=Array(this.length);for(var Z=0;Z<this.length;Z++)this.words[Z]=0;var Y,$,F=0;if(J==="be"){for(Z=U.length-1,Y=0;Z>=0;Z-=3)if($=U[Z]|U[Z-1]<<8|U[Z-2]<<16,this.words[Y]|=$<<F&67108863,this.words[Y+1]=$>>>26-F&67108863,F+=24,F>=26)F-=26,Y++}else if(J==="le"){for(Z=0,Y=0;Z<U.length;Z+=3)if($=U[Z]|U[Z+1]<<8|U[Z+2]<<16,this.words[Y]|=$<<F&67108863,this.words[Y+1]=$>>>26-F&67108863,F+=24,F>=26)F-=26,Y++}return this.strip()};function S(U,Q){var J=U.charCodeAt(Q);if(J>=65&&J<=70)return J-55;else if(J>=97&&J<=102)return J-87;else return J-48&15}function M(U,Q,J){var Z=S(U,J);if(J-1>=Q)Z|=S(U,J-1)<<4;return Z}V.prototype._parseHex=function(U,Q,J){this.length=Math.ceil((U.length-Q)/6),this.words=Array(this.length);for(var Z=0;Z<this.length;Z++)this.words[Z]=0;var Y=0,$=0,F;if(J==="be")for(Z=U.length-1;Z>=Q;Z-=2)if(F=M(U,Q,Z)<<Y,this.words[$]|=F&67108863,Y>=18)Y-=18,$+=1,this.words[$]|=F>>>26;else Y+=8;else{var G=U.length-Q;for(Z=G%2===0?Q+1:Q;Z<U.length;Z+=2)if(F=M(U,Q,Z)<<Y,this.words[$]|=F&67108863,Y>=18)Y-=18,$+=1,this.words[$]|=F>>>26;else Y+=8}this.strip()};function z(U,Q,J,Z){var Y=0,$=Math.min(U.length,J);for(var F=Q;F<$;F++){var G=U.charCodeAt(F)-48;if(Y*=Z,G>=49)Y+=G-49+10;else if(G>=17)Y+=G-17+10;else Y+=G}return Y}V.prototype._parseBase=function(U,Q,J){this.words=[0],this.length=1;for(var Z=0,Y=1;Y<=67108863;Y*=Q)Z++;Z--,Y=Y/Q|0;var $=U.length-J,F=$%Z,G=Math.min($,$-F)+J,X=0;for(var I=J;I<G;I+=Z)if(X=z(U,I,I+Z,Q),this.imuln(Y),this.words[0]+X<67108864)this.words[0]+=X;else this._iaddn(X);if(F!==0){var E=1;X=z(U,I,U.length,Q);for(I=0;I<F;I++)E*=Q;if(this.imuln(E),this.words[0]+X<67108864)this.words[0]+=X;else this._iaddn(X)}this.strip()},V.prototype.copy=function(U){U.words=Array(this.length);for(var Q=0;Q<this.length;Q++)U.words[Q]=this.words[Q];U.length=this.length,U.negative=this.negative,U.red=this.red},V.prototype.clone=function(){var U=new V(null);return this.copy(U),U},V.prototype._expand=function(U){while(this.length<U)this.words[this.length++]=0;return this},V.prototype.strip=function(){while(this.length>1&&this.words[this.length-1]===0)this.length--;return this._normSign()},V.prototype._normSign=function(){if(this.length===1&&this.words[0]===0)this.negative=0;return this},V.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var A=["","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"],D=[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],R=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];if(V.prototype.toString=function(U,Q){U=U||10,Q=Q|0||1;var J;if(U===16||U==="hex"){J="";var Z=0,Y=0;for(var $=0;$<this.length;$++){var F=this.words[$],G=((F<<Z|Y)&16777215).toString(16);if(Y=F>>>24-Z&16777215,Z+=2,Z>=26)Z-=26,$--;if(Y!==0||$!==this.length-1)J=A[6-G.length]+G+J;else J=G+J}if(Y!==0)J=Y.toString(16)+J;while(J.length%Q!==0)J="0"+J;if(this.negative!==0)J="-"+J;return J}if(U===(U|0)&&U>=2&&U<=36){var X=D[U],I=R[U];J="";var E=this.clone();E.negative=0;while(!E.isZero()){var C=E.modn(I).toString(U);if(E=E.idivn(I),!E.isZero())J=A[X-C.length]+C+J;else J=C+J}if(this.isZero())J="0"+J;while(J.length%Q!==0)J="0"+J;if(this.negative!==0)J="-"+J;return J}O(!1,"Base should be between 2 and 36")},V.prototype.toNumber=function(){var U=this.words[0];if(this.length===2)U+=this.words[1]*67108864;else if(this.length===3&&this.words[2]===1)U+=4503599627370496+this.words[1]*67108864;else if(this.length>2)O(!1,"Number can only safely store up to 53 bits");return this.negative!==0?-U:U},V.prototype.toJSON=function(){return this.toString(16)},V.prototype.toBuffer=function(U,Q){return O(typeof P<"u"),this.toArrayLike(P,U,Q)},V.prototype.toArray=function(U,Q){return this.toArrayLike(Array,U,Q)},V.prototype.toArrayLike=function(U,Q,J){var Z=this.byteLength(),Y=J||Math.max(1,Z);O(Z<=Y,"byte array longer than desired length"),O(Y>0,"Requested array length <= 0"),this.strip();var $=Q==="le",F=new U(Y),G,X,I=this.clone();if(!$){for(X=0;X<Y-Z;X++)F[X]=0;for(X=0;!I.isZero();X++)G=I.andln(255),I.iushrn(8),F[Y-X-1]=G}else{for(X=0;!I.isZero();X++)G=I.andln(255),I.iushrn(8),F[X]=G;for(;X<Y;X++)F[X]=0}return F},Math.clz32)V.prototype._countBits=function(U){return 32-Math.clz32(U)};else V.prototype._countBits=function(U){var Q=U,J=0;if(Q>=4096)J+=13,Q>>>=13;if(Q>=64)J+=7,Q>>>=7;if(Q>=8)J+=4,Q>>>=4;if(Q>=2)J+=2,Q>>>=2;return J+Q};V.prototype._zeroBits=function(U){if(U===0)return 26;var Q=U,J=0;if((Q&8191)===0)J+=13,Q>>>=13;if((Q&127)===0)J+=7,Q>>>=7;if((Q&15)===0)J+=4,Q>>>=4;if((Q&3)===0)J+=2,Q>>>=2;if((Q&1)===0)J++;return J},V.prototype.bitLength=function(){var U=this.words[this.length-1],Q=this._countBits(U);return(this.length-1)*26+Q};function q(U){var Q=Array(U.bitLength());for(var J=0;J<Q.length;J++){var Z=J/26|0,Y=J%26;Q[J]=(U.words[Z]&1<<Y)>>>Y}return Q}V.prototype.zeroBits=function(){if(this.isZero())return 0;var U=0;for(var Q=0;Q<this.length;Q++){var J=this._zeroBits(this.words[Q]);if(U+=J,J!==26)break}return U},V.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},V.prototype.toTwos=function(U){if(this.negative!==0)return this.abs().inotn(U).iaddn(1);return this.clone()},V.prototype.fromTwos=function(U){if(this.testn(U-1))return this.notn(U).iaddn(1).ineg();return this.clone()},V.prototype.isNeg=function(){return this.negative!==0},V.prototype.neg=function(){return this.clone().ineg()},V.prototype.ineg=function(){if(!this.isZero())this.negative^=1;return this},V.prototype.iuor=function(U){while(this.length<U.length)this.words[this.length++]=0;for(var Q=0;Q<U.length;Q++)this.words[Q]=this.words[Q]|U.words[Q];return this.strip()},V.prototype.ior=function(U){return O((this.negative|U.negative)===0),this.iuor(U)},V.prototype.or=function(U){if(this.length>U.length)return this.clone().ior(U);return U.clone().ior(this)},V.prototype.uor=function(U){if(this.length>U.length)return this.clone().iuor(U);return U.clone().iuor(this)},V.prototype.iuand=function(U){var Q;if(this.length>U.length)Q=U;else Q=this;for(var J=0;J<Q.length;J++)this.words[J]=this.words[J]&U.words[J];return this.length=Q.length,this.strip()},V.prototype.iand=function(U){return O((this.negative|U.negative)===0),this.iuand(U)},V.prototype.and=function(U){if(this.length>U.length)return this.clone().iand(U);return U.clone().iand(this)},V.prototype.uand=function(U){if(this.length>U.length)return this.clone().iuand(U);return U.clone().iuand(this)},V.prototype.iuxor=function(U){var Q,J;if(this.length>U.length)Q=this,J=U;else Q=U,J=this;for(var Z=0;Z<J.length;Z++)this.words[Z]=Q.words[Z]^J.words[Z];if(this!==Q)for(;Z<Q.length;Z++)this.words[Z]=Q.words[Z];return this.length=Q.length,this.strip()},V.prototype.ixor=function(U){return O((this.negative|U.negative)===0),this.iuxor(U)},V.prototype.xor=function(U){if(this.length>U.length)return this.clone().ixor(U);return U.clone().ixor(this)},V.prototype.uxor=function(U){if(this.length>U.length)return this.clone().iuxor(U);return U.clone().iuxor(this)},V.prototype.inotn=function(U){O(typeof U==="number"&&U>=0);var Q=Math.ceil(U/26)|0,J=U%26;if(this._expand(Q),J>0)Q--;for(var Z=0;Z<Q;Z++)this.words[Z]=~this.words[Z]&67108863;if(J>0)this.words[Z]=~this.words[Z]&67108863>>26-J;return this.strip()},V.prototype.notn=function(U){return this.clone().inotn(U)},V.prototype.setn=function(U,Q){O(typeof U==="number"&&U>=0);var J=U/26|0,Z=U%26;if(this._expand(J+1),Q)this.words[J]=this.words[J]|1<<Z;else this.words[J]=this.words[J]&~(1<<Z);return this.strip()},V.prototype.iadd=function(U){var Q;if(this.negative!==0&&U.negative===0)return this.negative=0,Q=this.isub(U),this.negative^=1,this._normSign();else if(this.negative===0&&U.negative!==0)return U.negative=0,Q=this.isub(U),U.negative=1,Q._normSign();var J,Z;if(this.length>U.length)J=this,Z=U;else J=U,Z=this;var Y=0;for(var $=0;$<Z.length;$++)Q=(J.words[$]|0)+(Z.words[$]|0)+Y,this.words[$]=Q&67108863,Y=Q>>>26;for(;Y!==0&&$<J.length;$++)Q=(J.words[$]|0)+Y,this.words[$]=Q&67108863,Y=Q>>>26;if(this.length=J.length,Y!==0)this.words[this.length]=Y,this.length++;else if(J!==this)for(;$<J.length;$++)this.words[$]=J.words[$];return this},V.prototype.add=function(U){var Q;if(U.negative!==0&&this.negative===0)return U.negative=0,Q=this.sub(U),U.negative^=1,Q;else if(U.negative===0&&this.negative!==0)return this.negative=0,Q=U.sub(this),this.negative=1,Q;if(this.length>U.length)return this.clone().iadd(U);return U.clone().iadd(this)},V.prototype.isub=function(U){if(U.negative!==0){U.negative=0;var Q=this.iadd(U);return U.negative=1,Q._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(U),this.negative=1,this._normSign();var J=this.cmp(U);if(J===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Z,Y;if(J>0)Z=this,Y=U;else Z=U,Y=this;var $=0;for(var F=0;F<Y.length;F++)Q=(Z.words[F]|0)-(Y.words[F]|0)+$,$=Q>>26,this.words[F]=Q&67108863;for(;$!==0&&F<Z.length;F++)Q=(Z.words[F]|0)+$,$=Q>>26,this.words[F]=Q&67108863;if($===0&&F<Z.length&&Z!==this)for(;F<Z.length;F++)this.words[F]=Z.words[F];if(this.length=Math.max(this.length,F),Z!==this)this.negative=1;return this.strip()},V.prototype.sub=function(U){return this.clone().isub(U)};function v(U,Q,J){J.negative=Q.negative^U.negative;var Z=U.length+Q.length|0;J.length=Z,Z=Z-1|0;var Y=U.words[0]|0,$=Q.words[0]|0,F=Y*$,G=F&67108863,X=F/67108864|0;J.words[0]=G;for(var I=1;I<Z;I++){var E=X>>>26,C=X&67108863,j=Math.min(I,Q.length-1);for(var g=Math.max(0,I-U.length+1);g<=j;g++){var p=I-g|0;Y=U.words[p]|0,$=Q.words[g]|0,F=Y*$+C,E+=F/67108864|0,C=F&67108863}J.words[I]=C|0,X=E|0}if(X!==0)J.words[I]=X|0;else J.length--;return J.strip()}var k=function(U,Q,J){var Z=U.words,Y=Q.words,$=J.words,F=0,G,X,I,E=Z[0]|0,C=E&8191,j=E>>>13,g=Z[1]|0,p=g&8191,n=g>>>13,$0=Z[2]|0,r=$0&8191,d=$0>>>13,Q0=Z[3]|0,m=Q0&8191,i=Q0>>>13,g0=Z[4]|0,f=g0&8191,h=g0>>>13,Y0=Z[5]|0,t=Y0&8191,e=Y0>>>13,M0=Z[6]|0,c=M0&8191,o=M0>>>13,N0=Z[7]|0,s=N0&8191,Z0=N0>>>13,y0=Z[8]|0,H0=y0&8191,O0=y0>>>13,n0=Z[9]|0,W0=n0&8191,A0=n0>>>13,t0=Y[0]|0,D0=t0&8191,T0=t0>>>13,TU=Y[1]|0,L0=TU&8191,k0=TU>>>13,DU=Y[2]|0,j0=DU&8191,E0=DU>>>13,AU=Y[3]|0,v0=AU&8191,R0=AU>>>13,$U=Y[4]|0,_0=$U&8191,B0=$U>>>13,WU=Y[5]|0,q0=WU&8191,N=WU>>>13,b=Y[6]|0,a=b&8191,U0=b>>>13,w0=Y[7]|0,F0=w0&8191,C0=w0>>>13,m0=Y[8]|0,S0=m0&8191,x0=m0>>>13,CU=Y[9]|0,P0=CU&8191,z0=CU>>>13;J.negative=U.negative^Q.negative,J.length=19,G=Math.imul(C,D0),X=Math.imul(C,T0),X=X+Math.imul(j,D0)|0,I=Math.imul(j,T0);var s0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(s0>>>26)|0,s0&=67108863,G=Math.imul(p,D0),X=Math.imul(p,T0),X=X+Math.imul(n,D0)|0,I=Math.imul(n,T0),G=G+Math.imul(C,L0)|0,X=X+Math.imul(C,k0)|0,X=X+Math.imul(j,L0)|0,I=I+Math.imul(j,k0)|0;var c0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(c0>>>26)|0,c0&=67108863,G=Math.imul(r,D0),X=Math.imul(r,T0),X=X+Math.imul(d,D0)|0,I=Math.imul(d,T0),G=G+Math.imul(p,L0)|0,X=X+Math.imul(p,k0)|0,X=X+Math.imul(n,L0)|0,I=I+Math.imul(n,k0)|0,G=G+Math.imul(C,j0)|0,X=X+Math.imul(C,E0)|0,X=X+Math.imul(j,j0)|0,I=I+Math.imul(j,E0)|0;var f0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(f0>>>26)|0,f0&=67108863,G=Math.imul(m,D0),X=Math.imul(m,T0),X=X+Math.imul(i,D0)|0,I=Math.imul(i,T0),G=G+Math.imul(r,L0)|0,X=X+Math.imul(r,k0)|0,X=X+Math.imul(d,L0)|0,I=I+Math.imul(d,k0)|0,G=G+Math.imul(p,j0)|0,X=X+Math.imul(p,E0)|0,X=X+Math.imul(n,j0)|0,I=I+Math.imul(n,E0)|0,G=G+Math.imul(C,v0)|0,X=X+Math.imul(C,R0)|0,X=X+Math.imul(j,v0)|0,I=I+Math.imul(j,R0)|0;var d0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(d0>>>26)|0,d0&=67108863,G=Math.imul(f,D0),X=Math.imul(f,T0),X=X+Math.imul(h,D0)|0,I=Math.imul(h,T0),G=G+Math.imul(m,L0)|0,X=X+Math.imul(m,k0)|0,X=X+Math.imul(i,L0)|0,I=I+Math.imul(i,k0)|0,G=G+Math.imul(r,j0)|0,X=X+Math.imul(r,E0)|0,X=X+Math.imul(d,j0)|0,I=I+Math.imul(d,E0)|0,G=G+Math.imul(p,v0)|0,X=X+Math.imul(p,R0)|0,X=X+Math.imul(n,v0)|0,I=I+Math.imul(n,R0)|0,G=G+Math.imul(C,_0)|0,X=X+Math.imul(C,B0)|0,X=X+Math.imul(j,_0)|0,I=I+Math.imul(j,B0)|0;var b0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(b0>>>26)|0,b0&=67108863,G=Math.imul(t,D0),X=Math.imul(t,T0),X=X+Math.imul(e,D0)|0,I=Math.imul(e,T0),G=G+Math.imul(f,L0)|0,X=X+Math.imul(f,k0)|0,X=X+Math.imul(h,L0)|0,I=I+Math.imul(h,k0)|0,G=G+Math.imul(m,j0)|0,X=X+Math.imul(m,E0)|0,X=X+Math.imul(i,j0)|0,I=I+Math.imul(i,E0)|0,G=G+Math.imul(r,v0)|0,X=X+Math.imul(r,R0)|0,X=X+Math.imul(d,v0)|0,I=I+Math.imul(d,R0)|0,G=G+Math.imul(p,_0)|0,X=X+Math.imul(p,B0)|0,X=X+Math.imul(n,_0)|0,I=I+Math.imul(n,B0)|0,G=G+Math.imul(C,q0)|0,X=X+Math.imul(C,N)|0,X=X+Math.imul(j,q0)|0,I=I+Math.imul(j,N)|0;var r0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(r0>>>26)|0,r0&=67108863,G=Math.imul(c,D0),X=Math.imul(c,T0),X=X+Math.imul(o,D0)|0,I=Math.imul(o,T0),G=G+Math.imul(t,L0)|0,X=X+Math.imul(t,k0)|0,X=X+Math.imul(e,L0)|0,I=I+Math.imul(e,k0)|0,G=G+Math.imul(f,j0)|0,X=X+Math.imul(f,E0)|0,X=X+Math.imul(h,j0)|0,I=I+Math.imul(h,E0)|0,G=G+Math.imul(m,v0)|0,X=X+Math.imul(m,R0)|0,X=X+Math.imul(i,v0)|0,I=I+Math.imul(i,R0)|0,G=G+Math.imul(r,_0)|0,X=X+Math.imul(r,B0)|0,X=X+Math.imul(d,_0)|0,I=I+Math.imul(d,B0)|0,G=G+Math.imul(p,q0)|0,X=X+Math.imul(p,N)|0,X=X+Math.imul(n,q0)|0,I=I+Math.imul(n,N)|0,G=G+Math.imul(C,a)|0,X=X+Math.imul(C,U0)|0,X=X+Math.imul(j,a)|0,I=I+Math.imul(j,U0)|0;var a0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(a0>>>26)|0,a0&=67108863,G=Math.imul(s,D0),X=Math.imul(s,T0),X=X+Math.imul(Z0,D0)|0,I=Math.imul(Z0,T0),G=G+Math.imul(c,L0)|0,X=X+Math.imul(c,k0)|0,X=X+Math.imul(o,L0)|0,I=I+Math.imul(o,k0)|0,G=G+Math.imul(t,j0)|0,X=X+Math.imul(t,E0)|0,X=X+Math.imul(e,j0)|0,I=I+Math.imul(e,E0)|0,G=G+Math.imul(f,v0)|0,X=X+Math.imul(f,R0)|0,X=X+Math.imul(h,v0)|0,I=I+Math.imul(h,R0)|0,G=G+Math.imul(m,_0)|0,X=X+Math.imul(m,B0)|0,X=X+Math.imul(i,_0)|0,I=I+Math.imul(i,B0)|0,G=G+Math.imul(r,q0)|0,X=X+Math.imul(r,N)|0,X=X+Math.imul(d,q0)|0,I=I+Math.imul(d,N)|0,G=G+Math.imul(p,a)|0,X=X+Math.imul(p,U0)|0,X=X+Math.imul(n,a)|0,I=I+Math.imul(n,U0)|0,G=G+Math.imul(C,F0)|0,X=X+Math.imul(C,C0)|0,X=X+Math.imul(j,F0)|0,I=I+Math.imul(j,C0)|0;var e0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(e0>>>26)|0,e0&=67108863,G=Math.imul(H0,D0),X=Math.imul(H0,T0),X=X+Math.imul(O0,D0)|0,I=Math.imul(O0,T0),G=G+Math.imul(s,L0)|0,X=X+Math.imul(s,k0)|0,X=X+Math.imul(Z0,L0)|0,I=I+Math.imul(Z0,k0)|0,G=G+Math.imul(c,j0)|0,X=X+Math.imul(c,E0)|0,X=X+Math.imul(o,j0)|0,I=I+Math.imul(o,E0)|0,G=G+Math.imul(t,v0)|0,X=X+Math.imul(t,R0)|0,X=X+Math.imul(e,v0)|0,I=I+Math.imul(e,R0)|0,G=G+Math.imul(f,_0)|0,X=X+Math.imul(f,B0)|0,X=X+Math.imul(h,_0)|0,I=I+Math.imul(h,B0)|0,G=G+Math.imul(m,q0)|0,X=X+Math.imul(m,N)|0,X=X+Math.imul(i,q0)|0,I=I+Math.imul(i,N)|0,G=G+Math.imul(r,a)|0,X=X+Math.imul(r,U0)|0,X=X+Math.imul(d,a)|0,I=I+Math.imul(d,U0)|0,G=G+Math.imul(p,F0)|0,X=X+Math.imul(p,C0)|0,X=X+Math.imul(n,F0)|0,I=I+Math.imul(n,C0)|0,G=G+Math.imul(C,S0)|0,X=X+Math.imul(C,x0)|0,X=X+Math.imul(j,S0)|0,I=I+Math.imul(j,x0)|0;var i0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(i0>>>26)|0,i0&=67108863,G=Math.imul(W0,D0),X=Math.imul(W0,T0),X=X+Math.imul(A0,D0)|0,I=Math.imul(A0,T0),G=G+Math.imul(H0,L0)|0,X=X+Math.imul(H0,k0)|0,X=X+Math.imul(O0,L0)|0,I=I+Math.imul(O0,k0)|0,G=G+Math.imul(s,j0)|0,X=X+Math.imul(s,E0)|0,X=X+Math.imul(Z0,j0)|0,I=I+Math.imul(Z0,E0)|0,G=G+Math.imul(c,v0)|0,X=X+Math.imul(c,R0)|0,X=X+Math.imul(o,v0)|0,I=I+Math.imul(o,R0)|0,G=G+Math.imul(t,_0)|0,X=X+Math.imul(t,B0)|0,X=X+Math.imul(e,_0)|0,I=I+Math.imul(e,B0)|0,G=G+Math.imul(f,q0)|0,X=X+Math.imul(f,N)|0,X=X+Math.imul(h,q0)|0,I=I+Math.imul(h,N)|0,G=G+Math.imul(m,a)|0,X=X+Math.imul(m,U0)|0,X=X+Math.imul(i,a)|0,I=I+Math.imul(i,U0)|0,G=G+Math.imul(r,F0)|0,X=X+Math.imul(r,C0)|0,X=X+Math.imul(d,F0)|0,I=I+Math.imul(d,C0)|0,G=G+Math.imul(p,S0)|0,X=X+Math.imul(p,x0)|0,X=X+Math.imul(n,S0)|0,I=I+Math.imul(n,x0)|0,G=G+Math.imul(C,P0)|0,X=X+Math.imul(C,z0)|0,X=X+Math.imul(j,P0)|0,I=I+Math.imul(j,z0)|0;var UU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(UU>>>26)|0,UU&=67108863,G=Math.imul(W0,L0),X=Math.imul(W0,k0),X=X+Math.imul(A0,L0)|0,I=Math.imul(A0,k0),G=G+Math.imul(H0,j0)|0,X=X+Math.imul(H0,E0)|0,X=X+Math.imul(O0,j0)|0,I=I+Math.imul(O0,E0)|0,G=G+Math.imul(s,v0)|0,X=X+Math.imul(s,R0)|0,X=X+Math.imul(Z0,v0)|0,I=I+Math.imul(Z0,R0)|0,G=G+Math.imul(c,_0)|0,X=X+Math.imul(c,B0)|0,X=X+Math.imul(o,_0)|0,I=I+Math.imul(o,B0)|0,G=G+Math.imul(t,q0)|0,X=X+Math.imul(t,N)|0,X=X+Math.imul(e,q0)|0,I=I+Math.imul(e,N)|0,G=G+Math.imul(f,a)|0,X=X+Math.imul(f,U0)|0,X=X+Math.imul(h,a)|0,I=I+Math.imul(h,U0)|0,G=G+Math.imul(m,F0)|0,X=X+Math.imul(m,C0)|0,X=X+Math.imul(i,F0)|0,I=I+Math.imul(i,C0)|0,G=G+Math.imul(r,S0)|0,X=X+Math.imul(r,x0)|0,X=X+Math.imul(d,S0)|0,I=I+Math.imul(d,x0)|0,G=G+Math.imul(p,P0)|0,X=X+Math.imul(p,z0)|0,X=X+Math.imul(n,P0)|0,I=I+Math.imul(n,z0)|0;var XU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(XU>>>26)|0,XU&=67108863,G=Math.imul(W0,j0),X=Math.imul(W0,E0),X=X+Math.imul(A0,j0)|0,I=Math.imul(A0,E0),G=G+Math.imul(H0,v0)|0,X=X+Math.imul(H0,R0)|0,X=X+Math.imul(O0,v0)|0,I=I+Math.imul(O0,R0)|0,G=G+Math.imul(s,_0)|0,X=X+Math.imul(s,B0)|0,X=X+Math.imul(Z0,_0)|0,I=I+Math.imul(Z0,B0)|0,G=G+Math.imul(c,q0)|0,X=X+Math.imul(c,N)|0,X=X+Math.imul(o,q0)|0,I=I+Math.imul(o,N)|0,G=G+Math.imul(t,a)|0,X=X+Math.imul(t,U0)|0,X=X+Math.imul(e,a)|0,I=I+Math.imul(e,U0)|0,G=G+Math.imul(f,F0)|0,X=X+Math.imul(f,C0)|0,X=X+Math.imul(h,F0)|0,I=I+Math.imul(h,C0)|0,G=G+Math.imul(m,S0)|0,X=X+Math.imul(m,x0)|0,X=X+Math.imul(i,S0)|0,I=I+Math.imul(i,x0)|0,G=G+Math.imul(r,P0)|0,X=X+Math.imul(r,z0)|0,X=X+Math.imul(d,P0)|0,I=I+Math.imul(d,z0)|0;var ZU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(ZU>>>26)|0,ZU&=67108863,G=Math.imul(W0,v0),X=Math.imul(W0,R0),X=X+Math.imul(A0,v0)|0,I=Math.imul(A0,R0),G=G+Math.imul(H0,_0)|0,X=X+Math.imul(H0,B0)|0,X=X+Math.imul(O0,_0)|0,I=I+Math.imul(O0,B0)|0,G=G+Math.imul(s,q0)|0,X=X+Math.imul(s,N)|0,X=X+Math.imul(Z0,q0)|0,I=I+Math.imul(Z0,N)|0,G=G+Math.imul(c,a)|0,X=X+Math.imul(c,U0)|0,X=X+Math.imul(o,a)|0,I=I+Math.imul(o,U0)|0,G=G+Math.imul(t,F0)|0,X=X+Math.imul(t,C0)|0,X=X+Math.imul(e,F0)|0,I=I+Math.imul(e,C0)|0,G=G+Math.imul(f,S0)|0,X=X+Math.imul(f,x0)|0,X=X+Math.imul(h,S0)|0,I=I+Math.imul(h,x0)|0,G=G+Math.imul(m,P0)|0,X=X+Math.imul(m,z0)|0,X=X+Math.imul(i,P0)|0,I=I+Math.imul(i,z0)|0;var QU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(QU>>>26)|0,QU&=67108863,G=Math.imul(W0,_0),X=Math.imul(W0,B0),X=X+Math.imul(A0,_0)|0,I=Math.imul(A0,B0),G=G+Math.imul(H0,q0)|0,X=X+Math.imul(H0,N)|0,X=X+Math.imul(O0,q0)|0,I=I+Math.imul(O0,N)|0,G=G+Math.imul(s,a)|0,X=X+Math.imul(s,U0)|0,X=X+Math.imul(Z0,a)|0,I=I+Math.imul(Z0,U0)|0,G=G+Math.imul(c,F0)|0,X=X+Math.imul(c,C0)|0,X=X+Math.imul(o,F0)|0,I=I+Math.imul(o,C0)|0,G=G+Math.imul(t,S0)|0,X=X+Math.imul(t,x0)|0,X=X+Math.imul(e,S0)|0,I=I+Math.imul(e,x0)|0,G=G+Math.imul(f,P0)|0,X=X+Math.imul(f,z0)|0,X=X+Math.imul(h,P0)|0,I=I+Math.imul(h,z0)|0;var YU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(YU>>>26)|0,YU&=67108863,G=Math.imul(W0,q0),X=Math.imul(W0,N),X=X+Math.imul(A0,q0)|0,I=Math.imul(A0,N),G=G+Math.imul(H0,a)|0,X=X+Math.imul(H0,U0)|0,X=X+Math.imul(O0,a)|0,I=I+Math.imul(O0,U0)|0,G=G+Math.imul(s,F0)|0,X=X+Math.imul(s,C0)|0,X=X+Math.imul(Z0,F0)|0,I=I+Math.imul(Z0,C0)|0,G=G+Math.imul(c,S0)|0,X=X+Math.imul(c,x0)|0,X=X+Math.imul(o,S0)|0,I=I+Math.imul(o,x0)|0,G=G+Math.imul(t,P0)|0,X=X+Math.imul(t,z0)|0,X=X+Math.imul(e,P0)|0,I=I+Math.imul(e,z0)|0;var JU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(JU>>>26)|0,JU&=67108863,G=Math.imul(W0,a),X=Math.imul(W0,U0),X=X+Math.imul(A0,a)|0,I=Math.imul(A0,U0),G=G+Math.imul(H0,F0)|0,X=X+Math.imul(H0,C0)|0,X=X+Math.imul(O0,F0)|0,I=I+Math.imul(O0,C0)|0,G=G+Math.imul(s,S0)|0,X=X+Math.imul(s,x0)|0,X=X+Math.imul(Z0,S0)|0,I=I+Math.imul(Z0,x0)|0,G=G+Math.imul(c,P0)|0,X=X+Math.imul(c,z0)|0,X=X+Math.imul(o,P0)|0,I=I+Math.imul(o,z0)|0;var VU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(VU>>>26)|0,VU&=67108863,G=Math.imul(W0,F0),X=Math.imul(W0,C0),X=X+Math.imul(A0,F0)|0,I=Math.imul(A0,C0),G=G+Math.imul(H0,S0)|0,X=X+Math.imul(H0,x0)|0,X=X+Math.imul(O0,S0)|0,I=I+Math.imul(O0,x0)|0,G=G+Math.imul(s,P0)|0,X=X+Math.imul(s,z0)|0,X=X+Math.imul(Z0,P0)|0,I=I+Math.imul(Z0,z0)|0;var GU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(GU>>>26)|0,GU&=67108863,G=Math.imul(W0,S0),X=Math.imul(W0,x0),X=X+Math.imul(A0,S0)|0,I=Math.imul(A0,x0),G=G+Math.imul(H0,P0)|0,X=X+Math.imul(H0,z0)|0,X=X+Math.imul(O0,P0)|0,I=I+Math.imul(O0,z0)|0;var KU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(KU>>>26)|0,KU&=67108863,G=Math.imul(W0,P0),X=Math.imul(W0,z0),X=X+Math.imul(A0,P0)|0,I=Math.imul(A0,z0);var IU=(F+G|0)+((X&8191)<<13)|0;if(F=(I+(X>>>13)|0)+(IU>>>26)|0,IU&=67108863,$[0]=s0,$[1]=c0,$[2]=f0,$[3]=d0,$[4]=b0,$[5]=r0,$[6]=a0,$[7]=e0,$[8]=i0,$[9]=UU,$[10]=XU,$[11]=ZU,$[12]=QU,$[13]=YU,$[14]=JU,$[15]=VU,$[16]=GU,$[17]=KU,$[18]=IU,F!==0)$[19]=F,J.length++;return J};if(!Math.imul)k=v;function B(U,Q,J){J.negative=Q.negative^U.negative,J.length=U.length+Q.length;var Z=0,Y=0;for(var $=0;$<J.length-1;$++){var F=Y;Y=0;var G=Z&67108863,X=Math.min($,Q.length-1);for(var I=Math.max(0,$-U.length+1);I<=X;I++){var E=$-I,C=U.words[E]|0,j=Q.words[I]|0,g=C*j,p=g&67108863;F=F+(g/67108864|0)|0,p=p+G|0,G=p&67108863,F=F+(p>>>26)|0,Y+=F>>>26,F&=67108863}J.words[$]=G,Z=F,F=Y}if(Z!==0)J.words[$]=Z;else J.length--;return J.strip()}function _(U,Q,J){var Z=new x;return Z.mulp(U,Q,J)}V.prototype.mulTo=function(U,Q){var J,Z=this.length+U.length;if(this.length===10&&U.length===10)J=k(this,U,Q);else if(Z<63)J=v(this,U,Q);else if(Z<1024)J=B(this,U,Q);else J=_(this,U,Q);return J};function x(U,Q){this.x=U,this.y=Q}x.prototype.makeRBT=function(U){var Q=Array(U),J=V.prototype._countBits(U)-1;for(var Z=0;Z<U;Z++)Q[Z]=this.revBin(Z,J,U);return Q},x.prototype.revBin=function(U,Q,J){if(U===0||U===J-1)return U;var Z=0;for(var Y=0;Y<Q;Y++)Z|=(U&1)<<Q-Y-1,U>>=1;return Z},x.prototype.permute=function(U,Q,J,Z,Y,$){for(var F=0;F<$;F++)Z[F]=Q[U[F]],Y[F]=J[U[F]]},x.prototype.transform=function(U,Q,J,Z,Y,$){this.permute($,U,Q,J,Z,Y);for(var F=1;F<Y;F<<=1){var G=F<<1,X=Math.cos(2*Math.PI/G),I=Math.sin(2*Math.PI/G);for(var E=0;E<Y;E+=G){var C=X,j=I;for(var g=0;g<F;g++){var p=J[E+g],n=Z[E+g],$0=J[E+g+F],r=Z[E+g+F],d=C*$0-j*r;if(r=C*r+j*$0,$0=d,J[E+g]=p+$0,Z[E+g]=n+r,J[E+g+F]=p-$0,Z[E+g+F]=n-r,g!==G)d=X*C-I*j,j=X*j+I*C,C=d}}}},x.prototype.guessLen13b=function(U,Q){var J=Math.max(Q,U)|1,Z=J&1,Y=0;for(J=J/2|0;J;J=J>>>1)Y++;return 1<<Y+1+Z},x.prototype.conjugate=function(U,Q,J){if(J<=1)return;for(var Z=0;Z<J/2;Z++){var Y=U[Z];U[Z]=U[J-Z-1],U[J-Z-1]=Y,Y=Q[Z],Q[Z]=-Q[J-Z-1],Q[J-Z-1]=-Y}},x.prototype.normalize13b=function(U,Q){var J=0;for(var Z=0;Z<Q/2;Z++){var Y=Math.round(U[2*Z+1]/Q)*8192+Math.round(U[2*Z]/Q)+J;if(U[Z]=Y&67108863,Y<67108864)J=0;else J=Y/67108864|0}return U},x.prototype.convert13b=function(U,Q,J,Z){var Y=0;for(var $=0;$<Q;$++)Y=Y+(U[$]|0),J[2*$]=Y&8191,Y=Y>>>13,J[2*$+1]=Y&8191,Y=Y>>>13;for($=2*Q;$<Z;++$)J[$]=0;O(Y===0),O((Y&-8192)===0)},x.prototype.stub=function(U){var Q=Array(U);for(var J=0;J<U;J++)Q[J]=0;return Q},x.prototype.mulp=function(U,Q,J){var Z=2*this.guessLen13b(U.length,Q.length),Y=this.makeRBT(Z),$=this.stub(Z),F=Array(Z),G=Array(Z),X=Array(Z),I=Array(Z),E=Array(Z),C=Array(Z),j=J.words;j.length=Z,this.convert13b(U.words,U.length,F,Z),this.convert13b(Q.words,Q.length,I,Z),this.transform(F,$,G,X,Z,Y),this.transform(I,$,E,C,Z,Y);for(var g=0;g<Z;g++){var p=G[g]*E[g]-X[g]*C[g];X[g]=G[g]*C[g]+X[g]*E[g],G[g]=p}return this.conjugate(G,X,Z),this.transform(G,X,j,$,Z,Y),this.conjugate(j,$,Z),this.normalize13b(j,Z),J.negative=U.negative^Q.negative,J.length=U.length+Q.length,J.strip()},V.prototype.mul=function(U){var Q=new V(null);return Q.words=Array(this.length+U.length),this.mulTo(U,Q)},V.prototype.mulf=function(U){var Q=new V(null);return Q.words=Array(this.length+U.length),_(this,U,Q)},V.prototype.imul=function(U){return this.clone().mulTo(U,this)},V.prototype.imuln=function(U){O(typeof U==="number"),O(U<67108864);var Q=0;for(var J=0;J<this.length;J++){var Z=(this.words[J]|0)*U,Y=(Z&67108863)+(Q&67108863);Q>>=26,Q+=Z/67108864|0,Q+=Y>>>26,this.words[J]=Y&67108863}if(Q!==0)this.words[J]=Q,this.length++;return this.length=U===0?1:this.length,this},V.prototype.muln=function(U){return this.clone().imuln(U)},V.prototype.sqr=function(){return this.mul(this)},V.prototype.isqr=function(){return this.imul(this.clone())},V.prototype.pow=function(U){var Q=q(U);if(Q.length===0)return new V(1);var J=this;for(var Z=0;Z<Q.length;Z++,J=J.sqr())if(Q[Z]!==0)break;if(++Z<Q.length)for(var Y=J.sqr();Z<Q.length;Z++,Y=Y.sqr()){if(Q[Z]===0)continue;J=J.mul(Y)}return J},V.prototype.iushln=function(U){O(typeof U==="number"&&U>=0);var Q=U%26,J=(U-Q)/26,Z=67108863>>>26-Q<<26-Q,Y;if(Q!==0){var $=0;for(Y=0;Y<this.length;Y++){var F=this.words[Y]&Z,G=(this.words[Y]|0)-F<<Q;this.words[Y]=G|$,$=F>>>26-Q}if($)this.words[Y]=$,this.length++}if(J!==0){for(Y=this.length-1;Y>=0;Y--)this.words[Y+J]=this.words[Y];for(Y=0;Y<J;Y++)this.words[Y]=0;this.length+=J}return this.strip()},V.prototype.ishln=function(U){return O(this.negative===0),this.iushln(U)},V.prototype.iushrn=function(U,Q,J){O(typeof U==="number"&&U>=0);var Z;if(Q)Z=(Q-Q%26)/26;else Z=0;var Y=U%26,$=Math.min((U-Y)/26,this.length),F=67108863^67108863>>>Y<<Y,G=J;if(Z-=$,Z=Math.max(0,Z),G){for(var X=0;X<$;X++)G.words[X]=this.words[X];G.length=$}if($===0);else if(this.length>$){this.length-=$;for(X=0;X<this.length;X++)this.words[X]=this.words[X+$]}else this.words[0]=0,this.length=1;var I=0;for(X=this.length-1;X>=0&&(I!==0||X>=Z);X--){var E=this.words[X]|0;this.words[X]=I<<26-Y|E>>>Y,I=E&F}if(G&&I!==0)G.words[G.length++]=I;if(this.length===0)this.words[0]=0,this.length=1;return this.strip()},V.prototype.ishrn=function(U,Q,J){return O(this.negative===0),this.iushrn(U,Q,J)},V.prototype.shln=function(U){return this.clone().ishln(U)},V.prototype.ushln=function(U){return this.clone().iushln(U)},V.prototype.shrn=function(U){return this.clone().ishrn(U)},V.prototype.ushrn=function(U){return this.clone().iushrn(U)},V.prototype.testn=function(U){O(typeof U==="number"&&U>=0);var Q=U%26,J=(U-Q)/26,Z=1<<Q;if(this.length<=J)return!1;var Y=this.words[J];return!!(Y&Z)},V.prototype.imaskn=function(U){O(typeof U==="number"&&U>=0);var Q=U%26,J=(U-Q)/26;if(O(this.negative===0,"imaskn works only with positive numbers"),this.length<=J)return this;if(Q!==0)J++;if(this.length=Math.min(J,this.length),Q!==0){var Z=67108863^67108863>>>Q<<Q;this.words[this.length-1]&=Z}return this.strip()},V.prototype.maskn=function(U){return this.clone().imaskn(U)},V.prototype.iaddn=function(U){if(O(typeof U==="number"),O(U<67108864),U<0)return this.isubn(-U);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<U)return this.words[0]=U-(this.words[0]|0),this.negative=0,this;return this.negative=0,this.isubn(U),this.negative=1,this}return this._iaddn(U)},V.prototype._iaddn=function(U){this.words[0]+=U;for(var Q=0;Q<this.length&&this.words[Q]>=67108864;Q++)if(this.words[Q]-=67108864,Q===this.length-1)this.words[Q+1]=1;else this.words[Q+1]++;return this.length=Math.max(this.length,Q+1),this},V.prototype.isubn=function(U){if(O(typeof U==="number"),O(U<67108864),U<0)return this.iaddn(-U);if(this.negative!==0)return this.negative=0,this.iaddn(U),this.negative=1,this;if(this.words[0]-=U,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Q=0;Q<this.length&&this.words[Q]<0;Q++)this.words[Q]+=67108864,this.words[Q+1]-=1;return this.strip()},V.prototype.addn=function(U){return this.clone().iaddn(U)},V.prototype.subn=function(U){return this.clone().isubn(U)},V.prototype.iabs=function(){return this.negative=0,this},V.prototype.abs=function(){return this.clone().iabs()},V.prototype._ishlnsubmul=function(U,Q,J){var Z=U.length+J,Y;this._expand(Z);var $,F=0;for(Y=0;Y<U.length;Y++){$=(this.words[Y+J]|0)+F;var G=(U.words[Y]|0)*Q;$-=G&67108863,F=($>>26)-(G/67108864|0),this.words[Y+J]=$&67108863}for(;Y<this.length-J;Y++)$=(this.words[Y+J]|0)+F,F=$>>26,this.words[Y+J]=$&67108863;if(F===0)return this.strip();O(F===-1),F=0;for(Y=0;Y<this.length;Y++)$=-(this.words[Y]|0)+F,F=$>>26,this.words[Y]=$&67108863;return this.negative=1,this.strip()},V.prototype._wordDiv=function(U,Q){var J=this.length-U.length,Z=this.clone(),Y=U,$=Y.words[Y.length-1]|0,F=this._countBits($);if(J=26-F,J!==0)Y=Y.ushln(J),Z.iushln(J),$=Y.words[Y.length-1]|0;var G=Z.length-Y.length,X;if(Q!=="mod"){X=new V(null),X.length=G+1,X.words=Array(X.length);for(var I=0;I<X.length;I++)X.words[I]=0}var E=Z.clone()._ishlnsubmul(Y,1,G);if(E.negative===0){if(Z=E,X)X.words[G]=1}for(var C=G-1;C>=0;C--){var j=(Z.words[Y.length+C]|0)*67108864+(Z.words[Y.length+C-1]|0);j=Math.min(j/$|0,67108863),Z._ishlnsubmul(Y,j,C);while(Z.negative!==0)if(j--,Z.negative=0,Z._ishlnsubmul(Y,1,C),!Z.isZero())Z.negative^=1;if(X)X.words[C]=j}if(X)X.strip();if(Z.strip(),Q!=="div"&&J!==0)Z.iushrn(J);return{div:X||null,mod:Z}},V.prototype.divmod=function(U,Q,J){if(O(!U.isZero()),this.isZero())return{div:new V(0),mod:new V(0)};var Z,Y,$;if(this.negative!==0&&U.negative===0){if($=this.neg().divmod(U,Q),Q!=="mod")Z=$.div.neg();if(Q!=="div"){if(Y=$.mod.neg(),J&&Y.negative!==0)Y.iadd(U)}return{div:Z,mod:Y}}if(this.negative===0&&U.negative!==0){if($=this.divmod(U.neg(),Q),Q!=="mod")Z=$.div.neg();return{div:Z,mod:$.mod}}if((this.negative&U.negative)!==0){if($=this.neg().divmod(U.neg(),Q),Q!=="div"){if(Y=$.mod.neg(),J&&Y.negative!==0)Y.isub(U)}return{div:$.div,mod:Y}}if(U.length>this.length||this.cmp(U)<0)return{div:new V(0),mod:this};if(U.length===1){if(Q==="div")return{div:this.divn(U.words[0]),mod:null};if(Q==="mod")return{div:null,mod:new V(this.modn(U.words[0]))};return{div:this.divn(U.words[0]),mod:new V(this.modn(U.words[0]))}}return this._wordDiv(U,Q)},V.prototype.div=function(U){return this.divmod(U,"div",!1).div},V.prototype.mod=function(U){return this.divmod(U,"mod",!1).mod},V.prototype.umod=function(U){return this.divmod(U,"mod",!0).mod},V.prototype.divRound=function(U){var Q=this.divmod(U);if(Q.mod.isZero())return Q.div;var J=Q.div.negative!==0?Q.mod.isub(U):Q.mod,Z=U.ushrn(1),Y=U.andln(1),$=J.cmp(Z);if($<0||Y===1&&$===0)return Q.div;return Q.div.negative!==0?Q.div.isubn(1):Q.div.iaddn(1)},V.prototype.modn=function(U){O(U<=67108863);var Q=67108864%U,J=0;for(var Z=this.length-1;Z>=0;Z--)J=(Q*J+(this.words[Z]|0))%U;return J},V.prototype.idivn=function(U){O(U<=67108863);var Q=0;for(var J=this.length-1;J>=0;J--){var Z=(this.words[J]|0)+Q*67108864;this.words[J]=Z/U|0,Q=Z%U}return this.strip()},V.prototype.divn=function(U){return this.clone().idivn(U)},V.prototype.egcd=function(U){O(U.negative===0),O(!U.isZero());var Q=this,J=U.clone();if(Q.negative!==0)Q=Q.umod(U);else Q=Q.clone();var Z=new V(1),Y=new V(0),$=new V(0),F=new V(1),G=0;while(Q.isEven()&&J.isEven())Q.iushrn(1),J.iushrn(1),++G;var X=J.clone(),I=Q.clone();while(!Q.isZero()){for(var E=0,C=1;(Q.words[0]&C)===0&&E<26;++E,C<<=1);if(E>0){Q.iushrn(E);while(E-- >0){if(Z.isOdd()||Y.isOdd())Z.iadd(X),Y.isub(I);Z.iushrn(1),Y.iushrn(1)}}for(var j=0,g=1;(J.words[0]&g)===0&&j<26;++j,g<<=1);if(j>0){J.iushrn(j);while(j-- >0){if($.isOdd()||F.isOdd())$.iadd(X),F.isub(I);$.iushrn(1),F.iushrn(1)}}if(Q.cmp(J)>=0)Q.isub(J),Z.isub($),Y.isub(F);else J.isub(Q),$.isub(Z),F.isub(Y)}return{a:$,b:F,gcd:J.iushln(G)}},V.prototype._invmp=function(U){O(U.negative===0),O(!U.isZero());var Q=this,J=U.clone();if(Q.negative!==0)Q=Q.umod(U);else Q=Q.clone();var Z=new V(1),Y=new V(0),$=J.clone();while(Q.cmpn(1)>0&&J.cmpn(1)>0){for(var F=0,G=1;(Q.words[0]&G)===0&&F<26;++F,G<<=1);if(F>0){Q.iushrn(F);while(F-- >0){if(Z.isOdd())Z.iadd($);Z.iushrn(1)}}for(var X=0,I=1;(J.words[0]&I)===0&&X<26;++X,I<<=1);if(X>0){J.iushrn(X);while(X-- >0){if(Y.isOdd())Y.iadd($);Y.iushrn(1)}}if(Q.cmp(J)>=0)Q.isub(J),Z.isub(Y);else J.isub(Q),Y.isub(Z)}var E;if(Q.cmpn(1)===0)E=Z;else E=Y;if(E.cmpn(0)<0)E.iadd(U);return E},V.prototype.gcd=function(U){if(this.isZero())return U.abs();if(U.isZero())return this.abs();var Q=this.clone(),J=U.clone();Q.negative=0,J.negative=0;for(var Z=0;Q.isEven()&&J.isEven();Z++)Q.iushrn(1),J.iushrn(1);do{while(Q.isEven())Q.iushrn(1);while(J.isEven())J.iushrn(1);var Y=Q.cmp(J);if(Y<0){var $=Q;Q=J,J=$}else if(Y===0||J.cmpn(1)===0)break;Q.isub(J)}while(!0);return J.iushln(Z)},V.prototype.invm=function(U){return this.egcd(U).a.umod(U)},V.prototype.isEven=function(){return(this.words[0]&1)===0},V.prototype.isOdd=function(){return(this.words[0]&1)===1},V.prototype.andln=function(U){return this.words[0]&U},V.prototype.bincn=function(U){O(typeof U==="number");var Q=U%26,J=(U-Q)/26,Z=1<<Q;if(this.length<=J)return this._expand(J+1),this.words[J]|=Z,this;var Y=Z;for(var $=J;Y!==0&&$<this.length;$++){var F=this.words[$]|0;F+=Y,Y=F>>>26,F&=67108863,this.words[$]=F}if(Y!==0)this.words[$]=Y,this.length++;return this},V.prototype.isZero=function(){return this.length===1&&this.words[0]===0},V.prototype.cmpn=function(U){var Q=U<0;if(this.negative!==0&&!Q)return-1;if(this.negative===0&&Q)return 1;this.strip();var J;if(this.length>1)J=1;else{if(Q)U=-U;O(U<=67108863,"Number is too big");var Z=this.words[0]|0;J=Z===U?0:Z<U?-1:1}if(this.negative!==0)return-J|0;return J},V.prototype.cmp=function(U){if(this.negative!==0&&U.negative===0)return-1;if(this.negative===0&&U.negative!==0)return 1;var Q=this.ucmp(U);if(this.negative!==0)return-Q|0;return Q},V.prototype.ucmp=function(U){if(this.length>U.length)return 1;if(this.length<U.length)return-1;var Q=0;for(var J=this.length-1;J>=0;J--){var Z=this.words[J]|0,Y=U.words[J]|0;if(Z===Y)continue;if(Z<Y)Q=-1;else if(Z>Y)Q=1;break}return Q},V.prototype.gtn=function(U){return this.cmpn(U)===1},V.prototype.gt=function(U){return this.cmp(U)===1},V.prototype.gten=function(U){return this.cmpn(U)>=0},V.prototype.gte=function(U){return this.cmp(U)>=0},V.prototype.ltn=function(U){return this.cmpn(U)===-1},V.prototype.lt=function(U){return this.cmp(U)===-1},V.prototype.lten=function(U){return this.cmpn(U)<=0},V.prototype.lte=function(U){return this.cmp(U)<=0},V.prototype.eqn=function(U){return this.cmpn(U)===0},V.prototype.eq=function(U){return this.cmp(U)===0},V.red=function(U){return new u(U)},V.prototype.toRed=function(U){return O(!this.red,"Already a number in reduction context"),O(this.negative===0,"red works only with positives"),U.convertTo(this)._forceRed(U)},V.prototype.fromRed=function(){return O(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},V.prototype._forceRed=function(U){return this.red=U,this},V.prototype.forceRed=function(U){return O(!this.red,"Already a number in reduction context"),this._forceRed(U)},V.prototype.redAdd=function(U){return O(this.red,"redAdd works only with red numbers"),this.red.add(this,U)},V.prototype.redIAdd=function(U){return O(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,U)},V.prototype.redSub=function(U){return O(this.red,"redSub works only with red numbers"),this.red.sub(this,U)},V.prototype.redISub=function(U){return O(this.red,"redISub works only with red numbers"),this.red.isub(this,U)},V.prototype.redShl=function(U){return O(this.red,"redShl works only with red numbers"),this.red.shl(this,U)},V.prototype.redMul=function(U){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,U),this.red.mul(this,U)},V.prototype.redIMul=function(U){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,U),this.red.imul(this,U)},V.prototype.redSqr=function(){return O(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},V.prototype.redISqr=function(){return O(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},V.prototype.redSqrt=function(){return O(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},V.prototype.redInvm=function(){return O(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},V.prototype.redNeg=function(){return O(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},V.prototype.redPow=function(U){return O(this.red&&!U.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,U)};var w={k256:null,p224:null,p192:null,p25519:null};function y(U,Q){this.name=U,this.p=new V(Q,16),this.n=this.p.bitLength(),this.k=new V(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}y.prototype._tmp=function(){var U=new V(null);return U.words=Array(Math.ceil(this.n/13)),U},y.prototype.ireduce=function(U){var Q=U,J;do this.split(Q,this.tmp),Q=this.imulK(Q),Q=Q.iadd(this.tmp),J=Q.bitLength();while(J>this.n);var Z=J<this.n?-1:Q.ucmp(this.p);if(Z===0)Q.words[0]=0,Q.length=1;else if(Z>0)Q.isub(this.p);else if(Q.strip!==void 0)Q.strip();else Q._strip();return Q},y.prototype.split=function(U,Q){U.iushrn(this.n,0,Q)},y.prototype.imulK=function(U){return U.imul(this.k)};function l(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}L(l,y),l.prototype.split=function(U,Q){var J=4194303,Z=Math.min(U.length,9);for(var Y=0;Y<Z;Y++)Q.words[Y]=U.words[Y];if(Q.length=Z,U.length<=9){U.words[0]=0,U.length=1;return}var $=U.words[9];Q.words[Q.length++]=$&J;for(Y=10;Y<U.length;Y++){var F=U.words[Y]|0;U.words[Y-10]=(F&J)<<4|$>>>22,$=F}if($>>>=22,U.words[Y-10]=$,$===0&&U.length>10)U.length-=10;else U.length-=9},l.prototype.imulK=function(U){U.words[U.length]=0,U.words[U.length+1]=0,U.length+=2;var Q=0;for(var J=0;J<U.length;J++){var Z=U.words[J]|0;Q+=Z*977,U.words[J]=Q&67108863,Q=Z*64+(Q/67108864|0)}if(U.words[U.length-1]===0){if(U.length--,U.words[U.length-1]===0)U.length--}return U};function J0(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}L(J0,y);function K0(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}L(K0,y);function V0(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}L(V0,y),V0.prototype.imulK=function(U){var Q=0;for(var J=0;J<U.length;J++){var Z=(U.words[J]|0)*19+Q,Y=Z&67108863;Z>>>=26,U.words[J]=Y,Q=Z}if(Q!==0)U.words[U.length++]=Q;return U},V._prime=function(U){if(w[U])return w[U];var Q;if(U==="k256")Q=new l;else if(U==="p224")Q=new J0;else if(U==="p192")Q=new K0;else if(U==="p25519")Q=new V0;else throw Error("Unknown prime "+U);return w[U]=Q,Q};function u(U){if(typeof U==="string"){var Q=V._prime(U);this.m=Q.p,this.prime=Q}else O(U.gtn(1),"modulus must be greater than 1"),this.m=U,this.prime=null}u.prototype._verify1=function(U){O(U.negative===0,"red works only with positives"),O(U.red,"red works only with red numbers")},u.prototype._verify2=function(U,Q){O((U.negative|Q.negative)===0,"red works only with positives"),O(U.red&&U.red===Q.red,"red works only with red numbers")},u.prototype.imod=function(U){if(this.prime)return this.prime.ireduce(U)._forceRed(this);return U.umod(this.m)._forceRed(this)},u.prototype.neg=function(U){if(U.isZero())return U.clone();return this.m.sub(U)._forceRed(this)},u.prototype.add=function(U,Q){this._verify2(U,Q);var J=U.add(Q);if(J.cmp(this.m)>=0)J.isub(this.m);return J._forceRed(this)},u.prototype.iadd=function(U,Q){this._verify2(U,Q);var J=U.iadd(Q);if(J.cmp(this.m)>=0)J.isub(this.m);return J},u.prototype.sub=function(U,Q){this._verify2(U,Q);var J=U.sub(Q);if(J.cmpn(0)<0)J.iadd(this.m);return J._forceRed(this)},u.prototype.isub=function(U,Q){this._verify2(U,Q);var J=U.isub(Q);if(J.cmpn(0)<0)J.iadd(this.m);return J},u.prototype.shl=function(U,Q){return this._verify1(U),this.imod(U.ushln(Q))},u.prototype.imul=function(U,Q){return this._verify2(U,Q),this.imod(U.imul(Q))},u.prototype.mul=function(U,Q){return this._verify2(U,Q),this.imod(U.mul(Q))},u.prototype.isqr=function(U){return this.imul(U,U.clone())},u.prototype.sqr=function(U){return this.mul(U,U)},u.prototype.sqrt=function(U){if(U.isZero())return U.clone();var Q=this.m.andln(3);if(O(Q%2===1),Q===3){var J=this.m.add(new V(1)).iushrn(2);return this.pow(U,J)}var Z=this.m.subn(1),Y=0;while(!Z.isZero()&&Z.andln(1)===0)Y++,Z.iushrn(1);O(!Z.isZero());var $=new V(1).toRed(this),F=$.redNeg(),G=this.m.subn(1).iushrn(1),X=this.m.bitLength();X=new V(2*X*X).toRed(this);while(this.pow(X,G).cmp(F)!==0)X.redIAdd(F);var I=this.pow(X,Z),E=this.pow(U,Z.addn(1).iushrn(1)),C=this.pow(U,Z),j=Y;while(C.cmp($)!==0){var g=C;for(var p=0;g.cmp($)!==0;p++)g=g.redSqr();O(p<j);var n=this.pow(I,new V(1).iushln(j-p-1));E=E.redMul(n),I=n.redSqr(),C=C.redMul(I),j=p}return E},u.prototype.invm=function(U){var Q=U._invmp(this.m);if(Q.negative!==0)return Q.negative=0,this.imod(Q).redNeg();else return this.imod(Q)},u.prototype.pow=function(U,Q){if(Q.isZero())return new V(1).toRed(this);if(Q.cmpn(1)===0)return U.clone();var J=4,Z=Array(1<<J);Z[0]=new V(1).toRed(this),Z[1]=U;for(var Y=2;Y<Z.length;Y++)Z[Y]=this.mul(Z[Y-1],U);var $=Z[0],F=0,G=0,X=Q.bitLength()%26;if(X===0)X=26;for(Y=Q.length-1;Y>=0;Y--){var I=Q.words[Y];for(var E=X-1;E>=0;E--){var C=I>>E&1;if($!==Z[0])$=this.sqr($);if(C===0&&F===0){G=0;continue}if(F<<=1,F|=C,G++,G!==J&&(Y!==0||E!==0))continue;$=this.mul($,Z[F]),G=0,F=0}X=26}return $},u.prototype.convertTo=function(U){var Q=U.umod(this.m);return Q===U?Q.clone():Q},u.prototype.convertFrom=function(U){var Q=U.clone();return Q.red=null,Q},V.mont=function(U){return new X0(U)};function X0(U){if(u.call(this,U),this.shift=this.m.bitLength(),this.shift%26!==0)this.shift+=26-this.shift%26;this.r=new V(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)}L(X0,u),X0.prototype.convertTo=function(U){return this.imod(U.ushln(this.shift))},X0.prototype.convertFrom=function(U){var Q=this.imod(U.mul(this.rinv));return Q.red=null,Q},X0.prototype.imul=function(U,Q){if(U.isZero()||Q.isZero())return U.words[0]=0,U.length=1,U;var J=U.imul(Q),Z=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=J.isub(Z).iushrn(this.shift),$=Y;if(Y.cmp(this.m)>=0)$=Y.isub(this.m);else if(Y.cmpn(0)<0)$=Y.iadd(this.m);return $._forceRed(this)},X0.prototype.mul=function(U,Q){if(U.isZero()||Q.isZero())return new V(0)._forceRed(this);var J=U.mul(Q),Z=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=J.isub(Z).iushrn(this.shift),$=Y;if(Y.cmp(this.m)>=0)$=Y.isub(this.m);else if(Y.cmpn(0)<0)$=Y.iadd(this.m);return $._forceRed(this)},X0.prototype.invm=function(U){var Q=this.imod(U._invmp(this.m).mul(this.r2));return Q._forceRed(this)}})(typeof W>"u"||W,K)}),MV=G0((K)=>{var W=WX(),H=qU(),T=K;T.define=function(L,V){return new O(L,V)};function O(L,V){this.name=L,this.body=V,this.decoders={},this.encoders={}}O.prototype._createNamed=function(L){var V;try{V=(()=>{throw new Error("Cannot require module "+"vm");})().runInThisContext("(function "+this.name+`(entity) {
3
+ this._initNamed(entity);
4
+ })`)}catch(P){V=function(S){this._initNamed(S)}}return H(V,L),V.prototype._initNamed=function(P){L.call(this,P)},new V(this)},O.prototype._getDecoder=function(L){if(L=L||"der",!this.decoders.hasOwnProperty(L))this.decoders[L]=this._createNamed(W.decoders[L]);return this.decoders[L]},O.prototype.decode=function(L,V,P){return this._getDecoder(V).decode(L,P)},O.prototype._getEncoder=function(L){if(L=L||"der",!this.encoders.hasOwnProperty(L))this.encoders[L]=this._createNamed(W.encoders[L]);return this.encoders[L]},O.prototype.encode=function(L,V,P){return this._getEncoder(V).encode(L,P)}}),LV=G0((K)=>{var W=qU();function H(O){this._reporterState={obj:null,path:[],options:O||{},errors:[]}}K.Reporter=H,H.prototype.isError=function(O){return O instanceof T},H.prototype.save=function(){var O=this._reporterState;return{obj:O.obj,pathLen:O.path.length}},H.prototype.restore=function(O){var L=this._reporterState;L.obj=O.obj,L.path=L.path.slice(0,O.pathLen)},H.prototype.enterKey=function(O){return this._reporterState.path.push(O)},H.prototype.exitKey=function(O){var L=this._reporterState;L.path=L.path.slice(0,O-1)},H.prototype.leaveKey=function(O,L,V){var P=this._reporterState;if(this.exitKey(O),P.obj!==null)P.obj[L]=V},H.prototype.path=function(){return this._reporterState.path.join("/")},H.prototype.enterObject=function(){var O=this._reporterState,L=O.obj;return O.obj={},L},H.prototype.leaveObject=function(O){var L=this._reporterState,V=L.obj;return L.obj=O,V},H.prototype.error=function(O){var L,V=this._reporterState,P=O instanceof T;if(P)L=O;else L=new T(V.path.map(function(S){return"["+JSON.stringify(S)+"]"}).join(""),O.message||O,O.stack);if(!V.options.partial)throw L;if(!P)V.errors.push(L);return L},H.prototype.wrapResult=function(O){var L=this._reporterState;if(!L.options.partial)return O;return{result:this.isError(O)?null:O,errors:L.errors}};function T(O,L){this.path=O,this.rethrow(L)}W(T,Error),T.prototype.rethrow=function(O){if(this.message=O+" at: "+(this.path||"(shallow)"),Error.captureStackTrace)Error.captureStackTrace(this,T);if(!this.stack)try{throw Error(this.message)}catch(L){this.stack=L.stack}return this}}),GQ=G0((K)=>{var W=qU(),H=VX().Reporter,T=(OU(),h0(HU)).Buffer;function O(V,P){if(H.call(this,P),!T.isBuffer(V)){this.error("Input not Buffer");return}this.base=V,this.offset=0,this.length=V.length}W(O,H),K.DecoderBuffer=O,O.prototype.save=function(){return{offset:this.offset,reporter:H.prototype.save.call(this)}},O.prototype.restore=function(V){var P=new O(this.base);return P.offset=V.offset,P.length=this.offset,this.offset=V.offset,H.prototype.restore.call(this,V.reporter),P},O.prototype.isEmpty=function(){return this.offset===this.length},O.prototype.readUInt8=function(V){if(this.offset+1<=this.length)return this.base.readUInt8(this.offset++,!0);else return this.error(V||"DecoderBuffer overrun")},O.prototype.skip=function(V,P){if(!(this.offset+V<=this.length))return this.error(P||"DecoderBuffer overrun");var S=new O(this.base);return S._reporterState=this._reporterState,S.offset=this.offset,S.length=this.offset+V,this.offset+=V,S},O.prototype.raw=function(V){return this.base.slice(V?V.offset:this.offset,this.length)};function L(V,P){if(Array.isArray(V))this.length=0,this.value=V.map(function(S){if(!(S instanceof L))S=new L(S,P);return this.length+=S.length,S},this);else if(typeof V==="number"){if(!(0<=V&&V<=255))return P.error("non-byte EncoderBuffer value");this.value=V,this.length=1}else if(typeof V==="string")this.value=V,this.length=T.byteLength(V);else if(T.isBuffer(V))this.value=V,this.length=V.length;else return P.error("Unsupported type: "+typeof V)}K.EncoderBuffer=L,L.prototype.join=function(V,P){if(!V)V=new T(this.length);if(!P)P=0;if(this.length===0)return V;if(Array.isArray(this.value))this.value.forEach(function(S){S.join(V,P),P+=S.length});else{if(typeof this.value==="number")V[P]=this.value;else if(typeof this.value==="string")V.write(this.value,P);else if(T.isBuffer(this.value))this.value.copy(V,P);P+=this.length}return V}}),EV=G0((K,W)=>{var H=VX().Reporter,T=VX().EncoderBuffer,O=VX().DecoderBuffer,L=uU(),V=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],P=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(V),S=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function M(A,D){var R={};if(this._baseState=R,R.enc=A,R.parent=D||null,R.children=null,R.tag=null,R.args=null,R.reverseArgs=null,R.choice=null,R.optional=!1,R.any=!1,R.obj=!1,R.use=null,R.useDecoder=null,R.key=null,R.default=null,R.explicit=null,R.implicit=null,R.contains=null,!R.parent)R.children=[],this._wrap()}W.exports=M;var z=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];M.prototype.clone=function(){var A=this._baseState,D={};z.forEach(function(q){D[q]=A[q]});var R=new this.constructor(D.parent);return R._baseState=D,R},M.prototype._wrap=function(){var A=this._baseState;P.forEach(function(D){this[D]=function(){var R=new this.constructor(this);return A.children.push(R),R[D].apply(R,arguments)}},this)},M.prototype._init=function(A){var D=this._baseState;L(D.parent===null),A.call(this),D.children=D.children.filter(function(R){return R._baseState.parent===this},this),L.equal(D.children.length,1,"Root node can have only one child")},M.prototype._useArgs=function(A){var D=this._baseState,R=A.filter(function(q){return q instanceof this.constructor},this);if(A=A.filter(function(q){return!(q instanceof this.constructor)},this),R.length!==0)L(D.children===null),D.children=R,R.forEach(function(q){q._baseState.parent=this},this);if(A.length!==0)L(D.args===null),D.args=A,D.reverseArgs=A.map(function(q){if(typeof q!=="object"||q.constructor!==Object)return q;var v={};return Object.keys(q).forEach(function(k){if(k==(k|0))k|=0;var B=q[k];v[B]=k}),v})},S.forEach(function(A){M.prototype[A]=function(){var D=this._baseState;throw Error(A+" not implemented for encoding: "+D.enc)}}),V.forEach(function(A){M.prototype[A]=function(){var D=this._baseState,R=Array.prototype.slice.call(arguments);return L(D.tag===null),D.tag=A,this._useArgs(R),this}}),M.prototype.use=function(A){L(A);var D=this._baseState;return L(D.use===null),D.use=A,this},M.prototype.optional=function(){var A=this._baseState;return A.optional=!0,this},M.prototype.def=function(A){var D=this._baseState;return L(D.default===null),D.default=A,D.optional=!0,this},M.prototype.explicit=function(A){var D=this._baseState;return L(D.explicit===null&&D.implicit===null),D.explicit=A,this},M.prototype.implicit=function(A){var D=this._baseState;return L(D.explicit===null&&D.implicit===null),D.implicit=A,this},M.prototype.obj=function(){var A=this._baseState,D=Array.prototype.slice.call(arguments);if(A.obj=!0,D.length!==0)this._useArgs(D);return this},M.prototype.key=function(A){var D=this._baseState;return L(D.key===null),D.key=A,this},M.prototype.any=function(){var A=this._baseState;return A.any=!0,this},M.prototype.choice=function(A){var D=this._baseState;return L(D.choice===null),D.choice=A,this._useArgs(Object.keys(A).map(function(R){return A[R]})),this},M.prototype.contains=function(A){var D=this._baseState;return L(D.use===null),D.contains=A,this},M.prototype._decode=function(A,D){var R=this._baseState;if(R.parent===null)return A.wrapResult(R.children[0]._decode(A,D));var q=R.default,v=!0,k=null;if(R.key!==null)k=A.enterKey(R.key);if(R.optional){var B=null;if(R.explicit!==null)B=R.explicit;else if(R.implicit!==null)B=R.implicit;else if(R.tag!==null)B=R.tag;if(B===null&&!R.any){var _=A.save();try{if(R.choice===null)this._decodeGeneric(R.tag,A,D);else this._decodeChoice(A,D);v=!0}catch(K0){v=!1}A.restore(_)}else if(v=this._peekTag(A,B,R.any),A.isError(v))return v}var x;if(R.obj&&v)x=A.enterObject();if(v){if(R.explicit!==null){var w=this._decodeTag(A,R.explicit);if(A.isError(w))return w;A=w}var y=A.offset;if(R.use===null&&R.choice===null){if(R.any)var _=A.save();var l=this._decodeTag(A,R.implicit!==null?R.implicit:R.tag,R.any);if(A.isError(l))return l;if(R.any)q=A.raw(_);else A=l}if(D&&D.track&&R.tag!==null)D.track(A.path(),y,A.length,"tagged");if(D&&D.track&&R.tag!==null)D.track(A.path(),A.offset,A.length,"content");if(R.any)q=q;else if(R.choice===null)q=this._decodeGeneric(R.tag,A,D);else q=this._decodeChoice(A,D);if(A.isError(q))return q;if(!R.any&&R.choice===null&&R.children!==null)R.children.forEach(function(K0){K0._decode(A,D)});if(R.contains&&(R.tag==="octstr"||R.tag==="bitstr")){var J0=new O(q);q=this._getUse(R.contains,A._reporterState.obj)._decode(J0,D)}}if(R.obj&&v)q=A.leaveObject(x);if(R.key!==null&&(q!==null||v===!0))A.leaveKey(k,R.key,q);else if(k!==null)A.exitKey(k);return q},M.prototype._decodeGeneric=function(A,D,R){var q=this._baseState;if(A==="seq"||A==="set")return null;if(A==="seqof"||A==="setof")return this._decodeList(D,A,q.args[0],R);else if(/str$/.test(A))return this._decodeStr(D,A,R);else if(A==="objid"&&q.args)return this._decodeObjid(D,q.args[0],q.args[1],R);else if(A==="objid")return this._decodeObjid(D,null,null,R);else if(A==="gentime"||A==="utctime")return this._decodeTime(D,A,R);else if(A==="null_")return this._decodeNull(D,R);else if(A==="bool")return this._decodeBool(D,R);else if(A==="objDesc")return this._decodeStr(D,A,R);else if(A==="int"||A==="enum")return this._decodeInt(D,q.args&&q.args[0],R);if(q.use!==null)return this._getUse(q.use,D._reporterState.obj)._decode(D,R);else return D.error("unknown tag: "+A)},M.prototype._getUse=function(A,D){var R=this._baseState;if(R.useDecoder=this._use(A,D),L(R.useDecoder._baseState.parent===null),R.useDecoder=R.useDecoder._baseState.children[0],R.implicit!==R.useDecoder._baseState.implicit)R.useDecoder=R.useDecoder.clone(),R.useDecoder._baseState.implicit=R.implicit;return R.useDecoder},M.prototype._decodeChoice=function(A,D){var R=this._baseState,q=null,v=!1;if(Object.keys(R.choice).some(function(k){var B=A.save(),_=R.choice[k];try{var x=_._decode(A,D);if(A.isError(x))return!1;q={type:k,value:x},v=!0}catch(w){return A.restore(B),!1}return!0},this),!v)return A.error("Choice not matched");return q},M.prototype._createEncoderBuffer=function(A){return new T(A,this.reporter)},M.prototype._encode=function(A,D,R){var q=this._baseState;if(q.default!==null&&q.default===A)return;var v=this._encodeValue(A,D,R);if(v===void 0)return;if(this._skipDefault(v,D,R))return;return v},M.prototype._encodeValue=function(A,D,R){var q=this._baseState;if(q.parent===null)return q.children[0]._encode(A,D||new H);var _=null;if(this.reporter=D,q.optional&&A===void 0)if(q.default!==null)A=q.default;else return;var v=null,k=!1;if(q.any)_=this._createEncoderBuffer(A);else if(q.choice)_=this._encodeChoice(A,D);else if(q.contains)v=this._getUse(q.contains,R)._encode(A,D),k=!0;else if(q.children)v=q.children.map(function(y){if(y._baseState.tag==="null_")return y._encode(null,D,A);if(y._baseState.key===null)return D.error("Child should have a key");var l=D.enterKey(y._baseState.key);if(typeof A!=="object")return D.error("Child expected, but input is not object");var J0=y._encode(A[y._baseState.key],D,A);return D.leaveKey(l),J0},this).filter(function(y){return y}),v=this._createEncoderBuffer(v);else if(q.tag==="seqof"||q.tag==="setof"){if(!(q.args&&q.args.length===1))return D.error("Too many args for : "+q.tag);if(!Array.isArray(A))return D.error("seqof/setof, but data is not Array");var B=this.clone();B._baseState.implicit=null,v=this._createEncoderBuffer(A.map(function(y){var l=this._baseState;return this._getUse(l.args[0],A)._encode(y,D)},B))}else if(q.use!==null)_=this._getUse(q.use,R)._encode(A,D);else v=this._encodePrimitive(q.tag,A),k=!0;var _;if(!q.any&&q.choice===null){var x=q.implicit!==null?q.implicit:q.tag,w=q.implicit===null?"universal":"context";if(x===null){if(q.use===null)D.error("Tag could be omitted only for .use()")}else if(q.use===null)_=this._encodeComposite(x,k,w,v)}if(q.explicit!==null)_=this._encodeComposite(q.explicit,!1,"context",_);return _},M.prototype._encodeChoice=function(A,D){var R=this._baseState,q=R.choice[A.type];if(!q)L(!1,A.type+" not found in "+JSON.stringify(Object.keys(R.choice)));return q._encode(A.value,D)},M.prototype._encodePrimitive=function(A,D){var R=this._baseState;if(/str$/.test(A))return this._encodeStr(D,A);else if(A==="objid"&&R.args)return this._encodeObjid(D,R.reverseArgs[0],R.args[1]);else if(A==="objid")return this._encodeObjid(D,null,null);else if(A==="gentime"||A==="utctime")return this._encodeTime(D,A);else if(A==="null_")return this._encodeNull();else if(A==="int"||A==="enum")return this._encodeInt(D,R.args&&R.reverseArgs[0]);else if(A==="bool")return this._encodeBool(D);else if(A==="objDesc")return this._encodeStr(D,A);else throw Error("Unsupported tag: "+A)},M.prototype._isNumstr=function(A){return/^[0-9 ]*$/.test(A)},M.prototype._isPrintstr=function(A){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(A)}}),VX=G0((K)=>{var W=K;W.Reporter=LV().Reporter,W.DecoderBuffer=GQ().DecoderBuffer,W.EncoderBuffer=GQ().EncoderBuffer,W.Node=EV()}),RV=G0((K)=>{var W=PQ();K.tagClass={0:"universal",1:"application",2:"context",3:"private"},K.tagClassByName=W._reverse(K.tagClass),K.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},K.tagByName=W._reverse(K.tag)}),PQ=G0((K)=>{var W=K;W._reverse=function(H){var T={};return Object.keys(H).forEach(function(O){if((O|0)==O)O=O|0;var L=H[O];T[L]=O}),T},W.der=RV()}),kQ=G0((K,W)=>{var H=qU(),T=WX(),O=T.base,L=T.bignum,V=T.constants.der;function P(A){this.enc="der",this.name=A.name,this.entity=A,this.tree=new S,this.tree._init(A.body)}W.exports=P,P.prototype.decode=function(A,D){if(!(A instanceof O.DecoderBuffer))A=new O.DecoderBuffer(A,D);return this.tree._decode(A,D)};function S(A){O.Node.call(this,"der",A)}H(S,O.Node),S.prototype._peekTag=function(A,D,R){if(A.isEmpty())return!1;var q=A.save(),v=M(A,'Failed to peek tag: "'+D+'"');if(A.isError(v))return v;return A.restore(q),v.tag===D||v.tagStr===D||v.tagStr+"of"===D||R},S.prototype._decodeTag=function(A,D,R){var q=M(A,'Failed to decode tag of "'+D+'"');if(A.isError(q))return q;var v=z(A,q.primitive,'Failed to get length of "'+D+'"');if(A.isError(v))return v;if(!R&&q.tag!==D&&q.tagStr!==D&&q.tagStr+"of"!==D)return A.error('Failed to match tag: "'+D+'"');if(q.primitive||v!==null)return A.skip(v,'Failed to match body of: "'+D+'"');var k=A.save(),B=this._skipUntilEnd(A,'Failed to skip indefinite length body: "'+this.tag+'"');if(A.isError(B))return B;return v=A.offset-k.offset,A.restore(k),A.skip(v,'Failed to match body of: "'+D+'"')},S.prototype._skipUntilEnd=function(A,D){while(!0){var R=M(A,D);if(A.isError(R))return R;var q=z(A,R.primitive,D);if(A.isError(q))return q;var v;if(R.primitive||q!==null)v=A.skip(q);else v=this._skipUntilEnd(A,D);if(A.isError(v))return v;if(R.tagStr==="end")break}},S.prototype._decodeList=function(A,D,R,q){var v=[];while(!A.isEmpty()){var k=this._peekTag(A,"end");if(A.isError(k))return k;var B=R.decode(A,"der",q);if(A.isError(B)&&k)break;v.push(B)}return v},S.prototype._decodeStr=function(A,D){if(D==="bitstr"){var R=A.readUInt8();if(A.isError(R))return R;return{unused:R,data:A.raw()}}else if(D==="bmpstr"){var q=A.raw();if(q.length%2===1)return A.error("Decoding of string type: bmpstr length mismatch");var v="";for(var k=0;k<q.length/2;k++)v+=String.fromCharCode(q.readUInt16BE(k*2));return v}else if(D==="numstr"){var B=A.raw().toString("ascii");if(!this._isNumstr(B))return A.error("Decoding of string type: numstr unsupported characters");return B}else if(D==="octstr")return A.raw();else if(D==="objDesc")return A.raw();else if(D==="printstr"){var _=A.raw().toString("ascii");if(!this._isPrintstr(_))return A.error("Decoding of string type: printstr unsupported characters");return _}else if(/str$/.test(D))return A.raw().toString();else return A.error("Decoding of string type: "+D+" unsupported")},S.prototype._decodeObjid=function(A,D,R){var q,v=[],k=0;while(!A.isEmpty()){var B=A.readUInt8();if(k<<=7,k|=B&127,(B&128)===0)v.push(k),k=0}if(B&128)v.push(k);var _=v[0]/40|0,x=v[0]%40;if(R)q=v;else q=[_,x].concat(v.slice(1));if(D){var w=D[q.join(" ")];if(w===void 0)w=D[q.join(".")];if(w!==void 0)q=w}return q},S.prototype._decodeTime=function(A,D){var R=A.raw().toString();if(D==="gentime")var q=R.slice(0,4)|0,v=R.slice(4,6)|0,k=R.slice(6,8)|0,B=R.slice(8,10)|0,_=R.slice(10,12)|0,x=R.slice(12,14)|0;else if(D==="utctime"){var q=R.slice(0,2)|0,v=R.slice(2,4)|0,k=R.slice(4,6)|0,B=R.slice(6,8)|0,_=R.slice(8,10)|0,x=R.slice(10,12)|0;if(q<70)q=2000+q;else q=1900+q}else return A.error("Decoding "+D+" time is not supported yet");return Date.UTC(q,v-1,k,B,_,x,0)},S.prototype._decodeNull=function(A){return null},S.prototype._decodeBool=function(A){var D=A.readUInt8();if(A.isError(D))return D;else return D!==0},S.prototype._decodeInt=function(A,D){var R=A.raw(),q=new L(R);if(D)q=D[q.toString(10)]||q;return q},S.prototype._use=function(A,D){if(typeof A==="function")A=A(D);return A._getDecoder("der").tree};function M(A,D){var R=A.readUInt8(D);if(A.isError(R))return R;var q=V.tagClass[R>>6],v=(R&32)===0;if((R&31)===31){var k=R;R=0;while((k&128)===128){if(k=A.readUInt8(D),A.isError(k))return k;R<<=7,R|=k&127}}else R&=31;var B=V.tag[R];return{cls:q,primitive:v,tag:R,tagStr:B}}function z(A,D,R){var q=A.readUInt8(R);if(A.isError(q))return q;if(!D&&q===128)return null;if((q&128)===0)return q;var v=q&127;if(v>4)return A.error("length octect is too long");q=0;for(var k=0;k<v;k++){q<<=8;var B=A.readUInt8(R);if(A.isError(B))return B;q|=B}return q}}),qV=G0((K,W)=>{var H=qU(),T=(OU(),h0(HU)).Buffer,O=kQ();function L(V){O.call(this,V),this.enc="pem"}H(L,O),W.exports=L,L.prototype.decode=function(V,P){var S=V.toString().split(/[\r\n]+/g),M=P.label.toUpperCase(),z=/^-----(BEGIN|END) ([^-]+)-----$/,A=-1,D=-1;for(var R=0;R<S.length;R++){var q=S[R].match(z);if(q===null)continue;if(q[2]!==M)continue;if(A===-1){if(q[1]!=="BEGIN")break;A=R}else{if(q[1]!=="END")break;D=R;break}}if(A===-1||D===-1)throw Error("PEM section not found for: "+M);var v=S.slice(A+1,D).join("");v.replace(/[^a-z0-9\+\/=]+/gi,"");var k=new T(v,"base64");return O.prototype.decode.call(this,k,P)}}),SV=G0((K)=>{var W=K;W.der=kQ(),W.pem=qV()}),jQ=G0((K,W)=>{var H=qU(),T=(OU(),h0(HU)).Buffer,O=WX(),L=O.base,V=O.constants.der;function P(A){this.enc="der",this.name=A.name,this.entity=A,this.tree=new S,this.tree._init(A.body)}W.exports=P,P.prototype.encode=function(A,D){return this.tree._encode(A,D).join()};function S(A){L.Node.call(this,"der",A)}H(S,L.Node),S.prototype._encodeComposite=function(A,D,R,q){var v=z(A,D,R,this.reporter);if(q.length<128){var _=new T(2);return _[0]=v,_[1]=q.length,this._createEncoderBuffer([_,q])}var k=1;for(var B=q.length;B>=256;B>>=8)k++;var _=new T(2+k);_[0]=v,_[1]=128|k;for(var B=1+k,x=q.length;x>0;B--,x>>=8)_[B]=x&255;return this._createEncoderBuffer([_,q])},S.prototype._encodeStr=function(A,D){if(D==="bitstr")return this._createEncoderBuffer([A.unused|0,A.data]);else if(D==="bmpstr"){var R=new T(A.length*2);for(var q=0;q<A.length;q++)R.writeUInt16BE(A.charCodeAt(q),q*2);return this._createEncoderBuffer(R)}else if(D==="numstr"){if(!this._isNumstr(A))return this.reporter.error("Encoding of string type: numstr supports only digits and space");return this._createEncoderBuffer(A)}else if(D==="printstr"){if(!this._isPrintstr(A))return this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark");return this._createEncoderBuffer(A)}else if(/str$/.test(D))return this._createEncoderBuffer(A);else if(D==="objDesc")return this._createEncoderBuffer(A);else return this.reporter.error("Encoding of string type: "+D+" unsupported")},S.prototype._encodeObjid=function(A,D,R){if(typeof A==="string"){if(!D)return this.reporter.error("string objid given, but no values map found");if(!D.hasOwnProperty(A))return this.reporter.error("objid not found in values map");A=D[A].split(/[\s\.]+/g);for(var q=0;q<A.length;q++)A[q]|=0}else if(Array.isArray(A)){A=A.slice();for(var q=0;q<A.length;q++)A[q]|=0}if(!Array.isArray(A))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(A));if(!R){if(A[1]>=40)return this.reporter.error("Second objid identifier OOB");A.splice(0,2,A[0]*40+A[1])}var v=0;for(var q=0;q<A.length;q++){var k=A[q];for(v++;k>=128;k>>=7)v++}var B=new T(v),_=B.length-1;for(var q=A.length-1;q>=0;q--){var k=A[q];B[_--]=k&127;while((k>>=7)>0)B[_--]=128|k&127}return this._createEncoderBuffer(B)};function M(A){if(A<10)return"0"+A;else return A}S.prototype._encodeTime=function(A,D){var R,q=new Date(A);if(D==="gentime")R=[M(q.getFullYear()),M(q.getUTCMonth()+1),M(q.getUTCDate()),M(q.getUTCHours()),M(q.getUTCMinutes()),M(q.getUTCSeconds()),"Z"].join("");else if(D==="utctime")R=[M(q.getFullYear()%100),M(q.getUTCMonth()+1),M(q.getUTCDate()),M(q.getUTCHours()),M(q.getUTCMinutes()),M(q.getUTCSeconds()),"Z"].join("");else this.reporter.error("Encoding "+D+" time is not supported yet");return this._encodeStr(R,"octstr")},S.prototype._encodeNull=function(){return this._createEncoderBuffer("")},S.prototype._encodeInt=function(A,D){if(typeof A==="string"){if(!D)return this.reporter.error("String int or enum given, but no values map");if(!D.hasOwnProperty(A))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(A));A=D[A]}if(typeof A!=="number"&&!T.isBuffer(A)){var R=A.toArray();if(!A.sign&&R[0]&128)R.unshift(0);A=new T(R)}if(T.isBuffer(A)){var q=A.length;if(A.length===0)q++;var k=new T(q);if(A.copy(k),A.length===0)k[0]=0;return this._createEncoderBuffer(k)}if(A<128)return this._createEncoderBuffer(A);if(A<256)return this._createEncoderBuffer([0,A]);var q=1;for(var v=A;v>=256;v>>=8)q++;var k=Array(q);for(var v=k.length-1;v>=0;v--)k[v]=A&255,A>>=8;if(k[0]&128)k.unshift(0);return this._createEncoderBuffer(new T(k))},S.prototype._encodeBool=function(A){return this._createEncoderBuffer(A?255:0)},S.prototype._use=function(A,D){if(typeof A==="function")A=A(D);return A._getEncoder("der").tree},S.prototype._skipDefault=function(A,D,R){var q=this._baseState,v;if(q.default===null)return!1;var k=A.join();if(q.defaultBuffer===void 0)q.defaultBuffer=this._encodeValue(q.default,D,R).join();if(k.length!==q.defaultBuffer.length)return!1;for(v=0;v<k.length;v++)if(k[v]!==q.defaultBuffer[v])return!1;return!0};function z(A,D,R,q){var v;if(A==="seqof")A="seq";else if(A==="setof")A="set";if(V.tagByName.hasOwnProperty(A))v=V.tagByName[A];else if(typeof A==="number"&&(A|0)===A)v=A;else return q.error("Unknown tag: "+A);if(v>=31)return q.error("Multi-octet tag encoding unsupported");if(!D)v|=32;return v|=V.tagClassByName[R||"universal"]<<6,v}}),PV=G0((K,W)=>{var H=qU(),T=jQ();function O(L){T.call(this,L),this.enc="pem"}H(O,T),W.exports=O,O.prototype.encode=function(L,V){var P=T.prototype.encode.call(this,L),S=P.toString("base64"),M=["-----BEGIN "+V.label+"-----"];for(var z=0;z<S.length;z+=64)M.push(S.slice(z,z+64));return M.push("-----END "+V.label+"-----"),M.join(`
5
+ `)}}),kV=G0((K)=>{var W=K;W.der=jQ(),W.pem=PV()}),WX=G0((K)=>{var W=K;W.bignum=zV(),W.define=MV().define,W.base=VX(),W.constants=PQ(),W.decoders=SV(),W.encoders=kV()}),jV=G0((K,W)=>{var H=WX(),T=H.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),O=H.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),L=H.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),V=H.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(L),this.key("subjectPublicKey").bitstr())}),P=H.define("RelativeDistinguishedName",function(){this.setof(O)}),S=H.define("RDNSequence",function(){this.seqof(P)}),M=H.define("Name",function(){this.choice({rdnSequence:this.use(S)})}),z=H.define("Validity",function(){this.seq().obj(this.key("notBefore").use(T),this.key("notAfter").use(T))}),A=H.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),D=H.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(L),this.key("issuer").use(M),this.key("validity").use(z),this.key("subject").use(M),this.key("subjectPublicKeyInfo").use(V),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(A).optional())}),R=H.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(D),this.key("signatureAlgorithm").use(L),this.key("signatureValue").bitstr())});W.exports=R}),vV=G0((K)=>{var W=WX();K.certificate=jV();var H=W.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});K.RSAPrivateKey=H;var T=W.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});K.RSAPublicKey=T;var O=W.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),L=W.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(O),this.key("subjectPublicKey").bitstr())});K.PublicKey=L;var V=W.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(O),this.key("subjectPrivateKey").octstr())});K.PrivateKey=V;var P=W.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});K.EncryptedPrivateKey=P;var S=W.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});K.DSAPrivateKey=S,K.DSAparam=W.define("DSAparam",function(){this.int()});var M=W.define("ECParameters",function(){this.choice({namedCurve:this.objid()})}),z=W.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(M),this.key("publicKey").optional().explicit(1).bitstr())});K.ECPrivateKey=z,K.signature=W.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})}),_V=G0((K,W)=>{W.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}}),BV=G0((K,W)=>{var H=MU().Buffer,T=rX().Transform,O=qU();function L(M){T.call(this),this._block=H.allocUnsafe(M),this._blockSize=M,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}O(L,T),L.prototype._transform=function(M,z,A){var D=null;try{this.update(M,z)}catch(R){D=R}A(D)},L.prototype._flush=function(M){var z=null;try{this.push(this.digest())}catch(A){z=A}M(z)};var V=typeof Uint8Array<"u",P=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(H.prototype instanceof Uint8Array||H.TYPED_ARRAY_SUPPORT);function S(M,z){if(M instanceof H)return M;if(typeof M==="string")return H.from(M,z);if(P&&ArrayBuffer.isView(M)){if(M.byteLength===0)return H.alloc(0);var A=H.from(M.buffer,M.byteOffset,M.byteLength);if(A.byteLength===M.byteLength)return A}if(V&&M instanceof Uint8Array)return H.from(M);if(H.isBuffer(M)&&M.constructor&&typeof M.constructor.isBuffer==="function"&&M.constructor.isBuffer(M))return H.from(M);throw TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}L.prototype.update=function(M,z){if(this._finalized)throw Error("Digest already called");M=S(M,z);var A=this._block,D=0;while(this._blockOffset+M.length-D>=this._blockSize){for(var R=this._blockOffset;R<this._blockSize;)A[R++]=M[D++];this._update(),this._blockOffset=0}while(D<M.length)A[this._blockOffset++]=M[D++];for(var q=0,v=M.length*8;v>0;++q)if(this._length[q]+=v,v=this._length[q]/4294967296|0,v>0)this._length[q]-=4294967296*v;return this},L.prototype._update=function(){throw Error("_update is not implemented")},L.prototype.digest=function(M){if(this._finalized)throw Error("Digest already called");this._finalized=!0;var z=this._digest();if(M!==void 0)z=z.toString(M);this._block.fill(0),this._blockOffset=0;for(var A=0;A<4;++A)this._length[A]=0;return z},L.prototype._digest=function(){throw Error("_digest is not implemented")},W.exports=L}),xV=G0((K,W)=>{var H=qU(),T=BV(),O=MU().Buffer,L=Array(16);function V(){T.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}H(V,T),V.prototype._update=function(){var D=L;for(var R=0;R<16;++R)D[R]=this._block.readInt32LE(R*4);var q=this._a,v=this._b,k=this._c,B=this._d;q=S(q,v,k,B,D[0],3614090360,7),B=S(B,q,v,k,D[1],3905402710,12),k=S(k,B,q,v,D[2],606105819,17),v=S(v,k,B,q,D[3],3250441966,22),q=S(q,v,k,B,D[4],4118548399,7),B=S(B,q,v,k,D[5],1200080426,12),k=S(k,B,q,v,D[6],2821735955,17),v=S(v,k,B,q,D[7],4249261313,22),q=S(q,v,k,B,D[8],1770035416,7),B=S(B,q,v,k,D[9],2336552879,12),k=S(k,B,q,v,D[10],4294925233,17),v=S(v,k,B,q,D[11],2304563134,22),q=S(q,v,k,B,D[12],1804603682,7),B=S(B,q,v,k,D[13],4254626195,12),k=S(k,B,q,v,D[14],2792965006,17),v=S(v,k,B,q,D[15],1236535329,22),q=M(q,v,k,B,D[1],4129170786,5),B=M(B,q,v,k,D[6],3225465664,9),k=M(k,B,q,v,D[11],643717713,14),v=M(v,k,B,q,D[0],3921069994,20),q=M(q,v,k,B,D[5],3593408605,5),B=M(B,q,v,k,D[10],38016083,9),k=M(k,B,q,v,D[15],3634488961,14),v=M(v,k,B,q,D[4],3889429448,20),q=M(q,v,k,B,D[9],568446438,5),B=M(B,q,v,k,D[14],3275163606,9),k=M(k,B,q,v,D[3],4107603335,14),v=M(v,k,B,q,D[8],1163531501,20),q=M(q,v,k,B,D[13],2850285829,5),B=M(B,q,v,k,D[2],4243563512,9),k=M(k,B,q,v,D[7],1735328473,14),v=M(v,k,B,q,D[12],2368359562,20),q=z(q,v,k,B,D[5],4294588738,4),B=z(B,q,v,k,D[8],2272392833,11),k=z(k,B,q,v,D[11],1839030562,16),v=z(v,k,B,q,D[14],4259657740,23),q=z(q,v,k,B,D[1],2763975236,4),B=z(B,q,v,k,D[4],1272893353,11),k=z(k,B,q,v,D[7],4139469664,16),v=z(v,k,B,q,D[10],3200236656,23),q=z(q,v,k,B,D[13],681279174,4),B=z(B,q,v,k,D[0],3936430074,11),k=z(k,B,q,v,D[3],3572445317,16),v=z(v,k,B,q,D[6],76029189,23),q=z(q,v,k,B,D[9],3654602809,4),B=z(B,q,v,k,D[12],3873151461,11),k=z(k,B,q,v,D[15],530742520,16),v=z(v,k,B,q,D[2],3299628645,23),q=A(q,v,k,B,D[0],4096336452,6),B=A(B,q,v,k,D[7],1126891415,10),k=A(k,B,q,v,D[14],2878612391,15),v=A(v,k,B,q,D[5],4237533241,21),q=A(q,v,k,B,D[12],1700485571,6),B=A(B,q,v,k,D[3],2399980690,10),k=A(k,B,q,v,D[10],4293915773,15),v=A(v,k,B,q,D[1],2240044497,21),q=A(q,v,k,B,D[8],1873313359,6),B=A(B,q,v,k,D[15],4264355552,10),k=A(k,B,q,v,D[6],2734768916,15),v=A(v,k,B,q,D[13],1309151649,21),q=A(q,v,k,B,D[4],4149444226,6),B=A(B,q,v,k,D[11],3174756917,10),k=A(k,B,q,v,D[2],718787259,15),v=A(v,k,B,q,D[9],3951481745,21),this._a=this._a+q|0,this._b=this._b+v|0,this._c=this._c+k|0,this._d=this._d+B|0},V.prototype._digest=function(){if(this._block[this._blockOffset++]=128,this._blockOffset>56)this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0;this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var D=O.allocUnsafe(16);return D.writeInt32LE(this._a,0),D.writeInt32LE(this._b,4),D.writeInt32LE(this._c,8),D.writeInt32LE(this._d,12),D};function P(D,R){return D<<R|D>>>32-R}function S(D,R,q,v,k,B,_){return P(D+(R&q|~R&v)+k+B|0,_)+R|0}function M(D,R,q,v,k,B,_){return P(D+(R&v|q&~v)+k+B|0,_)+R|0}function z(D,R,q,v,k,B,_){return P(D+(R^q^v)+k+B|0,_)+R|0}function A(D,R,q,v,k,B,_){return P(D+(q^(R|~v))+k+B|0,_)+R|0}W.exports=V}),NV=G0((K,W)=>{var H=MU().Buffer,T=xV();function O(L,V,P,S){if(!H.isBuffer(L))L=H.from(L,"binary");if(V){if(!H.isBuffer(V))V=H.from(V,"binary");if(V.length!==8)throw RangeError("salt should be Buffer with 8 byte length")}var M=P/8,z=H.alloc(M),A=H.alloc(S||0),D=H.alloc(0);while(M>0||S>0){var R=new T;if(R.update(D),R.update(L),V)R.update(V);D=R.digest();var q=0;if(M>0){var v=z.length-M;q=Math.min(M,D.length),D.copy(z,v,0,q),M-=q}if(q<D.length&&S>0){var k=A.length-S,B=Math.min(S,D.length-q);D.copy(A,k,q,q+B),S-=B}}return D.fill(0),{key:z,iv:A}}W.exports=O}),vQ=G0((K)=>{var W=(RU(),h0(SU));K.createCipher=K.Cipher=W.createCipher,K.createCipheriv=K.Cipheriv=W.createCipheriv,K.createDecipher=K.Decipher=W.createDecipher,K.createDecipheriv=K.Decipheriv=W.createDecipheriv,K.listCiphers=K.getCiphers=W.getCiphers}),gV=G0((K,W)=>{var H=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,T=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,O=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,L=NV(),V=vQ(),P=MU().Buffer;W.exports=function(S,M){var z=S.toString(),A=z.match(H),D;if(!A){var R=z.match(O);D=P.from(R[2].replace(/[\r\n]/g,""),"base64")}else{var q="aes"+A[1],v=P.from(A[2],"hex"),k=P.from(A[3].replace(/[\r\n]/g,""),"base64"),B=L(M,v.slice(0,8),parseInt(A[1],10)).key,_=[],x=V.createDecipheriv(q,B,v);_.push(x.update(k)),_.push(x.final()),D=P.concat(_)}var w=z.match(T)[1];return{tag:w,data:D}}}),_Q=G0((K,W)=>{var H=vV(),T=_V(),O=gV(),L=vQ(),V=zQ().pbkdf2Sync,P=MU().Buffer;function S(z,A){var D=z.algorithm.decrypt.kde.kdeparams.salt,R=parseInt(z.algorithm.decrypt.kde.kdeparams.iters.toString(),10),q=T[z.algorithm.decrypt.cipher.algo.join(".")],v=z.algorithm.decrypt.cipher.iv,k=z.subjectPrivateKey,B=parseInt(q.split("-")[1],10)/8,_=V(A,D,R,B,"sha1"),x=L.createDecipheriv(q,_,v),w=[];return w.push(x.update(k)),w.push(x.final()),P.concat(w)}function M(z){var A;if(typeof z==="object"&&!P.isBuffer(z))A=z.passphrase,z=z.key;if(typeof z==="string")z=P.from(z);var D=O(z,A),R=D.tag,q=D.data,v,k;switch(R){case"CERTIFICATE":k=H.certificate.decode(q,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":if(!k)k=H.PublicKey.decode(q,"der");switch(v=k.algorithm.algorithm.join("."),v){case"1.2.840.113549.1.1.1":return H.RSAPublicKey.decode(k.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return k.subjectPrivateKey=k.subjectPublicKey,{type:"ec",data:k};case"1.2.840.10040.4.1":return k.algorithm.params.pub_key=H.DSAparam.decode(k.subjectPublicKey.data,"der"),{type:"dsa",data:k.algorithm.params};default:throw Error("unknown key id "+v)}case"ENCRYPTED PRIVATE KEY":q=H.EncryptedPrivateKey.decode(q,"der"),q=S(q,A);case"PRIVATE KEY":switch(k=H.PrivateKey.decode(q,"der"),v=k.algorithm.algorithm.join("."),v){case"1.2.840.113549.1.1.1":return H.RSAPrivateKey.decode(k.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:k.algorithm.curve,privateKey:H.ECPrivateKey.decode(k.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return k.algorithm.params.priv_key=H.DSAparam.decode(k.subjectPrivateKey,"der"),{type:"dsa",params:k.algorithm.params};default:throw Error("unknown key id "+v)}case"RSA PUBLIC KEY":return H.RSAPublicKey.decode(q,"der");case"RSA PRIVATE KEY":return H.RSAPrivateKey.decode(q,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:H.DSAPrivateKey.decode(q,"der")};case"EC PRIVATE KEY":return q=H.ECPrivateKey.decode(q,"der"),{curve:q.parameters.value,privateKey:q.privateKey};default:throw Error("unknown key type "+R)}}M.signature=H.signature,W.exports=M}),BQ=G0((K,W)=>{var H=LX(),T=MU().Buffer;W.exports=function(L,V){var P=T.alloc(0),S=0,M;while(P.length<V)M=O(S++),P=T.concat([P,H("sha1").update(L).update(M).digest()]);return P.slice(0,V)};function O(L){var V=T.allocUnsafe(4);return V.writeUInt32BE(L,0),V}}),xQ=G0((K,W)=>{W.exports=function(H,T){var O=H.length,L=-1;while(++L<O)H[L]^=T[L];return H}}),GZ=G0((K,W)=>{(function(H,T){function O(U,Q){if(!U)throw Error(Q||"Assertion failed")}function L(U,Q){U.super_=Q;var J=function(){};J.prototype=Q.prototype,U.prototype=new J,U.prototype.constructor=U}function V(U,Q,J){if(V.isBN(U))return U;if(this.negative=0,this.words=null,this.length=0,this.red=null,U!==null){if(Q==="le"||Q==="be")J=Q,Q=10;this._init(U||0,Q||10,J||"be")}}if(typeof H==="object")H.exports=V;else T.BN=V;V.BN=V,V.wordSize=26;var P;try{if(typeof window<"u"&&typeof window.Buffer<"u")P=window.Buffer;else P=(OU(),h0(HU)).Buffer}catch(U){}V.isBN=function(U){if(U instanceof V)return!0;return U!==null&&typeof U==="object"&&U.constructor.wordSize===V.wordSize&&Array.isArray(U.words)},V.max=function(U,Q){if(U.cmp(Q)>0)return U;return Q},V.min=function(U,Q){if(U.cmp(Q)<0)return U;return Q},V.prototype._init=function(U,Q,J){if(typeof U==="number")return this._initNumber(U,Q,J);if(typeof U==="object")return this._initArray(U,Q,J);if(Q==="hex")Q=16;O(Q===(Q|0)&&Q>=2&&Q<=36),U=U.toString().replace(/\s+/g,"");var Z=0;if(U[0]==="-")Z++,this.negative=1;if(Z<U.length){if(Q===16)this._parseHex(U,Z,J);else if(this._parseBase(U,Q,Z),J==="le")this._initArray(this.toArray(),Q,J)}},V.prototype._initNumber=function(U,Q,J){if(U<0)this.negative=1,U=-U;if(U<67108864)this.words=[U&67108863],this.length=1;else if(U<4503599627370496)this.words=[U&67108863,U/67108864&67108863],this.length=2;else O(U<9007199254740992),this.words=[U&67108863,U/67108864&67108863,1],this.length=3;if(J!=="le")return;this._initArray(this.toArray(),Q,J)},V.prototype._initArray=function(U,Q,J){if(O(typeof U.length==="number"),U.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(U.length/3),this.words=Array(this.length);for(var Z=0;Z<this.length;Z++)this.words[Z]=0;var Y,$,F=0;if(J==="be"){for(Z=U.length-1,Y=0;Z>=0;Z-=3)if($=U[Z]|U[Z-1]<<8|U[Z-2]<<16,this.words[Y]|=$<<F&67108863,this.words[Y+1]=$>>>26-F&67108863,F+=24,F>=26)F-=26,Y++}else if(J==="le"){for(Z=0,Y=0;Z<U.length;Z+=3)if($=U[Z]|U[Z+1]<<8|U[Z+2]<<16,this.words[Y]|=$<<F&67108863,this.words[Y+1]=$>>>26-F&67108863,F+=24,F>=26)F-=26,Y++}return this.strip()};function S(U,Q){var J=U.charCodeAt(Q);if(J>=65&&J<=70)return J-55;else if(J>=97&&J<=102)return J-87;else return J-48&15}function M(U,Q,J){var Z=S(U,J);if(J-1>=Q)Z|=S(U,J-1)<<4;return Z}V.prototype._parseHex=function(U,Q,J){this.length=Math.ceil((U.length-Q)/6),this.words=Array(this.length);for(var Z=0;Z<this.length;Z++)this.words[Z]=0;var Y=0,$=0,F;if(J==="be")for(Z=U.length-1;Z>=Q;Z-=2)if(F=M(U,Q,Z)<<Y,this.words[$]|=F&67108863,Y>=18)Y-=18,$+=1,this.words[$]|=F>>>26;else Y+=8;else{var G=U.length-Q;for(Z=G%2===0?Q+1:Q;Z<U.length;Z+=2)if(F=M(U,Q,Z)<<Y,this.words[$]|=F&67108863,Y>=18)Y-=18,$+=1,this.words[$]|=F>>>26;else Y+=8}this.strip()};function z(U,Q,J,Z){var Y=0,$=Math.min(U.length,J);for(var F=Q;F<$;F++){var G=U.charCodeAt(F)-48;if(Y*=Z,G>=49)Y+=G-49+10;else if(G>=17)Y+=G-17+10;else Y+=G}return Y}V.prototype._parseBase=function(U,Q,J){this.words=[0],this.length=1;for(var Z=0,Y=1;Y<=67108863;Y*=Q)Z++;Z--,Y=Y/Q|0;var $=U.length-J,F=$%Z,G=Math.min($,$-F)+J,X=0;for(var I=J;I<G;I+=Z)if(X=z(U,I,I+Z,Q),this.imuln(Y),this.words[0]+X<67108864)this.words[0]+=X;else this._iaddn(X);if(F!==0){var E=1;X=z(U,I,U.length,Q);for(I=0;I<F;I++)E*=Q;if(this.imuln(E),this.words[0]+X<67108864)this.words[0]+=X;else this._iaddn(X)}this.strip()},V.prototype.copy=function(U){U.words=Array(this.length);for(var Q=0;Q<this.length;Q++)U.words[Q]=this.words[Q];U.length=this.length,U.negative=this.negative,U.red=this.red},V.prototype.clone=function(){var U=new V(null);return this.copy(U),U},V.prototype._expand=function(U){while(this.length<U)this.words[this.length++]=0;return this},V.prototype.strip=function(){while(this.length>1&&this.words[this.length-1]===0)this.length--;return this._normSign()},V.prototype._normSign=function(){if(this.length===1&&this.words[0]===0)this.negative=0;return this},V.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var A=["","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"],D=[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],R=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];if(V.prototype.toString=function(U,Q){U=U||10,Q=Q|0||1;var J;if(U===16||U==="hex"){J="";var Z=0,Y=0;for(var $=0;$<this.length;$++){var F=this.words[$],G=((F<<Z|Y)&16777215).toString(16);if(Y=F>>>24-Z&16777215,Z+=2,Z>=26)Z-=26,$--;if(Y!==0||$!==this.length-1)J=A[6-G.length]+G+J;else J=G+J}if(Y!==0)J=Y.toString(16)+J;while(J.length%Q!==0)J="0"+J;if(this.negative!==0)J="-"+J;return J}if(U===(U|0)&&U>=2&&U<=36){var X=D[U],I=R[U];J="";var E=this.clone();E.negative=0;while(!E.isZero()){var C=E.modn(I).toString(U);if(E=E.idivn(I),!E.isZero())J=A[X-C.length]+C+J;else J=C+J}if(this.isZero())J="0"+J;while(J.length%Q!==0)J="0"+J;if(this.negative!==0)J="-"+J;return J}O(!1,"Base should be between 2 and 36")},V.prototype.toNumber=function(){var U=this.words[0];if(this.length===2)U+=this.words[1]*67108864;else if(this.length===3&&this.words[2]===1)U+=4503599627370496+this.words[1]*67108864;else if(this.length>2)O(!1,"Number can only safely store up to 53 bits");return this.negative!==0?-U:U},V.prototype.toJSON=function(){return this.toString(16)},V.prototype.toBuffer=function(U,Q){return O(typeof P<"u"),this.toArrayLike(P,U,Q)},V.prototype.toArray=function(U,Q){return this.toArrayLike(Array,U,Q)},V.prototype.toArrayLike=function(U,Q,J){var Z=this.byteLength(),Y=J||Math.max(1,Z);O(Z<=Y,"byte array longer than desired length"),O(Y>0,"Requested array length <= 0"),this.strip();var $=Q==="le",F=new U(Y),G,X,I=this.clone();if(!$){for(X=0;X<Y-Z;X++)F[X]=0;for(X=0;!I.isZero();X++)G=I.andln(255),I.iushrn(8),F[Y-X-1]=G}else{for(X=0;!I.isZero();X++)G=I.andln(255),I.iushrn(8),F[X]=G;for(;X<Y;X++)F[X]=0}return F},Math.clz32)V.prototype._countBits=function(U){return 32-Math.clz32(U)};else V.prototype._countBits=function(U){var Q=U,J=0;if(Q>=4096)J+=13,Q>>>=13;if(Q>=64)J+=7,Q>>>=7;if(Q>=8)J+=4,Q>>>=4;if(Q>=2)J+=2,Q>>>=2;return J+Q};V.prototype._zeroBits=function(U){if(U===0)return 26;var Q=U,J=0;if((Q&8191)===0)J+=13,Q>>>=13;if((Q&127)===0)J+=7,Q>>>=7;if((Q&15)===0)J+=4,Q>>>=4;if((Q&3)===0)J+=2,Q>>>=2;if((Q&1)===0)J++;return J},V.prototype.bitLength=function(){var U=this.words[this.length-1],Q=this._countBits(U);return(this.length-1)*26+Q};function q(U){var Q=Array(U.bitLength());for(var J=0;J<Q.length;J++){var Z=J/26|0,Y=J%26;Q[J]=(U.words[Z]&1<<Y)>>>Y}return Q}V.prototype.zeroBits=function(){if(this.isZero())return 0;var U=0;for(var Q=0;Q<this.length;Q++){var J=this._zeroBits(this.words[Q]);if(U+=J,J!==26)break}return U},V.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},V.prototype.toTwos=function(U){if(this.negative!==0)return this.abs().inotn(U).iaddn(1);return this.clone()},V.prototype.fromTwos=function(U){if(this.testn(U-1))return this.notn(U).iaddn(1).ineg();return this.clone()},V.prototype.isNeg=function(){return this.negative!==0},V.prototype.neg=function(){return this.clone().ineg()},V.prototype.ineg=function(){if(!this.isZero())this.negative^=1;return this},V.prototype.iuor=function(U){while(this.length<U.length)this.words[this.length++]=0;for(var Q=0;Q<U.length;Q++)this.words[Q]=this.words[Q]|U.words[Q];return this.strip()},V.prototype.ior=function(U){return O((this.negative|U.negative)===0),this.iuor(U)},V.prototype.or=function(U){if(this.length>U.length)return this.clone().ior(U);return U.clone().ior(this)},V.prototype.uor=function(U){if(this.length>U.length)return this.clone().iuor(U);return U.clone().iuor(this)},V.prototype.iuand=function(U){var Q;if(this.length>U.length)Q=U;else Q=this;for(var J=0;J<Q.length;J++)this.words[J]=this.words[J]&U.words[J];return this.length=Q.length,this.strip()},V.prototype.iand=function(U){return O((this.negative|U.negative)===0),this.iuand(U)},V.prototype.and=function(U){if(this.length>U.length)return this.clone().iand(U);return U.clone().iand(this)},V.prototype.uand=function(U){if(this.length>U.length)return this.clone().iuand(U);return U.clone().iuand(this)},V.prototype.iuxor=function(U){var Q,J;if(this.length>U.length)Q=this,J=U;else Q=U,J=this;for(var Z=0;Z<J.length;Z++)this.words[Z]=Q.words[Z]^J.words[Z];if(this!==Q)for(;Z<Q.length;Z++)this.words[Z]=Q.words[Z];return this.length=Q.length,this.strip()},V.prototype.ixor=function(U){return O((this.negative|U.negative)===0),this.iuxor(U)},V.prototype.xor=function(U){if(this.length>U.length)return this.clone().ixor(U);return U.clone().ixor(this)},V.prototype.uxor=function(U){if(this.length>U.length)return this.clone().iuxor(U);return U.clone().iuxor(this)},V.prototype.inotn=function(U){O(typeof U==="number"&&U>=0);var Q=Math.ceil(U/26)|0,J=U%26;if(this._expand(Q),J>0)Q--;for(var Z=0;Z<Q;Z++)this.words[Z]=~this.words[Z]&67108863;if(J>0)this.words[Z]=~this.words[Z]&67108863>>26-J;return this.strip()},V.prototype.notn=function(U){return this.clone().inotn(U)},V.prototype.setn=function(U,Q){O(typeof U==="number"&&U>=0);var J=U/26|0,Z=U%26;if(this._expand(J+1),Q)this.words[J]=this.words[J]|1<<Z;else this.words[J]=this.words[J]&~(1<<Z);return this.strip()},V.prototype.iadd=function(U){var Q;if(this.negative!==0&&U.negative===0)return this.negative=0,Q=this.isub(U),this.negative^=1,this._normSign();else if(this.negative===0&&U.negative!==0)return U.negative=0,Q=this.isub(U),U.negative=1,Q._normSign();var J,Z;if(this.length>U.length)J=this,Z=U;else J=U,Z=this;var Y=0;for(var $=0;$<Z.length;$++)Q=(J.words[$]|0)+(Z.words[$]|0)+Y,this.words[$]=Q&67108863,Y=Q>>>26;for(;Y!==0&&$<J.length;$++)Q=(J.words[$]|0)+Y,this.words[$]=Q&67108863,Y=Q>>>26;if(this.length=J.length,Y!==0)this.words[this.length]=Y,this.length++;else if(J!==this)for(;$<J.length;$++)this.words[$]=J.words[$];return this},V.prototype.add=function(U){var Q;if(U.negative!==0&&this.negative===0)return U.negative=0,Q=this.sub(U),U.negative^=1,Q;else if(U.negative===0&&this.negative!==0)return this.negative=0,Q=U.sub(this),this.negative=1,Q;if(this.length>U.length)return this.clone().iadd(U);return U.clone().iadd(this)},V.prototype.isub=function(U){if(U.negative!==0){U.negative=0;var Q=this.iadd(U);return U.negative=1,Q._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(U),this.negative=1,this._normSign();var J=this.cmp(U);if(J===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Z,Y;if(J>0)Z=this,Y=U;else Z=U,Y=this;var $=0;for(var F=0;F<Y.length;F++)Q=(Z.words[F]|0)-(Y.words[F]|0)+$,$=Q>>26,this.words[F]=Q&67108863;for(;$!==0&&F<Z.length;F++)Q=(Z.words[F]|0)+$,$=Q>>26,this.words[F]=Q&67108863;if($===0&&F<Z.length&&Z!==this)for(;F<Z.length;F++)this.words[F]=Z.words[F];if(this.length=Math.max(this.length,F),Z!==this)this.negative=1;return this.strip()},V.prototype.sub=function(U){return this.clone().isub(U)};function v(U,Q,J){J.negative=Q.negative^U.negative;var Z=U.length+Q.length|0;J.length=Z,Z=Z-1|0;var Y=U.words[0]|0,$=Q.words[0]|0,F=Y*$,G=F&67108863,X=F/67108864|0;J.words[0]=G;for(var I=1;I<Z;I++){var E=X>>>26,C=X&67108863,j=Math.min(I,Q.length-1);for(var g=Math.max(0,I-U.length+1);g<=j;g++){var p=I-g|0;Y=U.words[p]|0,$=Q.words[g]|0,F=Y*$+C,E+=F/67108864|0,C=F&67108863}J.words[I]=C|0,X=E|0}if(X!==0)J.words[I]=X|0;else J.length--;return J.strip()}var k=function(U,Q,J){var Z=U.words,Y=Q.words,$=J.words,F=0,G,X,I,E=Z[0]|0,C=E&8191,j=E>>>13,g=Z[1]|0,p=g&8191,n=g>>>13,$0=Z[2]|0,r=$0&8191,d=$0>>>13,Q0=Z[3]|0,m=Q0&8191,i=Q0>>>13,g0=Z[4]|0,f=g0&8191,h=g0>>>13,Y0=Z[5]|0,t=Y0&8191,e=Y0>>>13,M0=Z[6]|0,c=M0&8191,o=M0>>>13,N0=Z[7]|0,s=N0&8191,Z0=N0>>>13,y0=Z[8]|0,H0=y0&8191,O0=y0>>>13,n0=Z[9]|0,W0=n0&8191,A0=n0>>>13,t0=Y[0]|0,D0=t0&8191,T0=t0>>>13,TU=Y[1]|0,L0=TU&8191,k0=TU>>>13,DU=Y[2]|0,j0=DU&8191,E0=DU>>>13,AU=Y[3]|0,v0=AU&8191,R0=AU>>>13,$U=Y[4]|0,_0=$U&8191,B0=$U>>>13,WU=Y[5]|0,q0=WU&8191,N=WU>>>13,b=Y[6]|0,a=b&8191,U0=b>>>13,w0=Y[7]|0,F0=w0&8191,C0=w0>>>13,m0=Y[8]|0,S0=m0&8191,x0=m0>>>13,CU=Y[9]|0,P0=CU&8191,z0=CU>>>13;J.negative=U.negative^Q.negative,J.length=19,G=Math.imul(C,D0),X=Math.imul(C,T0),X=X+Math.imul(j,D0)|0,I=Math.imul(j,T0);var s0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(s0>>>26)|0,s0&=67108863,G=Math.imul(p,D0),X=Math.imul(p,T0),X=X+Math.imul(n,D0)|0,I=Math.imul(n,T0),G=G+Math.imul(C,L0)|0,X=X+Math.imul(C,k0)|0,X=X+Math.imul(j,L0)|0,I=I+Math.imul(j,k0)|0;var c0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(c0>>>26)|0,c0&=67108863,G=Math.imul(r,D0),X=Math.imul(r,T0),X=X+Math.imul(d,D0)|0,I=Math.imul(d,T0),G=G+Math.imul(p,L0)|0,X=X+Math.imul(p,k0)|0,X=X+Math.imul(n,L0)|0,I=I+Math.imul(n,k0)|0,G=G+Math.imul(C,j0)|0,X=X+Math.imul(C,E0)|0,X=X+Math.imul(j,j0)|0,I=I+Math.imul(j,E0)|0;var f0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(f0>>>26)|0,f0&=67108863,G=Math.imul(m,D0),X=Math.imul(m,T0),X=X+Math.imul(i,D0)|0,I=Math.imul(i,T0),G=G+Math.imul(r,L0)|0,X=X+Math.imul(r,k0)|0,X=X+Math.imul(d,L0)|0,I=I+Math.imul(d,k0)|0,G=G+Math.imul(p,j0)|0,X=X+Math.imul(p,E0)|0,X=X+Math.imul(n,j0)|0,I=I+Math.imul(n,E0)|0,G=G+Math.imul(C,v0)|0,X=X+Math.imul(C,R0)|0,X=X+Math.imul(j,v0)|0,I=I+Math.imul(j,R0)|0;var d0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(d0>>>26)|0,d0&=67108863,G=Math.imul(f,D0),X=Math.imul(f,T0),X=X+Math.imul(h,D0)|0,I=Math.imul(h,T0),G=G+Math.imul(m,L0)|0,X=X+Math.imul(m,k0)|0,X=X+Math.imul(i,L0)|0,I=I+Math.imul(i,k0)|0,G=G+Math.imul(r,j0)|0,X=X+Math.imul(r,E0)|0,X=X+Math.imul(d,j0)|0,I=I+Math.imul(d,E0)|0,G=G+Math.imul(p,v0)|0,X=X+Math.imul(p,R0)|0,X=X+Math.imul(n,v0)|0,I=I+Math.imul(n,R0)|0,G=G+Math.imul(C,_0)|0,X=X+Math.imul(C,B0)|0,X=X+Math.imul(j,_0)|0,I=I+Math.imul(j,B0)|0;var b0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(b0>>>26)|0,b0&=67108863,G=Math.imul(t,D0),X=Math.imul(t,T0),X=X+Math.imul(e,D0)|0,I=Math.imul(e,T0),G=G+Math.imul(f,L0)|0,X=X+Math.imul(f,k0)|0,X=X+Math.imul(h,L0)|0,I=I+Math.imul(h,k0)|0,G=G+Math.imul(m,j0)|0,X=X+Math.imul(m,E0)|0,X=X+Math.imul(i,j0)|0,I=I+Math.imul(i,E0)|0,G=G+Math.imul(r,v0)|0,X=X+Math.imul(r,R0)|0,X=X+Math.imul(d,v0)|0,I=I+Math.imul(d,R0)|0,G=G+Math.imul(p,_0)|0,X=X+Math.imul(p,B0)|0,X=X+Math.imul(n,_0)|0,I=I+Math.imul(n,B0)|0,G=G+Math.imul(C,q0)|0,X=X+Math.imul(C,N)|0,X=X+Math.imul(j,q0)|0,I=I+Math.imul(j,N)|0;var r0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(r0>>>26)|0,r0&=67108863,G=Math.imul(c,D0),X=Math.imul(c,T0),X=X+Math.imul(o,D0)|0,I=Math.imul(o,T0),G=G+Math.imul(t,L0)|0,X=X+Math.imul(t,k0)|0,X=X+Math.imul(e,L0)|0,I=I+Math.imul(e,k0)|0,G=G+Math.imul(f,j0)|0,X=X+Math.imul(f,E0)|0,X=X+Math.imul(h,j0)|0,I=I+Math.imul(h,E0)|0,G=G+Math.imul(m,v0)|0,X=X+Math.imul(m,R0)|0,X=X+Math.imul(i,v0)|0,I=I+Math.imul(i,R0)|0,G=G+Math.imul(r,_0)|0,X=X+Math.imul(r,B0)|0,X=X+Math.imul(d,_0)|0,I=I+Math.imul(d,B0)|0,G=G+Math.imul(p,q0)|0,X=X+Math.imul(p,N)|0,X=X+Math.imul(n,q0)|0,I=I+Math.imul(n,N)|0,G=G+Math.imul(C,a)|0,X=X+Math.imul(C,U0)|0,X=X+Math.imul(j,a)|0,I=I+Math.imul(j,U0)|0;var a0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(a0>>>26)|0,a0&=67108863,G=Math.imul(s,D0),X=Math.imul(s,T0),X=X+Math.imul(Z0,D0)|0,I=Math.imul(Z0,T0),G=G+Math.imul(c,L0)|0,X=X+Math.imul(c,k0)|0,X=X+Math.imul(o,L0)|0,I=I+Math.imul(o,k0)|0,G=G+Math.imul(t,j0)|0,X=X+Math.imul(t,E0)|0,X=X+Math.imul(e,j0)|0,I=I+Math.imul(e,E0)|0,G=G+Math.imul(f,v0)|0,X=X+Math.imul(f,R0)|0,X=X+Math.imul(h,v0)|0,I=I+Math.imul(h,R0)|0,G=G+Math.imul(m,_0)|0,X=X+Math.imul(m,B0)|0,X=X+Math.imul(i,_0)|0,I=I+Math.imul(i,B0)|0,G=G+Math.imul(r,q0)|0,X=X+Math.imul(r,N)|0,X=X+Math.imul(d,q0)|0,I=I+Math.imul(d,N)|0,G=G+Math.imul(p,a)|0,X=X+Math.imul(p,U0)|0,X=X+Math.imul(n,a)|0,I=I+Math.imul(n,U0)|0,G=G+Math.imul(C,F0)|0,X=X+Math.imul(C,C0)|0,X=X+Math.imul(j,F0)|0,I=I+Math.imul(j,C0)|0;var e0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(e0>>>26)|0,e0&=67108863,G=Math.imul(H0,D0),X=Math.imul(H0,T0),X=X+Math.imul(O0,D0)|0,I=Math.imul(O0,T0),G=G+Math.imul(s,L0)|0,X=X+Math.imul(s,k0)|0,X=X+Math.imul(Z0,L0)|0,I=I+Math.imul(Z0,k0)|0,G=G+Math.imul(c,j0)|0,X=X+Math.imul(c,E0)|0,X=X+Math.imul(o,j0)|0,I=I+Math.imul(o,E0)|0,G=G+Math.imul(t,v0)|0,X=X+Math.imul(t,R0)|0,X=X+Math.imul(e,v0)|0,I=I+Math.imul(e,R0)|0,G=G+Math.imul(f,_0)|0,X=X+Math.imul(f,B0)|0,X=X+Math.imul(h,_0)|0,I=I+Math.imul(h,B0)|0,G=G+Math.imul(m,q0)|0,X=X+Math.imul(m,N)|0,X=X+Math.imul(i,q0)|0,I=I+Math.imul(i,N)|0,G=G+Math.imul(r,a)|0,X=X+Math.imul(r,U0)|0,X=X+Math.imul(d,a)|0,I=I+Math.imul(d,U0)|0,G=G+Math.imul(p,F0)|0,X=X+Math.imul(p,C0)|0,X=X+Math.imul(n,F0)|0,I=I+Math.imul(n,C0)|0,G=G+Math.imul(C,S0)|0,X=X+Math.imul(C,x0)|0,X=X+Math.imul(j,S0)|0,I=I+Math.imul(j,x0)|0;var i0=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(i0>>>26)|0,i0&=67108863,G=Math.imul(W0,D0),X=Math.imul(W0,T0),X=X+Math.imul(A0,D0)|0,I=Math.imul(A0,T0),G=G+Math.imul(H0,L0)|0,X=X+Math.imul(H0,k0)|0,X=X+Math.imul(O0,L0)|0,I=I+Math.imul(O0,k0)|0,G=G+Math.imul(s,j0)|0,X=X+Math.imul(s,E0)|0,X=X+Math.imul(Z0,j0)|0,I=I+Math.imul(Z0,E0)|0,G=G+Math.imul(c,v0)|0,X=X+Math.imul(c,R0)|0,X=X+Math.imul(o,v0)|0,I=I+Math.imul(o,R0)|0,G=G+Math.imul(t,_0)|0,X=X+Math.imul(t,B0)|0,X=X+Math.imul(e,_0)|0,I=I+Math.imul(e,B0)|0,G=G+Math.imul(f,q0)|0,X=X+Math.imul(f,N)|0,X=X+Math.imul(h,q0)|0,I=I+Math.imul(h,N)|0,G=G+Math.imul(m,a)|0,X=X+Math.imul(m,U0)|0,X=X+Math.imul(i,a)|0,I=I+Math.imul(i,U0)|0,G=G+Math.imul(r,F0)|0,X=X+Math.imul(r,C0)|0,X=X+Math.imul(d,F0)|0,I=I+Math.imul(d,C0)|0,G=G+Math.imul(p,S0)|0,X=X+Math.imul(p,x0)|0,X=X+Math.imul(n,S0)|0,I=I+Math.imul(n,x0)|0,G=G+Math.imul(C,P0)|0,X=X+Math.imul(C,z0)|0,X=X+Math.imul(j,P0)|0,I=I+Math.imul(j,z0)|0;var UU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(UU>>>26)|0,UU&=67108863,G=Math.imul(W0,L0),X=Math.imul(W0,k0),X=X+Math.imul(A0,L0)|0,I=Math.imul(A0,k0),G=G+Math.imul(H0,j0)|0,X=X+Math.imul(H0,E0)|0,X=X+Math.imul(O0,j0)|0,I=I+Math.imul(O0,E0)|0,G=G+Math.imul(s,v0)|0,X=X+Math.imul(s,R0)|0,X=X+Math.imul(Z0,v0)|0,I=I+Math.imul(Z0,R0)|0,G=G+Math.imul(c,_0)|0,X=X+Math.imul(c,B0)|0,X=X+Math.imul(o,_0)|0,I=I+Math.imul(o,B0)|0,G=G+Math.imul(t,q0)|0,X=X+Math.imul(t,N)|0,X=X+Math.imul(e,q0)|0,I=I+Math.imul(e,N)|0,G=G+Math.imul(f,a)|0,X=X+Math.imul(f,U0)|0,X=X+Math.imul(h,a)|0,I=I+Math.imul(h,U0)|0,G=G+Math.imul(m,F0)|0,X=X+Math.imul(m,C0)|0,X=X+Math.imul(i,F0)|0,I=I+Math.imul(i,C0)|0,G=G+Math.imul(r,S0)|0,X=X+Math.imul(r,x0)|0,X=X+Math.imul(d,S0)|0,I=I+Math.imul(d,x0)|0,G=G+Math.imul(p,P0)|0,X=X+Math.imul(p,z0)|0,X=X+Math.imul(n,P0)|0,I=I+Math.imul(n,z0)|0;var XU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(XU>>>26)|0,XU&=67108863,G=Math.imul(W0,j0),X=Math.imul(W0,E0),X=X+Math.imul(A0,j0)|0,I=Math.imul(A0,E0),G=G+Math.imul(H0,v0)|0,X=X+Math.imul(H0,R0)|0,X=X+Math.imul(O0,v0)|0,I=I+Math.imul(O0,R0)|0,G=G+Math.imul(s,_0)|0,X=X+Math.imul(s,B0)|0,X=X+Math.imul(Z0,_0)|0,I=I+Math.imul(Z0,B0)|0,G=G+Math.imul(c,q0)|0,X=X+Math.imul(c,N)|0,X=X+Math.imul(o,q0)|0,I=I+Math.imul(o,N)|0,G=G+Math.imul(t,a)|0,X=X+Math.imul(t,U0)|0,X=X+Math.imul(e,a)|0,I=I+Math.imul(e,U0)|0,G=G+Math.imul(f,F0)|0,X=X+Math.imul(f,C0)|0,X=X+Math.imul(h,F0)|0,I=I+Math.imul(h,C0)|0,G=G+Math.imul(m,S0)|0,X=X+Math.imul(m,x0)|0,X=X+Math.imul(i,S0)|0,I=I+Math.imul(i,x0)|0,G=G+Math.imul(r,P0)|0,X=X+Math.imul(r,z0)|0,X=X+Math.imul(d,P0)|0,I=I+Math.imul(d,z0)|0;var ZU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(ZU>>>26)|0,ZU&=67108863,G=Math.imul(W0,v0),X=Math.imul(W0,R0),X=X+Math.imul(A0,v0)|0,I=Math.imul(A0,R0),G=G+Math.imul(H0,_0)|0,X=X+Math.imul(H0,B0)|0,X=X+Math.imul(O0,_0)|0,I=I+Math.imul(O0,B0)|0,G=G+Math.imul(s,q0)|0,X=X+Math.imul(s,N)|0,X=X+Math.imul(Z0,q0)|0,I=I+Math.imul(Z0,N)|0,G=G+Math.imul(c,a)|0,X=X+Math.imul(c,U0)|0,X=X+Math.imul(o,a)|0,I=I+Math.imul(o,U0)|0,G=G+Math.imul(t,F0)|0,X=X+Math.imul(t,C0)|0,X=X+Math.imul(e,F0)|0,I=I+Math.imul(e,C0)|0,G=G+Math.imul(f,S0)|0,X=X+Math.imul(f,x0)|0,X=X+Math.imul(h,S0)|0,I=I+Math.imul(h,x0)|0,G=G+Math.imul(m,P0)|0,X=X+Math.imul(m,z0)|0,X=X+Math.imul(i,P0)|0,I=I+Math.imul(i,z0)|0;var QU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(QU>>>26)|0,QU&=67108863,G=Math.imul(W0,_0),X=Math.imul(W0,B0),X=X+Math.imul(A0,_0)|0,I=Math.imul(A0,B0),G=G+Math.imul(H0,q0)|0,X=X+Math.imul(H0,N)|0,X=X+Math.imul(O0,q0)|0,I=I+Math.imul(O0,N)|0,G=G+Math.imul(s,a)|0,X=X+Math.imul(s,U0)|0,X=X+Math.imul(Z0,a)|0,I=I+Math.imul(Z0,U0)|0,G=G+Math.imul(c,F0)|0,X=X+Math.imul(c,C0)|0,X=X+Math.imul(o,F0)|0,I=I+Math.imul(o,C0)|0,G=G+Math.imul(t,S0)|0,X=X+Math.imul(t,x0)|0,X=X+Math.imul(e,S0)|0,I=I+Math.imul(e,x0)|0,G=G+Math.imul(f,P0)|0,X=X+Math.imul(f,z0)|0,X=X+Math.imul(h,P0)|0,I=I+Math.imul(h,z0)|0;var YU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(YU>>>26)|0,YU&=67108863,G=Math.imul(W0,q0),X=Math.imul(W0,N),X=X+Math.imul(A0,q0)|0,I=Math.imul(A0,N),G=G+Math.imul(H0,a)|0,X=X+Math.imul(H0,U0)|0,X=X+Math.imul(O0,a)|0,I=I+Math.imul(O0,U0)|0,G=G+Math.imul(s,F0)|0,X=X+Math.imul(s,C0)|0,X=X+Math.imul(Z0,F0)|0,I=I+Math.imul(Z0,C0)|0,G=G+Math.imul(c,S0)|0,X=X+Math.imul(c,x0)|0,X=X+Math.imul(o,S0)|0,I=I+Math.imul(o,x0)|0,G=G+Math.imul(t,P0)|0,X=X+Math.imul(t,z0)|0,X=X+Math.imul(e,P0)|0,I=I+Math.imul(e,z0)|0;var JU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(JU>>>26)|0,JU&=67108863,G=Math.imul(W0,a),X=Math.imul(W0,U0),X=X+Math.imul(A0,a)|0,I=Math.imul(A0,U0),G=G+Math.imul(H0,F0)|0,X=X+Math.imul(H0,C0)|0,X=X+Math.imul(O0,F0)|0,I=I+Math.imul(O0,C0)|0,G=G+Math.imul(s,S0)|0,X=X+Math.imul(s,x0)|0,X=X+Math.imul(Z0,S0)|0,I=I+Math.imul(Z0,x0)|0,G=G+Math.imul(c,P0)|0,X=X+Math.imul(c,z0)|0,X=X+Math.imul(o,P0)|0,I=I+Math.imul(o,z0)|0;var VU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(VU>>>26)|0,VU&=67108863,G=Math.imul(W0,F0),X=Math.imul(W0,C0),X=X+Math.imul(A0,F0)|0,I=Math.imul(A0,C0),G=G+Math.imul(H0,S0)|0,X=X+Math.imul(H0,x0)|0,X=X+Math.imul(O0,S0)|0,I=I+Math.imul(O0,x0)|0,G=G+Math.imul(s,P0)|0,X=X+Math.imul(s,z0)|0,X=X+Math.imul(Z0,P0)|0,I=I+Math.imul(Z0,z0)|0;var GU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(GU>>>26)|0,GU&=67108863,G=Math.imul(W0,S0),X=Math.imul(W0,x0),X=X+Math.imul(A0,S0)|0,I=Math.imul(A0,x0),G=G+Math.imul(H0,P0)|0,X=X+Math.imul(H0,z0)|0,X=X+Math.imul(O0,P0)|0,I=I+Math.imul(O0,z0)|0;var KU=(F+G|0)+((X&8191)<<13)|0;F=(I+(X>>>13)|0)+(KU>>>26)|0,KU&=67108863,G=Math.imul(W0,P0),X=Math.imul(W0,z0),X=X+Math.imul(A0,P0)|0,I=Math.imul(A0,z0);var IU=(F+G|0)+((X&8191)<<13)|0;if(F=(I+(X>>>13)|0)+(IU>>>26)|0,IU&=67108863,$[0]=s0,$[1]=c0,$[2]=f0,$[3]=d0,$[4]=b0,$[5]=r0,$[6]=a0,$[7]=e0,$[8]=i0,$[9]=UU,$[10]=XU,$[11]=ZU,$[12]=QU,$[13]=YU,$[14]=JU,$[15]=VU,$[16]=GU,$[17]=KU,$[18]=IU,F!==0)$[19]=F,J.length++;return J};if(!Math.imul)k=v;function B(U,Q,J){J.negative=Q.negative^U.negative,J.length=U.length+Q.length;var Z=0,Y=0;for(var $=0;$<J.length-1;$++){var F=Y;Y=0;var G=Z&67108863,X=Math.min($,Q.length-1);for(var I=Math.max(0,$-U.length+1);I<=X;I++){var E=$-I,C=U.words[E]|0,j=Q.words[I]|0,g=C*j,p=g&67108863;F=F+(g/67108864|0)|0,p=p+G|0,G=p&67108863,F=F+(p>>>26)|0,Y+=F>>>26,F&=67108863}J.words[$]=G,Z=F,F=Y}if(Z!==0)J.words[$]=Z;else J.length--;return J.strip()}function _(U,Q,J){var Z=new x;return Z.mulp(U,Q,J)}V.prototype.mulTo=function(U,Q){var J,Z=this.length+U.length;if(this.length===10&&U.length===10)J=k(this,U,Q);else if(Z<63)J=v(this,U,Q);else if(Z<1024)J=B(this,U,Q);else J=_(this,U,Q);return J};function x(U,Q){this.x=U,this.y=Q}x.prototype.makeRBT=function(U){var Q=Array(U),J=V.prototype._countBits(U)-1;for(var Z=0;Z<U;Z++)Q[Z]=this.revBin(Z,J,U);return Q},x.prototype.revBin=function(U,Q,J){if(U===0||U===J-1)return U;var Z=0;for(var Y=0;Y<Q;Y++)Z|=(U&1)<<Q-Y-1,U>>=1;return Z},x.prototype.permute=function(U,Q,J,Z,Y,$){for(var F=0;F<$;F++)Z[F]=Q[U[F]],Y[F]=J[U[F]]},x.prototype.transform=function(U,Q,J,Z,Y,$){this.permute($,U,Q,J,Z,Y);for(var F=1;F<Y;F<<=1){var G=F<<1,X=Math.cos(2*Math.PI/G),I=Math.sin(2*Math.PI/G);for(var E=0;E<Y;E+=G){var C=X,j=I;for(var g=0;g<F;g++){var p=J[E+g],n=Z[E+g],$0=J[E+g+F],r=Z[E+g+F],d=C*$0-j*r;if(r=C*r+j*$0,$0=d,J[E+g]=p+$0,Z[E+g]=n+r,J[E+g+F]=p-$0,Z[E+g+F]=n-r,g!==G)d=X*C-I*j,j=X*j+I*C,C=d}}}},x.prototype.guessLen13b=function(U,Q){var J=Math.max(Q,U)|1,Z=J&1,Y=0;for(J=J/2|0;J;J=J>>>1)Y++;return 1<<Y+1+Z},x.prototype.conjugate=function(U,Q,J){if(J<=1)return;for(var Z=0;Z<J/2;Z++){var Y=U[Z];U[Z]=U[J-Z-1],U[J-Z-1]=Y,Y=Q[Z],Q[Z]=-Q[J-Z-1],Q[J-Z-1]=-Y}},x.prototype.normalize13b=function(U,Q){var J=0;for(var Z=0;Z<Q/2;Z++){var Y=Math.round(U[2*Z+1]/Q)*8192+Math.round(U[2*Z]/Q)+J;if(U[Z]=Y&67108863,Y<67108864)J=0;else J=Y/67108864|0}return U},x.prototype.convert13b=function(U,Q,J,Z){var Y=0;for(var $=0;$<Q;$++)Y=Y+(U[$]|0),J[2*$]=Y&8191,Y=Y>>>13,J[2*$+1]=Y&8191,Y=Y>>>13;for($=2*Q;$<Z;++$)J[$]=0;O(Y===0),O((Y&-8192)===0)},x.prototype.stub=function(U){var Q=Array(U);for(var J=0;J<U;J++)Q[J]=0;return Q},x.prototype.mulp=function(U,Q,J){var Z=2*this.guessLen13b(U.length,Q.length),Y=this.makeRBT(Z),$=this.stub(Z),F=Array(Z),G=Array(Z),X=Array(Z),I=Array(Z),E=Array(Z),C=Array(Z),j=J.words;j.length=Z,this.convert13b(U.words,U.length,F,Z),this.convert13b(Q.words,Q.length,I,Z),this.transform(F,$,G,X,Z,Y),this.transform(I,$,E,C,Z,Y);for(var g=0;g<Z;g++){var p=G[g]*E[g]-X[g]*C[g];X[g]=G[g]*C[g]+X[g]*E[g],G[g]=p}return this.conjugate(G,X,Z),this.transform(G,X,j,$,Z,Y),this.conjugate(j,$,Z),this.normalize13b(j,Z),J.negative=U.negative^Q.negative,J.length=U.length+Q.length,J.strip()},V.prototype.mul=function(U){var Q=new V(null);return Q.words=Array(this.length+U.length),this.mulTo(U,Q)},V.prototype.mulf=function(U){var Q=new V(null);return Q.words=Array(this.length+U.length),_(this,U,Q)},V.prototype.imul=function(U){return this.clone().mulTo(U,this)},V.prototype.imuln=function(U){O(typeof U==="number"),O(U<67108864);var Q=0;for(var J=0;J<this.length;J++){var Z=(this.words[J]|0)*U,Y=(Z&67108863)+(Q&67108863);Q>>=26,Q+=Z/67108864|0,Q+=Y>>>26,this.words[J]=Y&67108863}if(Q!==0)this.words[J]=Q,this.length++;return this.length=U===0?1:this.length,this},V.prototype.muln=function(U){return this.clone().imuln(U)},V.prototype.sqr=function(){return this.mul(this)},V.prototype.isqr=function(){return this.imul(this.clone())},V.prototype.pow=function(U){var Q=q(U);if(Q.length===0)return new V(1);var J=this;for(var Z=0;Z<Q.length;Z++,J=J.sqr())if(Q[Z]!==0)break;if(++Z<Q.length)for(var Y=J.sqr();Z<Q.length;Z++,Y=Y.sqr()){if(Q[Z]===0)continue;J=J.mul(Y)}return J},V.prototype.iushln=function(U){O(typeof U==="number"&&U>=0);var Q=U%26,J=(U-Q)/26,Z=67108863>>>26-Q<<26-Q,Y;if(Q!==0){var $=0;for(Y=0;Y<this.length;Y++){var F=this.words[Y]&Z,G=(this.words[Y]|0)-F<<Q;this.words[Y]=G|$,$=F>>>26-Q}if($)this.words[Y]=$,this.length++}if(J!==0){for(Y=this.length-1;Y>=0;Y--)this.words[Y+J]=this.words[Y];for(Y=0;Y<J;Y++)this.words[Y]=0;this.length+=J}return this.strip()},V.prototype.ishln=function(U){return O(this.negative===0),this.iushln(U)},V.prototype.iushrn=function(U,Q,J){O(typeof U==="number"&&U>=0);var Z;if(Q)Z=(Q-Q%26)/26;else Z=0;var Y=U%26,$=Math.min((U-Y)/26,this.length),F=67108863^67108863>>>Y<<Y,G=J;if(Z-=$,Z=Math.max(0,Z),G){for(var X=0;X<$;X++)G.words[X]=this.words[X];G.length=$}if($===0);else if(this.length>$){this.length-=$;for(X=0;X<this.length;X++)this.words[X]=this.words[X+$]}else this.words[0]=0,this.length=1;var I=0;for(X=this.length-1;X>=0&&(I!==0||X>=Z);X--){var E=this.words[X]|0;this.words[X]=I<<26-Y|E>>>Y,I=E&F}if(G&&I!==0)G.words[G.length++]=I;if(this.length===0)this.words[0]=0,this.length=1;return this.strip()},V.prototype.ishrn=function(U,Q,J){return O(this.negative===0),this.iushrn(U,Q,J)},V.prototype.shln=function(U){return this.clone().ishln(U)},V.prototype.ushln=function(U){return this.clone().iushln(U)},V.prototype.shrn=function(U){return this.clone().ishrn(U)},V.prototype.ushrn=function(U){return this.clone().iushrn(U)},V.prototype.testn=function(U){O(typeof U==="number"&&U>=0);var Q=U%26,J=(U-Q)/26,Z=1<<Q;if(this.length<=J)return!1;var Y=this.words[J];return!!(Y&Z)},V.prototype.imaskn=function(U){O(typeof U==="number"&&U>=0);var Q=U%26,J=(U-Q)/26;if(O(this.negative===0,"imaskn works only with positive numbers"),this.length<=J)return this;if(Q!==0)J++;if(this.length=Math.min(J,this.length),Q!==0){var Z=67108863^67108863>>>Q<<Q;this.words[this.length-1]&=Z}return this.strip()},V.prototype.maskn=function(U){return this.clone().imaskn(U)},V.prototype.iaddn=function(U){if(O(typeof U==="number"),O(U<67108864),U<0)return this.isubn(-U);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<U)return this.words[0]=U-(this.words[0]|0),this.negative=0,this;return this.negative=0,this.isubn(U),this.negative=1,this}return this._iaddn(U)},V.prototype._iaddn=function(U){this.words[0]+=U;for(var Q=0;Q<this.length&&this.words[Q]>=67108864;Q++)if(this.words[Q]-=67108864,Q===this.length-1)this.words[Q+1]=1;else this.words[Q+1]++;return this.length=Math.max(this.length,Q+1),this},V.prototype.isubn=function(U){if(O(typeof U==="number"),O(U<67108864),U<0)return this.iaddn(-U);if(this.negative!==0)return this.negative=0,this.iaddn(U),this.negative=1,this;if(this.words[0]-=U,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Q=0;Q<this.length&&this.words[Q]<0;Q++)this.words[Q]+=67108864,this.words[Q+1]-=1;return this.strip()},V.prototype.addn=function(U){return this.clone().iaddn(U)},V.prototype.subn=function(U){return this.clone().isubn(U)},V.prototype.iabs=function(){return this.negative=0,this},V.prototype.abs=function(){return this.clone().iabs()},V.prototype._ishlnsubmul=function(U,Q,J){var Z=U.length+J,Y;this._expand(Z);var $,F=0;for(Y=0;Y<U.length;Y++){$=(this.words[Y+J]|0)+F;var G=(U.words[Y]|0)*Q;$-=G&67108863,F=($>>26)-(G/67108864|0),this.words[Y+J]=$&67108863}for(;Y<this.length-J;Y++)$=(this.words[Y+J]|0)+F,F=$>>26,this.words[Y+J]=$&67108863;if(F===0)return this.strip();O(F===-1),F=0;for(Y=0;Y<this.length;Y++)$=-(this.words[Y]|0)+F,F=$>>26,this.words[Y]=$&67108863;return this.negative=1,this.strip()},V.prototype._wordDiv=function(U,Q){var J=this.length-U.length,Z=this.clone(),Y=U,$=Y.words[Y.length-1]|0,F=this._countBits($);if(J=26-F,J!==0)Y=Y.ushln(J),Z.iushln(J),$=Y.words[Y.length-1]|0;var G=Z.length-Y.length,X;if(Q!=="mod"){X=new V(null),X.length=G+1,X.words=Array(X.length);for(var I=0;I<X.length;I++)X.words[I]=0}var E=Z.clone()._ishlnsubmul(Y,1,G);if(E.negative===0){if(Z=E,X)X.words[G]=1}for(var C=G-1;C>=0;C--){var j=(Z.words[Y.length+C]|0)*67108864+(Z.words[Y.length+C-1]|0);j=Math.min(j/$|0,67108863),Z._ishlnsubmul(Y,j,C);while(Z.negative!==0)if(j--,Z.negative=0,Z._ishlnsubmul(Y,1,C),!Z.isZero())Z.negative^=1;if(X)X.words[C]=j}if(X)X.strip();if(Z.strip(),Q!=="div"&&J!==0)Z.iushrn(J);return{div:X||null,mod:Z}},V.prototype.divmod=function(U,Q,J){if(O(!U.isZero()),this.isZero())return{div:new V(0),mod:new V(0)};var Z,Y,$;if(this.negative!==0&&U.negative===0){if($=this.neg().divmod(U,Q),Q!=="mod")Z=$.div.neg();if(Q!=="div"){if(Y=$.mod.neg(),J&&Y.negative!==0)Y.iadd(U)}return{div:Z,mod:Y}}if(this.negative===0&&U.negative!==0){if($=this.divmod(U.neg(),Q),Q!=="mod")Z=$.div.neg();return{div:Z,mod:$.mod}}if((this.negative&U.negative)!==0){if($=this.neg().divmod(U.neg(),Q),Q!=="div"){if(Y=$.mod.neg(),J&&Y.negative!==0)Y.isub(U)}return{div:$.div,mod:Y}}if(U.length>this.length||this.cmp(U)<0)return{div:new V(0),mod:this};if(U.length===1){if(Q==="div")return{div:this.divn(U.words[0]),mod:null};if(Q==="mod")return{div:null,mod:new V(this.modn(U.words[0]))};return{div:this.divn(U.words[0]),mod:new V(this.modn(U.words[0]))}}return this._wordDiv(U,Q)},V.prototype.div=function(U){return this.divmod(U,"div",!1).div},V.prototype.mod=function(U){return this.divmod(U,"mod",!1).mod},V.prototype.umod=function(U){return this.divmod(U,"mod",!0).mod},V.prototype.divRound=function(U){var Q=this.divmod(U);if(Q.mod.isZero())return Q.div;var J=Q.div.negative!==0?Q.mod.isub(U):Q.mod,Z=U.ushrn(1),Y=U.andln(1),$=J.cmp(Z);if($<0||Y===1&&$===0)return Q.div;return Q.div.negative!==0?Q.div.isubn(1):Q.div.iaddn(1)},V.prototype.modn=function(U){O(U<=67108863);var Q=67108864%U,J=0;for(var Z=this.length-1;Z>=0;Z--)J=(Q*J+(this.words[Z]|0))%U;return J},V.prototype.idivn=function(U){O(U<=67108863);var Q=0;for(var J=this.length-1;J>=0;J--){var Z=(this.words[J]|0)+Q*67108864;this.words[J]=Z/U|0,Q=Z%U}return this.strip()},V.prototype.divn=function(U){return this.clone().idivn(U)},V.prototype.egcd=function(U){O(U.negative===0),O(!U.isZero());var Q=this,J=U.clone();if(Q.negative!==0)Q=Q.umod(U);else Q=Q.clone();var Z=new V(1),Y=new V(0),$=new V(0),F=new V(1),G=0;while(Q.isEven()&&J.isEven())Q.iushrn(1),J.iushrn(1),++G;var X=J.clone(),I=Q.clone();while(!Q.isZero()){for(var E=0,C=1;(Q.words[0]&C)===0&&E<26;++E,C<<=1);if(E>0){Q.iushrn(E);while(E-- >0){if(Z.isOdd()||Y.isOdd())Z.iadd(X),Y.isub(I);Z.iushrn(1),Y.iushrn(1)}}for(var j=0,g=1;(J.words[0]&g)===0&&j<26;++j,g<<=1);if(j>0){J.iushrn(j);while(j-- >0){if($.isOdd()||F.isOdd())$.iadd(X),F.isub(I);$.iushrn(1),F.iushrn(1)}}if(Q.cmp(J)>=0)Q.isub(J),Z.isub($),Y.isub(F);else J.isub(Q),$.isub(Z),F.isub(Y)}return{a:$,b:F,gcd:J.iushln(G)}},V.prototype._invmp=function(U){O(U.negative===0),O(!U.isZero());var Q=this,J=U.clone();if(Q.negative!==0)Q=Q.umod(U);else Q=Q.clone();var Z=new V(1),Y=new V(0),$=J.clone();while(Q.cmpn(1)>0&&J.cmpn(1)>0){for(var F=0,G=1;(Q.words[0]&G)===0&&F<26;++F,G<<=1);if(F>0){Q.iushrn(F);while(F-- >0){if(Z.isOdd())Z.iadd($);Z.iushrn(1)}}for(var X=0,I=1;(J.words[0]&I)===0&&X<26;++X,I<<=1);if(X>0){J.iushrn(X);while(X-- >0){if(Y.isOdd())Y.iadd($);Y.iushrn(1)}}if(Q.cmp(J)>=0)Q.isub(J),Z.isub(Y);else J.isub(Q),Y.isub(Z)}var E;if(Q.cmpn(1)===0)E=Z;else E=Y;if(E.cmpn(0)<0)E.iadd(U);return E},V.prototype.gcd=function(U){if(this.isZero())return U.abs();if(U.isZero())return this.abs();var Q=this.clone(),J=U.clone();Q.negative=0,J.negative=0;for(var Z=0;Q.isEven()&&J.isEven();Z++)Q.iushrn(1),J.iushrn(1);do{while(Q.isEven())Q.iushrn(1);while(J.isEven())J.iushrn(1);var Y=Q.cmp(J);if(Y<0){var $=Q;Q=J,J=$}else if(Y===0||J.cmpn(1)===0)break;Q.isub(J)}while(!0);return J.iushln(Z)},V.prototype.invm=function(U){return this.egcd(U).a.umod(U)},V.prototype.isEven=function(){return(this.words[0]&1)===0},V.prototype.isOdd=function(){return(this.words[0]&1)===1},V.prototype.andln=function(U){return this.words[0]&U},V.prototype.bincn=function(U){O(typeof U==="number");var Q=U%26,J=(U-Q)/26,Z=1<<Q;if(this.length<=J)return this._expand(J+1),this.words[J]|=Z,this;var Y=Z;for(var $=J;Y!==0&&$<this.length;$++){var F=this.words[$]|0;F+=Y,Y=F>>>26,F&=67108863,this.words[$]=F}if(Y!==0)this.words[$]=Y,this.length++;return this},V.prototype.isZero=function(){return this.length===1&&this.words[0]===0},V.prototype.cmpn=function(U){var Q=U<0;if(this.negative!==0&&!Q)return-1;if(this.negative===0&&Q)return 1;this.strip();var J;if(this.length>1)J=1;else{if(Q)U=-U;O(U<=67108863,"Number is too big");var Z=this.words[0]|0;J=Z===U?0:Z<U?-1:1}if(this.negative!==0)return-J|0;return J},V.prototype.cmp=function(U){if(this.negative!==0&&U.negative===0)return-1;if(this.negative===0&&U.negative!==0)return 1;var Q=this.ucmp(U);if(this.negative!==0)return-Q|0;return Q},V.prototype.ucmp=function(U){if(this.length>U.length)return 1;if(this.length<U.length)return-1;var Q=0;for(var J=this.length-1;J>=0;J--){var Z=this.words[J]|0,Y=U.words[J]|0;if(Z===Y)continue;if(Z<Y)Q=-1;else if(Z>Y)Q=1;break}return Q},V.prototype.gtn=function(U){return this.cmpn(U)===1},V.prototype.gt=function(U){return this.cmp(U)===1},V.prototype.gten=function(U){return this.cmpn(U)>=0},V.prototype.gte=function(U){return this.cmp(U)>=0},V.prototype.ltn=function(U){return this.cmpn(U)===-1},V.prototype.lt=function(U){return this.cmp(U)===-1},V.prototype.lten=function(U){return this.cmpn(U)<=0},V.prototype.lte=function(U){return this.cmp(U)<=0},V.prototype.eqn=function(U){return this.cmpn(U)===0},V.prototype.eq=function(U){return this.cmp(U)===0},V.red=function(U){return new u(U)},V.prototype.toRed=function(U){return O(!this.red,"Already a number in reduction context"),O(this.negative===0,"red works only with positives"),U.convertTo(this)._forceRed(U)},V.prototype.fromRed=function(){return O(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},V.prototype._forceRed=function(U){return this.red=U,this},V.prototype.forceRed=function(U){return O(!this.red,"Already a number in reduction context"),this._forceRed(U)},V.prototype.redAdd=function(U){return O(this.red,"redAdd works only with red numbers"),this.red.add(this,U)},V.prototype.redIAdd=function(U){return O(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,U)},V.prototype.redSub=function(U){return O(this.red,"redSub works only with red numbers"),this.red.sub(this,U)},V.prototype.redISub=function(U){return O(this.red,"redISub works only with red numbers"),this.red.isub(this,U)},V.prototype.redShl=function(U){return O(this.red,"redShl works only with red numbers"),this.red.shl(this,U)},V.prototype.redMul=function(U){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,U),this.red.mul(this,U)},V.prototype.redIMul=function(U){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,U),this.red.imul(this,U)},V.prototype.redSqr=function(){return O(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},V.prototype.redISqr=function(){return O(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},V.prototype.redSqrt=function(){return O(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},V.prototype.redInvm=function(){return O(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},V.prototype.redNeg=function(){return O(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},V.prototype.redPow=function(U){return O(this.red&&!U.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,U)};var w={k256:null,p224:null,p192:null,p25519:null};function y(U,Q){this.name=U,this.p=new V(Q,16),this.n=this.p.bitLength(),this.k=new V(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}y.prototype._tmp=function(){var U=new V(null);return U.words=Array(Math.ceil(this.n/13)),U},y.prototype.ireduce=function(U){var Q=U,J;do this.split(Q,this.tmp),Q=this.imulK(Q),Q=Q.iadd(this.tmp),J=Q.bitLength();while(J>this.n);var Z=J<this.n?-1:Q.ucmp(this.p);if(Z===0)Q.words[0]=0,Q.length=1;else if(Z>0)Q.isub(this.p);else if(Q.strip!==void 0)Q.strip();else Q._strip();return Q},y.prototype.split=function(U,Q){U.iushrn(this.n,0,Q)},y.prototype.imulK=function(U){return U.imul(this.k)};function l(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}L(l,y),l.prototype.split=function(U,Q){var J=4194303,Z=Math.min(U.length,9);for(var Y=0;Y<Z;Y++)Q.words[Y]=U.words[Y];if(Q.length=Z,U.length<=9){U.words[0]=0,U.length=1;return}var $=U.words[9];Q.words[Q.length++]=$&J;for(Y=10;Y<U.length;Y++){var F=U.words[Y]|0;U.words[Y-10]=(F&J)<<4|$>>>22,$=F}if($>>>=22,U.words[Y-10]=$,$===0&&U.length>10)U.length-=10;else U.length-=9},l.prototype.imulK=function(U){U.words[U.length]=0,U.words[U.length+1]=0,U.length+=2;var Q=0;for(var J=0;J<U.length;J++){var Z=U.words[J]|0;Q+=Z*977,U.words[J]=Q&67108863,Q=Z*64+(Q/67108864|0)}if(U.words[U.length-1]===0){if(U.length--,U.words[U.length-1]===0)U.length--}return U};function J0(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}L(J0,y);function K0(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}L(K0,y);function V0(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}L(V0,y),V0.prototype.imulK=function(U){var Q=0;for(var J=0;J<U.length;J++){var Z=(U.words[J]|0)*19+Q,Y=Z&67108863;Z>>>=26,U.words[J]=Y,Q=Z}if(Q!==0)U.words[U.length++]=Q;return U},V._prime=function(U){if(w[U])return w[U];var Q;if(U==="k256")Q=new l;else if(U==="p224")Q=new J0;else if(U==="p192")Q=new K0;else if(U==="p25519")Q=new V0;else throw Error("Unknown prime "+U);return w[U]=Q,Q};function u(U){if(typeof U==="string"){var Q=V._prime(U);this.m=Q.p,this.prime=Q}else O(U.gtn(1),"modulus must be greater than 1"),this.m=U,this.prime=null}u.prototype._verify1=function(U){O(U.negative===0,"red works only with positives"),O(U.red,"red works only with red numbers")},u.prototype._verify2=function(U,Q){O((U.negative|Q.negative)===0,"red works only with positives"),O(U.red&&U.red===Q.red,"red works only with red numbers")},u.prototype.imod=function(U){if(this.prime)return this.prime.ireduce(U)._forceRed(this);return U.umod(this.m)._forceRed(this)},u.prototype.neg=function(U){if(U.isZero())return U.clone();return this.m.sub(U)._forceRed(this)},u.prototype.add=function(U,Q){this._verify2(U,Q);var J=U.add(Q);if(J.cmp(this.m)>=0)J.isub(this.m);return J._forceRed(this)},u.prototype.iadd=function(U,Q){this._verify2(U,Q);var J=U.iadd(Q);if(J.cmp(this.m)>=0)J.isub(this.m);return J},u.prototype.sub=function(U,Q){this._verify2(U,Q);var J=U.sub(Q);if(J.cmpn(0)<0)J.iadd(this.m);return J._forceRed(this)},u.prototype.isub=function(U,Q){this._verify2(U,Q);var J=U.isub(Q);if(J.cmpn(0)<0)J.iadd(this.m);return J},u.prototype.shl=function(U,Q){return this._verify1(U),this.imod(U.ushln(Q))},u.prototype.imul=function(U,Q){return this._verify2(U,Q),this.imod(U.imul(Q))},u.prototype.mul=function(U,Q){return this._verify2(U,Q),this.imod(U.mul(Q))},u.prototype.isqr=function(U){return this.imul(U,U.clone())},u.prototype.sqr=function(U){return this.mul(U,U)},u.prototype.sqrt=function(U){if(U.isZero())return U.clone();var Q=this.m.andln(3);if(O(Q%2===1),Q===3){var J=this.m.add(new V(1)).iushrn(2);return this.pow(U,J)}var Z=this.m.subn(1),Y=0;while(!Z.isZero()&&Z.andln(1)===0)Y++,Z.iushrn(1);O(!Z.isZero());var $=new V(1).toRed(this),F=$.redNeg(),G=this.m.subn(1).iushrn(1),X=this.m.bitLength();X=new V(2*X*X).toRed(this);while(this.pow(X,G).cmp(F)!==0)X.redIAdd(F);var I=this.pow(X,Z),E=this.pow(U,Z.addn(1).iushrn(1)),C=this.pow(U,Z),j=Y;while(C.cmp($)!==0){var g=C;for(var p=0;g.cmp($)!==0;p++)g=g.redSqr();O(p<j);var n=this.pow(I,new V(1).iushln(j-p-1));E=E.redMul(n),I=n.redSqr(),C=C.redMul(I),j=p}return E},u.prototype.invm=function(U){var Q=U._invmp(this.m);if(Q.negative!==0)return Q.negative=0,this.imod(Q).redNeg();else return this.imod(Q)},u.prototype.pow=function(U,Q){if(Q.isZero())return new V(1).toRed(this);if(Q.cmpn(1)===0)return U.clone();var J=4,Z=Array(1<<J);Z[0]=new V(1).toRed(this),Z[1]=U;for(var Y=2;Y<Z.length;Y++)Z[Y]=this.mul(Z[Y-1],U);var $=Z[0],F=0,G=0,X=Q.bitLength()%26;if(X===0)X=26;for(Y=Q.length-1;Y>=0;Y--){var I=Q.words[Y];for(var E=X-1;E>=0;E--){var C=I>>E&1;if($!==Z[0])$=this.sqr($);if(C===0&&F===0){G=0;continue}if(F<<=1,F|=C,G++,G!==J&&(Y!==0||E!==0))continue;$=this.mul($,Z[F]),G=0,F=0}X=26}return $},u.prototype.convertTo=function(U){var Q=U.umod(this.m);return Q===U?Q.clone():Q},u.prototype.convertFrom=function(U){var Q=U.clone();return Q.red=null,Q},V.mont=function(U){return new X0(U)};function X0(U){if(u.call(this,U),this.shift=this.m.bitLength(),this.shift%26!==0)this.shift+=26-this.shift%26;this.r=new V(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)}L(X0,u),X0.prototype.convertTo=function(U){return this.imod(U.ushln(this.shift))},X0.prototype.convertFrom=function(U){var Q=this.imod(U.mul(this.rinv));return Q.red=null,Q},X0.prototype.imul=function(U,Q){if(U.isZero()||Q.isZero())return U.words[0]=0,U.length=1,U;var J=U.imul(Q),Z=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=J.isub(Z).iushrn(this.shift),$=Y;if(Y.cmp(this.m)>=0)$=Y.isub(this.m);else if(Y.cmpn(0)<0)$=Y.iadd(this.m);return $._forceRed(this)},X0.prototype.mul=function(U,Q){if(U.isZero()||Q.isZero())return new V(0)._forceRed(this);var J=U.mul(Q),Z=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=J.isub(Z).iushrn(this.shift),$=Y;if(Y.cmp(this.m)>=0)$=Y.isub(this.m);else if(Y.cmpn(0)<0)$=Y.iadd(this.m);return $._forceRed(this)},X0.prototype.invm=function(U){var Q=this.imod(U._invmp(this.m).mul(this.r2));return Q._forceRed(this)}})(typeof W>"u"||W,K)}),NQ=G0((K,W)=>{var H=GZ(),T=MU().Buffer;function O(L,V){return T.from(L.toRed(H.mont(V.modulus)).redPow(new H(V.publicExponent)).fromRed().toArray())}W.exports=O}),wV=G0((K,W)=>{(function(H,T){function O(Z,Y){if(!Z)throw Error(Y||"Assertion failed")}function L(Z,Y){Z.super_=Y;var $=function(){};$.prototype=Y.prototype,Z.prototype=new $,Z.prototype.constructor=Z}function V(Z,Y,$){if(V.isBN(Z))return Z;if(this.negative=0,this.words=null,this.length=0,this.red=null,Z!==null){if(Y==="le"||Y==="be")$=Y,Y=10;this._init(Z||0,Y||10,$||"be")}}if(typeof H==="object")H.exports=V;else T.BN=V;V.BN=V,V.wordSize=26;var P;try{if(typeof window<"u"&&typeof window.Buffer<"u")P=window.Buffer;else P=(OU(),h0(HU)).Buffer}catch(Z){}V.isBN=function(Z){if(Z instanceof V)return!0;return Z!==null&&typeof Z==="object"&&Z.constructor.wordSize===V.wordSize&&Array.isArray(Z.words)},V.max=function(Z,Y){if(Z.cmp(Y)>0)return Z;return Y},V.min=function(Z,Y){if(Z.cmp(Y)<0)return Z;return Y},V.prototype._init=function(Z,Y,$){if(typeof Z==="number")return this._initNumber(Z,Y,$);if(typeof Z==="object")return this._initArray(Z,Y,$);if(Y==="hex")Y=16;O(Y===(Y|0)&&Y>=2&&Y<=36),Z=Z.toString().replace(/\s+/g,"");var F=0;if(Z[0]==="-")F++,this.negative=1;if(F<Z.length){if(Y===16)this._parseHex(Z,F,$);else if(this._parseBase(Z,Y,F),$==="le")this._initArray(this.toArray(),Y,$)}},V.prototype._initNumber=function(Z,Y,$){if(Z<0)this.negative=1,Z=-Z;if(Z<67108864)this.words=[Z&67108863],this.length=1;else if(Z<4503599627370496)this.words=[Z&67108863,Z/67108864&67108863],this.length=2;else O(Z<9007199254740992),this.words=[Z&67108863,Z/67108864&67108863,1],this.length=3;if($!=="le")return;this._initArray(this.toArray(),Y,$)},V.prototype._initArray=function(Z,Y,$){if(O(typeof Z.length==="number"),Z.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(Z.length/3),this.words=Array(this.length);for(var F=0;F<this.length;F++)this.words[F]=0;var G,X,I=0;if($==="be"){for(F=Z.length-1,G=0;F>=0;F-=3)if(X=Z[F]|Z[F-1]<<8|Z[F-2]<<16,this.words[G]|=X<<I&67108863,this.words[G+1]=X>>>26-I&67108863,I+=24,I>=26)I-=26,G++}else if($==="le"){for(F=0,G=0;F<Z.length;F+=3)if(X=Z[F]|Z[F+1]<<8|Z[F+2]<<16,this.words[G]|=X<<I&67108863,this.words[G+1]=X>>>26-I&67108863,I+=24,I>=26)I-=26,G++}return this._strip()};function S(Z,Y){var $=Z.charCodeAt(Y);if($>=48&&$<=57)return $-48;else if($>=65&&$<=70)return $-55;else if($>=97&&$<=102)return $-87;else O(!1,"Invalid character in "+Z)}function M(Z,Y,$){var F=S(Z,$);if($-1>=Y)F|=S(Z,$-1)<<4;return F}V.prototype._parseHex=function(Z,Y,$){this.length=Math.ceil((Z.length-Y)/6),this.words=Array(this.length);for(var F=0;F<this.length;F++)this.words[F]=0;var G=0,X=0,I;if($==="be")for(F=Z.length-1;F>=Y;F-=2)if(I=M(Z,Y,F)<<G,this.words[X]|=I&67108863,G>=18)G-=18,X+=1,this.words[X]|=I>>>26;else G+=8;else{var E=Z.length-Y;for(F=E%2===0?Y+1:Y;F<Z.length;F+=2)if(I=M(Z,Y,F)<<G,this.words[X]|=I&67108863,G>=18)G-=18,X+=1,this.words[X]|=I>>>26;else G+=8}this._strip()};function z(Z,Y,$,F){var G=0,X=0,I=Math.min(Z.length,$);for(var E=Y;E<I;E++){var C=Z.charCodeAt(E)-48;if(G*=F,C>=49)X=C-49+10;else if(C>=17)X=C-17+10;else X=C;O(C>=0&&X<F,"Invalid character"),G+=X}return G}V.prototype._parseBase=function(Z,Y,$){this.words=[0],this.length=1;for(var F=0,G=1;G<=67108863;G*=Y)F++;F--,G=G/Y|0;var X=Z.length-$,I=X%F,E=Math.min(X,X-I)+$,C=0;for(var j=$;j<E;j+=F)if(C=z(Z,j,j+F,Y),this.imuln(G),this.words[0]+C<67108864)this.words[0]+=C;else this._iaddn(C);if(I!==0){var g=1;C=z(Z,j,Z.length,Y);for(j=0;j<I;j++)g*=Y;if(this.imuln(g),this.words[0]+C<67108864)this.words[0]+=C;else this._iaddn(C)}this._strip()},V.prototype.copy=function(Z){Z.words=Array(this.length);for(var Y=0;Y<this.length;Y++)Z.words[Y]=this.words[Y];Z.length=this.length,Z.negative=this.negative,Z.red=this.red};function A(Z,Y){Z.words=Y.words,Z.length=Y.length,Z.negative=Y.negative,Z.red=Y.red}if(V.prototype._move=function(Z){A(Z,this)},V.prototype.clone=function(){var Z=new V(null);return this.copy(Z),Z},V.prototype._expand=function(Z){while(this.length<Z)this.words[this.length++]=0;return this},V.prototype._strip=function(){while(this.length>1&&this.words[this.length-1]===0)this.length--;return this._normSign()},V.prototype._normSign=function(){if(this.length===1&&this.words[0]===0)this.negative=0;return this},typeof Symbol<"u"&&typeof Symbol.for==="function")try{V.prototype[Symbol.for("nodejs.util.inspect.custom")]=D}catch(Z){V.prototype.inspect=D}else V.prototype.inspect=D;function D(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var R=["","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"],q=[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],v=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];if(V.prototype.toString=function(Z,Y){Z=Z||10,Y=Y|0||1;var $;if(Z===16||Z==="hex"){$="";var F=0,G=0;for(var X=0;X<this.length;X++){var I=this.words[X],E=((I<<F|G)&16777215).toString(16);if(G=I>>>24-F&16777215,F+=2,F>=26)F-=26,X--;if(G!==0||X!==this.length-1)$=R[6-E.length]+E+$;else $=E+$}if(G!==0)$=G.toString(16)+$;while($.length%Y!==0)$="0"+$;if(this.negative!==0)$="-"+$;return $}if(Z===(Z|0)&&Z>=2&&Z<=36){var C=q[Z],j=v[Z];$="";var g=this.clone();g.negative=0;while(!g.isZero()){var p=g.modrn(j).toString(Z);if(g=g.idivn(j),!g.isZero())$=R[C-p.length]+p+$;else $=p+$}if(this.isZero())$="0"+$;while($.length%Y!==0)$="0"+$;if(this.negative!==0)$="-"+$;return $}O(!1,"Base should be between 2 and 36")},V.prototype.toNumber=function(){var Z=this.words[0];if(this.length===2)Z+=this.words[1]*67108864;else if(this.length===3&&this.words[2]===1)Z+=4503599627370496+this.words[1]*67108864;else if(this.length>2)O(!1,"Number can only safely store up to 53 bits");return this.negative!==0?-Z:Z},V.prototype.toJSON=function(){return this.toString(16,2)},P)V.prototype.toBuffer=function(Z,Y){return this.toArrayLike(P,Z,Y)};V.prototype.toArray=function(Z,Y){return this.toArrayLike(Array,Z,Y)};var k=function(Z,Y){if(Z.allocUnsafe)return Z.allocUnsafe(Y);return new Z(Y)};if(V.prototype.toArrayLike=function(Z,Y,$){this._strip();var F=this.byteLength(),G=$||Math.max(1,F);O(F<=G,"byte array longer than desired length"),O(G>0,"Requested array length <= 0");var X=k(Z,G),I=Y==="le"?"LE":"BE";return this["_toArrayLike"+I](X,F),X},V.prototype._toArrayLikeLE=function(Z,Y){var $=0,F=0;for(var G=0,X=0;G<this.length;G++){var I=this.words[G]<<X|F;if(Z[$++]=I&255,$<Z.length)Z[$++]=I>>8&255;if($<Z.length)Z[$++]=I>>16&255;if(X===6){if($<Z.length)Z[$++]=I>>24&255;F=0,X=0}else F=I>>>24,X+=2}if($<Z.length){Z[$++]=F;while($<Z.length)Z[$++]=0}},V.prototype._toArrayLikeBE=function(Z,Y){var $=Z.length-1,F=0;for(var G=0,X=0;G<this.length;G++){var I=this.words[G]<<X|F;if(Z[$--]=I&255,$>=0)Z[$--]=I>>8&255;if($>=0)Z[$--]=I>>16&255;if(X===6){if($>=0)Z[$--]=I>>24&255;F=0,X=0}else F=I>>>24,X+=2}if($>=0){Z[$--]=F;while($>=0)Z[$--]=0}},Math.clz32)V.prototype._countBits=function(Z){return 32-Math.clz32(Z)};else V.prototype._countBits=function(Z){var Y=Z,$=0;if(Y>=4096)$+=13,Y>>>=13;if(Y>=64)$+=7,Y>>>=7;if(Y>=8)$+=4,Y>>>=4;if(Y>=2)$+=2,Y>>>=2;return $+Y};V.prototype._zeroBits=function(Z){if(Z===0)return 26;var Y=Z,$=0;if((Y&8191)===0)$+=13,Y>>>=13;if((Y&127)===0)$+=7,Y>>>=7;if((Y&15)===0)$+=4,Y>>>=4;if((Y&3)===0)$+=2,Y>>>=2;if((Y&1)===0)$++;return $},V.prototype.bitLength=function(){var Z=this.words[this.length-1],Y=this._countBits(Z);return(this.length-1)*26+Y};function B(Z){var Y=Array(Z.bitLength());for(var $=0;$<Y.length;$++){var F=$/26|0,G=$%26;Y[$]=Z.words[F]>>>G&1}return Y}V.prototype.zeroBits=function(){if(this.isZero())return 0;var Z=0;for(var Y=0;Y<this.length;Y++){var $=this._zeroBits(this.words[Y]);if(Z+=$,$!==26)break}return Z},V.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},V.prototype.toTwos=function(Z){if(this.negative!==0)return this.abs().inotn(Z).iaddn(1);return this.clone()},V.prototype.fromTwos=function(Z){if(this.testn(Z-1))return this.notn(Z).iaddn(1).ineg();return this.clone()},V.prototype.isNeg=function(){return this.negative!==0},V.prototype.neg=function(){return this.clone().ineg()},V.prototype.ineg=function(){if(!this.isZero())this.negative^=1;return this},V.prototype.iuor=function(Z){while(this.length<Z.length)this.words[this.length++]=0;for(var Y=0;Y<Z.length;Y++)this.words[Y]=this.words[Y]|Z.words[Y];return this._strip()},V.prototype.ior=function(Z){return O((this.negative|Z.negative)===0),this.iuor(Z)},V.prototype.or=function(Z){if(this.length>Z.length)return this.clone().ior(Z);return Z.clone().ior(this)},V.prototype.uor=function(Z){if(this.length>Z.length)return this.clone().iuor(Z);return Z.clone().iuor(this)},V.prototype.iuand=function(Z){var Y;if(this.length>Z.length)Y=Z;else Y=this;for(var $=0;$<Y.length;$++)this.words[$]=this.words[$]&Z.words[$];return this.length=Y.length,this._strip()},V.prototype.iand=function(Z){return O((this.negative|Z.negative)===0),this.iuand(Z)},V.prototype.and=function(Z){if(this.length>Z.length)return this.clone().iand(Z);return Z.clone().iand(this)},V.prototype.uand=function(Z){if(this.length>Z.length)return this.clone().iuand(Z);return Z.clone().iuand(this)},V.prototype.iuxor=function(Z){var Y,$;if(this.length>Z.length)Y=this,$=Z;else Y=Z,$=this;for(var F=0;F<$.length;F++)this.words[F]=Y.words[F]^$.words[F];if(this!==Y)for(;F<Y.length;F++)this.words[F]=Y.words[F];return this.length=Y.length,this._strip()},V.prototype.ixor=function(Z){return O((this.negative|Z.negative)===0),this.iuxor(Z)},V.prototype.xor=function(Z){if(this.length>Z.length)return this.clone().ixor(Z);return Z.clone().ixor(this)},V.prototype.uxor=function(Z){if(this.length>Z.length)return this.clone().iuxor(Z);return Z.clone().iuxor(this)},V.prototype.inotn=function(Z){O(typeof Z==="number"&&Z>=0);var Y=Math.ceil(Z/26)|0,$=Z%26;if(this._expand(Y),$>0)Y--;for(var F=0;F<Y;F++)this.words[F]=~this.words[F]&67108863;if($>0)this.words[F]=~this.words[F]&67108863>>26-$;return this._strip()},V.prototype.notn=function(Z){return this.clone().inotn(Z)},V.prototype.setn=function(Z,Y){O(typeof Z==="number"&&Z>=0);var $=Z/26|0,F=Z%26;if(this._expand($+1),Y)this.words[$]=this.words[$]|1<<F;else this.words[$]=this.words[$]&~(1<<F);return this._strip()},V.prototype.iadd=function(Z){var Y;if(this.negative!==0&&Z.negative===0)return this.negative=0,Y=this.isub(Z),this.negative^=1,this._normSign();else if(this.negative===0&&Z.negative!==0)return Z.negative=0,Y=this.isub(Z),Z.negative=1,Y._normSign();var $,F;if(this.length>Z.length)$=this,F=Z;else $=Z,F=this;var G=0;for(var X=0;X<F.length;X++)Y=($.words[X]|0)+(F.words[X]|0)+G,this.words[X]=Y&67108863,G=Y>>>26;for(;G!==0&&X<$.length;X++)Y=($.words[X]|0)+G,this.words[X]=Y&67108863,G=Y>>>26;if(this.length=$.length,G!==0)this.words[this.length]=G,this.length++;else if($!==this)for(;X<$.length;X++)this.words[X]=$.words[X];return this},V.prototype.add=function(Z){var Y;if(Z.negative!==0&&this.negative===0)return Z.negative=0,Y=this.sub(Z),Z.negative^=1,Y;else if(Z.negative===0&&this.negative!==0)return this.negative=0,Y=Z.sub(this),this.negative=1,Y;if(this.length>Z.length)return this.clone().iadd(Z);return Z.clone().iadd(this)},V.prototype.isub=function(Z){if(Z.negative!==0){Z.negative=0;var Y=this.iadd(Z);return Z.negative=1,Y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(Z),this.negative=1,this._normSign();var $=this.cmp(Z);if($===0)return this.negative=0,this.length=1,this.words[0]=0,this;var F,G;if($>0)F=this,G=Z;else F=Z,G=this;var X=0;for(var I=0;I<G.length;I++)Y=(F.words[I]|0)-(G.words[I]|0)+X,X=Y>>26,this.words[I]=Y&67108863;for(;X!==0&&I<F.length;I++)Y=(F.words[I]|0)+X,X=Y>>26,this.words[I]=Y&67108863;if(X===0&&I<F.length&&F!==this)for(;I<F.length;I++)this.words[I]=F.words[I];if(this.length=Math.max(this.length,I),F!==this)this.negative=1;return this._strip()},V.prototype.sub=function(Z){return this.clone().isub(Z)};function _(Z,Y,$){$.negative=Y.negative^Z.negative;var F=Z.length+Y.length|0;$.length=F,F=F-1|0;var G=Z.words[0]|0,X=Y.words[0]|0,I=G*X,E=I&67108863,C=I/67108864|0;$.words[0]=E;for(var j=1;j<F;j++){var g=C>>>26,p=C&67108863,n=Math.min(j,Y.length-1);for(var $0=Math.max(0,j-Z.length+1);$0<=n;$0++){var r=j-$0|0;G=Z.words[r]|0,X=Y.words[$0]|0,I=G*X+p,g+=I/67108864|0,p=I&67108863}$.words[j]=p|0,C=g|0}if(C!==0)$.words[j]=C|0;else $.length--;return $._strip()}var x=function(Z,Y,$){var F=Z.words,G=Y.words,X=$.words,I=0,E,C,j,g=F[0]|0,p=g&8191,n=g>>>13,$0=F[1]|0,r=$0&8191,d=$0>>>13,Q0=F[2]|0,m=Q0&8191,i=Q0>>>13,g0=F[3]|0,f=g0&8191,h=g0>>>13,Y0=F[4]|0,t=Y0&8191,e=Y0>>>13,M0=F[5]|0,c=M0&8191,o=M0>>>13,N0=F[6]|0,s=N0&8191,Z0=N0>>>13,y0=F[7]|0,H0=y0&8191,O0=y0>>>13,n0=F[8]|0,W0=n0&8191,A0=n0>>>13,t0=F[9]|0,D0=t0&8191,T0=t0>>>13,TU=G[0]|0,L0=TU&8191,k0=TU>>>13,DU=G[1]|0,j0=DU&8191,E0=DU>>>13,AU=G[2]|0,v0=AU&8191,R0=AU>>>13,$U=G[3]|0,_0=$U&8191,B0=$U>>>13,WU=G[4]|0,q0=WU&8191,N=WU>>>13,b=G[5]|0,a=b&8191,U0=b>>>13,w0=G[6]|0,F0=w0&8191,C0=w0>>>13,m0=G[7]|0,S0=m0&8191,x0=m0>>>13,CU=G[8]|0,P0=CU&8191,z0=CU>>>13,s0=G[9]|0,c0=s0&8191,f0=s0>>>13;$.negative=Z.negative^Y.negative,$.length=19,E=Math.imul(p,L0),C=Math.imul(p,k0),C=C+Math.imul(n,L0)|0,j=Math.imul(n,k0);var d0=(I+E|0)+((C&8191)<<13)|0;I=(j+(C>>>13)|0)+(d0>>>26)|0,d0&=67108863,E=Math.imul(r,L0),C=Math.imul(r,k0),C=C+Math.imul(d,L0)|0,j=Math.imul(d,k0),E=E+Math.imul(p,j0)|0,C=C+Math.imul(p,E0)|0,C=C+Math.imul(n,j0)|0,j=j+Math.imul(n,E0)|0;var b0=(I+E|0)+((C&8191)<<13)|0;I=(j+(C>>>13)|0)+(b0>>>26)|0,b0&=67108863,E=Math.imul(m,L0),C=Math.imul(m,k0),C=C+Math.imul(i,L0)|0,j=Math.imul(i,k0),E=E+Math.imul(r,j0)|0,C=C+Math.imul(r,E0)|0,C=C+Math.imul(d,j0)|0,j=j+Math.imul(d,E0)|0,E=E+Math.imul(p,v0)|0,C=C+Math.imul(p,R0)|0,C=C+Math.imul(n,v0)|0,j=j+Math.imul(n,R0)|0;var r0=(I+E|0)+((C&8191)<<13)|0;I=(j+(C>>>13)|0)+(r0>>>26)|0,r0&=67108863,E=Math.imul(f,L0),C=Math.imul(f,k0),C=C+Math.imul(h,L0)|0,j=Math.imul(h,k0),E=E+Math.imul(m,j0)|0,C=C+Math.imul(m,E0)|0,C=C+Math.imul(i,j0)|0,j=j+Math.imul(i,E0)|0,E=E+Math.imul(r,v0)|0,C=C+Math.imul(r,R0)|0,C=C+Math.imul(d,v0)|0,j=j+Math.imul(d,R0)|0,E=E+Math.imul(p,_0)|0,C=C+Math.imul(p,B0)|0,C=C+Math.imul(n,_0)|0,j=j+Math.imul(n,B0)|0;var a0=(I+E|0)+((C&8191)<<13)|0;I=(j+(C>>>13)|0)+(a0>>>26)|0,a0&=67108863,E=Math.imul(t,L0),C=Math.imul(t,k0),C=C+Math.imul(e,L0)|0,j=Math.imul(e,k0),E=E+Math.imul(f,j0)|0,C=C+Math.imul(f,E0)|0,C=C+Math.imul(h,j0)|0,j=j+Math.imul(h,E0)|0,E=E+Math.imul(m,v0)|0,C=C+Math.imul(m,R0)|0,C=C+Math.imul(i,v0)|0,j=j+Math.imul(i,R0)|0,E=E+Math.imul(r,_0)|0,C=C+Math.imul(r,B0)|0,C=C+Math.imul(d,_0)|0,j=j+Math.imul(d,B0)|0,E=E+Math.imul(p,q0)|0,C=C+Math.imul(p,N)|0,C=C+Math.imul(n,q0)|0,j=j+Math.imul(n,N)|0;var e0=(I+E|0)+((C&8191)<<13)|0;I=(j+(C>>>13)|0)+(e0>>>26)|0,e0&=67108863,E=Math.imul(c,L0),C=Math.imul(c,k0),C=C+Math.imul(o,L0)|0,j=Math.imul(o,k0),E=E+Math.imul(t,j0)|0,C=C+Math.imul(t,E0)|0,C=C+Math.imul(e,j0)|0,j=j+Math.imul(e,E0)|0,E=E+Math.imul(f,v0)|0,C=C+Math.imul(f,R0)|0,C=C+Math.imul(h,v0)|0,j=j+Math.imul(h,R0)|0,E=E+Math.imul(m,_0)|0,C=C+Math.imul(m,B0)|0,C=C+Math.imul(i,_0)|0,j=j+Math.imul(i,B0)|0,E=E+Math.imul(r,q0)|0,C=C+Math.imul(r,N)|0,C=C+Math.imul(d,q0)|0,j=j+Math.imul(d,N)|0,E=E+Math.imul(p,a)|0,C=C+Math.imul(p,U0)|0,C=C+Math.imul(n,a)|0,j=j+Math.imul(n,U0)|0;var i0=(I+E|0)+((C&8191)<<13)|0;I=(j+(C>>>13)|0)+(i0>>>26)|0,i0&=67108863,E=Math.imul(s,L0),C=Math.imul(s,k0),C=C+Math.imul(Z0,L0)|0,j=Math.imul(Z0,k0),E=E+Math.imul(c,j0)|0,C=C+Math.imul(c,E0)|0,C=C+Math.imul(o,j0)|0,j=j+Math.imul(o,E0)|0,E=E+Math.imul(t,v0)|0,C=C+Math.imul(t,R0)|0,C=C+Math.imul(e,v0)|0,j=j+Math.imul(e,R0)|0,E=E+Math.imul(f,_0)|0,C=C+Math.imul(f,B0)|0,C=C+Math.imul(h,_0)|0,j=j+Math.imul(h,B0)|0,E=E+Math.imul(m,q0)|0,C=C+Math.imul(m,N)|0,C=C+Math.imul(i,q0)|0,j=j+Math.imul(i,N)|0,E=E+Math.imul(r,a)|0,C=C+Math.imul(r,U0)|0,C=C+Math.imul(d,a)|0,j=j+Math.imul(d,U0)|0,E=E+Math.imul(p,F0)|0,C=C+Math.imul(p,C0)|0,C=C+Math.imul(n,F0)|0,j=j+Math.imul(n,C0)|0;var UU=(I+E|0)+((C&8191)<<13)|0;I=(j+(C>>>13)|0)+(UU>>>26)|0,UU&=67108863,E=Math.imul(H0,L0),C=Math.imul(H0,k0),C=C+Math.imul(O0,L0)|0,j=Math.imul(O0,k0),E=E+Math.imul(s,j0)|0,C=C+Math.imul(s,E0)|0,C=C+Math.imul(Z0,j0)|0,j=j+Math.imul(Z0,E0)|0,E=E+Math.imul(c,v0)|0,C=C+Math.imul(c,R0)|0,C=C+Math.imul(o,v0)|0,j=j+Math.imul(o,R0)|0,E=E+Math.imul(t,_0)|0,C=C+Math.imul(t,B0)|0,C=C+Math.imul(e,_0)|0,j=j+Math.imul(e,B0)|0,E=E+Math.imul(f,q0)|0,C=C+Math.imul(f,N)|0,C=C+Math.imul(h,q0)|0,j=j+Math.imul(h,N)|0,E=E+Math.imul(m,a)|0,C=C+Math.imul(m,U0)|0,C=C+Math.imul(i,a)|0,j=j+Math.imul(i,U0)|0,E=E+Math.imul(r,F0)|0,C=C+Math.imul(r,C0)|0,C=C+Math.imul(d,F0)|0,j=j+Math.imul(d,C0)|0,E=E+Math.imul(p,S0)|0,C=C+Math.imul(p,x0)|0,C=C+Math.imul(n,S0)|0,j=j+Math.imul(n,x0)|0;var XU=(I+E|0)+((C&8191)<<13)|0;I=(j+(C>>>13)|0)+(XU>>>26)|0,XU&=67108863,E=Math.imul(W0,L0),C=Math.imul(W0,k0),C=C+Math.imul(A0,L0)|0,j=Math.imul(A0,k0),E=E+Math.imul(H0,j0)|0,C=C+Math.imul(H0,E0)|0,C=C+Math.imul(O0,j0)|0,j=j+Math.imul(O0,E0)|0,E=E+Math.imul(s,v0)|0,C=C+Math.imul(s,R0)|0,C=C+Math.imul(Z0,v0)|0,j=j+Math.imul(Z0,R0)|0,E=E+Math.imul(c,_0)|0,C=C+Math.imul(c,B0)|0,C=C+Math.imul(o,_0)|0,j=j+Math.imul(o,B0)|0,E=E+Math.imul(t,q0)|0,C=C+Math.imul(t,N)|0,C=C+Math.imul(e,q0)|0,j=j+Math.imul(e,N)|0,E=E+Math.imul(f,a)|0,C=C+Math.imul(f,U0)|0,C=C+Math.imul(h,a)|0,j=j+Math.imul(h,U0)|0,E=E+Math.imul(m,F0)|0,C=C+Math.imul(m,C0)|0,C=C+Math.imul(i,F0)|0,j=j+Math.imul(i,C0)|0,E=E+Math.imul(r,S0)|0,C=C+Math.imul(r,x0)|0,C=C+Math.imul(d,S0)|0,j=j+Math.imul(d,x0)|0,E=E+Math.imul(p,P0)|0,C=C+Math.imul(p,z0)|0,C=C+Math.imul(n,P0)|0,j=j+Math.imul(n,z0)|0;var ZU=(I+E|0)+((C&8191)<<13)|0;I=(j+(C>>>13)|0)+(ZU>>>26)|0,ZU&=67108863,E=Math.imul(D0,L0),C=Math.imul(D0,k0),C=C+Math.imul(T0,L0)|0,j=Math.imul(T0,k0),E=E+Math.imul(W0,j0)|0,C=C+Math.imul(W0,E0)|0,C=C+Math.imul(A0,j0)|0,j=j+Math.imul(A0,E0)|0,E=E+Math.imul(H0,v0)|0,C=C+Math.imul(H0,R0)|0,C=C+Math.imul(O0,v0)|0,j=j+Math.imul(O0,R0)|0,E=E+Math.imul(s,_0)|0,C=C+Math.imul(s,B0)|0,C=C+Math.imul(Z0,_0)|0,j=j+Math.imul(Z0,B0)|0,E=E+Math.imul(c,q0)|0,C=C+Math.imul(c,N)|0,C=C+Math.imul(o,q0)|0,j=j+Math.imul(o,N)|0,E=E+Math.imul(t,a)|0,C=C+Math.imul(t,U0)|0,C=C+Math.imul(e,a)|0,j=j+Math.imul(e,U0)|0,E=E+Math.imul(f,F0)|0,C=C+Math.imul(f,C0)|0,C=C+Math.imul(h,F0)|0,j=j+Math.imul(h,C0)|0,E=E+Math.imul(m,S0)|0,C=C+Math.imul(m,x0)|0,C=C+Math.imul(i,S0)|0,j=j+Math.imul(i,x0)|0,E=E+Math.imul(r,P0)|0,C=C+Math.imul(r,z0)|0,C=C+Math.imul(d,P0)|0,j=j+Math.imul(d,z0)|0,E=E+Math.imul(p,c0)|0,C=C+Math.imul(p,f0)|0,C=C+Math.imul(n,c0)|0,j=j+Math.imul(n,f0)|0;var QU=(I+E|0)+((C&8191)<<13)|0;I=(j+(C>>>13)|0)+(QU>>>26)|0,QU&=67108863,E=Math.imul(D0,j0),C=Math.imul(D0,E0),C=C+Math.imul(T0,j0)|0,j=Math.imul(T0,E0),E=E+Math.imul(W0,v0)|0,C=C+Math.imul(W0,R0)|0,C=C+Math.imul(A0,v0)|0,j=j+Math.imul(A0,R0)|0,E=E+Math.imul(H0,_0)|0,C=C+Math.imul(H0,B0)|0,C=C+Math.imul(O0,_0)|0,j=j+Math.imul(O0,B0)|0,E=E+Math.imul(s,q0)|0,C=C+Math.imul(s,N)|0,C=C+Math.imul(Z0,q0)|0,j=j+Math.imul(Z0,N)|0,E=E+Math.imul(c,a)|0,C=C+Math.imul(c,U0)|0,C=C+Math.imul(o,a)|0,j=j+Math.imul(o,U0)|0,E=E+Math.imul(t,F0)|0,C=C+Math.imul(t,C0)|0,C=C+Math.imul(e,F0)|0,j=j+Math.imul(e,C0)|0,E=E+Math.imul(f,S0)|0,C=C+Math.imul(f,x0)|0,C=C+Math.imul(h,S0)|0,j=j+Math.imul(h,x0)|0,E=E+Math.imul(m,P0)|0,C=C+Math.imul(m,z0)|0,C=C+Math.imul(i,P0)|0,j=j+Math.imul(i,z0)|0,E=E+Math.imul(r,c0)|0,C=C+Math.imul(r,f0)|0,C=C+Math.imul(d,c0)|0,j=j+Math.imul(d,f0)|0;var YU=(I+E|0)+((C&8191)<<13)|0;I=(j+(C>>>13)|0)+(YU>>>26)|0,YU&=67108863,E=Math.imul(D0,v0),C=Math.imul(D0,R0),C=C+Math.imul(T0,v0)|0,j=Math.imul(T0,R0),E=E+Math.imul(W0,_0)|0,C=C+Math.imul(W0,B0)|0,C=C+Math.imul(A0,_0)|0,j=j+Math.imul(A0,B0)|0,E=E+Math.imul(H0,q0)|0,C=C+Math.imul(H0,N)|0,C=C+Math.imul(O0,q0)|0,j=j+Math.imul(O0,N)|0,E=E+Math.imul(s,a)|0,C=C+Math.imul(s,U0)|0,C=C+Math.imul(Z0,a)|0,j=j+Math.imul(Z0,U0)|0,E=E+Math.imul(c,F0)|0,C=C+Math.imul(c,C0)|0,C=C+Math.imul(o,F0)|0,j=j+Math.imul(o,C0)|0,E=E+Math.imul(t,S0)|0,C=C+Math.imul(t,x0)|0,C=C+Math.imul(e,S0)|0,j=j+Math.imul(e,x0)|0,E=E+Math.imul(f,P0)|0,C=C+Math.imul(f,z0)|0,C=C+Math.imul(h,P0)|0,j=j+Math.imul(h,z0)|0,E=E+Math.imul(m,c0)|0,C=C+Math.imul(m,f0)|0,C=C+Math.imul(i,c0)|0,j=j+Math.imul(i,f0)|0;var JU=(I+E|0)+((C&8191)<<13)|0;I=(j+(C>>>13)|0)+(JU>>>26)|0,JU&=67108863,E=Math.imul(D0,_0),C=Math.imul(D0,B0),C=C+Math.imul(T0,_0)|0,j=Math.imul(T0,B0),E=E+Math.imul(W0,q0)|0,C=C+Math.imul(W0,N)|0,C=C+Math.imul(A0,q0)|0,j=j+Math.imul(A0,N)|0,E=E+Math.imul(H0,a)|0,C=C+Math.imul(H0,U0)|0,C=C+Math.imul(O0,a)|0,j=j+Math.imul(O0,U0)|0,E=E+Math.imul(s,F0)|0,C=C+Math.imul(s,C0)|0,C=C+Math.imul(Z0,F0)|0,j=j+Math.imul(Z0,C0)|0,E=E+Math.imul(c,S0)|0,C=C+Math.imul(c,x0)|0,C=C+Math.imul(o,S0)|0,j=j+Math.imul(o,x0)|0,E=E+Math.imul(t,P0)|0,C=C+Math.imul(t,z0)|0,C=C+Math.imul(e,P0)|0,j=j+Math.imul(e,z0)|0,E=E+Math.imul(f,c0)|0,C=C+Math.imul(f,f0)|0,C=C+Math.imul(h,c0)|0,j=j+Math.imul(h,f0)|0;var VU=(I+E|0)+((C&8191)<<13)|0;I=(j+(C>>>13)|0)+(VU>>>26)|0,VU&=67108863,E=Math.imul(D0,q0),C=Math.imul(D0,N),C=C+Math.imul(T0,q0)|0,j=Math.imul(T0,N),E=E+Math.imul(W0,a)|0,C=C+Math.imul(W0,U0)|0,C=C+Math.imul(A0,a)|0,j=j+Math.imul(A0,U0)|0,E=E+Math.imul(H0,F0)|0,C=C+Math.imul(H0,C0)|0,C=C+Math.imul(O0,F0)|0,j=j+Math.imul(O0,C0)|0,E=E+Math.imul(s,S0)|0,C=C+Math.imul(s,x0)|0,C=C+Math.imul(Z0,S0)|0,j=j+Math.imul(Z0,x0)|0,E=E+Math.imul(c,P0)|0,C=C+Math.imul(c,z0)|0,C=C+Math.imul(o,P0)|0,j=j+Math.imul(o,z0)|0,E=E+Math.imul(t,c0)|0,C=C+Math.imul(t,f0)|0,C=C+Math.imul(e,c0)|0,j=j+Math.imul(e,f0)|0;var GU=(I+E|0)+((C&8191)<<13)|0;I=(j+(C>>>13)|0)+(GU>>>26)|0,GU&=67108863,E=Math.imul(D0,a),C=Math.imul(D0,U0),C=C+Math.imul(T0,a)|0,j=Math.imul(T0,U0),E=E+Math.imul(W0,F0)|0,C=C+Math.imul(W0,C0)|0,C=C+Math.imul(A0,F0)|0,j=j+Math.imul(A0,C0)|0,E=E+Math.imul(H0,S0)|0,C=C+Math.imul(H0,x0)|0,C=C+Math.imul(O0,S0)|0,j=j+Math.imul(O0,x0)|0,E=E+Math.imul(s,P0)|0,C=C+Math.imul(s,z0)|0,C=C+Math.imul(Z0,P0)|0,j=j+Math.imul(Z0,z0)|0,E=E+Math.imul(c,c0)|0,C=C+Math.imul(c,f0)|0,C=C+Math.imul(o,c0)|0,j=j+Math.imul(o,f0)|0;var KU=(I+E|0)+((C&8191)<<13)|0;I=(j+(C>>>13)|0)+(KU>>>26)|0,KU&=67108863,E=Math.imul(D0,F0),C=Math.imul(D0,C0),C=C+Math.imul(T0,F0)|0,j=Math.imul(T0,C0),E=E+Math.imul(W0,S0)|0,C=C+Math.imul(W0,x0)|0,C=C+Math.imul(A0,S0)|0,j=j+Math.imul(A0,x0)|0,E=E+Math.imul(H0,P0)|0,C=C+Math.imul(H0,z0)|0,C=C+Math.imul(O0,P0)|0,j=j+Math.imul(O0,z0)|0,E=E+Math.imul(s,c0)|0,C=C+Math.imul(s,f0)|0,C=C+Math.imul(Z0,c0)|0,j=j+Math.imul(Z0,f0)|0;var IU=(I+E|0)+((C&8191)<<13)|0;I=(j+(C>>>13)|0)+(IU>>>26)|0,IU&=67108863,E=Math.imul(D0,S0),C=Math.imul(D0,x0),C=C+Math.imul(T0,S0)|0,j=Math.imul(T0,x0),E=E+Math.imul(W0,P0)|0,C=C+Math.imul(W0,z0)|0,C=C+Math.imul(A0,P0)|0,j=j+Math.imul(A0,z0)|0,E=E+Math.imul(H0,c0)|0,C=C+Math.imul(H0,f0)|0,C=C+Math.imul(O0,c0)|0,j=j+Math.imul(O0,f0)|0;var _X=(I+E|0)+((C&8191)<<13)|0;I=(j+(C>>>13)|0)+(_X>>>26)|0,_X&=67108863,E=Math.imul(D0,P0),C=Math.imul(D0,z0),C=C+Math.imul(T0,P0)|0,j=Math.imul(T0,z0),E=E+Math.imul(W0,c0)|0,C=C+Math.imul(W0,f0)|0,C=C+Math.imul(A0,c0)|0,j=j+Math.imul(A0,f0)|0;var BX=(I+E|0)+((C&8191)<<13)|0;I=(j+(C>>>13)|0)+(BX>>>26)|0,BX&=67108863,E=Math.imul(D0,c0),C=Math.imul(D0,f0),C=C+Math.imul(T0,c0)|0,j=Math.imul(T0,f0);var xX=(I+E|0)+((C&8191)<<13)|0;if(I=(j+(C>>>13)|0)+(xX>>>26)|0,xX&=67108863,X[0]=d0,X[1]=b0,X[2]=r0,X[3]=a0,X[4]=e0,X[5]=i0,X[6]=UU,X[7]=XU,X[8]=ZU,X[9]=QU,X[10]=YU,X[11]=JU,X[12]=VU,X[13]=GU,X[14]=KU,X[15]=IU,X[16]=_X,X[17]=BX,X[18]=xX,I!==0)X[19]=I,$.length++;return $};if(!Math.imul)x=_;function w(Z,Y,$){$.negative=Y.negative^Z.negative,$.length=Z.length+Y.length;var F=0,G=0;for(var X=0;X<$.length-1;X++){var I=G;G=0;var E=F&67108863,C=Math.min(X,Y.length-1);for(var j=Math.max(0,X-Z.length+1);j<=C;j++){var g=X-j,p=Z.words[g]|0,n=Y.words[j]|0,$0=p*n,r=$0&67108863;I=I+($0/67108864|0)|0,r=r+E|0,E=r&67108863,I=I+(r>>>26)|0,G+=I>>>26,I&=67108863}$.words[X]=E,F=I,I=G}if(F!==0)$.words[X]=F;else $.length--;return $._strip()}function y(Z,Y,$){return w(Z,Y,$)}V.prototype.mulTo=function(Z,Y){var $,F=this.length+Z.length;if(this.length===10&&Z.length===10)$=x(this,Z,Y);else if(F<63)$=_(this,Z,Y);else if(F<1024)$=w(this,Z,Y);else $=y(this,Z,Y);return $};function l(Z,Y){this.x=Z,this.y=Y}l.prototype.makeRBT=function(Z){var Y=Array(Z),$=V.prototype._countBits(Z)-1;for(var F=0;F<Z;F++)Y[F]=this.revBin(F,$,Z);return Y},l.prototype.revBin=function(Z,Y,$){if(Z===0||Z===$-1)return Z;var F=0;for(var G=0;G<Y;G++)F|=(Z&1)<<Y-G-1,Z>>=1;return F},l.prototype.permute=function(Z,Y,$,F,G,X){for(var I=0;I<X;I++)F[I]=Y[Z[I]],G[I]=$[Z[I]]},l.prototype.transform=function(Z,Y,$,F,G,X){this.permute(X,Z,Y,$,F,G);for(var I=1;I<G;I<<=1){var E=I<<1,C=Math.cos(2*Math.PI/E),j=Math.sin(2*Math.PI/E);for(var g=0;g<G;g+=E){var p=C,n=j;for(var $0=0;$0<I;$0++){var r=$[g+$0],d=F[g+$0],Q0=$[g+$0+I],m=F[g+$0+I],i=p*Q0-n*m;if(m=p*m+n*Q0,Q0=i,$[g+$0]=r+Q0,F[g+$0]=d+m,$[g+$0+I]=r-Q0,F[g+$0+I]=d-m,$0!==E)i=C*p-j*n,n=C*n+j*p,p=i}}}},l.prototype.guessLen13b=function(Z,Y){var $=Math.max(Y,Z)|1,F=$&1,G=0;for($=$/2|0;$;$=$>>>1)G++;return 1<<G+1+F},l.prototype.conjugate=function(Z,Y,$){if($<=1)return;for(var F=0;F<$/2;F++){var G=Z[F];Z[F]=Z[$-F-1],Z[$-F-1]=G,G=Y[F],Y[F]=-Y[$-F-1],Y[$-F-1]=-G}},l.prototype.normalize13b=function(Z,Y){var $=0;for(var F=0;F<Y/2;F++){var G=Math.round(Z[2*F+1]/Y)*8192+Math.round(Z[2*F]/Y)+$;if(Z[F]=G&67108863,G<67108864)$=0;else $=G/67108864|0}return Z},l.prototype.convert13b=function(Z,Y,$,F){var G=0;for(var X=0;X<Y;X++)G=G+(Z[X]|0),$[2*X]=G&8191,G=G>>>13,$[2*X+1]=G&8191,G=G>>>13;for(X=2*Y;X<F;++X)$[X]=0;O(G===0),O((G&-8192)===0)},l.prototype.stub=function(Z){var Y=Array(Z);for(var $=0;$<Z;$++)Y[$]=0;return Y},l.prototype.mulp=function(Z,Y,$){var F=2*this.guessLen13b(Z.length,Y.length),G=this.makeRBT(F),X=this.stub(F),I=Array(F),E=Array(F),C=Array(F),j=Array(F),g=Array(F),p=Array(F),n=$.words;n.length=F,this.convert13b(Z.words,Z.length,I,F),this.convert13b(Y.words,Y.length,j,F),this.transform(I,X,E,C,F,G),this.transform(j,X,g,p,F,G);for(var $0=0;$0<F;$0++){var r=E[$0]*g[$0]-C[$0]*p[$0];C[$0]=E[$0]*p[$0]+C[$0]*g[$0],E[$0]=r}return this.conjugate(E,C,F),this.transform(E,C,n,X,F,G),this.conjugate(n,X,F),this.normalize13b(n,F),$.negative=Z.negative^Y.negative,$.length=Z.length+Y.length,$._strip()},V.prototype.mul=function(Z){var Y=new V(null);return Y.words=Array(this.length+Z.length),this.mulTo(Z,Y)},V.prototype.mulf=function(Z){var Y=new V(null);return Y.words=Array(this.length+Z.length),y(this,Z,Y)},V.prototype.imul=function(Z){return this.clone().mulTo(Z,this)},V.prototype.imuln=function(Z){var Y=Z<0;if(Y)Z=-Z;O(typeof Z==="number"),O(Z<67108864);var $=0;for(var F=0;F<this.length;F++){var G=(this.words[F]|0)*Z,X=(G&67108863)+($&67108863);$>>=26,$+=G/67108864|0,$+=X>>>26,this.words[F]=X&67108863}if($!==0)this.words[F]=$,this.length++;return this.length=Z===0?1:this.length,Y?this.ineg():this},V.prototype.muln=function(Z){return this.clone().imuln(Z)},V.prototype.sqr=function(){return this.mul(this)},V.prototype.isqr=function(){return this.imul(this.clone())},V.prototype.pow=function(Z){var Y=B(Z);if(Y.length===0)return new V(1);var $=this;for(var F=0;F<Y.length;F++,$=$.sqr())if(Y[F]!==0)break;if(++F<Y.length)for(var G=$.sqr();F<Y.length;F++,G=G.sqr()){if(Y[F]===0)continue;$=$.mul(G)}return $},V.prototype.iushln=function(Z){O(typeof Z==="number"&&Z>=0);var Y=Z%26,$=(Z-Y)/26,F=67108863>>>26-Y<<26-Y,G;if(Y!==0){var X=0;for(G=0;G<this.length;G++){var I=this.words[G]&F,E=(this.words[G]|0)-I<<Y;this.words[G]=E|X,X=I>>>26-Y}if(X)this.words[G]=X,this.length++}if($!==0){for(G=this.length-1;G>=0;G--)this.words[G+$]=this.words[G];for(G=0;G<$;G++)this.words[G]=0;this.length+=$}return this._strip()},V.prototype.ishln=function(Z){return O(this.negative===0),this.iushln(Z)},V.prototype.iushrn=function(Z,Y,$){O(typeof Z==="number"&&Z>=0);var F;if(Y)F=(Y-Y%26)/26;else F=0;var G=Z%26,X=Math.min((Z-G)/26,this.length),I=67108863^67108863>>>G<<G,E=$;if(F-=X,F=Math.max(0,F),E){for(var C=0;C<X;C++)E.words[C]=this.words[C];E.length=X}if(X===0);else if(this.length>X){this.length-=X;for(C=0;C<this.length;C++)this.words[C]=this.words[C+X]}else this.words[0]=0,this.length=1;var j=0;for(C=this.length-1;C>=0&&(j!==0||C>=F);C--){var g=this.words[C]|0;this.words[C]=j<<26-G|g>>>G,j=g&I}if(E&&j!==0)E.words[E.length++]=j;if(this.length===0)this.words[0]=0,this.length=1;return this._strip()},V.prototype.ishrn=function(Z,Y,$){return O(this.negative===0),this.iushrn(Z,Y,$)},V.prototype.shln=function(Z){return this.clone().ishln(Z)},V.prototype.ushln=function(Z){return this.clone().iushln(Z)},V.prototype.shrn=function(Z){return this.clone().ishrn(Z)},V.prototype.ushrn=function(Z){return this.clone().iushrn(Z)},V.prototype.testn=function(Z){O(typeof Z==="number"&&Z>=0);var Y=Z%26,$=(Z-Y)/26,F=1<<Y;if(this.length<=$)return!1;var G=this.words[$];return!!(G&F)},V.prototype.imaskn=function(Z){O(typeof Z==="number"&&Z>=0);var Y=Z%26,$=(Z-Y)/26;if(O(this.negative===0,"imaskn works only with positive numbers"),this.length<=$)return this;if(Y!==0)$++;if(this.length=Math.min($,this.length),Y!==0){var F=67108863^67108863>>>Y<<Y;this.words[this.length-1]&=F}return this._strip()},V.prototype.maskn=function(Z){return this.clone().imaskn(Z)},V.prototype.iaddn=function(Z){if(O(typeof Z==="number"),O(Z<67108864),Z<0)return this.isubn(-Z);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<=Z)return this.words[0]=Z-(this.words[0]|0),this.negative=0,this;return this.negative=0,this.isubn(Z),this.negative=1,this}return this._iaddn(Z)},V.prototype._iaddn=function(Z){this.words[0]+=Z;for(var Y=0;Y<this.length&&this.words[Y]>=67108864;Y++)if(this.words[Y]-=67108864,Y===this.length-1)this.words[Y+1]=1;else this.words[Y+1]++;return this.length=Math.max(this.length,Y+1),this},V.prototype.isubn=function(Z){if(O(typeof Z==="number"),O(Z<67108864),Z<0)return this.iaddn(-Z);if(this.negative!==0)return this.negative=0,this.iaddn(Z),this.negative=1,this;if(this.words[0]-=Z,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Y=0;Y<this.length&&this.words[Y]<0;Y++)this.words[Y]+=67108864,this.words[Y+1]-=1;return this._strip()},V.prototype.addn=function(Z){return this.clone().iaddn(Z)},V.prototype.subn=function(Z){return this.clone().isubn(Z)},V.prototype.iabs=function(){return this.negative=0,this},V.prototype.abs=function(){return this.clone().iabs()},V.prototype._ishlnsubmul=function(Z,Y,$){var F=Z.length+$,G;this._expand(F);var X,I=0;for(G=0;G<Z.length;G++){X=(this.words[G+$]|0)+I;var E=(Z.words[G]|0)*Y;X-=E&67108863,I=(X>>26)-(E/67108864|0),this.words[G+$]=X&67108863}for(;G<this.length-$;G++)X=(this.words[G+$]|0)+I,I=X>>26,this.words[G+$]=X&67108863;if(I===0)return this._strip();O(I===-1),I=0;for(G=0;G<this.length;G++)X=-(this.words[G]|0)+I,I=X>>26,this.words[G]=X&67108863;return this.negative=1,this._strip()},V.prototype._wordDiv=function(Z,Y){var $=this.length-Z.length,F=this.clone(),G=Z,X=G.words[G.length-1]|0,I=this._countBits(X);if($=26-I,$!==0)G=G.ushln($),F.iushln($),X=G.words[G.length-1]|0;var E=F.length-G.length,C;if(Y!=="mod"){C=new V(null),C.length=E+1,C.words=Array(C.length);for(var j=0;j<C.length;j++)C.words[j]=0}var g=F.clone()._ishlnsubmul(G,1,E);if(g.negative===0){if(F=g,C)C.words[E]=1}for(var p=E-1;p>=0;p--){var n=(F.words[G.length+p]|0)*67108864+(F.words[G.length+p-1]|0);n=Math.min(n/X|0,67108863),F._ishlnsubmul(G,n,p);while(F.negative!==0)if(n--,F.negative=0,F._ishlnsubmul(G,1,p),!F.isZero())F.negative^=1;if(C)C.words[p]=n}if(C)C._strip();if(F._strip(),Y!=="div"&&$!==0)F.iushrn($);return{div:C||null,mod:F}},V.prototype.divmod=function(Z,Y,$){if(O(!Z.isZero()),this.isZero())return{div:new V(0),mod:new V(0)};var F,G,X;if(this.negative!==0&&Z.negative===0){if(X=this.neg().divmod(Z,Y),Y!=="mod")F=X.div.neg();if(Y!=="div"){if(G=X.mod.neg(),$&&G.negative!==0)G.iadd(Z)}return{div:F,mod:G}}if(this.negative===0&&Z.negative!==0){if(X=this.divmod(Z.neg(),Y),Y!=="mod")F=X.div.neg();return{div:F,mod:X.mod}}if((this.negative&Z.negative)!==0){if(X=this.neg().divmod(Z.neg(),Y),Y!=="div"){if(G=X.mod.neg(),$&&G.negative!==0)G.isub(Z)}return{div:X.div,mod:G}}if(Z.length>this.length||this.cmp(Z)<0)return{div:new V(0),mod:this};if(Z.length===1){if(Y==="div")return{div:this.divn(Z.words[0]),mod:null};if(Y==="mod")return{div:null,mod:new V(this.modrn(Z.words[0]))};return{div:this.divn(Z.words[0]),mod:new V(this.modrn(Z.words[0]))}}return this._wordDiv(Z,Y)},V.prototype.div=function(Z){return this.divmod(Z,"div",!1).div},V.prototype.mod=function(Z){return this.divmod(Z,"mod",!1).mod},V.prototype.umod=function(Z){return this.divmod(Z,"mod",!0).mod},V.prototype.divRound=function(Z){var Y=this.divmod(Z);if(Y.mod.isZero())return Y.div;var $=Y.div.negative!==0?Y.mod.isub(Z):Y.mod,F=Z.ushrn(1),G=Z.andln(1),X=$.cmp(F);if(X<0||G===1&&X===0)return Y.div;return Y.div.negative!==0?Y.div.isubn(1):Y.div.iaddn(1)},V.prototype.modrn=function(Z){var Y=Z<0;if(Y)Z=-Z;O(Z<=67108863);var $=67108864%Z,F=0;for(var G=this.length-1;G>=0;G--)F=($*F+(this.words[G]|0))%Z;return Y?-F:F},V.prototype.modn=function(Z){return this.modrn(Z)},V.prototype.idivn=function(Z){var Y=Z<0;if(Y)Z=-Z;O(Z<=67108863);var $=0;for(var F=this.length-1;F>=0;F--){var G=(this.words[F]|0)+$*67108864;this.words[F]=G/Z|0,$=G%Z}return this._strip(),Y?this.ineg():this},V.prototype.divn=function(Z){return this.clone().idivn(Z)},V.prototype.egcd=function(Z){O(Z.negative===0),O(!Z.isZero());var Y=this,$=Z.clone();if(Y.negative!==0)Y=Y.umod(Z);else Y=Y.clone();var F=new V(1),G=new V(0),X=new V(0),I=new V(1),E=0;while(Y.isEven()&&$.isEven())Y.iushrn(1),$.iushrn(1),++E;var C=$.clone(),j=Y.clone();while(!Y.isZero()){for(var g=0,p=1;(Y.words[0]&p)===0&&g<26;++g,p<<=1);if(g>0){Y.iushrn(g);while(g-- >0){if(F.isOdd()||G.isOdd())F.iadd(C),G.isub(j);F.iushrn(1),G.iushrn(1)}}for(var n=0,$0=1;($.words[0]&$0)===0&&n<26;++n,$0<<=1);if(n>0){$.iushrn(n);while(n-- >0){if(X.isOdd()||I.isOdd())X.iadd(C),I.isub(j);X.iushrn(1),I.iushrn(1)}}if(Y.cmp($)>=0)Y.isub($),F.isub(X),G.isub(I);else $.isub(Y),X.isub(F),I.isub(G)}return{a:X,b:I,gcd:$.iushln(E)}},V.prototype._invmp=function(Z){O(Z.negative===0),O(!Z.isZero());var Y=this,$=Z.clone();if(Y.negative!==0)Y=Y.umod(Z);else Y=Y.clone();var F=new V(1),G=new V(0),X=$.clone();while(Y.cmpn(1)>0&&$.cmpn(1)>0){for(var I=0,E=1;(Y.words[0]&E)===0&&I<26;++I,E<<=1);if(I>0){Y.iushrn(I);while(I-- >0){if(F.isOdd())F.iadd(X);F.iushrn(1)}}for(var C=0,j=1;($.words[0]&j)===0&&C<26;++C,j<<=1);if(C>0){$.iushrn(C);while(C-- >0){if(G.isOdd())G.iadd(X);G.iushrn(1)}}if(Y.cmp($)>=0)Y.isub($),F.isub(G);else $.isub(Y),G.isub(F)}var g;if(Y.cmpn(1)===0)g=F;else g=G;if(g.cmpn(0)<0)g.iadd(Z);return g},V.prototype.gcd=function(Z){if(this.isZero())return Z.abs();if(Z.isZero())return this.abs();var Y=this.clone(),$=Z.clone();Y.negative=0,$.negative=0;for(var F=0;Y.isEven()&&$.isEven();F++)Y.iushrn(1),$.iushrn(1);do{while(Y.isEven())Y.iushrn(1);while($.isEven())$.iushrn(1);var G=Y.cmp($);if(G<0){var X=Y;Y=$,$=X}else if(G===0||$.cmpn(1)===0)break;Y.isub($)}while(!0);return $.iushln(F)},V.prototype.invm=function(Z){return this.egcd(Z).a.umod(Z)},V.prototype.isEven=function(){return(this.words[0]&1)===0},V.prototype.isOdd=function(){return(this.words[0]&1)===1},V.prototype.andln=function(Z){return this.words[0]&Z},V.prototype.bincn=function(Z){O(typeof Z==="number");var Y=Z%26,$=(Z-Y)/26,F=1<<Y;if(this.length<=$)return this._expand($+1),this.words[$]|=F,this;var G=F;for(var X=$;G!==0&&X<this.length;X++){var I=this.words[X]|0;I+=G,G=I>>>26,I&=67108863,this.words[X]=I}if(G!==0)this.words[X]=G,this.length++;return this},V.prototype.isZero=function(){return this.length===1&&this.words[0]===0},V.prototype.cmpn=function(Z){var Y=Z<0;if(this.negative!==0&&!Y)return-1;if(this.negative===0&&Y)return 1;this._strip();var $;if(this.length>1)$=1;else{if(Y)Z=-Z;O(Z<=67108863,"Number is too big");var F=this.words[0]|0;$=F===Z?0:F<Z?-1:1}if(this.negative!==0)return-$|0;return $},V.prototype.cmp=function(Z){if(this.negative!==0&&Z.negative===0)return-1;if(this.negative===0&&Z.negative!==0)return 1;var Y=this.ucmp(Z);if(this.negative!==0)return-Y|0;return Y},V.prototype.ucmp=function(Z){if(this.length>Z.length)return 1;if(this.length<Z.length)return-1;var Y=0;for(var $=this.length-1;$>=0;$--){var F=this.words[$]|0,G=Z.words[$]|0;if(F===G)continue;if(F<G)Y=-1;else if(F>G)Y=1;break}return Y},V.prototype.gtn=function(Z){return this.cmpn(Z)===1},V.prototype.gt=function(Z){return this.cmp(Z)===1},V.prototype.gten=function(Z){return this.cmpn(Z)>=0},V.prototype.gte=function(Z){return this.cmp(Z)>=0},V.prototype.ltn=function(Z){return this.cmpn(Z)===-1},V.prototype.lt=function(Z){return this.cmp(Z)===-1},V.prototype.lten=function(Z){return this.cmpn(Z)<=0},V.prototype.lte=function(Z){return this.cmp(Z)<=0},V.prototype.eqn=function(Z){return this.cmpn(Z)===0},V.prototype.eq=function(Z){return this.cmp(Z)===0},V.red=function(Z){return new Q(Z)},V.prototype.toRed=function(Z){return O(!this.red,"Already a number in reduction context"),O(this.negative===0,"red works only with positives"),Z.convertTo(this)._forceRed(Z)},V.prototype.fromRed=function(){return O(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},V.prototype._forceRed=function(Z){return this.red=Z,this},V.prototype.forceRed=function(Z){return O(!this.red,"Already a number in reduction context"),this._forceRed(Z)},V.prototype.redAdd=function(Z){return O(this.red,"redAdd works only with red numbers"),this.red.add(this,Z)},V.prototype.redIAdd=function(Z){return O(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,Z)},V.prototype.redSub=function(Z){return O(this.red,"redSub works only with red numbers"),this.red.sub(this,Z)},V.prototype.redISub=function(Z){return O(this.red,"redISub works only with red numbers"),this.red.isub(this,Z)},V.prototype.redShl=function(Z){return O(this.red,"redShl works only with red numbers"),this.red.shl(this,Z)},V.prototype.redMul=function(Z){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,Z),this.red.mul(this,Z)},V.prototype.redIMul=function(Z){return O(this.red,"redMul works only with red numbers"),this.red._verify2(this,Z),this.red.imul(this,Z)},V.prototype.redSqr=function(){return O(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},V.prototype.redISqr=function(){return O(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},V.prototype.redSqrt=function(){return O(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},V.prototype.redInvm=function(){return O(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},V.prototype.redNeg=function(){return O(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},V.prototype.redPow=function(Z){return O(this.red&&!Z.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,Z)};var J0={k256:null,p224:null,p192:null,p25519:null};function K0(Z,Y){this.name=Z,this.p=new V(Y,16),this.n=this.p.bitLength(),this.k=new V(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}K0.prototype._tmp=function(){var Z=new V(null);return Z.words=Array(Math.ceil(this.n/13)),Z},K0.prototype.ireduce=function(Z){var Y=Z,$;do this.split(Y,this.tmp),Y=this.imulK(Y),Y=Y.iadd(this.tmp),$=Y.bitLength();while($>this.n);var F=$<this.n?-1:Y.ucmp(this.p);if(F===0)Y.words[0]=0,Y.length=1;else if(F>0)Y.isub(this.p);else if(Y.strip!==void 0)Y.strip();else Y._strip();return Y},K0.prototype.split=function(Z,Y){Z.iushrn(this.n,0,Y)},K0.prototype.imulK=function(Z){return Z.imul(this.k)};function V0(){K0.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}L(V0,K0),V0.prototype.split=function(Z,Y){var $=4194303,F=Math.min(Z.length,9);for(var G=0;G<F;G++)Y.words[G]=Z.words[G];if(Y.length=F,Z.length<=9){Z.words[0]=0,Z.length=1;return}var X=Z.words[9];Y.words[Y.length++]=X&$;for(G=10;G<Z.length;G++){var I=Z.words[G]|0;Z.words[G-10]=(I&$)<<4|X>>>22,X=I}if(X>>>=22,Z.words[G-10]=X,X===0&&Z.length>10)Z.length-=10;else Z.length-=9},V0.prototype.imulK=function(Z){Z.words[Z.length]=0,Z.words[Z.length+1]=0,Z.length+=2;var Y=0;for(var $=0;$<Z.length;$++){var F=Z.words[$]|0;Y+=F*977,Z.words[$]=Y&67108863,Y=F*64+(Y/67108864|0)}if(Z.words[Z.length-1]===0){if(Z.length--,Z.words[Z.length-1]===0)Z.length--}return Z};function u(){K0.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}L(u,K0);function X0(){K0.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}L(X0,K0);function U(){K0.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}L(U,K0),U.prototype.imulK=function(Z){var Y=0;for(var $=0;$<Z.length;$++){var F=(Z.words[$]|0)*19+Y,G=F&67108863;F>>>=26,Z.words[$]=G,Y=F}if(Y!==0)Z.words[Z.length++]=Y;return Z},V._prime=function(Z){if(J0[Z])return J0[Z];var Y;if(Z==="k256")Y=new V0;else if(Z==="p224")Y=new u;else if(Z==="p192")Y=new X0;else if(Z==="p25519")Y=new U;else throw Error("Unknown prime "+Z);return J0[Z]=Y,Y};function Q(Z){if(typeof Z==="string"){var Y=V._prime(Z);this.m=Y.p,this.prime=Y}else O(Z.gtn(1),"modulus must be greater than 1"),this.m=Z,this.prime=null}Q.prototype._verify1=function(Z){O(Z.negative===0,"red works only with positives"),O(Z.red,"red works only with red numbers")},Q.prototype._verify2=function(Z,Y){O((Z.negative|Y.negative)===0,"red works only with positives"),O(Z.red&&Z.red===Y.red,"red works only with red numbers")},Q.prototype.imod=function(Z){if(this.prime)return this.prime.ireduce(Z)._forceRed(this);return A(Z,Z.umod(this.m)._forceRed(this)),Z},Q.prototype.neg=function(Z){if(Z.isZero())return Z.clone();return this.m.sub(Z)._forceRed(this)},Q.prototype.add=function(Z,Y){this._verify2(Z,Y);var $=Z.add(Y);if($.cmp(this.m)>=0)$.isub(this.m);return $._forceRed(this)},Q.prototype.iadd=function(Z,Y){this._verify2(Z,Y);var $=Z.iadd(Y);if($.cmp(this.m)>=0)$.isub(this.m);return $},Q.prototype.sub=function(Z,Y){this._verify2(Z,Y);var $=Z.sub(Y);if($.cmpn(0)<0)$.iadd(this.m);return $._forceRed(this)},Q.prototype.isub=function(Z,Y){this._verify2(Z,Y);var $=Z.isub(Y);if($.cmpn(0)<0)$.iadd(this.m);return $},Q.prototype.shl=function(Z,Y){return this._verify1(Z),this.imod(Z.ushln(Y))},Q.prototype.imul=function(Z,Y){return this._verify2(Z,Y),this.imod(Z.imul(Y))},Q.prototype.mul=function(Z,Y){return this._verify2(Z,Y),this.imod(Z.mul(Y))},Q.prototype.isqr=function(Z){return this.imul(Z,Z.clone())},Q.prototype.sqr=function(Z){return this.mul(Z,Z)},Q.prototype.sqrt=function(Z){if(Z.isZero())return Z.clone();var Y=this.m.andln(3);if(O(Y%2===1),Y===3){var $=this.m.add(new V(1)).iushrn(2);return this.pow(Z,$)}var F=this.m.subn(1),G=0;while(!F.isZero()&&F.andln(1)===0)G++,F.iushrn(1);O(!F.isZero());var X=new V(1).toRed(this),I=X.redNeg(),E=this.m.subn(1).iushrn(1),C=this.m.bitLength();C=new V(2*C*C).toRed(this);while(this.pow(C,E).cmp(I)!==0)C.redIAdd(I);var j=this.pow(C,F),g=this.pow(Z,F.addn(1).iushrn(1)),p=this.pow(Z,F),n=G;while(p.cmp(X)!==0){var $0=p;for(var r=0;$0.cmp(X)!==0;r++)$0=$0.redSqr();O(r<n);var d=this.pow(j,new V(1).iushln(n-r-1));g=g.redMul(d),j=d.redSqr(),p=p.redMul(j),n=r}return g},Q.prototype.invm=function(Z){var Y=Z._invmp(this.m);if(Y.negative!==0)return Y.negative=0,this.imod(Y).redNeg();else return this.imod(Y)},Q.prototype.pow=function(Z,Y){if(Y.isZero())return new V(1).toRed(this);if(Y.cmpn(1)===0)return Z.clone();var $=4,F=Array(1<<$);F[0]=new V(1).toRed(this),F[1]=Z;for(var G=2;G<F.length;G++)F[G]=this.mul(F[G-1],Z);var X=F[0],I=0,E=0,C=Y.bitLength()%26;if(C===0)C=26;for(G=Y.length-1;G>=0;G--){var j=Y.words[G];for(var g=C-1;g>=0;g--){var p=j>>g&1;if(X!==F[0])X=this.sqr(X);if(p===0&&I===0){E=0;continue}if(I<<=1,I|=p,E++,E!==$&&(G!==0||g!==0))continue;X=this.mul(X,F[I]),E=0,I=0}C=26}return X},Q.prototype.convertTo=function(Z){var Y=Z.umod(this.m);return Y===Z?Y.clone():Y},Q.prototype.convertFrom=function(Z){var Y=Z.clone();return Y.red=null,Y},V.mont=function(Z){return new J(Z)};function J(Z){if(Q.call(this,Z),this.shift=this.m.bitLength(),this.shift%26!==0)this.shift+=26-this.shift%26;this.r=new V(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)}L(J,Q),J.prototype.convertTo=function(Z){return this.imod(Z.ushln(this.shift))},J.prototype.convertFrom=function(Z){var Y=this.imod(Z.mul(this.rinv));return Y.red=null,Y},J.prototype.imul=function(Z,Y){if(Z.isZero()||Y.isZero())return Z.words[0]=0,Z.length=1,Z;var $=Z.imul(Y),F=$.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),G=$.isub(F).iushrn(this.shift),X=G;if(G.cmp(this.m)>=0)X=G.isub(this.m);else if(G.cmpn(0)<0)X=G.iadd(this.m);return X._forceRed(this)},J.prototype.mul=function(Z,Y){if(Z.isZero()||Y.isZero())return new V(0)._forceRed(this);var $=Z.mul(Y),F=$.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),G=$.isub(F).iushrn(this.shift),X=G;if(G.cmp(this.m)>=0)X=G.isub(this.m);else if(G.cmpn(0)<0)X=G.iadd(this.m);return X._forceRed(this)},J.prototype.invm=function(Z){var Y=this.imod(Z._invmp(this.m).mul(this.r2));return Y._forceRed(this)}})(typeof W>"u"||W,K)}),gQ=G0((K,W)=>{var H=wV(),T=MX(),O=MU().Buffer;function L(S){var M=S.modulus.byteLength(),z;do z=new H(T(M));while(z.cmp(S.modulus)>=0||!z.umod(S.prime1)||!z.umod(S.prime2));return z}function V(S){var M=L(S),z=M.toRed(H.mont(S.modulus)).redPow(new H(S.publicExponent)).fromRed();return{blinder:z,unblinder:M.invm(S.modulus)}}function P(S,M){var z=V(M),A=M.modulus.byteLength(),D=new H(S).mul(z.blinder).umod(M.modulus),R=D.toRed(H.mont(M.prime1)),q=D.toRed(H.mont(M.prime2)),v=M.coefficient,k=M.prime1,B=M.prime2,_=R.redPow(M.exponent1).fromRed(),x=q.redPow(M.exponent2).fromRed(),w=_.isub(x).imul(v).umod(k).imul(B);return x.iadd(w).imul(z.unblinder).umod(M.modulus).toArrayLike(O,"be",A)}P.getr=L,W.exports=P}),yV=G0((K,W)=>{var H=_Q(),T=MX(),O=LX(),L=BQ(),V=xQ(),P=GZ(),S=NQ(),M=gQ(),z=MU().Buffer;W.exports=function(q,v,k){var B;if(q.padding)B=q.padding;else if(k)B=1;else B=4;var _=H(q),x;if(B===4)x=A(_,v);else if(B===1)x=D(_,v,k);else if(B===3){if(x=new P(v),x.cmp(_.modulus)>=0)throw Error("data too long for modulus")}else throw Error("unknown padding");if(k)return M(x,_);else return S(x,_)};function A(q,v){var k=q.modulus.byteLength(),B=v.length,_=O("sha1").update(z.alloc(0)).digest(),x=_.length,w=2*x;if(B>k-w-2)throw Error("message too long");var y=z.alloc(k-B-w-2),l=k-x-1,J0=T(x),K0=V(z.concat([_,y,z.alloc(1,1),v],l),L(J0,l)),V0=V(J0,L(K0,x));return new P(z.concat([z.alloc(1),V0,K0],k))}function D(q,v,k){var B=v.length,_=q.modulus.byteLength();if(B>_-11)throw Error("message too long");var x;if(k)x=z.alloc(_-B-3,255);else x=R(_-B-3);return new P(z.concat([z.from([0,k?1:2]),x,z.alloc(1),v],_))}function R(q){var v=z.allocUnsafe(q),k=0,B=T(q*2),_=0,x;while(k<q){if(_===B.length)B=T(q*2),_=0;if(x=B[_++],x)v[k++]=x}return v}}),fV=G0((K,W)=>{var H=_Q(),T=BQ(),O=xQ(),L=GZ(),V=gQ(),P=LX(),S=NQ(),M=MU().Buffer;W.exports=function(R,q,v){var k;if(R.padding)k=R.padding;else if(v)k=1;else k=4;var B=H(R),_=B.modulus.byteLength();if(q.length>_||new L(q).cmp(B.modulus)>=0)throw Error("decryption error");var x;if(v)x=S(new L(q),B);else x=V(q,B);var w=M.alloc(_-x.length);if(x=M.concat([w,x],_),k===4)return z(B,x);else if(k===1)return A(B,x,v);else if(k===3)return x;else throw Error("unknown padding")};function z(R,q){var v=R.modulus.byteLength(),k=P("sha1").update(M.alloc(0)).digest(),B=k.length;if(q[0]!==0)throw Error("decryption error");var _=q.slice(1,B+1),x=q.slice(B+1),w=O(_,T(x,B)),y=O(x,T(w,v-B-1));if(D(k,y.slice(0,B)))throw Error("decryption error");var l=B;while(y[l]===0)l++;if(y[l++]!==1)throw Error("decryption error");return y.slice(l)}function A(R,q,v){var k=q.slice(0,2),B=2,_=0;while(q[B++]!==0)if(B>=q.length){_++;break}var x=q.slice(2,B-1);if(k.toString("hex")!=="0002"&&!v||k.toString("hex")!=="0001"&&v)_++;if(x.length<8)_++;if(_)throw Error("decryption error");return q.slice(B)}function D(R,q){R=M.from(R),q=M.from(q);var v=0,k=R.length;if(R.length!==q.length)v++,k=Math.min(R.length,q.length);var B=-1;while(++B<k)v+=R[B]^q[B];return v}}),aX=G0((K)=>{K.publicEncrypt=yV(),K.privateDecrypt=fV(),K.privateEncrypt=function(W,H){return K.publicEncrypt(W,H,!0)},K.publicDecrypt=function(W,H){return K.privateDecrypt(W,H,!0)}}),cV=G0((K)=>{var W=(RU(),h0(SU));if(typeof W.publicEncrypt!=="function")W=aX();if(K.publicEncrypt=W.publicEncrypt,K.privateDecrypt=W.privateDecrypt,typeof W.privateEncrypt!=="function")K.privateEncrypt=aX().privateEncrypt;else K.privateEncrypt=W.privateEncrypt;if(typeof W.publicDecrypt!=="function")K.publicDecrypt=aX().publicDecrypt;else K.publicDecrypt=W.publicDecrypt}),pV=G0((K)=>{var W=MU(),H=MX(),T=W.Buffer,O=W.kMaxLength,L=globalThis.crypto||globalThis.msCrypto,V=Math.pow(2,32)-1;function P(D,R){if(typeof D!=="number"||D!==D)throw TypeError("offset must be a number");if(D>V||D<0)throw TypeError("offset must be a uint32");if(D>O||D>R)throw RangeError("offset out of range")}function S(D,R,q){if(typeof D!=="number"||D!==D)throw TypeError("size must be a number");if(D>V||D<0)throw TypeError("size must be a uint32");if(D+R>q||D>O)throw RangeError("buffer too small")}L&&L.getRandomValues,K.randomFill=M,K.randomFillSync=A;function M(D,R,q,v){if(!T.isBuffer(D)&&!(D instanceof globalThis.Uint8Array))throw TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof R==="function")v=R,R=0,q=D.length;else if(typeof q==="function")v=q,q=D.length-R;else if(typeof v!=="function")throw TypeError('"cb" argument must be a function');return P(R,D.length),S(q,R,D.length),z(D,R,q,v)}function z(D,R,q,v){if(!1)var k,B;if(v){H(q,function(x,w){if(x)return v(x);w.copy(D,R),v(null,D)});return}var _=H(q);return _.copy(D,R),D}function A(D,R,q){if(typeof R>"u")R=0;if(!T.isBuffer(D)&&!(D instanceof globalThis.Uint8Array))throw TypeError('"buf" argument must be a Buffer or Uint8Array');if(P(R,D.length),q===void 0)q=D.length-R;return S(q,R,D.length),z(D,R,q)}}),hV=G0((K,W)=>{var H=(RU(),h0(SU));if(typeof H.randomFill==="function"&&typeof H.randomFillSync==="function")K.randomFill=H.randomFill,K.randomFillSync=H.randomFillSync;else W.exports=pV()}),uV=G0((K)=>{K.randomBytes=K.rng=K.pseudoRandomBytes=K.prng=MX(),K.createHash=K.Hash=LX(),K.createHmac=K.Hmac=KQ();var W=WJ(),H=Object.keys(W),T=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(H);K.getHashes=function(){return T};var O=zQ();K.pbkdf2=O.pbkdf2,K.pbkdf2Sync=O.pbkdf2Sync;var L=mJ();K.Cipher=L.Cipher,K.createCipher=L.createCipher,K.Cipheriv=L.Cipheriv,K.createCipheriv=L.createCipheriv,K.Decipher=L.Decipher,K.createDecipher=L.createDecipher,K.Decipheriv=L.Decipheriv,K.createDecipheriv=L.createDecipheriv,K.getCiphers=L.getCiphers,K.listCiphers=L.listCiphers;var V=sJ();K.DiffieHellmanGroup=V.DiffieHellmanGroup,K.createDiffieHellmanGroup=V.createDiffieHellmanGroup,K.getDiffieHellman=V.getDiffieHellman,K.createDiffieHellman=V.createDiffieHellman,K.DiffieHellman=V.DiffieHellman;var P=tJ();K.createSign=P.createSign,K.Sign=P.Sign,K.createVerify=P.createVerify,K.Verify=P.Verify,K.createECDH=DV();var S=cV();K.publicEncrypt=S.publicEncrypt,K.privateEncrypt=S.privateEncrypt,K.publicDecrypt=S.publicDecrypt,K.privateDecrypt=S.privateDecrypt;var M=hV();K.randomFill=M.randomFill,K.randomFillSync=M.randomFillSync,K.createCredentials=function(){throw Error(`sorry, createCredentials is not implemented yet
6
+ we accept pull requests
7
+ https://github.com/browserify/crypto-browserify`)},K.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}}),p0=$J(uV(),1),bV=p0.prng,dV=p0.pseudoRandomBytes,lV=p0.rng,oV=p0.randomBytes,nV=p0.Hash,wQ=p0.createHash,mV=p0.Hmac,sV=p0.createHmac,tV=p0.getHashes,rV=p0.pbkdf2,aV=p0.pbkdf2Sync,eV=p0.Cipher,iV=p0.createCipher,UG=p0.Cipheriv,XG=p0.createCipheriv,ZG=p0.Decipher,QG=p0.createDecipher,YG=p0.Decipheriv,JG=p0.createDecipheriv,VG=p0.getCiphers,GG=p0.listCiphers,KG=p0.DiffieHellmanGroup,IG=p0.createDiffieHellmanGroup,$G=p0.getDiffieHellman,WG=p0.createDiffieHellman,FG=p0.DiffieHellman,HG=p0.createSign,OG=p0.Sign,AG=p0.createVerify,CG=p0.Verify,TG=p0.createECDH,DG=p0.publicEncrypt,zG=p0.privateEncrypt,MG=p0.publicDecrypt,LG=p0.privateDecrypt,EG=p0.randomFill,RG=p0.randomFillSync,qG=p0.createCredentials,SG=p0.constants,vG=["p192","p224","p256","p384","p521","curve25519","ed25519","secp256k1","secp224r1","prime256v1","prime192v1","ed25519","secp384r1","secp521r1"];BG=crypto,xG=crypto});var eU={ACTIVITY:"/activity",IDENTITY:{SIGNIN:"/identity/signin",SIGNOUT:"/identity/signout",CALLBACK:"/identity/callback"},USER:{ME:"/user/me",VERIFY:"/user/verify"}};RU();function yQ(K){if(K==="production"||K==="local"||K==="staging")return K;return"staging"}function mU(K,W=200,H){let T=new Headers(H);return T.set("Content-Type","application/json"),new Response(JSON.stringify(K),{status:W,headers:T})}function sU(K,W){let H=new Headers(W);return H.set("Location",K),new Response(null,{status:302,headers:H})}function fQ(K){let W=JSON.stringify(K);return btoa(W).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function cQ(K){let W=K.replace(/-/g,"+").replace(/_/g,"/"),H=atob(W);return JSON.parse(H)}var yU=null,KZ=!1,IZ=!1;function pQ(K){let H=K.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*");return new RegExp(`^${H}$`)}function NG(){if(yU!==null)return;if(yU=[],typeof process>"u"||!process.env?.DEBUG){IZ=!1;return}IZ=!0;let K=process.env.DEBUG.trim();if(K==="1"||K==="true"||K==="*"){KZ=!0;return}let W=K.split(",").map((T)=>T.trim()).filter(Boolean);for(let T of W)if(T.startsWith("-"))yU.push({regex:pQ(T.slice(1)),exclude:!0});else yU.push({regex:pQ(T),exclude:!1});if(!yU.some((T)=>!T.exclude)&&yU.length>0)KZ=!0}function hQ(K){if(NG(),!IZ)return!0;if(KZ){if(K){for(let W of yU)if(W.exclude&&W.regex.test(K))return!1}return!0}if(!K)return!1;for(let W of yU)if(W.exclude&&W.regex.test(K))return!1;for(let W of yU)if(!W.exclude&&W.regex.test(K))return!0;return!1}function $Z(){return typeof globalThis<"u"&&"window"in globalThis}function WZ(){if($Z())return"browser";if(typeof process<"u"&&process.env){if(process.env.CI||process.env.GITHUB_ACTIONS||process.env.GITLAB_CI||process.env.CIRCLECI||process.env.JENKINS_URL||process.env.BUILDKITE)return"ci"}return"terminal"}var FZ;if(!$Z())try{FZ=(await import("./chunk-whc53e0y.js")).inspect}catch{}var fU={reset:"\x1B[0m",bold:"\x1B[1m",dim:"\x1B[2m",red:"\x1B[31m",yellow:"\x1B[33m",blue:"\x1B[34m",cyan:"\x1B[36m"};function gG(K){switch(K){case"debug":return fU.blue;case"info":return fU.cyan;case"warn":return fU.yellow;case"error":return fU.red}}function wG(K){switch(K){case"debug":return console.debug;case"info":return console.info;case"warn":return console.warn;case"error":return console.error}}function yG(K){if(FZ)return FZ(K,{depth:null,colors:!0,breakLength:80,compact:!1});return JSON.stringify(K,null,2)}var qX=(K)=>{let W=gG(K.level),H=wG(K.level),T=K.level.toUpperCase().padEnd(5),O=K.timestamp.toISOString().replace(/\.\d{3}Z$/,""),L=`${fU.dim}[${O}]${fU.reset}`,V=`${W}${T}${fU.reset}`,P=K.scope?`${fU.bold}[${K.scope}]${fU.reset} `:"",S=`${L} ${V} ${P}${K.message}`;if(K.context&&Object.keys(K.context).length>0)H(S,yG(K.context));else H(S)};var fG={debug:"[DEBUG]",info:"[INFO]",warn:"[WARN]",error:"[ERROR]"};function cG(K){return Object.entries(K).map(([W,H])=>`${W}=${pG(H)}`).join(" ")}function pG(K){if(typeof K==="string")return K;if(typeof K==="number")return String(K);if(typeof K==="boolean")return String(K);if(K===null)return"null";if(K===void 0)return"undefined";return JSON.stringify(K)}var SX=(K)=>{let W=[];if(W.push(K.timestamp.toISOString()),W.push(fG[K.level]),K.scope)W.push(`[${K.scope}]`);if(W.push(K.message),K.context&&Object.keys(K.context).length>0)W.push(cG(K.context));console.log(W.join(" "))};var PX=(K)=>{let W={timestamp:K.timestamp.toISOString(),level:K.level,...K.scope&&{scope:K.scope},msg:K.message};if(K.context&&Object.keys(K.context).length>0)Object.assign(W,K.context);console.log(JSON.stringify(W))};var hG={debug:"color: gray",info:"color: #0ea5e9",warn:"color: #f59e0b",error:"color: #ef4444; font-weight: bold"},uG={debug:"log",info:"info",warn:"warn",error:"error"},kX=(K)=>{let W=uG[K.level],H=hG[K.level],O=`%c${K.scope?`[${K.scope}]`:""} ${K.message}`;if(K.context&&Object.keys(K.context).length>0)console[W](O,H,K.context);else console[W](O,H)};var bQ=["debug","info","warn","error"];function bG(K){switch(K){case"terminal":return qX;case"ci":return SX;case"production":return PX;case"browser":return kX;case"test":return()=>{}}}function dG(){if(typeof process<"u"&&process.env?.DEBUG)return"debug";return"info"}function lG(K,W){return bQ.indexOf(K)>=bQ.indexOf(W)}class FX{scope;minLevel;environment;formatter;defaultContext;constructor(K={}){this.scope=K.scope,this.minLevel=K.minLevel??dG(),this.defaultContext=K.defaultContext??{},this.environment=K.environment??WZ(),this.formatter=bG(this.environment)}child(K){let W=this.scope?`${this.scope}:${K}`:K;return new FX({scope:W,minLevel:this.minLevel,environment:this.environment,defaultContext:{...this.defaultContext}})}withContext(K){return new FX({scope:this.scope,minLevel:this.minLevel,environment:this.environment,defaultContext:{...this.defaultContext,...K}})}debug(K,W){this.log("debug",K,W)}info(K,W){this.log("info",K,W)}warn(K,W){this.log("warn",K,W)}error(K,W){this.log("error",K,W)}log(K,W,H){if(K==="debug"&&!hQ(this.scope))return;if(!lG(K,this.minLevel))return;let T={level:K,message:W,scope:this.scope,context:H||Object.keys(this.defaultContext).length>0?{...this.defaultContext,...H}:void 0,timestamp:new Date};this.formatter(T)}}function HZ(K={}){return new FX(K)}function oG(){try{let K=typeof process>"u"?void 0:process.env.DEBUG;return K==="1"||K==="true"}catch{return!1}}function dQ(K){return HZ({scope:`timeback:${K}`,minLevel:oG()?"debug":"warn"})}var BU=dQ("sso"),HX=dQ("oidc");var lQ=new Map;async function OZ(K){let W=lQ.get(K);if(W)return W;let H=`${K}/.well-known/openid-configuration`,T=await fetch(H);if(!T.ok)throw HX.error("Discovery fetch failed",{status:T.status}),Error(`Failed to fetch OIDC discovery: ${T.statusText}`);let O=await T.json();return HX.debug("Fetched OIDC discovery document",{authEndpoint:O.authorization_endpoint,tokenEndpoint:O.token_endpoint}),lQ.set(K,O),O}function jX(K){switch(K){case"production":return"https://cognito-idp.us-east-1.amazonaws.com/us-east-1_3uhuoRM3R";case"staging":return"https://cognito-idp.us-east-1.amazonaws.com/us-east-1_5EUwTP9XD";case"local":throw Error("Local environment is not yet supported for OIDC")}}async function oQ(K){let W=await OZ(K.issuer),H=new URL(W.authorization_endpoint);return H.searchParams.set("response_type","code"),H.searchParams.set("client_id",K.clientId),H.searchParams.set("redirect_uri",K.redirectUri),H.searchParams.set("scope","openid profile email"),H.searchParams.set("state",K.state),H.toString()}async function nQ(K){let W=await OZ(K.issuer),H=await fetch(W.token_endpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"authorization_code",client_id:K.clientId,client_secret:K.clientSecret,code:K.code,redirect_uri:K.redirectUri})});if(!H.ok){let O=await H.text();throw HX.error("Token exchange failed",{status:H.status,body:O}),Error(`Token exchange failed: ${H.status} ${O}`)}let T=await H.json();return HX.debug("Received tokens from IdP",{expiresIn:T.expires_in}),T}async function mQ(K){let W=await OZ(K.issuer),H=await fetch(W.userinfo_endpoint,{headers:{Authorization:`Bearer ${K.accessToken}`}});if(!H.ok)throw Error(`UserInfo request failed: ${H.statusText}`);return H.json()}function vX(K,W,H,T){return{error:K,errorCode:W,state:H,req:T,redirect:sU,json:mU}}function nG(K){try{return cQ(K)}catch{BU.warn("Failed to decode state");return}}function sQ(K,W,H,T,O){let L=W.searchParams.get("error_description");BU.error("IdP returned error",{error:K,description:L});let V=Error(L??K);if(O)return O(vX(V,K,H,T));return mU({error:K},400)}function tQ(K,W,H){BU.error("Missing authorization code in callback");let T=Error("Missing authorization code");if(H)return H(vX(T,"missing_code",K,W));return mU({error:"Missing authorization code"},400)}async function rQ(K){let{req:W,env:H,clientId:T,buildState:O}=K,L=K.issuer??jX(H),V=new URL(W.url),P=K.redirectUri;if(!P){let A=V.pathname.replace(eU.IDENTITY.SIGNIN,"");P=`${V.origin}${A}${eU.IDENTITY.CALLBACK}`}BU.debug("SSO sign-in initiated",{env:H,issuer:L,clientId:T,redirectUri:P});let S=O?O({req:W,url:V}):{},M=fQ(S),z=await oQ({issuer:L,clientId:T,redirectUri:P,state:M});return sU(z)}function aQ(K){let W=new URL(K.url),H=W.searchParams.get("code"),T=W.searchParams.get("error"),O=W.searchParams.get("state");BU.debug("Received callback from IdP",{hasCode:!!H,error:T});let L=O?nG(O):void 0;return{url:W,code:H,errorParam:T,state:L}}function eQ(K,W){if(W)return W;let H=K.pathname.replace(eU.IDENTITY.CALLBACK,"");return`${K.origin}${H}${eU.IDENTITY.CALLBACK}`}async function iQ(K,W,H){return await rQ({req:K,env:W,clientId:H.clientId,issuer:H.issuer,redirectUri:H.redirectUri,buildState:H.buildState})}async function mG(K,W,H,T,O,L){try{let V=L.issuer??jX(O),P=eQ(W,L.redirectUri);BU.debug("Exchanging auth code for tokens (identity-only)",{issuer:V,clientId:L.clientId});let S=await nQ({issuer:V,clientId:L.clientId,clientSecret:L.clientSecret,code:K,redirectUri:P}),M=await mQ({issuer:V,accessToken:S.access_token}),z=typeof M.identities==="string"?JSON.parse(M.identities):M.identities;BU.debug("SSO completed (identity-only)",{user:{...M,identities:z}});let A={tokens:S,user:M,state:H,req:T,redirect:sU,json:mU};return L.onCallbackSuccess(A)}catch(V){let P=V instanceof Error?V:Error("Unknown error");if(BU.error("Token exchange failed (identity-only)",{error:P.message}),L.onCallbackError)return L.onCallbackError(vX(P,void 0,H,T));return mU({error:P.message},500)}}async function UY(K,W,H){let{url:T,code:O,errorParam:L,state:V}=aQ(K);if(L)return sQ(L,T,V,K,H.onCallbackError);if(!O)return tQ(V,K,H.onCallbackError);return await mG(O,T,V,K,W,H)}function AZ(K){let{env:W,identity:H}=K;if(H.mode!=="sso")throw Error('Identity-only mode requires identity.mode === "sso"');return{signIn:(T)=>iQ(T,W,H),callback:(T)=>UY(T,W,H),signOut:()=>sU("/")}}function dK(K){let W=AZ({env:yQ(K.env),identity:K.identity});return{config:K,handle:{identity:W}}}
8
+ export{mU as a,eU as b,dK as c};