diff --git a/build/main.cjs.js b/build/main.cjs.js deleted file mode 100644 index 5fc41b6..0000000 --- a/build/main.cjs.js +++ /dev/null @@ -1,1041 +0,0 @@ -'use strict'; - -/* global BigInt */ -const hexLen = [0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4]; - -function fromString(s, radix) { - if (!radix || radix == 10) { - return BigInt(s); - } else if (radix == 16) { - if (s.slice(0, 2) == "0x") { - return BigInt(s); - } else { - return BigInt("0x" + s); - } - } -} - -const e = fromString; - -function fromArray(a, radix) { - let acc = BigInt(0); - radix = BigInt(radix); - for (let i = 0; i < a.length; i++) { - acc = acc * radix + BigInt(a[i]); - } - return acc; -} - -function bitLength(a) { - const aS = a.toString(16); - return (aS.length - 1) * 4 + hexLen[parseInt(aS[0], 16)]; -} - -function isNegative(a) { - return BigInt(a) < BigInt(0); -} - -function isZero(a) { - return !a; -} - -function shiftLeft(a, n) { - return BigInt(a) << BigInt(n); -} - -function shiftRight(a, n) { - return BigInt(a) >> BigInt(n); -} - -const shl = shiftLeft; -const shr = shiftRight; - -function isOdd(a) { - return (BigInt(a) & BigInt(1)) == BigInt(1); -} - -function naf(n) { - let E = BigInt(n); - const res = []; - while (E) { - if (E & BigInt(1)) { - const z = 2 - Number(E % BigInt(4)); - res.push(z); - E = E - BigInt(z); - } else { - res.push(0); - } - E = E >> BigInt(1); - } - return res; -} - -function bits(n) { - let E = BigInt(n); - const res = []; - while (E) { - if (E & BigInt(1)) { - res.push(1); - } else { - res.push(0); - } - E = E >> BigInt(1); - } - return res; -} - -function toNumber(s) { - if (s > BigInt(Number.MAX_SAFE_INTEGER)) { - throw new Error("Number too big"); - } - return Number(s); -} - -function toArray(s, radix) { - const res = []; - let rem = BigInt(s); - radix = BigInt(radix); - while (rem) { - res.unshift(Number(rem % radix)); - rem = rem / radix; - } - return res; -} - -function add(a, b) { - return BigInt(a) + BigInt(b); -} - -function sub(a, b) { - return BigInt(a) - BigInt(b); -} - -function neg(a) { - return -BigInt(a); -} - -function mul(a, b) { - return BigInt(a) * BigInt(b); -} - -function square(a) { - return BigInt(a) * BigInt(a); -} - -function pow(a, b) { - return BigInt(a) ** BigInt(b); -} - -function exp$1(a, b) { - return BigInt(a) ** BigInt(b); -} - -function abs(a) { - return BigInt(a) >= 0 ? BigInt(a) : -BigInt(a); -} - -function div(a, b) { - return BigInt(a) / BigInt(b); -} - -function mod(a, b) { - return BigInt(a) % BigInt(b); -} - -function eq(a, b) { - return BigInt(a) == BigInt(b); -} - -function neq(a, b) { - return BigInt(a) != BigInt(b); -} - -function lt(a, b) { - return BigInt(a) < BigInt(b); -} - -function gt(a, b) { - return BigInt(a) > BigInt(b); -} - -function leq(a, b) { - return BigInt(a) <= BigInt(b); -} - -function geq(a, b) { - return BigInt(a) >= BigInt(b); -} - -function band(a, b) { - return BigInt(a) & BigInt(b); -} - -function bor(a, b) { - return BigInt(a) | BigInt(b); -} - -function bxor(a, b) { - return BigInt(a) ^ BigInt(b); -} - -function land(a, b) { - return BigInt(a) && BigInt(b); -} - -function lor(a, b) { - return BigInt(a) || BigInt(b); -} - -function lnot(a) { - return !BigInt(a); -} - -// Returns a buffer with Little Endian Representation -function toRprLE(buff, o, e, n8) { - const s = "0000000" + e.toString(16); - const v = new Uint32Array(buff.buffer, o, n8 / 4); - const l = (((s.length - 7) * 4 - 1) >> 5) + 1; // Number of 32bit words; - for (let i = 0; i < l; i++) v[i] = parseInt(s.substring(s.length - 8 * i - 8, s.length - 8 * i), 16); - for (let i = l; i < v.length; i++) v[i] = 0; - for (let i = v.length * 4; i < n8; i++) buff[i] = toNumber(band(shiftRight(e, i * 8), 0xff)); -} - -// Returns a buffer with Big Endian Representation -function toRprBE(buff, o, e, n8) { - const s = "0000000" + e.toString(16); - const v = new DataView(buff.buffer, buff.byteOffset + o, n8); - const l = (((s.length - 7) * 4 - 1) >> 5) + 1; // Number of 32bit words; - for (let i = 0; i < l; i++) v.setUint32(n8 - i * 4 - 4, parseInt(s.substring(s.length - 8 * i - 8, s.length - 8 * i), 16), false); - for (let i = 0; i < n8 / 4 - l; i++) v[i] = 0; -} - -// Pases a buffer with Little Endian Representation -function fromRprLE(buff, o, n8) { - n8 = n8 || buff.byteLength; - o = o || 0; - const v = new Uint32Array(buff.buffer, o, n8 / 4); - const a = new Array(n8 / 4); - v.forEach((ch, i) => (a[a.length - i - 1] = ch.toString(16).padStart(8, "0"))); - return fromString(a.join(""), 16); -} - -// Pases a buffer with Big Endian Representation -function fromRprBE(buff, o, n8) { - n8 = n8 || buff.byteLength; - o = o || 0; - const v = new DataView(buff.buffer, buff.byteOffset + o, n8); - const a = new Array(n8 / 4); - for (let i = 0; i < n8 / 4; i++) { - a[i] = v - .getUint32(i * 4, false) - .toString(16) - .padStart(8, "0"); - } - return fromString(a.join(""), 16); -} - -function toString(a, radix) { - return a.toString(radix); -} - -function toLEBuff(a) { - const buff = new Uint8Array(Math.floor((bitLength(a) - 1) / 8) + 1); - toRprLE(buff, 0, a, buff.byteLength); - return buff; -} - -const zero = e(0); -const one = e(1); - -var _Scalar = /*#__PURE__*/Object.freeze({ - __proto__: null, - abs: abs, - add: add, - band: band, - bitLength: bitLength, - bits: bits, - bor: bor, - bxor: bxor, - div: div, - e: e, - eq: eq, - exp: exp$1, - fromArray: fromArray, - fromRprBE: fromRprBE, - fromRprLE: fromRprLE, - fromString: fromString, - geq: geq, - gt: gt, - isNegative: isNegative, - isOdd: isOdd, - isZero: isZero, - land: land, - leq: leq, - lnot: lnot, - lor: lor, - lt: lt, - mod: mod, - mul: mul, - naf: naf, - neg: neg, - neq: neq, - one: one, - pow: pow, - shiftLeft: shiftLeft, - shiftRight: shiftRight, - shl: shl, - shr: shr, - square: square, - sub: sub, - toArray: toArray, - toLEBuff: toLEBuff, - toNumber: toNumber, - toRprBE: toRprBE, - toRprLE: toRprLE, - toString: toString, - zero: zero -}); - -/* - Copyright 2018 0kims association. - - This file is part of snarkjs. - - snarkjs is a free software: you can redistribute it and/or - modify it under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your option) - any later version. - - snarkjs is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. - - You should have received a copy of the GNU General Public License along with - snarkjs. If not, see . -*/ - -/* - This library does operations on polynomials with coefficients in a field F. - - A polynomial P(x) = p0 + p1 * x + p2 * x^2 + ... + pn * x^n is represented - by the array [ p0, p1, p2, ... , pn ]. - */ - -class FFT { - constructor(G, F, opMulGF) { - this.F = F; - this.G = G; - this.opMulGF = opMulGF; - - let rem = F.sqrt_t || F.t; - let s = F.sqrt_s || F.s; - - let nqr = F.one; - while (F.eq(F.pow(nqr, F.half), F.one)) nqr = F.add(nqr, F.one); - - this.w = new Array(s + 1); - this.wi = new Array(s + 1); - this.w[s] = this.F.pow(nqr, rem); - this.wi[s] = this.F.inv(this.w[s]); - - let n = s - 1; - while (n >= 0) { - this.w[n] = this.F.square(this.w[n + 1]); - this.wi[n] = this.F.square(this.wi[n + 1]); - n--; - } - - this.roots = []; - /* - for (let i=0; i<16; i++) { - let r = this.F.one; - n = 1 << i; - const rootsi = new Array(n); - for (let j=0; j= 0 && !this.roots[i]; i--) { - let r = this.F.one; - const nroots = 1 << i; - const rootsi = new Array(nroots); - for (let j = 0; j < nroots; j++) { - rootsi[j] = r; - r = this.F.mul(r, this.w[i]); - } - - this.roots[i] = rootsi; - } - } - - fft(p) { - if (p.length <= 1) return p; - const bits = log2(p.length - 1) + 1; - this._setRoots(bits); - - const m = 1 << bits; - if (p.length != m) { - throw new Error("Size must be multiple of 2"); - } - const res = __fft(this, p, bits, 0, 1); - return res; - } - - ifft(p) { - if (p.length <= 1) return p; - const bits = log2(p.length - 1) + 1; - this._setRoots(bits); - const m = 1 << bits; - if (p.length != m) { - throw new Error("Size must be multiple of 2"); - } - const res = __fft(this, p, bits, 0, 1); - const twoinvm = this.F.inv(this.F.mulScalar(this.F.one, m)); - const resn = new Array(m); - for (let i = 0; i < m; i++) { - resn[i] = this.opMulGF(res[(m - i) % m], twoinvm); - } - - return resn; - } -} - -function log2(V) { - return ( - ((V & 0xffff0000) !== 0 ? ((V &= 0xffff0000), 16) : 0) | - ((V & 0xff00ff00) !== 0 ? ((V &= 0xff00ff00), 8) : 0) | - ((V & 0xf0f0f0f0) !== 0 ? ((V &= 0xf0f0f0f0), 4) : 0) | - ((V & 0xcccccccc) !== 0 ? ((V &= 0xcccccccc), 2) : 0) | - ((V & 0xaaaaaaaa) !== 0) - ); -} - -function __fft(PF, pall, bits, offset, step) { - const n = 1 << bits; - if (n == 1) { - return [pall[offset]]; - } else if (n == 2) { - return [PF.G.add(pall[offset], pall[offset + step]), PF.G.sub(pall[offset], pall[offset + step])]; - } - - const ndiv2 = n >> 1; - const p1 = __fft(PF, pall, bits - 1, offset, step * 2); - const p2 = __fft(PF, pall, bits - 1, offset + step, step * 2); - - const out = new Array(n); - - for (let i = 0; i < ndiv2; i++) { - out[i] = PF.G.add(p1[i], PF.opMulGF(p2[i], PF.roots[bits][i])); - out[i + ndiv2] = PF.G.sub(p1[i], PF.opMulGF(p2[i], PF.roots[bits][i])); - } - - return out; -} - -// Check here: https://eprint.iacr.org/2012/685.pdf - -function buildSqrt(F) { - if (F.m % 2 == 1) { - if (eq(mod(F.p, 4), 1)) { - if (eq(mod(F.p, 8), 1)) { - if (eq(mod(F.p, 16), 1)) { - // alg7_muller(F); - alg5_tonelliShanks(F); - } else if (eq(mod(F.p, 16), 9)) { - alg4_kong(F); - } else { - throw new Error("Field withot sqrt"); - } - } else if (eq(mod(F.p, 8), 5)) { - alg3_atkin(F); - } else { - throw new Error("Field withot sqrt"); - } - } else if (eq(mod(F.p, 4), 3)) { - alg2_shanks(F); - } - } else { - const pm2mod4 = mod(pow(F.p, F.m / 2), 4); - if (pm2mod4 == 1) { - alg10_adj(F); - } else if (pm2mod4 == 3) { - alg9_adj(F); - } else { - alg8_complex(F); - } - } -} - -function alg5_tonelliShanks(F) { - F.sqrt_q = pow(F.p, F.m); - - F.sqrt_s = 0; - F.sqrt_t = sub(F.sqrt_q, 1); - - while (!isOdd(F.sqrt_t)) { - F.sqrt_s = F.sqrt_s + 1; - F.sqrt_t = div(F.sqrt_t, 2); - } - - let c0 = F.one; - - while (F.eq(c0, F.one)) { - const c = F.random(); - F.sqrt_z = F.pow(c, F.sqrt_t); - c0 = F.pow(F.sqrt_z, 2 ** (F.sqrt_s - 1)); - } - - F.sqrt_tm1d2 = div(sub(F.sqrt_t, 1), 2); - - F.sqrt = function (a) { - const F = this; - if (F.isZero(a)) return F.zero; - let w = F.pow(a, F.sqrt_tm1d2); - const a0 = F.pow(F.mul(F.square(w), a), 2 ** (F.sqrt_s - 1)); - if (F.eq(a0, F.negone)) return null; - - let v = F.sqrt_s; - let x = F.mul(a, w); - let b = F.mul(x, w); - let z = F.sqrt_z; - while (!F.eq(b, F.one)) { - let b2k = F.square(b); - let k = 1; - while (!F.eq(b2k, F.one)) { - b2k = F.square(b2k); - k++; - } - - w = z; - for (let i = 0; i < v - k - 1; i++) { - w = F.square(w); - } - z = F.square(w); - b = F.mul(b, z); - x = F.mul(x, w); - v = k; - } - return F.geq(x, F.zero) ? x : F.neg(x); - }; -} - -function alg4_kong(F) { - F.sqrt = function () { - throw new Error("Sqrt alg 4 not implemented"); - }; -} - -function alg3_atkin(F) { - F.sqrt = function () { - throw new Error("Sqrt alg 3 not implemented"); - }; -} - -function alg2_shanks(F) { - F.sqrt_q = pow(F.p, F.m); - F.sqrt_e1 = div(sub(F.sqrt_q, 3), 4); - - F.sqrt = function (a) { - if (this.isZero(a)) return this.zero; - - // Test that have solution - const a1 = this.pow(a, this.sqrt_e1); - - const a0 = this.mul(this.square(a1), a); - - if (this.eq(a0, this.negone)) return null; - - const x = this.mul(a1, a); - - return F.geq(x, F.zero) ? x : F.neg(x); - }; -} - -function alg10_adj(F) { - F.sqrt = function () { - throw new Error("Sqrt alg 10 not implemented"); - }; -} - -function alg9_adj(F) { - F.sqrt_q = pow(F.p, F.m / 2); - F.sqrt_e34 = div(sub(F.sqrt_q, 3), 4); - F.sqrt_e12 = div(sub(F.sqrt_q, 1), 2); - - F.frobenius = function (n, x) { - if (n % 2 == 1) { - return F.conjugate(x); - } else { - return x; - } - }; - - F.sqrt = function (a) { - const F = this; - const a1 = F.pow(a, F.sqrt_e34); - const alfa = F.mul(F.square(a1), a); - const a0 = F.mul(F.frobenius(1, alfa), alfa); - if (F.eq(a0, F.negone)) return null; - const x0 = F.mul(a1, a); - let x; - if (F.eq(alfa, F.negone)) { - x = F.mul(x0, [F.F.zero, F.F.one]); - } else { - const b = F.pow(F.add(F.one, alfa), F.sqrt_e12); - x = F.mul(b, x0); - } - return F.geq(x, F.zero) ? x : F.neg(x); - }; -} - -function alg8_complex(F) { - F.sqrt = function () { - throw new Error("Sqrt alg 8 not implemented"); - }; -} - -/* - Copyright 2018 0kims association. - - This file is part of snarkjs. - - snarkjs is a free software: you can redistribute it and/or - modify it under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your option) - any later version. - - snarkjs is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. - - You should have received a copy of the GNU General Public License along with - snarkjs. If not, see . -*/ - - -/* -exports.mulScalar = (F, base, e) =>{ - let res = F.zero; - let rem = bigInt(e); - let exp = base; - - while (! rem.eq(bigInt.zero)) { - if (rem.and(bigInt.one).eq(bigInt.one)) { - res = F.add(res, exp); - } - exp = F.double(exp); - rem = rem.shiftRight(1); - } - - return res; -}; -*/ - -function exp(F, base, e) { - if (isZero(e)) return F.one; - - const n = bits(e); - - if (n.length == 0) return F.one; - - let res = base; - - for (let i = n.length - 2; i >= 0; i--) { - res = F.square(res); - - if (n[i]) { - res = F.mul(res, base); - } - } - - return res; -} - -function getRandomBytes(n) { - let array = new Uint8Array(n); - // Browser & Node - if (typeof globalThis.crypto !== "undefined") { - // Supported - globalThis.crypto.getRandomValues(array); - } else { - // fallback - for (let i = 0; i < n; i++) { - array[i] = (Math.random() * 4294967296) >>> 0; - } - } - return array; -} - -/* global BigInt */ - -class ZqField { - constructor(p) { - this.type = "F1"; - this.one = BigInt(1); - this.zero = BigInt(0); - this.p = BigInt(p); - this.m = 1; - this.negone = this.p - this.one; - this.two = BigInt(2); - this.half = this.p >> this.one; - this.bitLength = bitLength(this.p); - this.mask = (this.one << BigInt(this.bitLength)) - this.one; - - this.n64 = Math.floor((this.bitLength - 1) / 64) + 1; - this.n32 = this.n64 * 2; - this.n8 = this.n64 * 8; - this.R = this.e(this.one << BigInt(this.n64 * 64)); - this.Ri = this.inv(this.R); - - const e = this.negone >> this.one; - this.nqr = this.two; - let r = this.pow(this.nqr, e); - while (!this.eq(r, this.negone)) { - this.nqr = this.nqr + this.one; - r = this.pow(this.nqr, e); - } - - this.s = 0; - this.t = this.negone; - - while ((this.t & this.one) == this.zero) { - this.s = this.s + 1; - this.t = this.t >> this.one; - } - - this.nqr_to_t = this.pow(this.nqr, this.t); - - buildSqrt(this); - - this.FFT = new FFT(this, this, this.mul.bind(this)); - - this.fft = this.FFT.fft.bind(this.FFT); - this.ifft = this.FFT.ifft.bind(this.FFT); - this.w = this.FFT.w; - this.wi = this.FFT.wi; - - this.shift = this.square(this.nqr); - this.k = this.exp(this.nqr, 2 ** this.s); - } - - e(a, b) { - let res; - if (!b) { - res = BigInt(a); - } else if (b == 16) { - res = BigInt("0x" + a); - } - if (res < 0) { - let nres = -res; - if (nres >= this.p) nres = nres % this.p; - return this.p - nres; - } else { - return res >= this.p ? res % this.p : res; - } - } - - add(a, b) { - const res = a + b; - return res >= this.p ? res - this.p : res; - } - - sub(a, b) { - return a >= b ? a - b : this.p - b + a; - } - - neg(a) { - return a ? this.p - a : a; - } - - mul(a, b) { - return (a * b) % this.p; - } - - mulScalar(base, s) { - return (base * this.e(s)) % this.p; - } - - square(a) { - return (a * a) % this.p; - } - - eq(a, b) { - return a == b; - } - - neq(a, b) { - return a != b; - } - - lt(a, b) { - const aa = a > this.half ? a - this.p : a; - const bb = b > this.half ? b - this.p : b; - return aa < bb; - } - - gt(a, b) { - const aa = a > this.half ? a - this.p : a; - const bb = b > this.half ? b - this.p : b; - return aa > bb; - } - - leq(a, b) { - const aa = a > this.half ? a - this.p : a; - const bb = b > this.half ? b - this.p : b; - return aa <= bb; - } - - geq(a, b) { - const aa = a > this.half ? a - this.p : a; - const bb = b > this.half ? b - this.p : b; - return aa >= bb; - } - - div(a, b) { - return this.mul(a, this.inv(b)); - } - - idiv(a, b) { - if (!b) throw new Error("Division by zero"); - return a / b; - } - - inv(a) { - if (!a) throw new Error("Division by zero"); - - let t = this.zero; - let r = this.p; - let newt = this.one; - let newr = a % this.p; - while (newr) { - let q = r / newr; - [t, newt] = [newt, t - q * newt]; - [r, newr] = [newr, r - q * newr]; - } - if (t < this.zero) t += this.p; - return t; - } - - mod(a, b) { - return a % b; - } - - pow(b, e) { - return exp(this, b, e); - } - - exp(b, e) { - return exp(this, b, e); - } - - band(a, b) { - const res = a & b & this.mask; - return res >= this.p ? res - this.p : res; - } - - bor(a, b) { - const res = (a | b) & this.mask; - return res >= this.p ? res - this.p : res; - } - - bxor(a, b) { - const res = (a ^ b) & this.mask; - return res >= this.p ? res - this.p : res; - } - - bnot(a) { - const res = a ^ this.mask; - return res >= this.p ? res - this.p : res; - } - - shl(a, b) { - if (Number(b) < this.bitLength) { - const res = (a << b) & this.mask; - return res >= this.p ? res - this.p : res; - } else { - const nb = this.p - b; - if (Number(nb) < this.bitLength) { - return a >> nb; - } else { - return this.zero; - } - } - } - - shr(a, b) { - if (Number(b) < this.bitLength) { - return a >> b; - } else { - const nb = this.p - b; - if (Number(nb) < this.bitLength) { - const res = (a << nb) & this.mask; - return res >= this.p ? res - this.p : res; - } else { - return 0; - } - } - } - - land(a, b) { - return a && b ? this.one : this.zero; - } - - lor(a, b) { - return a || b ? this.one : this.zero; - } - - lnot(a) { - return a ? this.zero : this.one; - } - - sqrt_old(n) { - if (n == this.zero) return this.zero; - - // Test that have solution - const res = this.pow(n, this.negone >> this.one); - if (res != this.one) return null; - - let m = this.s; - let c = this.nqr_to_t; - let t = this.pow(n, this.t); - let r = this.pow(n, this.add(this.t, this.one) >> this.one); - - while (t != this.one) { - let sq = this.square(t); - let i = 1; - while (sq != this.one) { - i++; - sq = this.square(sq); - } - - // b = c ^ m-i-1 - let b = c; - for (let j = 0; j < m - i - 1; j++) b = this.square(b); - - m = i; - c = this.square(b); - t = this.mul(t, c); - r = this.mul(r, b); - } - - if (r > this.p >> this.one) { - r = this.neg(r); - } - - return r; - } - - normalize(a, b) { - a = BigInt(a, b); - if (a < 0) { - let na = -a; - if (na >= this.p) na = na % this.p; - return this.p - na; - } else { - return a >= this.p ? a % this.p : a; - } - } - - random() { - const nBytes = (this.bitLength * 2) / 8; - let res = this.zero; - for (let i = 0; i < nBytes; i++) { - res = (res << BigInt(8)) + BigInt(getRandomBytes(1)[0]); - } - return res % this.p; - } - - toString(a, base) { - base = base || 10; - let vs; - if (a > this.half && base == 10) { - const v = this.p - a; - vs = "-" + v.toString(base); - } else { - vs = a.toString(base); - } - return vs; - } - - isZero(a) { - return a == this.zero; - } - - fromRng(rng) { - let v; - do { - v = this.zero; - for (let i = 0; i < this.n64; i++) { - v += rng.nextU64() << BigInt(64 * i); - } - v &= this.mask; - } while (v >= this.p); - v = (v * this.Ri) % this.p; // Convert from montgomery - return v; - } - - fft(a) { - return this.FFT.fft(a); - } - - ifft(a) { - return this.FFT.ifft(a); - } - - // Returns a buffer with Little Endian Representation - toRprLE(buff, o, e) { - toRprLE(buff, o, e, this.n64 * 8); - } - - // Returns a buffer with Big Endian Representation - toRprBE(buff, o, e) { - toRprBE(buff, o, e, this.n64 * 8); - } - - // Returns a buffer with Big Endian Montgomery Representation - toRprBEM(buff, o, e) { - return this.toRprBE(buff, o, this.mul(this.R, e)); - } - - toRprLEM(buff, o, e) { - return this.toRprLE(buff, o, this.mul(this.R, e)); - } - - // Pases a buffer with Little Endian Representation - fromRprLE(buff, o) { - return fromRprLE(buff, o, this.n8); - } - - // Pases a buffer with Big Endian Representation - fromRprBE(buff, o) { - return fromRprBE(buff, o, this.n8); - } - - fromRprLEM(buff, o) { - return this.mul(this.fromRprLE(buff, o), this.Ri); - } - - fromRprBEM(buff, o) { - return this.mul(this.fromRprBE(buff, o), this.Ri); - } - - toObject(a) { - return a; - } -} - -const Scalar = _Scalar; - -exports.F1Field = ZqField; -exports.Scalar = Scalar; -exports.ZqField = ZqField; diff --git a/build/main.esm.js b/build/main.esm.js deleted file mode 100644 index 958ea9b..0000000 --- a/build/main.esm.js +++ /dev/null @@ -1,1037 +0,0 @@ -/* global BigInt */ -const hexLen = [0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4]; - -function fromString(s, radix) { - if (!radix || radix == 10) { - return BigInt(s); - } else if (radix == 16) { - if (s.slice(0, 2) == "0x") { - return BigInt(s); - } else { - return BigInt("0x" + s); - } - } -} - -const e = fromString; - -function fromArray(a, radix) { - let acc = BigInt(0); - radix = BigInt(radix); - for (let i = 0; i < a.length; i++) { - acc = acc * radix + BigInt(a[i]); - } - return acc; -} - -function bitLength(a) { - const aS = a.toString(16); - return (aS.length - 1) * 4 + hexLen[parseInt(aS[0], 16)]; -} - -function isNegative(a) { - return BigInt(a) < BigInt(0); -} - -function isZero(a) { - return !a; -} - -function shiftLeft(a, n) { - return BigInt(a) << BigInt(n); -} - -function shiftRight(a, n) { - return BigInt(a) >> BigInt(n); -} - -const shl = shiftLeft; -const shr = shiftRight; - -function isOdd(a) { - return (BigInt(a) & BigInt(1)) == BigInt(1); -} - -function naf(n) { - let E = BigInt(n); - const res = []; - while (E) { - if (E & BigInt(1)) { - const z = 2 - Number(E % BigInt(4)); - res.push(z); - E = E - BigInt(z); - } else { - res.push(0); - } - E = E >> BigInt(1); - } - return res; -} - -function bits(n) { - let E = BigInt(n); - const res = []; - while (E) { - if (E & BigInt(1)) { - res.push(1); - } else { - res.push(0); - } - E = E >> BigInt(1); - } - return res; -} - -function toNumber(s) { - if (s > BigInt(Number.MAX_SAFE_INTEGER)) { - throw new Error("Number too big"); - } - return Number(s); -} - -function toArray(s, radix) { - const res = []; - let rem = BigInt(s); - radix = BigInt(radix); - while (rem) { - res.unshift(Number(rem % radix)); - rem = rem / radix; - } - return res; -} - -function add(a, b) { - return BigInt(a) + BigInt(b); -} - -function sub(a, b) { - return BigInt(a) - BigInt(b); -} - -function neg(a) { - return -BigInt(a); -} - -function mul(a, b) { - return BigInt(a) * BigInt(b); -} - -function square(a) { - return BigInt(a) * BigInt(a); -} - -function pow(a, b) { - return BigInt(a) ** BigInt(b); -} - -function exp$1(a, b) { - return BigInt(a) ** BigInt(b); -} - -function abs(a) { - return BigInt(a) >= 0 ? BigInt(a) : -BigInt(a); -} - -function div(a, b) { - return BigInt(a) / BigInt(b); -} - -function mod(a, b) { - return BigInt(a) % BigInt(b); -} - -function eq(a, b) { - return BigInt(a) == BigInt(b); -} - -function neq(a, b) { - return BigInt(a) != BigInt(b); -} - -function lt(a, b) { - return BigInt(a) < BigInt(b); -} - -function gt(a, b) { - return BigInt(a) > BigInt(b); -} - -function leq(a, b) { - return BigInt(a) <= BigInt(b); -} - -function geq(a, b) { - return BigInt(a) >= BigInt(b); -} - -function band(a, b) { - return BigInt(a) & BigInt(b); -} - -function bor(a, b) { - return BigInt(a) | BigInt(b); -} - -function bxor(a, b) { - return BigInt(a) ^ BigInt(b); -} - -function land(a, b) { - return BigInt(a) && BigInt(b); -} - -function lor(a, b) { - return BigInt(a) || BigInt(b); -} - -function lnot(a) { - return !BigInt(a); -} - -// Returns a buffer with Little Endian Representation -function toRprLE(buff, o, e, n8) { - const s = "0000000" + e.toString(16); - const v = new Uint32Array(buff.buffer, o, n8 / 4); - const l = (((s.length - 7) * 4 - 1) >> 5) + 1; // Number of 32bit words; - for (let i = 0; i < l; i++) v[i] = parseInt(s.substring(s.length - 8 * i - 8, s.length - 8 * i), 16); - for (let i = l; i < v.length; i++) v[i] = 0; - for (let i = v.length * 4; i < n8; i++) buff[i] = toNumber(band(shiftRight(e, i * 8), 0xff)); -} - -// Returns a buffer with Big Endian Representation -function toRprBE(buff, o, e, n8) { - const s = "0000000" + e.toString(16); - const v = new DataView(buff.buffer, buff.byteOffset + o, n8); - const l = (((s.length - 7) * 4 - 1) >> 5) + 1; // Number of 32bit words; - for (let i = 0; i < l; i++) v.setUint32(n8 - i * 4 - 4, parseInt(s.substring(s.length - 8 * i - 8, s.length - 8 * i), 16), false); - for (let i = 0; i < n8 / 4 - l; i++) v[i] = 0; -} - -// Pases a buffer with Little Endian Representation -function fromRprLE(buff, o, n8) { - n8 = n8 || buff.byteLength; - o = o || 0; - const v = new Uint32Array(buff.buffer, o, n8 / 4); - const a = new Array(n8 / 4); - v.forEach((ch, i) => (a[a.length - i - 1] = ch.toString(16).padStart(8, "0"))); - return fromString(a.join(""), 16); -} - -// Pases a buffer with Big Endian Representation -function fromRprBE(buff, o, n8) { - n8 = n8 || buff.byteLength; - o = o || 0; - const v = new DataView(buff.buffer, buff.byteOffset + o, n8); - const a = new Array(n8 / 4); - for (let i = 0; i < n8 / 4; i++) { - a[i] = v - .getUint32(i * 4, false) - .toString(16) - .padStart(8, "0"); - } - return fromString(a.join(""), 16); -} - -function toString(a, radix) { - return a.toString(radix); -} - -function toLEBuff(a) { - const buff = new Uint8Array(Math.floor((bitLength(a) - 1) / 8) + 1); - toRprLE(buff, 0, a, buff.byteLength); - return buff; -} - -const zero = e(0); -const one = e(1); - -var _Scalar = /*#__PURE__*/Object.freeze({ - __proto__: null, - abs: abs, - add: add, - band: band, - bitLength: bitLength, - bits: bits, - bor: bor, - bxor: bxor, - div: div, - e: e, - eq: eq, - exp: exp$1, - fromArray: fromArray, - fromRprBE: fromRprBE, - fromRprLE: fromRprLE, - fromString: fromString, - geq: geq, - gt: gt, - isNegative: isNegative, - isOdd: isOdd, - isZero: isZero, - land: land, - leq: leq, - lnot: lnot, - lor: lor, - lt: lt, - mod: mod, - mul: mul, - naf: naf, - neg: neg, - neq: neq, - one: one, - pow: pow, - shiftLeft: shiftLeft, - shiftRight: shiftRight, - shl: shl, - shr: shr, - square: square, - sub: sub, - toArray: toArray, - toLEBuff: toLEBuff, - toNumber: toNumber, - toRprBE: toRprBE, - toRprLE: toRprLE, - toString: toString, - zero: zero -}); - -/* - Copyright 2018 0kims association. - - This file is part of snarkjs. - - snarkjs is a free software: you can redistribute it and/or - modify it under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your option) - any later version. - - snarkjs is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. - - You should have received a copy of the GNU General Public License along with - snarkjs. If not, see . -*/ - -/* - This library does operations on polynomials with coefficients in a field F. - - A polynomial P(x) = p0 + p1 * x + p2 * x^2 + ... + pn * x^n is represented - by the array [ p0, p1, p2, ... , pn ]. - */ - -class FFT { - constructor(G, F, opMulGF) { - this.F = F; - this.G = G; - this.opMulGF = opMulGF; - - let rem = F.sqrt_t || F.t; - let s = F.sqrt_s || F.s; - - let nqr = F.one; - while (F.eq(F.pow(nqr, F.half), F.one)) nqr = F.add(nqr, F.one); - - this.w = new Array(s + 1); - this.wi = new Array(s + 1); - this.w[s] = this.F.pow(nqr, rem); - this.wi[s] = this.F.inv(this.w[s]); - - let n = s - 1; - while (n >= 0) { - this.w[n] = this.F.square(this.w[n + 1]); - this.wi[n] = this.F.square(this.wi[n + 1]); - n--; - } - - this.roots = []; - /* - for (let i=0; i<16; i++) { - let r = this.F.one; - n = 1 << i; - const rootsi = new Array(n); - for (let j=0; j= 0 && !this.roots[i]; i--) { - let r = this.F.one; - const nroots = 1 << i; - const rootsi = new Array(nroots); - for (let j = 0; j < nroots; j++) { - rootsi[j] = r; - r = this.F.mul(r, this.w[i]); - } - - this.roots[i] = rootsi; - } - } - - fft(p) { - if (p.length <= 1) return p; - const bits = log2(p.length - 1) + 1; - this._setRoots(bits); - - const m = 1 << bits; - if (p.length != m) { - throw new Error("Size must be multiple of 2"); - } - const res = __fft(this, p, bits, 0, 1); - return res; - } - - ifft(p) { - if (p.length <= 1) return p; - const bits = log2(p.length - 1) + 1; - this._setRoots(bits); - const m = 1 << bits; - if (p.length != m) { - throw new Error("Size must be multiple of 2"); - } - const res = __fft(this, p, bits, 0, 1); - const twoinvm = this.F.inv(this.F.mulScalar(this.F.one, m)); - const resn = new Array(m); - for (let i = 0; i < m; i++) { - resn[i] = this.opMulGF(res[(m - i) % m], twoinvm); - } - - return resn; - } -} - -function log2(V) { - return ( - ((V & 0xffff0000) !== 0 ? ((V &= 0xffff0000), 16) : 0) | - ((V & 0xff00ff00) !== 0 ? ((V &= 0xff00ff00), 8) : 0) | - ((V & 0xf0f0f0f0) !== 0 ? ((V &= 0xf0f0f0f0), 4) : 0) | - ((V & 0xcccccccc) !== 0 ? ((V &= 0xcccccccc), 2) : 0) | - ((V & 0xaaaaaaaa) !== 0) - ); -} - -function __fft(PF, pall, bits, offset, step) { - const n = 1 << bits; - if (n == 1) { - return [pall[offset]]; - } else if (n == 2) { - return [PF.G.add(pall[offset], pall[offset + step]), PF.G.sub(pall[offset], pall[offset + step])]; - } - - const ndiv2 = n >> 1; - const p1 = __fft(PF, pall, bits - 1, offset, step * 2); - const p2 = __fft(PF, pall, bits - 1, offset + step, step * 2); - - const out = new Array(n); - - for (let i = 0; i < ndiv2; i++) { - out[i] = PF.G.add(p1[i], PF.opMulGF(p2[i], PF.roots[bits][i])); - out[i + ndiv2] = PF.G.sub(p1[i], PF.opMulGF(p2[i], PF.roots[bits][i])); - } - - return out; -} - -// Check here: https://eprint.iacr.org/2012/685.pdf - -function buildSqrt(F) { - if (F.m % 2 == 1) { - if (eq(mod(F.p, 4), 1)) { - if (eq(mod(F.p, 8), 1)) { - if (eq(mod(F.p, 16), 1)) { - // alg7_muller(F); - alg5_tonelliShanks(F); - } else if (eq(mod(F.p, 16), 9)) { - alg4_kong(F); - } else { - throw new Error("Field withot sqrt"); - } - } else if (eq(mod(F.p, 8), 5)) { - alg3_atkin(F); - } else { - throw new Error("Field withot sqrt"); - } - } else if (eq(mod(F.p, 4), 3)) { - alg2_shanks(F); - } - } else { - const pm2mod4 = mod(pow(F.p, F.m / 2), 4); - if (pm2mod4 == 1) { - alg10_adj(F); - } else if (pm2mod4 == 3) { - alg9_adj(F); - } else { - alg8_complex(F); - } - } -} - -function alg5_tonelliShanks(F) { - F.sqrt_q = pow(F.p, F.m); - - F.sqrt_s = 0; - F.sqrt_t = sub(F.sqrt_q, 1); - - while (!isOdd(F.sqrt_t)) { - F.sqrt_s = F.sqrt_s + 1; - F.sqrt_t = div(F.sqrt_t, 2); - } - - let c0 = F.one; - - while (F.eq(c0, F.one)) { - const c = F.random(); - F.sqrt_z = F.pow(c, F.sqrt_t); - c0 = F.pow(F.sqrt_z, 2 ** (F.sqrt_s - 1)); - } - - F.sqrt_tm1d2 = div(sub(F.sqrt_t, 1), 2); - - F.sqrt = function (a) { - const F = this; - if (F.isZero(a)) return F.zero; - let w = F.pow(a, F.sqrt_tm1d2); - const a0 = F.pow(F.mul(F.square(w), a), 2 ** (F.sqrt_s - 1)); - if (F.eq(a0, F.negone)) return null; - - let v = F.sqrt_s; - let x = F.mul(a, w); - let b = F.mul(x, w); - let z = F.sqrt_z; - while (!F.eq(b, F.one)) { - let b2k = F.square(b); - let k = 1; - while (!F.eq(b2k, F.one)) { - b2k = F.square(b2k); - k++; - } - - w = z; - for (let i = 0; i < v - k - 1; i++) { - w = F.square(w); - } - z = F.square(w); - b = F.mul(b, z); - x = F.mul(x, w); - v = k; - } - return F.geq(x, F.zero) ? x : F.neg(x); - }; -} - -function alg4_kong(F) { - F.sqrt = function () { - throw new Error("Sqrt alg 4 not implemented"); - }; -} - -function alg3_atkin(F) { - F.sqrt = function () { - throw new Error("Sqrt alg 3 not implemented"); - }; -} - -function alg2_shanks(F) { - F.sqrt_q = pow(F.p, F.m); - F.sqrt_e1 = div(sub(F.sqrt_q, 3), 4); - - F.sqrt = function (a) { - if (this.isZero(a)) return this.zero; - - // Test that have solution - const a1 = this.pow(a, this.sqrt_e1); - - const a0 = this.mul(this.square(a1), a); - - if (this.eq(a0, this.negone)) return null; - - const x = this.mul(a1, a); - - return F.geq(x, F.zero) ? x : F.neg(x); - }; -} - -function alg10_adj(F) { - F.sqrt = function () { - throw new Error("Sqrt alg 10 not implemented"); - }; -} - -function alg9_adj(F) { - F.sqrt_q = pow(F.p, F.m / 2); - F.sqrt_e34 = div(sub(F.sqrt_q, 3), 4); - F.sqrt_e12 = div(sub(F.sqrt_q, 1), 2); - - F.frobenius = function (n, x) { - if (n % 2 == 1) { - return F.conjugate(x); - } else { - return x; - } - }; - - F.sqrt = function (a) { - const F = this; - const a1 = F.pow(a, F.sqrt_e34); - const alfa = F.mul(F.square(a1), a); - const a0 = F.mul(F.frobenius(1, alfa), alfa); - if (F.eq(a0, F.negone)) return null; - const x0 = F.mul(a1, a); - let x; - if (F.eq(alfa, F.negone)) { - x = F.mul(x0, [F.F.zero, F.F.one]); - } else { - const b = F.pow(F.add(F.one, alfa), F.sqrt_e12); - x = F.mul(b, x0); - } - return F.geq(x, F.zero) ? x : F.neg(x); - }; -} - -function alg8_complex(F) { - F.sqrt = function () { - throw new Error("Sqrt alg 8 not implemented"); - }; -} - -/* - Copyright 2018 0kims association. - - This file is part of snarkjs. - - snarkjs is a free software: you can redistribute it and/or - modify it under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your option) - any later version. - - snarkjs is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. - - You should have received a copy of the GNU General Public License along with - snarkjs. If not, see . -*/ - - -/* -exports.mulScalar = (F, base, e) =>{ - let res = F.zero; - let rem = bigInt(e); - let exp = base; - - while (! rem.eq(bigInt.zero)) { - if (rem.and(bigInt.one).eq(bigInt.one)) { - res = F.add(res, exp); - } - exp = F.double(exp); - rem = rem.shiftRight(1); - } - - return res; -}; -*/ - -function exp(F, base, e) { - if (isZero(e)) return F.one; - - const n = bits(e); - - if (n.length == 0) return F.one; - - let res = base; - - for (let i = n.length - 2; i >= 0; i--) { - res = F.square(res); - - if (n[i]) { - res = F.mul(res, base); - } - } - - return res; -} - -function getRandomBytes(n) { - let array = new Uint8Array(n); - // Browser & Node - if (typeof globalThis.crypto !== "undefined") { - // Supported - globalThis.crypto.getRandomValues(array); - } else { - // fallback - for (let i = 0; i < n; i++) { - array[i] = (Math.random() * 4294967296) >>> 0; - } - } - return array; -} - -/* global BigInt */ - -class ZqField { - constructor(p) { - this.type = "F1"; - this.one = BigInt(1); - this.zero = BigInt(0); - this.p = BigInt(p); - this.m = 1; - this.negone = this.p - this.one; - this.two = BigInt(2); - this.half = this.p >> this.one; - this.bitLength = bitLength(this.p); - this.mask = (this.one << BigInt(this.bitLength)) - this.one; - - this.n64 = Math.floor((this.bitLength - 1) / 64) + 1; - this.n32 = this.n64 * 2; - this.n8 = this.n64 * 8; - this.R = this.e(this.one << BigInt(this.n64 * 64)); - this.Ri = this.inv(this.R); - - const e = this.negone >> this.one; - this.nqr = this.two; - let r = this.pow(this.nqr, e); - while (!this.eq(r, this.negone)) { - this.nqr = this.nqr + this.one; - r = this.pow(this.nqr, e); - } - - this.s = 0; - this.t = this.negone; - - while ((this.t & this.one) == this.zero) { - this.s = this.s + 1; - this.t = this.t >> this.one; - } - - this.nqr_to_t = this.pow(this.nqr, this.t); - - buildSqrt(this); - - this.FFT = new FFT(this, this, this.mul.bind(this)); - - this.fft = this.FFT.fft.bind(this.FFT); - this.ifft = this.FFT.ifft.bind(this.FFT); - this.w = this.FFT.w; - this.wi = this.FFT.wi; - - this.shift = this.square(this.nqr); - this.k = this.exp(this.nqr, 2 ** this.s); - } - - e(a, b) { - let res; - if (!b) { - res = BigInt(a); - } else if (b == 16) { - res = BigInt("0x" + a); - } - if (res < 0) { - let nres = -res; - if (nres >= this.p) nres = nres % this.p; - return this.p - nres; - } else { - return res >= this.p ? res % this.p : res; - } - } - - add(a, b) { - const res = a + b; - return res >= this.p ? res - this.p : res; - } - - sub(a, b) { - return a >= b ? a - b : this.p - b + a; - } - - neg(a) { - return a ? this.p - a : a; - } - - mul(a, b) { - return (a * b) % this.p; - } - - mulScalar(base, s) { - return (base * this.e(s)) % this.p; - } - - square(a) { - return (a * a) % this.p; - } - - eq(a, b) { - return a == b; - } - - neq(a, b) { - return a != b; - } - - lt(a, b) { - const aa = a > this.half ? a - this.p : a; - const bb = b > this.half ? b - this.p : b; - return aa < bb; - } - - gt(a, b) { - const aa = a > this.half ? a - this.p : a; - const bb = b > this.half ? b - this.p : b; - return aa > bb; - } - - leq(a, b) { - const aa = a > this.half ? a - this.p : a; - const bb = b > this.half ? b - this.p : b; - return aa <= bb; - } - - geq(a, b) { - const aa = a > this.half ? a - this.p : a; - const bb = b > this.half ? b - this.p : b; - return aa >= bb; - } - - div(a, b) { - return this.mul(a, this.inv(b)); - } - - idiv(a, b) { - if (!b) throw new Error("Division by zero"); - return a / b; - } - - inv(a) { - if (!a) throw new Error("Division by zero"); - - let t = this.zero; - let r = this.p; - let newt = this.one; - let newr = a % this.p; - while (newr) { - let q = r / newr; - [t, newt] = [newt, t - q * newt]; - [r, newr] = [newr, r - q * newr]; - } - if (t < this.zero) t += this.p; - return t; - } - - mod(a, b) { - return a % b; - } - - pow(b, e) { - return exp(this, b, e); - } - - exp(b, e) { - return exp(this, b, e); - } - - band(a, b) { - const res = a & b & this.mask; - return res >= this.p ? res - this.p : res; - } - - bor(a, b) { - const res = (a | b) & this.mask; - return res >= this.p ? res - this.p : res; - } - - bxor(a, b) { - const res = (a ^ b) & this.mask; - return res >= this.p ? res - this.p : res; - } - - bnot(a) { - const res = a ^ this.mask; - return res >= this.p ? res - this.p : res; - } - - shl(a, b) { - if (Number(b) < this.bitLength) { - const res = (a << b) & this.mask; - return res >= this.p ? res - this.p : res; - } else { - const nb = this.p - b; - if (Number(nb) < this.bitLength) { - return a >> nb; - } else { - return this.zero; - } - } - } - - shr(a, b) { - if (Number(b) < this.bitLength) { - return a >> b; - } else { - const nb = this.p - b; - if (Number(nb) < this.bitLength) { - const res = (a << nb) & this.mask; - return res >= this.p ? res - this.p : res; - } else { - return 0; - } - } - } - - land(a, b) { - return a && b ? this.one : this.zero; - } - - lor(a, b) { - return a || b ? this.one : this.zero; - } - - lnot(a) { - return a ? this.zero : this.one; - } - - sqrt_old(n) { - if (n == this.zero) return this.zero; - - // Test that have solution - const res = this.pow(n, this.negone >> this.one); - if (res != this.one) return null; - - let m = this.s; - let c = this.nqr_to_t; - let t = this.pow(n, this.t); - let r = this.pow(n, this.add(this.t, this.one) >> this.one); - - while (t != this.one) { - let sq = this.square(t); - let i = 1; - while (sq != this.one) { - i++; - sq = this.square(sq); - } - - // b = c ^ m-i-1 - let b = c; - for (let j = 0; j < m - i - 1; j++) b = this.square(b); - - m = i; - c = this.square(b); - t = this.mul(t, c); - r = this.mul(r, b); - } - - if (r > this.p >> this.one) { - r = this.neg(r); - } - - return r; - } - - normalize(a, b) { - a = BigInt(a, b); - if (a < 0) { - let na = -a; - if (na >= this.p) na = na % this.p; - return this.p - na; - } else { - return a >= this.p ? a % this.p : a; - } - } - - random() { - const nBytes = (this.bitLength * 2) / 8; - let res = this.zero; - for (let i = 0; i < nBytes; i++) { - res = (res << BigInt(8)) + BigInt(getRandomBytes(1)[0]); - } - return res % this.p; - } - - toString(a, base) { - base = base || 10; - let vs; - if (a > this.half && base == 10) { - const v = this.p - a; - vs = "-" + v.toString(base); - } else { - vs = a.toString(base); - } - return vs; - } - - isZero(a) { - return a == this.zero; - } - - fromRng(rng) { - let v; - do { - v = this.zero; - for (let i = 0; i < this.n64; i++) { - v += rng.nextU64() << BigInt(64 * i); - } - v &= this.mask; - } while (v >= this.p); - v = (v * this.Ri) % this.p; // Convert from montgomery - return v; - } - - fft(a) { - return this.FFT.fft(a); - } - - ifft(a) { - return this.FFT.ifft(a); - } - - // Returns a buffer with Little Endian Representation - toRprLE(buff, o, e) { - toRprLE(buff, o, e, this.n64 * 8); - } - - // Returns a buffer with Big Endian Representation - toRprBE(buff, o, e) { - toRprBE(buff, o, e, this.n64 * 8); - } - - // Returns a buffer with Big Endian Montgomery Representation - toRprBEM(buff, o, e) { - return this.toRprBE(buff, o, this.mul(this.R, e)); - } - - toRprLEM(buff, o, e) { - return this.toRprLE(buff, o, this.mul(this.R, e)); - } - - // Pases a buffer with Little Endian Representation - fromRprLE(buff, o) { - return fromRprLE(buff, o, this.n8); - } - - // Pases a buffer with Big Endian Representation - fromRprBE(buff, o) { - return fromRprBE(buff, o, this.n8); - } - - fromRprLEM(buff, o) { - return this.mul(this.fromRprLE(buff, o), this.Ri); - } - - fromRprBEM(buff, o) { - return this.mul(this.fromRprBE(buff, o), this.Ri); - } - - toObject(a) { - return a; - } -} - -const Scalar = _Scalar; - -export { ZqField as F1Field, Scalar, ZqField }; diff --git a/package-lock.json b/package-lock.json index 595569b..c8921d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,20 +10,18 @@ "license": "GPL-3.0", "devDependencies": { "@rollup/plugin-terser": "^0.4.4", - "@toruslabs/eslint-config-javascript": "^4.0.3", - "@vitest/browser": "^2.1.8", - "@vitest/coverage-istanbul": "^2.1.8", - "chai": "^5.1.2", + "@toruslabs/eslint-config-javascript": "^4.0.4", + "@vitest/browser": "^3.0.0", + "@vitest/coverage-istanbul": "^3.0.0", "eslint": "^9.18.0", - "mocha": "^11.0.1", "playwright": "^1.49.1", "rimraf": "^6.0.1", "rollup": "^4.30.1", "tsx": "^4.19.2", - "vitest": "^2.1.8" + "vitest": "^3.0.0" }, "engines": { - "node": ">=18.x", + "node": ">=20.x", "npm": ">=9.x" } }, @@ -632,6 +630,22 @@ "node": ">=18" } }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.24.2.tgz", + "integrity": "sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@esbuild/netbsd-x64": { "version": "0.23.1", "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.23.1.tgz", @@ -1563,9 +1577,9 @@ } }, "node_modules/@toruslabs/eslint-config-javascript": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@toruslabs/eslint-config-javascript/-/eslint-config-javascript-4.0.3.tgz", - "integrity": "sha512-Cb39himN/5ypWkYCyl5md2wEmjPxwL1fKAsXH+lh4RQ0/qyLk28g0rHWbCNunaA5w7jRa0xxq+6pKKbqCb2HZQ==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@toruslabs/eslint-config-javascript/-/eslint-config-javascript-4.0.4.tgz", + "integrity": "sha512-W66bWstO2IEPr8CL82xZizaHoo20rO/hKKsPOL6YKH8+/McqDuounMtk6LzwOxMBd5+dkuhVRn9J48x3/A8MIQ==", "dev": true, "dependencies": { "@eslint/eslintrc": "^3.2.0", @@ -1573,7 +1587,7 @@ "@vitest/eslint-plugin": "^1.1.25", "eslint-config-prettier": "^10.0.1", "eslint-plugin-import": "^2.31.0", - "eslint-plugin-prettier": "^5.2.1", + "eslint-plugin-prettier": "^5.2.2", "eslint-plugin-promise": "^7.2.1", "eslint-plugin-simple-import-sort": "^12.1.1", "globals": "^15.14.0" @@ -1652,14 +1666,14 @@ "dev": true }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.19.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.19.1.tgz", - "integrity": "sha512-60L9KIuN/xgmsINzonOcMDSB8p82h95hoBfSBtXuO4jlR1R9L1xSkmVZKgCPVfavDlXihh4ARNjXhh1gGnLC7Q==", + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.20.0.tgz", + "integrity": "sha512-J7+VkpeGzhOt3FeG1+SzhiMj9NzGD/M6KoGn9f4dbz3YzK9hvbhVTmLj/HiTp9DazIzJ8B4XcM80LrR9Dm1rJw==", "dev": true, "peer": true, "dependencies": { - "@typescript-eslint/types": "8.19.1", - "@typescript-eslint/visitor-keys": "8.19.1" + "@typescript-eslint/types": "8.20.0", + "@typescript-eslint/visitor-keys": "8.20.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1670,9 +1684,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.19.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.19.1.tgz", - "integrity": "sha512-JBVHMLj7B1K1v1051ZaMMgLW4Q/jre5qGK0Ew6UgXz1Rqh+/xPzV1aW581OM00X6iOfyr1be+QyW8LOUf19BbA==", + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.20.0.tgz", + "integrity": "sha512-cqaMiY72CkP+2xZRrFt3ExRBu0WmVitN/rYPZErA80mHjHx/Svgp8yfbzkJmDoQ/whcytOPO9/IZXnOc+wigRA==", "dev": true, "peer": true, "engines": { @@ -1684,14 +1698,14 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.19.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.19.1.tgz", - "integrity": "sha512-jk/TZwSMJlxlNnqhy0Eod1PNEvCkpY6MXOXE/WLlblZ6ibb32i2We4uByoKPv1d0OD2xebDv4hbs3fm11SMw8Q==", + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.20.0.tgz", + "integrity": "sha512-Y7ncuy78bJqHI35NwzWol8E0X7XkRVS4K4P4TCyzWkOJih5NDvtoRDW4Ba9YJJoB2igm9yXDdYI/+fkiiAxPzA==", "dev": true, "peer": true, "dependencies": { - "@typescript-eslint/types": "8.19.1", - "@typescript-eslint/visitor-keys": "8.19.1", + "@typescript-eslint/types": "8.20.0", + "@typescript-eslint/visitor-keys": "8.20.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -1737,16 +1751,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.19.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.19.1.tgz", - "integrity": "sha512-IxG5gLO0Ne+KaUc8iW1A+XuKLd63o4wlbI1Zp692n1xojCl/THvgIKXJXBZixTh5dd5+yTJ/VXH7GJaaw21qXA==", + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.20.0.tgz", + "integrity": "sha512-dq70RUw6UK9ei7vxc4KQtBRk7qkHZv447OUZ6RPQMQl71I3NZxQJX/f32Smr+iqWrB02pHKn2yAdHBb0KNrRMA==", "dev": true, "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.19.1", - "@typescript-eslint/types": "8.19.1", - "@typescript-eslint/typescript-estree": "8.19.1" + "@typescript-eslint/scope-manager": "8.20.0", + "@typescript-eslint/types": "8.20.0", + "@typescript-eslint/typescript-estree": "8.20.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1761,13 +1775,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.19.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.19.1.tgz", - "integrity": "sha512-fzmjU8CHK853V/avYZAvuVut3ZTfwN5YtMaoi+X9Y9MA9keaWNHC3zEQ9zvyX/7Hj+5JkNyK1l7TOR2hevHB6Q==", + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.20.0.tgz", + "integrity": "sha512-v/BpkeeYAsPkKCkR8BDwcno0llhzWVqPOamQrAEMdpZav2Y9OVjd9dwJyBLJWwf335B5DmlifECIkZRJCaGaHA==", "dev": true, "peer": true, "dependencies": { - "@typescript-eslint/types": "8.19.1", + "@typescript-eslint/types": "8.20.0", "eslint-visitor-keys": "^4.2.0" }, "engines": { @@ -1792,19 +1806,19 @@ } }, "node_modules/@vitest/browser": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/@vitest/browser/-/browser-2.1.8.tgz", - "integrity": "sha512-OWVvEJThRgxlNMYNVLEK/9qVkpRcLvyuKLngIV3Hob01P56NjPHprVBYn+rx4xAJudbM9yrCrywPIEuA3Xyo8A==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@vitest/browser/-/browser-3.0.0.tgz", + "integrity": "sha512-/Em4RetbL1tM4qwkFTRA003+cll944Ka4eUm89vVGf1FNHe4xxnLkQ7VvoNzEfwmLfVSVP3J3ZhtRcNP7ikI9A==", "dev": true, "dependencies": { "@testing-library/dom": "^10.4.0", "@testing-library/user-event": "^14.5.2", - "@vitest/mocker": "2.1.8", - "@vitest/utils": "2.1.8", - "magic-string": "^0.30.12", - "msw": "^2.6.4", + "@vitest/mocker": "3.0.0", + "@vitest/utils": "3.0.0", + "magic-string": "^0.30.17", + "msw": "^2.7.0", "sirv": "^3.0.0", - "tinyrainbow": "^1.2.0", + "tinyrainbow": "^2.0.0", "ws": "^8.18.0" }, "funding": { @@ -1812,7 +1826,7 @@ }, "peerDependencies": { "playwright": "*", - "vitest": "2.1.8", + "vitest": "3.0.0", "webdriverio": "*" }, "peerDependenciesMeta": { @@ -1828,13 +1842,13 @@ } }, "node_modules/@vitest/coverage-istanbul": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/@vitest/coverage-istanbul/-/coverage-istanbul-2.1.8.tgz", - "integrity": "sha512-cSaCd8KcWWvgDwEJSXm0NEWZ1YTiJzjicKHy+zOEbUm0gjbbkz+qJf1p8q71uBzSlS7vdnZA8wRLeiwVE3fFTA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@vitest/coverage-istanbul/-/coverage-istanbul-3.0.0.tgz", + "integrity": "sha512-PhGp29ZRfJAoTG/y3AMSmUcduroQnk2vV82xvUljtjFFVfA5iDvOBfPRKOK0aLWYpOpnvbO9C4xXAm8UVijCQQ==", "dev": true, "dependencies": { "@istanbuljs/schema": "^0.1.3", - "debug": "^4.3.7", + "debug": "^4.4.0", "istanbul-lib-coverage": "^3.2.2", "istanbul-lib-instrument": "^6.0.3", "istanbul-lib-report": "^3.0.1", @@ -1842,13 +1856,13 @@ "istanbul-reports": "^3.1.7", "magicast": "^0.3.5", "test-exclude": "^7.0.1", - "tinyrainbow": "^1.2.0" + "tinyrainbow": "^2.0.0" }, "funding": { "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "vitest": "2.1.8" + "vitest": "3.0.0" } }, "node_modules/@vitest/eslint-plugin": { @@ -1872,36 +1886,36 @@ } }, "node_modules/@vitest/expect": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.1.8.tgz", - "integrity": "sha512-8ytZ/fFHq2g4PJVAtDX57mayemKgDR6X3Oa2Foro+EygiOJHUXhCqBAAKQYYajZpFoIfvBCF1j6R6IYRSIUFuw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.0.0.tgz", + "integrity": "sha512-Qx+cHyB59mWrQywT3/dZIIpSKwIpWbYFdBX2zixMYpOGZmbaP2jbbd4i/TAKJq/jBgSfww++d6YnrlGMFb2XBg==", "dev": true, "dependencies": { - "@vitest/spy": "2.1.8", - "@vitest/utils": "2.1.8", + "@vitest/spy": "3.0.0", + "@vitest/utils": "3.0.0", "chai": "^5.1.2", - "tinyrainbow": "^1.2.0" + "tinyrainbow": "^2.0.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/mocker": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-2.1.8.tgz", - "integrity": "sha512-7guJ/47I6uqfttp33mgo6ga5Gr1VnL58rcqYKyShoRK9ebu8T5Rs6HN3s1NABiBeVTdWNrwUMcHH54uXZBN4zA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.0.0.tgz", + "integrity": "sha512-8ytqYjIRzAM90O7n8A0TCbziTnouIG+UGuMHmoRJpKh4vvah4uENw5UAMMNjdKCtzgMiTrZ9XU+xzwCwcxuxGQ==", "dev": true, "dependencies": { - "@vitest/spy": "2.1.8", + "@vitest/spy": "3.0.0", "estree-walker": "^3.0.3", - "magic-string": "^0.30.12" + "magic-string": "^0.30.17" }, "funding": { "url": "https://opencollective.com/vitest" }, "peerDependencies": { "msw": "^2.4.9", - "vite": "^5.0.0" + "vite": "^5.0.0 || ^6.0.0" }, "peerDependenciesMeta": { "msw": { @@ -1913,48 +1927,48 @@ } }, "node_modules/@vitest/pretty-format": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.8.tgz", - "integrity": "sha512-9HiSZ9zpqNLKlbIDRWOnAWqgcA7xu+8YxXSekhr0Ykab7PAYFkhkwoqVArPOtJhPmYeE2YHgKZlj3CP36z2AJQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.0.0.tgz", + "integrity": "sha512-24y+MS04ZHZbbbfAvfpi9hM2oULePbiL6Dir8r1nFMN97hxuL0gEXKWRGmlLPwzKDtaOKNjtyTx0+GiZcWCxDA==", "dev": true, "dependencies": { - "tinyrainbow": "^1.2.0" + "tinyrainbow": "^2.0.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/runner": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.1.8.tgz", - "integrity": "sha512-17ub8vQstRnRlIU5k50bG+QOMLHRhYPAna5tw8tYbj+jzjcspnwnwtPtiOlkuKC4+ixDPTuLZiqiWWQ2PSXHVg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.0.0.tgz", + "integrity": "sha512-6MCYobtatsgG3DlM+dk6njP+R+28iSUqWbJzXp/nuOy6SkAKzJ1wby3fDgimmy50TeK8g6y+E6rP12REyinYPw==", "dev": true, "dependencies": { - "@vitest/utils": "2.1.8", - "pathe": "^1.1.2" + "@vitest/utils": "3.0.0", + "pathe": "^2.0.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/snapshot": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.1.8.tgz", - "integrity": "sha512-20T7xRFbmnkfcmgVEz+z3AU/3b0cEzZOt/zmnvZEctg64/QZbSDJEVm9fLnnlSi74KibmRsO9/Qabi+t0vCRPg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.0.0.tgz", + "integrity": "sha512-W0X6fJFJ3RbSThncSYUNSnXkMJFyXX9sOvxP1HSQRsWCLB1U3JnZc0SrLpLzcyByMUDXHsiXQ+x+xsr/G5fXNw==", "dev": true, "dependencies": { - "@vitest/pretty-format": "2.1.8", - "magic-string": "^0.30.12", - "pathe": "^1.1.2" + "@vitest/pretty-format": "3.0.0", + "magic-string": "^0.30.17", + "pathe": "^2.0.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/spy": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.1.8.tgz", - "integrity": "sha512-5swjf2q95gXeYPevtW0BLk6H8+bPlMb4Vw/9Em4hFxDcaOxS+e0LOX4yqNxoHzMR2akEB2xfpnWUzkZokmgWDg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.0.0.tgz", + "integrity": "sha512-pfK5O3lRqeCG8mbV+Lr8lLUBicFRm5TlggF7bLZpzpo111LKhMN/tZRXvyOGOgbktxAR9bTf4x8U6RtHuFBTVA==", "dev": true, "dependencies": { "tinyspy": "^3.0.2" @@ -1964,14 +1978,14 @@ } }, "node_modules/@vitest/utils": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.1.8.tgz", - "integrity": "sha512-dwSoui6djdwbfFmIgbIjX2ZhIoG7Ex/+xpxyiEgIGzjliY8xGkcpITKTlp6B4MgtGkF2ilvm97cPM96XZaAgcA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.0.0.tgz", + "integrity": "sha512-l300v2/4diHyv5ZiQOj6y/H6VbaTWM6i1c2lC3lUZ5nn9rv9C+WneS/wqyaGLwM37reoh/QkrrYMSMKdfnDZpw==", "dev": true, "dependencies": { - "@vitest/pretty-format": "2.1.8", + "@vitest/pretty-format": "3.0.0", "loupe": "^3.1.2", - "tinyrainbow": "^1.2.0" + "tinyrainbow": "^2.0.0" }, "funding": { "url": "https://opencollective.com/vitest" @@ -2014,15 +2028,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/ansi-colors": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -2074,19 +2079,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -2245,18 +2237,6 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -2272,6 +2252,7 @@ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, + "peer": true, "dependencies": { "fill-range": "^7.1.1" }, @@ -2279,12 +2260,6 @@ "node": ">=8" } }, - "node_modules/browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, "node_modules/browserslist": { "version": "4.24.4", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz", @@ -2388,18 +2363,6 @@ "node": ">=6" } }, - "node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/caniuse-lite": { "version": "1.0.30001692", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001692.tgz", @@ -2461,45 +2424,6 @@ "node": ">= 16" } }, - "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/cli-width": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", @@ -2509,17 +2433,6 @@ "node": ">= 12" } }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -2647,18 +2560,6 @@ } } }, - "node_modules/decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/deep-eql": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", @@ -2717,15 +2618,6 @@ "node": ">=6" } }, - "node_modules/diff": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", - "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, "node_modules/doctrine": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", @@ -3148,9 +3040,9 @@ } }, "node_modules/eslint-plugin-prettier": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz", - "integrity": "sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.2.tgz", + "integrity": "sha512-1yI3/hf35wmlq66C8yOyrujQnel+v5l1Vop5Cl2I6ylyNTT1JbuUUnV3/41PzwTzcyDp/oF0jWE3HXvcH5AQOQ==", "dev": true, "dependencies": { "prettier-linter-helpers": "^1.0.0", @@ -3414,6 +3306,7 @@ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, + "peer": true, "dependencies": { "to-regex-range": "^5.0.1" }, @@ -3437,15 +3330,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "bin": { - "flat": "cli.js" - } - }, "node_modules/flat-cache": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", @@ -3819,15 +3703,6 @@ "node": ">= 0.4" } }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, - "bin": { - "he": "bin/he" - } - }, "node_modules/headers-polyfill": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/headers-polyfill/-/headers-polyfill-4.0.3.tgz", @@ -3938,18 +3813,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/is-boolean-object": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.1.tgz", @@ -4112,6 +3975,7 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, + "peer": true, "engines": { "node": ">=0.12.0" } @@ -4132,15 +3996,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/is-regex": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", @@ -4234,18 +4089,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-weakmap": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", @@ -4485,22 +4328,6 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/loupe": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.2.tgz", @@ -4620,77 +4447,6 @@ "node": ">=16 || 14 >=14.17" } }, - "node_modules/mocha": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.0.1.tgz", - "integrity": "sha512-+3GkODfsDG71KSCQhc4IekSW+ItCK/kiez1Z28ksWvYhKXV/syxMlerR/sC7whDp7IyreZ4YxceMLdTs5hQE8A==", - "dev": true, - "dependencies": { - "ansi-colors": "^4.1.3", - "browser-stdout": "^1.3.1", - "chokidar": "^3.5.3", - "debug": "^4.3.5", - "diff": "^5.2.0", - "escape-string-regexp": "^4.0.0", - "find-up": "^5.0.0", - "glob": "^10.4.5", - "he": "^1.2.0", - "js-yaml": "^4.1.0", - "log-symbols": "^4.1.0", - "minimatch": "^5.1.6", - "ms": "^2.1.3", - "serialize-javascript": "^6.0.2", - "strip-json-comments": "^3.1.1", - "supports-color": "^8.1.1", - "workerpool": "^6.5.1", - "yargs": "^16.2.0", - "yargs-parser": "^20.2.9", - "yargs-unparser": "^2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/mocha/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/mocha/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/mocha/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, "node_modules/mrmime": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", @@ -4830,15 +4586,6 @@ "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", "dev": true }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object-inspect": { "version": "1.13.3", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", @@ -5065,9 +4812,9 @@ "dev": true }, "node_modules/pathe": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", - "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.1.tgz", + "integrity": "sha512-6jpjMpOth5S9ITVu5clZ7NOgHNsv5vRQdheL9ztp2vZmM6fRbLvyua1tiBIL4lk8SAe3ARzeXEly6siXCjDHDw==", "dev": true }, "node_modules/pathval": { @@ -5090,6 +4837,7 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, + "peer": true, "engines": { "node": ">=8.6" }, @@ -5304,18 +5052,6 @@ "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", "dev": true }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, "node_modules/reflect.getprototypeof": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", @@ -6171,9 +5907,9 @@ } }, "node_modules/tinyrainbow": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-1.2.0.tgz", - "integrity": "sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-2.0.0.tgz", + "integrity": "sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==", "dev": true, "engines": { "node": ">=14.0.0" @@ -6193,6 +5929,7 @@ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, + "peer": true, "dependencies": { "is-number": "^7.0.0" }, @@ -6470,20 +6207,20 @@ } }, "node_modules/vite": { - "version": "5.4.11", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz", - "integrity": "sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==", + "version": "6.0.7", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.0.7.tgz", + "integrity": "sha512-RDt8r/7qx9940f8FcOIAH9PTViRrghKaK2K1jY3RaAURrEUbm9Du1mJ72G+jlhtG3WwodnfzY8ORQZbBavZEAQ==", "dev": true, "dependencies": { - "esbuild": "^0.21.3", - "postcss": "^8.4.43", - "rollup": "^4.20.0" + "esbuild": "^0.24.2", + "postcss": "^8.4.49", + "rollup": "^4.23.0" }, "bin": { "vite": "bin/vite.js" }, "engines": { - "node": "^18.0.0 || >=20.0.0" + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" }, "funding": { "url": "https://github.com/vitejs/vite?sponsor=1" @@ -6492,19 +6229,25 @@ "fsevents": "~2.3.3" }, "peerDependencies": { - "@types/node": "^18.0.0 || >=20.0.0", + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "jiti": ">=1.21.0", "less": "*", "lightningcss": "^1.21.0", "sass": "*", "sass-embedded": "*", "stylus": "*", "sugarss": "*", - "terser": "^5.4.0" + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" }, "peerDependenciesMeta": { "@types/node": { "optional": true }, + "jiti": { + "optional": true + }, "less": { "optional": true }, @@ -6525,35 +6268,41 @@ }, "terser": { "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true } } }, "node_modules/vite-node": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.1.8.tgz", - "integrity": "sha512-uPAwSr57kYjAUux+8E2j0q0Fxpn8M9VoyfGiRI8Kfktz9NcYMCenwY5RnZxnF1WTu3TGiYipirIzacLL3VVGFg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.0.0.tgz", + "integrity": "sha512-V5p05fpAzkHM3aYChsHWV1RTeLAhPejbKX6MqiWWyuIfNcDgXq5p0GnYV6Wa4OAU588XC70XCJB9chRZsOh4yg==", "dev": true, "dependencies": { "cac": "^6.7.14", - "debug": "^4.3.7", + "debug": "^4.4.0", "es-module-lexer": "^1.5.4", - "pathe": "^1.1.2", - "vite": "^5.0.0" + "pathe": "^2.0.0", + "vite": "^5.0.0 || ^6.0.0" }, "bin": { "vite-node": "vite-node.mjs" }, "engines": { - "node": "^18.0.0 || >=20.0.0" + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/vite/node_modules/@esbuild/aix-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", - "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.2.tgz", + "integrity": "sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==", "cpu": [ "ppc64" ], @@ -6563,13 +6312,13 @@ "aix" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/vite/node_modules/@esbuild/android-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", - "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.2.tgz", + "integrity": "sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==", "cpu": [ "arm" ], @@ -6579,13 +6328,13 @@ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/vite/node_modules/@esbuild/android-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", - "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.2.tgz", + "integrity": "sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==", "cpu": [ "arm64" ], @@ -6595,13 +6344,13 @@ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/vite/node_modules/@esbuild/android-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", - "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.2.tgz", + "integrity": "sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==", "cpu": [ "x64" ], @@ -6611,13 +6360,13 @@ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/vite/node_modules/@esbuild/darwin-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", - "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.2.tgz", + "integrity": "sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==", "cpu": [ "arm64" ], @@ -6627,13 +6376,13 @@ "darwin" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/vite/node_modules/@esbuild/darwin-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", - "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.2.tgz", + "integrity": "sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==", "cpu": [ "x64" ], @@ -6643,13 +6392,13 @@ "darwin" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/vite/node_modules/@esbuild/freebsd-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", - "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.2.tgz", + "integrity": "sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==", "cpu": [ "arm64" ], @@ -6659,13 +6408,13 @@ "freebsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/vite/node_modules/@esbuild/freebsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", - "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.2.tgz", + "integrity": "sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==", "cpu": [ "x64" ], @@ -6675,13 +6424,13 @@ "freebsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/vite/node_modules/@esbuild/linux-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", - "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.2.tgz", + "integrity": "sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==", "cpu": [ "arm" ], @@ -6691,13 +6440,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/vite/node_modules/@esbuild/linux-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", - "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.2.tgz", + "integrity": "sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==", "cpu": [ "arm64" ], @@ -6707,13 +6456,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/vite/node_modules/@esbuild/linux-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", - "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.2.tgz", + "integrity": "sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==", "cpu": [ "ia32" ], @@ -6723,13 +6472,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/vite/node_modules/@esbuild/linux-loong64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", - "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.2.tgz", + "integrity": "sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==", "cpu": [ "loong64" ], @@ -6739,13 +6488,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/vite/node_modules/@esbuild/linux-mips64el": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", - "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.2.tgz", + "integrity": "sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==", "cpu": [ "mips64el" ], @@ -6755,13 +6504,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/vite/node_modules/@esbuild/linux-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", - "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.2.tgz", + "integrity": "sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==", "cpu": [ "ppc64" ], @@ -6771,13 +6520,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/vite/node_modules/@esbuild/linux-riscv64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", - "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.2.tgz", + "integrity": "sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==", "cpu": [ "riscv64" ], @@ -6787,13 +6536,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/vite/node_modules/@esbuild/linux-s390x": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", - "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.2.tgz", + "integrity": "sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==", "cpu": [ "s390x" ], @@ -6803,13 +6552,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/vite/node_modules/@esbuild/linux-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", - "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.2.tgz", + "integrity": "sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==", "cpu": [ "x64" ], @@ -6819,13 +6568,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/vite/node_modules/@esbuild/netbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", - "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.2.tgz", + "integrity": "sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==", "cpu": [ "x64" ], @@ -6835,13 +6584,29 @@ "netbsd" ], "engines": { - "node": ">=12" + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/openbsd-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.2.tgz", + "integrity": "sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" } }, "node_modules/vite/node_modules/@esbuild/openbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", - "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.2.tgz", + "integrity": "sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==", "cpu": [ "x64" ], @@ -6851,13 +6616,13 @@ "openbsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/vite/node_modules/@esbuild/sunos-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", - "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.2.tgz", + "integrity": "sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==", "cpu": [ "x64" ], @@ -6867,13 +6632,13 @@ "sunos" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/vite/node_modules/@esbuild/win32-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", - "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.2.tgz", + "integrity": "sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==", "cpu": [ "arm64" ], @@ -6883,13 +6648,13 @@ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/vite/node_modules/@esbuild/win32-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", - "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.2.tgz", + "integrity": "sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==", "cpu": [ "ia32" ], @@ -6899,13 +6664,13 @@ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/vite/node_modules/@esbuild/win32-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", - "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.2.tgz", + "integrity": "sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==", "cpu": [ "x64" ], @@ -6915,88 +6680,90 @@ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/vite/node_modules/esbuild": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", - "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.2.tgz", + "integrity": "sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==", "dev": true, "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" }, "engines": { - "node": ">=12" + "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.21.5", - "@esbuild/android-arm": "0.21.5", - "@esbuild/android-arm64": "0.21.5", - "@esbuild/android-x64": "0.21.5", - "@esbuild/darwin-arm64": "0.21.5", - "@esbuild/darwin-x64": "0.21.5", - "@esbuild/freebsd-arm64": "0.21.5", - "@esbuild/freebsd-x64": "0.21.5", - "@esbuild/linux-arm": "0.21.5", - "@esbuild/linux-arm64": "0.21.5", - "@esbuild/linux-ia32": "0.21.5", - "@esbuild/linux-loong64": "0.21.5", - "@esbuild/linux-mips64el": "0.21.5", - "@esbuild/linux-ppc64": "0.21.5", - "@esbuild/linux-riscv64": "0.21.5", - "@esbuild/linux-s390x": "0.21.5", - "@esbuild/linux-x64": "0.21.5", - "@esbuild/netbsd-x64": "0.21.5", - "@esbuild/openbsd-x64": "0.21.5", - "@esbuild/sunos-x64": "0.21.5", - "@esbuild/win32-arm64": "0.21.5", - "@esbuild/win32-ia32": "0.21.5", - "@esbuild/win32-x64": "0.21.5" + "@esbuild/aix-ppc64": "0.24.2", + "@esbuild/android-arm": "0.24.2", + "@esbuild/android-arm64": "0.24.2", + "@esbuild/android-x64": "0.24.2", + "@esbuild/darwin-arm64": "0.24.2", + "@esbuild/darwin-x64": "0.24.2", + "@esbuild/freebsd-arm64": "0.24.2", + "@esbuild/freebsd-x64": "0.24.2", + "@esbuild/linux-arm": "0.24.2", + "@esbuild/linux-arm64": "0.24.2", + "@esbuild/linux-ia32": "0.24.2", + "@esbuild/linux-loong64": "0.24.2", + "@esbuild/linux-mips64el": "0.24.2", + "@esbuild/linux-ppc64": "0.24.2", + "@esbuild/linux-riscv64": "0.24.2", + "@esbuild/linux-s390x": "0.24.2", + "@esbuild/linux-x64": "0.24.2", + "@esbuild/netbsd-arm64": "0.24.2", + "@esbuild/netbsd-x64": "0.24.2", + "@esbuild/openbsd-arm64": "0.24.2", + "@esbuild/openbsd-x64": "0.24.2", + "@esbuild/sunos-x64": "0.24.2", + "@esbuild/win32-arm64": "0.24.2", + "@esbuild/win32-ia32": "0.24.2", + "@esbuild/win32-x64": "0.24.2" } }, "node_modules/vitest": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.1.8.tgz", - "integrity": "sha512-1vBKTZskHw/aosXqQUlVWWlGUxSJR8YtiyZDJAFeW2kPAeX6S3Sool0mjspO+kXLuxVWlEDDowBAeqeAQefqLQ==", - "dev": true, - "dependencies": { - "@vitest/expect": "2.1.8", - "@vitest/mocker": "2.1.8", - "@vitest/pretty-format": "^2.1.8", - "@vitest/runner": "2.1.8", - "@vitest/snapshot": "2.1.8", - "@vitest/spy": "2.1.8", - "@vitest/utils": "2.1.8", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.0.0.tgz", + "integrity": "sha512-fwfPif+EV0jyms9h1Crb6rwJttH/KBzKrcUesjxHgldmc6R0FaMNLsd+Rgc17NoxzLcb/sYE2Xs9NQ/vnTBf6Q==", + "dev": true, + "dependencies": { + "@vitest/expect": "3.0.0", + "@vitest/mocker": "3.0.0", + "@vitest/pretty-format": "^3.0.0", + "@vitest/runner": "3.0.0", + "@vitest/snapshot": "3.0.0", + "@vitest/spy": "3.0.0", + "@vitest/utils": "3.0.0", "chai": "^5.1.2", - "debug": "^4.3.7", + "debug": "^4.4.0", "expect-type": "^1.1.0", - "magic-string": "^0.30.12", - "pathe": "^1.1.2", + "magic-string": "^0.30.17", + "pathe": "^2.0.0", "std-env": "^3.8.0", "tinybench": "^2.9.0", - "tinyexec": "^0.3.1", - "tinypool": "^1.0.1", - "tinyrainbow": "^1.2.0", - "vite": "^5.0.0", - "vite-node": "2.1.8", + "tinyexec": "^0.3.2", + "tinypool": "^1.0.2", + "tinyrainbow": "^2.0.0", + "vite": "^5.0.0 || ^6.0.0", + "vite-node": "3.0.0", "why-is-node-running": "^2.3.0" }, "bin": { "vitest": "vitest.mjs" }, "engines": { - "node": "^18.0.0 || >=20.0.0" + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" }, "funding": { "url": "https://opencollective.com/vitest" }, "peerDependencies": { "@edge-runtime/vm": "*", - "@types/node": "^18.0.0 || >=20.0.0", - "@vitest/browser": "2.1.8", - "@vitest/ui": "2.1.8", + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "@vitest/browser": "3.0.0", + "@vitest/ui": "3.0.0", "happy-dom": "*", "jsdom": "*" }, @@ -7145,12 +6912,6 @@ "node": ">=0.10.0" } }, - "node_modules/workerpool": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", - "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", - "dev": true - }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -7222,48 +6983,6 @@ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true }, - "node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index 9ed60f5..df417ab 100644 --- a/package.json +++ b/package.json @@ -40,15 +40,15 @@ "homepage": "https://github.com/iden3/ffjs#readme", "devDependencies": { "@rollup/plugin-terser": "^0.4.4", - "@toruslabs/eslint-config-javascript": "^4.0.3", - "@vitest/browser": "^2.1.8", - "@vitest/coverage-istanbul": "^2.1.8", + "@toruslabs/eslint-config-javascript": "^4.0.4", + "@vitest/browser": "^3.0.0", + "@vitest/coverage-istanbul": "^3.0.0", "eslint": "^9.18.0", "playwright": "^1.49.1", "rimraf": "^6.0.1", "rollup": "^4.30.1", "tsx": "^4.19.2", - "vitest": "^2.1.8" + "vitest": "^3.0.0" }, "publishConfig": { "access": "public" diff --git a/rollup.config.mjs b/rollup.config.mjs index 3c796e2..0efc3b5 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -11,14 +11,6 @@ export default [ { input: "main.js", output: [ - { - file: "build/main.cjs.js", - format: "cjs", - }, - { - file: "build/main.esm.js", - format: "esm", - }, { dir: "build/lib.cjs", format: "cjs",