@viji-dev/core 0.8.16 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -24
- package/dist/artist-dts-p5.js +1 -1
- package/dist/artist-dts.js +1 -1
- package/dist/artist-global-p5.d.ts +1 -1
- package/dist/artist-global.d.ts +1 -1
- package/dist/assets/{viji.worker-BEba5y4h.js → viji.worker-DYCbS06e.js} +205 -191
- package/dist/docs-api.js +2 -2
- package/dist/{essentia-wasm.web-Bt54HQaY.js → essentia-wasm.web-OmHe6rAT.js} +2 -2
- package/dist/{index-f5EKzN3f.js → index-CAx7Pxyl.js} +869 -513
- package/dist/index.d.ts +137 -47
- package/dist/index.js +1 -1
- package/package.json +2 -1
|
@@ -13,7 +13,7 @@ function as(t) {
|
|
|
13
13
|
}
|
|
14
14
|
throw new Error(`Invalid color input: expected string or object, got ${typeof t}`);
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function xn(t) {
|
|
17
17
|
const e = /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(t);
|
|
18
18
|
if (!e)
|
|
19
19
|
throw new Error(`Expected canonical hex '#rrggbb', got: ${t}`);
|
|
@@ -24,7 +24,7 @@ function Sn(t) {
|
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
function fi(t) {
|
|
27
|
-
const { r: e, g: n, b: r } =
|
|
27
|
+
const { r: e, g: n, b: r } = xn(t), i = e / 255, o = n / 255, c = r / 255, u = Math.max(i, o, c), h = Math.min(i, o, c), f = u - h;
|
|
28
28
|
let m = 0;
|
|
29
29
|
f > 0 && (u === i ? m = (o - c) / f % 6 : u === o ? m = (c - i) / f + 2 : m = (i - o) / f + 4, m *= 60, m < 0 && (m += 360));
|
|
30
30
|
const g = u === 0 ? 0 : f / u * 100, v = u * 100;
|
|
@@ -35,10 +35,10 @@ function fi(t) {
|
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
function kc(t) {
|
|
38
|
-
const { r: e, g: n, b: r } =
|
|
38
|
+
const { r: e, g: n, b: r } = xn(t);
|
|
39
39
|
return [e / 255, n / 255, r / 255];
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function un(t, e, n) {
|
|
42
42
|
const r = Hr(t, "r"), i = Hr(e, "g"), o = Hr(n, "b");
|
|
43
43
|
return "#" + Gr(r) + Gr(i) + Gr(o);
|
|
44
44
|
}
|
|
@@ -53,7 +53,7 @@ function co(t, e, n) {
|
|
|
53
53
|
let f = 0, m = 0, g = 0;
|
|
54
54
|
u < 1 ? (f = c, m = h, g = 0) : u < 2 ? (f = h, m = c, g = 0) : u < 3 ? (f = 0, m = c, g = h) : u < 4 ? (f = 0, m = h, g = c) : u < 5 ? (f = h, m = 0, g = c) : (f = c, m = 0, g = h);
|
|
55
55
|
const v = o - c;
|
|
56
|
-
return
|
|
56
|
+
return un(
|
|
57
57
|
Math.round((f + v) * 255),
|
|
58
58
|
Math.round((m + v) * 255),
|
|
59
59
|
Math.round((g + v) * 255)
|
|
@@ -95,7 +95,7 @@ function Ec(t) {
|
|
|
95
95
|
if (e.length !== 3)
|
|
96
96
|
throw new Error(`rgb() requires 3 arguments, got ${e.length}: rgb(${t})`);
|
|
97
97
|
const n = Ge(e[0], "r"), r = Ge(e[1], "g"), i = Ge(e[2], "b");
|
|
98
|
-
return
|
|
98
|
+
return un(n, r, i);
|
|
99
99
|
}
|
|
100
100
|
function Tc(t) {
|
|
101
101
|
const e = $n(t);
|
|
@@ -118,7 +118,7 @@ function xc(t) {
|
|
|
118
118
|
const n = Ge(e[0], "r"), r = Ge(e[1], "g"), i = Ge(e[2], "b");
|
|
119
119
|
if (n < 0 || n > 1 || r < 0 || r > 1 || i < 0 || i > 1)
|
|
120
120
|
throw new Error(`vec3() components must be in 0..1, got: vec3(${n}, ${r}, ${i})`);
|
|
121
|
-
return
|
|
121
|
+
return un(
|
|
122
122
|
Math.round(n * 255),
|
|
123
123
|
Math.round(r * 255),
|
|
124
124
|
Math.round(i * 255)
|
|
@@ -126,7 +126,7 @@ function xc(t) {
|
|
|
126
126
|
}
|
|
127
127
|
function Ac(t) {
|
|
128
128
|
const e = Mt(t.r, "r"), n = Mt(t.g, "g"), r = Mt(t.b, "b");
|
|
129
|
-
return
|
|
129
|
+
return un(e, n, r);
|
|
130
130
|
}
|
|
131
131
|
function Ic(t) {
|
|
132
132
|
const e = Mt(t.h, "h"), n = Mt(t.s, "s"), r = Mt(t.b, "b");
|
|
@@ -141,7 +141,7 @@ function Rc(t, e, n) {
|
|
|
141
141
|
let f = 0, m = 0, g = 0;
|
|
142
142
|
u < 1 ? (f = c, m = h, g = 0) : u < 2 ? (f = h, m = c, g = 0) : u < 3 ? (f = 0, m = c, g = h) : u < 4 ? (f = 0, m = h, g = c) : u < 5 ? (f = h, m = 0, g = c) : (f = c, m = 0, g = h);
|
|
143
143
|
const v = o - c / 2;
|
|
144
|
-
return
|
|
144
|
+
return un(
|
|
145
145
|
Math.round((f + v) * 255),
|
|
146
146
|
Math.round((m + v) * 255),
|
|
147
147
|
Math.round((g + v) * 255)
|
|
@@ -244,7 +244,7 @@ class Cc {
|
|
|
244
244
|
createColorParameter(e, n) {
|
|
245
245
|
const r = n.label, i = as(e), o = {
|
|
246
246
|
value: i,
|
|
247
|
-
rgb: Object.freeze(
|
|
247
|
+
rgb: Object.freeze(xn(i)),
|
|
248
248
|
hsb: Object.freeze(fi(i)),
|
|
249
249
|
label: n.label,
|
|
250
250
|
description: n.description ?? "",
|
|
@@ -423,7 +423,7 @@ class Cc {
|
|
|
423
423
|
const u = this.parameterObjects.get(e);
|
|
424
424
|
if (u && (u.value = n, r.type === "color")) {
|
|
425
425
|
const h = n;
|
|
426
|
-
u.rgb = Object.freeze(
|
|
426
|
+
u.rgb = Object.freeze(xn(h)), u.hsb = Object.freeze(fi(h));
|
|
427
427
|
}
|
|
428
428
|
return !0;
|
|
429
429
|
}
|
|
@@ -2623,7 +2623,7 @@ class Dc {
|
|
|
2623
2623
|
this.cvWorker && (this.cvWorker.terminate(), this.cvWorker = null), this.activeFeatures.clear(), this.faceMeshRequestedBy.clear(), this.workerRestartCount = 0, this.clearResults(), this.processing = !1, this.processingTimes = [], this.analysedCanvas = null, this.analysedCtx = null, this.pendingRequestIds.clear(), this.debugLog("✅ CVSystem cleanup complete");
|
|
2624
2624
|
}
|
|
2625
2625
|
}
|
|
2626
|
-
class
|
|
2626
|
+
class gn {
|
|
2627
2627
|
// ✅ CORRECT: Worker-owned OffscreenCanvas (transferred from host)
|
|
2628
2628
|
offscreenCanvas = null;
|
|
2629
2629
|
ctx = null;
|
|
@@ -4937,7 +4937,7 @@ function lo(t) {
|
|
|
4937
4937
|
if (t.blockLen < 1)
|
|
4938
4938
|
throw new Error('"blockLen" must be >= 1');
|
|
4939
4939
|
}
|
|
4940
|
-
function
|
|
4940
|
+
function An(t, e = !0) {
|
|
4941
4941
|
if (t.destroyed)
|
|
4942
4942
|
throw new Error("Hash instance has been destroyed");
|
|
4943
4943
|
if (e && t.finished)
|
|
@@ -4949,7 +4949,7 @@ function ho(t, e) {
|
|
|
4949
4949
|
if (t.length < n)
|
|
4950
4950
|
throw new RangeError('"digestInto() output" expected to be of length >=' + n);
|
|
4951
4951
|
}
|
|
4952
|
-
function
|
|
4952
|
+
function In(...t) {
|
|
4953
4953
|
for (let e = 0; e < t.length; e++)
|
|
4954
4954
|
t[e].fill(0);
|
|
4955
4955
|
}
|
|
@@ -5054,7 +5054,7 @@ class Hc {
|
|
|
5054
5054
|
this.blockLen = e, this.outputLen = n, this.padOffset = r, this.isLE = i, this.buffer = new Uint8Array(e), this.view = Yr(this.buffer);
|
|
5055
5055
|
}
|
|
5056
5056
|
update(e) {
|
|
5057
|
-
|
|
5057
|
+
An(this), Ct(e);
|
|
5058
5058
|
const { view: n, buffer: r, blockLen: i } = this, o = e.length;
|
|
5059
5059
|
for (let c = 0; c < o; ) {
|
|
5060
5060
|
const u = Math.min(i - this.pos, o - c);
|
|
@@ -5069,10 +5069,10 @@ class Hc {
|
|
|
5069
5069
|
return this.length += e.length, this.roundClean(), this;
|
|
5070
5070
|
}
|
|
5071
5071
|
digestInto(e) {
|
|
5072
|
-
|
|
5072
|
+
An(this), ho(e, this), this.finished = !0;
|
|
5073
5073
|
const { buffer: n, view: r, blockLen: i, isLE: o } = this;
|
|
5074
5074
|
let { pos: c } = this;
|
|
5075
|
-
n[c++] = 128,
|
|
5075
|
+
n[c++] = 128, In(this.buffer.subarray(c)), this.padOffset > i - c && (this.process(r, 0), c = 0);
|
|
5076
5076
|
for (let g = c; g < i; g++)
|
|
5077
5077
|
n[g] = 0;
|
|
5078
5078
|
r.setBigUint64(i - 8, BigInt(this.length * 8), o), this.process(r, 0);
|
|
@@ -5202,10 +5202,10 @@ class Xc extends Hc {
|
|
|
5202
5202
|
r = r + this.A | 0, i = i + this.B | 0, o = o + this.C | 0, c = c + this.D | 0, u = u + this.E | 0, h = h + this.F | 0, f = f + this.G | 0, m = m + this.H | 0, this.set(r, i, o, c, u, h, f, m);
|
|
5203
5203
|
}
|
|
5204
5204
|
roundClean() {
|
|
5205
|
-
|
|
5205
|
+
In(ut);
|
|
5206
5206
|
}
|
|
5207
5207
|
destroy() {
|
|
5208
|
-
this.destroyed = !0, this.set(0, 0, 0, 0, 0, 0, 0, 0),
|
|
5208
|
+
this.destroyed = !0, this.set(0, 0, 0, 0, 0, 0, 0, 0), In(this.buffer);
|
|
5209
5209
|
}
|
|
5210
5210
|
}
|
|
5211
5211
|
class zc extends Xc {
|
|
@@ -5228,8 +5228,8 @@ const Yc = /* @__PURE__ */ Vc(
|
|
|
5228
5228
|
/* @__PURE__ */ $c(1)
|
|
5229
5229
|
);
|
|
5230
5230
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
5231
|
-
const Ce = (t, e, n) => Ct(t, e, n), po = St, go = Ss, ht = (...t) => Bc(...t), us = (t) => mo(t), yo = uo, bo = (t) => jc(t),
|
|
5232
|
-
function
|
|
5231
|
+
const Ce = (t, e, n) => Ct(t, e, n), po = St, go = Ss, ht = (...t) => Bc(...t), us = (t) => mo(t), yo = uo, bo = (t) => jc(t), Rn = /* @__PURE__ */ BigInt(0), ls = /* @__PURE__ */ BigInt(1);
|
|
5232
|
+
function Qt(t, e = "") {
|
|
5233
5233
|
if (typeof t != "boolean") {
|
|
5234
5234
|
const n = e && `"${e}" `;
|
|
5235
5235
|
throw new TypeError(n + "expected boolean, got type=" + typeof t);
|
|
@@ -5238,7 +5238,7 @@ function Zt(t, e = "") {
|
|
|
5238
5238
|
}
|
|
5239
5239
|
function xs(t) {
|
|
5240
5240
|
if (typeof t == "bigint") {
|
|
5241
|
-
if (!
|
|
5241
|
+
if (!vn(t))
|
|
5242
5242
|
throw new RangeError("positive bigint expected, got " + t);
|
|
5243
5243
|
} else
|
|
5244
5244
|
po(t);
|
|
@@ -5254,14 +5254,14 @@ function hs(t, e = "") {
|
|
|
5254
5254
|
throw new RangeError(n + "expected safe integer, got " + t);
|
|
5255
5255
|
}
|
|
5256
5256
|
}
|
|
5257
|
-
function
|
|
5257
|
+
function yn(t) {
|
|
5258
5258
|
const e = xs(t).toString(16);
|
|
5259
5259
|
return e.length & 1 ? "0" + e : e;
|
|
5260
5260
|
}
|
|
5261
5261
|
function _o(t) {
|
|
5262
5262
|
if (typeof t != "string")
|
|
5263
5263
|
throw new TypeError("hex string expected, got " + typeof t);
|
|
5264
|
-
return t === "" ?
|
|
5264
|
+
return t === "" ? Rn : BigInt("0x" + t);
|
|
5265
5265
|
}
|
|
5266
5266
|
function qn(t) {
|
|
5267
5267
|
return _o(Ss(t));
|
|
@@ -5284,19 +5284,19 @@ function vo(t, e) {
|
|
|
5284
5284
|
function Kc(t) {
|
|
5285
5285
|
return Uint8Array.from(Ce(t));
|
|
5286
5286
|
}
|
|
5287
|
-
const
|
|
5287
|
+
const vn = (t) => typeof t == "bigint" && Rn <= t;
|
|
5288
5288
|
function Zc(t, e, n) {
|
|
5289
|
-
return
|
|
5289
|
+
return vn(t) && vn(e) && vn(n) && e <= t && t < n;
|
|
5290
5290
|
}
|
|
5291
5291
|
function wo(t, e, n, r) {
|
|
5292
5292
|
if (!Zc(e, n, r))
|
|
5293
5293
|
throw new RangeError("expected valid " + t + ": " + n + " <= n < " + r + ", got " + e);
|
|
5294
5294
|
}
|
|
5295
5295
|
function Is(t) {
|
|
5296
|
-
if (t <
|
|
5296
|
+
if (t < Rn)
|
|
5297
5297
|
throw new Error("expected non-negative bigint, got " + t);
|
|
5298
5298
|
let e;
|
|
5299
|
-
for (e = 0; t >
|
|
5299
|
+
for (e = 0; t > Rn; t >>= ls, e += 1)
|
|
5300
5300
|
;
|
|
5301
5301
|
return e;
|
|
5302
5302
|
}
|
|
@@ -5603,7 +5603,7 @@ class Lo {
|
|
|
5603
5603
|
// We can't move this out because Fp6, Fp12 implement it
|
|
5604
5604
|
// and it's unclear what to return in there.
|
|
5605
5605
|
cmov(e, n, r) {
|
|
5606
|
-
return
|
|
5606
|
+
return Qt(r, "condition"), r ? n : e;
|
|
5607
5607
|
}
|
|
5608
5608
|
}
|
|
5609
5609
|
Object.freeze(Lo.prototype);
|
|
@@ -5632,7 +5632,7 @@ function c1(t, e, n = !1) {
|
|
|
5632
5632
|
}
|
|
5633
5633
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
5634
5634
|
const Ot = /* @__PURE__ */ BigInt(0), wt = /* @__PURE__ */ BigInt(1);
|
|
5635
|
-
function
|
|
5635
|
+
function Cn(t, e) {
|
|
5636
5636
|
const n = e.negate();
|
|
5637
5637
|
return t ? n : e;
|
|
5638
5638
|
}
|
|
@@ -5716,7 +5716,7 @@ class u1 {
|
|
|
5716
5716
|
const c = Kr(e, this.bits);
|
|
5717
5717
|
for (let u = 0; u < c.windows; u++) {
|
|
5718
5718
|
const { nextN: h, offset: f, isZero: m, isNeg: g, isNegF: v, offsetF: w } = Ei(r, u, c);
|
|
5719
|
-
r = h, m ? o = o.add(
|
|
5719
|
+
r = h, m ? o = o.add(Cn(v, n[w])) : i = i.add(Cn(g, n[f]));
|
|
5720
5720
|
}
|
|
5721
5721
|
return Ti(r), { p: i, f: o };
|
|
5722
5722
|
}
|
|
@@ -5812,13 +5812,13 @@ class xi {
|
|
|
5812
5812
|
this.iHash.update(i), this.oHash = e.create();
|
|
5813
5813
|
for (let o = 0; o < i.length; o++)
|
|
5814
5814
|
i[o] ^= 106;
|
|
5815
|
-
this.oHash.update(i),
|
|
5815
|
+
this.oHash.update(i), In(i);
|
|
5816
5816
|
}
|
|
5817
5817
|
update(e) {
|
|
5818
|
-
return
|
|
5818
|
+
return An(this), this.iHash.update(e), this;
|
|
5819
5819
|
}
|
|
5820
5820
|
digestInto(e) {
|
|
5821
|
-
|
|
5821
|
+
An(this), ho(e, this), this.finished = !0;
|
|
5822
5822
|
const n = e.subarray(0, this.outputLen);
|
|
5823
5823
|
this.iHash.digestInto(n), this.oHash.update(n), this.oHash.digestInto(n), this.destroy();
|
|
5824
5824
|
}
|
|
@@ -5865,7 +5865,7 @@ function Jr(t, e) {
|
|
|
5865
5865
|
const n = {};
|
|
5866
5866
|
for (let r of Object.keys(e))
|
|
5867
5867
|
n[r] = t[r] === void 0 ? e[r] : t[r];
|
|
5868
|
-
return
|
|
5868
|
+
return Qt(n.lowS, "lowS"), Qt(n.prehash, "prehash"), n.format !== void 0 && fs(n.format), n;
|
|
5869
5869
|
}
|
|
5870
5870
|
class p1 extends Error {
|
|
5871
5871
|
constructor(e = "") {
|
|
@@ -5885,11 +5885,11 @@ const We = {
|
|
|
5885
5885
|
throw new TypeError('"data" expected string, got type=' + typeof e);
|
|
5886
5886
|
if (e.length & 1)
|
|
5887
5887
|
throw new n("tlv.encode: unpadded data");
|
|
5888
|
-
const r = e.length / 2, i =
|
|
5888
|
+
const r = e.length / 2, i = yn(r);
|
|
5889
5889
|
if (i.length / 2 & 128)
|
|
5890
5890
|
throw new n("tlv.encode: long form length too big");
|
|
5891
|
-
const o = r > 127 ?
|
|
5892
|
-
return
|
|
5891
|
+
const o = r > 127 ? yn(i.length / 2 | 128) : "";
|
|
5892
|
+
return yn(t) + o + i + e;
|
|
5893
5893
|
},
|
|
5894
5894
|
// v - value, l - left bytes (unparsed)
|
|
5895
5895
|
decode(t, e) {
|
|
@@ -5935,7 +5935,7 @@ const We = {
|
|
|
5935
5935
|
const { Err: e } = We;
|
|
5936
5936
|
if (xs(t), t < Qe)
|
|
5937
5937
|
throw new e("integer: negative integers are not allowed");
|
|
5938
|
-
let n =
|
|
5938
|
+
let n = yn(t);
|
|
5939
5939
|
if (Number.parseInt(n[0], 16) & 8 && (n = "00" + n), n.length & 1)
|
|
5940
5940
|
throw new e("unexpected DER parsing assertion: unpadded hex");
|
|
5941
5941
|
return n;
|
|
@@ -5968,7 +5968,7 @@ const We = {
|
|
|
5968
5968
|
Object.freeze(We._tlv);
|
|
5969
5969
|
Object.freeze(We._int);
|
|
5970
5970
|
Object.freeze(We);
|
|
5971
|
-
const Qe = /* @__PURE__ */ BigInt(0), ft = /* @__PURE__ */ BigInt(1), Mo = /* @__PURE__ */ BigInt(2),
|
|
5971
|
+
const Qe = /* @__PURE__ */ BigInt(0), ft = /* @__PURE__ */ BigInt(1), Mo = /* @__PURE__ */ BigInt(2), bn = /* @__PURE__ */ BigInt(3), g1 = /* @__PURE__ */ BigInt(4);
|
|
5972
5972
|
function y1(t, e = {}) {
|
|
5973
5973
|
const n = h1("weierstrass", t, e), r = n.Fp, i = n.Fn;
|
|
5974
5974
|
let o = n.CURVE;
|
|
@@ -5993,7 +5993,7 @@ function y1(t, e = {}) {
|
|
|
5993
5993
|
if (f && E.is0())
|
|
5994
5994
|
return Uint8Array.of(0);
|
|
5995
5995
|
const { x: H, y: M } = E.toAffine(), R = r.toBytes(H);
|
|
5996
|
-
if (
|
|
5996
|
+
if (Qt(V, "isCompressed"), V) {
|
|
5997
5997
|
g();
|
|
5998
5998
|
const U = !r.isOdd(M);
|
|
5999
5999
|
return ht(No(U), R);
|
|
@@ -6039,7 +6039,7 @@ function y1(t, e = {}) {
|
|
|
6039
6039
|
}
|
|
6040
6040
|
if (!K(o.Gx, o.Gy))
|
|
6041
6041
|
throw new Error("bad curve params: generator point");
|
|
6042
|
-
const L = r.mul(r.pow(o.a,
|
|
6042
|
+
const L = r.mul(r.pow(o.a, bn), g1), j = r.mul(r.sqr(o.b), BigInt(27));
|
|
6043
6043
|
if (r.is0(r.add(L, j)))
|
|
6044
6044
|
throw new Error("bad curve params: a or b");
|
|
6045
6045
|
function O(y, E, V = !1) {
|
|
@@ -6057,7 +6057,7 @@ function y1(t, e = {}) {
|
|
|
6057
6057
|
return m1(y, h.basises, i.ORDER);
|
|
6058
6058
|
}
|
|
6059
6059
|
function ee(y, E, V, H, M) {
|
|
6060
|
-
return V = new z(r.mul(V.X, y), V.Y, V.Z), E =
|
|
6060
|
+
return V = new z(r.mul(V.X, y), V.Y, V.Z), E = Cn(H, E), V = Cn(M, V), E.add(V);
|
|
6061
6061
|
}
|
|
6062
6062
|
class z {
|
|
6063
6063
|
// base / generator point
|
|
@@ -6108,7 +6108,7 @@ function y1(t, e = {}) {
|
|
|
6108
6108
|
* @returns
|
|
6109
6109
|
*/
|
|
6110
6110
|
precompute(E = 8, V = !0) {
|
|
6111
|
-
return b.createCache(this, E), V || this.multiply(
|
|
6111
|
+
return b.createCache(this, E), V || this.multiply(bn), this;
|
|
6112
6112
|
}
|
|
6113
6113
|
// TODO: return `this`
|
|
6114
6114
|
/** A point on curve is valid if it conforms to equation. */
|
|
@@ -6148,7 +6148,7 @@ function y1(t, e = {}) {
|
|
|
6148
6148
|
// https://eprint.iacr.org/2015/1060, algorithm 3
|
|
6149
6149
|
// Cost: 8M + 3S + 3*a + 2*b3 + 15add.
|
|
6150
6150
|
double() {
|
|
6151
|
-
const { a: E, b: V } = o, H = r.mul(V,
|
|
6151
|
+
const { a: E, b: V } = o, H = r.mul(V, bn), { X: M, Y: R, Z: U } = this;
|
|
6152
6152
|
let F = r.ZERO, B = r.ZERO, $ = r.ZERO, Y = r.mul(M, M), oe = r.mul(R, R), ce = r.mul(U, U), ie = r.mul(M, R);
|
|
6153
6153
|
return ie = r.add(ie, ie), $ = r.mul(M, U), $ = r.add($, $), F = r.mul(E, $), B = r.mul(H, ce), B = r.add(F, B), F = r.sub(oe, B), B = r.add(oe, B), B = r.mul(F, B), F = r.mul(ie, F), $ = r.mul(H, $), ce = r.mul(E, ce), ie = r.sub(Y, ce), ie = r.mul(E, ie), ie = r.add(ie, $), $ = r.add(Y, Y), Y = r.add($, Y), Y = r.add(Y, ce), Y = r.mul(Y, ie), B = r.add(B, Y), ce = r.mul(R, U), ce = r.add(ce, ce), Y = r.mul(ce, ie), F = r.sub(F, Y), $ = r.mul(ce, oe), $ = r.add($, $), $ = r.add($, $), new z(F, B, $);
|
|
6154
6154
|
}
|
|
@@ -6160,7 +6160,7 @@ function y1(t, e = {}) {
|
|
|
6160
6160
|
J(E);
|
|
6161
6161
|
const { X: V, Y: H, Z: M } = this, { X: R, Y: U, Z: F } = E;
|
|
6162
6162
|
let B = r.ZERO, $ = r.ZERO, Y = r.ZERO;
|
|
6163
|
-
const oe = o.a, ce = r.mul(o.b,
|
|
6163
|
+
const oe = o.a, ce = r.mul(o.b, bn);
|
|
6164
6164
|
let ie = r.mul(V, R), k = r.mul(H, U), x = r.mul(M, F), I = r.add(V, H), A = r.add(R, U);
|
|
6165
6165
|
I = r.mul(I, A), A = r.add(ie, k), I = r.sub(I, A), A = r.add(V, M);
|
|
6166
6166
|
let P = r.add(R, F);
|
|
@@ -6253,7 +6253,7 @@ function y1(t, e = {}) {
|
|
|
6253
6253
|
return c === ft ? this.is0() : this.clearCofactor().is0();
|
|
6254
6254
|
}
|
|
6255
6255
|
toBytes(E = !0) {
|
|
6256
|
-
return
|
|
6256
|
+
return Qt(E, "isCompressed"), this.assertValidity(), D(z, this, E);
|
|
6257
6257
|
}
|
|
6258
6258
|
toHex(E = !0) {
|
|
6259
6259
|
return go(this.toBytes(E));
|
|
@@ -6517,14 +6517,14 @@ const k1 = {
|
|
|
6517
6517
|
y: "lhi486ASKQkS8TGbVee-FpdAu7qKaO3gad_4ScX8qJI"
|
|
6518
6518
|
}, E1 = 60;
|
|
6519
6519
|
let ds = null, Ps = !1, Et = null, Nt = 0;
|
|
6520
|
-
function
|
|
6520
|
+
function Ln(t) {
|
|
6521
6521
|
const e = t.replace(/-/g, "+").replace(/_/g, "/"), n = atob(e), r = new Uint8Array(n.length);
|
|
6522
6522
|
for (let i = 0; i < n.length; i++) r[i] = n.charCodeAt(i);
|
|
6523
6523
|
return r;
|
|
6524
6524
|
}
|
|
6525
6525
|
async function T1() {
|
|
6526
6526
|
try {
|
|
6527
|
-
const t =
|
|
6527
|
+
const t = Ln(Ii.x), e = Ln(Ii.y);
|
|
6528
6528
|
if (t.length !== 32 || e.length !== 32) throw new Error("bad key");
|
|
6529
6529
|
const n = new Uint8Array(65);
|
|
6530
6530
|
n[0] = 4, n.set(t, 1), n.set(e, 33), ds = n;
|
|
@@ -6540,12 +6540,12 @@ async function Ri(t) {
|
|
|
6540
6540
|
try {
|
|
6541
6541
|
const e = t.split(".");
|
|
6542
6542
|
if (e.length !== 3) throw new Error("malformed");
|
|
6543
|
-
const n = new TextEncoder().encode(e[0] + "." + e[1]), r =
|
|
6543
|
+
const n = new TextEncoder().encode(e[0] + "." + e[1]), r = Ln(e[2]);
|
|
6544
6544
|
if (r.length !== 64) throw new Error("invalid signature length");
|
|
6545
6545
|
if (!w1.verify(r, n, ds, {
|
|
6546
6546
|
lowS: !1
|
|
6547
6547
|
})) throw new Error("invalid signature");
|
|
6548
|
-
const o = JSON.parse(new TextDecoder().decode(
|
|
6548
|
+
const o = JSON.parse(new TextDecoder().decode(Ln(e[1])));
|
|
6549
6549
|
Et = o.c ?? {}, Nt = o.e ?? 0;
|
|
6550
6550
|
} catch {
|
|
6551
6551
|
Et = null, Nt = 0;
|
|
@@ -6557,7 +6557,7 @@ function S1(t, e) {
|
|
|
6557
6557
|
return Nt > 0 && Nt + E1 < n ? (Et = null, Nt = 0, e) : typeof Et[t] == "number" ? Et[t] : e;
|
|
6558
6558
|
}
|
|
6559
6559
|
const Fs = 44, Ds = 74, Us = 44, Ms = 23, Bo = "#F1F1F1";
|
|
6560
|
-
let
|
|
6560
|
+
let Jt = null, en = null, Vo = null, jo = null, Ue = null, zt = null, Pn = null, lt = null, it = -1, ot = -1, Ci = null, $o = 0;
|
|
6561
6561
|
const x1 = `
|
|
6562
6562
|
attribute vec2 a_pos;
|
|
6563
6563
|
attribute vec2 a_uv;
|
|
@@ -6581,10 +6581,10 @@ function R1(t) {
|
|
|
6581
6581
|
}
|
|
6582
6582
|
function C1(t) {
|
|
6583
6583
|
try {
|
|
6584
|
-
|
|
6585
|
-
const e =
|
|
6586
|
-
e && I1(e),
|
|
6587
|
-
const n =
|
|
6584
|
+
Jt = new OffscreenCanvas(Fs, Ds);
|
|
6585
|
+
const e = Jt.getContext("2d");
|
|
6586
|
+
e && I1(e), en = new OffscreenCanvas(Us, Ms);
|
|
6587
|
+
const n = en.getContext("2d");
|
|
6588
6588
|
n && R1(n);
|
|
6589
6589
|
} catch (e) {
|
|
6590
6590
|
console.warn("[Viji] overlay: init failed", e);
|
|
@@ -6594,7 +6594,7 @@ function Li(t) {
|
|
|
6594
6594
|
$o = t;
|
|
6595
6595
|
}
|
|
6596
6596
|
function L1(t, e, n, r, i = 1) {
|
|
6597
|
-
if (r >= 2 || !
|
|
6597
|
+
if (r >= 2 || !Jt && !en) return;
|
|
6598
6598
|
const o = $o === 1, c = i || 1;
|
|
6599
6599
|
e ? D1(e, o, t.width, c) : n && U1(n, t, o, c);
|
|
6600
6600
|
}
|
|
@@ -6621,7 +6621,7 @@ function Pi(t, e) {
|
|
|
6621
6621
|
}
|
|
6622
6622
|
function F1(t) {
|
|
6623
6623
|
if (Ci === t) return;
|
|
6624
|
-
Ci = t, Vo = Pi(t,
|
|
6624
|
+
Ci = t, Vo = Pi(t, Jt), jo = Pi(t, en);
|
|
6625
6625
|
const e = t.createShader(t.VERTEX_SHADER);
|
|
6626
6626
|
t.shaderSource(e, x1), t.compileShader(e);
|
|
6627
6627
|
const n = t.createShader(t.FRAGMENT_SHADER);
|
|
@@ -6631,7 +6631,7 @@ function F1(t) {
|
|
|
6631
6631
|
}
|
|
6632
6632
|
if (zt = t.createBuffer(), it = t.getAttribLocation(Ue, "a_pos"), ot = t.getAttribLocation(Ue, "a_uv"), lt = P1(t), lt) {
|
|
6633
6633
|
const r = t.getParameter(qo), i = t.getParameter(t.ARRAY_BUFFER_BINDING);
|
|
6634
|
-
|
|
6634
|
+
Pn = lt.create(), lt.bind(Pn), t.bindBuffer(t.ARRAY_BUFFER, zt), it >= 0 && (t.enableVertexAttribArray(it), t.vertexAttribPointer(it, 2, t.FLOAT, !1, 16, 0)), ot >= 0 && (t.enableVertexAttribArray(ot), t.vertexAttribPointer(ot, 2, t.FLOAT, !1, 16, 8)), lt.bind(r), t.bindBuffer(t.ARRAY_BUFFER, i);
|
|
6635
6635
|
}
|
|
6636
6636
|
}
|
|
6637
6637
|
function Fi(t, e) {
|
|
@@ -6651,7 +6651,7 @@ function Di(t, e) {
|
|
|
6651
6651
|
e.buffer && (t.bindBuffer(t.ARRAY_BUFFER, e.buffer), t.vertexAttribPointer(e.index, e.size, e.type, e.normalized, e.stride, e.offset)), e.enabled ? t.enableVertexAttribArray(e.index) : t.disableVertexAttribArray(e.index), t.vertexAttrib4f(e.index, e.currentValue[0], e.currentValue[1], e.currentValue[2], e.currentValue[3]);
|
|
6652
6652
|
}
|
|
6653
6653
|
function D1(t, e, n, r) {
|
|
6654
|
-
const i = e ?
|
|
6654
|
+
const i = e ? en : Jt;
|
|
6655
6655
|
if (!i) return;
|
|
6656
6656
|
const o = (e ? Us : Fs) * r, c = (e ? Ms : Ds) * r, u = Math.round(e ? (n - o) / 2 : 48 * r), h = Math.round((e ? 52 : 48) * r);
|
|
6657
6657
|
t.save(), t.globalAlpha = 0.85, t.drawImage(i, u, h, o, c), t.restore();
|
|
@@ -6660,7 +6660,7 @@ function U1(t, e, n, r) {
|
|
|
6660
6660
|
if (F1(t), !Ue || !zt) return;
|
|
6661
6661
|
const i = n ? jo : Vo;
|
|
6662
6662
|
if (!i) return;
|
|
6663
|
-
const o = (n ? Us : Fs) * r, c = (n ? Ms : Ds) * r, u = e.width, h = e.height, f = Math.round(n ? (u - o) / 2 : 48 * r), m = Math.round((n ? 52 : 48) * r), g = f / u * 2 - 1, v = 1 - (m + c) / h * 2, w = (f + o) / u * 2 - 1, D = 1 - m / h * 2, N = !!(lt &&
|
|
6663
|
+
const o = (n ? Us : Fs) * r, c = (n ? Ms : Ds) * r, u = e.width, h = e.height, f = Math.round(n ? (u - o) / 2 : 48 * r), m = Math.round((n ? 52 : 48) * r), g = f / u * 2 - 1, v = 1 - (m + c) / h * 2, w = (f + o) / u * 2 - 1, D = 1 - m / h * 2, N = !!(lt && Pn), W = t.getParameter(t.CURRENT_PROGRAM), K = t.getParameter(t.ACTIVE_TEXTURE);
|
|
6664
6664
|
t.activeTexture(t.TEXTURE0);
|
|
6665
6665
|
const L = t.getParameter(t.TEXTURE_BINDING_2D), j = t.getParameter(t.ARRAY_BUFFER_BINDING), O = t.getParameter(t.FRAMEBUFFER_BINDING), J = t.getParameter(t.VIEWPORT), ae = t.isEnabled(t.BLEND), ee = t.getParameter(t.BLEND_SRC_RGB), z = t.getParameter(t.BLEND_DST_RGB), me = t.getParameter(t.BLEND_SRC_ALPHA), b = t.getParameter(t.BLEND_DST_ALPHA), y = t.getParameter(t.BLEND_EQUATION_RGB), E = t.getParameter(t.BLEND_EQUATION_ALPHA), V = t.isEnabled(t.DEPTH_TEST), H = t.isEnabled(t.SCISSOR_TEST), M = t.isEnabled(t.STENCIL_TEST), R = t.isEnabled(t.CULL_FACE), U = t.getParameter(t.COLOR_WRITEMASK), F = t.getParameter(t.UNPACK_FLIP_Y_WEBGL), B = N ? t.getParameter(qo) : null, $ = !N && it >= 0 ? Fi(t, it) : null, Y = !N && ot >= 0 ? Fi(t, ot) : null;
|
|
6666
6666
|
t.bindFramebuffer(t.FRAMEBUFFER, null), t.viewport(0, 0, u, h), t.useProgram(Ue), t.enable(t.BLEND), t.blendEquation(t.FUNC_ADD), t.blendFunc(t.SRC_ALPHA, t.ONE_MINUS_SRC_ALPHA), t.disable(t.DEPTH_TEST), t.disable(t.SCISSOR_TEST), t.disable(t.STENCIL_TEST), t.disable(t.CULL_FACE), t.colorMask(!0, !0, !0, !0), t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL, 0), t.bindTexture(t.TEXTURE_2D, i), t.uniform1i(t.getUniformLocation(Ue, "u_tex"), 0), t.uniform1f(t.getUniformLocation(Ue, "u_alpha"), 0.85);
|
|
@@ -6690,9 +6690,9 @@ function U1(t, e, n, r) {
|
|
|
6690
6690
|
1,
|
|
6691
6691
|
1
|
|
6692
6692
|
]);
|
|
6693
|
-
N ? (lt.bind(
|
|
6693
|
+
N ? (lt.bind(Pn), t.bindBuffer(t.ARRAY_BUFFER, zt), t.bufferData(t.ARRAY_BUFFER, oe, t.DYNAMIC_DRAW)) : (t.bindBuffer(t.ARRAY_BUFFER, zt), t.bufferData(t.ARRAY_BUFFER, oe, t.DYNAMIC_DRAW), it >= 0 && (t.enableVertexAttribArray(it), t.vertexAttribPointer(it, 2, t.FLOAT, !1, 16, 0)), ot >= 0 && (t.enableVertexAttribArray(ot), t.vertexAttribPointer(ot, 2, t.FLOAT, !1, 16, 8))), t.drawArrays(t.TRIANGLES, 0, 6), N ? lt.bind(B) : (Y && Di(t, Y), $ && Di(t, $)), t.bindFramebuffer(t.FRAMEBUFFER, O), t.viewport(J[0], J[1], J[2], J[3]), t.bindBuffer(t.ARRAY_BUFFER, j), t.colorMask(U[0], U[1], U[2], U[3]), t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL, F ? 1 : 0), H ? t.enable(t.SCISSOR_TEST) : t.disable(t.SCISSOR_TEST), M ? t.enable(t.STENCIL_TEST) : t.disable(t.STENCIL_TEST), R ? t.enable(t.CULL_FACE) : t.disable(t.CULL_FACE), V ? t.enable(t.DEPTH_TEST) : t.disable(t.DEPTH_TEST), ae ? t.enable(t.BLEND) : t.disable(t.BLEND), t.blendFuncSeparate(ee, z, me, b), t.blendEquationSeparate(y, E), t.activeTexture(t.TEXTURE0), t.bindTexture(t.TEXTURE_2D, L), t.activeTexture(K), t.useProgram(W);
|
|
6694
6694
|
}
|
|
6695
|
-
class
|
|
6695
|
+
class Yt {
|
|
6696
6696
|
canvas = null;
|
|
6697
6697
|
ctx = null;
|
|
6698
6698
|
gl = null;
|
|
@@ -6912,7 +6912,7 @@ class Pn {
|
|
|
6912
6912
|
constructor() {
|
|
6913
6913
|
this.parameterSystem = new Cc((e, n) => {
|
|
6914
6914
|
this.postMessage(e, n);
|
|
6915
|
-
}), this.interactionSystem = new Lc(), this.videoSystems[0] = new
|
|
6915
|
+
}), this.interactionSystem = new Lc(), this.videoSystems[0] = new gn(), this.viji.video.cv = this.videoSystems[0].getCvSurface(), Object.assign(this.viji, this.interactionSystem.getInteractionAPIs()), this.viji.audio.getFrequencyData = () => this.audioFrequencyData, this.viji.audio.getWaveform = () => this.audioWaveformData, this.capabilityMonitor.setTransitionCallback((e) => {
|
|
6916
6916
|
this.postMessage("capability-transition", e);
|
|
6917
6917
|
}), this.setupMessageHandling();
|
|
6918
6918
|
}
|
|
@@ -7182,7 +7182,7 @@ class Pn {
|
|
|
7182
7182
|
updateVijiAudioStreams() {
|
|
7183
7183
|
const e = [];
|
|
7184
7184
|
for (const [n, r] of this.audioStreamStates)
|
|
7185
|
-
n >=
|
|
7185
|
+
n >= Yt.AUDIO_ADDITIONAL_BASE && n < Yt.AUDIO_DEVICE_BASE && e.push({ index: n, ...r });
|
|
7186
7186
|
e.sort((n, r) => n.index - r.index), this.viji.audioStreams.length = e.length;
|
|
7187
7187
|
for (let n = 0; n < e.length; n++) {
|
|
7188
7188
|
const r = e[n], i = r.frequencyData, o = r.waveformData;
|
|
@@ -7444,15 +7444,43 @@ class Pn {
|
|
|
7444
7444
|
n.spectral.brightness = e.spectral.brightness, n.spectral.flatness = e.spectral.flatness, this.audioFrequencyData = new Uint8Array(e.frequencyData), this.audioWaveformData = e.waveformData ? new Float32Array(e.waveformData) : new Float32Array(0);
|
|
7445
7445
|
}
|
|
7446
7446
|
handleAdditionalAudioUpdate(e, n) {
|
|
7447
|
-
const r = new Uint8Array(n.frequencyData), i = n.waveformData ? new Float32Array(n.waveformData) : new Float32Array(0);
|
|
7448
|
-
this.audioStreamStates.set(e, {
|
|
7447
|
+
const r = new Uint8Array(n.frequencyData), i = n.waveformData ? new Float32Array(n.waveformData) : new Float32Array(0), o = this.audioStreamStates.get(e);
|
|
7448
|
+
o ? (o.isConnected = n.isConnected, Object.assign(o.volume, n.volume), Object.assign(o.bands, n.bands), Object.assign(o.spectral, n.spectral), o.frequencyData = r, o.waveformData = i) : this.audioStreamStates.set(e, {
|
|
7449
7449
|
isConnected: n.isConnected,
|
|
7450
7450
|
volume: { ...n.volume },
|
|
7451
7451
|
bands: { ...n.bands },
|
|
7452
7452
|
spectral: { ...n.spectral },
|
|
7453
7453
|
frequencyData: r,
|
|
7454
7454
|
waveformData: i
|
|
7455
|
-
}), this.updateVijiAudioStreams();
|
|
7455
|
+
}), this.updateVijiAudioStreams(), e >= Yt.AUDIO_DEVICE_BASE && this.wireDeviceAudio(e);
|
|
7456
|
+
}
|
|
7457
|
+
/**
|
|
7458
|
+
* Wires `viji.devices[n].audio` for the device mapped to the given audio
|
|
7459
|
+
* stream index, or refreshes it when already wired. Sub-objects
|
|
7460
|
+
* (volume/bands/spectral) and the typed arrays are live references into the
|
|
7461
|
+
* in-place-mutated stream state, so only the `isConnected` scalar needs
|
|
7462
|
+
* refreshing on an existing API. No-ops while the stream is unmapped, the
|
|
7463
|
+
* device is unregistered, or no analysis state exists yet.
|
|
7464
|
+
*/
|
|
7465
|
+
wireDeviceAudio(e) {
|
|
7466
|
+
const n = this.audioStreamStates.get(e);
|
|
7467
|
+
if (!n) return;
|
|
7468
|
+
let r;
|
|
7469
|
+
for (const [o, c] of this.deviceAudioMap)
|
|
7470
|
+
if (c === e) {
|
|
7471
|
+
r = o;
|
|
7472
|
+
break;
|
|
7473
|
+
}
|
|
7474
|
+
if (!r) return;
|
|
7475
|
+
const i = this.viji.devices.find((o) => o.id === r);
|
|
7476
|
+
i && (i.audio ? i.audio.isConnected = n.isConnected : i.audio = {
|
|
7477
|
+
isConnected: n.isConnected,
|
|
7478
|
+
volume: n.volume,
|
|
7479
|
+
bands: n.bands,
|
|
7480
|
+
spectral: n.spectral,
|
|
7481
|
+
getFrequencyData: () => n.frequencyData,
|
|
7482
|
+
getWaveform: () => n.waveformData
|
|
7483
|
+
});
|
|
7456
7484
|
}
|
|
7457
7485
|
/**
|
|
7458
7486
|
* Handles audio-stream-setup: registers stream type and device mapping.
|
|
@@ -7466,21 +7494,7 @@ class Pn {
|
|
|
7466
7494
|
this.updateVijiAudioStreams();
|
|
7467
7495
|
break;
|
|
7468
7496
|
case "device":
|
|
7469
|
-
|
|
7470
|
-
this.deviceAudioMap.set(i, n);
|
|
7471
|
-
const o = this.viji.devices.find((c) => c.id === i);
|
|
7472
|
-
if (o) {
|
|
7473
|
-
const c = this.audioStreamStates.get(n);
|
|
7474
|
-
c && (o.audio = {
|
|
7475
|
-
isConnected: c.isConnected,
|
|
7476
|
-
volume: c.volume,
|
|
7477
|
-
bands: c.bands,
|
|
7478
|
-
spectral: c.spectral,
|
|
7479
|
-
getFrequencyData: () => c.frequencyData,
|
|
7480
|
-
getWaveform: () => c.waveformData
|
|
7481
|
-
});
|
|
7482
|
-
}
|
|
7483
|
-
}
|
|
7497
|
+
i && (this.deviceAudioMap.set(i, n), this.wireDeviceAudio(n));
|
|
7484
7498
|
break;
|
|
7485
7499
|
}
|
|
7486
7500
|
this.debugLog(`Audio stream setup at index ${n}, type: ${r}${i ? `, deviceId: ${i}` : ""}`);
|
|
@@ -7505,7 +7519,7 @@ class Pn {
|
|
|
7505
7519
|
const { streamIndex: n, streamType: r, deviceId: i } = e.data, o = n || 0;
|
|
7506
7520
|
let c = this.videoSystems[o];
|
|
7507
7521
|
const u = !!c;
|
|
7508
|
-
switch (c || (c = new
|
|
7522
|
+
switch (c || (c = new gn(), c.setDebugMode(this.debugMode), this.cvWasmUrls && this.cvWasmBinaries && c.setCVWasmAssets(this.cvWasmUrls, this.cvWasmBinaries), this.videoSystems[o] = c), c.setStreamType(r, i), c.handleCanvasSetup({
|
|
7509
7523
|
offscreenCanvas: e.data.offscreenCanvas,
|
|
7510
7524
|
width: e.data.width,
|
|
7511
7525
|
height: e.data.height,
|
|
@@ -7574,13 +7588,13 @@ class Pn {
|
|
|
7574
7588
|
this.debugLog(`[Compositor] Preparing ${r} direct frame slot(s) at base index ${n}`);
|
|
7575
7589
|
for (let i = 0; i < r; i++) {
|
|
7576
7590
|
const o = n + i;
|
|
7577
|
-
this.videoSystems[o] || (this.videoSystems[o] = new
|
|
7591
|
+
this.videoSystems[o] || (this.videoSystems[o] = new gn()), this.videoSystems[o].setDebugMode(this.debugMode), this.videoSystems[o].initializeForDirectFrames(this.rendererType);
|
|
7578
7592
|
}
|
|
7579
7593
|
this.updateVijiVideoStreams(), this.debugLog(`[Compositor] Prepared ${r} direct frame slot(s)`);
|
|
7580
7594
|
}
|
|
7581
7595
|
handleVideoFrameDirect(e) {
|
|
7582
7596
|
const n = e.data.streamIndex || 0;
|
|
7583
|
-
this.videoSystems[n] || (this.debugLog(`[Compositor] Creating new VideoSystem at index ${n} for direct frames`), this.videoSystems[n] = new
|
|
7597
|
+
this.videoSystems[n] || (this.debugLog(`[Compositor] Creating new VideoSystem at index ${n} for direct frames`), this.videoSystems[n] = new gn(), this.videoSystems[n].setDebugMode(this.debugMode), this.videoSystems[n].initializeForDirectFrames(this.rendererType)), this.videoSystems[n].handleDirectFrame(e.data);
|
|
7584
7598
|
}
|
|
7585
7599
|
handlePerformanceUpdate(e) {
|
|
7586
7600
|
this.debugLog("Performance update:", e.data);
|
|
@@ -9163,7 +9177,7 @@ var p;
|
|
|
9163
9177
|
t[t.paragraphSeparator = Wr] = "paragraphSeparator";
|
|
9164
9178
|
})(p || (p = {}));
|
|
9165
9179
|
let Hn, le, he, a, C, Wo;
|
|
9166
|
-
function
|
|
9180
|
+
function tn() {
|
|
9167
9181
|
return Wo++;
|
|
9168
9182
|
}
|
|
9169
9183
|
function z1(t) {
|
|
@@ -9191,7 +9205,7 @@ function q(t) {
|
|
|
9191
9205
|
return a.contextualKeyword === t;
|
|
9192
9206
|
}
|
|
9193
9207
|
function Os(t) {
|
|
9194
|
-
const e =
|
|
9208
|
+
const e = hn();
|
|
9195
9209
|
return e.type === s.name && e.contextualKeyword === t;
|
|
9196
9210
|
}
|
|
9197
9211
|
function Ee(t) {
|
|
@@ -9295,9 +9309,9 @@ for (const t of Go)
|
|
|
9295
9309
|
Xe[t] = 0;
|
|
9296
9310
|
Xe[8232] = 0;
|
|
9297
9311
|
Xe[8233] = 0;
|
|
9298
|
-
const
|
|
9312
|
+
const ln = Xe.slice();
|
|
9299
9313
|
for (let t = p.digit0; t <= p.digit9; t++)
|
|
9300
|
-
|
|
9314
|
+
ln[t] = 0;
|
|
9301
9315
|
const Oi = new Int32Array([
|
|
9302
9316
|
// ""
|
|
9303
9317
|
-1,
|
|
@@ -18742,7 +18756,7 @@ class iu {
|
|
|
18742
18756
|
this.type = e, this.contextualKeyword = n;
|
|
18743
18757
|
}
|
|
18744
18758
|
}
|
|
18745
|
-
function
|
|
18759
|
+
function hn() {
|
|
18746
18760
|
const t = a.snapshot();
|
|
18747
18761
|
S();
|
|
18748
18762
|
const e = a.type, n = a.contextualKeyword;
|
|
@@ -18768,7 +18782,7 @@ function Jo() {
|
|
|
18768
18782
|
ou(C.charCodeAt(a.pos));
|
|
18769
18783
|
}
|
|
18770
18784
|
function ou(t) {
|
|
18771
|
-
|
|
18785
|
+
ln[t] || t === p.backslash || t === p.atSign && C.charCodeAt(a.pos + 1) === p.atSign ? J1() : sa(t);
|
|
18772
18786
|
}
|
|
18773
18787
|
function au() {
|
|
18774
18788
|
for (; C.charCodeAt(a.pos) !== p.asterisk || C.charCodeAt(a.pos + 1) !== p.slash; )
|
|
@@ -19127,9 +19141,9 @@ function vu() {
|
|
|
19127
19141
|
break;
|
|
19128
19142
|
}
|
|
19129
19143
|
}
|
|
19130
|
-
function
|
|
19144
|
+
function nn(t, e = t.currentIndex()) {
|
|
19131
19145
|
let n = e + 1;
|
|
19132
|
-
if (
|
|
19146
|
+
if (_n(t, n)) {
|
|
19133
19147
|
const r = t.identifierNameAtIndex(e);
|
|
19134
19148
|
return {
|
|
19135
19149
|
isType: !1,
|
|
@@ -19138,21 +19152,21 @@ function tn(t, e = t.currentIndex()) {
|
|
|
19138
19152
|
endIndex: n
|
|
19139
19153
|
};
|
|
19140
19154
|
}
|
|
19141
|
-
if (n++,
|
|
19155
|
+
if (n++, _n(t, n))
|
|
19142
19156
|
return {
|
|
19143
19157
|
isType: !0,
|
|
19144
19158
|
leftName: null,
|
|
19145
19159
|
rightName: null,
|
|
19146
19160
|
endIndex: n
|
|
19147
19161
|
};
|
|
19148
|
-
if (n++,
|
|
19162
|
+
if (n++, _n(t, n))
|
|
19149
19163
|
return {
|
|
19150
19164
|
isType: !1,
|
|
19151
19165
|
leftName: t.identifierNameAtIndex(e),
|
|
19152
19166
|
rightName: t.identifierNameAtIndex(e + 2),
|
|
19153
19167
|
endIndex: n
|
|
19154
19168
|
};
|
|
19155
|
-
if (n++,
|
|
19169
|
+
if (n++, _n(t, n))
|
|
19156
19170
|
return {
|
|
19157
19171
|
isType: !0,
|
|
19158
19172
|
leftName: null,
|
|
@@ -19161,7 +19175,7 @@ function tn(t, e = t.currentIndex()) {
|
|
|
19161
19175
|
};
|
|
19162
19176
|
throw new Error(`Unexpected import/export specifier at ${e}`);
|
|
19163
19177
|
}
|
|
19164
|
-
function
|
|
19178
|
+
function _n(t, e) {
|
|
19165
19179
|
const n = t.tokens[e];
|
|
19166
19180
|
return n.type === s.braceR || n.type === s.comma;
|
|
19167
19181
|
}
|
|
@@ -20003,7 +20017,7 @@ class kt {
|
|
|
20003
20017
|
e++;
|
|
20004
20018
|
break;
|
|
20005
20019
|
}
|
|
20006
|
-
const r =
|
|
20020
|
+
const r = nn(this.tokens, e);
|
|
20007
20021
|
if (e = r.endIndex, r.isType || n.push({
|
|
20008
20022
|
importedName: r.leftName,
|
|
20009
20023
|
localName: r.rightName
|
|
@@ -21524,24 +21538,24 @@ function ba(t) {
|
|
|
21524
21538
|
}
|
|
21525
21539
|
return null;
|
|
21526
21540
|
}
|
|
21527
|
-
function
|
|
21541
|
+
function fn() {
|
|
21528
21542
|
for (Q(); _(s.dot); )
|
|
21529
21543
|
Q();
|
|
21530
21544
|
}
|
|
21531
21545
|
function fl() {
|
|
21532
|
-
|
|
21546
|
+
fn(), !Pe() && l(s.lessThan) && jt();
|
|
21533
21547
|
}
|
|
21534
21548
|
function dl() {
|
|
21535
|
-
S(),
|
|
21549
|
+
S(), dn();
|
|
21536
21550
|
}
|
|
21537
21551
|
function ml() {
|
|
21538
21552
|
S();
|
|
21539
21553
|
}
|
|
21540
21554
|
function pl() {
|
|
21541
|
-
T(s._typeof), l(s._import) ? _a() :
|
|
21555
|
+
T(s._typeof), l(s._import) ? _a() : fn(), !Pe() && l(s.lessThan) && jt();
|
|
21542
21556
|
}
|
|
21543
21557
|
function _a() {
|
|
21544
|
-
T(s._import), T(s.parenL), T(s.string), T(s.parenR), _(s.dot) &&
|
|
21558
|
+
T(s._import), T(s.parenL), T(s.string), T(s.parenR), _(s.dot) && fn(), l(s.lessThan) && jt();
|
|
21545
21559
|
}
|
|
21546
21560
|
function gl() {
|
|
21547
21561
|
_(s._const);
|
|
@@ -21562,7 +21576,7 @@ function Ws(t) {
|
|
|
21562
21576
|
Lt(), T(s.parenL), a.scopeDepth++, yl(
|
|
21563
21577
|
!1
|
|
21564
21578
|
/* isBlockScope */
|
|
21565
|
-
), a.scopeDepth--, (e || l(t)) &&
|
|
21579
|
+
), a.scopeDepth--, (e || l(t)) && rn(t);
|
|
21566
21580
|
}
|
|
21567
21581
|
function yl(t) {
|
|
21568
21582
|
$s(s.parenR, t);
|
|
@@ -21583,7 +21597,7 @@ function ka() {
|
|
|
21583
21597
|
if (!(l(s.bracketL) && bl()))
|
|
21584
21598
|
return !1;
|
|
21585
21599
|
const t = se(0);
|
|
21586
|
-
return T(s.bracketL), Q(),
|
|
21600
|
+
return T(s.bracketL), Q(), dn(), T(s.bracketR), Vt(), Mn(), re(t), !0;
|
|
21587
21601
|
}
|
|
21588
21602
|
function zi(t) {
|
|
21589
21603
|
_(s.question), !t && (l(s.parenL) || l(s.lessThan)) ? (Ws(s.colon), Mn()) : (Vt(), Mn());
|
|
@@ -21598,7 +21612,7 @@ function _l() {
|
|
|
21598
21612
|
return;
|
|
21599
21613
|
}
|
|
21600
21614
|
const t = !!ba([d._readonly]);
|
|
21601
|
-
ka() || ((q(d._get) || q(d._set)) && ya(),
|
|
21615
|
+
ka() || ((q(d._get) || q(d._set)) && ya(), sn(
|
|
21602
21616
|
-1
|
|
21603
21617
|
/* Types don't need context IDs. */
|
|
21604
21618
|
), zi(t));
|
|
@@ -21755,15 +21769,15 @@ function Ul() {
|
|
|
21755
21769
|
function Ml() {
|
|
21756
21770
|
return S(), !!(l(s.parenR) || l(s.ellipsis) || Dl() && (l(s.colon) || l(s.comma) || l(s.question) || l(s.eq) || l(s.parenR) && (S(), l(s.arrow))));
|
|
21757
21771
|
}
|
|
21758
|
-
function
|
|
21772
|
+
function rn(t) {
|
|
21759
21773
|
const e = se(0);
|
|
21760
21774
|
T(t), Bl() || _e(), re(e);
|
|
21761
21775
|
}
|
|
21762
21776
|
function Nl() {
|
|
21763
|
-
l(s.colon) &&
|
|
21777
|
+
l(s.colon) && rn(s.colon);
|
|
21764
21778
|
}
|
|
21765
21779
|
function Vt() {
|
|
21766
|
-
l(s.colon) &&
|
|
21780
|
+
l(s.colon) && dn();
|
|
21767
21781
|
}
|
|
21768
21782
|
function Ol() {
|
|
21769
21783
|
_(s.colon) && _e();
|
|
@@ -21772,7 +21786,7 @@ function Bl() {
|
|
|
21772
21786
|
const t = a.snapshot();
|
|
21773
21787
|
return q(d._asserts) ? (S(), Ee(d._is) ? (_e(), !0) : ps() || l(s._this) ? (S(), Ee(d._is) && _e(), !0) : (a.restoreFromSnapshot(t), !1)) : ps() || l(s._this) ? (S(), q(d._is) && !Pe() ? (S(), _e(), !0) : (a.restoreFromSnapshot(t), !1)) : !1;
|
|
21774
21788
|
}
|
|
21775
|
-
function
|
|
21789
|
+
function dn() {
|
|
21776
21790
|
const t = se(0);
|
|
21777
21791
|
T(s.colon), _e(), re(t);
|
|
21778
21792
|
}
|
|
@@ -21801,7 +21815,7 @@ function Ki() {
|
|
|
21801
21815
|
}
|
|
21802
21816
|
function jl() {
|
|
21803
21817
|
const t = se(1);
|
|
21804
|
-
_e(), T(s.greaterThan), re(t),
|
|
21818
|
+
_e(), T(s.greaterThan), re(t), mn();
|
|
21805
21819
|
}
|
|
21806
21820
|
function $l() {
|
|
21807
21821
|
if (_(s.jsxTagStart)) {
|
|
@@ -21817,7 +21831,7 @@ function wa() {
|
|
|
21817
21831
|
ql(), _(s.comma);
|
|
21818
21832
|
}
|
|
21819
21833
|
function ql() {
|
|
21820
|
-
|
|
21834
|
+
fn(), l(s.lessThan) && jt();
|
|
21821
21835
|
}
|
|
21822
21836
|
function Wl() {
|
|
21823
21837
|
yt(!1), Lt(), _(s._extends) && wa(), va();
|
|
@@ -21854,7 +21868,7 @@ function Xl() {
|
|
|
21854
21868
|
return q(d._require) && be() === s.parenL;
|
|
21855
21869
|
}
|
|
21856
21870
|
function zl() {
|
|
21857
|
-
Xl() ? Yl() :
|
|
21871
|
+
Xl() ? Yl() : fn();
|
|
21858
21872
|
}
|
|
21859
21873
|
function Yl() {
|
|
21860
21874
|
ve(d._require), T(s.parenL), l(s.string) || ne(), Bt(), T(s.parenR);
|
|
@@ -21890,7 +21904,7 @@ function Kl() {
|
|
|
21890
21904
|
case s._var:
|
|
21891
21905
|
case s._let: {
|
|
21892
21906
|
const t = se(1);
|
|
21893
|
-
return
|
|
21907
|
+
return Tn(a.type !== s._var), re(t), !0;
|
|
21894
21908
|
}
|
|
21895
21909
|
case s.name: {
|
|
21896
21910
|
const t = se(1), e = a.contextualKeyword;
|
|
@@ -21985,7 +21999,7 @@ function Dt(t) {
|
|
|
21985
21999
|
}
|
|
21986
22000
|
function Ql() {
|
|
21987
22001
|
const t = a.snapshot();
|
|
21988
|
-
return zn(), $t(), Nl(), T(s.arrow), a.error ? (a.restoreFromSnapshot(t), !1) : (
|
|
22002
|
+
return zn(), $t(), Nl(), T(s.arrow), a.error ? (a.restoreFromSnapshot(t), !1) : (pn(!0), !0);
|
|
21989
22003
|
}
|
|
21990
22004
|
function Xs() {
|
|
21991
22005
|
a.type === s.bitShiftL && (a.pos -= 1, te(s.lessThan)), jt();
|
|
@@ -22011,13 +22025,13 @@ function Ta() {
|
|
|
22011
22025
|
return !1;
|
|
22012
22026
|
}
|
|
22013
22027
|
function Jl(t, e) {
|
|
22014
|
-
if (l(s.colon) &&
|
|
22028
|
+
if (l(s.colon) && rn(s.colon), !l(s.braceL) && Je()) {
|
|
22015
22029
|
let n = a.tokens.length - 1;
|
|
22016
22030
|
for (; n >= 0 && (a.tokens[n].start >= t || a.tokens[n].type === s._default || a.tokens[n].type === s._export); )
|
|
22017
22031
|
a.tokens[n].isType = !0, n--;
|
|
22018
22032
|
return;
|
|
22019
22033
|
}
|
|
22020
|
-
|
|
22034
|
+
pn(!1, e);
|
|
22021
22035
|
}
|
|
22022
22036
|
function eh(t, e, n) {
|
|
22023
22037
|
if (!Pe() && _(s.bang)) {
|
|
@@ -22096,7 +22110,7 @@ function sh() {
|
|
|
22096
22110
|
}
|
|
22097
22111
|
function ih() {
|
|
22098
22112
|
if (a.type === s._const) {
|
|
22099
|
-
const t =
|
|
22113
|
+
const t = hn();
|
|
22100
22114
|
if (t.type === s.name && t.contextualKeyword === d._enum)
|
|
22101
22115
|
return T(s._const), ve(d._enum), a.tokens[a.tokens.length - 1].type = s._enum, Hs(), !0;
|
|
22102
22116
|
}
|
|
@@ -22158,7 +22172,7 @@ function fh() {
|
|
|
22158
22172
|
Pe() || _(s.bang), Vt(), re(t);
|
|
22159
22173
|
}
|
|
22160
22174
|
function dh() {
|
|
22161
|
-
l(s.colon) &&
|
|
22175
|
+
l(s.colon) && dn();
|
|
22162
22176
|
}
|
|
22163
22177
|
function mh(t, e) {
|
|
22164
22178
|
return Hn ? ph(t, e) : gh(t, e);
|
|
@@ -22189,7 +22203,7 @@ function gh(t, e) {
|
|
|
22189
22203
|
function yh() {
|
|
22190
22204
|
if (l(s.colon)) {
|
|
22191
22205
|
const t = a.snapshot();
|
|
22192
|
-
|
|
22206
|
+
rn(s.colon), Oe() && ne(), l(s.arrow) || ne(), a.error && a.restoreFromSnapshot(t);
|
|
22193
22207
|
}
|
|
22194
22208
|
return _(s.arrow);
|
|
22195
22209
|
}
|
|
@@ -22339,7 +22353,7 @@ function Ia() {
|
|
|
22339
22353
|
function je() {
|
|
22340
22354
|
a.tokens.push(new Gn()), ta(), a.start = a.pos;
|
|
22341
22355
|
const t = C.charCodeAt(a.pos);
|
|
22342
|
-
if (
|
|
22356
|
+
if (ln[t])
|
|
22343
22357
|
wh();
|
|
22344
22358
|
else if (t === p.quotationMark || t === p.apostrophe)
|
|
22345
22359
|
vh(t);
|
|
@@ -22382,7 +22396,7 @@ function Ah(t) {
|
|
|
22382
22396
|
Ra(t);
|
|
22383
22397
|
}
|
|
22384
22398
|
function Ih() {
|
|
22385
|
-
Ko(s.question), l(s.colon) && (le ?
|
|
22399
|
+
Ko(s.question), l(s.colon) && (le ? dn() : he && Pt());
|
|
22386
22400
|
}
|
|
22387
22401
|
class Rh {
|
|
22388
22402
|
constructor(e) {
|
|
@@ -22415,12 +22429,12 @@ function Ra(t) {
|
|
|
22415
22429
|
}
|
|
22416
22430
|
function Ph(t) {
|
|
22417
22431
|
const e = a.tokens.length;
|
|
22418
|
-
return
|
|
22432
|
+
return mn() ? !0 : (wn(e, -1, t), !1);
|
|
22419
22433
|
}
|
|
22420
|
-
function
|
|
22434
|
+
function wn(t, e, n) {
|
|
22421
22435
|
if (le && (s._in & s.PRECEDENCE_MASK) > e && !Pe() && (Ee(d._as) || Ee(d._satisfies))) {
|
|
22422
22436
|
const i = se(1);
|
|
22423
|
-
_e(), re(i), ra(),
|
|
22437
|
+
_e(), re(i), ra(), wn(t, e, n);
|
|
22424
22438
|
return;
|
|
22425
22439
|
}
|
|
22426
22440
|
const r = a.type & s.PRECEDENCE_MASK;
|
|
@@ -22428,16 +22442,16 @@ function vn(t, e, n) {
|
|
|
22428
22442
|
const i = a.type;
|
|
22429
22443
|
S(), i === s.nullishCoalescing && (a.tokens[a.tokens.length - 1].nullishStartIndex = t);
|
|
22430
22444
|
const o = a.tokens.length;
|
|
22431
|
-
|
|
22445
|
+
mn(), wn(o, i & s.IS_RIGHT_ASSOCIATIVE ? r - 1 : r, n), i === s.nullishCoalescing && (a.tokens[t].numNullishCoalesceStarts++, a.tokens[a.tokens.length - 1].numNullishCoalesceEnds++), wn(t, e, n);
|
|
22432
22446
|
}
|
|
22433
22447
|
}
|
|
22434
|
-
function
|
|
22448
|
+
function mn() {
|
|
22435
22449
|
if (le && !Hn && _(s.lessThan))
|
|
22436
22450
|
return jl(), !1;
|
|
22437
22451
|
if (q(d._module) && Qo() === p.leftCurlyBrace && !Ho())
|
|
22438
22452
|
return Gh(), !1;
|
|
22439
22453
|
if (a.type & s.IS_PREFIX)
|
|
22440
|
-
return S(),
|
|
22454
|
+
return S(), mn(), !1;
|
|
22441
22455
|
if (Ca())
|
|
22442
22456
|
return !0;
|
|
22443
22457
|
for (; a.type & s.IS_POSTFIX && !Oe(); )
|
|
@@ -22477,11 +22491,11 @@ function Ys(t, e, n) {
|
|
|
22477
22491
|
if (Pa()) {
|
|
22478
22492
|
const r = a.snapshot(), i = a.tokens.length;
|
|
22479
22493
|
S(), a.tokens[a.tokens.length - 1].subscriptStartIndex = t;
|
|
22480
|
-
const o =
|
|
22494
|
+
const o = tn();
|
|
22481
22495
|
a.tokens[a.tokens.length - 1].contextId = o, pt(), a.tokens[a.tokens.length - 1].contextId = o, Dh() && (a.restoreFromSnapshot(r), n.stop = !0, a.scopeDepth++, $t(), Uh(i));
|
|
22482
22496
|
} else {
|
|
22483
22497
|
S(), a.tokens[a.tokens.length - 1].subscriptStartIndex = t;
|
|
22484
|
-
const r =
|
|
22498
|
+
const r = tn();
|
|
22485
22499
|
a.tokens[a.tokens.length - 1].contextId = r, pt(), a.tokens[a.tokens.length - 1].contextId = r;
|
|
22486
22500
|
}
|
|
22487
22501
|
else l(s.backQuote) ? Qs() : n.stop = !0;
|
|
@@ -22503,7 +22517,7 @@ function Dh() {
|
|
|
22503
22517
|
return l(s.colon) || l(s.arrow);
|
|
22504
22518
|
}
|
|
22505
22519
|
function Uh(t) {
|
|
22506
|
-
le ? dh() : he && Df(), T(s.arrow),
|
|
22520
|
+
le ? dh() : he && Df(), T(s.arrow), on(t);
|
|
22507
22521
|
}
|
|
22508
22522
|
function Ks() {
|
|
22509
22523
|
const t = a.tokens.length;
|
|
@@ -22536,7 +22550,7 @@ function at() {
|
|
|
22536
22550
|
return S(), l(s.dot) && (a.tokens[a.tokens.length - 1].type = s.name, S(), Q()), !1;
|
|
22537
22551
|
case s.name: {
|
|
22538
22552
|
const e = a.tokens.length, n = a.start, r = a.contextualKeyword;
|
|
22539
|
-
return Q(), r === d._await ? (Wh(), !1) : r === d._async && l(s._function) && !Oe() ? (S(), It(n, !1), !1) : t && r === d._async && !Oe() && l(s.name) ? (a.scopeDepth++, yt(!1), T(s.arrow),
|
|
22553
|
+
return Q(), r === d._await ? (Wh(), !1) : r === d._async && l(s._function) && !Oe() ? (S(), It(n, !1), !1) : t && r === d._async && !Oe() && l(s.name) ? (a.scopeDepth++, yt(!1), T(s.arrow), on(e), !0) : l(s._do) && !Oe() ? (S(), gt(), !1) : t && !Oe() && l(s.arrow) ? (a.scopeDepth++, js(!1), T(s.arrow), on(e), !0) : (a.tokens[a.tokens.length - 1].identifierRole = X.Access, !1);
|
|
22540
22554
|
}
|
|
22541
22555
|
case s._do:
|
|
22542
22556
|
return S(), gt(), !1;
|
|
@@ -22560,7 +22574,7 @@ function at() {
|
|
|
22560
22574
|
return S(), Ks(), !1;
|
|
22561
22575
|
case s.hash: {
|
|
22562
22576
|
const e = Qo();
|
|
22563
|
-
return
|
|
22577
|
+
return ln[e] || e === p.backslash ? Nn() : S(), !1;
|
|
22564
22578
|
}
|
|
22565
22579
|
default:
|
|
22566
22580
|
return ne(), !1;
|
|
@@ -22597,7 +22611,7 @@ function Fa(t) {
|
|
|
22597
22611
|
} else
|
|
22598
22612
|
Ae(!1, !0);
|
|
22599
22613
|
}
|
|
22600
|
-
return T(s.parenR), t && Nh() && ks() ? (a.restoreFromSnapshot(e), a.scopeDepth++, $t(), ks(),
|
|
22614
|
+
return T(s.parenR), t && Nh() && ks() ? (a.restoreFromSnapshot(e), a.scopeDepth++, $t(), ks(), on(n), a.error ? (a.restoreFromSnapshot(e), Fa(!1), !1) : !0) : !1;
|
|
22601
22615
|
}
|
|
22602
22616
|
function Nh() {
|
|
22603
22617
|
return l(s.colon) || !Oe();
|
|
@@ -22624,7 +22638,7 @@ function Qs() {
|
|
|
22624
22638
|
S();
|
|
22625
22639
|
}
|
|
22626
22640
|
function Js(t, e) {
|
|
22627
|
-
const n =
|
|
22641
|
+
const n = tn();
|
|
22628
22642
|
let r = !0;
|
|
22629
22643
|
for (S(), a.tokens[a.tokens.length - 1].contextId = n; !_(s.braceR) && !a.error; ) {
|
|
22630
22644
|
if (r)
|
|
@@ -22638,7 +22652,7 @@ function Js(t, e) {
|
|
|
22638
22652
|
break;
|
|
22639
22653
|
continue;
|
|
22640
22654
|
}
|
|
22641
|
-
t || (i = _(s.star)), !t && q(d._async) ? (i && ne(), Q(), l(s.colon) || l(s.parenL) || l(s.braceR) || l(s.eq) || l(s.comma) || (l(s.star) && (S(), i = !0),
|
|
22655
|
+
t || (i = _(s.star)), !t && q(d._async) ? (i && ne(), Q(), l(s.colon) || l(s.parenL) || l(s.braceR) || l(s.eq) || l(s.comma) || (l(s.star) && (S(), i = !0), sn(n))) : sn(n), qh(t, e, n);
|
|
22642
22656
|
}
|
|
22643
22657
|
a.tokens[a.tokens.length - 1].contextId = n;
|
|
22644
22658
|
}
|
|
@@ -22655,7 +22669,7 @@ function jh(t, e) {
|
|
|
22655
22669
|
n,
|
|
22656
22670
|
/* isConstructor */
|
|
22657
22671
|
!1
|
|
22658
|
-
), !0) : Vh(t) ? (
|
|
22672
|
+
), !0) : Vh(t) ? (sn(e), vs(
|
|
22659
22673
|
n,
|
|
22660
22674
|
/* isConstructor */
|
|
22661
22675
|
!1
|
|
@@ -22672,26 +22686,26 @@ function $h(t, e) {
|
|
|
22672
22686
|
function qh(t, e, n) {
|
|
22673
22687
|
le ? lh() : he && If(), jh(t, n) || $h(t, e);
|
|
22674
22688
|
}
|
|
22675
|
-
function
|
|
22689
|
+
function sn(t) {
|
|
22676
22690
|
he && ai(), _(s.bracketL) ? (a.tokens[a.tokens.length - 1].contextId = t, Ae(), T(s.bracketR), a.tokens[a.tokens.length - 1].contextId = t) : (l(s.num) || l(s.string) || l(s.bigint) || l(s.decimal) ? at() : Nn(), a.tokens[a.tokens.length - 1].identifierRole = X.ObjectKey, a.tokens[a.tokens.length - 1].contextId = t);
|
|
22677
22691
|
}
|
|
22678
22692
|
function vs(t, e) {
|
|
22679
|
-
const n =
|
|
22693
|
+
const n = tn();
|
|
22680
22694
|
a.scopeDepth++;
|
|
22681
22695
|
const r = a.tokens.length;
|
|
22682
22696
|
$t(e, n), Da(t, n);
|
|
22683
22697
|
const o = a.tokens.length;
|
|
22684
22698
|
a.scopes.push(new nt(r, o, !0)), a.scopeDepth--;
|
|
22685
22699
|
}
|
|
22686
|
-
function
|
|
22687
|
-
|
|
22700
|
+
function on(t) {
|
|
22701
|
+
pn(!0);
|
|
22688
22702
|
const e = a.tokens.length;
|
|
22689
22703
|
a.scopes.push(new nt(t, e, !0)), a.scopeDepth--;
|
|
22690
22704
|
}
|
|
22691
22705
|
function Da(t, e = 0) {
|
|
22692
|
-
le ? Jl(t, e) : he ? gf(e) :
|
|
22706
|
+
le ? Jl(t, e) : he ? gf(e) : pn(!1, e);
|
|
22693
22707
|
}
|
|
22694
|
-
function
|
|
22708
|
+
function pn(t, e = 0) {
|
|
22695
22709
|
t && !l(s.braceL) ? Ae() : gt(!0, e);
|
|
22696
22710
|
}
|
|
22697
22711
|
function Ua(t, e = !1) {
|
|
@@ -22710,7 +22724,7 @@ function Q() {
|
|
|
22710
22724
|
S(), a.tokens[a.tokens.length - 1].type = s.name;
|
|
22711
22725
|
}
|
|
22712
22726
|
function Wh() {
|
|
22713
|
-
|
|
22727
|
+
mn();
|
|
22714
22728
|
}
|
|
22715
22729
|
function Hh() {
|
|
22716
22730
|
S(), !l(s.semi) && !Oe() && (_(s.star), Ae());
|
|
@@ -22777,23 +22791,23 @@ function nf() {
|
|
|
22777
22791
|
function ti(t = !1) {
|
|
22778
22792
|
if (Zn(), l(s.lessThan) && Ye(), _(s._extends))
|
|
22779
22793
|
do
|
|
22780
|
-
|
|
22794
|
+
En();
|
|
22781
22795
|
while (!t && _(s.comma));
|
|
22782
22796
|
if (q(d._mixins)) {
|
|
22783
22797
|
S();
|
|
22784
22798
|
do
|
|
22785
|
-
|
|
22799
|
+
En();
|
|
22786
22800
|
while (_(s.comma));
|
|
22787
22801
|
}
|
|
22788
22802
|
if (q(d._implements)) {
|
|
22789
22803
|
S();
|
|
22790
22804
|
do
|
|
22791
|
-
|
|
22805
|
+
En();
|
|
22792
22806
|
while (_(s.comma));
|
|
22793
22807
|
}
|
|
22794
22808
|
On(t, !1, t);
|
|
22795
22809
|
}
|
|
22796
|
-
function
|
|
22810
|
+
function En() {
|
|
22797
22811
|
Na(!1), l(s.lessThan) && At();
|
|
22798
22812
|
}
|
|
22799
22813
|
function ni() {
|
|
@@ -22828,7 +22842,7 @@ function At() {
|
|
|
22828
22842
|
function sf() {
|
|
22829
22843
|
if (ve(d._interface), _(s._extends))
|
|
22830
22844
|
do
|
|
22831
|
-
|
|
22845
|
+
En();
|
|
22832
22846
|
while (_(s.comma));
|
|
22833
22847
|
On(!1, !1, !1);
|
|
22834
22848
|
}
|
|
@@ -23004,7 +23018,7 @@ function ai() {
|
|
|
23004
23018
|
(l(s.plus) || l(s.minus)) && (S(), a.tokens[a.tokens.length - 1].isType = !0);
|
|
23005
23019
|
}
|
|
23006
23020
|
function gf(t) {
|
|
23007
|
-
l(s.colon) && ei(),
|
|
23021
|
+
l(s.colon) && ei(), pn(!1, t);
|
|
23008
23022
|
}
|
|
23009
23023
|
function yf(t, e, n) {
|
|
23010
23024
|
if (l(s.questionDot) && be() === s.lessThan) {
|
|
@@ -23069,7 +23083,7 @@ function Ef() {
|
|
|
23069
23083
|
function Tf() {
|
|
23070
23084
|
if (q(d._type)) {
|
|
23071
23085
|
const t = se(1);
|
|
23072
|
-
S(), l(s.braceL) ? (ui(),
|
|
23086
|
+
S(), l(s.braceL) ? (ui(), an()) : ri(), re(t);
|
|
23073
23087
|
} else if (q(d._opaque)) {
|
|
23074
23088
|
const t = se(1);
|
|
23075
23089
|
S(), si(!1), re(t);
|
|
@@ -23108,7 +23122,7 @@ function Rf() {
|
|
|
23108
23122
|
}
|
|
23109
23123
|
function Cf() {
|
|
23110
23124
|
if (l(s._typeof) || q(d._type)) {
|
|
23111
|
-
const t =
|
|
23125
|
+
const t = hn();
|
|
23112
23126
|
(Xh(t) || t.type === s.braceL || t.type === s.star) && S();
|
|
23113
23127
|
}
|
|
23114
23128
|
}
|
|
@@ -23165,7 +23179,7 @@ function Nf(t, e = !1) {
|
|
|
23165
23179
|
function Of() {
|
|
23166
23180
|
a.scopeDepth++;
|
|
23167
23181
|
const t = a.tokens.length;
|
|
23168
|
-
return $t(), ks() ? (
|
|
23182
|
+
return $t(), ks() ? (on(t), !0) : !1;
|
|
23169
23183
|
}
|
|
23170
23184
|
function ja() {
|
|
23171
23185
|
ve(d._enum), a.tokens[a.tokens.length - 1].type = s._enum, Q(), Bf();
|
|
@@ -23232,7 +23246,7 @@ function qf(t) {
|
|
|
23232
23246
|
case s._const:
|
|
23233
23247
|
t || ne();
|
|
23234
23248
|
case s._var:
|
|
23235
|
-
|
|
23249
|
+
Tn(e !== s._var);
|
|
23236
23250
|
return;
|
|
23237
23251
|
case s._while:
|
|
23238
23252
|
sd();
|
|
@@ -23262,10 +23276,10 @@ function qf(t) {
|
|
|
23262
23276
|
} else if (a.contextualKeyword === d._using && !Ho() && // Statements like `using[0]` and `using in foo` aren't actual using
|
|
23263
23277
|
// declarations.
|
|
23264
23278
|
be() === s.name) {
|
|
23265
|
-
|
|
23279
|
+
Tn(!0);
|
|
23266
23280
|
return;
|
|
23267
23281
|
} else if ($a()) {
|
|
23268
|
-
ve(d._await),
|
|
23282
|
+
ve(d._await), Tn(!0);
|
|
23269
23283
|
return;
|
|
23270
23284
|
}
|
|
23271
23285
|
}
|
|
@@ -23391,7 +23405,7 @@ function rd() {
|
|
|
23391
23405
|
}
|
|
23392
23406
|
_(s._finally) && gt();
|
|
23393
23407
|
}
|
|
23394
|
-
function
|
|
23408
|
+
function Tn(t) {
|
|
23395
23409
|
S(), Ha(!1, t), ye();
|
|
23396
23410
|
}
|
|
23397
23411
|
function sd() {
|
|
@@ -23454,7 +23468,7 @@ function $t(t = !1, e = 0) {
|
|
|
23454
23468
|
), e && (a.tokens[a.tokens.length - 1].contextId = e);
|
|
23455
23469
|
}
|
|
23456
23470
|
function Rt(t, e = !1) {
|
|
23457
|
-
const n =
|
|
23471
|
+
const n = tn();
|
|
23458
23472
|
S(), a.tokens[a.tokens.length - 1].contextId = n, a.tokens[a.tokens.length - 1].isExpression = !t;
|
|
23459
23473
|
let r = null;
|
|
23460
23474
|
t || (r = a.tokens.length, a.scopeDepth++), fd(t, e), dd();
|
|
@@ -23500,7 +23514,7 @@ function ld(t, e) {
|
|
|
23500
23514
|
);
|
|
23501
23515
|
return;
|
|
23502
23516
|
} else if (Ga()) {
|
|
23503
|
-
|
|
23517
|
+
Sn();
|
|
23504
23518
|
return;
|
|
23505
23519
|
}
|
|
23506
23520
|
if (a.tokens[a.tokens.length - 1].type = s._static, n = !0, l(s.braceL)) {
|
|
@@ -23524,7 +23538,7 @@ function hd(t, e, n) {
|
|
|
23524
23538
|
Gt(n);
|
|
23525
23539
|
let r = !1;
|
|
23526
23540
|
const i = a.tokens[a.tokens.length - 1];
|
|
23527
|
-
i.contextualKeyword === d._constructor && (r = !0), no(), Xa() ? Xt(t, r) : Ga() ?
|
|
23541
|
+
i.contextualKeyword === d._constructor && (r = !0), no(), Xa() ? Xt(t, r) : Ga() ? Sn() : i.contextualKeyword === d._async && !Je() ? (a.tokens[a.tokens.length - 1].type = s._async, l(s.star) && S(), Gt(n), no(), Xt(
|
|
23528
23542
|
t,
|
|
23529
23543
|
!1
|
|
23530
23544
|
/* isConstructor */
|
|
@@ -23532,13 +23546,13 @@ function hd(t, e, n) {
|
|
|
23532
23546
|
t,
|
|
23533
23547
|
/* isConstructor */
|
|
23534
23548
|
!1
|
|
23535
|
-
)) : i.contextualKeyword === d._accessor && !Je() ? (Gt(n),
|
|
23549
|
+
)) : i.contextualKeyword === d._accessor && !Je() ? (Gt(n), Sn()) : Je() ? Sn() : ne();
|
|
23536
23550
|
}
|
|
23537
23551
|
function Xt(t, e) {
|
|
23538
23552
|
le ? Lt() : he && l(s.lessThan) && Ye(), vs(t, e);
|
|
23539
23553
|
}
|
|
23540
23554
|
function Gt(t) {
|
|
23541
|
-
|
|
23555
|
+
sn(t);
|
|
23542
23556
|
}
|
|
23543
23557
|
function no() {
|
|
23544
23558
|
if (le) {
|
|
@@ -23546,7 +23560,7 @@ function no() {
|
|
|
23546
23560
|
_(s.question), re(t);
|
|
23547
23561
|
}
|
|
23548
23562
|
}
|
|
23549
|
-
function
|
|
23563
|
+
function Sn() {
|
|
23550
23564
|
if (le ? (Ko(s.bang), Vt()) : he && l(s.colon) && Pt(), l(s.eq)) {
|
|
23551
23565
|
const t = a.tokens.length;
|
|
23552
23566
|
S(), Ae(), a.tokens[t].rhsEndIndex = a.tokens.length;
|
|
@@ -23562,7 +23576,7 @@ function dd() {
|
|
|
23562
23576
|
}
|
|
23563
23577
|
function za() {
|
|
23564
23578
|
const t = a.tokens.length - 1;
|
|
23565
|
-
le && th() || (yd() ? bd() : gd() ? (Q(), l(s.comma) && be() === s.star ? (T(s.comma), T(s.star), ve(d._as), Q()) : Ya(),
|
|
23579
|
+
le && th() || (yd() ? bd() : gd() ? (Q(), l(s.comma) && be() === s.star ? (T(s.comma), T(s.star), ve(d._as), Q()) : Ya(), an()) : _(s._default) ? md() : kd() ? pd() : (ui(), an()), a.tokens[t].rhsEndIndex = a.tokens.length);
|
|
23566
23580
|
}
|
|
23567
23581
|
function md() {
|
|
23568
23582
|
if (le && sh() || he && kf())
|
|
@@ -23582,7 +23596,7 @@ function gd() {
|
|
|
23582
23596
|
return a.contextualKeyword !== d._async;
|
|
23583
23597
|
if (!l(s._default))
|
|
23584
23598
|
return !1;
|
|
23585
|
-
const t = Bs(), e =
|
|
23599
|
+
const t = Bs(), e = hn(), n = e.type === s.name && e.contextualKeyword === d._from;
|
|
23586
23600
|
if (e.type === s.comma)
|
|
23587
23601
|
return !0;
|
|
23588
23602
|
if (n) {
|
|
@@ -23594,7 +23608,7 @@ function gd() {
|
|
|
23594
23608
|
function Ya() {
|
|
23595
23609
|
_(s.comma) && ui();
|
|
23596
23610
|
}
|
|
23597
|
-
function
|
|
23611
|
+
function an() {
|
|
23598
23612
|
Ee(d._from) && (at(), Za()), ye();
|
|
23599
23613
|
}
|
|
23600
23614
|
function yd() {
|
|
@@ -23604,10 +23618,10 @@ function bd() {
|
|
|
23604
23618
|
he ? xf() : Ts();
|
|
23605
23619
|
}
|
|
23606
23620
|
function Ts() {
|
|
23607
|
-
T(s.star), q(d._as) ? _d() :
|
|
23621
|
+
T(s.star), q(d._as) ? _d() : an();
|
|
23608
23622
|
}
|
|
23609
23623
|
function _d() {
|
|
23610
|
-
S(), a.tokens[a.tokens.length - 1].type = s._as, Q(), Ya(),
|
|
23624
|
+
S(), a.tokens[a.tokens.length - 1].type = s._as, Q(), Ya(), an();
|
|
23611
23625
|
}
|
|
23612
23626
|
function kd() {
|
|
23613
23627
|
return le && Ta() || he && wf() || a.type === s._var || a.type === s._const || a.type === s._let || a.type === s._function || a.type === s._class || q(d._async) || l(s.at);
|
|
@@ -23642,7 +23656,7 @@ function Ka() {
|
|
|
23642
23656
|
return;
|
|
23643
23657
|
}
|
|
23644
23658
|
if (le && q(d._type)) {
|
|
23645
|
-
const t =
|
|
23659
|
+
const t = hn();
|
|
23646
23660
|
if (t.type === s.name && t.contextualKeyword !== d._from) {
|
|
23647
23661
|
if (ve(d._type), be() === s.eq) {
|
|
23648
23662
|
bs();
|
|
@@ -23719,7 +23733,7 @@ function Cd(t) {
|
|
|
23719
23733
|
} while (n > 0 && e < t.tokens.length);
|
|
23720
23734
|
return !1;
|
|
23721
23735
|
}
|
|
23722
|
-
class
|
|
23736
|
+
class Kt {
|
|
23723
23737
|
__init() {
|
|
23724
23738
|
this.resultCode = "";
|
|
23725
23739
|
}
|
|
@@ -23732,7 +23746,7 @@ class Yt {
|
|
|
23732
23746
|
this.tokenIndex = 0;
|
|
23733
23747
|
}
|
|
23734
23748
|
constructor(e, n, r, i, o) {
|
|
23735
|
-
this.code = e, this.tokens = n, this.isFlowEnabled = r, this.disableESTransforms = i, this.helperManager = o,
|
|
23749
|
+
this.code = e, this.tokens = n, this.isFlowEnabled = r, this.disableESTransforms = i, this.helperManager = o, Kt.prototype.__init.call(this), Kt.prototype.__init2.call(this), Kt.prototype.__init3.call(this);
|
|
23736
23750
|
}
|
|
23737
23751
|
/**
|
|
23738
23752
|
* Snapshot the token state in a way that can be restored later, useful for
|
|
@@ -24124,7 +24138,7 @@ function nc(t, e, n, r) {
|
|
|
24124
24138
|
const u = n.identifierNameForToken(c);
|
|
24125
24139
|
return r.typeDeclarations.has(u) && !r.valueDeclarations.has(u);
|
|
24126
24140
|
}
|
|
24127
|
-
class
|
|
24141
|
+
class Zt extends ze {
|
|
24128
24142
|
__init() {
|
|
24129
24143
|
this.hadExport = !1;
|
|
24130
24144
|
}
|
|
@@ -24135,7 +24149,7 @@ class Kt extends ze {
|
|
|
24135
24149
|
this.hadDefaultExport = !1;
|
|
24136
24150
|
}
|
|
24137
24151
|
constructor(e, n, r, i, o, c, u, h, f, m, g, v) {
|
|
24138
|
-
super(), this.rootTransformer = e, this.tokens = n, this.importProcessor = r, this.nameManager = i, this.helperManager = o, this.reactHotLoaderTransformer = c, this.enableLegacyBabel5ModuleInterop = u, this.enableLegacyTypeScriptModuleInterop = h, this.isTypeScriptTransformEnabled = f, this.isFlowTransformEnabled = m, this.preserveDynamicImport = g, this.keepUnusedImports = v,
|
|
24152
|
+
super(), this.rootTransformer = e, this.tokens = n, this.importProcessor = r, this.nameManager = i, this.helperManager = o, this.reactHotLoaderTransformer = c, this.enableLegacyBabel5ModuleInterop = u, this.enableLegacyTypeScriptModuleInterop = h, this.isTypeScriptTransformEnabled = f, this.isFlowTransformEnabled = m, this.preserveDynamicImport = g, this.keepUnusedImports = v, Zt.prototype.__init.call(this), Zt.prototype.__init2.call(this), Zt.prototype.__init3.call(this), this.declarationInfo = f ? ec(n) : Ja;
|
|
24139
24153
|
}
|
|
24140
24154
|
getPrefixCode() {
|
|
24141
24155
|
let e = "";
|
|
@@ -24512,7 +24526,7 @@ module.exports = exports.default;
|
|
|
24512
24526
|
this.tokens.removeToken();
|
|
24513
24527
|
break;
|
|
24514
24528
|
}
|
|
24515
|
-
const r =
|
|
24529
|
+
const r = nn(this.tokens);
|
|
24516
24530
|
for (; this.tokens.currentIndex() < r.endIndex; )
|
|
24517
24531
|
this.tokens.removeToken();
|
|
24518
24532
|
if (!(r.isType || !e && this.shouldElideExportedIdentifier(r.leftName))) {
|
|
@@ -24622,7 +24636,7 @@ class Dd extends ze {
|
|
|
24622
24636
|
else if (this.tokens.matches1(s.braceL)) {
|
|
24623
24637
|
for (r && this.tokens.appendCode(","), this.tokens.copyToken(); !this.tokens.matches1(s.braceR); ) {
|
|
24624
24638
|
n = !0;
|
|
24625
|
-
const i =
|
|
24639
|
+
const i = nn(this.tokens);
|
|
24626
24640
|
if (i.isType || this.shouldAutomaticallyElideImportedName(i.rightName)) {
|
|
24627
24641
|
for (; this.tokens.currentIndex() < i.endIndex; )
|
|
24628
24642
|
this.tokens.removeToken();
|
|
@@ -24675,7 +24689,7 @@ class Dd extends ze {
|
|
|
24675
24689
|
const e = tc(this.tokens);
|
|
24676
24690
|
let n = !1;
|
|
24677
24691
|
for (; !this.tokens.matches1(s.braceR); ) {
|
|
24678
|
-
const r =
|
|
24692
|
+
const r = nn(this.tokens);
|
|
24679
24693
|
if (r.isType || !e && this.shouldElideExportedName(r.leftName)) {
|
|
24680
24694
|
for (; this.tokens.currentIndex() < r.endIndex; )
|
|
24681
24695
|
this.tokens.removeToken();
|
|
@@ -24815,7 +24829,7 @@ function Md(t) {
|
|
|
24815
24829
|
}
|
|
24816
24830
|
return n;
|
|
24817
24831
|
}
|
|
24818
|
-
const
|
|
24832
|
+
const kn = "jest", Nd = ["mock", "unmock", "enableAutomock", "disableAutomock"];
|
|
24819
24833
|
class li extends ze {
|
|
24820
24834
|
__init() {
|
|
24821
24835
|
this.hoistedFunctionNames = [];
|
|
@@ -24824,7 +24838,7 @@ class li extends ze {
|
|
|
24824
24838
|
super(), this.rootTransformer = e, this.tokens = n, this.nameManager = r, this.importProcessor = i, li.prototype.__init.call(this);
|
|
24825
24839
|
}
|
|
24826
24840
|
process() {
|
|
24827
|
-
return this.tokens.currentToken().scopeDepth === 0 && this.tokens.matches4(s.name, s.dot, s.name, s.parenL) && this.tokens.identifierName() ===
|
|
24841
|
+
return this.tokens.currentToken().scopeDepth === 0 && this.tokens.matches4(s.name, s.dot, s.name, s.parenL) && this.tokens.identifierName() === kn ? Md([this, "access", (e) => e.importProcessor, "optionalAccess", (e) => e.getGlobalNames, "call", (e) => e(), "optionalAccess", (e) => e.has, "call", (e) => e(kn)]) ? !1 : this.extractHoistedCalls() : !1;
|
|
24828
24842
|
}
|
|
24829
24843
|
getHoistedCode() {
|
|
24830
24844
|
return this.hoistedFunctionNames.length > 0 ? this.hoistedFunctionNames.map((e) => `${e}();`).join("") : "";
|
|
@@ -24844,9 +24858,9 @@ class li extends ze {
|
|
|
24844
24858
|
const n = this.tokens.identifierNameAtIndex(this.tokens.currentIndex() + 1);
|
|
24845
24859
|
if (Nd.includes(n)) {
|
|
24846
24860
|
const i = this.nameManager.claimFreeName("__jestHoist");
|
|
24847
|
-
this.hoistedFunctionNames.push(i), this.tokens.replaceToken(`function ${i}(){${
|
|
24861
|
+
this.hoistedFunctionNames.push(i), this.tokens.replaceToken(`function ${i}(){${kn}.`), this.tokens.copyToken(), this.tokens.copyToken(), this.rootTransformer.processBalancedCode(), this.tokens.copyExpectedToken(s.parenR), this.tokens.appendCode(";}"), e = !1;
|
|
24848
24862
|
} else
|
|
24849
|
-
e ? this.tokens.copyToken() : this.tokens.replaceToken(`${
|
|
24863
|
+
e ? this.tokens.copyToken() : this.tokens.replaceToken(`${kn}.`), this.tokens.copyToken(), this.tokens.copyToken(), this.rootTransformer.processBalancedCode(), this.tokens.copyExpectedToken(s.parenR), e = !0;
|
|
24850
24864
|
}
|
|
24851
24865
|
return !0;
|
|
24852
24866
|
}
|
|
@@ -25105,7 +25119,7 @@ const $d = /* @__PURE__ */ new Set([
|
|
|
25105
25119
|
"true"
|
|
25106
25120
|
]);
|
|
25107
25121
|
function io(t) {
|
|
25108
|
-
if (t.length === 0 || !
|
|
25122
|
+
if (t.length === 0 || !ln[t.charCodeAt(0)])
|
|
25109
25123
|
return !1;
|
|
25110
25124
|
for (let e = 1; e < t.length; e++)
|
|
25111
25125
|
if (!Xe[t.charCodeAt(e)])
|
|
@@ -25290,7 +25304,7 @@ class jn {
|
|
|
25290
25304
|
if (c === null)
|
|
25291
25305
|
throw new Error("Expected non-null importProcessor with imports transform enabled.");
|
|
25292
25306
|
this.transformers.push(
|
|
25293
|
-
new
|
|
25307
|
+
new Zt(
|
|
25294
25308
|
this,
|
|
25295
25309
|
o,
|
|
25296
25310
|
c,
|
|
@@ -25587,7 +25601,7 @@ function Xd(t, e, n) {
|
|
|
25587
25601
|
for (; ; ) {
|
|
25588
25602
|
if (t.matches1AtIndex(e, s.braceR))
|
|
25589
25603
|
return;
|
|
25590
|
-
const r =
|
|
25604
|
+
const r = nn(t, e);
|
|
25591
25605
|
if (e = r.endIndex, r.isType || n.add(r.rightName), t.matches2AtIndex(e, s.comma, s.braceR))
|
|
25592
25606
|
return;
|
|
25593
25607
|
if (t.matches1AtIndex(e, s.braceR))
|
|
@@ -25628,7 +25642,7 @@ function zd(t, e) {
|
|
|
25628
25642
|
}
|
|
25629
25643
|
}
|
|
25630
25644
|
function Yd(t, e) {
|
|
25631
|
-
const n = e.transforms.includes("jsx"), r = e.transforms.includes("typescript"), i = e.transforms.includes("flow"), o = e.disableESTransforms === !0, c = Rd(t, n, r, i), u = c.tokens, h = c.scopes, f = new Vs(t, u), m = new Fn(f), g = new
|
|
25645
|
+
const n = e.transforms.includes("jsx"), r = e.transforms.includes("typescript"), i = e.transforms.includes("flow"), o = e.disableESTransforms === !0, c = Rd(t, n, r, i), u = c.tokens, h = c.scopes, f = new Vs(t, u), m = new Fn(f), g = new Kt(
|
|
25632
25646
|
t,
|
|
25633
25647
|
u,
|
|
25634
25648
|
i,
|
|
@@ -25654,10 +25668,10 @@ function rc(t) {
|
|
|
25654
25668
|
data: t
|
|
25655
25669
|
});
|
|
25656
25670
|
}
|
|
25657
|
-
const
|
|
25671
|
+
const cn = { current: null };
|
|
25658
25672
|
self.addEventListener("error", (t) => {
|
|
25659
25673
|
const e = t.error, n = e?.stack, r = e?.message ?? t.message ?? String(t);
|
|
25660
|
-
|
|
25674
|
+
cn.current ? cn.current.reportSceneError({
|
|
25661
25675
|
message: r,
|
|
25662
25676
|
...n !== void 0 && { stack: n },
|
|
25663
25677
|
code: "UNCAUGHT_ERROR"
|
|
@@ -25669,7 +25683,7 @@ self.addEventListener("error", (t) => {
|
|
|
25669
25683
|
});
|
|
25670
25684
|
self.addEventListener("unhandledrejection", (t) => {
|
|
25671
25685
|
const e = t.reason, n = e?.stack, r = e?.message ?? String(t.reason);
|
|
25672
|
-
|
|
25686
|
+
cn.current ? cn.current.reportSceneError({
|
|
25673
25687
|
message: r,
|
|
25674
25688
|
...n !== void 0 && { stack: n },
|
|
25675
25689
|
code: "UNHANDLED_REJECTION"
|
|
@@ -25679,8 +25693,8 @@ self.addEventListener("unhandledrejection", (t) => {
|
|
|
25679
25693
|
...n !== void 0 && { stack: n }
|
|
25680
25694
|
}), t.preventDefault();
|
|
25681
25695
|
});
|
|
25682
|
-
const $e = new
|
|
25683
|
-
|
|
25696
|
+
const $e = new Yt(), Ve = new q1((t) => self.postMessage(t));
|
|
25697
|
+
cn.current = Ve;
|
|
25684
25698
|
$e.setSceneErrorReporter(Ve);
|
|
25685
25699
|
let oo = null;
|
|
25686
25700
|
function ao(t) {
|
|
@@ -25771,4 +25785,4 @@ throw new Error("Scene code must define a render function");`, c = Object.getPro
|
|
|
25771
25785
|
}
|
|
25772
25786
|
}
|
|
25773
25787
|
self.setSceneCode = Kd;
|
|
25774
|
-
//# sourceMappingURL=viji.worker-
|
|
25788
|
+
//# sourceMappingURL=viji.worker-DYCbS06e.js.map
|