edge-currency-accountbased 2.2.3 → 2.2.5

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 (76) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/android/src/main/assets/edge-currency-accountbased/1944.chunk.js +4 -0
  3. package/android/src/main/assets/edge-currency-accountbased/2153.chunk.js +2 -0
  4. package/android/src/main/assets/edge-currency-accountbased/2821.chunk.js +2 -0
  5. package/android/src/main/assets/edge-currency-accountbased/2896.chunk.js +35 -0
  6. package/android/src/main/assets/edge-currency-accountbased/2945.chunk.js +25 -0
  7. package/android/src/main/assets/edge-currency-accountbased/3491.chunk.js +1 -0
  8. package/android/src/main/assets/edge-currency-accountbased/{620.chunk.js → 3620.chunk.js} +1 -1
  9. package/android/src/main/assets/edge-currency-accountbased/{666.chunk.js → 3666.chunk.js} +1 -1
  10. package/android/src/main/assets/edge-currency-accountbased/3720.chunk.js +1 -0
  11. package/android/src/main/assets/edge-currency-accountbased/{978.chunk.js → 3978.chunk.js} +1 -1
  12. package/android/src/main/assets/edge-currency-accountbased/4251.chunk.js +4 -0
  13. package/android/src/main/assets/edge-currency-accountbased/4431.chunk.js +1 -0
  14. package/android/src/main/assets/edge-currency-accountbased/4618.chunk.js +20 -0
  15. package/android/src/main/assets/edge-currency-accountbased/{627.chunk.js → 4627.chunk.js} +1 -1
  16. package/android/src/main/assets/edge-currency-accountbased/4650.chunk.js +1 -0
  17. package/android/src/main/assets/edge-currency-accountbased/{826.chunk.js → 5179.chunk.js} +1 -1
  18. package/android/src/main/assets/edge-currency-accountbased/{835.chunk.js → 5835.chunk.js} +1 -1
  19. package/android/src/main/assets/edge-currency-accountbased/5836.chunk.js +1 -0
  20. package/android/src/main/assets/edge-currency-accountbased/6266.chunk.js +1 -0
  21. package/android/src/main/assets/edge-currency-accountbased/6291.chunk.js +58 -0
  22. package/android/src/main/assets/edge-currency-accountbased/6341.chunk.js +44 -0
  23. package/android/src/main/assets/edge-currency-accountbased/7221.chunk.js +1 -0
  24. package/android/src/main/assets/edge-currency-accountbased/7428.chunk.js +6 -0
  25. package/android/src/main/assets/edge-currency-accountbased/{481.chunk.js → 7481.chunk.js} +1 -1
  26. package/android/src/main/assets/edge-currency-accountbased/7542.chunk.js +1 -0
  27. package/android/src/main/assets/edge-currency-accountbased/7786.chunk.js +2 -0
  28. package/android/src/main/assets/edge-currency-accountbased/8190.chunk.js +1 -0
  29. package/android/src/main/assets/edge-currency-accountbased/{689.chunk.js → 8689.chunk.js} +1 -1
  30. package/android/src/main/assets/edge-currency-accountbased/{726.chunk.js → 8726.chunk.js} +1 -1
  31. package/android/src/main/assets/edge-currency-accountbased/9068.chunk.js +1 -0
  32. package/android/src/main/assets/edge-currency-accountbased/{223.chunk.js → 9223.chunk.js} +2 -2
  33. package/android/src/main/assets/edge-currency-accountbased/9539.chunk.js +10 -0
  34. package/android/src/main/assets/edge-currency-accountbased/{645.chunk.js → 9645.chunk.js} +6 -6
  35. package/android/src/main/assets/edge-currency-accountbased/9669.chunk.js +7 -0
  36. package/android/src/main/assets/edge-currency-accountbased/algorand.chunk.js +1 -1
  37. package/android/src/main/assets/edge-currency-accountbased/bnb.chunk.js +2 -2
  38. package/android/src/main/assets/edge-currency-accountbased/edge-currency-accountbased.js +2 -18
  39. package/android/src/main/assets/edge-currency-accountbased/eos.chunk.js +5 -5
  40. package/android/src/main/assets/edge-currency-accountbased/ethereum.chunk.js +2 -2
  41. package/android/src/main/assets/edge-currency-accountbased/filecoin.chunk.js +1 -1
  42. package/android/src/main/assets/edge-currency-accountbased/fio.chunk.js +2 -2
  43. package/android/src/main/assets/edge-currency-accountbased/hedera.chunk.js +2 -2
  44. package/android/src/main/assets/edge-currency-accountbased/polkadot.chunk.js +2 -2
  45. package/android/src/main/assets/edge-currency-accountbased/ripple.chunk.js +2 -2
  46. package/android/src/main/assets/edge-currency-accountbased/solana.chunk.js +2 -2
  47. package/android/src/main/assets/edge-currency-accountbased/stellar.chunk.js +2 -2
  48. package/android/src/main/assets/edge-currency-accountbased/tezos.chunk.js +2 -2
  49. package/android/src/main/assets/edge-currency-accountbased/tron.chunk.js +1 -1
  50. package/android/src/main/assets/edge-currency-accountbased/zcash.chunk.js +2 -2
  51. package/lib/ethereum/info/avalancheInfo.js +8 -0
  52. package/lib/ethereum/info/ethereumInfo.js +8 -0
  53. package/lib/filecoin/FilecoinEngine.js +112 -79
  54. package/lib/filecoin/Filfox.js +68 -1
  55. package/lib/filecoin/filecoinInfo.js +8 -3
  56. package/lib/filecoin/filecoinTypes.js +1 -6
  57. package/lib/zcash/ZcashEngine.js +11 -9
  58. package/package.json +1 -1
  59. package/android/src/main/assets/edge-currency-accountbased/124.chunk.js +0 -35
  60. package/android/src/main/assets/edge-currency-accountbased/17.chunk.js +0 -58
  61. package/android/src/main/assets/edge-currency-accountbased/190.chunk.js +0 -1
  62. package/android/src/main/assets/edge-currency-accountbased/221.chunk.js +0 -1
  63. package/android/src/main/assets/edge-currency-accountbased/298.chunk.js +0 -44
  64. package/android/src/main/assets/edge-currency-accountbased/431.chunk.js +0 -1
  65. package/android/src/main/assets/edge-currency-accountbased/491.chunk.js +0 -1
  66. package/android/src/main/assets/edge-currency-accountbased/539.chunk.js +0 -10
  67. package/android/src/main/assets/edge-currency-accountbased/542.chunk.js +0 -1
  68. package/android/src/main/assets/edge-currency-accountbased/618.chunk.js +0 -20
  69. package/android/src/main/assets/edge-currency-accountbased/650.chunk.js +0 -1
  70. package/android/src/main/assets/edge-currency-accountbased/68.chunk.js +0 -1
  71. package/android/src/main/assets/edge-currency-accountbased/720.chunk.js +0 -1
  72. package/android/src/main/assets/edge-currency-accountbased/786.chunk.js +0 -2
  73. package/android/src/main/assets/edge-currency-accountbased/836.chunk.js +0 -1
  74. package/android/src/main/assets/edge-currency-accountbased/935.chunk.js +0 -1
  75. package/android/src/main/assets/edge-currency-accountbased/944.chunk.js +0 -4
  76. package/android/src/main/assets/edge-currency-accountbased/945.chunk.js +0 -25
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkedge_currency_accountbased=self.webpackChunkedge_currency_accountbased||[]).push([[8190],{88190:function(wr,Ne,Ie){Ie.r(Ne),Ie.d(Ne,{code:function(){return dr},decode:function(){return hr},encode:function(){return lr},name:function(){return fr}});const nn=["string","number","bigint","symbol"],tn=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","HTMLElement","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function rn(e){if(e===null)return"null";if(e===void 0)return"undefined";if(e===!0||e===!1)return"boolean";const n=typeof e;if(nn.includes(n))return n;if(n==="function")return"Function";if(Array.isArray(e))return"Array";if(on(e))return"Buffer";const t=sn(e);return t||"Object"}function on(e){return e&&e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer.call(null,e)}function sn(e){const n=Object.prototype.toString.call(e).slice(8,-1);if(tn.includes(n))return n}class s{constructor(n,t,r){this.major=n,this.majorEncoded=n<<5,this.name=t,this.terminal=r}toString(){return`Type[${this.major}].${this.name}`}compare(n){return this.major<n.major?-1:this.major>n.major?1:0}}s.uint=new s(0,"uint",!0),s.negint=new s(1,"negint",!0),s.bytes=new s(2,"bytes",!0),s.string=new s(3,"string",!0),s.array=new s(4,"array",!1),s.map=new s(5,"map",!1),s.tag=new s(6,"tag",!1),s.float=new s(7,"float",!0),s.false=new s(7,"false",!0),s.true=new s(7,"true",!0),s.null=new s(7,"null",!0),s.undefined=new s(7,"undefined",!0),s.break=new s(7,"break",!0);class u{constructor(n,t,r){this.type=n,this.value=t,this.encodedLength=r,this.encodedBytes=void 0,this.byteValue=void 0}toString(){return`Token[${this.type}].${this.value}`}}const P=globalThis.process&&!globalThis.process.browser&&globalThis.Buffer&&typeof globalThis.Buffer.isBuffer=="function",cn=new TextDecoder,an=new TextEncoder;function ee(e){return P&&globalThis.Buffer.isBuffer(e)}function Ce(e){return e instanceof Uint8Array?ee(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e:Uint8Array.from(e)}const un=P?(e,n,t)=>t-n>64?globalThis.Buffer.from(e.subarray(n,t)).toString("utf8"):ze(e,n,t):(e,n,t)=>t-n>64?cn.decode(e.subarray(n,t)):ze(e,n,t),fn=P?e=>e.length>64?globalThis.Buffer.from(e):$e(e):e=>e.length>64?an.encode(e):$e(e),N=e=>Uint8Array.from(e),he=P?(e,n,t)=>ee(e)?new Uint8Array(e.subarray(n,t)):e.slice(n,t):(e,n,t)=>e.slice(n,t),dn=P?(e,n)=>(e=e.map(t=>t instanceof Uint8Array?t:globalThis.Buffer.from(t)),Ce(globalThis.Buffer.concat(e,n))):(e,n)=>{const t=new Uint8Array(n);let r=0;for(let o of e)r+o.length>t.length&&(o=o.subarray(0,t.length-r)),t.set(o,r),r+=o.length;return t},ln=P?e=>globalThis.Buffer.allocUnsafe(e):e=>new Uint8Array(e),pr=null,gr=null;function mr(e){if(e instanceof Uint8Array&&e.constructor.name==="Uint8Array")return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")}function hn(e,n){if(ee(e)&&ee(n))return e.compare(n);for(let t=0;t<e.length;t++)if(e[t]!==n[t])return e[t]<n[t]?-1:1;return 0}function $e(e,n=1/0){let t;const r=e.length;let o=null;const i=[];for(let a=0;a<r;++a){if(t=e.charCodeAt(a),t>55295&&t<57344){if(!o){if(t>56319){(n-=3)>-1&&i.push(239,191,189);continue}else if(a+1===r){(n-=3)>-1&&i.push(239,191,189);continue}o=t;continue}if(t<56320){(n-=3)>-1&&i.push(239,191,189),o=t;continue}t=(o-55296<<10|t-56320)+65536}else o&&(n-=3)>-1&&i.push(239,191,189);if(o=null,t<128){if((n-=1)<0)break;i.push(t)}else if(t<2048){if((n-=2)<0)break;i.push(t>>6|192,t&63|128)}else if(t<65536){if((n-=3)<0)break;i.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((n-=4)<0)break;i.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return i}function ze(e,n,t){const r=[];for(;n<t;){const o=e[n];let i=null,a=o>239?4:o>223?3:o>191?2:1;if(n+a<=t){let f,h,m,y;switch(a){case 1:o<128&&(i=o);break;case 2:f=e[n+1],(f&192)===128&&(y=(o&31)<<6|f&63,y>127&&(i=y));break;case 3:f=e[n+1],h=e[n+2],(f&192)===128&&(h&192)===128&&(y=(o&15)<<12|(f&63)<<6|h&63,y>2047&&(y<55296||y>57343)&&(i=y));break;case 4:f=e[n+1],h=e[n+2],m=e[n+3],(f&192)===128&&(h&192)===128&&(m&192)===128&&(y=(o&15)<<18|(f&63)<<12|(h&63)<<6|m&63,y>65535&&y<1114112&&(i=y))}}i===null?(i=65533,a=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|i&1023),r.push(i),n+=a}return yn(r)}const Me=4096;function yn(e){const n=e.length;if(n<=Me)return String.fromCharCode.apply(String,e);let t="",r=0;for(;r<n;)t+=String.fromCharCode.apply(String,e.slice(r,r+=Me));return t}const wn=256;class Oe{constructor(n=wn){this.chunkSize=n,this.cursor=0,this.maxCursor=-1,this.chunks=[],this._initReuseChunk=null}reset(){this.cursor=0,this.maxCursor=-1,this.chunks.length&&(this.chunks=[]),this._initReuseChunk!==null&&(this.chunks.push(this._initReuseChunk),this.maxCursor=this._initReuseChunk.length-1)}push(n){let t=this.chunks[this.chunks.length-1];if(this.cursor+n.length<=this.maxCursor+1){const o=t.length-(this.maxCursor-this.cursor)-1;t.set(n,o)}else{if(t){const o=t.length-(this.maxCursor-this.cursor)-1;o<t.length&&(this.chunks[this.chunks.length-1]=t.subarray(0,o),this.maxCursor=this.cursor-1)}n.length<64&&n.length<this.chunkSize?(t=ln(this.chunkSize),this.chunks.push(t),this.maxCursor+=t.length,this._initReuseChunk===null&&(this._initReuseChunk=t),t.set(n,0)):(this.chunks.push(n),this.maxCursor+=n.length)}this.cursor+=n.length}toBytes(n=!1){let t;if(this.chunks.length===1){const r=this.chunks[0];n&&this.cursor>r.length/2?(t=this.cursor===r.length?r:r.subarray(0,this.cursor),this._initReuseChunk=null,this.chunks=[]):t=he(r,0,this.cursor)}else t=dn(this.chunks,this.cursor);return n&&this.reset(),t}}const d="CBOR decode error:",De="CBOR encode error:",H=[];H[23]=1,H[24]=2,H[25]=3,H[26]=5,H[27]=9;function q(e,n,t){if(e.length-n<t)throw new Error(`${d} not enough data for type`)}const g=[24,256,65536,4294967296,BigInt("18446744073709551616")];function D(e,n,t){q(e,n,1);const r=e[n];if(t.strict===!0&&r<g[0])throw new Error(`${d} integer encoded in more bytes than necessary (strict decode)`);return r}function F(e,n,t){q(e,n,2);const r=e[n]<<8|e[n+1];if(t.strict===!0&&r<g[1])throw new Error(`${d} integer encoded in more bytes than necessary (strict decode)`);return r}function R(e,n,t){q(e,n,4);const r=e[n]*16777216+(e[n+1]<<16)+(e[n+2]<<8)+e[n+3];if(t.strict===!0&&r<g[2])throw new Error(`${d} integer encoded in more bytes than necessary (strict decode)`);return r}function L(e,n,t){q(e,n,8);const r=e[n]*16777216+(e[n+1]<<16)+(e[n+2]<<8)+e[n+3],o=e[n+4]*16777216+(e[n+5]<<16)+(e[n+6]<<8)+e[n+7],i=(BigInt(r)<<BigInt(32))+BigInt(o);if(t.strict===!0&&i<g[3])throw new Error(`${d} integer encoded in more bytes than necessary (strict decode)`);if(i<=Number.MAX_SAFE_INTEGER)return Number(i);if(t.allowBigInt===!0)return i;throw new Error(`${d} integers outside of the safe integer range are not supported`)}function pn(e,n,t,r){return new u(s.uint,D(e,n+1,r),2)}function gn(e,n,t,r){return new u(s.uint,F(e,n+1,r),3)}function mn(e,n,t,r){return new u(s.uint,R(e,n+1,r),5)}function bn(e,n,t,r){return new u(s.uint,L(e,n+1,r),9)}function V(e,n){return E(e,0,n.value)}function E(e,n,t){if(t<g[0]){const r=Number(t);e.push([n|r])}else if(t<g[1]){const r=Number(t);e.push([n|24,r])}else if(t<g[2]){const r=Number(t);e.push([n|25,r>>>8,r&255])}else if(t<g[3]){const r=Number(t);e.push([n|26,r>>>24&255,r>>>16&255,r>>>8&255,r&255])}else{const r=BigInt(t);if(r<g[4]){const o=[n|27,0,0,0,0,0,0,0];let i=Number(r&BigInt(4294967295)),a=Number(r>>BigInt(32)&BigInt(4294967295));o[8]=i&255,i=i>>8,o[7]=i&255,i=i>>8,o[6]=i&255,i=i>>8,o[5]=i&255,o[4]=a&255,a=a>>8,o[3]=a&255,a=a>>8,o[2]=a&255,a=a>>8,o[1]=a&255,e.push(o)}else throw new Error(`${d} encountered BigInt larger than allowable range`)}}V.encodedSize=function(n){return E.encodedSize(n.value)},E.encodedSize=function(n){return n<g[0]?1:n<g[1]?2:n<g[2]?3:n<g[3]?5:9},V.compareTokens=function(n,t){return n.value<t.value?-1:n.value>t.value?1:0};function En(e,n,t,r){return new u(s.negint,-1-D(e,n+1,r),2)}function vn(e,n,t,r){return new u(s.negint,-1-F(e,n+1,r),3)}function An(e,n,t,r){return new u(s.negint,-1-R(e,n+1,r),5)}const ye=BigInt(-1),Fe=BigInt(1);function _n(e,n,t,r){const o=L(e,n+1,r);if(typeof o!="bigint"){const i=-1-o;if(i>=Number.MIN_SAFE_INTEGER)return new u(s.negint,i,9)}if(r.allowBigInt!==!0)throw new Error(`${d} integers outside of the safe integer range are not supported`);return new u(s.negint,ye-BigInt(o),9)}function we(e,n){const t=n.value,r=typeof t=="bigint"?t*ye-Fe:t*-1-1;E(e,n.type.majorEncoded,r)}we.encodedSize=function(n){const t=n.value,r=typeof t=="bigint"?t*ye-Fe:t*-1-1;return r<g[0]?1:r<g[1]?2:r<g[2]?3:r<g[3]?5:9},we.compareTokens=function(n,t){return n.value<t.value?1:n.value>t.value?-1:0};function Q(e,n,t,r){q(e,n,t+r);const o=he(e,n+t,n+t+r);return new u(s.bytes,o,t+r)}function kn(e,n,t,r){return Q(e,n,1,t)}function Sn(e,n,t,r){return Q(e,n,2,D(e,n+1,r))}function xn(e,n,t,r){return Q(e,n,3,F(e,n+1,r))}function Bn(e,n,t,r){return Q(e,n,5,R(e,n+1,r))}function Un(e,n,t,r){const o=L(e,n+1,r);if(typeof o=="bigint")throw new Error(`${d} 64-bit integer bytes lengths not supported`);return Q(e,n,9,o)}function ne(e){return e.encodedBytes===void 0&&(e.encodedBytes=e.type===s.string?fn(e.value):e.value),e.encodedBytes}function te(e,n){const t=ne(n);E(e,n.type.majorEncoded,t.length),e.push(t)}te.encodedSize=function(n){const t=ne(n);return E.encodedSize(t.length)+t.length},te.compareTokens=function(n,t){return Tn(ne(n),ne(t))};function Tn(e,n){return e.length<n.length?-1:e.length>n.length?1:hn(e,n)}function W(e,n,t,r,o){const i=t+r;q(e,n,i);const a=new u(s.string,un(e,n+t,n+i),i);return o.retainStringBytes===!0&&(a.byteValue=he(e,n+t,n+i)),a}function Nn(e,n,t,r){return W(e,n,1,t,r)}function In(e,n,t,r){return W(e,n,2,D(e,n+1,r),r)}function Cn(e,n,t,r){return W(e,n,3,F(e,n+1,r),r)}function $n(e,n,t,r){return W(e,n,5,R(e,n+1,r),r)}function zn(e,n,t,r){const o=L(e,n+1,r);if(typeof o=="bigint")throw new Error(`${d} 64-bit integer string lengths not supported`);return W(e,n,9,o,r)}const Mn=te;function G(e,n,t,r){return new u(s.array,r,t)}function On(e,n,t,r){return G(e,n,1,t)}function Dn(e,n,t,r){return G(e,n,2,D(e,n+1,r))}function Fn(e,n,t,r){return G(e,n,3,F(e,n+1,r))}function Rn(e,n,t,r){return G(e,n,5,R(e,n+1,r))}function Ln(e,n,t,r){const o=L(e,n+1,r);if(typeof o=="bigint")throw new Error(`${d} 64-bit integer array lengths not supported`);return G(e,n,9,o)}function Vn(e,n,t,r){if(r.allowIndefinite===!1)throw new Error(`${d} indefinite length items not allowed`);return G(e,n,1,1/0)}function pe(e,n){E(e,s.array.majorEncoded,n.value)}pe.compareTokens=V.compareTokens,pe.encodedSize=function(n){return E.encodedSize(n.value)};function J(e,n,t,r){return new u(s.map,r,t)}function jn(e,n,t,r){return J(e,n,1,t)}function Pn(e,n,t,r){return J(e,n,2,D(e,n+1,r))}function qn(e,n,t,r){return J(e,n,3,F(e,n+1,r))}function Gn(e,n,t,r){return J(e,n,5,R(e,n+1,r))}function Jn(e,n,t,r){const o=L(e,n+1,r);if(typeof o=="bigint")throw new Error(`${d} 64-bit integer map lengths not supported`);return J(e,n,9,o)}function Kn(e,n,t,r){if(r.allowIndefinite===!1)throw new Error(`${d} indefinite length items not allowed`);return J(e,n,1,1/0)}function ge(e,n){E(e,s.map.majorEncoded,n.value)}ge.compareTokens=V.compareTokens,ge.encodedSize=function(n){return E.encodedSize(n.value)};function Hn(e,n,t,r){return new u(s.tag,t,1)}function Qn(e,n,t,r){return new u(s.tag,D(e,n+1,r),2)}function Wn(e,n,t,r){return new u(s.tag,F(e,n+1,r),3)}function Xn(e,n,t,r){return new u(s.tag,R(e,n+1,r),5)}function Zn(e,n,t,r){return new u(s.tag,L(e,n+1,r),9)}function me(e,n){E(e,s.tag.majorEncoded,n.value)}me.compareTokens=V.compareTokens,me.encodedSize=function(n){return E.encodedSize(n.value)};const Yn=20,et=21,nt=22,tt=23;function rt(e,n,t,r){if(r.allowUndefined===!1)throw new Error(`${d} undefined values are not supported`);return r.coerceUndefinedToNull===!0?new u(s.null,null,1):new u(s.undefined,void 0,1)}function ot(e,n,t,r){if(r.allowIndefinite===!1)throw new Error(`${d} indefinite length items not allowed`);return new u(s.break,void 0,1)}function be(e,n,t){if(t){if(t.allowNaN===!1&&Number.isNaN(e))throw new Error(`${d} NaN values are not supported`);if(t.allowInfinity===!1&&(e===1/0||e===-1/0))throw new Error(`${d} Infinity values are not supported`)}return new u(s.float,e,n)}function it(e,n,t,r){return be(ve(e,n+1),3,r)}function st(e,n,t,r){return be(Ae(e,n+1),5,r)}function ct(e,n,t,r){return be(je(e,n+1),9,r)}function Ee(e,n,t){const r=n.value;if(r===!1)e.push([s.float.majorEncoded|Yn]);else if(r===!0)e.push([s.float.majorEncoded|et]);else if(r===null)e.push([s.float.majorEncoded|nt]);else if(r===void 0)e.push([s.float.majorEncoded|tt]);else{let o,i=!1;(!t||t.float64!==!0)&&(Le(r),o=ve(_,1),r===o||Number.isNaN(r)?(_[0]=249,e.push(_.slice(0,3)),i=!0):(Ve(r),o=Ae(_,1),r===o&&(_[0]=250,e.push(_.slice(0,5)),i=!0))),i||(at(r),o=je(_,1),_[0]=251,e.push(_.slice(0,9)))}}Ee.encodedSize=function(n,t){const r=n.value;if(r===!1||r===!0||r===null||r===void 0)return 1;if(!t||t.float64!==!0){Le(r);let o=ve(_,1);if(r===o||Number.isNaN(r))return 3;if(Ve(r),o=Ae(_,1),r===o)return 5}return 9};const Re=new ArrayBuffer(9),v=new DataView(Re,1),_=new Uint8Array(Re,0);function Le(e){if(e===1/0)v.setUint16(0,31744,!1);else if(e===-1/0)v.setUint16(0,64512,!1);else if(Number.isNaN(e))v.setUint16(0,32256,!1);else{v.setFloat32(0,e);const n=v.getUint32(0),t=(n&2139095040)>>23,r=n&8388607;if(t===255)v.setUint16(0,31744,!1);else if(t===0)v.setUint16(0,(e&2147483648)>>16|r>>13,!1);else{const o=t-127;o<-24?v.setUint16(0,0):o<-14?v.setUint16(0,(n&2147483648)>>16|1<<24+o,!1):v.setUint16(0,(n&2147483648)>>16|o+15<<10|r>>13,!1)}}}function ve(e,n){if(e.length-n<2)throw new Error(`${d} not enough data for float16`);const t=(e[n]<<8)+e[n+1];if(t===31744)return 1/0;if(t===64512)return-1/0;if(t===32256)return NaN;const r=t>>10&31,o=t&1023;let i;return r===0?i=o*2**-24:r!==31?i=(o+1024)*2**(r-25):i=o===0?1/0:NaN,t&32768?-i:i}function Ve(e){v.setFloat32(0,e,!1)}function Ae(e,n){if(e.length-n<4)throw new Error(`${d} not enough data for float32`);const t=(e.byteOffset||0)+n;return new DataView(e.buffer,t,4).getFloat32(0,!1)}function at(e){v.setFloat64(0,e,!1)}function je(e,n){if(e.length-n<8)throw new Error(`${d} not enough data for float64`);const t=(e.byteOffset||0)+n;return new DataView(e.buffer,t,8).getFloat64(0,!1)}Ee.compareTokens=V.compareTokens;function l(e,n,t){throw new Error(`${d} encountered invalid minor (${t}) for major ${e[n]>>>5}`)}function re(e){return()=>{throw new Error(`${d} ${e}`)}}const c=[];for(let e=0;e<=23;e++)c[e]=l;c[24]=pn,c[25]=gn,c[26]=mn,c[27]=bn,c[28]=l,c[29]=l,c[30]=l,c[31]=l;for(let e=32;e<=55;e++)c[e]=l;c[56]=En,c[57]=vn,c[58]=An,c[59]=_n,c[60]=l,c[61]=l,c[62]=l,c[63]=l;for(let e=64;e<=87;e++)c[e]=kn;c[88]=Sn,c[89]=xn,c[90]=Bn,c[91]=Un,c[92]=l,c[93]=l,c[94]=l,c[95]=re("indefinite length bytes/strings are not supported");for(let e=96;e<=119;e++)c[e]=Nn;c[120]=In,c[121]=Cn,c[122]=$n,c[123]=zn,c[124]=l,c[125]=l,c[126]=l,c[127]=re("indefinite length bytes/strings are not supported");for(let e=128;e<=151;e++)c[e]=On;c[152]=Dn,c[153]=Fn,c[154]=Rn,c[155]=Ln,c[156]=l,c[157]=l,c[158]=l,c[159]=Vn;for(let e=160;e<=183;e++)c[e]=jn;c[184]=Pn,c[185]=qn,c[186]=Gn,c[187]=Jn,c[188]=l,c[189]=l,c[190]=l,c[191]=Kn;for(let e=192;e<=215;e++)c[e]=Hn;c[216]=Qn,c[217]=Wn,c[218]=Xn,c[219]=Zn,c[220]=l,c[221]=l,c[222]=l,c[223]=l;for(let e=224;e<=243;e++)c[e]=re("simple values are not supported");c[244]=l,c[245]=l,c[246]=l,c[247]=rt,c[248]=re("simple values are not supported"),c[249]=it,c[250]=st,c[251]=ct,c[252]=l,c[253]=l,c[254]=l,c[255]=ot;const x=[];for(let e=0;e<24;e++)x[e]=new u(s.uint,e,1);for(let e=-1;e>=-24;e--)x[31-e]=new u(s.negint,e,1);x[64]=new u(s.bytes,new Uint8Array(0),1),x[96]=new u(s.string,"",1),x[128]=new u(s.array,0,1),x[160]=new u(s.map,0,1),x[244]=new u(s.false,!1,1),x[245]=new u(s.true,!0,1),x[246]=new u(s.null,null,1);function ut(e){switch(e.type){case s.false:return N([244]);case s.true:return N([245]);case s.null:return N([246]);case s.bytes:return e.value.length?void 0:N([64]);case s.string:return e.value===""?N([96]):void 0;case s.array:return e.value===0?N([128]):void 0;case s.map:return e.value===0?N([160]):void 0;case s.uint:return e.value<24?N([Number(e.value)]):void 0;case s.negint:if(e.value>=-24)return N([31-Number(e.value)])}}const ft={float64:!1,mapSorter:ht,quickEncodeToken:ut};function dt(){const e=[];return e[s.uint.major]=V,e[s.negint.major]=we,e[s.bytes.major]=te,e[s.string.major]=Mn,e[s.array.major]=pe,e[s.map.major]=ge,e[s.tag.major]=me,e[s.float.major]=Ee,e}const Pe=dt(),_e=new Oe;class oe{constructor(n,t){this.obj=n,this.parent=t}includes(n){let t=this;do if(t.obj===n)return!0;while(t=t.parent);return!1}static createCheck(n,t){if(n&&n.includes(t))throw new Error(`${De} object contains circular references`);return new oe(t,n)}}const $={null:new u(s.null,null),undefined:new u(s.undefined,void 0),true:new u(s.true,!0),false:new u(s.false,!1),emptyArray:new u(s.array,0),emptyMap:new u(s.map,0)},z={number(e,n,t,r){return!Number.isInteger(e)||!Number.isSafeInteger(e)?new u(s.float,e):e>=0?new u(s.uint,e):new u(s.negint,e)},bigint(e,n,t,r){return e>=BigInt(0)?new u(s.uint,e):new u(s.negint,e)},Uint8Array(e,n,t,r){return new u(s.bytes,e)},string(e,n,t,r){return new u(s.string,e)},boolean(e,n,t,r){return e?$.true:$.false},null(e,n,t,r){return $.null},undefined(e,n,t,r){return $.undefined},ArrayBuffer(e,n,t,r){return new u(s.bytes,new Uint8Array(e))},DataView(e,n,t,r){return new u(s.bytes,new Uint8Array(e.buffer,e.byteOffset,e.byteLength))},Array(e,n,t,r){if(!e.length)return t.addBreakTokens===!0?[$.emptyArray,new u(s.break)]:$.emptyArray;r=oe.createCheck(r,e);const o=[];let i=0;for(const a of e)o[i++]=ie(a,t,r);return t.addBreakTokens?[new u(s.array,e.length),o,new u(s.break)]:[new u(s.array,e.length),o]},Object(e,n,t,r){const o=n!=="Object",i=o?e.keys():Object.keys(e),a=o?e.size:i.length;if(!a)return t.addBreakTokens===!0?[$.emptyMap,new u(s.break)]:$.emptyMap;r=oe.createCheck(r,e);const f=[];let h=0;for(const m of i)f[h++]=[ie(m,t,r),ie(o?e.get(m):e[m],t,r)];return lt(f,t),t.addBreakTokens?[new u(s.map,a),f,new u(s.break)]:[new u(s.map,a),f]}};z.Map=z.Object,z.Buffer=z.Uint8Array;for(const e of"Uint8Clamped Uint16 Uint32 Int8 Int16 Int32 BigUint64 BigInt64 Float32 Float64".split(" "))z[`${e}Array`]=z.DataView;function ie(e,n={},t){const r=rn(e),o=n&&n.typeEncoders&&n.typeEncoders[r]||z[r];if(typeof o=="function"){const a=o(e,r,n,t);if(a!=null)return a}const i=z[r];if(!i)throw new Error(`${De} unsupported type: ${r}`);return i(e,r,n,t)}function lt(e,n){n.mapSorter&&e.sort(n.mapSorter)}function ht(e,n){const t=Array.isArray(e[0])?e[0][0]:e[0],r=Array.isArray(n[0])?n[0][0]:n[0];if(t.type!==r.type)return t.type.compare(r.type);const o=t.type.major,i=Pe[o].compareTokens(t,r);return i===0&&console.warn("WARNING: complex key types used, CBOR key sorting guarantees are gone"),i}function qe(e,n,t,r){if(Array.isArray(n))for(const o of n)qe(e,o,t,r);else t[n.type.major](e,n,r)}function yt(e,n,t){const r=ie(e,t);if(!Array.isArray(r)&&t.quickEncodeToken){const o=t.quickEncodeToken(r);if(o)return o;const i=n[r.type.major];if(i.encodedSize){const a=i.encodedSize(r,t),f=new Oe(a);if(i(f,r,t),f.chunks.length!==1)throw new Error(`Unexpected error: pre-calculated length for ${r} was wrong`);return Ce(f.chunks[0])}}return _e.reset(),qe(_e,r,n,t),_e.toBytes(!0)}function wt(e,n){return n=Object.assign({},ft,n),yt(e,Pe,n)}const pt={strict:!1,allowIndefinite:!0,allowUndefined:!0,allowBigInt:!0};class gt{constructor(n,t={}){this.pos=0,this.data=n,this.options=t}done(){return this.pos>=this.data.length}next(){const n=this.data[this.pos];let t=x[n];if(t===void 0){const r=c[n];if(!r)throw new Error(`${d} no decoder for major type ${n>>>5} (byte 0x${n.toString(16).padStart(2,"0")})`);const o=n&31;t=r(this.data,this.pos,o,this.options)}return this.pos+=t.encodedLength,t}}const X=Symbol.for("DONE"),se=Symbol.for("BREAK");function mt(e,n,t){const r=[];for(let o=0;o<e.value;o++){const i=Z(n,t);if(i===se){if(e.value===1/0)break;throw new Error(`${d} got unexpected break to lengthed array`)}if(i===X)throw new Error(`${d} found array but not enough entries (got ${o}, expected ${e.value})`);r[o]=i}return r}function bt(e,n,t){const r=t.useMaps===!0,o=r?void 0:{},i=r?new Map:void 0;for(let a=0;a<e.value;a++){const f=Z(n,t);if(f===se){if(e.value===1/0)break;throw new Error(`${d} got unexpected break to lengthed map`)}if(f===X)throw new Error(`${d} found map but not enough entries (got ${a} [no key], expected ${e.value})`);if(r!==!0&&typeof f!="string")throw new Error(`${d} non-string keys not supported (got ${typeof f})`);if(t.rejectDuplicateMapKeys===!0&&(r&&i.has(f)||!r&&f in o))throw new Error(`${d} found repeat map key "${f}"`);const h=Z(n,t);if(h===X)throw new Error(`${d} found map but not enough entries (got ${a} [no value], expected ${e.value})`);r?i.set(f,h):o[f]=h}return r?i:o}function Z(e,n){if(e.done())return X;const t=e.next();if(t.type===s.break)return se;if(t.type.terminal)return t.value;if(t.type===s.array)return mt(t,e,n);if(t.type===s.map)return bt(t,e,n);if(t.type===s.tag){if(n.tags&&typeof n.tags[t.value]=="function"){const r=Z(e,n);return n.tags[t.value](r)}throw new Error(`${d} tag not supported (${t.value})`)}throw new Error("unsupported")}function Et(e,n){if(!(e instanceof Uint8Array))throw new Error(`${d} data to decode must be a Uint8Array`);n=Object.assign({},pt,n);const t=n.tokenizer||new gt(e,n),r=Z(t,n);if(r===X)throw new Error(`${d} did not find any content to decode`);if(r===se)throw new Error(`${d} got unexpected break`);if(!t.done())throw new Error(`${d} too many terminals, data makes no sense`);return r}var vt=Je,Ge=128,At=127,_t=~At,kt=Math.pow(2,31);function Je(e,n,t){n=n||[],t=t||0;for(var r=t;e>=kt;)n[t++]=e&255|Ge,e/=128;for(;e&_t;)n[t++]=e&255|Ge,e>>>=7;return n[t]=e|0,Je.bytes=t-r+1,n}var St=ke,xt=128,Ke=127;function ke(e,r){var t=0,r=r||0,o=0,i=r,a,f=e.length;do{if(i>=f)throw ke.bytes=0,new RangeError("Could not decode varint");a=e[i++],t+=o<28?(a&Ke)<<o:(a&Ke)*Math.pow(2,o),o+=7}while(a>=xt);return ke.bytes=i-r,t}var Bt=Math.pow(2,7),Ut=Math.pow(2,14),Tt=Math.pow(2,21),Nt=Math.pow(2,28),It=Math.pow(2,35),Ct=Math.pow(2,42),$t=Math.pow(2,49),zt=Math.pow(2,56),Mt=Math.pow(2,63),Ot=function(e){return e<Bt?1:e<Ut?2:e<Tt?3:e<Nt?4:e<It?5:e<Ct?6:e<$t?7:e<zt?8:e<Mt?9:10},Dt={encode:vt,decode:St,encodingLength:Ot},Ft=Dt,ce=Ft;const Se=(e,n=0)=>[ce.decode(e,n),ce.decode.bytes],ae=(e,n,t=0)=>(ce.encode(e,n,t),n),ue=e=>ce.encodingLength(e),Rt=new Uint8Array(0),br=e=>e.reduce((n,t)=>n+t.toString(16).padStart(2,"0"),""),Er=e=>{const n=e.match(/../g);return n?new Uint8Array(n.map(t=>parseInt(t,16))):Rt},Lt=(e,n)=>{if(e===n)return!0;if(e.byteLength!==n.byteLength)return!1;for(let t=0;t<e.byteLength;t++)if(e[t]!==n[t])return!1;return!0},xe=e=>{if(e instanceof Uint8Array&&e.constructor.name==="Uint8Array")return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")},vr=e=>e instanceof ArrayBuffer||ArrayBuffer.isView(e),Ar=e=>new TextEncoder().encode(e),_r=e=>new TextDecoder().decode(e),Vt=(e,n)=>{const t=n.byteLength,r=ue(e),o=r+ue(t),i=new Uint8Array(o+t);return ae(e,i,0),ae(t,i,r),i.set(n,o),new Be(e,t,n,i)},jt=e=>{const n=xe(e),[t,r]=Se(n),[o,i]=Se(n.subarray(r)),a=n.subarray(r+i);if(a.byteLength!==o)throw new Error("Incorrect length");return new Be(t,o,a,n)},Pt=(e,n)=>{if(e===n)return!0;{const t=n;return e.code===t.code&&e.size===t.size&&t.bytes instanceof Uint8Array&&Lt(e.bytes,t.bytes)}};class Be{constructor(n,t,r,o){this.code=n,this.size=t,this.digest=r,this.bytes=o}}function qt(e,n){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var o=0;o<e.length;o++){var i=e.charAt(o),a=i.charCodeAt(0);if(t[a]!==255)throw new TypeError(i+" is ambiguous");t[a]=o}var f=e.length,h=e.charAt(0),m=Math.log(f)/Math.log(256),y=Math.log(256)/Math.log(f);function K(w){if(w instanceof Uint8Array||(ArrayBuffer.isView(w)?w=new Uint8Array(w.buffer,w.byteOffset,w.byteLength):Array.isArray(w)&&(w=Uint8Array.from(w))),!(w instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(w.length===0)return"";for(var b=0,j=0,k=0,B=w.length;k!==B&&w[k]===0;)k++,b++;for(var U=(B-k)*y+1>>>0,A=new Uint8Array(U);k!==B;){for(var T=w[k],O=0,S=U-1;(T!==0||O<j)&&S!==-1;S--,O++)T+=256*A[S]>>>0,A[S]=T%f>>>0,T=T/f>>>0;if(T!==0)throw new Error("Non-zero carry");j=O,k++}for(var C=U-j;C!==U&&A[C]===0;)C++;for(var le=h.repeat(b);C<U;++C)le+=e.charAt(A[C]);return le}function de(w){if(typeof w!="string")throw new TypeError("Expected String");if(w.length===0)return new Uint8Array;var b=0;if(w[b]!==" "){for(var j=0,k=0;w[b]===h;)j++,b++;for(var B=(w.length-b)*m+1>>>0,U=new Uint8Array(B);w[b];){var A=t[w.charCodeAt(b)];if(A===255)return;for(var T=0,O=B-1;(A!==0||T<k)&&O!==-1;O--,T++)A+=f*U[O]>>>0,U[O]=A%256>>>0,A=A/256>>>0;if(A!==0)throw new Error("Non-zero carry");k=T,b++}if(w[b]!==" "){for(var S=B-k;S!==B&&U[S]===0;)S++;for(var C=new Uint8Array(j+(B-S)),le=j;S!==B;)C[le++]=U[S++];return C}}}function yr(w){var b=de(w);if(b)return b;throw new Error(`Non-${n} character`)}return{encode:K,decodeUnsafe:de,decode:yr}}var Gt=qt,Jt=Gt,Kt=Jt;class Ht{constructor(n,t,r){this.name=n,this.prefix=t,this.baseEncode=r}encode(n){if(n instanceof Uint8Array)return`${this.prefix}${this.baseEncode(n)}`;throw Error("Unknown type, must be binary type")}}class Qt{constructor(n,t,r){if(this.name=n,this.prefix=t,t.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=r}decode(n){if(typeof n=="string"){if(n.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(n)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(n.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(n){return He(this,n)}}class Wt{constructor(n){this.decoders=n}or(n){return He(this,n)}decode(n){const t=n[0],r=this.decoders[t];if(r)return r.decode(n);throw RangeError(`Unable to decode multibase string ${JSON.stringify(n)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const He=(e,n)=>new Wt({...e.decoders||{[e.prefix]:e},...n.decoders||{[n.prefix]:n}});class Xt{constructor(n,t,r,o){this.name=n,this.prefix=t,this.baseEncode=r,this.baseDecode=o,this.encoder=new Ht(n,t,r),this.decoder=new Qt(n,t,o)}encode(n){return this.encoder.encode(n)}decode(n){return this.decoder.decode(n)}}const Qe=({name:e,prefix:n,encode:t,decode:r})=>new Xt(e,n,t,r),We=({prefix:e,name:n,alphabet:t})=>{const{encode:r,decode:o}=Kt(t,n);return Qe({prefix:e,name:n,encode:r,decode:i=>xe(o(i))})},Zt=(e,n,t,r)=>{const o={};for(let y=0;y<n.length;++y)o[n[y]]=y;let i=e.length;for(;e[i-1]==="=";)--i;const a=new Uint8Array(i*t/8|0);let f=0,h=0,m=0;for(let y=0;y<i;++y){const K=o[e[y]];if(K===void 0)throw new SyntaxError(`Non-${r} character`);h=h<<t|K,f+=t,f>=8&&(f-=8,a[m++]=255&h>>f)}if(f>=t||255&h<<8-f)throw new SyntaxError("Unexpected end of data");return a},Yt=(e,n,t)=>{const r=n[n.length-1]==="=",o=(1<<t)-1;let i="",a=0,f=0;for(let h=0;h<e.length;++h)for(f=f<<8|e[h],a+=8;a>t;)a-=t,i+=n[o&f>>a];if(a&&(i+=n[o&f<<t-a]),r)for(;i.length*t&7;)i+="=";return i},I=({name:e,prefix:n,bitsPerChar:t,alphabet:r})=>Qe({prefix:n,name:e,encode(o){return Yt(o,r,t)},decode(o){return Zt(o,r,t,e)}}),M=We({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),kr=We({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),fe=I({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Sr=I({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),xr=I({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Br=I({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Ur=I({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Tr=I({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Nr=I({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Ir=I({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Cr=I({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),Ue=(e,n)=>{const{bytes:t,version:r}=e;switch(r){case 0:return nr(t,Te(e),n||M.encoder);default:return tr(t,Te(e),n||fe.encoder)}},$r=e=>({"/":Ue(e)}),zr=e=>p.parse(e["/"]),Xe=new WeakMap,Te=e=>{const n=Xe.get(e);if(n==null){const t=new Map;return Xe.set(e,t),t}return n};class p{constructor(n,t,r,o){this.code=t,this.version=n,this.multihash=r,this.bytes=o,this["/"]=o}get asCID(){return this}get byteOffset(){return this.bytes.byteOffset}get byteLength(){return this.bytes.byteLength}toV0(){switch(this.version){case 0:return this;case 1:{const{code:n,multihash:t}=this;if(n!==Y)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(t.code!==rr)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return p.createV0(t)}default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}toV1(){switch(this.version){case 0:{const{code:n,digest:t}=this.multihash,r=Vt(n,t);return p.createV1(this.code,r)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`)}}equals(n){return p.equals(this,n)}static equals(n,t){const r=t;return r&&n.code===r.code&&n.version===r.version&&Pt(n.multihash,r.multihash)}toString(n){return Ue(this,n)}toJSON(){return{"/":Ue(this)}}link(){return this}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return`CID(${this.toString()})`}static asCID(n){if(n==null)return null;const t=n;if(t instanceof p)return t;if(t["/"]!=null&&t["/"]===t.bytes||t.asCID===t){const{version:r,code:o,multihash:i,bytes:a}=t;return new p(r,o,i,a||Ze(r,o,i.bytes))}else if(t[or]===!0){const{version:r,multihash:o,code:i}=t,a=jt(o);return p.create(r,i,a)}else return null}static create(n,t,r){if(typeof t!="number")throw new Error("String codecs are no longer supported");if(!(r.bytes instanceof Uint8Array))throw new Error("Invalid digest");switch(n){case 0:{if(t!==Y)throw new Error(`Version 0 CID must use dag-pb (code: ${Y}) block encoding`);return new p(n,t,r,r.bytes)}case 1:{const o=Ze(n,t,r.bytes);return new p(n,t,r,o)}default:throw new Error("Invalid version")}}static createV0(n){return p.create(0,Y,n)}static createV1(n,t){return p.create(1,n,t)}static decode(n){const[t,r]=p.decodeFirst(n);if(r.length)throw new Error("Incorrect length");return t}static decodeFirst(n){const t=p.inspectBytes(n),r=t.size-t.multihashSize,o=xe(n.subarray(r,r+t.multihashSize));if(o.byteLength!==t.multihashSize)throw new Error("Incorrect length");const i=o.subarray(t.multihashSize-t.digestSize),a=new Be(t.multihashCode,t.digestSize,i,o);return[t.version===0?p.createV0(a):p.createV1(t.codec,a),n.subarray(t.size)]}static inspectBytes(n){let t=0;const r=()=>{const[K,de]=Se(n.subarray(t));return t+=de,K};let o=r(),i=Y;if(o===18?(o=0,t=0):i=r(),o!==0&&o!==1)throw new RangeError(`Invalid CID version ${o}`);const a=t,f=r(),h=r(),m=t+h,y=m-a;return{version:o,codec:i,multihashCode:f,digestSize:h,multihashSize:y,size:m}}static parse(n,t){const[r,o]=er(n,t),i=p.decode(o);if(i.version===0&&n[0]!=="Q")throw Error("Version 0 CID string must not include multibase prefix");return Te(i).set(r,n),i}}const er=(e,n)=>{switch(e[0]){case"Q":{const t=n||M;return[M.prefix,t.decode(`${M.prefix}${e}`)]}case M.prefix:{const t=n||M;return[M.prefix,t.decode(e)]}case fe.prefix:{const t=n||fe;return[fe.prefix,t.decode(e)]}default:{if(n==null)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[e[0],n.decode(e)]}}},nr=(e,n,t)=>{const{prefix:r}=t;if(r!==M.prefix)throw Error(`Cannot string encode V0 in ${t.name} encoding`);const o=n.get(r);if(o==null){const i=t.encode(e).slice(1);return n.set(r,i),i}else return o},tr=(e,n,t)=>{const{prefix:r}=t,o=n.get(r);if(o==null){const i=t.encode(e);return n.set(r,i),i}else return o},Y=112,rr=18,Ze=(e,n,t)=>{const r=ue(e),o=r+ue(n),i=new Uint8Array(o+t.byteLength);return ae(e,i,0),ae(n,i,r),i.set(t,o),i},or=Symbol.for("@ipld/js-cid/CID"),Ye=42;function ir(e){if(e.asCID!==e&&e["/"]!==e.bytes)return null;const n=p.asCID(e);if(!n)return null;const t=new Uint8Array(n.bytes.byteLength+1);return t.set(n.bytes,1),[new u(s.tag,Ye),new u(s.bytes,t)]}function sr(){throw new Error("`undefined` is not supported by the IPLD Data Model and cannot be encoded")}function cr(e){if(Number.isNaN(e))throw new Error("`NaN` is not supported by the IPLD Data Model and cannot be encoded");if(e===1/0||e===-1/0)throw new Error("`Infinity` and `-Infinity` is not supported by the IPLD Data Model and cannot be encoded");return null}const ar={float64:!0,typeEncoders:{Object:ir,undefined:sr,number:cr}};function ur(e){if(e[0]!==0)throw new Error("Invalid CID for CBOR tag 42; expected leading 0x00");return p.decode(e.subarray(1))}const en={allowIndefinite:!1,coerceUndefinedToNull:!0,allowNaN:!1,allowInfinity:!1,allowBigInt:!0,strict:!0,useMaps:!1,rejectDuplicateMapKeys:!0,tags:[]};en.tags[Ye]=ur;const fr="dag-cbor",dr=113,lr=e=>wt(e,ar),hr=e=>Et(e,en)}}]);
@@ -1,4 +1,4 @@
1
- (self.webpackChunkedge_currency_accountbased=self.webpackChunkedge_currency_accountbased||[]).push([[689],{91094:function(B,M,A){var d=A(34155),w;/**
1
+ (self.webpackChunkedge_currency_accountbased=self.webpackChunkedge_currency_accountbased||[]).push([[8689],{91094:function(B,M,A){var d=A(34155),w;/**
2
2
  * [js-sha3]{@link https://github.com/emn178/js-sha3}
3
3
  *
4
4
  * @version 0.8.0
@@ -1,4 +1,4 @@
1
- (self.webpackChunkedge_currency_accountbased=self.webpackChunkedge_currency_accountbased||[]).push([[726],{24736:function(ee,n,o){ee=o.nmd(ee);var a,r=function(T){"use strict";var l=1e7,c=7,y=9007199254740992,N=I(y),S="0123456789abcdefghijklmnopqrstuvwxyz",f=typeof BigInt=="function";function A(v,R,z,Z){return typeof v>"u"?A[0]:typeof R<"u"?+R==10&&!z?Ne(v):gn(v,R,z,Z):Ne(v)}function h(v,R){this.value=v,this.sign=R,this.isSmall=!1}h.prototype=Object.create(A.prototype);function O(v){this.value=v,this.sign=v<0,this.isSmall=!0}O.prototype=Object.create(A.prototype);function E(v){this.value=v}E.prototype=Object.create(A.prototype);function C(v){return-y<v&&v<y}function I(v){return v<1e7?[v]:v<1e14?[v%1e7,Math.floor(v/1e7)]:[v%1e7,Math.floor(v/1e7)%1e7,Math.floor(v/1e14)]}function L(v){w(v);var R=v.length;if(R<4&&ve(v,N)<0)switch(R){case 0:return 0;case 1:return v[0];case 2:return v[0]+v[1]*l;default:return v[0]+(v[1]+v[2]*l)*l}return v}function w(v){for(var R=v.length;v[--R]===0;);v.length=R+1}function P(v){for(var R=new Array(v),z=-1;++z<v;)R[z]=0;return R}function B(v){return v>0?Math.floor(v):Math.ceil(v)}function K(v,R){var z=v.length,Z=R.length,ue=new Array(z),ne=0,he=l,le,pe;for(pe=0;pe<Z;pe++)le=v[pe]+R[pe]+ne,ne=le>=he?1:0,ue[pe]=le-ne*he;for(;pe<z;)le=v[pe]+ne,ne=le===he?1:0,ue[pe++]=le-ne*he;return ne>0&&ue.push(ne),ue}function Y(v,R){return v.length>=R.length?K(v,R):K(R,v)}function V(v,R){var z=v.length,Z=new Array(z),ue=l,ne,he;for(he=0;he<z;he++)ne=v[he]-ue+R,R=Math.floor(ne/ue),Z[he]=ne-R*ue,R+=1;for(;R>0;)Z[he++]=R%ue,R=Math.floor(R/ue);return Z}h.prototype.add=function(v){var R=Ne(v);if(this.sign!==R.sign)return this.subtract(R.negate());var z=this.value,Z=R.value;return R.isSmall?new h(V(z,Math.abs(Z)),this.sign):new h(Y(z,Z),this.sign)},h.prototype.plus=h.prototype.add,O.prototype.add=function(v){var R=Ne(v),z=this.value;if(z<0!==R.sign)return this.subtract(R.negate());var Z=R.value;if(R.isSmall){if(C(z+Z))return new O(z+Z);Z=I(Math.abs(Z))}return new h(V(Z,Math.abs(z)),z<0)},O.prototype.plus=O.prototype.add,E.prototype.add=function(v){return new E(this.value+Ne(v).value)},E.prototype.plus=E.prototype.add;function U(v,R){var z=v.length,Z=R.length,ue=new Array(z),ne=0,he=l,le,pe;for(le=0;le<Z;le++)pe=v[le]-ne-R[le],pe<0?(pe+=he,ne=1):ne=0,ue[le]=pe;for(le=Z;le<z;le++){if(pe=v[le]-ne,pe<0)pe+=he;else{ue[le++]=pe;break}ue[le]=pe}for(;le<z;le++)ue[le]=v[le];return w(ue),ue}function H(v,R,z){var Z;return ve(v,R)>=0?Z=U(v,R):(Z=U(R,v),z=!z),Z=L(Z),typeof Z=="number"?(z&&(Z=-Z),new O(Z)):new h(Z,z)}function G(v,R,z){var Z=v.length,ue=new Array(Z),ne=-R,he=l,le,pe;for(le=0;le<Z;le++)pe=v[le]+ne,ne=Math.floor(pe/he),pe%=he,ue[le]=pe<0?pe+he:pe;return ue=L(ue),typeof ue=="number"?(z&&(ue=-ue),new O(ue)):new h(ue,z)}h.prototype.subtract=function(v){var R=Ne(v);if(this.sign!==R.sign)return this.add(R.negate());var z=this.value,Z=R.value;return R.isSmall?G(z,Math.abs(Z),this.sign):H(z,Z,this.sign)},h.prototype.minus=h.prototype.subtract,O.prototype.subtract=function(v){var R=Ne(v),z=this.value;if(z<0!==R.sign)return this.add(R.negate());var Z=R.value;return R.isSmall?new O(z-Z):G(Z,Math.abs(z),z>=0)},O.prototype.minus=O.prototype.subtract,E.prototype.subtract=function(v){return new E(this.value-Ne(v).value)},E.prototype.minus=E.prototype.subtract,h.prototype.negate=function(){return new h(this.value,!this.sign)},O.prototype.negate=function(){var v=this.sign,R=new O(-this.value);return R.sign=!v,R},E.prototype.negate=function(){return new E(-this.value)},h.prototype.abs=function(){return new h(this.value,!1)},O.prototype.abs=function(){return new O(Math.abs(this.value))},E.prototype.abs=function(){return new E(this.value>=0?this.value:-this.value)};function M(v,R){var z=v.length,Z=R.length,ue=z+Z,ne=P(ue),he=l,le,pe,be,Be,Ce;for(be=0;be<z;++be){Be=v[be];for(var ze=0;ze<Z;++ze)Ce=R[ze],le=Be*Ce+ne[be+ze],pe=Math.floor(le/he),ne[be+ze]=le-pe*he,ne[be+ze+1]+=pe}return w(ne),ne}function te(v,R){var z=v.length,Z=new Array(z),ue=l,ne=0,he,le;for(le=0;le<z;le++)he=v[le]*R+ne,ne=Math.floor(he/ue),Z[le]=he-ne*ue;for(;ne>0;)Z[le++]=ne%ue,ne=Math.floor(ne/ue);return Z}function ie(v,R){for(var z=[];R-- >0;)z.push(0);return z.concat(v)}function re(v,R){var z=Math.max(v.length,R.length);if(z<=30)return M(v,R);z=Math.ceil(z/2);var Z=v.slice(z),ue=v.slice(0,z),ne=R.slice(z),he=R.slice(0,z),le=re(ue,he),pe=re(Z,ne),be=re(Y(ue,Z),Y(he,ne)),Be=Y(Y(le,ie(U(U(be,le),pe),z)),ie(pe,2*z));return w(Be),Be}function J(v,R){return-.012*v-.012*R+15e-6*v*R>0}h.prototype.multiply=function(v){var R=Ne(v),z=this.value,Z=R.value,ue=this.sign!==R.sign,ne;if(R.isSmall){if(Z===0)return A[0];if(Z===1)return this;if(Z===-1)return this.negate();if(ne=Math.abs(Z),ne<l)return new h(te(z,ne),ue);Z=I(ne)}return J(z.length,Z.length)?new h(re(z,Z),ue):new h(M(z,Z),ue)},h.prototype.times=h.prototype.multiply;function me(v,R,z){return v<l?new h(te(R,v),z):new h(M(R,I(v)),z)}O.prototype._multiplyBySmall=function(v){return C(v.value*this.value)?new O(v.value*this.value):me(Math.abs(v.value),I(Math.abs(this.value)),this.sign!==v.sign)},h.prototype._multiplyBySmall=function(v){return v.value===0?A[0]:v.value===1?this:v.value===-1?this.negate():me(Math.abs(v.value),this.value,this.sign!==v.sign)},O.prototype.multiply=function(v){return Ne(v)._multiplyBySmall(this)},O.prototype.times=O.prototype.multiply,E.prototype.multiply=function(v){return new E(this.value*Ne(v).value)},E.prototype.times=E.prototype.multiply;function Ee(v){var R=v.length,z=P(R+R),Z=l,ue,ne,he,le,pe;for(he=0;he<R;he++){le=v[he],ne=0-le*le;for(var be=he;be<R;be++)pe=v[be],ue=2*(le*pe)+z[he+be]+ne,ne=Math.floor(ue/Z),z[he+be]=ue-ne*Z;z[he+R]=ne}return w(z),z}h.prototype.square=function(){return new h(Ee(this.value),!1)},O.prototype.square=function(){var v=this.value*this.value;return C(v)?new O(v):new h(Ee(I(Math.abs(this.value))),!1)},E.prototype.square=function(v){return new E(this.value*this.value)};function Te(v,R){var z=v.length,Z=R.length,ue=l,ne=P(R.length),he=R[Z-1],le=Math.ceil(ue/(2*he)),pe=te(v,le),be=te(R,le),Be,Ce,ze,Et,ct,En,Un;for(pe.length<=z&&pe.push(0),be.push(0),he=be[Z-1],Ce=z-Z;Ce>=0;Ce--){for(Be=ue-1,pe[Ce+Z]!==he&&(Be=Math.floor((pe[Ce+Z]*ue+pe[Ce+Z-1])/he)),ze=0,Et=0,En=be.length,ct=0;ct<En;ct++)ze+=Be*be[ct],Un=Math.floor(ze/ue),Et+=pe[Ce+ct]-(ze-Un*ue),ze=Un,Et<0?(pe[Ce+ct]=Et+ue,Et=-1):(pe[Ce+ct]=Et,Et=0);for(;Et!==0;){for(Be-=1,ze=0,ct=0;ct<En;ct++)ze+=pe[Ce+ct]-ue+be[ct],ze<0?(pe[Ce+ct]=ze+ue,ze=0):(pe[Ce+ct]=ze,ze=1);Et+=ze}ne[Ce]=Be}return pe=Qe(pe,le)[0],[L(ne),L(pe)]}function Me(v,R){for(var z=v.length,Z=R.length,ue=[],ne=[],he=l,le,pe,be,Be,Ce;z;){if(ne.unshift(v[--z]),w(ne),ve(ne,R)<0){ue.push(0);continue}pe=ne.length,be=ne[pe-1]*he+ne[pe-2],Be=R[Z-1]*he+R[Z-2],pe>Z&&(be=(be+1)*he),le=Math.ceil(be/Be);do{if(Ce=te(R,le),ve(Ce,ne)<=0)break;le--}while(le);ue.push(le),ne=U(ne,Ce)}return ue.reverse(),[L(ue),L(ne)]}function Qe(v,R){var z=v.length,Z=P(z),ue=l,ne,he,le,pe;for(le=0,ne=z-1;ne>=0;--ne)pe=le*ue+v[ne],he=B(pe/R),le=pe-he*R,Z[ne]=he|0;return[Z,le|0]}function Ie(v,R){var z,Z=Ne(R);if(f)return[new E(v.value/Z.value),new E(v.value%Z.value)];var ue=v.value,ne=Z.value,he;if(ne===0)throw new Error("Cannot divide by zero");if(v.isSmall)return Z.isSmall?[new O(B(ue/ne)),new O(ue%ne)]:[A[0],v];if(Z.isSmall){if(ne===1)return[v,A[0]];if(ne==-1)return[v.negate(),A[0]];var le=Math.abs(ne);if(le<l){z=Qe(ue,le),he=L(z[0]);var pe=z[1];return v.sign&&(pe=-pe),typeof he=="number"?(v.sign!==Z.sign&&(he=-he),[new O(he),new O(pe)]):[new h(he,v.sign!==Z.sign),new O(pe)]}ne=I(le)}var be=ve(ue,ne);if(be===-1)return[A[0],v];if(be===0)return[A[v.sign===Z.sign?1:-1],A[0]];ue.length+ne.length<=200?z=Te(ue,ne):z=Me(ue,ne),he=z[0];var Be=v.sign!==Z.sign,Ce=z[1],ze=v.sign;return typeof he=="number"?(Be&&(he=-he),he=new O(he)):he=new h(he,Be),typeof Ce=="number"?(ze&&(Ce=-Ce),Ce=new O(Ce)):Ce=new h(Ce,ze),[he,Ce]}h.prototype.divmod=function(v){var R=Ie(this,v);return{quotient:R[0],remainder:R[1]}},E.prototype.divmod=O.prototype.divmod=h.prototype.divmod,h.prototype.divide=function(v){return Ie(this,v)[0]},E.prototype.over=E.prototype.divide=function(v){return new E(this.value/Ne(v).value)},O.prototype.over=O.prototype.divide=h.prototype.over=h.prototype.divide,h.prototype.mod=function(v){return Ie(this,v)[1]},E.prototype.mod=E.prototype.remainder=function(v){return new E(this.value%Ne(v).value)},O.prototype.remainder=O.prototype.mod=h.prototype.remainder=h.prototype.mod,h.prototype.pow=function(v){var R=Ne(v),z=this.value,Z=R.value,ue,ne,he;if(Z===0)return A[1];if(z===0)return A[0];if(z===1)return A[1];if(z===-1)return R.isEven()?A[1]:A[-1];if(R.sign)return A[0];if(!R.isSmall)throw new Error("The exponent "+R.toString()+" is too large.");if(this.isSmall&&C(ue=Math.pow(z,Z)))return new O(B(ue));for(ne=this,he=A[1];Z&!0&&(he=he.times(ne),--Z),Z!==0;)Z/=2,ne=ne.square();return he},O.prototype.pow=h.prototype.pow,E.prototype.pow=function(v){var R=Ne(v),z=this.value,Z=R.value,ue=BigInt(0),ne=BigInt(1),he=BigInt(2);if(Z===ue)return A[1];if(z===ue)return A[0];if(z===ne)return A[1];if(z===BigInt(-1))return R.isEven()?A[1]:A[-1];if(R.isNegative())return new E(ue);for(var le=this,pe=A[1];(Z&ne)===ne&&(pe=pe.times(le),--Z),Z!==ue;)Z/=he,le=le.square();return pe},h.prototype.modPow=function(v,R){if(v=Ne(v),R=Ne(R),R.isZero())throw new Error("Cannot take modPow with modulus 0");var z=A[1],Z=this.mod(R);for(v.isNegative()&&(v=v.multiply(A[-1]),Z=Z.modInv(R));v.isPositive();){if(Z.isZero())return A[0];v.isOdd()&&(z=z.multiply(Z).mod(R)),v=v.divide(2),Z=Z.square().mod(R)}return z},E.prototype.modPow=O.prototype.modPow=h.prototype.modPow;function ve(v,R){if(v.length!==R.length)return v.length>R.length?1:-1;for(var z=v.length-1;z>=0;z--)if(v[z]!==R[z])return v[z]>R[z]?1:-1;return 0}h.prototype.compareAbs=function(v){var R=Ne(v),z=this.value,Z=R.value;return R.isSmall?1:ve(z,Z)},O.prototype.compareAbs=function(v){var R=Ne(v),z=Math.abs(this.value),Z=R.value;return R.isSmall?(Z=Math.abs(Z),z===Z?0:z>Z?1:-1):-1},E.prototype.compareAbs=function(v){var R=this.value,z=Ne(v).value;return R=R>=0?R:-R,z=z>=0?z:-z,R===z?0:R>z?1:-1},h.prototype.compare=function(v){if(v===1/0)return-1;if(v===-1/0)return 1;var R=Ne(v),z=this.value,Z=R.value;return this.sign!==R.sign?R.sign?1:-1:R.isSmall?this.sign?-1:1:ve(z,Z)*(this.sign?-1:1)},h.prototype.compareTo=h.prototype.compare,O.prototype.compare=function(v){if(v===1/0)return-1;if(v===-1/0)return 1;var R=Ne(v),z=this.value,Z=R.value;return R.isSmall?z==Z?0:z>Z?1:-1:z<0!==R.sign?z<0?-1:1:z<0?1:-1},O.prototype.compareTo=O.prototype.compare,E.prototype.compare=function(v){if(v===1/0)return-1;if(v===-1/0)return 1;var R=this.value,z=Ne(v).value;return R===z?0:R>z?1:-1},E.prototype.compareTo=E.prototype.compare,h.prototype.equals=function(v){return this.compare(v)===0},E.prototype.eq=E.prototype.equals=O.prototype.eq=O.prototype.equals=h.prototype.eq=h.prototype.equals,h.prototype.notEquals=function(v){return this.compare(v)!==0},E.prototype.neq=E.prototype.notEquals=O.prototype.neq=O.prototype.notEquals=h.prototype.neq=h.prototype.notEquals,h.prototype.greater=function(v){return this.compare(v)>0},E.prototype.gt=E.prototype.greater=O.prototype.gt=O.prototype.greater=h.prototype.gt=h.prototype.greater,h.prototype.lesser=function(v){return this.compare(v)<0},E.prototype.lt=E.prototype.lesser=O.prototype.lt=O.prototype.lesser=h.prototype.lt=h.prototype.lesser,h.prototype.greaterOrEquals=function(v){return this.compare(v)>=0},E.prototype.geq=E.prototype.greaterOrEquals=O.prototype.geq=O.prototype.greaterOrEquals=h.prototype.geq=h.prototype.greaterOrEquals,h.prototype.lesserOrEquals=function(v){return this.compare(v)<=0},E.prototype.leq=E.prototype.lesserOrEquals=O.prototype.leq=O.prototype.lesserOrEquals=h.prototype.leq=h.prototype.lesserOrEquals,h.prototype.isEven=function(){return(this.value[0]&1)===0},O.prototype.isEven=function(){return(this.value&1)===0},E.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},h.prototype.isOdd=function(){return(this.value[0]&1)===1},O.prototype.isOdd=function(){return(this.value&1)===1},E.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},h.prototype.isPositive=function(){return!this.sign},O.prototype.isPositive=function(){return this.value>0},E.prototype.isPositive=O.prototype.isPositive,h.prototype.isNegative=function(){return this.sign},O.prototype.isNegative=function(){return this.value<0},E.prototype.isNegative=O.prototype.isNegative,h.prototype.isUnit=function(){return!1},O.prototype.isUnit=function(){return Math.abs(this.value)===1},E.prototype.isUnit=function(){return this.abs().value===BigInt(1)},h.prototype.isZero=function(){return!1},O.prototype.isZero=function(){return this.value===0},E.prototype.isZero=function(){return this.value===BigInt(0)},h.prototype.isDivisibleBy=function(v){var R=Ne(v);return R.isZero()?!1:R.isUnit()?!0:R.compareAbs(2)===0?this.isEven():this.mod(R).isZero()},E.prototype.isDivisibleBy=O.prototype.isDivisibleBy=h.prototype.isDivisibleBy;function wt(v){var R=v.abs();if(R.isUnit())return!1;if(R.equals(2)||R.equals(3)||R.equals(5))return!0;if(R.isEven()||R.isDivisibleBy(3)||R.isDivisibleBy(5))return!1;if(R.lesser(49))return!0}function un(v,R){for(var z=v.prev(),Z=z,ue=0,ne,he,le,pe;Z.isEven();)Z=Z.divide(2),ue++;e:for(le=0;le<R.length;le++)if(!v.lesser(R[le])&&(pe=r(R[le]).modPow(Z,v),!(pe.isUnit()||pe.equals(z)))){for(ne=ue-1;ne!=0;ne--){if(pe=pe.square().mod(v),pe.isUnit())return!1;if(pe.equals(z))continue e}return!1}return!0}h.prototype.isPrime=function(v){var R=wt(this);if(R!==T)return R;var z=this.abs(),Z=z.bitLength();if(Z<=64)return un(z,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var ue=Math.log(2)*Z.toJSNumber(),ne=Math.ceil(v===!0?2*Math.pow(ue,2):ue),he=[],le=0;le<ne;le++)he.push(r(le+2));return un(z,he)},E.prototype.isPrime=O.prototype.isPrime=h.prototype.isPrime,h.prototype.isProbablePrime=function(v,R){var z=wt(this);if(z!==T)return z;for(var Z=this.abs(),ue=v===T?5:v,ne=[],he=0;he<ue;he++)ne.push(r.randBetween(2,Z.minus(2),R));return un(Z,ne)},E.prototype.isProbablePrime=O.prototype.isProbablePrime=h.prototype.isProbablePrime,h.prototype.modInv=function(v){for(var R=r.zero,z=r.one,Z=Ne(v),ue=this.abs(),ne,he,le;!ue.isZero();)ne=Z.divide(ue),he=R,le=Z,R=z,Z=ue,z=he.subtract(ne.multiply(z)),ue=le.subtract(ne.multiply(ue));if(!Z.isUnit())throw new Error(this.toString()+" and "+v.toString()+" are not co-prime");return R.compare(0)===-1&&(R=R.add(v)),this.isNegative()?R.negate():R},E.prototype.modInv=O.prototype.modInv=h.prototype.modInv,h.prototype.next=function(){var v=this.value;return this.sign?G(v,1,this.sign):new h(V(v,1),this.sign)},O.prototype.next=function(){var v=this.value;return v+1<y?new O(v+1):new h(N,!1)},E.prototype.next=function(){return new E(this.value+BigInt(1))},h.prototype.prev=function(){var v=this.value;return this.sign?new h(V(v,1),!0):G(v,1,this.sign)},O.prototype.prev=function(){var v=this.value;return v-1>-y?new O(v-1):new h(N,!0)},E.prototype.prev=function(){return new E(this.value-BigInt(1))};for(var St=[1];2*St[St.length-1]<=l;)St.push(2*St[St.length-1]);var tt=St.length,Nt=St[tt-1];function Ft(v){return Math.abs(v)<=l}h.prototype.shiftLeft=function(v){var R=Ne(v).toJSNumber();if(!Ft(R))throw new Error(String(R)+" is too large for shifting.");if(R<0)return this.shiftRight(-R);var z=this;if(z.isZero())return z;for(;R>=tt;)z=z.multiply(Nt),R-=tt-1;return z.multiply(St[R])},E.prototype.shiftLeft=O.prototype.shiftLeft=h.prototype.shiftLeft,h.prototype.shiftRight=function(v){var R,z=Ne(v).toJSNumber();if(!Ft(z))throw new Error(String(z)+" is too large for shifting.");if(z<0)return this.shiftLeft(-z);for(var Z=this;z>=tt;){if(Z.isZero()||Z.isNegative()&&Z.isUnit())return Z;R=Ie(Z,Nt),Z=R[1].isNegative()?R[0].prev():R[0],z-=tt-1}return R=Ie(Z,St[z]),R[1].isNegative()?R[0].prev():R[0]},E.prototype.shiftRight=O.prototype.shiftRight=h.prototype.shiftRight;function zt(v,R,z){R=Ne(R);for(var Z=v.isNegative(),ue=R.isNegative(),ne=Z?v.not():v,he=ue?R.not():R,le=0,pe=0,be=null,Be=null,Ce=[];!ne.isZero()||!he.isZero();)be=Ie(ne,Nt),le=be[1].toJSNumber(),Z&&(le=Nt-1-le),Be=Ie(he,Nt),pe=Be[1].toJSNumber(),ue&&(pe=Nt-1-pe),ne=be[0],he=Be[0],Ce.push(z(le,pe));for(var ze=z(Z?1:0,ue?1:0)!==0?r(-1):r(0),Et=Ce.length-1;Et>=0;Et-=1)ze=ze.multiply(Nt).add(r(Ce[Et]));return ze}h.prototype.not=function(){return this.negate().prev()},E.prototype.not=O.prototype.not=h.prototype.not,h.prototype.and=function(v){return zt(this,v,function(R,z){return R&z})},E.prototype.and=O.prototype.and=h.prototype.and,h.prototype.or=function(v){return zt(this,v,function(R,z){return R|z})},E.prototype.or=O.prototype.or=h.prototype.or,h.prototype.xor=function(v){return zt(this,v,function(R,z){return R^z})},E.prototype.xor=O.prototype.xor=h.prototype.xor;var Yt=1<<30,Qn=(l&-l)*(l&-l)|Yt;function Rt(v){var R=v.value,z=typeof R=="number"?R|Yt:typeof R=="bigint"?R|BigInt(Yt):R[0]+R[1]*l|Qn;return z&-z}function At(v,R){if(R.compareTo(v)<=0){var z=At(v,R.square(R)),Z=z.p,ue=z.e,ne=Z.multiply(R);return ne.compareTo(v)<=0?{p:ne,e:ue*2+1}:{p:Z,e:ue*2}}return{p:r(1),e:0}}h.prototype.bitLength=function(){var v=this;return v.compareTo(r(0))<0&&(v=v.negate().subtract(r(1))),v.compareTo(r(0))===0?r(0):r(At(v,r(2)).e).add(r(1))},E.prototype.bitLength=O.prototype.bitLength=h.prototype.bitLength;function In(v,R){return v=Ne(v),R=Ne(R),v.greater(R)?v:R}function at(v,R){return v=Ne(v),R=Ne(R),v.lesser(R)?v:R}function an(v,R){if(v=Ne(v).abs(),R=Ne(R).abs(),v.equals(R))return v;if(v.isZero())return R;if(R.isZero())return v;for(var z=A[1],Z,ue;v.isEven()&&R.isEven();)Z=at(Rt(v),Rt(R)),v=v.divide(Z),R=R.divide(Z),z=z.multiply(Z);for(;v.isEven();)v=v.divide(Rt(v));do{for(;R.isEven();)R=R.divide(Rt(R));v.greater(R)&&(ue=R,R=v,v=ue),R=R.subtract(v)}while(!R.isZero());return z.isUnit()?v:v.multiply(z)}function di(v,R){return v=Ne(v).abs(),R=Ne(R).abs(),v.divide(an(v,R)).multiply(R)}function ht(v,R,z){v=Ne(v),R=Ne(R);var Z=z||Math.random,ue=at(v,R),ne=In(v,R),he=ne.subtract(ue).add(1);if(he.isSmall)return ue.add(Math.floor(Z()*he));for(var le=ut(he,l).value,pe=[],be=!0,Be=0;Be<le.length;Be++){var Ce=be?le[Be]+(Be+1<le.length?le[Be+1]/l:0):l,ze=B(Z()*Ce);pe.push(ze),ze<le[Be]&&(be=!1)}return ue.add(A.fromArray(pe,l,!1))}var gn=function(v,R,z,Z){z=z||S,v=String(v),Z||(v=v.toLowerCase(),z=z.toLowerCase());var ue=v.length,ne,he=Math.abs(R),le={};for(ne=0;ne<z.length;ne++)le[z[ne]]=ne;for(ne=0;ne<ue;ne++){var pe=v[ne];if(pe!=="-"&&pe in le&&le[pe]>=he){if(pe==="1"&&he===1)continue;throw new Error(pe+" is not a valid digit in base "+R+".")}}R=Ne(R);var be=[],Be=v[0]==="-";for(ne=Be?1:0;ne<v.length;ne++){var pe=v[ne];if(pe in le)be.push(Ne(le[pe]));else if(pe==="<"){var Ce=ne;do ne++;while(v[ne]!==">"&&ne<v.length);be.push(Ne(v.slice(Ce+1,ne)))}else throw new Error(pe+" is not a valid character")}return Mn(be,R,Be)};function Mn(v,R,z){var Z=A[0],ue=A[1],ne;for(ne=v.length-1;ne>=0;ne--)Z=Z.add(v[ne].times(ue)),ue=ue.times(R);return z?Z.negate():Z}function en(v,R){return R=R||S,v<R.length?R[v]:"<"+v+">"}function ut(v,R){if(R=r(R),R.isZero()){if(v.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(R.equals(-1)){if(v.isZero())return{value:[0],isNegative:!1};if(v.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-v.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var z=Array.apply(null,Array(v.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return z.unshift([1]),{value:[].concat.apply([],z),isNegative:!1}}var Z=!1;if(v.isNegative()&&R.isPositive()&&(Z=!0,v=v.abs()),R.isUnit())return v.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(v.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:Z};for(var ue=[],ne=v,he;ne.isNegative()||ne.compareAbs(R)>=0;){he=ne.divmod(R),ne=he.quotient;var le=he.remainder;le.isNegative()&&(le=R.minus(le).abs(),ne=ne.next()),ue.push(le.toJSNumber())}return ue.push(ne.toJSNumber()),{value:ue.reverse(),isNegative:Z}}function cn(v,R,z){var Z=ut(v,R);return(Z.isNegative?"-":"")+Z.value.map(function(ue){return en(ue,z)}).join("")}h.prototype.toArray=function(v){return ut(this,v)},O.prototype.toArray=function(v){return ut(this,v)},E.prototype.toArray=function(v){return ut(this,v)},h.prototype.toString=function(v,R){if(v===T&&(v=10),v!==10)return cn(this,v,R);for(var z=this.value,Z=z.length,ue=String(z[--Z]),ne="0000000",he;--Z>=0;)he=String(z[Z]),ue+=ne.slice(he.length)+he;var le=this.sign?"-":"";return le+ue},O.prototype.toString=function(v,R){return v===T&&(v=10),v!=10?cn(this,v,R):String(this.value)},E.prototype.toString=O.prototype.toString,E.prototype.toJSON=h.prototype.toJSON=O.prototype.toJSON=function(){return this.toString()},h.prototype.valueOf=function(){return parseInt(this.toString(),10)},h.prototype.toJSNumber=h.prototype.valueOf,O.prototype.valueOf=function(){return this.value},O.prototype.toJSNumber=O.prototype.valueOf,E.prototype.valueOf=E.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};function pn(v){if(C(+v)){var R=+v;if(R===B(R))return f?new E(BigInt(R)):new O(R);throw new Error("Invalid integer: "+v)}var z=v[0]==="-";z&&(v=v.slice(1));var Z=v.split(/e/i);if(Z.length>2)throw new Error("Invalid integer: "+Z.join("e"));if(Z.length===2){var ue=Z[1];if(ue[0]==="+"&&(ue=ue.slice(1)),ue=+ue,ue!==B(ue)||!C(ue))throw new Error("Invalid integer: "+ue+" is not a valid exponent.");var ne=Z[0],he=ne.indexOf(".");if(he>=0&&(ue-=ne.length-he-1,ne=ne.slice(0,he)+ne.slice(he+1)),ue<0)throw new Error("Cannot include negative exponent part for integers");ne+=new Array(ue+1).join("0"),v=ne}var le=/^([0-9][0-9]*)$/.test(v);if(!le)throw new Error("Invalid integer: "+v);if(f)return new E(BigInt(z?"-"+v:v));for(var pe=[],be=v.length,Be=c,Ce=be-Be;be>0;)pe.push(+v.slice(Ce,be)),Ce-=Be,Ce<0&&(Ce=0),be-=Be;return w(pe),new h(pe,z)}function hi(v){if(f)return new E(BigInt(v));if(C(v)){if(v!==B(v))throw new Error(v+" is not an integer.");return new O(v)}return pn(v.toString())}function Ne(v){return typeof v=="number"?hi(v):typeof v=="string"?pn(v):typeof v=="bigint"?new E(v):v}for(var tn=0;tn<1e3;tn++)A[tn]=Ne(tn),tn>0&&(A[-tn]=Ne(-tn));return A.one=A[1],A.zero=A[0],A.minusOne=A[-1],A.max=In,A.min=at,A.gcd=an,A.lcm=di,A.isInstance=function(v){return v instanceof h||v instanceof O||v instanceof E},A.randBetween=ht,A.fromArray=function(v,R,z){return Mn(v.map(Ne),Ne(R||10),z)},A}();ee.hasOwnProperty("exports")&&(ee.exports=r),a=function(){return r}.call(n,o,n,ee),a!==void 0&&(ee.exports=a)},93776:function(ee,n,o){var a;(function(r){"use strict";var T=9e15,l=1e9,c="0123456789abcdef",y="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",N="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",S={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-T,maxE:T,crypto:!1},f,A,h,O,E=!0,C="[DecimalError] ",I=C+"Invalid argument: ",L=C+"Precision limit exceeded",w=C+"crypto unavailable",P="[object Decimal]",B=Math.floor,K=Math.pow,Y=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,V=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,U=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,H=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,G=1e7,M=7,te=9007199254740991,ie=y.length-1,re=N.length-1,J={toStringTag:P};J.absoluteValue=J.abs=function(){var u=new this.constructor(this);return u.s<0&&(u.s=1),ve(u)},J.ceil=function(){return ve(new this.constructor(this),this.e+1,2)},J.clampedTo=J.clamp=function(u,d){var g,p=this,b=p.constructor;if(u=new b(u),d=new b(d),!u.s||!d.s)return new b(NaN);if(u.gt(d))throw Error(I+d);return g=p.cmp(u),g<0?u:p.cmp(d)>0?d:new b(p)},J.comparedTo=J.cmp=function(u){var d,g,p,b,_=this,W=_.d,X=(u=new _.constructor(u)).d,q=_.s,$=u.s;if(!W||!X)return!q||!$?NaN:q!==$?q:W===X?0:!W^q<0?1:-1;if(!W[0]||!X[0])return W[0]?q:X[0]?-$:0;if(q!==$)return q;if(_.e!==u.e)return _.e>u.e^q<0?1:-1;for(p=W.length,b=X.length,d=0,g=p<b?p:b;d<g;++d)if(W[d]!==X[d])return W[d]>X[d]^q<0?1:-1;return p===b?0:p>b^q<0?1:-1},J.cosine=J.cos=function(){var u,d,g=this,p=g.constructor;return g.d?g.d[0]?(u=p.precision,d=p.rounding,p.precision=u+Math.max(g.e,g.sd())+M,p.rounding=1,g=Qe(p,Mn(p,g)),p.precision=u,p.rounding=d,ve(O==2||O==3?g.neg():g,u,d,!0)):new p(1):new p(NaN)},J.cubeRoot=J.cbrt=function(){var u,d,g,p,b,_,W,X,q,$,oe=this,ae=oe.constructor;if(!oe.isFinite()||oe.isZero())return new ae(oe);for(E=!1,_=oe.s*K(oe.s*oe,1/3),!_||Math.abs(_)==1/0?(g=me(oe.d),u=oe.e,(_=(u-g.length+1)%3)&&(g+=_==1||_==-2?"0":"00"),_=K(g,1/3),u=B((u+1)/3)-(u%3==(u<0?-1:2)),_==1/0?g="5e"+u:(g=_.toExponential(),g=g.slice(0,g.indexOf("e")+1)+u),p=new ae(g),p.s=oe.s):p=new ae(_.toString()),W=(u=ae.precision)+3;;)if(X=p,q=X.times(X).times(X),$=q.plus(oe),p=Ie($.plus(oe).times(X),$.plus(q),W+2,1),me(X.d).slice(0,W)===(g=me(p.d)).slice(0,W))if(g=g.slice(W-3,W+1),g=="9999"||!b&&g=="4999"){if(!b&&(ve(X,u+1,0),X.times(X).times(X).eq(oe))){p=X;break}W+=4,b=1}else{(!+g||!+g.slice(1)&&g.charAt(0)=="5")&&(ve(p,u+1,1),d=!p.times(p).times(p).eq(oe));break}return E=!0,ve(p,u,ae.rounding,d)},J.decimalPlaces=J.dp=function(){var u,d=this.d,g=NaN;if(d){if(u=d.length-1,g=(u-B(this.e/M))*M,u=d[u],u)for(;u%10==0;u/=10)g--;g<0&&(g=0)}return g},J.dividedBy=J.div=function(u){return Ie(this,new this.constructor(u))},J.dividedToIntegerBy=J.divToInt=function(u){var d=this,g=d.constructor;return ve(Ie(d,new g(u),0,1,1),g.precision,g.rounding)},J.equals=J.eq=function(u){return this.cmp(u)===0},J.floor=function(){return ve(new this.constructor(this),this.e+1,3)},J.greaterThan=J.gt=function(u){return this.cmp(u)>0},J.greaterThanOrEqualTo=J.gte=function(u){var d=this.cmp(u);return d==1||d===0},J.hyperbolicCosine=J.cosh=function(){var u,d,g,p,b,_=this,W=_.constructor,X=new W(1);if(!_.isFinite())return new W(_.s?1/0:NaN);if(_.isZero())return X;g=W.precision,p=W.rounding,W.precision=g+Math.max(_.e,_.sd())+4,W.rounding=1,b=_.d.length,b<32?(u=Math.ceil(b/3),d=(1/gn(4,u)).toString()):(u=16,d="2.3283064365386962890625e-10"),_=ht(W,1,_.times(d),new W(1),!0);for(var q,$=u,oe=new W(8);$--;)q=_.times(_),_=X.minus(q.times(oe.minus(q.times(oe))));return ve(_,W.precision=g,W.rounding=p,!0)},J.hyperbolicSine=J.sinh=function(){var u,d,g,p,b=this,_=b.constructor;if(!b.isFinite()||b.isZero())return new _(b);if(d=_.precision,g=_.rounding,_.precision=d+Math.max(b.e,b.sd())+4,_.rounding=1,p=b.d.length,p<3)b=ht(_,2,b,b,!0);else{u=1.4*Math.sqrt(p),u=u>16?16:u|0,b=b.times(1/gn(5,u)),b=ht(_,2,b,b,!0);for(var W,X=new _(5),q=new _(16),$=new _(20);u--;)W=b.times(b),b=b.times(X.plus(W.times(q.times(W).plus($))))}return _.precision=d,_.rounding=g,ve(b,d,g,!0)},J.hyperbolicTangent=J.tanh=function(){var u,d,g=this,p=g.constructor;return g.isFinite()?g.isZero()?new p(g):(u=p.precision,d=p.rounding,p.precision=u+7,p.rounding=1,Ie(g.sinh(),g.cosh(),p.precision=u,p.rounding=d)):new p(g.s)},J.inverseCosine=J.acos=function(){var u,d=this,g=d.constructor,p=d.abs().cmp(1),b=g.precision,_=g.rounding;return p!==-1?p===0?d.isNeg()?tt(g,b,_):new g(0):new g(NaN):d.isZero()?tt(g,b+4,_).times(.5):(g.precision=b+6,g.rounding=1,d=d.asin(),u=tt(g,b+4,_).times(.5),g.precision=b,g.rounding=_,u.minus(d))},J.inverseHyperbolicCosine=J.acosh=function(){var u,d,g=this,p=g.constructor;return g.lte(1)?new p(g.eq(1)?0:NaN):g.isFinite()?(u=p.precision,d=p.rounding,p.precision=u+Math.max(Math.abs(g.e),g.sd())+4,p.rounding=1,E=!1,g=g.times(g).minus(1).sqrt().plus(g),E=!0,p.precision=u,p.rounding=d,g.ln()):new p(g)},J.inverseHyperbolicSine=J.asinh=function(){var u,d,g=this,p=g.constructor;return!g.isFinite()||g.isZero()?new p(g):(u=p.precision,d=p.rounding,p.precision=u+2*Math.max(Math.abs(g.e),g.sd())+6,p.rounding=1,E=!1,g=g.times(g).plus(1).sqrt().plus(g),E=!0,p.precision=u,p.rounding=d,g.ln())},J.inverseHyperbolicTangent=J.atanh=function(){var u,d,g,p,b=this,_=b.constructor;return b.isFinite()?b.e>=0?new _(b.abs().eq(1)?b.s/0:b.isZero()?b:NaN):(u=_.precision,d=_.rounding,p=b.sd(),Math.max(p,u)<2*-b.e-1?ve(new _(b),u,d,!0):(_.precision=g=p-b.e,b=Ie(b.plus(1),new _(1).minus(b),g+u,1),_.precision=u+4,_.rounding=1,b=b.ln(),_.precision=u,_.rounding=d,b.times(.5))):new _(NaN)},J.inverseSine=J.asin=function(){var u,d,g,p,b=this,_=b.constructor;return b.isZero()?new _(b):(d=b.abs().cmp(1),g=_.precision,p=_.rounding,d!==-1?d===0?(u=tt(_,g+4,p).times(.5),u.s=b.s,u):new _(NaN):(_.precision=g+6,_.rounding=1,b=b.div(new _(1).minus(b.times(b)).sqrt().plus(1)).atan(),_.precision=g,_.rounding=p,b.times(2)))},J.inverseTangent=J.atan=function(){var u,d,g,p,b,_,W,X,q,$=this,oe=$.constructor,ae=oe.precision,ge=oe.rounding;if($.isFinite()){if($.isZero())return new oe($);if($.abs().eq(1)&&ae+4<=re)return W=tt(oe,ae+4,ge).times(.25),W.s=$.s,W}else{if(!$.s)return new oe(NaN);if(ae+4<=re)return W=tt(oe,ae+4,ge).times(.5),W.s=$.s,W}for(oe.precision=X=ae+10,oe.rounding=1,g=Math.min(28,X/M+2|0),u=g;u;--u)$=$.div($.times($).plus(1).sqrt().plus(1));for(E=!1,d=Math.ceil(X/M),p=1,q=$.times($),W=new oe($),b=$;u!==-1;)if(b=b.times(q),_=W.minus(b.div(p+=2)),b=b.times(q),W=_.plus(b.div(p+=2)),W.d[d]!==void 0)for(u=d;W.d[u]===_.d[u]&&u--;);return g&&(W=W.times(2<<g-1)),E=!0,ve(W,oe.precision=ae,oe.rounding=ge,!0)},J.isFinite=function(){return!!this.d},J.isInteger=J.isInt=function(){return!!this.d&&B(this.e/M)>this.d.length-2},J.isNaN=function(){return!this.s},J.isNegative=J.isNeg=function(){return this.s<0},J.isPositive=J.isPos=function(){return this.s>0},J.isZero=function(){return!!this.d&&this.d[0]===0},J.lessThan=J.lt=function(u){return this.cmp(u)<0},J.lessThanOrEqualTo=J.lte=function(u){return this.cmp(u)<1},J.logarithm=J.log=function(u){var d,g,p,b,_,W,X,q,$=this,oe=$.constructor,ae=oe.precision,ge=oe.rounding,we=5;if(u==null)u=new oe(10),d=!0;else{if(u=new oe(u),g=u.d,u.s<0||!g||!g[0]||u.eq(1))return new oe(NaN);d=u.eq(10)}if(g=$.d,$.s<0||!g||!g[0]||$.eq(1))return new oe(g&&!g[0]?-1/0:$.s!=1?NaN:g?0:1/0);if(d)if(g.length>1)_=!0;else{for(b=g[0];b%10===0;)b/=10;_=b!==1}if(E=!1,X=ae+we,W=At($,X),p=d?St(oe,X+10):At(u,X),q=Ie(W,p,X,1),Te(q.d,b=ae,ge))do if(X+=10,W=At($,X),p=d?St(oe,X+10):At(u,X),q=Ie(W,p,X,1),!_){+me(q.d).slice(b+1,b+15)+1==1e14&&(q=ve(q,ae+1,0));break}while(Te(q.d,b+=10,ge));return E=!0,ve(q,ae,ge)},J.minus=J.sub=function(u){var d,g,p,b,_,W,X,q,$,oe,ae,ge,we=this,We=we.constructor;if(u=new We(u),!we.d||!u.d)return!we.s||!u.s?u=new We(NaN):we.d?u.s=-u.s:u=new We(u.d||we.s!==u.s?we:NaN),u;if(we.s!=u.s)return u.s=-u.s,we.plus(u);if($=we.d,ge=u.d,X=We.precision,q=We.rounding,!$[0]||!ge[0]){if(ge[0])u.s=-u.s;else if($[0])u=new We(we);else return new We(q===3?-0:0);return E?ve(u,X,q):u}if(g=B(u.e/M),oe=B(we.e/M),$=$.slice(),_=oe-g,_){for(ae=_<0,ae?(d=$,_=-_,W=ge.length):(d=ge,g=oe,W=$.length),p=Math.max(Math.ceil(X/M),W)+2,_>p&&(_=p,d.length=1),d.reverse(),p=_;p--;)d.push(0);d.reverse()}else{for(p=$.length,W=ge.length,ae=p<W,ae&&(W=p),p=0;p<W;p++)if($[p]!=ge[p]){ae=$[p]<ge[p];break}_=0}for(ae&&(d=$,$=ge,ge=d,u.s=-u.s),W=$.length,p=ge.length-W;p>0;--p)$[W++]=0;for(p=ge.length;p>_;){if($[--p]<ge[p]){for(b=p;b&&$[--b]===0;)$[b]=G-1;--$[b],$[p]+=G}$[p]-=ge[p]}for(;$[--W]===0;)$.pop();for(;$[0]===0;$.shift())--g;return $[0]?(u.d=$,u.e=un($,g),E?ve(u,X,q):u):new We(q===3?-0:0)},J.modulo=J.mod=function(u){var d,g=this,p=g.constructor;return u=new p(u),!g.d||!u.s||u.d&&!u.d[0]?new p(NaN):!u.d||g.d&&!g.d[0]?ve(new p(g),p.precision,p.rounding):(E=!1,p.modulo==9?(d=Ie(g,u.abs(),0,3,1),d.s*=u.s):d=Ie(g,u,0,p.modulo,1),d=d.times(u),E=!0,g.minus(d))},J.naturalExponential=J.exp=function(){return Rt(this)},J.naturalLogarithm=J.ln=function(){return At(this)},J.negated=J.neg=function(){var u=new this.constructor(this);return u.s=-u.s,ve(u)},J.plus=J.add=function(u){var d,g,p,b,_,W,X,q,$,oe,ae=this,ge=ae.constructor;if(u=new ge(u),!ae.d||!u.d)return!ae.s||!u.s?u=new ge(NaN):ae.d||(u=new ge(u.d||ae.s===u.s?ae:NaN)),u;if(ae.s!=u.s)return u.s=-u.s,ae.minus(u);if($=ae.d,oe=u.d,X=ge.precision,q=ge.rounding,!$[0]||!oe[0])return oe[0]||(u=new ge(ae)),E?ve(u,X,q):u;if(_=B(ae.e/M),p=B(u.e/M),$=$.slice(),b=_-p,b){for(b<0?(g=$,b=-b,W=oe.length):(g=oe,p=_,W=$.length),_=Math.ceil(X/M),W=_>W?_+1:W+1,b>W&&(b=W,g.length=1),g.reverse();b--;)g.push(0);g.reverse()}for(W=$.length,b=oe.length,W-b<0&&(b=W,g=oe,oe=$,$=g),d=0;b;)d=($[--b]=$[b]+oe[b]+d)/G|0,$[b]%=G;for(d&&($.unshift(d),++p),W=$.length;$[--W]==0;)$.pop();return u.d=$,u.e=un($,p),E?ve(u,X,q):u},J.precision=J.sd=function(u){var d,g=this;if(u!==void 0&&u!==!!u&&u!==1&&u!==0)throw Error(I+u);return g.d?(d=Nt(g.d),u&&g.e+1>d&&(d=g.e+1)):d=NaN,d},J.round=function(){var u=this,d=u.constructor;return ve(new d(u),u.e+1,d.rounding)},J.sine=J.sin=function(){var u,d,g=this,p=g.constructor;return g.isFinite()?g.isZero()?new p(g):(u=p.precision,d=p.rounding,p.precision=u+Math.max(g.e,g.sd())+M,p.rounding=1,g=di(p,Mn(p,g)),p.precision=u,p.rounding=d,ve(O>2?g.neg():g,u,d,!0)):new p(NaN)},J.squareRoot=J.sqrt=function(){var u,d,g,p,b,_,W=this,X=W.d,q=W.e,$=W.s,oe=W.constructor;if($!==1||!X||!X[0])return new oe(!$||$<0&&(!X||X[0])?NaN:X?W:1/0);for(E=!1,$=Math.sqrt(+W),$==0||$==1/0?(d=me(X),(d.length+q)%2==0&&(d+="0"),$=Math.sqrt(d),q=B((q+1)/2)-(q<0||q%2),$==1/0?d="5e"+q:(d=$.toExponential(),d=d.slice(0,d.indexOf("e")+1)+q),p=new oe(d)):p=new oe($.toString()),g=(q=oe.precision)+3;;)if(_=p,p=_.plus(Ie(W,_,g+2,1)).times(.5),me(_.d).slice(0,g)===(d=me(p.d)).slice(0,g))if(d=d.slice(g-3,g+1),d=="9999"||!b&&d=="4999"){if(!b&&(ve(_,q+1,0),_.times(_).eq(W))){p=_;break}g+=4,b=1}else{(!+d||!+d.slice(1)&&d.charAt(0)=="5")&&(ve(p,q+1,1),u=!p.times(p).eq(W));break}return E=!0,ve(p,q,oe.rounding,u)},J.tangent=J.tan=function(){var u,d,g=this,p=g.constructor;return g.isFinite()?g.isZero()?new p(g):(u=p.precision,d=p.rounding,p.precision=u+10,p.rounding=1,g=g.sin(),g.s=1,g=Ie(g,new p(1).minus(g.times(g)).sqrt(),u+10,0),p.precision=u,p.rounding=d,ve(O==2||O==4?g.neg():g,u,d,!0)):new p(NaN)},J.times=J.mul=function(u){var d,g,p,b,_,W,X,q,$,oe=this,ae=oe.constructor,ge=oe.d,we=(u=new ae(u)).d;if(u.s*=oe.s,!ge||!ge[0]||!we||!we[0])return new ae(!u.s||ge&&!ge[0]&&!we||we&&!we[0]&&!ge?NaN:!ge||!we?u.s/0:u.s*0);for(g=B(oe.e/M)+B(u.e/M),q=ge.length,$=we.length,q<$&&(_=ge,ge=we,we=_,W=q,q=$,$=W),_=[],W=q+$,p=W;p--;)_.push(0);for(p=$;--p>=0;){for(d=0,b=q+p;b>p;)X=_[b]+we[p]*ge[b-p-1]+d,_[b--]=X%G|0,d=X/G|0;_[b]=(_[b]+d)%G|0}for(;!_[--W];)_.pop();return d?++g:_.shift(),u.d=_,u.e=un(_,g),E?ve(u,ae.precision,ae.rounding):u},J.toBinary=function(u,d){return en(this,2,u,d)},J.toDecimalPlaces=J.toDP=function(u,d){var g=this,p=g.constructor;return g=new p(g),u===void 0?g:(Ee(u,0,l),d===void 0?d=p.rounding:Ee(d,0,8),ve(g,u+g.e+1,d))},J.toExponential=function(u,d){var g,p=this,b=p.constructor;return u===void 0?g=wt(p,!0):(Ee(u,0,l),d===void 0?d=b.rounding:Ee(d,0,8),p=ve(new b(p),u+1,d),g=wt(p,!0,u+1)),p.isNeg()&&!p.isZero()?"-"+g:g},J.toFixed=function(u,d){var g,p,b=this,_=b.constructor;return u===void 0?g=wt(b):(Ee(u,0,l),d===void 0?d=_.rounding:Ee(d,0,8),p=ve(new _(b),u+b.e+1,d),g=wt(p,!1,u+p.e+1)),b.isNeg()&&!b.isZero()?"-"+g:g},J.toFraction=function(u){var d,g,p,b,_,W,X,q,$,oe,ae,ge,we=this,We=we.d,Pe=we.constructor;if(!We)return new Pe(we);if($=g=new Pe(1),p=q=new Pe(0),d=new Pe(p),_=d.e=Nt(We)-we.e-1,W=_%M,d.d[0]=K(10,W<0?M+W:W),u==null)u=_>0?d:$;else{if(X=new Pe(u),!X.isInt()||X.lt($))throw Error(I+X);u=X.gt(d)?_>0?d:$:X}for(E=!1,X=new Pe(me(We)),oe=Pe.precision,Pe.precision=_=We.length*M*2;ae=Ie(X,d,0,1,1),b=g.plus(ae.times(p)),b.cmp(u)!=1;)g=p,p=b,b=$,$=q.plus(ae.times(b)),q=b,b=d,d=X.minus(ae.times(b)),X=b;return b=Ie(u.minus(g),p,0,1,1),q=q.plus(b.times($)),g=g.plus(b.times(p)),q.s=$.s=we.s,ge=Ie($,p,_,1).minus(we).abs().cmp(Ie(q,g,_,1).minus(we).abs())<1?[$,p]:[q,g],Pe.precision=oe,E=!0,ge},J.toHexadecimal=J.toHex=function(u,d){return en(this,16,u,d)},J.toNearest=function(u,d){var g=this,p=g.constructor;if(g=new p(g),u==null){if(!g.d)return g;u=new p(1),d=p.rounding}else{if(u=new p(u),d===void 0?d=p.rounding:Ee(d,0,8),!g.d)return u.s?g:u;if(!u.d)return u.s&&(u.s=g.s),u}return u.d[0]?(E=!1,g=Ie(g,u,0,d,1).times(u),E=!0,ve(g)):(u.s=g.s,g=u),g},J.toNumber=function(){return+this},J.toOctal=function(u,d){return en(this,8,u,d)},J.toPower=J.pow=function(u){var d,g,p,b,_,W,X=this,q=X.constructor,$=+(u=new q(u));if(!X.d||!u.d||!X.d[0]||!u.d[0])return new q(K(+X,$));if(X=new q(X),X.eq(1))return X;if(p=q.precision,_=q.rounding,u.eq(1))return ve(X,p,_);if(d=B(u.e/M),d>=u.d.length-1&&(g=$<0?-$:$)<=te)return b=zt(q,X,g,p),u.s<0?new q(1).div(b):ve(b,p,_);if(W=X.s,W<0){if(d<u.d.length-1)return new q(NaN);if((u.d[d]&1)==0&&(W=1),X.e==0&&X.d[0]==1&&X.d.length==1)return X.s=W,X}return g=K(+X,$),d=g==0||!isFinite(g)?B($*(Math.log("0."+me(X.d))/Math.LN10+X.e+1)):new q(g+"").e,d>q.maxE+1||d<q.minE-1?new q(d>0?W/0:0):(E=!1,q.rounding=X.s=1,g=Math.min(12,(d+"").length),b=Rt(u.times(At(X,p+g)),p),b.d&&(b=ve(b,p+5,1),Te(b.d,p,_)&&(d=p+10,b=ve(Rt(u.times(At(X,d+g)),d),d+5,1),+me(b.d).slice(p+1,p+15)+1==1e14&&(b=ve(b,p+1,0)))),b.s=W,E=!0,q.rounding=_,ve(b,p,_))},J.toPrecision=function(u,d){var g,p=this,b=p.constructor;return u===void 0?g=wt(p,p.e<=b.toExpNeg||p.e>=b.toExpPos):(Ee(u,1,l),d===void 0?d=b.rounding:Ee(d,0,8),p=ve(new b(p),u,d),g=wt(p,u<=p.e||p.e<=b.toExpNeg,u)),p.isNeg()&&!p.isZero()?"-"+g:g},J.toSignificantDigits=J.toSD=function(u,d){var g=this,p=g.constructor;return u===void 0?(u=p.precision,d=p.rounding):(Ee(u,1,l),d===void 0?d=p.rounding:Ee(d,0,8)),ve(new p(g),u,d)},J.toString=function(){var u=this,d=u.constructor,g=wt(u,u.e<=d.toExpNeg||u.e>=d.toExpPos);return u.isNeg()&&!u.isZero()?"-"+g:g},J.truncated=J.trunc=function(){return ve(new this.constructor(this),this.e+1,1)},J.valueOf=J.toJSON=function(){var u=this,d=u.constructor,g=wt(u,u.e<=d.toExpNeg||u.e>=d.toExpPos);return u.isNeg()?"-"+g:g};function me(u){var d,g,p,b=u.length-1,_="",W=u[0];if(b>0){for(_+=W,d=1;d<b;d++)p=u[d]+"",g=M-p.length,g&&(_+=Ft(g)),_+=p;W=u[d],p=W+"",g=M-p.length,g&&(_+=Ft(g))}else if(W===0)return"0";for(;W%10===0;)W/=10;return _+W}function Ee(u,d,g){if(u!==~~u||u<d||u>g)throw Error(I+u)}function Te(u,d,g,p){var b,_,W,X;for(_=u[0];_>=10;_/=10)--d;return--d<0?(d+=M,b=0):(b=Math.ceil((d+1)/M),d%=M),_=K(10,M-d),X=u[b]%_|0,p==null?d<3?(d==0?X=X/100|0:d==1&&(X=X/10|0),W=g<4&&X==99999||g>3&&X==49999||X==5e4||X==0):W=(g<4&&X+1==_||g>3&&X+1==_/2)&&(u[b+1]/_/100|0)==K(10,d-2)-1||(X==_/2||X==0)&&(u[b+1]/_/100|0)==0:d<4?(d==0?X=X/1e3|0:d==1?X=X/100|0:d==2&&(X=X/10|0),W=(p||g<4)&&X==9999||!p&&g>3&&X==4999):W=((p||g<4)&&X+1==_||!p&&g>3&&X+1==_/2)&&(u[b+1]/_/1e3|0)==K(10,d-3)-1,W}function Me(u,d,g){for(var p,b=[0],_,W=0,X=u.length;W<X;){for(_=b.length;_--;)b[_]*=d;for(b[0]+=c.indexOf(u.charAt(W++)),p=0;p<b.length;p++)b[p]>g-1&&(b[p+1]===void 0&&(b[p+1]=0),b[p+1]+=b[p]/g|0,b[p]%=g)}return b.reverse()}function Qe(u,d){var g,p,b;if(d.isZero())return d;p=d.d.length,p<32?(g=Math.ceil(p/3),b=(1/gn(4,g)).toString()):(g=16,b="2.3283064365386962890625e-10"),u.precision+=g,d=ht(u,1,d.times(b),new u(1));for(var _=g;_--;){var W=d.times(d);d=W.times(W).minus(W).times(8).plus(1)}return u.precision-=g,d}var Ie=function(){function u(p,b,_){var W,X=0,q=p.length;for(p=p.slice();q--;)W=p[q]*b+X,p[q]=W%_|0,X=W/_|0;return X&&p.unshift(X),p}function d(p,b,_,W){var X,q;if(_!=W)q=_>W?1:-1;else for(X=q=0;X<_;X++)if(p[X]!=b[X]){q=p[X]>b[X]?1:-1;break}return q}function g(p,b,_,W){for(var X=0;_--;)p[_]-=X,X=p[_]<b[_]?1:0,p[_]=X*W+p[_]-b[_];for(;!p[0]&&p.length>1;)p.shift()}return function(p,b,_,W,X,q){var $,oe,ae,ge,we,We,Pe,yt,xe,Bt,Xe,lt,Hn,Mt,Ei,Vn,ln,qn,Ut,jn,Wn=p.constructor,Gn=p.s==b.s?1:-1,gt=p.d,Je=b.d;if(!gt||!gt[0]||!Je||!Je[0])return new Wn(!p.s||!b.s||(gt?Je&&gt[0]==Je[0]:!Je)?NaN:gt&&gt[0]==0||!Je?Gn*0:Gn/0);for(q?(we=1,oe=p.e-b.e):(q=G,we=M,oe=B(p.e/we)-B(b.e/we)),Ut=Je.length,ln=gt.length,xe=new Wn(Gn),Bt=xe.d=[],ae=0;Je[ae]==(gt[ae]||0);ae++);if(Je[ae]>(gt[ae]||0)&&oe--,_==null?(Mt=_=Wn.precision,W=Wn.rounding):X?Mt=_+(p.e-b.e)+1:Mt=_,Mt<0)Bt.push(1),We=!0;else{if(Mt=Mt/we+2|0,ae=0,Ut==1){for(ge=0,Je=Je[0],Mt++;(ae<ln||ge)&&Mt--;ae++)Ei=ge*q+(gt[ae]||0),Bt[ae]=Ei/Je|0,ge=Ei%Je|0;We=ge||ae<ln}else{for(ge=q/(Je[0]+1)|0,ge>1&&(Je=u(Je,ge,q),gt=u(gt,ge,q),Ut=Je.length,ln=gt.length),Vn=Ut,Xe=gt.slice(0,Ut),lt=Xe.length;lt<Ut;)Xe[lt++]=0;jn=Je.slice(),jn.unshift(0),qn=Je[0],Je[1]>=q/2&&++qn;do ge=0,$=d(Je,Xe,Ut,lt),$<0?(Hn=Xe[0],Ut!=lt&&(Hn=Hn*q+(Xe[1]||0)),ge=Hn/qn|0,ge>1?(ge>=q&&(ge=q-1),Pe=u(Je,ge,q),yt=Pe.length,lt=Xe.length,$=d(Pe,Xe,yt,lt),$==1&&(ge--,g(Pe,Ut<yt?jn:Je,yt,q))):(ge==0&&($=ge=1),Pe=Je.slice()),yt=Pe.length,yt<lt&&Pe.unshift(0),g(Xe,Pe,lt,q),$==-1&&(lt=Xe.length,$=d(Je,Xe,Ut,lt),$<1&&(ge++,g(Xe,Ut<lt?jn:Je,lt,q))),lt=Xe.length):$===0&&(ge++,Xe=[0]),Bt[ae++]=ge,$&&Xe[0]?Xe[lt++]=gt[Vn]||0:(Xe=[gt[Vn]],lt=1);while((Vn++<ln||Xe[0]!==void 0)&&Mt--);We=Xe[0]!==void 0}Bt[0]||Bt.shift()}if(we==1)xe.e=oe,A=We;else{for(ae=1,ge=Bt[0];ge>=10;ge/=10)ae++;xe.e=ae+oe*we-1,ve(xe,X?_+xe.e+1:_,W,We)}return xe}}();function ve(u,d,g,p){var b,_,W,X,q,$,oe,ae,ge,we=u.constructor;e:if(d!=null){if(ae=u.d,!ae)return u;for(b=1,X=ae[0];X>=10;X/=10)b++;if(_=d-b,_<0)_+=M,W=d,oe=ae[ge=0],q=oe/K(10,b-W-1)%10|0;else if(ge=Math.ceil((_+1)/M),X=ae.length,ge>=X)if(p){for(;X++<=ge;)ae.push(0);oe=q=0,b=1,_%=M,W=_-M+1}else break e;else{for(oe=X=ae[ge],b=1;X>=10;X/=10)b++;_%=M,W=_-M+b,q=W<0?0:oe/K(10,b-W-1)%10|0}if(p=p||d<0||ae[ge+1]!==void 0||(W<0?oe:oe%K(10,b-W-1)),$=g<4?(q||p)&&(g==0||g==(u.s<0?3:2)):q>5||q==5&&(g==4||p||g==6&&(_>0?W>0?oe/K(10,b-W):0:ae[ge-1])%10&1||g==(u.s<0?8:7)),d<1||!ae[0])return ae.length=0,$?(d-=u.e+1,ae[0]=K(10,(M-d%M)%M),u.e=-d||0):ae[0]=u.e=0,u;if(_==0?(ae.length=ge,X=1,ge--):(ae.length=ge+1,X=K(10,M-_),ae[ge]=W>0?(oe/K(10,b-W)%K(10,W)|0)*X:0),$)for(;;)if(ge==0){for(_=1,W=ae[0];W>=10;W/=10)_++;for(W=ae[0]+=X,X=1;W>=10;W/=10)X++;_!=X&&(u.e++,ae[0]==G&&(ae[0]=1));break}else{if(ae[ge]+=X,ae[ge]!=G)break;ae[ge--]=0,X=1}for(_=ae.length;ae[--_]===0;)ae.pop()}return E&&(u.e>we.maxE?(u.d=null,u.e=NaN):u.e<we.minE&&(u.e=0,u.d=[0])),u}function wt(u,d,g){if(!u.isFinite())return In(u);var p,b=u.e,_=me(u.d),W=_.length;return d?(g&&(p=g-W)>0?_=_.charAt(0)+"."+_.slice(1)+Ft(p):W>1&&(_=_.charAt(0)+"."+_.slice(1)),_=_+(u.e<0?"e":"e+")+u.e):b<0?(_="0."+Ft(-b-1)+_,g&&(p=g-W)>0&&(_+=Ft(p))):b>=W?(_+=Ft(b+1-W),g&&(p=g-b-1)>0&&(_=_+"."+Ft(p))):((p=b+1)<W&&(_=_.slice(0,p)+"."+_.slice(p)),g&&(p=g-W)>0&&(b+1===W&&(_+="."),_+=Ft(p))),_}function un(u,d){var g=u[0];for(d*=M;g>=10;g/=10)d++;return d}function St(u,d,g){if(d>ie)throw E=!0,g&&(u.precision=g),Error(L);return ve(new u(y),d,1,!0)}function tt(u,d,g){if(d>re)throw Error(L);return ve(new u(N),d,g,!0)}function Nt(u){var d=u.length-1,g=d*M+1;if(d=u[d],d){for(;d%10==0;d/=10)g--;for(d=u[0];d>=10;d/=10)g++}return g}function Ft(u){for(var d="";u--;)d+="0";return d}function zt(u,d,g,p){var b,_=new u(1),W=Math.ceil(p/M+4);for(E=!1;;){if(g%2&&(_=_.times(d),ut(_.d,W)&&(b=!0)),g=B(g/2),g===0){g=_.d.length-1,b&&_.d[g]===0&&++_.d[g];break}d=d.times(d),ut(d.d,W)}return E=!0,_}function Yt(u){return u.d[u.d.length-1]&1}function Qn(u,d,g){for(var p,b=new u(d[0]),_=0;++_<d.length;)if(p=new u(d[_]),p.s)b[g](p)&&(b=p);else{b=p;break}return b}function Rt(u,d){var g,p,b,_,W,X,q,$=0,oe=0,ae=0,ge=u.constructor,we=ge.rounding,We=ge.precision;if(!u.d||!u.d[0]||u.e>17)return new ge(u.d?u.d[0]?u.s<0?0:1/0:1:u.s?u.s<0?0:u:0/0);for(d==null?(E=!1,q=We):q=d,X=new ge(.03125);u.e>-2;)u=u.times(X),ae+=5;for(p=Math.log(K(2,ae))/Math.LN10*2+5|0,q+=p,g=_=W=new ge(1),ge.precision=q;;){if(_=ve(_.times(u),q,1),g=g.times(++oe),X=W.plus(Ie(_,g,q,1)),me(X.d).slice(0,q)===me(W.d).slice(0,q)){for(b=ae;b--;)W=ve(W.times(W),q,1);if(d==null)if($<3&&Te(W.d,q-p,we,$))ge.precision=q+=10,g=_=X=new ge(1),oe=0,$++;else return ve(W,ge.precision=We,we,E=!0);else return ge.precision=We,W}W=X}}function At(u,d){var g,p,b,_,W,X,q,$,oe,ae,ge,we=1,We=10,Pe=u,yt=Pe.d,xe=Pe.constructor,Bt=xe.rounding,Xe=xe.precision;if(Pe.s<0||!yt||!yt[0]||!Pe.e&&yt[0]==1&&yt.length==1)return new xe(yt&&!yt[0]?-1/0:Pe.s!=1?NaN:yt?0:Pe);if(d==null?(E=!1,oe=Xe):oe=d,xe.precision=oe+=We,g=me(yt),p=g.charAt(0),Math.abs(_=Pe.e)<15e14){for(;p<7&&p!=1||p==1&&g.charAt(1)>3;)Pe=Pe.times(u),g=me(Pe.d),p=g.charAt(0),we++;_=Pe.e,p>1?(Pe=new xe("0."+g),_++):Pe=new xe(p+"."+g.slice(1))}else return $=St(xe,oe+2,Xe).times(_+""),Pe=At(new xe(p+"."+g.slice(1)),oe-We).plus($),xe.precision=Xe,d==null?ve(Pe,Xe,Bt,E=!0):Pe;for(ae=Pe,q=W=Pe=Ie(Pe.minus(1),Pe.plus(1),oe,1),ge=ve(Pe.times(Pe),oe,1),b=3;;){if(W=ve(W.times(ge),oe,1),$=q.plus(Ie(W,new xe(b),oe,1)),me($.d).slice(0,oe)===me(q.d).slice(0,oe))if(q=q.times(2),_!==0&&(q=q.plus(St(xe,oe+2,Xe).times(_+""))),q=Ie(q,new xe(we),oe,1),d==null)if(Te(q.d,oe-We,Bt,X))xe.precision=oe+=We,$=W=Pe=Ie(ae.minus(1),ae.plus(1),oe,1),ge=ve(Pe.times(Pe),oe,1),b=X=1;else return ve(q,xe.precision=Xe,Bt,E=!0);else return xe.precision=Xe,q;q=$,b+=2}}function In(u){return String(u.s*u.s/0)}function at(u,d){var g,p,b;for((g=d.indexOf("."))>-1&&(d=d.replace(".","")),(p=d.search(/e/i))>0?(g<0&&(g=p),g+=+d.slice(p+1),d=d.substring(0,p)):g<0&&(g=d.length),p=0;d.charCodeAt(p)===48;p++);for(b=d.length;d.charCodeAt(b-1)===48;--b);if(d=d.slice(p,b),d){if(b-=p,u.e=g=g-p-1,u.d=[],p=(g+1)%M,g<0&&(p+=M),p<b){for(p&&u.d.push(+d.slice(0,p)),b-=M;p<b;)u.d.push(+d.slice(p,p+=M));d=d.slice(p),p=M-d.length}else p-=b;for(;p--;)d+="0";u.d.push(+d),E&&(u.e>u.constructor.maxE?(u.d=null,u.e=NaN):u.e<u.constructor.minE&&(u.e=0,u.d=[0]))}else u.e=0,u.d=[0];return u}function an(u,d){var g,p,b,_,W,X,q,$,oe;if(d.indexOf("_")>-1){if(d=d.replace(/(\d)_(?=\d)/g,"$1"),H.test(d))return at(u,d)}else if(d==="Infinity"||d==="NaN")return+d||(u.s=NaN),u.e=NaN,u.d=null,u;if(V.test(d))g=16,d=d.toLowerCase();else if(Y.test(d))g=2;else if(U.test(d))g=8;else throw Error(I+d);for(_=d.search(/p/i),_>0?(q=+d.slice(_+1),d=d.substring(2,_)):d=d.slice(2),_=d.indexOf("."),W=_>=0,p=u.constructor,W&&(d=d.replace(".",""),X=d.length,_=X-_,b=zt(p,new p(g),_,_*2)),$=Me(d,g,G),oe=$.length-1,_=oe;$[_]===0;--_)$.pop();return _<0?new p(u.s*0):(u.e=un($,oe),u.d=$,E=!1,W&&(u=Ie(u,b,X*4)),q&&(u=u.times(Math.abs(q)<54?K(2,q):f.pow(2,q))),E=!0,u)}function di(u,d){var g,p=d.d.length;if(p<3)return d.isZero()?d:ht(u,2,d,d);g=1.4*Math.sqrt(p),g=g>16?16:g|0,d=d.times(1/gn(5,g)),d=ht(u,2,d,d);for(var b,_=new u(5),W=new u(16),X=new u(20);g--;)b=d.times(d),d=d.times(_.plus(b.times(W.times(b).minus(X))));return d}function ht(u,d,g,p,b){var _,W,X,q,$=1,oe=u.precision,ae=Math.ceil(oe/M);for(E=!1,q=g.times(g),X=new u(p);;){if(W=Ie(X.times(q),new u(d++*d++),oe,1),X=b?p.plus(W):p.minus(W),p=Ie(W.times(q),new u(d++*d++),oe,1),W=X.plus(p),W.d[ae]!==void 0){for(_=ae;W.d[_]===X.d[_]&&_--;);if(_==-1)break}_=X,X=p,p=W,W=_,$++}return E=!0,W.d.length=ae+1,W}function gn(u,d){for(var g=u;--d;)g*=u;return g}function Mn(u,d){var g,p=d.s<0,b=tt(u,u.precision,1),_=b.times(.5);if(d=d.abs(),d.lte(_))return O=p?4:1,d;if(g=d.divToInt(b),g.isZero())O=p?3:2;else{if(d=d.minus(g.times(b)),d.lte(_))return O=Yt(g)?p?2:3:p?4:1,d;O=Yt(g)?p?1:4:p?3:2}return d.minus(b).abs()}function en(u,d,g,p){var b,_,W,X,q,$,oe,ae,ge,we=u.constructor,We=g!==void 0;if(We?(Ee(g,1,l),p===void 0?p=we.rounding:Ee(p,0,8)):(g=we.precision,p=we.rounding),!u.isFinite())oe=In(u);else{for(oe=wt(u),W=oe.indexOf("."),We?(b=2,d==16?g=g*4-3:d==8&&(g=g*3-2)):b=d,W>=0&&(oe=oe.replace(".",""),ge=new we(1),ge.e=oe.length-W,ge.d=Me(wt(ge),10,b),ge.e=ge.d.length),ae=Me(oe,10,b),_=q=ae.length;ae[--q]==0;)ae.pop();if(!ae[0])oe=We?"0p+0":"0";else{if(W<0?_--:(u=new we(u),u.d=ae,u.e=_,u=Ie(u,ge,g,p,0,b),ae=u.d,_=u.e,$=A),W=ae[g],X=b/2,$=$||ae[g+1]!==void 0,$=p<4?(W!==void 0||$)&&(p===0||p===(u.s<0?3:2)):W>X||W===X&&(p===4||$||p===6&&ae[g-1]&1||p===(u.s<0?8:7)),ae.length=g,$)for(;++ae[--g]>b-1;)ae[g]=0,g||(++_,ae.unshift(1));for(q=ae.length;!ae[q-1];--q);for(W=0,oe="";W<q;W++)oe+=c.charAt(ae[W]);if(We){if(q>1)if(d==16||d==8){for(W=d==16?4:3,--q;q%W;q++)oe+="0";for(ae=Me(oe,b,d),q=ae.length;!ae[q-1];--q);for(W=1,oe="1.";W<q;W++)oe+=c.charAt(ae[W])}else oe=oe.charAt(0)+"."+oe.slice(1);oe=oe+(_<0?"p":"p+")+_}else if(_<0){for(;++_;)oe="0"+oe;oe="0."+oe}else if(++_>q)for(_-=q;_--;)oe+="0";else _<q&&(oe=oe.slice(0,_)+"."+oe.slice(_))}oe=(d==16?"0x":d==2?"0b":d==8?"0o":"")+oe}return u.s<0?"-"+oe:oe}function ut(u,d){if(u.length>d)return u.length=d,!0}function cn(u){return new this(u).abs()}function pn(u){return new this(u).acos()}function hi(u){return new this(u).acosh()}function Ne(u,d){return new this(u).plus(d)}function tn(u){return new this(u).asin()}function v(u){return new this(u).asinh()}function R(u){return new this(u).atan()}function z(u){return new this(u).atanh()}function Z(u,d){u=new this(u),d=new this(d);var g,p=this.precision,b=this.rounding,_=p+4;return!u.s||!d.s?g=new this(NaN):!u.d&&!d.d?(g=tt(this,_,1).times(d.s>0?.25:.75),g.s=u.s):!d.d||u.isZero()?(g=d.s<0?tt(this,p,b):new this(0),g.s=u.s):!u.d||d.isZero()?(g=tt(this,_,1).times(.5),g.s=u.s):d.s<0?(this.precision=_,this.rounding=1,g=this.atan(Ie(u,d,_,1)),d=tt(this,_,1),this.precision=p,this.rounding=b,g=u.s<0?g.minus(d):g.plus(d)):g=this.atan(Ie(u,d,_,1)),g}function ue(u){return new this(u).cbrt()}function ne(u){return ve(u=new this(u),u.e+1,2)}function he(u,d,g){return new this(u).clamp(d,g)}function le(u){if(!u||typeof u!="object")throw Error(C+"Object expected");var d,g,p,b=u.defaults===!0,_=["precision",1,l,"rounding",0,8,"toExpNeg",-T,0,"toExpPos",0,T,"maxE",0,T,"minE",-T,0,"modulo",0,9];for(d=0;d<_.length;d+=3)if(g=_[d],b&&(this[g]=S[g]),(p=u[g])!==void 0)if(B(p)===p&&p>=_[d+1]&&p<=_[d+2])this[g]=p;else throw Error(I+g+": "+p);if(g="crypto",b&&(this[g]=S[g]),(p=u[g])!==void 0)if(p===!0||p===!1||p===0||p===1)if(p)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[g]=!0;else throw Error(w);else this[g]=!1;else throw Error(I+g+": "+p);return this}function pe(u){return new this(u).cos()}function be(u){return new this(u).cosh()}function Be(u){var d,g,p;function b(_){var W,X,q,$=this;if(!($ instanceof b))return new b(_);if($.constructor=b,En(_)){$.s=_.s,E?!_.d||_.e>b.maxE?($.e=NaN,$.d=null):_.e<b.minE?($.e=0,$.d=[0]):($.e=_.e,$.d=_.d.slice()):($.e=_.e,$.d=_.d?_.d.slice():_.d);return}if(q=typeof _,q==="number"){if(_===0){$.s=1/_<0?-1:1,$.e=0,$.d=[0];return}if(_<0?(_=-_,$.s=-1):$.s=1,_===~~_&&_<1e7){for(W=0,X=_;X>=10;X/=10)W++;E?W>b.maxE?($.e=NaN,$.d=null):W<b.minE?($.e=0,$.d=[0]):($.e=W,$.d=[_]):($.e=W,$.d=[_]);return}else if(_*0!==0){_||($.s=NaN),$.e=NaN,$.d=null;return}return at($,_.toString())}else if(q!=="string")throw Error(I+_);return(X=_.charCodeAt(0))===45?(_=_.slice(1),$.s=-1):(X===43&&(_=_.slice(1)),$.s=1),H.test(_)?at($,_):an($,_)}if(b.prototype=J,b.ROUND_UP=0,b.ROUND_DOWN=1,b.ROUND_CEIL=2,b.ROUND_FLOOR=3,b.ROUND_HALF_UP=4,b.ROUND_HALF_DOWN=5,b.ROUND_HALF_EVEN=6,b.ROUND_HALF_CEIL=7,b.ROUND_HALF_FLOOR=8,b.EUCLID=9,b.config=b.set=le,b.clone=Be,b.isDecimal=En,b.abs=cn,b.acos=pn,b.acosh=hi,b.add=Ne,b.asin=tn,b.asinh=v,b.atan=R,b.atanh=z,b.atan2=Z,b.cbrt=ue,b.ceil=ne,b.clamp=he,b.cos=pe,b.cosh=be,b.div=Ce,b.exp=ze,b.floor=Et,b.hypot=ct,b.ln=Un,b.log=Ar,b.log10=Or,b.log2=Tr,b.max=Fi,b.min=wr,b.mod=Nr,b.mul=Ir,b.pow=gi,b.random=br,b.round=pi,b.sign=_r,b.sin=Lr,b.sinh=Dr,b.sqrt=Cr,b.sub=Pr,b.sum=Fr,b.tan=Rr,b.tanh=Br,b.trunc=Ri,u===void 0&&(u={}),u&&u.defaults!==!0)for(p=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],d=0;d<p.length;)u.hasOwnProperty(g=p[d++])||(u[g]=this[g]);return b.config(u),b}function Ce(u,d){return new this(u).div(d)}function ze(u){return new this(u).exp()}function Et(u){return ve(u=new this(u),u.e+1,3)}function ct(){var u,d,g=new this(0);for(E=!1,u=0;u<arguments.length;)if(d=new this(arguments[u++]),d.d)g.d&&(g=g.plus(d.times(d)));else{if(d.s)return E=!0,new this(1/0);g=d}return E=!0,g.sqrt()}function En(u){return u instanceof f||u&&u.toStringTag===P||!1}function Un(u){return new this(u).ln()}function Ar(u,d){return new this(u).log(d)}function Tr(u){return new this(u).log(2)}function Or(u){return new this(u).log(10)}function Fi(){return Qn(this,arguments,"lt")}function wr(){return Qn(this,arguments,"gt")}function Nr(u,d){return new this(u).mod(d)}function Ir(u,d){return new this(u).mul(d)}function gi(u,d){return new this(u).pow(d)}function br(u){var d,g,p,b,_=0,W=new this(1),X=[];if(u===void 0?u=this.precision:Ee(u,1,l),p=Math.ceil(u/M),this.crypto)if(crypto.getRandomValues)for(d=crypto.getRandomValues(new Uint32Array(p));_<p;)b=d[_],b>=429e7?d[_]=crypto.getRandomValues(new Uint32Array(1))[0]:X[_++]=b%1e7;else if(crypto.randomBytes){for(d=crypto.randomBytes(p*=4);_<p;)b=d[_]+(d[_+1]<<8)+(d[_+2]<<16)+((d[_+3]&127)<<24),b>=214e7?crypto.randomBytes(4).copy(d,_):(X.push(b%1e7),_+=4);_=p/4}else throw Error(w);else for(;_<p;)X[_++]=Math.random()*1e7|0;for(p=X[--_],u%=M,p&&u&&(b=K(10,M-u),X[_]=(p/b|0)*b);X[_]===0;_--)X.pop();if(_<0)g=0,X=[0];else{for(g=-1;X[0]===0;g-=M)X.shift();for(p=1,b=X[0];b>=10;b/=10)p++;p<M&&(g-=M-p)}return W.e=g,W.d=X,W}function pi(u){return ve(u=new this(u),u.e+1,this.rounding)}function _r(u){return u=new this(u),u.d?u.d[0]?u.s:0*u.s:u.s||NaN}function Lr(u){return new this(u).sin()}function Dr(u){return new this(u).sinh()}function Cr(u){return new this(u).sqrt()}function Pr(u,d){return new this(u).sub(d)}function Fr(){var u=0,d=arguments,g=new this(d[u]);for(E=!1;g.s&&++u<d.length;)g=g.plus(d[u]);return E=!0,ve(g,this.precision,this.rounding)}function Rr(u){return new this(u).tan()}function Br(u){return new this(u).tanh()}function Ri(u){return ve(u=new this(u),u.e+1,1)}f=Be(S),f.prototype.constructor=f,f.default=f.Decimal=f,y=new f(y),N=new f(N),a=function(){return f}.call(n,o,n,ee),a!==void 0&&(ee.exports=a)})(this)},44174:function(ee){function n(o,a,r,T){for(var l=-1,c=o==null?0:o.length;++l<c;){var y=o[l];a(T,y,r(y),o)}return T}ee.exports=n},81119:function(ee,n,o){var a=o(89881);function r(T,l,c,y){return a(T,function(N,S,f){l(y,N,c(N),f)}),y}ee.exports=r},55189:function(ee,n,o){var a=o(44174),r=o(81119),T=o(67206),l=o(1469);function c(y,N){return function(S,f){var A=l(S)?a:r,h=N?N():{};return A(S,y,T(f,2),h)}}ee.exports=c},94654:function(ee,n,o){var a=o(21078),r=o(35161);function T(l,c){return a(r(l,c),1)}ee.exports=T},7739:function(ee,n,o){var a=o(89465),r=o(55189),T=Object.prototype,l=T.hasOwnProperty,c=r(function(y,N,S){l.call(y,S)?y[S].push(N):a(y,S,[N])});ee.exports=c},96486:function(ee,n,o){ee=o.nmd(ee);var a;/**
1
+ (self.webpackChunkedge_currency_accountbased=self.webpackChunkedge_currency_accountbased||[]).push([[8726],{24736:function(ee,n,o){ee=o.nmd(ee);var a,r=function(T){"use strict";var l=1e7,c=7,y=9007199254740992,N=I(y),S="0123456789abcdefghijklmnopqrstuvwxyz",f=typeof BigInt=="function";function A(v,R,z,Z){return typeof v>"u"?A[0]:typeof R<"u"?+R==10&&!z?Ne(v):gn(v,R,z,Z):Ne(v)}function h(v,R){this.value=v,this.sign=R,this.isSmall=!1}h.prototype=Object.create(A.prototype);function O(v){this.value=v,this.sign=v<0,this.isSmall=!0}O.prototype=Object.create(A.prototype);function E(v){this.value=v}E.prototype=Object.create(A.prototype);function C(v){return-y<v&&v<y}function I(v){return v<1e7?[v]:v<1e14?[v%1e7,Math.floor(v/1e7)]:[v%1e7,Math.floor(v/1e7)%1e7,Math.floor(v/1e14)]}function L(v){w(v);var R=v.length;if(R<4&&ve(v,N)<0)switch(R){case 0:return 0;case 1:return v[0];case 2:return v[0]+v[1]*l;default:return v[0]+(v[1]+v[2]*l)*l}return v}function w(v){for(var R=v.length;v[--R]===0;);v.length=R+1}function P(v){for(var R=new Array(v),z=-1;++z<v;)R[z]=0;return R}function B(v){return v>0?Math.floor(v):Math.ceil(v)}function K(v,R){var z=v.length,Z=R.length,ue=new Array(z),ne=0,he=l,le,pe;for(pe=0;pe<Z;pe++)le=v[pe]+R[pe]+ne,ne=le>=he?1:0,ue[pe]=le-ne*he;for(;pe<z;)le=v[pe]+ne,ne=le===he?1:0,ue[pe++]=le-ne*he;return ne>0&&ue.push(ne),ue}function Y(v,R){return v.length>=R.length?K(v,R):K(R,v)}function V(v,R){var z=v.length,Z=new Array(z),ue=l,ne,he;for(he=0;he<z;he++)ne=v[he]-ue+R,R=Math.floor(ne/ue),Z[he]=ne-R*ue,R+=1;for(;R>0;)Z[he++]=R%ue,R=Math.floor(R/ue);return Z}h.prototype.add=function(v){var R=Ne(v);if(this.sign!==R.sign)return this.subtract(R.negate());var z=this.value,Z=R.value;return R.isSmall?new h(V(z,Math.abs(Z)),this.sign):new h(Y(z,Z),this.sign)},h.prototype.plus=h.prototype.add,O.prototype.add=function(v){var R=Ne(v),z=this.value;if(z<0!==R.sign)return this.subtract(R.negate());var Z=R.value;if(R.isSmall){if(C(z+Z))return new O(z+Z);Z=I(Math.abs(Z))}return new h(V(Z,Math.abs(z)),z<0)},O.prototype.plus=O.prototype.add,E.prototype.add=function(v){return new E(this.value+Ne(v).value)},E.prototype.plus=E.prototype.add;function U(v,R){var z=v.length,Z=R.length,ue=new Array(z),ne=0,he=l,le,pe;for(le=0;le<Z;le++)pe=v[le]-ne-R[le],pe<0?(pe+=he,ne=1):ne=0,ue[le]=pe;for(le=Z;le<z;le++){if(pe=v[le]-ne,pe<0)pe+=he;else{ue[le++]=pe;break}ue[le]=pe}for(;le<z;le++)ue[le]=v[le];return w(ue),ue}function H(v,R,z){var Z;return ve(v,R)>=0?Z=U(v,R):(Z=U(R,v),z=!z),Z=L(Z),typeof Z=="number"?(z&&(Z=-Z),new O(Z)):new h(Z,z)}function G(v,R,z){var Z=v.length,ue=new Array(Z),ne=-R,he=l,le,pe;for(le=0;le<Z;le++)pe=v[le]+ne,ne=Math.floor(pe/he),pe%=he,ue[le]=pe<0?pe+he:pe;return ue=L(ue),typeof ue=="number"?(z&&(ue=-ue),new O(ue)):new h(ue,z)}h.prototype.subtract=function(v){var R=Ne(v);if(this.sign!==R.sign)return this.add(R.negate());var z=this.value,Z=R.value;return R.isSmall?G(z,Math.abs(Z),this.sign):H(z,Z,this.sign)},h.prototype.minus=h.prototype.subtract,O.prototype.subtract=function(v){var R=Ne(v),z=this.value;if(z<0!==R.sign)return this.add(R.negate());var Z=R.value;return R.isSmall?new O(z-Z):G(Z,Math.abs(z),z>=0)},O.prototype.minus=O.prototype.subtract,E.prototype.subtract=function(v){return new E(this.value-Ne(v).value)},E.prototype.minus=E.prototype.subtract,h.prototype.negate=function(){return new h(this.value,!this.sign)},O.prototype.negate=function(){var v=this.sign,R=new O(-this.value);return R.sign=!v,R},E.prototype.negate=function(){return new E(-this.value)},h.prototype.abs=function(){return new h(this.value,!1)},O.prototype.abs=function(){return new O(Math.abs(this.value))},E.prototype.abs=function(){return new E(this.value>=0?this.value:-this.value)};function M(v,R){var z=v.length,Z=R.length,ue=z+Z,ne=P(ue),he=l,le,pe,be,Be,Ce;for(be=0;be<z;++be){Be=v[be];for(var ze=0;ze<Z;++ze)Ce=R[ze],le=Be*Ce+ne[be+ze],pe=Math.floor(le/he),ne[be+ze]=le-pe*he,ne[be+ze+1]+=pe}return w(ne),ne}function te(v,R){var z=v.length,Z=new Array(z),ue=l,ne=0,he,le;for(le=0;le<z;le++)he=v[le]*R+ne,ne=Math.floor(he/ue),Z[le]=he-ne*ue;for(;ne>0;)Z[le++]=ne%ue,ne=Math.floor(ne/ue);return Z}function ie(v,R){for(var z=[];R-- >0;)z.push(0);return z.concat(v)}function re(v,R){var z=Math.max(v.length,R.length);if(z<=30)return M(v,R);z=Math.ceil(z/2);var Z=v.slice(z),ue=v.slice(0,z),ne=R.slice(z),he=R.slice(0,z),le=re(ue,he),pe=re(Z,ne),be=re(Y(ue,Z),Y(he,ne)),Be=Y(Y(le,ie(U(U(be,le),pe),z)),ie(pe,2*z));return w(Be),Be}function J(v,R){return-.012*v-.012*R+15e-6*v*R>0}h.prototype.multiply=function(v){var R=Ne(v),z=this.value,Z=R.value,ue=this.sign!==R.sign,ne;if(R.isSmall){if(Z===0)return A[0];if(Z===1)return this;if(Z===-1)return this.negate();if(ne=Math.abs(Z),ne<l)return new h(te(z,ne),ue);Z=I(ne)}return J(z.length,Z.length)?new h(re(z,Z),ue):new h(M(z,Z),ue)},h.prototype.times=h.prototype.multiply;function me(v,R,z){return v<l?new h(te(R,v),z):new h(M(R,I(v)),z)}O.prototype._multiplyBySmall=function(v){return C(v.value*this.value)?new O(v.value*this.value):me(Math.abs(v.value),I(Math.abs(this.value)),this.sign!==v.sign)},h.prototype._multiplyBySmall=function(v){return v.value===0?A[0]:v.value===1?this:v.value===-1?this.negate():me(Math.abs(v.value),this.value,this.sign!==v.sign)},O.prototype.multiply=function(v){return Ne(v)._multiplyBySmall(this)},O.prototype.times=O.prototype.multiply,E.prototype.multiply=function(v){return new E(this.value*Ne(v).value)},E.prototype.times=E.prototype.multiply;function Ee(v){var R=v.length,z=P(R+R),Z=l,ue,ne,he,le,pe;for(he=0;he<R;he++){le=v[he],ne=0-le*le;for(var be=he;be<R;be++)pe=v[be],ue=2*(le*pe)+z[he+be]+ne,ne=Math.floor(ue/Z),z[he+be]=ue-ne*Z;z[he+R]=ne}return w(z),z}h.prototype.square=function(){return new h(Ee(this.value),!1)},O.prototype.square=function(){var v=this.value*this.value;return C(v)?new O(v):new h(Ee(I(Math.abs(this.value))),!1)},E.prototype.square=function(v){return new E(this.value*this.value)};function Te(v,R){var z=v.length,Z=R.length,ue=l,ne=P(R.length),he=R[Z-1],le=Math.ceil(ue/(2*he)),pe=te(v,le),be=te(R,le),Be,Ce,ze,Et,ct,En,Un;for(pe.length<=z&&pe.push(0),be.push(0),he=be[Z-1],Ce=z-Z;Ce>=0;Ce--){for(Be=ue-1,pe[Ce+Z]!==he&&(Be=Math.floor((pe[Ce+Z]*ue+pe[Ce+Z-1])/he)),ze=0,Et=0,En=be.length,ct=0;ct<En;ct++)ze+=Be*be[ct],Un=Math.floor(ze/ue),Et+=pe[Ce+ct]-(ze-Un*ue),ze=Un,Et<0?(pe[Ce+ct]=Et+ue,Et=-1):(pe[Ce+ct]=Et,Et=0);for(;Et!==0;){for(Be-=1,ze=0,ct=0;ct<En;ct++)ze+=pe[Ce+ct]-ue+be[ct],ze<0?(pe[Ce+ct]=ze+ue,ze=0):(pe[Ce+ct]=ze,ze=1);Et+=ze}ne[Ce]=Be}return pe=Qe(pe,le)[0],[L(ne),L(pe)]}function Me(v,R){for(var z=v.length,Z=R.length,ue=[],ne=[],he=l,le,pe,be,Be,Ce;z;){if(ne.unshift(v[--z]),w(ne),ve(ne,R)<0){ue.push(0);continue}pe=ne.length,be=ne[pe-1]*he+ne[pe-2],Be=R[Z-1]*he+R[Z-2],pe>Z&&(be=(be+1)*he),le=Math.ceil(be/Be);do{if(Ce=te(R,le),ve(Ce,ne)<=0)break;le--}while(le);ue.push(le),ne=U(ne,Ce)}return ue.reverse(),[L(ue),L(ne)]}function Qe(v,R){var z=v.length,Z=P(z),ue=l,ne,he,le,pe;for(le=0,ne=z-1;ne>=0;--ne)pe=le*ue+v[ne],he=B(pe/R),le=pe-he*R,Z[ne]=he|0;return[Z,le|0]}function Ie(v,R){var z,Z=Ne(R);if(f)return[new E(v.value/Z.value),new E(v.value%Z.value)];var ue=v.value,ne=Z.value,he;if(ne===0)throw new Error("Cannot divide by zero");if(v.isSmall)return Z.isSmall?[new O(B(ue/ne)),new O(ue%ne)]:[A[0],v];if(Z.isSmall){if(ne===1)return[v,A[0]];if(ne==-1)return[v.negate(),A[0]];var le=Math.abs(ne);if(le<l){z=Qe(ue,le),he=L(z[0]);var pe=z[1];return v.sign&&(pe=-pe),typeof he=="number"?(v.sign!==Z.sign&&(he=-he),[new O(he),new O(pe)]):[new h(he,v.sign!==Z.sign),new O(pe)]}ne=I(le)}var be=ve(ue,ne);if(be===-1)return[A[0],v];if(be===0)return[A[v.sign===Z.sign?1:-1],A[0]];ue.length+ne.length<=200?z=Te(ue,ne):z=Me(ue,ne),he=z[0];var Be=v.sign!==Z.sign,Ce=z[1],ze=v.sign;return typeof he=="number"?(Be&&(he=-he),he=new O(he)):he=new h(he,Be),typeof Ce=="number"?(ze&&(Ce=-Ce),Ce=new O(Ce)):Ce=new h(Ce,ze),[he,Ce]}h.prototype.divmod=function(v){var R=Ie(this,v);return{quotient:R[0],remainder:R[1]}},E.prototype.divmod=O.prototype.divmod=h.prototype.divmod,h.prototype.divide=function(v){return Ie(this,v)[0]},E.prototype.over=E.prototype.divide=function(v){return new E(this.value/Ne(v).value)},O.prototype.over=O.prototype.divide=h.prototype.over=h.prototype.divide,h.prototype.mod=function(v){return Ie(this,v)[1]},E.prototype.mod=E.prototype.remainder=function(v){return new E(this.value%Ne(v).value)},O.prototype.remainder=O.prototype.mod=h.prototype.remainder=h.prototype.mod,h.prototype.pow=function(v){var R=Ne(v),z=this.value,Z=R.value,ue,ne,he;if(Z===0)return A[1];if(z===0)return A[0];if(z===1)return A[1];if(z===-1)return R.isEven()?A[1]:A[-1];if(R.sign)return A[0];if(!R.isSmall)throw new Error("The exponent "+R.toString()+" is too large.");if(this.isSmall&&C(ue=Math.pow(z,Z)))return new O(B(ue));for(ne=this,he=A[1];Z&!0&&(he=he.times(ne),--Z),Z!==0;)Z/=2,ne=ne.square();return he},O.prototype.pow=h.prototype.pow,E.prototype.pow=function(v){var R=Ne(v),z=this.value,Z=R.value,ue=BigInt(0),ne=BigInt(1),he=BigInt(2);if(Z===ue)return A[1];if(z===ue)return A[0];if(z===ne)return A[1];if(z===BigInt(-1))return R.isEven()?A[1]:A[-1];if(R.isNegative())return new E(ue);for(var le=this,pe=A[1];(Z&ne)===ne&&(pe=pe.times(le),--Z),Z!==ue;)Z/=he,le=le.square();return pe},h.prototype.modPow=function(v,R){if(v=Ne(v),R=Ne(R),R.isZero())throw new Error("Cannot take modPow with modulus 0");var z=A[1],Z=this.mod(R);for(v.isNegative()&&(v=v.multiply(A[-1]),Z=Z.modInv(R));v.isPositive();){if(Z.isZero())return A[0];v.isOdd()&&(z=z.multiply(Z).mod(R)),v=v.divide(2),Z=Z.square().mod(R)}return z},E.prototype.modPow=O.prototype.modPow=h.prototype.modPow;function ve(v,R){if(v.length!==R.length)return v.length>R.length?1:-1;for(var z=v.length-1;z>=0;z--)if(v[z]!==R[z])return v[z]>R[z]?1:-1;return 0}h.prototype.compareAbs=function(v){var R=Ne(v),z=this.value,Z=R.value;return R.isSmall?1:ve(z,Z)},O.prototype.compareAbs=function(v){var R=Ne(v),z=Math.abs(this.value),Z=R.value;return R.isSmall?(Z=Math.abs(Z),z===Z?0:z>Z?1:-1):-1},E.prototype.compareAbs=function(v){var R=this.value,z=Ne(v).value;return R=R>=0?R:-R,z=z>=0?z:-z,R===z?0:R>z?1:-1},h.prototype.compare=function(v){if(v===1/0)return-1;if(v===-1/0)return 1;var R=Ne(v),z=this.value,Z=R.value;return this.sign!==R.sign?R.sign?1:-1:R.isSmall?this.sign?-1:1:ve(z,Z)*(this.sign?-1:1)},h.prototype.compareTo=h.prototype.compare,O.prototype.compare=function(v){if(v===1/0)return-1;if(v===-1/0)return 1;var R=Ne(v),z=this.value,Z=R.value;return R.isSmall?z==Z?0:z>Z?1:-1:z<0!==R.sign?z<0?-1:1:z<0?1:-1},O.prototype.compareTo=O.prototype.compare,E.prototype.compare=function(v){if(v===1/0)return-1;if(v===-1/0)return 1;var R=this.value,z=Ne(v).value;return R===z?0:R>z?1:-1},E.prototype.compareTo=E.prototype.compare,h.prototype.equals=function(v){return this.compare(v)===0},E.prototype.eq=E.prototype.equals=O.prototype.eq=O.prototype.equals=h.prototype.eq=h.prototype.equals,h.prototype.notEquals=function(v){return this.compare(v)!==0},E.prototype.neq=E.prototype.notEquals=O.prototype.neq=O.prototype.notEquals=h.prototype.neq=h.prototype.notEquals,h.prototype.greater=function(v){return this.compare(v)>0},E.prototype.gt=E.prototype.greater=O.prototype.gt=O.prototype.greater=h.prototype.gt=h.prototype.greater,h.prototype.lesser=function(v){return this.compare(v)<0},E.prototype.lt=E.prototype.lesser=O.prototype.lt=O.prototype.lesser=h.prototype.lt=h.prototype.lesser,h.prototype.greaterOrEquals=function(v){return this.compare(v)>=0},E.prototype.geq=E.prototype.greaterOrEquals=O.prototype.geq=O.prototype.greaterOrEquals=h.prototype.geq=h.prototype.greaterOrEquals,h.prototype.lesserOrEquals=function(v){return this.compare(v)<=0},E.prototype.leq=E.prototype.lesserOrEquals=O.prototype.leq=O.prototype.lesserOrEquals=h.prototype.leq=h.prototype.lesserOrEquals,h.prototype.isEven=function(){return(this.value[0]&1)===0},O.prototype.isEven=function(){return(this.value&1)===0},E.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},h.prototype.isOdd=function(){return(this.value[0]&1)===1},O.prototype.isOdd=function(){return(this.value&1)===1},E.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},h.prototype.isPositive=function(){return!this.sign},O.prototype.isPositive=function(){return this.value>0},E.prototype.isPositive=O.prototype.isPositive,h.prototype.isNegative=function(){return this.sign},O.prototype.isNegative=function(){return this.value<0},E.prototype.isNegative=O.prototype.isNegative,h.prototype.isUnit=function(){return!1},O.prototype.isUnit=function(){return Math.abs(this.value)===1},E.prototype.isUnit=function(){return this.abs().value===BigInt(1)},h.prototype.isZero=function(){return!1},O.prototype.isZero=function(){return this.value===0},E.prototype.isZero=function(){return this.value===BigInt(0)},h.prototype.isDivisibleBy=function(v){var R=Ne(v);return R.isZero()?!1:R.isUnit()?!0:R.compareAbs(2)===0?this.isEven():this.mod(R).isZero()},E.prototype.isDivisibleBy=O.prototype.isDivisibleBy=h.prototype.isDivisibleBy;function wt(v){var R=v.abs();if(R.isUnit())return!1;if(R.equals(2)||R.equals(3)||R.equals(5))return!0;if(R.isEven()||R.isDivisibleBy(3)||R.isDivisibleBy(5))return!1;if(R.lesser(49))return!0}function un(v,R){for(var z=v.prev(),Z=z,ue=0,ne,he,le,pe;Z.isEven();)Z=Z.divide(2),ue++;e:for(le=0;le<R.length;le++)if(!v.lesser(R[le])&&(pe=r(R[le]).modPow(Z,v),!(pe.isUnit()||pe.equals(z)))){for(ne=ue-1;ne!=0;ne--){if(pe=pe.square().mod(v),pe.isUnit())return!1;if(pe.equals(z))continue e}return!1}return!0}h.prototype.isPrime=function(v){var R=wt(this);if(R!==T)return R;var z=this.abs(),Z=z.bitLength();if(Z<=64)return un(z,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var ue=Math.log(2)*Z.toJSNumber(),ne=Math.ceil(v===!0?2*Math.pow(ue,2):ue),he=[],le=0;le<ne;le++)he.push(r(le+2));return un(z,he)},E.prototype.isPrime=O.prototype.isPrime=h.prototype.isPrime,h.prototype.isProbablePrime=function(v,R){var z=wt(this);if(z!==T)return z;for(var Z=this.abs(),ue=v===T?5:v,ne=[],he=0;he<ue;he++)ne.push(r.randBetween(2,Z.minus(2),R));return un(Z,ne)},E.prototype.isProbablePrime=O.prototype.isProbablePrime=h.prototype.isProbablePrime,h.prototype.modInv=function(v){for(var R=r.zero,z=r.one,Z=Ne(v),ue=this.abs(),ne,he,le;!ue.isZero();)ne=Z.divide(ue),he=R,le=Z,R=z,Z=ue,z=he.subtract(ne.multiply(z)),ue=le.subtract(ne.multiply(ue));if(!Z.isUnit())throw new Error(this.toString()+" and "+v.toString()+" are not co-prime");return R.compare(0)===-1&&(R=R.add(v)),this.isNegative()?R.negate():R},E.prototype.modInv=O.prototype.modInv=h.prototype.modInv,h.prototype.next=function(){var v=this.value;return this.sign?G(v,1,this.sign):new h(V(v,1),this.sign)},O.prototype.next=function(){var v=this.value;return v+1<y?new O(v+1):new h(N,!1)},E.prototype.next=function(){return new E(this.value+BigInt(1))},h.prototype.prev=function(){var v=this.value;return this.sign?new h(V(v,1),!0):G(v,1,this.sign)},O.prototype.prev=function(){var v=this.value;return v-1>-y?new O(v-1):new h(N,!0)},E.prototype.prev=function(){return new E(this.value-BigInt(1))};for(var St=[1];2*St[St.length-1]<=l;)St.push(2*St[St.length-1]);var tt=St.length,Nt=St[tt-1];function Ft(v){return Math.abs(v)<=l}h.prototype.shiftLeft=function(v){var R=Ne(v).toJSNumber();if(!Ft(R))throw new Error(String(R)+" is too large for shifting.");if(R<0)return this.shiftRight(-R);var z=this;if(z.isZero())return z;for(;R>=tt;)z=z.multiply(Nt),R-=tt-1;return z.multiply(St[R])},E.prototype.shiftLeft=O.prototype.shiftLeft=h.prototype.shiftLeft,h.prototype.shiftRight=function(v){var R,z=Ne(v).toJSNumber();if(!Ft(z))throw new Error(String(z)+" is too large for shifting.");if(z<0)return this.shiftLeft(-z);for(var Z=this;z>=tt;){if(Z.isZero()||Z.isNegative()&&Z.isUnit())return Z;R=Ie(Z,Nt),Z=R[1].isNegative()?R[0].prev():R[0],z-=tt-1}return R=Ie(Z,St[z]),R[1].isNegative()?R[0].prev():R[0]},E.prototype.shiftRight=O.prototype.shiftRight=h.prototype.shiftRight;function zt(v,R,z){R=Ne(R);for(var Z=v.isNegative(),ue=R.isNegative(),ne=Z?v.not():v,he=ue?R.not():R,le=0,pe=0,be=null,Be=null,Ce=[];!ne.isZero()||!he.isZero();)be=Ie(ne,Nt),le=be[1].toJSNumber(),Z&&(le=Nt-1-le),Be=Ie(he,Nt),pe=Be[1].toJSNumber(),ue&&(pe=Nt-1-pe),ne=be[0],he=Be[0],Ce.push(z(le,pe));for(var ze=z(Z?1:0,ue?1:0)!==0?r(-1):r(0),Et=Ce.length-1;Et>=0;Et-=1)ze=ze.multiply(Nt).add(r(Ce[Et]));return ze}h.prototype.not=function(){return this.negate().prev()},E.prototype.not=O.prototype.not=h.prototype.not,h.prototype.and=function(v){return zt(this,v,function(R,z){return R&z})},E.prototype.and=O.prototype.and=h.prototype.and,h.prototype.or=function(v){return zt(this,v,function(R,z){return R|z})},E.prototype.or=O.prototype.or=h.prototype.or,h.prototype.xor=function(v){return zt(this,v,function(R,z){return R^z})},E.prototype.xor=O.prototype.xor=h.prototype.xor;var Yt=1<<30,Qn=(l&-l)*(l&-l)|Yt;function Rt(v){var R=v.value,z=typeof R=="number"?R|Yt:typeof R=="bigint"?R|BigInt(Yt):R[0]+R[1]*l|Qn;return z&-z}function At(v,R){if(R.compareTo(v)<=0){var z=At(v,R.square(R)),Z=z.p,ue=z.e,ne=Z.multiply(R);return ne.compareTo(v)<=0?{p:ne,e:ue*2+1}:{p:Z,e:ue*2}}return{p:r(1),e:0}}h.prototype.bitLength=function(){var v=this;return v.compareTo(r(0))<0&&(v=v.negate().subtract(r(1))),v.compareTo(r(0))===0?r(0):r(At(v,r(2)).e).add(r(1))},E.prototype.bitLength=O.prototype.bitLength=h.prototype.bitLength;function In(v,R){return v=Ne(v),R=Ne(R),v.greater(R)?v:R}function at(v,R){return v=Ne(v),R=Ne(R),v.lesser(R)?v:R}function an(v,R){if(v=Ne(v).abs(),R=Ne(R).abs(),v.equals(R))return v;if(v.isZero())return R;if(R.isZero())return v;for(var z=A[1],Z,ue;v.isEven()&&R.isEven();)Z=at(Rt(v),Rt(R)),v=v.divide(Z),R=R.divide(Z),z=z.multiply(Z);for(;v.isEven();)v=v.divide(Rt(v));do{for(;R.isEven();)R=R.divide(Rt(R));v.greater(R)&&(ue=R,R=v,v=ue),R=R.subtract(v)}while(!R.isZero());return z.isUnit()?v:v.multiply(z)}function di(v,R){return v=Ne(v).abs(),R=Ne(R).abs(),v.divide(an(v,R)).multiply(R)}function ht(v,R,z){v=Ne(v),R=Ne(R);var Z=z||Math.random,ue=at(v,R),ne=In(v,R),he=ne.subtract(ue).add(1);if(he.isSmall)return ue.add(Math.floor(Z()*he));for(var le=ut(he,l).value,pe=[],be=!0,Be=0;Be<le.length;Be++){var Ce=be?le[Be]+(Be+1<le.length?le[Be+1]/l:0):l,ze=B(Z()*Ce);pe.push(ze),ze<le[Be]&&(be=!1)}return ue.add(A.fromArray(pe,l,!1))}var gn=function(v,R,z,Z){z=z||S,v=String(v),Z||(v=v.toLowerCase(),z=z.toLowerCase());var ue=v.length,ne,he=Math.abs(R),le={};for(ne=0;ne<z.length;ne++)le[z[ne]]=ne;for(ne=0;ne<ue;ne++){var pe=v[ne];if(pe!=="-"&&pe in le&&le[pe]>=he){if(pe==="1"&&he===1)continue;throw new Error(pe+" is not a valid digit in base "+R+".")}}R=Ne(R);var be=[],Be=v[0]==="-";for(ne=Be?1:0;ne<v.length;ne++){var pe=v[ne];if(pe in le)be.push(Ne(le[pe]));else if(pe==="<"){var Ce=ne;do ne++;while(v[ne]!==">"&&ne<v.length);be.push(Ne(v.slice(Ce+1,ne)))}else throw new Error(pe+" is not a valid character")}return Mn(be,R,Be)};function Mn(v,R,z){var Z=A[0],ue=A[1],ne;for(ne=v.length-1;ne>=0;ne--)Z=Z.add(v[ne].times(ue)),ue=ue.times(R);return z?Z.negate():Z}function en(v,R){return R=R||S,v<R.length?R[v]:"<"+v+">"}function ut(v,R){if(R=r(R),R.isZero()){if(v.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(R.equals(-1)){if(v.isZero())return{value:[0],isNegative:!1};if(v.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-v.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var z=Array.apply(null,Array(v.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return z.unshift([1]),{value:[].concat.apply([],z),isNegative:!1}}var Z=!1;if(v.isNegative()&&R.isPositive()&&(Z=!0,v=v.abs()),R.isUnit())return v.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(v.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:Z};for(var ue=[],ne=v,he;ne.isNegative()||ne.compareAbs(R)>=0;){he=ne.divmod(R),ne=he.quotient;var le=he.remainder;le.isNegative()&&(le=R.minus(le).abs(),ne=ne.next()),ue.push(le.toJSNumber())}return ue.push(ne.toJSNumber()),{value:ue.reverse(),isNegative:Z}}function cn(v,R,z){var Z=ut(v,R);return(Z.isNegative?"-":"")+Z.value.map(function(ue){return en(ue,z)}).join("")}h.prototype.toArray=function(v){return ut(this,v)},O.prototype.toArray=function(v){return ut(this,v)},E.prototype.toArray=function(v){return ut(this,v)},h.prototype.toString=function(v,R){if(v===T&&(v=10),v!==10)return cn(this,v,R);for(var z=this.value,Z=z.length,ue=String(z[--Z]),ne="0000000",he;--Z>=0;)he=String(z[Z]),ue+=ne.slice(he.length)+he;var le=this.sign?"-":"";return le+ue},O.prototype.toString=function(v,R){return v===T&&(v=10),v!=10?cn(this,v,R):String(this.value)},E.prototype.toString=O.prototype.toString,E.prototype.toJSON=h.prototype.toJSON=O.prototype.toJSON=function(){return this.toString()},h.prototype.valueOf=function(){return parseInt(this.toString(),10)},h.prototype.toJSNumber=h.prototype.valueOf,O.prototype.valueOf=function(){return this.value},O.prototype.toJSNumber=O.prototype.valueOf,E.prototype.valueOf=E.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};function pn(v){if(C(+v)){var R=+v;if(R===B(R))return f?new E(BigInt(R)):new O(R);throw new Error("Invalid integer: "+v)}var z=v[0]==="-";z&&(v=v.slice(1));var Z=v.split(/e/i);if(Z.length>2)throw new Error("Invalid integer: "+Z.join("e"));if(Z.length===2){var ue=Z[1];if(ue[0]==="+"&&(ue=ue.slice(1)),ue=+ue,ue!==B(ue)||!C(ue))throw new Error("Invalid integer: "+ue+" is not a valid exponent.");var ne=Z[0],he=ne.indexOf(".");if(he>=0&&(ue-=ne.length-he-1,ne=ne.slice(0,he)+ne.slice(he+1)),ue<0)throw new Error("Cannot include negative exponent part for integers");ne+=new Array(ue+1).join("0"),v=ne}var le=/^([0-9][0-9]*)$/.test(v);if(!le)throw new Error("Invalid integer: "+v);if(f)return new E(BigInt(z?"-"+v:v));for(var pe=[],be=v.length,Be=c,Ce=be-Be;be>0;)pe.push(+v.slice(Ce,be)),Ce-=Be,Ce<0&&(Ce=0),be-=Be;return w(pe),new h(pe,z)}function hi(v){if(f)return new E(BigInt(v));if(C(v)){if(v!==B(v))throw new Error(v+" is not an integer.");return new O(v)}return pn(v.toString())}function Ne(v){return typeof v=="number"?hi(v):typeof v=="string"?pn(v):typeof v=="bigint"?new E(v):v}for(var tn=0;tn<1e3;tn++)A[tn]=Ne(tn),tn>0&&(A[-tn]=Ne(-tn));return A.one=A[1],A.zero=A[0],A.minusOne=A[-1],A.max=In,A.min=at,A.gcd=an,A.lcm=di,A.isInstance=function(v){return v instanceof h||v instanceof O||v instanceof E},A.randBetween=ht,A.fromArray=function(v,R,z){return Mn(v.map(Ne),Ne(R||10),z)},A}();ee.hasOwnProperty("exports")&&(ee.exports=r),a=function(){return r}.call(n,o,n,ee),a!==void 0&&(ee.exports=a)},93776:function(ee,n,o){var a;(function(r){"use strict";var T=9e15,l=1e9,c="0123456789abcdef",y="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",N="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",S={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-T,maxE:T,crypto:!1},f,A,h,O,E=!0,C="[DecimalError] ",I=C+"Invalid argument: ",L=C+"Precision limit exceeded",w=C+"crypto unavailable",P="[object Decimal]",B=Math.floor,K=Math.pow,Y=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,V=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,U=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,H=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,G=1e7,M=7,te=9007199254740991,ie=y.length-1,re=N.length-1,J={toStringTag:P};J.absoluteValue=J.abs=function(){var u=new this.constructor(this);return u.s<0&&(u.s=1),ve(u)},J.ceil=function(){return ve(new this.constructor(this),this.e+1,2)},J.clampedTo=J.clamp=function(u,d){var g,p=this,b=p.constructor;if(u=new b(u),d=new b(d),!u.s||!d.s)return new b(NaN);if(u.gt(d))throw Error(I+d);return g=p.cmp(u),g<0?u:p.cmp(d)>0?d:new b(p)},J.comparedTo=J.cmp=function(u){var d,g,p,b,_=this,W=_.d,X=(u=new _.constructor(u)).d,q=_.s,$=u.s;if(!W||!X)return!q||!$?NaN:q!==$?q:W===X?0:!W^q<0?1:-1;if(!W[0]||!X[0])return W[0]?q:X[0]?-$:0;if(q!==$)return q;if(_.e!==u.e)return _.e>u.e^q<0?1:-1;for(p=W.length,b=X.length,d=0,g=p<b?p:b;d<g;++d)if(W[d]!==X[d])return W[d]>X[d]^q<0?1:-1;return p===b?0:p>b^q<0?1:-1},J.cosine=J.cos=function(){var u,d,g=this,p=g.constructor;return g.d?g.d[0]?(u=p.precision,d=p.rounding,p.precision=u+Math.max(g.e,g.sd())+M,p.rounding=1,g=Qe(p,Mn(p,g)),p.precision=u,p.rounding=d,ve(O==2||O==3?g.neg():g,u,d,!0)):new p(1):new p(NaN)},J.cubeRoot=J.cbrt=function(){var u,d,g,p,b,_,W,X,q,$,oe=this,ae=oe.constructor;if(!oe.isFinite()||oe.isZero())return new ae(oe);for(E=!1,_=oe.s*K(oe.s*oe,1/3),!_||Math.abs(_)==1/0?(g=me(oe.d),u=oe.e,(_=(u-g.length+1)%3)&&(g+=_==1||_==-2?"0":"00"),_=K(g,1/3),u=B((u+1)/3)-(u%3==(u<0?-1:2)),_==1/0?g="5e"+u:(g=_.toExponential(),g=g.slice(0,g.indexOf("e")+1)+u),p=new ae(g),p.s=oe.s):p=new ae(_.toString()),W=(u=ae.precision)+3;;)if(X=p,q=X.times(X).times(X),$=q.plus(oe),p=Ie($.plus(oe).times(X),$.plus(q),W+2,1),me(X.d).slice(0,W)===(g=me(p.d)).slice(0,W))if(g=g.slice(W-3,W+1),g=="9999"||!b&&g=="4999"){if(!b&&(ve(X,u+1,0),X.times(X).times(X).eq(oe))){p=X;break}W+=4,b=1}else{(!+g||!+g.slice(1)&&g.charAt(0)=="5")&&(ve(p,u+1,1),d=!p.times(p).times(p).eq(oe));break}return E=!0,ve(p,u,ae.rounding,d)},J.decimalPlaces=J.dp=function(){var u,d=this.d,g=NaN;if(d){if(u=d.length-1,g=(u-B(this.e/M))*M,u=d[u],u)for(;u%10==0;u/=10)g--;g<0&&(g=0)}return g},J.dividedBy=J.div=function(u){return Ie(this,new this.constructor(u))},J.dividedToIntegerBy=J.divToInt=function(u){var d=this,g=d.constructor;return ve(Ie(d,new g(u),0,1,1),g.precision,g.rounding)},J.equals=J.eq=function(u){return this.cmp(u)===0},J.floor=function(){return ve(new this.constructor(this),this.e+1,3)},J.greaterThan=J.gt=function(u){return this.cmp(u)>0},J.greaterThanOrEqualTo=J.gte=function(u){var d=this.cmp(u);return d==1||d===0},J.hyperbolicCosine=J.cosh=function(){var u,d,g,p,b,_=this,W=_.constructor,X=new W(1);if(!_.isFinite())return new W(_.s?1/0:NaN);if(_.isZero())return X;g=W.precision,p=W.rounding,W.precision=g+Math.max(_.e,_.sd())+4,W.rounding=1,b=_.d.length,b<32?(u=Math.ceil(b/3),d=(1/gn(4,u)).toString()):(u=16,d="2.3283064365386962890625e-10"),_=ht(W,1,_.times(d),new W(1),!0);for(var q,$=u,oe=new W(8);$--;)q=_.times(_),_=X.minus(q.times(oe.minus(q.times(oe))));return ve(_,W.precision=g,W.rounding=p,!0)},J.hyperbolicSine=J.sinh=function(){var u,d,g,p,b=this,_=b.constructor;if(!b.isFinite()||b.isZero())return new _(b);if(d=_.precision,g=_.rounding,_.precision=d+Math.max(b.e,b.sd())+4,_.rounding=1,p=b.d.length,p<3)b=ht(_,2,b,b,!0);else{u=1.4*Math.sqrt(p),u=u>16?16:u|0,b=b.times(1/gn(5,u)),b=ht(_,2,b,b,!0);for(var W,X=new _(5),q=new _(16),$=new _(20);u--;)W=b.times(b),b=b.times(X.plus(W.times(q.times(W).plus($))))}return _.precision=d,_.rounding=g,ve(b,d,g,!0)},J.hyperbolicTangent=J.tanh=function(){var u,d,g=this,p=g.constructor;return g.isFinite()?g.isZero()?new p(g):(u=p.precision,d=p.rounding,p.precision=u+7,p.rounding=1,Ie(g.sinh(),g.cosh(),p.precision=u,p.rounding=d)):new p(g.s)},J.inverseCosine=J.acos=function(){var u,d=this,g=d.constructor,p=d.abs().cmp(1),b=g.precision,_=g.rounding;return p!==-1?p===0?d.isNeg()?tt(g,b,_):new g(0):new g(NaN):d.isZero()?tt(g,b+4,_).times(.5):(g.precision=b+6,g.rounding=1,d=d.asin(),u=tt(g,b+4,_).times(.5),g.precision=b,g.rounding=_,u.minus(d))},J.inverseHyperbolicCosine=J.acosh=function(){var u,d,g=this,p=g.constructor;return g.lte(1)?new p(g.eq(1)?0:NaN):g.isFinite()?(u=p.precision,d=p.rounding,p.precision=u+Math.max(Math.abs(g.e),g.sd())+4,p.rounding=1,E=!1,g=g.times(g).minus(1).sqrt().plus(g),E=!0,p.precision=u,p.rounding=d,g.ln()):new p(g)},J.inverseHyperbolicSine=J.asinh=function(){var u,d,g=this,p=g.constructor;return!g.isFinite()||g.isZero()?new p(g):(u=p.precision,d=p.rounding,p.precision=u+2*Math.max(Math.abs(g.e),g.sd())+6,p.rounding=1,E=!1,g=g.times(g).plus(1).sqrt().plus(g),E=!0,p.precision=u,p.rounding=d,g.ln())},J.inverseHyperbolicTangent=J.atanh=function(){var u,d,g,p,b=this,_=b.constructor;return b.isFinite()?b.e>=0?new _(b.abs().eq(1)?b.s/0:b.isZero()?b:NaN):(u=_.precision,d=_.rounding,p=b.sd(),Math.max(p,u)<2*-b.e-1?ve(new _(b),u,d,!0):(_.precision=g=p-b.e,b=Ie(b.plus(1),new _(1).minus(b),g+u,1),_.precision=u+4,_.rounding=1,b=b.ln(),_.precision=u,_.rounding=d,b.times(.5))):new _(NaN)},J.inverseSine=J.asin=function(){var u,d,g,p,b=this,_=b.constructor;return b.isZero()?new _(b):(d=b.abs().cmp(1),g=_.precision,p=_.rounding,d!==-1?d===0?(u=tt(_,g+4,p).times(.5),u.s=b.s,u):new _(NaN):(_.precision=g+6,_.rounding=1,b=b.div(new _(1).minus(b.times(b)).sqrt().plus(1)).atan(),_.precision=g,_.rounding=p,b.times(2)))},J.inverseTangent=J.atan=function(){var u,d,g,p,b,_,W,X,q,$=this,oe=$.constructor,ae=oe.precision,ge=oe.rounding;if($.isFinite()){if($.isZero())return new oe($);if($.abs().eq(1)&&ae+4<=re)return W=tt(oe,ae+4,ge).times(.25),W.s=$.s,W}else{if(!$.s)return new oe(NaN);if(ae+4<=re)return W=tt(oe,ae+4,ge).times(.5),W.s=$.s,W}for(oe.precision=X=ae+10,oe.rounding=1,g=Math.min(28,X/M+2|0),u=g;u;--u)$=$.div($.times($).plus(1).sqrt().plus(1));for(E=!1,d=Math.ceil(X/M),p=1,q=$.times($),W=new oe($),b=$;u!==-1;)if(b=b.times(q),_=W.minus(b.div(p+=2)),b=b.times(q),W=_.plus(b.div(p+=2)),W.d[d]!==void 0)for(u=d;W.d[u]===_.d[u]&&u--;);return g&&(W=W.times(2<<g-1)),E=!0,ve(W,oe.precision=ae,oe.rounding=ge,!0)},J.isFinite=function(){return!!this.d},J.isInteger=J.isInt=function(){return!!this.d&&B(this.e/M)>this.d.length-2},J.isNaN=function(){return!this.s},J.isNegative=J.isNeg=function(){return this.s<0},J.isPositive=J.isPos=function(){return this.s>0},J.isZero=function(){return!!this.d&&this.d[0]===0},J.lessThan=J.lt=function(u){return this.cmp(u)<0},J.lessThanOrEqualTo=J.lte=function(u){return this.cmp(u)<1},J.logarithm=J.log=function(u){var d,g,p,b,_,W,X,q,$=this,oe=$.constructor,ae=oe.precision,ge=oe.rounding,we=5;if(u==null)u=new oe(10),d=!0;else{if(u=new oe(u),g=u.d,u.s<0||!g||!g[0]||u.eq(1))return new oe(NaN);d=u.eq(10)}if(g=$.d,$.s<0||!g||!g[0]||$.eq(1))return new oe(g&&!g[0]?-1/0:$.s!=1?NaN:g?0:1/0);if(d)if(g.length>1)_=!0;else{for(b=g[0];b%10===0;)b/=10;_=b!==1}if(E=!1,X=ae+we,W=At($,X),p=d?St(oe,X+10):At(u,X),q=Ie(W,p,X,1),Te(q.d,b=ae,ge))do if(X+=10,W=At($,X),p=d?St(oe,X+10):At(u,X),q=Ie(W,p,X,1),!_){+me(q.d).slice(b+1,b+15)+1==1e14&&(q=ve(q,ae+1,0));break}while(Te(q.d,b+=10,ge));return E=!0,ve(q,ae,ge)},J.minus=J.sub=function(u){var d,g,p,b,_,W,X,q,$,oe,ae,ge,we=this,We=we.constructor;if(u=new We(u),!we.d||!u.d)return!we.s||!u.s?u=new We(NaN):we.d?u.s=-u.s:u=new We(u.d||we.s!==u.s?we:NaN),u;if(we.s!=u.s)return u.s=-u.s,we.plus(u);if($=we.d,ge=u.d,X=We.precision,q=We.rounding,!$[0]||!ge[0]){if(ge[0])u.s=-u.s;else if($[0])u=new We(we);else return new We(q===3?-0:0);return E?ve(u,X,q):u}if(g=B(u.e/M),oe=B(we.e/M),$=$.slice(),_=oe-g,_){for(ae=_<0,ae?(d=$,_=-_,W=ge.length):(d=ge,g=oe,W=$.length),p=Math.max(Math.ceil(X/M),W)+2,_>p&&(_=p,d.length=1),d.reverse(),p=_;p--;)d.push(0);d.reverse()}else{for(p=$.length,W=ge.length,ae=p<W,ae&&(W=p),p=0;p<W;p++)if($[p]!=ge[p]){ae=$[p]<ge[p];break}_=0}for(ae&&(d=$,$=ge,ge=d,u.s=-u.s),W=$.length,p=ge.length-W;p>0;--p)$[W++]=0;for(p=ge.length;p>_;){if($[--p]<ge[p]){for(b=p;b&&$[--b]===0;)$[b]=G-1;--$[b],$[p]+=G}$[p]-=ge[p]}for(;$[--W]===0;)$.pop();for(;$[0]===0;$.shift())--g;return $[0]?(u.d=$,u.e=un($,g),E?ve(u,X,q):u):new We(q===3?-0:0)},J.modulo=J.mod=function(u){var d,g=this,p=g.constructor;return u=new p(u),!g.d||!u.s||u.d&&!u.d[0]?new p(NaN):!u.d||g.d&&!g.d[0]?ve(new p(g),p.precision,p.rounding):(E=!1,p.modulo==9?(d=Ie(g,u.abs(),0,3,1),d.s*=u.s):d=Ie(g,u,0,p.modulo,1),d=d.times(u),E=!0,g.minus(d))},J.naturalExponential=J.exp=function(){return Rt(this)},J.naturalLogarithm=J.ln=function(){return At(this)},J.negated=J.neg=function(){var u=new this.constructor(this);return u.s=-u.s,ve(u)},J.plus=J.add=function(u){var d,g,p,b,_,W,X,q,$,oe,ae=this,ge=ae.constructor;if(u=new ge(u),!ae.d||!u.d)return!ae.s||!u.s?u=new ge(NaN):ae.d||(u=new ge(u.d||ae.s===u.s?ae:NaN)),u;if(ae.s!=u.s)return u.s=-u.s,ae.minus(u);if($=ae.d,oe=u.d,X=ge.precision,q=ge.rounding,!$[0]||!oe[0])return oe[0]||(u=new ge(ae)),E?ve(u,X,q):u;if(_=B(ae.e/M),p=B(u.e/M),$=$.slice(),b=_-p,b){for(b<0?(g=$,b=-b,W=oe.length):(g=oe,p=_,W=$.length),_=Math.ceil(X/M),W=_>W?_+1:W+1,b>W&&(b=W,g.length=1),g.reverse();b--;)g.push(0);g.reverse()}for(W=$.length,b=oe.length,W-b<0&&(b=W,g=oe,oe=$,$=g),d=0;b;)d=($[--b]=$[b]+oe[b]+d)/G|0,$[b]%=G;for(d&&($.unshift(d),++p),W=$.length;$[--W]==0;)$.pop();return u.d=$,u.e=un($,p),E?ve(u,X,q):u},J.precision=J.sd=function(u){var d,g=this;if(u!==void 0&&u!==!!u&&u!==1&&u!==0)throw Error(I+u);return g.d?(d=Nt(g.d),u&&g.e+1>d&&(d=g.e+1)):d=NaN,d},J.round=function(){var u=this,d=u.constructor;return ve(new d(u),u.e+1,d.rounding)},J.sine=J.sin=function(){var u,d,g=this,p=g.constructor;return g.isFinite()?g.isZero()?new p(g):(u=p.precision,d=p.rounding,p.precision=u+Math.max(g.e,g.sd())+M,p.rounding=1,g=di(p,Mn(p,g)),p.precision=u,p.rounding=d,ve(O>2?g.neg():g,u,d,!0)):new p(NaN)},J.squareRoot=J.sqrt=function(){var u,d,g,p,b,_,W=this,X=W.d,q=W.e,$=W.s,oe=W.constructor;if($!==1||!X||!X[0])return new oe(!$||$<0&&(!X||X[0])?NaN:X?W:1/0);for(E=!1,$=Math.sqrt(+W),$==0||$==1/0?(d=me(X),(d.length+q)%2==0&&(d+="0"),$=Math.sqrt(d),q=B((q+1)/2)-(q<0||q%2),$==1/0?d="5e"+q:(d=$.toExponential(),d=d.slice(0,d.indexOf("e")+1)+q),p=new oe(d)):p=new oe($.toString()),g=(q=oe.precision)+3;;)if(_=p,p=_.plus(Ie(W,_,g+2,1)).times(.5),me(_.d).slice(0,g)===(d=me(p.d)).slice(0,g))if(d=d.slice(g-3,g+1),d=="9999"||!b&&d=="4999"){if(!b&&(ve(_,q+1,0),_.times(_).eq(W))){p=_;break}g+=4,b=1}else{(!+d||!+d.slice(1)&&d.charAt(0)=="5")&&(ve(p,q+1,1),u=!p.times(p).eq(W));break}return E=!0,ve(p,q,oe.rounding,u)},J.tangent=J.tan=function(){var u,d,g=this,p=g.constructor;return g.isFinite()?g.isZero()?new p(g):(u=p.precision,d=p.rounding,p.precision=u+10,p.rounding=1,g=g.sin(),g.s=1,g=Ie(g,new p(1).minus(g.times(g)).sqrt(),u+10,0),p.precision=u,p.rounding=d,ve(O==2||O==4?g.neg():g,u,d,!0)):new p(NaN)},J.times=J.mul=function(u){var d,g,p,b,_,W,X,q,$,oe=this,ae=oe.constructor,ge=oe.d,we=(u=new ae(u)).d;if(u.s*=oe.s,!ge||!ge[0]||!we||!we[0])return new ae(!u.s||ge&&!ge[0]&&!we||we&&!we[0]&&!ge?NaN:!ge||!we?u.s/0:u.s*0);for(g=B(oe.e/M)+B(u.e/M),q=ge.length,$=we.length,q<$&&(_=ge,ge=we,we=_,W=q,q=$,$=W),_=[],W=q+$,p=W;p--;)_.push(0);for(p=$;--p>=0;){for(d=0,b=q+p;b>p;)X=_[b]+we[p]*ge[b-p-1]+d,_[b--]=X%G|0,d=X/G|0;_[b]=(_[b]+d)%G|0}for(;!_[--W];)_.pop();return d?++g:_.shift(),u.d=_,u.e=un(_,g),E?ve(u,ae.precision,ae.rounding):u},J.toBinary=function(u,d){return en(this,2,u,d)},J.toDecimalPlaces=J.toDP=function(u,d){var g=this,p=g.constructor;return g=new p(g),u===void 0?g:(Ee(u,0,l),d===void 0?d=p.rounding:Ee(d,0,8),ve(g,u+g.e+1,d))},J.toExponential=function(u,d){var g,p=this,b=p.constructor;return u===void 0?g=wt(p,!0):(Ee(u,0,l),d===void 0?d=b.rounding:Ee(d,0,8),p=ve(new b(p),u+1,d),g=wt(p,!0,u+1)),p.isNeg()&&!p.isZero()?"-"+g:g},J.toFixed=function(u,d){var g,p,b=this,_=b.constructor;return u===void 0?g=wt(b):(Ee(u,0,l),d===void 0?d=_.rounding:Ee(d,0,8),p=ve(new _(b),u+b.e+1,d),g=wt(p,!1,u+p.e+1)),b.isNeg()&&!b.isZero()?"-"+g:g},J.toFraction=function(u){var d,g,p,b,_,W,X,q,$,oe,ae,ge,we=this,We=we.d,Pe=we.constructor;if(!We)return new Pe(we);if($=g=new Pe(1),p=q=new Pe(0),d=new Pe(p),_=d.e=Nt(We)-we.e-1,W=_%M,d.d[0]=K(10,W<0?M+W:W),u==null)u=_>0?d:$;else{if(X=new Pe(u),!X.isInt()||X.lt($))throw Error(I+X);u=X.gt(d)?_>0?d:$:X}for(E=!1,X=new Pe(me(We)),oe=Pe.precision,Pe.precision=_=We.length*M*2;ae=Ie(X,d,0,1,1),b=g.plus(ae.times(p)),b.cmp(u)!=1;)g=p,p=b,b=$,$=q.plus(ae.times(b)),q=b,b=d,d=X.minus(ae.times(b)),X=b;return b=Ie(u.minus(g),p,0,1,1),q=q.plus(b.times($)),g=g.plus(b.times(p)),q.s=$.s=we.s,ge=Ie($,p,_,1).minus(we).abs().cmp(Ie(q,g,_,1).minus(we).abs())<1?[$,p]:[q,g],Pe.precision=oe,E=!0,ge},J.toHexadecimal=J.toHex=function(u,d){return en(this,16,u,d)},J.toNearest=function(u,d){var g=this,p=g.constructor;if(g=new p(g),u==null){if(!g.d)return g;u=new p(1),d=p.rounding}else{if(u=new p(u),d===void 0?d=p.rounding:Ee(d,0,8),!g.d)return u.s?g:u;if(!u.d)return u.s&&(u.s=g.s),u}return u.d[0]?(E=!1,g=Ie(g,u,0,d,1).times(u),E=!0,ve(g)):(u.s=g.s,g=u),g},J.toNumber=function(){return+this},J.toOctal=function(u,d){return en(this,8,u,d)},J.toPower=J.pow=function(u){var d,g,p,b,_,W,X=this,q=X.constructor,$=+(u=new q(u));if(!X.d||!u.d||!X.d[0]||!u.d[0])return new q(K(+X,$));if(X=new q(X),X.eq(1))return X;if(p=q.precision,_=q.rounding,u.eq(1))return ve(X,p,_);if(d=B(u.e/M),d>=u.d.length-1&&(g=$<0?-$:$)<=te)return b=zt(q,X,g,p),u.s<0?new q(1).div(b):ve(b,p,_);if(W=X.s,W<0){if(d<u.d.length-1)return new q(NaN);if((u.d[d]&1)==0&&(W=1),X.e==0&&X.d[0]==1&&X.d.length==1)return X.s=W,X}return g=K(+X,$),d=g==0||!isFinite(g)?B($*(Math.log("0."+me(X.d))/Math.LN10+X.e+1)):new q(g+"").e,d>q.maxE+1||d<q.minE-1?new q(d>0?W/0:0):(E=!1,q.rounding=X.s=1,g=Math.min(12,(d+"").length),b=Rt(u.times(At(X,p+g)),p),b.d&&(b=ve(b,p+5,1),Te(b.d,p,_)&&(d=p+10,b=ve(Rt(u.times(At(X,d+g)),d),d+5,1),+me(b.d).slice(p+1,p+15)+1==1e14&&(b=ve(b,p+1,0)))),b.s=W,E=!0,q.rounding=_,ve(b,p,_))},J.toPrecision=function(u,d){var g,p=this,b=p.constructor;return u===void 0?g=wt(p,p.e<=b.toExpNeg||p.e>=b.toExpPos):(Ee(u,1,l),d===void 0?d=b.rounding:Ee(d,0,8),p=ve(new b(p),u,d),g=wt(p,u<=p.e||p.e<=b.toExpNeg,u)),p.isNeg()&&!p.isZero()?"-"+g:g},J.toSignificantDigits=J.toSD=function(u,d){var g=this,p=g.constructor;return u===void 0?(u=p.precision,d=p.rounding):(Ee(u,1,l),d===void 0?d=p.rounding:Ee(d,0,8)),ve(new p(g),u,d)},J.toString=function(){var u=this,d=u.constructor,g=wt(u,u.e<=d.toExpNeg||u.e>=d.toExpPos);return u.isNeg()&&!u.isZero()?"-"+g:g},J.truncated=J.trunc=function(){return ve(new this.constructor(this),this.e+1,1)},J.valueOf=J.toJSON=function(){var u=this,d=u.constructor,g=wt(u,u.e<=d.toExpNeg||u.e>=d.toExpPos);return u.isNeg()?"-"+g:g};function me(u){var d,g,p,b=u.length-1,_="",W=u[0];if(b>0){for(_+=W,d=1;d<b;d++)p=u[d]+"",g=M-p.length,g&&(_+=Ft(g)),_+=p;W=u[d],p=W+"",g=M-p.length,g&&(_+=Ft(g))}else if(W===0)return"0";for(;W%10===0;)W/=10;return _+W}function Ee(u,d,g){if(u!==~~u||u<d||u>g)throw Error(I+u)}function Te(u,d,g,p){var b,_,W,X;for(_=u[0];_>=10;_/=10)--d;return--d<0?(d+=M,b=0):(b=Math.ceil((d+1)/M),d%=M),_=K(10,M-d),X=u[b]%_|0,p==null?d<3?(d==0?X=X/100|0:d==1&&(X=X/10|0),W=g<4&&X==99999||g>3&&X==49999||X==5e4||X==0):W=(g<4&&X+1==_||g>3&&X+1==_/2)&&(u[b+1]/_/100|0)==K(10,d-2)-1||(X==_/2||X==0)&&(u[b+1]/_/100|0)==0:d<4?(d==0?X=X/1e3|0:d==1?X=X/100|0:d==2&&(X=X/10|0),W=(p||g<4)&&X==9999||!p&&g>3&&X==4999):W=((p||g<4)&&X+1==_||!p&&g>3&&X+1==_/2)&&(u[b+1]/_/1e3|0)==K(10,d-3)-1,W}function Me(u,d,g){for(var p,b=[0],_,W=0,X=u.length;W<X;){for(_=b.length;_--;)b[_]*=d;for(b[0]+=c.indexOf(u.charAt(W++)),p=0;p<b.length;p++)b[p]>g-1&&(b[p+1]===void 0&&(b[p+1]=0),b[p+1]+=b[p]/g|0,b[p]%=g)}return b.reverse()}function Qe(u,d){var g,p,b;if(d.isZero())return d;p=d.d.length,p<32?(g=Math.ceil(p/3),b=(1/gn(4,g)).toString()):(g=16,b="2.3283064365386962890625e-10"),u.precision+=g,d=ht(u,1,d.times(b),new u(1));for(var _=g;_--;){var W=d.times(d);d=W.times(W).minus(W).times(8).plus(1)}return u.precision-=g,d}var Ie=function(){function u(p,b,_){var W,X=0,q=p.length;for(p=p.slice();q--;)W=p[q]*b+X,p[q]=W%_|0,X=W/_|0;return X&&p.unshift(X),p}function d(p,b,_,W){var X,q;if(_!=W)q=_>W?1:-1;else for(X=q=0;X<_;X++)if(p[X]!=b[X]){q=p[X]>b[X]?1:-1;break}return q}function g(p,b,_,W){for(var X=0;_--;)p[_]-=X,X=p[_]<b[_]?1:0,p[_]=X*W+p[_]-b[_];for(;!p[0]&&p.length>1;)p.shift()}return function(p,b,_,W,X,q){var $,oe,ae,ge,we,We,Pe,yt,xe,Bt,Xe,lt,Hn,Mt,Ei,Vn,ln,qn,Ut,jn,Wn=p.constructor,Gn=p.s==b.s?1:-1,gt=p.d,Je=b.d;if(!gt||!gt[0]||!Je||!Je[0])return new Wn(!p.s||!b.s||(gt?Je&&gt[0]==Je[0]:!Je)?NaN:gt&&gt[0]==0||!Je?Gn*0:Gn/0);for(q?(we=1,oe=p.e-b.e):(q=G,we=M,oe=B(p.e/we)-B(b.e/we)),Ut=Je.length,ln=gt.length,xe=new Wn(Gn),Bt=xe.d=[],ae=0;Je[ae]==(gt[ae]||0);ae++);if(Je[ae]>(gt[ae]||0)&&oe--,_==null?(Mt=_=Wn.precision,W=Wn.rounding):X?Mt=_+(p.e-b.e)+1:Mt=_,Mt<0)Bt.push(1),We=!0;else{if(Mt=Mt/we+2|0,ae=0,Ut==1){for(ge=0,Je=Je[0],Mt++;(ae<ln||ge)&&Mt--;ae++)Ei=ge*q+(gt[ae]||0),Bt[ae]=Ei/Je|0,ge=Ei%Je|0;We=ge||ae<ln}else{for(ge=q/(Je[0]+1)|0,ge>1&&(Je=u(Je,ge,q),gt=u(gt,ge,q),Ut=Je.length,ln=gt.length),Vn=Ut,Xe=gt.slice(0,Ut),lt=Xe.length;lt<Ut;)Xe[lt++]=0;jn=Je.slice(),jn.unshift(0),qn=Je[0],Je[1]>=q/2&&++qn;do ge=0,$=d(Je,Xe,Ut,lt),$<0?(Hn=Xe[0],Ut!=lt&&(Hn=Hn*q+(Xe[1]||0)),ge=Hn/qn|0,ge>1?(ge>=q&&(ge=q-1),Pe=u(Je,ge,q),yt=Pe.length,lt=Xe.length,$=d(Pe,Xe,yt,lt),$==1&&(ge--,g(Pe,Ut<yt?jn:Je,yt,q))):(ge==0&&($=ge=1),Pe=Je.slice()),yt=Pe.length,yt<lt&&Pe.unshift(0),g(Xe,Pe,lt,q),$==-1&&(lt=Xe.length,$=d(Je,Xe,Ut,lt),$<1&&(ge++,g(Xe,Ut<lt?jn:Je,lt,q))),lt=Xe.length):$===0&&(ge++,Xe=[0]),Bt[ae++]=ge,$&&Xe[0]?Xe[lt++]=gt[Vn]||0:(Xe=[gt[Vn]],lt=1);while((Vn++<ln||Xe[0]!==void 0)&&Mt--);We=Xe[0]!==void 0}Bt[0]||Bt.shift()}if(we==1)xe.e=oe,A=We;else{for(ae=1,ge=Bt[0];ge>=10;ge/=10)ae++;xe.e=ae+oe*we-1,ve(xe,X?_+xe.e+1:_,W,We)}return xe}}();function ve(u,d,g,p){var b,_,W,X,q,$,oe,ae,ge,we=u.constructor;e:if(d!=null){if(ae=u.d,!ae)return u;for(b=1,X=ae[0];X>=10;X/=10)b++;if(_=d-b,_<0)_+=M,W=d,oe=ae[ge=0],q=oe/K(10,b-W-1)%10|0;else if(ge=Math.ceil((_+1)/M),X=ae.length,ge>=X)if(p){for(;X++<=ge;)ae.push(0);oe=q=0,b=1,_%=M,W=_-M+1}else break e;else{for(oe=X=ae[ge],b=1;X>=10;X/=10)b++;_%=M,W=_-M+b,q=W<0?0:oe/K(10,b-W-1)%10|0}if(p=p||d<0||ae[ge+1]!==void 0||(W<0?oe:oe%K(10,b-W-1)),$=g<4?(q||p)&&(g==0||g==(u.s<0?3:2)):q>5||q==5&&(g==4||p||g==6&&(_>0?W>0?oe/K(10,b-W):0:ae[ge-1])%10&1||g==(u.s<0?8:7)),d<1||!ae[0])return ae.length=0,$?(d-=u.e+1,ae[0]=K(10,(M-d%M)%M),u.e=-d||0):ae[0]=u.e=0,u;if(_==0?(ae.length=ge,X=1,ge--):(ae.length=ge+1,X=K(10,M-_),ae[ge]=W>0?(oe/K(10,b-W)%K(10,W)|0)*X:0),$)for(;;)if(ge==0){for(_=1,W=ae[0];W>=10;W/=10)_++;for(W=ae[0]+=X,X=1;W>=10;W/=10)X++;_!=X&&(u.e++,ae[0]==G&&(ae[0]=1));break}else{if(ae[ge]+=X,ae[ge]!=G)break;ae[ge--]=0,X=1}for(_=ae.length;ae[--_]===0;)ae.pop()}return E&&(u.e>we.maxE?(u.d=null,u.e=NaN):u.e<we.minE&&(u.e=0,u.d=[0])),u}function wt(u,d,g){if(!u.isFinite())return In(u);var p,b=u.e,_=me(u.d),W=_.length;return d?(g&&(p=g-W)>0?_=_.charAt(0)+"."+_.slice(1)+Ft(p):W>1&&(_=_.charAt(0)+"."+_.slice(1)),_=_+(u.e<0?"e":"e+")+u.e):b<0?(_="0."+Ft(-b-1)+_,g&&(p=g-W)>0&&(_+=Ft(p))):b>=W?(_+=Ft(b+1-W),g&&(p=g-b-1)>0&&(_=_+"."+Ft(p))):((p=b+1)<W&&(_=_.slice(0,p)+"."+_.slice(p)),g&&(p=g-W)>0&&(b+1===W&&(_+="."),_+=Ft(p))),_}function un(u,d){var g=u[0];for(d*=M;g>=10;g/=10)d++;return d}function St(u,d,g){if(d>ie)throw E=!0,g&&(u.precision=g),Error(L);return ve(new u(y),d,1,!0)}function tt(u,d,g){if(d>re)throw Error(L);return ve(new u(N),d,g,!0)}function Nt(u){var d=u.length-1,g=d*M+1;if(d=u[d],d){for(;d%10==0;d/=10)g--;for(d=u[0];d>=10;d/=10)g++}return g}function Ft(u){for(var d="";u--;)d+="0";return d}function zt(u,d,g,p){var b,_=new u(1),W=Math.ceil(p/M+4);for(E=!1;;){if(g%2&&(_=_.times(d),ut(_.d,W)&&(b=!0)),g=B(g/2),g===0){g=_.d.length-1,b&&_.d[g]===0&&++_.d[g];break}d=d.times(d),ut(d.d,W)}return E=!0,_}function Yt(u){return u.d[u.d.length-1]&1}function Qn(u,d,g){for(var p,b=new u(d[0]),_=0;++_<d.length;)if(p=new u(d[_]),p.s)b[g](p)&&(b=p);else{b=p;break}return b}function Rt(u,d){var g,p,b,_,W,X,q,$=0,oe=0,ae=0,ge=u.constructor,we=ge.rounding,We=ge.precision;if(!u.d||!u.d[0]||u.e>17)return new ge(u.d?u.d[0]?u.s<0?0:1/0:1:u.s?u.s<0?0:u:0/0);for(d==null?(E=!1,q=We):q=d,X=new ge(.03125);u.e>-2;)u=u.times(X),ae+=5;for(p=Math.log(K(2,ae))/Math.LN10*2+5|0,q+=p,g=_=W=new ge(1),ge.precision=q;;){if(_=ve(_.times(u),q,1),g=g.times(++oe),X=W.plus(Ie(_,g,q,1)),me(X.d).slice(0,q)===me(W.d).slice(0,q)){for(b=ae;b--;)W=ve(W.times(W),q,1);if(d==null)if($<3&&Te(W.d,q-p,we,$))ge.precision=q+=10,g=_=X=new ge(1),oe=0,$++;else return ve(W,ge.precision=We,we,E=!0);else return ge.precision=We,W}W=X}}function At(u,d){var g,p,b,_,W,X,q,$,oe,ae,ge,we=1,We=10,Pe=u,yt=Pe.d,xe=Pe.constructor,Bt=xe.rounding,Xe=xe.precision;if(Pe.s<0||!yt||!yt[0]||!Pe.e&&yt[0]==1&&yt.length==1)return new xe(yt&&!yt[0]?-1/0:Pe.s!=1?NaN:yt?0:Pe);if(d==null?(E=!1,oe=Xe):oe=d,xe.precision=oe+=We,g=me(yt),p=g.charAt(0),Math.abs(_=Pe.e)<15e14){for(;p<7&&p!=1||p==1&&g.charAt(1)>3;)Pe=Pe.times(u),g=me(Pe.d),p=g.charAt(0),we++;_=Pe.e,p>1?(Pe=new xe("0."+g),_++):Pe=new xe(p+"."+g.slice(1))}else return $=St(xe,oe+2,Xe).times(_+""),Pe=At(new xe(p+"."+g.slice(1)),oe-We).plus($),xe.precision=Xe,d==null?ve(Pe,Xe,Bt,E=!0):Pe;for(ae=Pe,q=W=Pe=Ie(Pe.minus(1),Pe.plus(1),oe,1),ge=ve(Pe.times(Pe),oe,1),b=3;;){if(W=ve(W.times(ge),oe,1),$=q.plus(Ie(W,new xe(b),oe,1)),me($.d).slice(0,oe)===me(q.d).slice(0,oe))if(q=q.times(2),_!==0&&(q=q.plus(St(xe,oe+2,Xe).times(_+""))),q=Ie(q,new xe(we),oe,1),d==null)if(Te(q.d,oe-We,Bt,X))xe.precision=oe+=We,$=W=Pe=Ie(ae.minus(1),ae.plus(1),oe,1),ge=ve(Pe.times(Pe),oe,1),b=X=1;else return ve(q,xe.precision=Xe,Bt,E=!0);else return xe.precision=Xe,q;q=$,b+=2}}function In(u){return String(u.s*u.s/0)}function at(u,d){var g,p,b;for((g=d.indexOf("."))>-1&&(d=d.replace(".","")),(p=d.search(/e/i))>0?(g<0&&(g=p),g+=+d.slice(p+1),d=d.substring(0,p)):g<0&&(g=d.length),p=0;d.charCodeAt(p)===48;p++);for(b=d.length;d.charCodeAt(b-1)===48;--b);if(d=d.slice(p,b),d){if(b-=p,u.e=g=g-p-1,u.d=[],p=(g+1)%M,g<0&&(p+=M),p<b){for(p&&u.d.push(+d.slice(0,p)),b-=M;p<b;)u.d.push(+d.slice(p,p+=M));d=d.slice(p),p=M-d.length}else p-=b;for(;p--;)d+="0";u.d.push(+d),E&&(u.e>u.constructor.maxE?(u.d=null,u.e=NaN):u.e<u.constructor.minE&&(u.e=0,u.d=[0]))}else u.e=0,u.d=[0];return u}function an(u,d){var g,p,b,_,W,X,q,$,oe;if(d.indexOf("_")>-1){if(d=d.replace(/(\d)_(?=\d)/g,"$1"),H.test(d))return at(u,d)}else if(d==="Infinity"||d==="NaN")return+d||(u.s=NaN),u.e=NaN,u.d=null,u;if(V.test(d))g=16,d=d.toLowerCase();else if(Y.test(d))g=2;else if(U.test(d))g=8;else throw Error(I+d);for(_=d.search(/p/i),_>0?(q=+d.slice(_+1),d=d.substring(2,_)):d=d.slice(2),_=d.indexOf("."),W=_>=0,p=u.constructor,W&&(d=d.replace(".",""),X=d.length,_=X-_,b=zt(p,new p(g),_,_*2)),$=Me(d,g,G),oe=$.length-1,_=oe;$[_]===0;--_)$.pop();return _<0?new p(u.s*0):(u.e=un($,oe),u.d=$,E=!1,W&&(u=Ie(u,b,X*4)),q&&(u=u.times(Math.abs(q)<54?K(2,q):f.pow(2,q))),E=!0,u)}function di(u,d){var g,p=d.d.length;if(p<3)return d.isZero()?d:ht(u,2,d,d);g=1.4*Math.sqrt(p),g=g>16?16:g|0,d=d.times(1/gn(5,g)),d=ht(u,2,d,d);for(var b,_=new u(5),W=new u(16),X=new u(20);g--;)b=d.times(d),d=d.times(_.plus(b.times(W.times(b).minus(X))));return d}function ht(u,d,g,p,b){var _,W,X,q,$=1,oe=u.precision,ae=Math.ceil(oe/M);for(E=!1,q=g.times(g),X=new u(p);;){if(W=Ie(X.times(q),new u(d++*d++),oe,1),X=b?p.plus(W):p.minus(W),p=Ie(W.times(q),new u(d++*d++),oe,1),W=X.plus(p),W.d[ae]!==void 0){for(_=ae;W.d[_]===X.d[_]&&_--;);if(_==-1)break}_=X,X=p,p=W,W=_,$++}return E=!0,W.d.length=ae+1,W}function gn(u,d){for(var g=u;--d;)g*=u;return g}function Mn(u,d){var g,p=d.s<0,b=tt(u,u.precision,1),_=b.times(.5);if(d=d.abs(),d.lte(_))return O=p?4:1,d;if(g=d.divToInt(b),g.isZero())O=p?3:2;else{if(d=d.minus(g.times(b)),d.lte(_))return O=Yt(g)?p?2:3:p?4:1,d;O=Yt(g)?p?1:4:p?3:2}return d.minus(b).abs()}function en(u,d,g,p){var b,_,W,X,q,$,oe,ae,ge,we=u.constructor,We=g!==void 0;if(We?(Ee(g,1,l),p===void 0?p=we.rounding:Ee(p,0,8)):(g=we.precision,p=we.rounding),!u.isFinite())oe=In(u);else{for(oe=wt(u),W=oe.indexOf("."),We?(b=2,d==16?g=g*4-3:d==8&&(g=g*3-2)):b=d,W>=0&&(oe=oe.replace(".",""),ge=new we(1),ge.e=oe.length-W,ge.d=Me(wt(ge),10,b),ge.e=ge.d.length),ae=Me(oe,10,b),_=q=ae.length;ae[--q]==0;)ae.pop();if(!ae[0])oe=We?"0p+0":"0";else{if(W<0?_--:(u=new we(u),u.d=ae,u.e=_,u=Ie(u,ge,g,p,0,b),ae=u.d,_=u.e,$=A),W=ae[g],X=b/2,$=$||ae[g+1]!==void 0,$=p<4?(W!==void 0||$)&&(p===0||p===(u.s<0?3:2)):W>X||W===X&&(p===4||$||p===6&&ae[g-1]&1||p===(u.s<0?8:7)),ae.length=g,$)for(;++ae[--g]>b-1;)ae[g]=0,g||(++_,ae.unshift(1));for(q=ae.length;!ae[q-1];--q);for(W=0,oe="";W<q;W++)oe+=c.charAt(ae[W]);if(We){if(q>1)if(d==16||d==8){for(W=d==16?4:3,--q;q%W;q++)oe+="0";for(ae=Me(oe,b,d),q=ae.length;!ae[q-1];--q);for(W=1,oe="1.";W<q;W++)oe+=c.charAt(ae[W])}else oe=oe.charAt(0)+"."+oe.slice(1);oe=oe+(_<0?"p":"p+")+_}else if(_<0){for(;++_;)oe="0"+oe;oe="0."+oe}else if(++_>q)for(_-=q;_--;)oe+="0";else _<q&&(oe=oe.slice(0,_)+"."+oe.slice(_))}oe=(d==16?"0x":d==2?"0b":d==8?"0o":"")+oe}return u.s<0?"-"+oe:oe}function ut(u,d){if(u.length>d)return u.length=d,!0}function cn(u){return new this(u).abs()}function pn(u){return new this(u).acos()}function hi(u){return new this(u).acosh()}function Ne(u,d){return new this(u).plus(d)}function tn(u){return new this(u).asin()}function v(u){return new this(u).asinh()}function R(u){return new this(u).atan()}function z(u){return new this(u).atanh()}function Z(u,d){u=new this(u),d=new this(d);var g,p=this.precision,b=this.rounding,_=p+4;return!u.s||!d.s?g=new this(NaN):!u.d&&!d.d?(g=tt(this,_,1).times(d.s>0?.25:.75),g.s=u.s):!d.d||u.isZero()?(g=d.s<0?tt(this,p,b):new this(0),g.s=u.s):!u.d||d.isZero()?(g=tt(this,_,1).times(.5),g.s=u.s):d.s<0?(this.precision=_,this.rounding=1,g=this.atan(Ie(u,d,_,1)),d=tt(this,_,1),this.precision=p,this.rounding=b,g=u.s<0?g.minus(d):g.plus(d)):g=this.atan(Ie(u,d,_,1)),g}function ue(u){return new this(u).cbrt()}function ne(u){return ve(u=new this(u),u.e+1,2)}function he(u,d,g){return new this(u).clamp(d,g)}function le(u){if(!u||typeof u!="object")throw Error(C+"Object expected");var d,g,p,b=u.defaults===!0,_=["precision",1,l,"rounding",0,8,"toExpNeg",-T,0,"toExpPos",0,T,"maxE",0,T,"minE",-T,0,"modulo",0,9];for(d=0;d<_.length;d+=3)if(g=_[d],b&&(this[g]=S[g]),(p=u[g])!==void 0)if(B(p)===p&&p>=_[d+1]&&p<=_[d+2])this[g]=p;else throw Error(I+g+": "+p);if(g="crypto",b&&(this[g]=S[g]),(p=u[g])!==void 0)if(p===!0||p===!1||p===0||p===1)if(p)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[g]=!0;else throw Error(w);else this[g]=!1;else throw Error(I+g+": "+p);return this}function pe(u){return new this(u).cos()}function be(u){return new this(u).cosh()}function Be(u){var d,g,p;function b(_){var W,X,q,$=this;if(!($ instanceof b))return new b(_);if($.constructor=b,En(_)){$.s=_.s,E?!_.d||_.e>b.maxE?($.e=NaN,$.d=null):_.e<b.minE?($.e=0,$.d=[0]):($.e=_.e,$.d=_.d.slice()):($.e=_.e,$.d=_.d?_.d.slice():_.d);return}if(q=typeof _,q==="number"){if(_===0){$.s=1/_<0?-1:1,$.e=0,$.d=[0];return}if(_<0?(_=-_,$.s=-1):$.s=1,_===~~_&&_<1e7){for(W=0,X=_;X>=10;X/=10)W++;E?W>b.maxE?($.e=NaN,$.d=null):W<b.minE?($.e=0,$.d=[0]):($.e=W,$.d=[_]):($.e=W,$.d=[_]);return}else if(_*0!==0){_||($.s=NaN),$.e=NaN,$.d=null;return}return at($,_.toString())}else if(q!=="string")throw Error(I+_);return(X=_.charCodeAt(0))===45?(_=_.slice(1),$.s=-1):(X===43&&(_=_.slice(1)),$.s=1),H.test(_)?at($,_):an($,_)}if(b.prototype=J,b.ROUND_UP=0,b.ROUND_DOWN=1,b.ROUND_CEIL=2,b.ROUND_FLOOR=3,b.ROUND_HALF_UP=4,b.ROUND_HALF_DOWN=5,b.ROUND_HALF_EVEN=6,b.ROUND_HALF_CEIL=7,b.ROUND_HALF_FLOOR=8,b.EUCLID=9,b.config=b.set=le,b.clone=Be,b.isDecimal=En,b.abs=cn,b.acos=pn,b.acosh=hi,b.add=Ne,b.asin=tn,b.asinh=v,b.atan=R,b.atanh=z,b.atan2=Z,b.cbrt=ue,b.ceil=ne,b.clamp=he,b.cos=pe,b.cosh=be,b.div=Ce,b.exp=ze,b.floor=Et,b.hypot=ct,b.ln=Un,b.log=Ar,b.log10=Or,b.log2=Tr,b.max=Fi,b.min=wr,b.mod=Nr,b.mul=Ir,b.pow=gi,b.random=br,b.round=pi,b.sign=_r,b.sin=Lr,b.sinh=Dr,b.sqrt=Cr,b.sub=Pr,b.sum=Fr,b.tan=Rr,b.tanh=Br,b.trunc=Ri,u===void 0&&(u={}),u&&u.defaults!==!0)for(p=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],d=0;d<p.length;)u.hasOwnProperty(g=p[d++])||(u[g]=this[g]);return b.config(u),b}function Ce(u,d){return new this(u).div(d)}function ze(u){return new this(u).exp()}function Et(u){return ve(u=new this(u),u.e+1,3)}function ct(){var u,d,g=new this(0);for(E=!1,u=0;u<arguments.length;)if(d=new this(arguments[u++]),d.d)g.d&&(g=g.plus(d.times(d)));else{if(d.s)return E=!0,new this(1/0);g=d}return E=!0,g.sqrt()}function En(u){return u instanceof f||u&&u.toStringTag===P||!1}function Un(u){return new this(u).ln()}function Ar(u,d){return new this(u).log(d)}function Tr(u){return new this(u).log(2)}function Or(u){return new this(u).log(10)}function Fi(){return Qn(this,arguments,"lt")}function wr(){return Qn(this,arguments,"gt")}function Nr(u,d){return new this(u).mod(d)}function Ir(u,d){return new this(u).mul(d)}function gi(u,d){return new this(u).pow(d)}function br(u){var d,g,p,b,_=0,W=new this(1),X=[];if(u===void 0?u=this.precision:Ee(u,1,l),p=Math.ceil(u/M),this.crypto)if(crypto.getRandomValues)for(d=crypto.getRandomValues(new Uint32Array(p));_<p;)b=d[_],b>=429e7?d[_]=crypto.getRandomValues(new Uint32Array(1))[0]:X[_++]=b%1e7;else if(crypto.randomBytes){for(d=crypto.randomBytes(p*=4);_<p;)b=d[_]+(d[_+1]<<8)+(d[_+2]<<16)+((d[_+3]&127)<<24),b>=214e7?crypto.randomBytes(4).copy(d,_):(X.push(b%1e7),_+=4);_=p/4}else throw Error(w);else for(;_<p;)X[_++]=Math.random()*1e7|0;for(p=X[--_],u%=M,p&&u&&(b=K(10,M-u),X[_]=(p/b|0)*b);X[_]===0;_--)X.pop();if(_<0)g=0,X=[0];else{for(g=-1;X[0]===0;g-=M)X.shift();for(p=1,b=X[0];b>=10;b/=10)p++;p<M&&(g-=M-p)}return W.e=g,W.d=X,W}function pi(u){return ve(u=new this(u),u.e+1,this.rounding)}function _r(u){return u=new this(u),u.d?u.d[0]?u.s:0*u.s:u.s||NaN}function Lr(u){return new this(u).sin()}function Dr(u){return new this(u).sinh()}function Cr(u){return new this(u).sqrt()}function Pr(u,d){return new this(u).sub(d)}function Fr(){var u=0,d=arguments,g=new this(d[u]);for(E=!1;g.s&&++u<d.length;)g=g.plus(d[u]);return E=!0,ve(g,this.precision,this.rounding)}function Rr(u){return new this(u).tan()}function Br(u){return new this(u).tanh()}function Ri(u){return ve(u=new this(u),u.e+1,1)}f=Be(S),f.prototype.constructor=f,f.default=f.Decimal=f,y=new f(y),N=new f(N),a=function(){return f}.call(n,o,n,ee),a!==void 0&&(ee.exports=a)})(this)},44174:function(ee){function n(o,a,r,T){for(var l=-1,c=o==null?0:o.length;++l<c;){var y=o[l];a(T,y,r(y),o)}return T}ee.exports=n},81119:function(ee,n,o){var a=o(89881);function r(T,l,c,y){return a(T,function(N,S,f){l(y,N,c(N),f)}),y}ee.exports=r},55189:function(ee,n,o){var a=o(44174),r=o(81119),T=o(67206),l=o(1469);function c(y,N){return function(S,f){var A=l(S)?a:r,h=N?N():{};return A(S,y,T(f,2),h)}}ee.exports=c},94654:function(ee,n,o){var a=o(21078),r=o(35161);function T(l,c){return a(r(l,c),1)}ee.exports=T},7739:function(ee,n,o){var a=o(89465),r=o(55189),T=Object.prototype,l=T.hasOwnProperty,c=r(function(y,N,S){l.call(y,S)?y[S].push(N):a(y,S,[N])});ee.exports=c},96486:function(ee,n,o){ee=o.nmd(ee);var a;/**
2
2
  * @license
3
3
  * Lodash <https://lodash.com/>
4
4
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkedge_currency_accountbased=self.webpackChunkedge_currency_accountbased||[]).push([[9068],{59068:function(Qe,Q,w){w.r(Q),w.d(Q,{CID:function(){return d},bytes:function(){return R},digest:function(){return j},hasher:function(){return k},varint:function(){return F}});var F={};w.r(F),w.d(F,{decode:function(){return V},encodeTo:function(){return z},encodingLength:function(){return O}});var R={};w.r(R),w.d(R,{coerce:function(){return D},empty:function(){return q},equals:function(){return W},fromHex:function(){return Ae},fromString:function(){return Ce},isBinary:function(){return Ue},toHex:function(){return Ee},toString:function(){return ze}});var j={};w.r(j),w.d(j,{Digest:function(){return L},create:function(){return B},decode:function(){return Z},equals:function(){return Y}});var k={};w.r(k),w.d(k,{Hasher:function(){return se},from:function(){return Pe}});var oe=K,G=128,ie=127,ce=~ie,ae=Math.pow(2,31);function K(r,t,e){t=t||[],e=e||0;for(var n=e;r>=ae;)t[e++]=r&255|G,r/=128;for(;r&ce;)t[e++]=r&255|G,r>>>=7;return t[e]=r|0,K.bytes=e-n+1,t}var de=J,he=128,X=127;function J(r,n){var e=0,n=n||0,s=0,o=n,i,a=r.length;do{if(o>=a)throw J.bytes=0,new RangeError("Could not decode varint");i=r[o++],e+=s<28?(i&X)<<s:(i&X)*Math.pow(2,s),s+=7}while(i>=he);return J.bytes=o-n,e}var fe=Math.pow(2,7),ue=Math.pow(2,14),le=Math.pow(2,21),pe=Math.pow(2,28),be=Math.pow(2,35),we=Math.pow(2,42),ye=Math.pow(2,49),ge=Math.pow(2,56),ve=Math.pow(2,63),me=function(r){return r<fe?1:r<ue?2:r<le?3:r<pe?4:r<be?5:r<we?6:r<ye?7:r<ge?8:r<ve?9:10},xe={encode:oe,decode:de,encodingLength:me},Se=xe,N=Se;const V=(r,t=0)=>[N.decode(r,t),N.decode.bytes],z=(r,t,e=0)=>(N.encode(r,t,e),t),O=r=>N.encodingLength(r),q=new Uint8Array(0),Ee=r=>r.reduce((t,e)=>t+e.toString(16).padStart(2,"0"),""),Ae=r=>{const t=r.match(/../g);return t?new Uint8Array(t.map(e=>parseInt(e,16))):q},W=(r,t)=>{if(r===t)return!0;if(r.byteLength!==t.byteLength)return!1;for(let e=0;e<r.byteLength;e++)if(r[e]!==t[e])return!1;return!0},D=r=>{if(r instanceof Uint8Array&&r.constructor.name==="Uint8Array")return r;if(r instanceof ArrayBuffer)return new Uint8Array(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength);throw new Error("Unknown type, must be binary type")},Ue=r=>r instanceof ArrayBuffer||ArrayBuffer.isView(r),Ce=r=>new TextEncoder().encode(r),ze=r=>new TextDecoder().decode(r),B=(r,t)=>{const e=t.byteLength,n=O(r),s=n+O(e),o=new Uint8Array(s+e);return z(r,o,0),z(e,o,n),o.set(t,s),new L(r,e,t,o)},Z=r=>{const t=D(r),[e,n]=V(t),[s,o]=V(t.subarray(n)),i=t.subarray(n+o);if(i.byteLength!==s)throw new Error("Incorrect length");return new L(e,s,i,t)},Y=(r,t)=>{if(r===t)return!0;{const e=t;return r.code===e.code&&r.size===e.size&&e.bytes instanceof Uint8Array&&W(r.bytes,e.bytes)}};class L{constructor(t,e,n,s){this.code=t,this.size=e,this.digest=n,this.bytes=s}}function Oe(r,t){if(r.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),n=0;n<e.length;n++)e[n]=255;for(var s=0;s<r.length;s++){var o=r.charAt(s),i=o.charCodeAt(0);if(e[i]!==255)throw new TypeError(o+" is ambiguous");e[i]=s}var a=r.length,h=r.charAt(0),U=Math.log(a)/Math.log(256),u=Math.log(256)/Math.log(a);function C(c){if(c instanceof Uint8Array||(ArrayBuffer.isView(c)?c=new Uint8Array(c.buffer,c.byteOffset,c.byteLength):Array.isArray(c)&&(c=Uint8Array.from(c))),!(c instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(c.length===0)return"";for(var f=0,A=0,p=0,y=c.length;p!==y&&c[p]===0;)p++,f++;for(var g=(y-p)*u+1>>>0,l=new Uint8Array(g);p!==y;){for(var v=c[p],E=0,b=g-1;(v!==0||E<A)&&b!==-1;b--,E++)v+=256*l[b]>>>0,l[b]=v%a>>>0,v=v/a>>>0;if(v!==0)throw new Error("Non-zero carry");A=E,p++}for(var x=g-A;x!==g&&l[x]===0;)x++;for(var I=h.repeat(f);x<g;++x)I+=r.charAt(l[x]);return I}function $(c){if(typeof c!="string")throw new TypeError("Expected String");if(c.length===0)return new Uint8Array;var f=0;if(c[f]!==" "){for(var A=0,p=0;c[f]===h;)A++,f++;for(var y=(c.length-f)*U+1>>>0,g=new Uint8Array(y);c[f];){var l=e[c.charCodeAt(f)];if(l===255)return;for(var v=0,E=y-1;(l!==0||v<p)&&E!==-1;E--,v++)l+=a*g[E]>>>0,g[E]=l%256>>>0,l=l/256>>>0;if(l!==0)throw new Error("Non-zero carry");p=v,f++}if(c[f]!==" "){for(var b=y-p;b!==y&&g[b]===0;)b++;for(var x=new Uint8Array(A+(y-b)),I=A;b!==y;)x[I++]=g[b++];return x}}}function He(c){var f=$(c);if(f)return f;throw new Error(`Non-${t} character`)}return{encode:C,decodeUnsafe:$,decode:He}}var Me=Oe,Ne=Me,Ve=Ne;class De{constructor(t,e,n){this.name=t,this.prefix=e,this.baseEncode=n}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class Be{constructor(t,e,n){if(this.name=t,this.prefix=e,e.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=e.codePointAt(0),this.baseDecode=n}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return _(this,t)}}class Le{constructor(t){this.decoders=t}or(t){return _(this,t)}decode(t){const e=t[0],n=this.decoders[e];if(n)return n.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const _=(r,t)=>new Le({...r.decoders||{[r.prefix]:r},...t.decoders||{[t.prefix]:t}});class Te{constructor(t,e,n,s){this.name=t,this.prefix=e,this.baseEncode=n,this.baseDecode=s,this.encoder=new De(t,e,n),this.decoder=new Be(t,e,s)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const ee=({name:r,prefix:t,encode:e,decode:n})=>new Te(r,t,e,n),te=({prefix:r,name:t,alphabet:e})=>{const{encode:n,decode:s}=Ve(e,t);return ee({prefix:r,name:t,encode:n,decode:o=>D(s(o))})},$e=(r,t,e,n)=>{const s={};for(let u=0;u<t.length;++u)s[t[u]]=u;let o=r.length;for(;r[o-1]==="=";)--o;const i=new Uint8Array(o*e/8|0);let a=0,h=0,U=0;for(let u=0;u<o;++u){const C=s[r[u]];if(C===void 0)throw new SyntaxError(`Non-${n} character`);h=h<<e|C,a+=e,a>=8&&(a-=8,i[U++]=255&h>>a)}if(a>=e||255&h<<8-a)throw new SyntaxError("Unexpected end of data");return i},Ie=(r,t,e)=>{const n=t[t.length-1]==="=",s=(1<<e)-1;let o="",i=0,a=0;for(let h=0;h<r.length;++h)for(a=a<<8|r[h],i+=8;i>e;)i-=e,o+=t[s&a>>i];if(i&&(o+=t[s&a<<e-i]),n)for(;o.length*e&7;)o+="=";return o},m=({name:r,prefix:t,bitsPerChar:e,alphabet:n})=>ee({prefix:t,name:r,encode(s){return Ie(s,n,e)},decode(s){return $e(s,n,e,r)}}),S=te({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Ge=te({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),T=m({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Ke=m({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Xe=m({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),qe=m({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),We=m({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Ze=m({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Ye=m({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),_e=m({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),et=m({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),P=(r,t)=>{const{bytes:e,version:n}=r;switch(n){case 0:return Re(e,H(r),t||S.encoder);default:return je(e,H(r),t||T.encoder)}},tt=r=>({"/":P(r)}),rt=r=>d.parse(r["/"]),re=new WeakMap,H=r=>{const t=re.get(r);if(t==null){const e=new Map;return re.set(r,e),e}return t};class d{constructor(t,e,n,s){this.code=e,this.version=t,this.multihash=n,this.bytes=s,this["/"]=s}get asCID(){return this}get byteOffset(){return this.bytes.byteOffset}get byteLength(){return this.bytes.byteLength}toV0(){switch(this.version){case 0:return this;case 1:{const{code:t,multihash:e}=this;if(t!==M)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(e.code!==ke)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return d.createV0(e)}default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}toV1(){switch(this.version){case 0:{const{code:t,digest:e}=this.multihash,n=B(t,e);return d.createV1(this.code,n)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`)}}equals(t){return d.equals(this,t)}static equals(t,e){const n=e;return n&&t.code===n.code&&t.version===n.version&&Y(t.multihash,n.multihash)}toString(t){return P(this,t)}toJSON(){return{"/":P(this)}}link(){return this}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return`CID(${this.toString()})`}static asCID(t){if(t==null)return null;const e=t;if(e instanceof d)return e;if(e["/"]!=null&&e["/"]===e.bytes||e.asCID===e){const{version:n,code:s,multihash:o,bytes:i}=e;return new d(n,s,o,i||ne(n,s,o.bytes))}else if(e[Je]===!0){const{version:n,multihash:s,code:o}=e,i=Z(s);return d.create(n,o,i)}else return null}static create(t,e,n){if(typeof e!="number")throw new Error("String codecs are no longer supported");if(!(n.bytes instanceof Uint8Array))throw new Error("Invalid digest");switch(t){case 0:{if(e!==M)throw new Error(`Version 0 CID must use dag-pb (code: ${M}) block encoding`);return new d(t,e,n,n.bytes)}case 1:{const s=ne(t,e,n.bytes);return new d(t,e,n,s)}default:throw new Error("Invalid version")}}static createV0(t){return d.create(0,M,t)}static createV1(t,e){return d.create(1,t,e)}static decode(t){const[e,n]=d.decodeFirst(t);if(n.length)throw new Error("Incorrect length");return e}static decodeFirst(t){const e=d.inspectBytes(t),n=e.size-e.multihashSize,s=D(t.subarray(n,n+e.multihashSize));if(s.byteLength!==e.multihashSize)throw new Error("Incorrect length");const o=s.subarray(e.multihashSize-e.digestSize),i=new L(e.multihashCode,e.digestSize,o,s);return[e.version===0?d.createV0(i):d.createV1(e.codec,i),t.subarray(e.size)]}static inspectBytes(t){let e=0;const n=()=>{const[C,$]=V(t.subarray(e));return e+=$,C};let s=n(),o=M;if(s===18?(s=0,e=0):o=n(),s!==0&&s!==1)throw new RangeError(`Invalid CID version ${s}`);const i=e,a=n(),h=n(),U=e+h,u=U-i;return{version:s,codec:o,multihashCode:a,digestSize:h,multihashSize:u,size:U}}static parse(t,e){const[n,s]=Fe(t,e),o=d.decode(s);if(o.version===0&&t[0]!=="Q")throw Error("Version 0 CID string must not include multibase prefix");return H(o).set(n,t),o}}const Fe=(r,t)=>{switch(r[0]){case"Q":{const e=t||S;return[S.prefix,e.decode(`${S.prefix}${r}`)]}case S.prefix:{const e=t||S;return[S.prefix,e.decode(r)]}case T.prefix:{const e=t||T;return[T.prefix,e.decode(r)]}default:{if(t==null)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[r[0],t.decode(r)]}}},Re=(r,t,e)=>{const{prefix:n}=e;if(n!==S.prefix)throw Error(`Cannot string encode V0 in ${e.name} encoding`);const s=t.get(n);if(s==null){const o=e.encode(r).slice(1);return t.set(n,o),o}else return s},je=(r,t,e)=>{const{prefix:n}=e,s=t.get(n);if(s==null){const o=e.encode(r);return t.set(n,o),o}else return s},M=112,ke=18,ne=(r,t,e)=>{const n=O(r),s=n+O(t),o=new Uint8Array(s+e.byteLength);return z(r,o,0),z(t,o,n),o.set(e,s),o},Je=Symbol.for("@ipld/js-cid/CID"),Pe=({name:r,code:t,encode:e})=>new se(r,t,e);class se{constructor(t,e,n){this.name=t,this.code=e,this.encode=n}digest(t){if(t instanceof Uint8Array){const e=this.encode(t);return e instanceof Uint8Array?B(this.code,e):e.then(n=>B(this.code,n))}else throw Error("Unknown type, must be binary type")}}}}]);