@viji-dev/core 0.11.5 → 0.11.6
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/dist/artist-dts-p5.js +1 -1
- package/dist/artist-dts.js +1 -1
- package/dist/artist-global-p5.d.ts +8 -1
- package/dist/artist-global.d.ts +8 -1
- package/dist/assets/{viji.worker-Dz7THSog.js → viji.worker-Bu5UOGpW.js} +669 -667
- package/dist/docs-api.js +2 -2
- package/dist/{essentia-wasm.web-BjQ6Tlu7.js → essentia-wasm.web-B5WvSGTX.js} +2 -2
- package/dist/{index-CFKPh6Ia.js → index-BKvsDqj0.js} +79 -6
- package/dist/index.d.ts +60 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -2877,17 +2877,17 @@ ${c}`);
|
|
|
2877
2877
|
this.setUniform("u_face0Neutral", "float", _.neutral || 0), this.setUniform("u_face0Happy", "float", _.happy || 0), this.setUniform("u_face0Sad", "float", _.sad || 0), this.setUniform("u_face0Angry", "float", _.angry || 0), this.setUniform("u_face0Surprised", "float", _.surprised || 0), this.setUniform("u_face0Disgusted", "float", _.disgusted || 0), this.setUniform("u_face0Fearful", "float", _.fearful || 0), this.setUniform("u_face0BrowDownLeft", "float", b.browDownLeft || 0), this.setUniform("u_face0BrowDownRight", "float", b.browDownRight || 0), this.setUniform("u_face0BrowInnerUp", "float", b.browInnerUp || 0), this.setUniform("u_face0BrowOuterUpLeft", "float", b.browOuterUpLeft || 0), this.setUniform("u_face0BrowOuterUpRight", "float", b.browOuterUpRight || 0), this.setUniform("u_face0CheekPuff", "float", b.cheekPuff || 0), this.setUniform("u_face0CheekSquintLeft", "float", b.cheekSquintLeft || 0), this.setUniform("u_face0CheekSquintRight", "float", b.cheekSquintRight || 0), this.setUniform("u_face0EyeBlinkLeft", "float", b.eyeBlinkLeft || 0), this.setUniform("u_face0EyeBlinkRight", "float", b.eyeBlinkRight || 0), this.setUniform("u_face0EyeLookDownLeft", "float", b.eyeLookDownLeft || 0), this.setUniform("u_face0EyeLookDownRight", "float", b.eyeLookDownRight || 0), this.setUniform("u_face0EyeLookInLeft", "float", b.eyeLookInLeft || 0), this.setUniform("u_face0EyeLookInRight", "float", b.eyeLookInRight || 0), this.setUniform("u_face0EyeLookOutLeft", "float", b.eyeLookOutLeft || 0), this.setUniform("u_face0EyeLookOutRight", "float", b.eyeLookOutRight || 0), this.setUniform("u_face0EyeLookUpLeft", "float", b.eyeLookUpLeft || 0), this.setUniform("u_face0EyeLookUpRight", "float", b.eyeLookUpRight || 0), this.setUniform("u_face0EyeSquintLeft", "float", b.eyeSquintLeft || 0), this.setUniform("u_face0EyeSquintRight", "float", b.eyeSquintRight || 0), this.setUniform("u_face0EyeWideLeft", "float", b.eyeWideLeft || 0), this.setUniform("u_face0EyeWideRight", "float", b.eyeWideRight || 0), this.setUniform("u_face0JawForward", "float", b.jawForward || 0), this.setUniform("u_face0JawLeft", "float", b.jawLeft || 0), this.setUniform("u_face0JawOpen", "float", b.jawOpen || 0), this.setUniform("u_face0JawRight", "float", b.jawRight || 0), this.setUniform("u_face0MouthClose", "float", b.mouthClose || 0), this.setUniform("u_face0MouthDimpleLeft", "float", b.mouthDimpleLeft || 0), this.setUniform("u_face0MouthDimpleRight", "float", b.mouthDimpleRight || 0), this.setUniform("u_face0MouthFrownLeft", "float", b.mouthFrownLeft || 0), this.setUniform("u_face0MouthFrownRight", "float", b.mouthFrownRight || 0), this.setUniform("u_face0MouthFunnel", "float", b.mouthFunnel || 0), this.setUniform("u_face0MouthLeft", "float", b.mouthLeft || 0), this.setUniform("u_face0MouthLowerDownLeft", "float", b.mouthLowerDownLeft || 0), this.setUniform("u_face0MouthLowerDownRight", "float", b.mouthLowerDownRight || 0), this.setUniform("u_face0MouthPressLeft", "float", b.mouthPressLeft || 0), this.setUniform("u_face0MouthPressRight", "float", b.mouthPressRight || 0), this.setUniform("u_face0MouthPucker", "float", b.mouthPucker || 0), this.setUniform("u_face0MouthRight", "float", b.mouthRight || 0), this.setUniform("u_face0MouthRollLower", "float", b.mouthRollLower || 0), this.setUniform("u_face0MouthRollUpper", "float", b.mouthRollUpper || 0), this.setUniform("u_face0MouthShrugLower", "float", b.mouthShrugLower || 0), this.setUniform("u_face0MouthShrugUpper", "float", b.mouthShrugUpper || 0), this.setUniform("u_face0MouthSmileLeft", "float", b.mouthSmileLeft || 0), this.setUniform("u_face0MouthSmileRight", "float", b.mouthSmileRight || 0), this.setUniform("u_face0MouthStretchLeft", "float", b.mouthStretchLeft || 0), this.setUniform("u_face0MouthStretchRight", "float", b.mouthStretchRight || 0), this.setUniform("u_face0MouthUpperUpLeft", "float", b.mouthUpperUpLeft || 0), this.setUniform("u_face0MouthUpperUpRight", "float", b.mouthUpperUpRight || 0), this.setUniform("u_face0NoseSneerLeft", "float", b.noseSneerLeft || 0), this.setUniform("u_face0NoseSneerRight", "float", b.noseSneerRight || 0), this.setUniform("u_face0TongueOut", "float", b.tongueOut || 0);
|
|
2878
2878
|
} else
|
|
2879
2879
|
this.setUniform("u_face0Neutral", "float", 0), this.setUniform("u_face0Happy", "float", 0), this.setUniform("u_face0Sad", "float", 0), this.setUniform("u_face0Angry", "float", 0), this.setUniform("u_face0Surprised", "float", 0), this.setUniform("u_face0Disgusted", "float", 0), this.setUniform("u_face0Fearful", "float", 0), this.setUniform("u_face0BrowDownLeft", "float", 0), this.setUniform("u_face0BrowDownRight", "float", 0), this.setUniform("u_face0BrowInnerUp", "float", 0), this.setUniform("u_face0BrowOuterUpLeft", "float", 0), this.setUniform("u_face0BrowOuterUpRight", "float", 0), this.setUniform("u_face0CheekPuff", "float", 0), this.setUniform("u_face0CheekSquintLeft", "float", 0), this.setUniform("u_face0CheekSquintRight", "float", 0), this.setUniform("u_face0EyeBlinkLeft", "float", 0), this.setUniform("u_face0EyeBlinkRight", "float", 0), this.setUniform("u_face0EyeLookDownLeft", "float", 0), this.setUniform("u_face0EyeLookDownRight", "float", 0), this.setUniform("u_face0EyeLookInLeft", "float", 0), this.setUniform("u_face0EyeLookInRight", "float", 0), this.setUniform("u_face0EyeLookOutLeft", "float", 0), this.setUniform("u_face0EyeLookOutRight", "float", 0), this.setUniform("u_face0EyeLookUpLeft", "float", 0), this.setUniform("u_face0EyeLookUpRight", "float", 0), this.setUniform("u_face0EyeSquintLeft", "float", 0), this.setUniform("u_face0EyeSquintRight", "float", 0), this.setUniform("u_face0EyeWideLeft", "float", 0), this.setUniform("u_face0EyeWideRight", "float", 0), this.setUniform("u_face0JawForward", "float", 0), this.setUniform("u_face0JawLeft", "float", 0), this.setUniform("u_face0JawOpen", "float", 0), this.setUniform("u_face0JawRight", "float", 0), this.setUniform("u_face0MouthClose", "float", 0), this.setUniform("u_face0MouthDimpleLeft", "float", 0), this.setUniform("u_face0MouthDimpleRight", "float", 0), this.setUniform("u_face0MouthFrownLeft", "float", 0), this.setUniform("u_face0MouthFrownRight", "float", 0), this.setUniform("u_face0MouthFunnel", "float", 0), this.setUniform("u_face0MouthLeft", "float", 0), this.setUniform("u_face0MouthLowerDownLeft", "float", 0), this.setUniform("u_face0MouthLowerDownRight", "float", 0), this.setUniform("u_face0MouthPressLeft", "float", 0), this.setUniform("u_face0MouthPressRight", "float", 0), this.setUniform("u_face0MouthPucker", "float", 0), this.setUniform("u_face0MouthRight", "float", 0), this.setUniform("u_face0MouthRollLower", "float", 0), this.setUniform("u_face0MouthRollUpper", "float", 0), this.setUniform("u_face0MouthShrugLower", "float", 0), this.setUniform("u_face0MouthShrugUpper", "float", 0), this.setUniform("u_face0MouthSmileLeft", "float", 0), this.setUniform("u_face0MouthSmileRight", "float", 0), this.setUniform("u_face0MouthStretchLeft", "float", 0), this.setUniform("u_face0MouthStretchRight", "float", 0), this.setUniform("u_face0MouthUpperUpLeft", "float", 0), this.setUniform("u_face0MouthUpperUpRight", "float", 0), this.setUniform("u_face0NoseSneerLeft", "float", 0), this.setUniform("u_face0NoseSneerRight", "float", 0), this.setUniform("u_face0TongueOut", "float", 0);
|
|
2880
|
-
const O = s.cv?.hands || [],
|
|
2881
|
-
this.setUniform("u_handCount", "int",
|
|
2882
|
-
const
|
|
2883
|
-
if (
|
|
2884
|
-
const _ =
|
|
2885
|
-
this.setUniform("u_leftHandPalm", "vec3", [_?.x || 0, 1 - (_?.y || 0), _?.z || 0]), this.setUniform("u_leftHandConfidence", "float",
|
|
2880
|
+
const O = s.cv?.hands || [], q = this.visibleFeatures.has("handTracking");
|
|
2881
|
+
this.setUniform("u_handCount", "int", q ? O.length : 0);
|
|
2882
|
+
const z = q ? O.find((_) => _.handedness === "left") : void 0, C = q ? O.find((_) => _.handedness === "right") : void 0;
|
|
2883
|
+
if (z) {
|
|
2884
|
+
const _ = z.palm || z.landmarks?.[9], b = z.gestures || {}, v = z.bounds;
|
|
2885
|
+
this.setUniform("u_leftHandPalm", "vec3", [_?.x || 0, 1 - (_?.y || 0), _?.z || 0]), this.setUniform("u_leftHandConfidence", "float", z.confidence || 0), this.setUniform("u_leftHandBounds", "vec4", [v?.x || 0, 1 - (v?.y || 0) - (v?.height || 0), v?.width || 0, v?.height || 0]), this.setUniform("u_leftHandFist", "float", b.fist || 0), this.setUniform("u_leftHandOpen", "float", b.openPalm || 0), this.setUniform("u_leftHandPeace", "float", b.peace || 0), this.setUniform("u_leftHandThumbsUp", "float", b.thumbsUp || 0), this.setUniform("u_leftHandThumbsDown", "float", b.thumbsDown || 0), this.setUniform("u_leftHandPointing", "float", b.pointing || 0), this.setUniform("u_leftHandILoveYou", "float", b.iLoveYou || 0);
|
|
2886
2886
|
} else
|
|
2887
2887
|
this.setUniform("u_leftHandPalm", "vec3", [0, 0, 0]), this.setUniform("u_leftHandConfidence", "float", 0), this.setUniform("u_leftHandBounds", "vec4", [0, 0, 0, 0]), this.setUniform("u_leftHandFist", "float", 0), this.setUniform("u_leftHandOpen", "float", 0), this.setUniform("u_leftHandPeace", "float", 0), this.setUniform("u_leftHandThumbsUp", "float", 0), this.setUniform("u_leftHandThumbsDown", "float", 0), this.setUniform("u_leftHandPointing", "float", 0), this.setUniform("u_leftHandILoveYou", "float", 0);
|
|
2888
|
-
if (
|
|
2889
|
-
const _ =
|
|
2890
|
-
this.setUniform("u_rightHandPalm", "vec3", [_?.x || 0, 1 - (_?.y || 0), _?.z || 0]), this.setUniform("u_rightHandConfidence", "float",
|
|
2888
|
+
if (C) {
|
|
2889
|
+
const _ = C.palm || C.landmarks?.[9], b = C.gestures || {}, v = C.bounds;
|
|
2890
|
+
this.setUniform("u_rightHandPalm", "vec3", [_?.x || 0, 1 - (_?.y || 0), _?.z || 0]), this.setUniform("u_rightHandConfidence", "float", C.confidence || 0), this.setUniform("u_rightHandBounds", "vec4", [v?.x || 0, 1 - (v?.y || 0) - (v?.height || 0), v?.width || 0, v?.height || 0]), this.setUniform("u_rightHandFist", "float", b.fist || 0), this.setUniform("u_rightHandOpen", "float", b.openPalm || 0), this.setUniform("u_rightHandPeace", "float", b.peace || 0), this.setUniform("u_rightHandThumbsUp", "float", b.thumbsUp || 0), this.setUniform("u_rightHandThumbsDown", "float", b.thumbsDown || 0), this.setUniform("u_rightHandPointing", "float", b.pointing || 0), this.setUniform("u_rightHandILoveYou", "float", b.iLoveYou || 0);
|
|
2891
2891
|
} else
|
|
2892
2892
|
this.setUniform("u_rightHandPalm", "vec3", [0, 0, 0]), this.setUniform("u_rightHandConfidence", "float", 0), this.setUniform("u_rightHandBounds", "vec4", [0, 0, 0, 0]), this.setUniform("u_rightHandFist", "float", 0), this.setUniform("u_rightHandOpen", "float", 0), this.setUniform("u_rightHandPeace", "float", 0), this.setUniform("u_rightHandThumbsUp", "float", 0), this.setUniform("u_rightHandThumbsDown", "float", 0), this.setUniform("u_rightHandPointing", "float", 0), this.setUniform("u_rightHandILoveYou", "float", 0);
|
|
2893
2893
|
const M = this.visibleFeatures.has("poseDetection") ? s.cv?.pose ?? null : null;
|
|
@@ -2898,9 +2898,9 @@ ${c}`);
|
|
|
2898
2898
|
this.setUniform("u_poseConfidence", "float", 0), this.setUniform("u_nosePosition", "vec2", [0, 0]), this.setUniform("u_leftShoulderPosition", "vec2", [0, 0]), this.setUniform("u_rightShoulderPosition", "vec2", [0, 0]), this.setUniform("u_leftElbowPosition", "vec2", [0, 0]), this.setUniform("u_rightElbowPosition", "vec2", [0, 0]), this.setUniform("u_leftWristPosition", "vec2", [0, 0]), this.setUniform("u_rightWristPosition", "vec2", [0, 0]), this.setUniform("u_leftHipPosition", "vec2", [0, 0]), this.setUniform("u_rightHipPosition", "vec2", [0, 0]), this.setUniform("u_leftKneePosition", "vec2", [0, 0]), this.setUniform("u_rightKneePosition", "vec2", [0, 0]), this.setUniform("u_leftAnklePosition", "vec2", [0, 0]), this.setUniform("u_rightAnklePosition", "vec2", [0, 0]);
|
|
2899
2899
|
const oe = this.visibleFeatures.has("bodySegmentation") ? s.cv?.segmentation ?? null : null;
|
|
2900
2900
|
oe ? (this.updateSegmentationTexture(oe.mask, oe.width, oe.height), this.setUniform("u_segmentationRes", "vec2", [oe.width, oe.height])) : this.setUniform("u_segmentationRes", "vec2", [0, 0]);
|
|
2901
|
-
const
|
|
2902
|
-
if (
|
|
2903
|
-
const _ =
|
|
2901
|
+
const se = e.device;
|
|
2902
|
+
if (se) {
|
|
2903
|
+
const _ = se.motion;
|
|
2904
2904
|
_?.acceleration ? this.setUniform("u_deviceAcceleration", "vec3", [
|
|
2905
2905
|
_.acceleration.x ?? 0,
|
|
2906
2906
|
_.acceleration.y ?? 0,
|
|
@@ -2914,7 +2914,7 @@ ${c}`);
|
|
|
2914
2914
|
_.rotationRate.beta ?? 0,
|
|
2915
2915
|
_.rotationRate.gamma ?? 0
|
|
2916
2916
|
]) : this.setUniform("u_deviceRotationRate", "vec3", [0, 0, 0]);
|
|
2917
|
-
const b =
|
|
2917
|
+
const b = se.orientation;
|
|
2918
2918
|
b ? (this.setUniform("u_deviceOrientation", "vec3", [
|
|
2919
2919
|
b.alpha ?? 0,
|
|
2920
2920
|
b.beta ?? 0,
|
|
@@ -2922,11 +2922,11 @@ ${c}`);
|
|
|
2922
2922
|
]), this.setUniform("u_deviceOrientationAbsolute", "bool", b.absolute)) : (this.setUniform("u_deviceOrientation", "vec3", [0, 0, 0]), this.setUniform("u_deviceOrientationAbsolute", "bool", !1));
|
|
2923
2923
|
} else
|
|
2924
2924
|
this.setUniform("u_deviceAcceleration", "vec3", [0, 0, 0]), this.setUniform("u_deviceAccelerationGravity", "vec3", [0, 0, 0]), this.setUniform("u_deviceRotationRate", "vec3", [0, 0, 0]), this.setUniform("u_deviceOrientation", "vec3", [0, 0, 0]), this.setUniform("u_deviceOrientationAbsolute", "bool", !1);
|
|
2925
|
-
const
|
|
2926
|
-
this.setUniform("u_externalDeviceCount", "int",
|
|
2925
|
+
const K = e.devices || [], he = Math.min(K.length, Fe.MAX_EXTERNAL_DEVICES);
|
|
2926
|
+
this.setUniform("u_externalDeviceCount", "int", he);
|
|
2927
2927
|
for (let _ = 0; _ < Fe.MAX_EXTERNAL_DEVICES; _++)
|
|
2928
|
-
if (_ <
|
|
2929
|
-
const b =
|
|
2928
|
+
if (_ < he) {
|
|
2929
|
+
const b = K[_], v = b.motion;
|
|
2930
2930
|
v?.acceleration ? this.setUniform(`u_device${_}Acceleration`, "vec3", [
|
|
2931
2931
|
v.acceleration.x ?? 0,
|
|
2932
2932
|
v.acceleration.y ?? 0,
|
|
@@ -3693,30 +3693,30 @@ const Rr = (t) => (lr << BigInt(t)) - lr;
|
|
|
3693
3693
|
function s1(t, e, n) {
|
|
3694
3694
|
if (St(t, "hashLen"), St(e, "qByteLen"), typeof n != "function")
|
|
3695
3695
|
throw new TypeError("hmacFn must be a function");
|
|
3696
|
-
const s = (
|
|
3696
|
+
const s = (q) => new Uint8Array(q), i = Uint8Array.of(), o = Uint8Array.of(0), c = Uint8Array.of(1), u = 1e3;
|
|
3697
3697
|
let h = s(t), f = s(t), m = 0;
|
|
3698
3698
|
const g = () => {
|
|
3699
3699
|
h.fill(1), f.fill(0), m = 0;
|
|
3700
|
-
}, x = (...
|
|
3701
|
-
f = x(o,
|
|
3700
|
+
}, x = (...q) => n(f, ft(h, ...q)), T = (q = i) => {
|
|
3701
|
+
f = x(o, q), h = x(), q.length !== 0 && (f = x(c, q), h = x());
|
|
3702
3702
|
}, L = () => {
|
|
3703
3703
|
if (m++ >= u)
|
|
3704
3704
|
throw new Error("drbg: tried max amount of iterations");
|
|
3705
|
-
let
|
|
3706
|
-
const
|
|
3707
|
-
for (;
|
|
3705
|
+
let q = 0;
|
|
3706
|
+
const z = [];
|
|
3707
|
+
for (; q < e; ) {
|
|
3708
3708
|
h = x();
|
|
3709
|
-
const
|
|
3710
|
-
|
|
3709
|
+
const C = h.slice();
|
|
3710
|
+
z.push(C), q += h.length;
|
|
3711
3711
|
}
|
|
3712
|
-
return ft(...
|
|
3712
|
+
return ft(...z);
|
|
3713
3713
|
};
|
|
3714
|
-
return (
|
|
3715
|
-
g(), T(
|
|
3716
|
-
let
|
|
3717
|
-
for (; (
|
|
3714
|
+
return (q, z) => {
|
|
3715
|
+
g(), T(q);
|
|
3716
|
+
let C;
|
|
3717
|
+
for (; (C = z(L())) === void 0; )
|
|
3718
3718
|
T();
|
|
3719
|
-
return g(),
|
|
3719
|
+
return g(), C;
|
|
3720
3720
|
};
|
|
3721
3721
|
}
|
|
3722
3722
|
function qn(t, e = {}, n = {}) {
|
|
@@ -3777,8 +3777,8 @@ function a1(t) {
|
|
|
3777
3777
|
let m = f.pow(h, c), g = f.mul(m, s);
|
|
3778
3778
|
const x = f.mul(m, i), T = f.mul(m, o), L = f.eql(f.sqr(g), h), O = f.eql(f.sqr(x), h);
|
|
3779
3779
|
m = f.cmov(m, g, L), g = f.cmov(T, x, O);
|
|
3780
|
-
const
|
|
3781
|
-
return Cr(f,
|
|
3780
|
+
const q = f.eql(f.sqr(g), h), z = f.cmov(m, g, q);
|
|
3781
|
+
return Cr(f, z, h), z;
|
|
3782
3782
|
};
|
|
3783
3783
|
}
|
|
3784
3784
|
function Do(t) {
|
|
@@ -3806,12 +3806,12 @@ function Do(t) {
|
|
|
3806
3806
|
for (; !m.eql(T, m.ONE); ) {
|
|
3807
3807
|
if (m.is0(T))
|
|
3808
3808
|
return m.ZERO;
|
|
3809
|
-
let O = 1,
|
|
3810
|
-
for (; !m.eql(
|
|
3811
|
-
if (O++,
|
|
3809
|
+
let O = 1, q = m.sqr(T);
|
|
3810
|
+
for (; !m.eql(q, m.ONE); )
|
|
3811
|
+
if (O++, q = m.sqr(q), O === g)
|
|
3812
3812
|
throw new Error("Cannot find square root");
|
|
3813
|
-
const
|
|
3814
|
-
g = O, x = m.sqr(
|
|
3813
|
+
const z = Ee << BigInt(g - O - 1), C = m.pow(x, z);
|
|
3814
|
+
g = O, x = m.sqr(C), T = m.mul(T, x), L = m.mul(L, C);
|
|
3815
3815
|
}
|
|
3816
3816
|
return L;
|
|
3817
3817
|
};
|
|
@@ -4398,7 +4398,7 @@ function w1(t, e = {}) {
|
|
|
4398
4398
|
const N = s.fromBytes(R);
|
|
4399
4399
|
if (!s.isValid(N))
|
|
4400
4400
|
throw new Error("bad point: is not on curve, wrong x");
|
|
4401
|
-
const F =
|
|
4401
|
+
const F = q(N);
|
|
4402
4402
|
let B;
|
|
4403
4403
|
try {
|
|
4404
4404
|
B = s.sqrt(F);
|
|
@@ -4407,37 +4407,37 @@ function w1(t, e = {}) {
|
|
|
4407
4407
|
throw new Error("bad point: is not on curve, sqrt error" + ae);
|
|
4408
4408
|
}
|
|
4409
4409
|
g();
|
|
4410
|
-
const
|
|
4411
|
-
return (U & 1) === 1 !==
|
|
4410
|
+
const j = s.isOdd(B);
|
|
4411
|
+
return (U & 1) === 1 !== j && (B = s.neg(B)), { x: N, y: B };
|
|
4412
4412
|
} else if (X === $ && U === 4) {
|
|
4413
4413
|
const N = s.BYTES, F = s.fromBytes(R.subarray(0, N)), B = s.fromBytes(R.subarray(N, N * 2));
|
|
4414
|
-
if (!
|
|
4414
|
+
if (!z(F, B))
|
|
4415
4415
|
throw new Error("bad point: is not on curve");
|
|
4416
4416
|
return { x: F, y: B };
|
|
4417
4417
|
} else
|
|
4418
4418
|
throw new Error(`bad point: got length ${X}, expected compressed=${v} or uncompressed=${$}`);
|
|
4419
4419
|
}
|
|
4420
4420
|
const L = e.toBytes === void 0 ? x : e.toBytes, O = e.fromBytes === void 0 ? T : e.fromBytes;
|
|
4421
|
-
function
|
|
4421
|
+
function q(b) {
|
|
4422
4422
|
const v = s.sqr(b), $ = s.mul(v, b);
|
|
4423
4423
|
return s.add(s.add($, s.mul(b, o.a)), o.b);
|
|
4424
4424
|
}
|
|
4425
|
-
function
|
|
4426
|
-
const $ = s.sqr(v), X =
|
|
4425
|
+
function z(b, v) {
|
|
4426
|
+
const $ = s.sqr(v), X = q(b);
|
|
4427
4427
|
return s.eql($, X);
|
|
4428
4428
|
}
|
|
4429
|
-
if (!
|
|
4429
|
+
if (!z(o.Gx, o.Gy))
|
|
4430
4430
|
throw new Error("bad curve params: generator point");
|
|
4431
|
-
const
|
|
4432
|
-
if (s.is0(s.add(
|
|
4431
|
+
const C = s.mul(s.pow(o.a, bn), v1), H = s.mul(s.sqr(o.b), BigInt(27));
|
|
4432
|
+
if (s.is0(s.add(C, H)))
|
|
4433
4433
|
throw new Error("bad curve params: a or b");
|
|
4434
4434
|
function M(b, v, $ = !1) {
|
|
4435
4435
|
if (!s.isValid(v) || $ && s.is0(v))
|
|
4436
4436
|
throw new Error(`bad point coordinate ${b}`);
|
|
4437
4437
|
return v;
|
|
4438
4438
|
}
|
|
4439
|
-
function
|
|
4440
|
-
if (!(b instanceof
|
|
4439
|
+
function J(b) {
|
|
4440
|
+
if (!(b instanceof K))
|
|
4441
4441
|
throw new Error("Weierstrass Point expected");
|
|
4442
4442
|
}
|
|
4443
4443
|
function oe(b) {
|
|
@@ -4445,14 +4445,14 @@ function w1(t, e = {}) {
|
|
|
4445
4445
|
throw new Error("no endo");
|
|
4446
4446
|
return y1(b, h.basises, i.ORDER);
|
|
4447
4447
|
}
|
|
4448
|
-
function
|
|
4449
|
-
return $ = new
|
|
4448
|
+
function se(b, v, $, X, U) {
|
|
4449
|
+
return $ = new K(s.mul($.X, b), $.Y, $.Z), v = Rn(X, v), $ = Rn(U, $), v.add($);
|
|
4450
4450
|
}
|
|
4451
|
-
class
|
|
4451
|
+
class K {
|
|
4452
4452
|
// base / generator point
|
|
4453
|
-
static BASE = new
|
|
4453
|
+
static BASE = new K(o.Gx, o.Gy, s.ONE);
|
|
4454
4454
|
// zero / infinity / identity point
|
|
4455
|
-
static ZERO = new
|
|
4455
|
+
static ZERO = new K(s.ZERO, s.ONE, s.ZERO);
|
|
4456
4456
|
// 0, 1, 0
|
|
4457
4457
|
// math field
|
|
4458
4458
|
static Fp = s;
|
|
@@ -4473,16 +4473,16 @@ function w1(t, e = {}) {
|
|
|
4473
4473
|
const { x: $, y: X } = v || {};
|
|
4474
4474
|
if (!v || !s.isValid($) || !s.isValid(X))
|
|
4475
4475
|
throw new Error("invalid affine point");
|
|
4476
|
-
if (v instanceof
|
|
4476
|
+
if (v instanceof K)
|
|
4477
4477
|
throw new Error("projective point not allowed");
|
|
4478
|
-
return s.is0($) && s.is0(X) ?
|
|
4478
|
+
return s.is0($) && s.is0(X) ? K.ZERO : new K($, X, s.ONE);
|
|
4479
4479
|
}
|
|
4480
4480
|
static fromBytes(v) {
|
|
4481
|
-
const $ =
|
|
4481
|
+
const $ = K.fromAffine(O(Ce(v, void 0, "point")));
|
|
4482
4482
|
return $.assertValidity(), $;
|
|
4483
4483
|
}
|
|
4484
4484
|
static fromHex(v) {
|
|
4485
|
-
return
|
|
4485
|
+
return K.fromBytes(ur(v));
|
|
4486
4486
|
}
|
|
4487
4487
|
get x() {
|
|
4488
4488
|
return this.toAffine().x;
|
|
@@ -4511,7 +4511,7 @@ function w1(t, e = {}) {
|
|
|
4511
4511
|
const { x: $, y: X } = v.toAffine();
|
|
4512
4512
|
if (!s.isValid($) || !s.isValid(X))
|
|
4513
4513
|
throw new Error("bad point: x or y not field elements");
|
|
4514
|
-
if (!
|
|
4514
|
+
if (!z($, X))
|
|
4515
4515
|
throw new Error("bad point: equation left != right");
|
|
4516
4516
|
if (!v.isTorsionFree())
|
|
4517
4517
|
throw new Error("bad point: not in prime-order subgroup");
|
|
@@ -4524,13 +4524,13 @@ function w1(t, e = {}) {
|
|
|
4524
4524
|
}
|
|
4525
4525
|
/** Compare one point to another. */
|
|
4526
4526
|
equals(v) {
|
|
4527
|
-
|
|
4528
|
-
const { X: $, Y: X, Z: U } = this, { X: R, Y: N, Z: F } = v, B = s.eql(s.mul($, F), s.mul(R, U)),
|
|
4529
|
-
return B &&
|
|
4527
|
+
J(v);
|
|
4528
|
+
const { X: $, Y: X, Z: U } = this, { X: R, Y: N, Z: F } = v, B = s.eql(s.mul($, F), s.mul(R, U)), j = s.eql(s.mul(X, F), s.mul(N, U));
|
|
4529
|
+
return B && j;
|
|
4530
4530
|
}
|
|
4531
4531
|
/** Flips point to one corresponding to (x, -y) in Affine coordinates. */
|
|
4532
4532
|
negate() {
|
|
4533
|
-
return new
|
|
4533
|
+
return new K(this.X, s.neg(this.Y), this.Z);
|
|
4534
4534
|
}
|
|
4535
4535
|
// Renes-Costello-Batina exception-free doubling formula.
|
|
4536
4536
|
// There is 30% faster Jacobian formula, but it is not complete.
|
|
@@ -4538,28 +4538,28 @@ function w1(t, e = {}) {
|
|
|
4538
4538
|
// Cost: 8M + 3S + 3*a + 2*b3 + 15add.
|
|
4539
4539
|
double() {
|
|
4540
4540
|
const { a: v, b: $ } = o, X = s.mul($, bn), { X: U, Y: R, Z: N } = this;
|
|
4541
|
-
let F = s.ZERO, B = s.ZERO,
|
|
4542
|
-
return ie = s.add(ie, ie),
|
|
4541
|
+
let F = s.ZERO, B = s.ZERO, j = s.ZERO, Y = s.mul(U, U), ue = s.mul(R, R), ae = s.mul(N, N), ie = s.mul(U, R);
|
|
4542
|
+
return ie = s.add(ie, ie), j = s.mul(U, N), j = s.add(j, j), F = s.mul(v, j), B = s.mul(X, ae), B = s.add(F, B), F = s.sub(ue, B), B = s.add(ue, B), B = s.mul(F, B), F = s.mul(ie, F), j = s.mul(X, j), ae = s.mul(v, ae), ie = s.sub(Y, ae), ie = s.mul(v, ie), ie = s.add(ie, j), j = s.add(Y, Y), Y = s.add(j, Y), Y = s.add(Y, ae), Y = s.mul(Y, ie), B = s.add(B, Y), ae = s.mul(R, N), ae = s.add(ae, ae), Y = s.mul(ae, ie), F = s.sub(F, Y), j = s.mul(ae, ue), j = s.add(j, j), j = s.add(j, j), new K(F, B, j);
|
|
4543
4543
|
}
|
|
4544
4544
|
// Renes-Costello-Batina exception-free addition formula.
|
|
4545
4545
|
// There is 30% faster Jacobian formula, but it is not complete.
|
|
4546
4546
|
// https://eprint.iacr.org/2015/1060, algorithm 1
|
|
4547
4547
|
// Cost: 12M + 0S + 3*a + 3*b3 + 23add.
|
|
4548
4548
|
add(v) {
|
|
4549
|
-
|
|
4549
|
+
J(v);
|
|
4550
4550
|
const { X: $, Y: X, Z: U } = this, { X: R, Y: N, Z: F } = v;
|
|
4551
|
-
let B = s.ZERO,
|
|
4551
|
+
let B = s.ZERO, j = s.ZERO, Y = s.ZERO;
|
|
4552
4552
|
const ue = o.a, ae = s.mul(o.b, bn);
|
|
4553
4553
|
let ie = s.mul($, R), k = s.mul(X, N), S = s.mul(U, F), A = s.add($, X), I = s.add(R, N);
|
|
4554
4554
|
A = s.mul(A, I), I = s.add(ie, k), A = s.sub(A, I), I = s.add($, U);
|
|
4555
4555
|
let D = s.add(R, F);
|
|
4556
|
-
return I = s.mul(I, D), D = s.add(ie, S), I = s.sub(I, D), D = s.add(X, U), B = s.add(N, F), D = s.mul(D, B), B = s.add(k, S), D = s.sub(D, B),
|
|
4556
|
+
return I = s.mul(I, D), D = s.add(ie, S), I = s.sub(I, D), D = s.add(X, U), B = s.add(N, F), D = s.mul(D, B), B = s.add(k, S), D = s.sub(D, B), Y = s.mul(ue, I), B = s.mul(ae, S), Y = s.add(B, Y), B = s.sub(k, Y), Y = s.add(k, Y), j = s.mul(B, Y), k = s.add(ie, ie), k = s.add(k, ie), S = s.mul(ue, S), I = s.mul(ae, I), k = s.add(k, S), S = s.sub(ie, S), S = s.mul(ue, S), I = s.add(I, S), ie = s.mul(k, I), j = s.add(j, ie), ie = s.mul(D, I), B = s.mul(A, B), B = s.sub(B, ie), ie = s.mul(A, k), Y = s.mul(D, Y), Y = s.add(Y, ie), new K(B, j, Y);
|
|
4557
4557
|
}
|
|
4558
4558
|
subtract(v) {
|
|
4559
|
-
return
|
|
4559
|
+
return J(v), this.add(v.negate());
|
|
4560
4560
|
}
|
|
4561
4561
|
is0() {
|
|
4562
|
-
return this.equals(
|
|
4562
|
+
return this.equals(K.ZERO);
|
|
4563
4563
|
}
|
|
4564
4564
|
/**
|
|
4565
4565
|
* Constant time multiplication.
|
|
@@ -4575,15 +4575,15 @@ function w1(t, e = {}) {
|
|
|
4575
4575
|
if (!i.isValidNot0(v))
|
|
4576
4576
|
throw new RangeError("invalid scalar: out of range");
|
|
4577
4577
|
let X, U;
|
|
4578
|
-
const R = (N) => _.cached(this, N, (F) => xi(
|
|
4578
|
+
const R = (N) => _.cached(this, N, (F) => xi(K, F));
|
|
4579
4579
|
if ($) {
|
|
4580
|
-
const { k1neg: N, k1: F, k2neg: B, k2:
|
|
4581
|
-
U = ue.add(ie), X =
|
|
4580
|
+
const { k1neg: N, k1: F, k2neg: B, k2: j } = oe(v), { p: Y, f: ue } = R(F), { p: ae, f: ie } = R(j);
|
|
4581
|
+
U = ue.add(ie), X = se($.beta, Y, ae, N, B);
|
|
4582
4582
|
} else {
|
|
4583
4583
|
const { p: N, f: F } = R(v);
|
|
4584
4584
|
X = N, U = F;
|
|
4585
4585
|
}
|
|
4586
|
-
return xi(
|
|
4586
|
+
return xi(K, [X, U])[0];
|
|
4587
4587
|
}
|
|
4588
4588
|
/**
|
|
4589
4589
|
* Non-constant-time multiplication. Uses double-and-add algorithm.
|
|
@@ -4595,14 +4595,14 @@ function w1(t, e = {}) {
|
|
|
4595
4595
|
if (!i.isValid(U))
|
|
4596
4596
|
throw new RangeError("invalid scalar: out of range");
|
|
4597
4597
|
if (U === Je || X.is0())
|
|
4598
|
-
return
|
|
4598
|
+
return K.ZERO;
|
|
4599
4599
|
if (U === ht)
|
|
4600
4600
|
return X;
|
|
4601
4601
|
if (_.hasCache(this))
|
|
4602
4602
|
return this.multiply(U);
|
|
4603
4603
|
if ($) {
|
|
4604
|
-
const { k1neg: R, k1: N, k2neg: F, k2: B } = oe(U), { p1:
|
|
4605
|
-
return
|
|
4604
|
+
const { k1neg: R, k1: N, k2neg: F, k2: B } = oe(U), { p1: j, p2: Y } = p1(K, X, N, B);
|
|
4605
|
+
return se($.beta, j, Y, R, F);
|
|
4606
4606
|
} else
|
|
4607
4607
|
return _.unsafe(X, U);
|
|
4608
4608
|
}
|
|
@@ -4619,12 +4619,12 @@ function w1(t, e = {}) {
|
|
|
4619
4619
|
return { x: U, y: R };
|
|
4620
4620
|
const F = $.is0();
|
|
4621
4621
|
X == null && (X = F ? s.ONE : s.inv(N));
|
|
4622
|
-
const B = s.mul(U, X),
|
|
4622
|
+
const B = s.mul(U, X), j = s.mul(R, X), Y = s.mul(N, X);
|
|
4623
4623
|
if (F)
|
|
4624
4624
|
return { x: s.ZERO, y: s.ZERO };
|
|
4625
|
-
if (!s.eql(
|
|
4625
|
+
if (!s.eql(Y, s.ONE))
|
|
4626
4626
|
throw new Error("invZ was invalid");
|
|
4627
|
-
return { x: B, y:
|
|
4627
|
+
return { x: B, y: j };
|
|
4628
4628
|
}
|
|
4629
4629
|
/**
|
|
4630
4630
|
* Checks whether Point is free of torsion elements (is in prime subgroup).
|
|
@@ -4632,17 +4632,17 @@ function w1(t, e = {}) {
|
|
|
4632
4632
|
*/
|
|
4633
4633
|
isTorsionFree() {
|
|
4634
4634
|
const { isTorsionFree: v } = e;
|
|
4635
|
-
return c === ht ? !0 : v ? v(
|
|
4635
|
+
return c === ht ? !0 : v ? v(K, this) : _.unsafe(this, u).is0();
|
|
4636
4636
|
}
|
|
4637
4637
|
clearCofactor() {
|
|
4638
4638
|
const { clearCofactor: v } = e;
|
|
4639
|
-
return c === ht ? this : v ? v(
|
|
4639
|
+
return c === ht ? this : v ? v(K, this) : this.multiplyUnsafe(c);
|
|
4640
4640
|
}
|
|
4641
4641
|
isSmallOrder() {
|
|
4642
4642
|
return c === ht ? this.is0() : this.clearCofactor().is0();
|
|
4643
4643
|
}
|
|
4644
4644
|
toBytes(v = !0) {
|
|
4645
|
-
return Qt(v, "isCompressed"), this.assertValidity(), L(
|
|
4645
|
+
return Qt(v, "isCompressed"), this.assertValidity(), L(K, this, v);
|
|
4646
4646
|
}
|
|
4647
4647
|
toHex(v = !0) {
|
|
4648
4648
|
return yo(this.toBytes(v));
|
|
@@ -4651,8 +4651,8 @@ function w1(t, e = {}) {
|
|
|
4651
4651
|
return `<Point ${this.is0() ? "ZERO" : this.toHex()}>`;
|
|
4652
4652
|
}
|
|
4653
4653
|
}
|
|
4654
|
-
const
|
|
4655
|
-
return
|
|
4654
|
+
const he = i.BITS, _ = new m1(K, e.endo ? Math.ceil(he / 2) : he);
|
|
4655
|
+
return he >= 8 && K.BASE.precompute(8), Object.freeze(K.prototype), Object.freeze(K), K;
|
|
4656
4656
|
}
|
|
4657
4657
|
function $o(t) {
|
|
4658
4658
|
return Uint8Array.of(t ? 2 : 3);
|
|
@@ -4681,10 +4681,10 @@ function x1(t, e = {}) {
|
|
|
4681
4681
|
}
|
|
4682
4682
|
}
|
|
4683
4683
|
function c(T, L) {
|
|
4684
|
-
const { publicKey: O, publicKeyUncompressed:
|
|
4684
|
+
const { publicKey: O, publicKeyUncompressed: q } = i;
|
|
4685
4685
|
try {
|
|
4686
|
-
const
|
|
4687
|
-
return L === !0 &&
|
|
4686
|
+
const z = T.length;
|
|
4687
|
+
return L === !0 && z !== O || L === !1 && z !== q ? !1 : !!t.fromBytes(T);
|
|
4688
4688
|
} catch {
|
|
4689
4689
|
return !1;
|
|
4690
4690
|
}
|
|
@@ -4696,20 +4696,20 @@ function x1(t, e = {}) {
|
|
|
4696
4696
|
return t.BASE.multiply(n.fromBytes(T)).toBytes(L);
|
|
4697
4697
|
}
|
|
4698
4698
|
function f(T) {
|
|
4699
|
-
const { secretKey: L, publicKey: O, publicKeyUncompressed:
|
|
4699
|
+
const { secretKey: L, publicKey: O, publicKeyUncompressed: q } = i, z = n._lengths;
|
|
4700
4700
|
if (!ko(T))
|
|
4701
4701
|
return;
|
|
4702
|
-
const
|
|
4703
|
-
if (!(
|
|
4704
|
-
return
|
|
4702
|
+
const C = Ce(T, void 0, "key").length, H = C === O || C === q, M = C === L || !!z?.includes(C);
|
|
4703
|
+
if (!(H && M))
|
|
4704
|
+
return H;
|
|
4705
4705
|
}
|
|
4706
4706
|
function m(T, L, O = !0) {
|
|
4707
4707
|
if (f(T) === !0)
|
|
4708
4708
|
throw new Error("first arg must be private key");
|
|
4709
4709
|
if (f(L) === !1)
|
|
4710
4710
|
throw new Error("second arg must be public key");
|
|
4711
|
-
const
|
|
4712
|
-
return t.fromBytes(L).multiply(
|
|
4711
|
+
const q = n.fromBytes(T);
|
|
4712
|
+
return t.fromBytes(L).multiply(q).toBytes(O);
|
|
4713
4713
|
}
|
|
4714
4714
|
const g = {
|
|
4715
4715
|
isValidSecretKey: o,
|
|
@@ -4732,18 +4732,18 @@ function E1(t, e, n = {}) {
|
|
|
4732
4732
|
lowS: typeof n.lowS == "boolean" ? n.lowS : !0,
|
|
4733
4733
|
format: "compact",
|
|
4734
4734
|
extraEntropy: !1
|
|
4735
|
-
},
|
|
4736
|
-
function
|
|
4735
|
+
}, q = h * Oo + ht < c.ORDER;
|
|
4736
|
+
function z(U) {
|
|
4737
4737
|
const R = h >> ht;
|
|
4738
4738
|
return U > R;
|
|
4739
4739
|
}
|
|
4740
|
-
function
|
|
4740
|
+
function C(U, R) {
|
|
4741
4741
|
if (!u.isValidNot0(R))
|
|
4742
4742
|
throw new Error(`invalid signature ${U}: out of range 1..Point.Fn.ORDER`);
|
|
4743
4743
|
return R;
|
|
4744
4744
|
}
|
|
4745
|
-
function
|
|
4746
|
-
if (
|
|
4745
|
+
function H() {
|
|
4746
|
+
if (q)
|
|
4747
4747
|
throw new Error('"recovered" sig type is not supported for cofactor >2 curves');
|
|
4748
4748
|
}
|
|
4749
4749
|
function M(U, R) {
|
|
@@ -4751,13 +4751,13 @@ function E1(t, e, n = {}) {
|
|
|
4751
4751
|
const N = L.signature, F = R === "compact" ? N : R === "recovered" ? N + 1 : void 0;
|
|
4752
4752
|
return Ce(U, F);
|
|
4753
4753
|
}
|
|
4754
|
-
class
|
|
4754
|
+
class J {
|
|
4755
4755
|
r;
|
|
4756
4756
|
s;
|
|
4757
4757
|
recovery;
|
|
4758
4758
|
constructor(R, N, F) {
|
|
4759
|
-
if (this.r =
|
|
4760
|
-
if (
|
|
4759
|
+
if (this.r = C("r", R), this.s = C("s", N), F != null) {
|
|
4760
|
+
if (H(), ![0, 1, 2, 3].includes(F))
|
|
4761
4761
|
throw new Error("invalid recovery id");
|
|
4762
4762
|
this.recovery = F;
|
|
4763
4763
|
}
|
|
@@ -4768,11 +4768,11 @@ function E1(t, e, n = {}) {
|
|
|
4768
4768
|
let F;
|
|
4769
4769
|
if (N === "der") {
|
|
4770
4770
|
const { r: ue, s: ae } = He.toSig(Ce(R));
|
|
4771
|
-
return new
|
|
4771
|
+
return new J(ue, ae);
|
|
4772
4772
|
}
|
|
4773
4773
|
N === "recovered" && (F = R[0], N = "compact", R = R.subarray(1));
|
|
4774
|
-
const B = L.signature / 2,
|
|
4775
|
-
return new
|
|
4774
|
+
const B = L.signature / 2, j = R.subarray(0, B), Y = R.subarray(B, B * 2);
|
|
4775
|
+
return new J(u.fromBytes(j), u.fromBytes(Y), F);
|
|
4776
4776
|
}
|
|
4777
4777
|
static fromHex(R, N) {
|
|
4778
4778
|
return this.fromBytes(ur(R), N);
|
|
@@ -4784,60 +4784,60 @@ function E1(t, e, n = {}) {
|
|
|
4784
4784
|
return R;
|
|
4785
4785
|
}
|
|
4786
4786
|
addRecoveryBit(R) {
|
|
4787
|
-
return new
|
|
4787
|
+
return new J(this.r, this.s, R);
|
|
4788
4788
|
}
|
|
4789
4789
|
// Unlike the top-level helper below, this method expects a digest that has
|
|
4790
4790
|
// already been hashed to the curve's message representative.
|
|
4791
4791
|
recoverPublicKey(R) {
|
|
4792
|
-
const { r: N, s: F } = this, B = this.assertRecovery(),
|
|
4793
|
-
if (!c.isValid(
|
|
4792
|
+
const { r: N, s: F } = this, B = this.assertRecovery(), j = B === 2 || B === 3 ? N + h : N;
|
|
4793
|
+
if (!c.isValid(j))
|
|
4794
4794
|
throw new Error("invalid recovery id: sig.r+curve.n != R.x");
|
|
4795
|
-
const
|
|
4795
|
+
const Y = c.toBytes(j), ue = t.fromBytes(ft($o((B & 1) === 0), Y)), ae = u.inv(j), ie = se(Ce(R, void 0, "msgHash")), k = u.create(-ie * ae), S = u.create(F * ae), A = t.BASE.multiplyUnsafe(k).add(ue.multiplyUnsafe(S));
|
|
4796
4796
|
if (A.is0())
|
|
4797
4797
|
throw new Error("invalid recovery: point at infinify");
|
|
4798
4798
|
return A.assertValidity(), A;
|
|
4799
4799
|
}
|
|
4800
4800
|
// Signatures should be low-s, to prevent malleability.
|
|
4801
4801
|
hasHighS() {
|
|
4802
|
-
return
|
|
4802
|
+
return z(this.s);
|
|
4803
4803
|
}
|
|
4804
4804
|
toBytes(R = O.format) {
|
|
4805
4805
|
if (hr(R), R === "der")
|
|
4806
4806
|
return ur(He.hexFromSig(this));
|
|
4807
|
-
const { r: N, s: F } = this, B = u.toBytes(N),
|
|
4808
|
-
return R === "recovered" ? (
|
|
4807
|
+
const { r: N, s: F } = this, B = u.toBytes(N), j = u.toBytes(F);
|
|
4808
|
+
return R === "recovered" ? (H(), ft(Uint8Array.of(this.assertRecovery()), B, j)) : ft(B, j);
|
|
4809
4809
|
}
|
|
4810
4810
|
toHex(R) {
|
|
4811
4811
|
return yo(this.toBytes(R));
|
|
4812
4812
|
}
|
|
4813
4813
|
}
|
|
4814
|
-
Object.freeze(
|
|
4814
|
+
Object.freeze(J.prototype), Object.freeze(J);
|
|
4815
4815
|
const oe = n.bits2int === void 0 ? function(R) {
|
|
4816
4816
|
if (R.length > 8192)
|
|
4817
4817
|
throw new Error("input is too large");
|
|
4818
4818
|
const N = Vn(R), F = R.length * 8 - f;
|
|
4819
4819
|
return F > 0 ? N >> BigInt(F) : N;
|
|
4820
|
-
} : n.bits2int,
|
|
4820
|
+
} : n.bits2int, se = n.bits2int_modN === void 0 ? function(R) {
|
|
4821
4821
|
return u.create(oe(R));
|
|
4822
|
-
} : n.bits2int_modN,
|
|
4823
|
-
function
|
|
4824
|
-
return So("num < 2^" + f, U, Je,
|
|
4822
|
+
} : n.bits2int_modN, K = Rr(f);
|
|
4823
|
+
function he(U) {
|
|
4824
|
+
return So("num < 2^" + f, U, Je, K), u.toBytes(U);
|
|
4825
4825
|
}
|
|
4826
4826
|
function _(U, R) {
|
|
4827
4827
|
return Ce(U, void 0, "message"), R ? Ce(s(U), void 0, "prehashed message") : U;
|
|
4828
4828
|
}
|
|
4829
4829
|
function b(U, R, N) {
|
|
4830
|
-
const { lowS: F, prehash: B, extraEntropy:
|
|
4830
|
+
const { lowS: F, prehash: B, extraEntropy: j } = Js(N, O);
|
|
4831
4831
|
U = _(U, B);
|
|
4832
|
-
const
|
|
4832
|
+
const Y = se(U), ue = u.fromBytes(R);
|
|
4833
4833
|
if (!u.isValidNot0(ue))
|
|
4834
4834
|
throw new Error("invalid private key");
|
|
4835
|
-
const ae = [
|
|
4836
|
-
if (
|
|
4837
|
-
const A =
|
|
4835
|
+
const ae = [he(ue), he(Y)];
|
|
4836
|
+
if (j != null && j !== !1) {
|
|
4837
|
+
const A = j === !0 ? i(L.secretKey) : j;
|
|
4838
4838
|
ae.push(Ce(A, void 0, "extraEntropy"));
|
|
4839
4839
|
}
|
|
4840
|
-
const ie = ft(...ae), k =
|
|
4840
|
+
const ie = ft(...ae), k = Y;
|
|
4841
4841
|
function S(A) {
|
|
4842
4842
|
const I = oe(A);
|
|
4843
4843
|
if (!u.isValidNot0(I))
|
|
@@ -4848,8 +4848,8 @@ function E1(t, e, n = {}) {
|
|
|
4848
4848
|
const ce = u.create(D * u.create(k + Z * ue));
|
|
4849
4849
|
if (ce === Je)
|
|
4850
4850
|
return;
|
|
4851
|
-
let ge = (W.x === Z ? 0 : 2) | Number(W.y & ht),
|
|
4852
|
-
return F &&
|
|
4851
|
+
let ge = (W.x === Z ? 0 : 2) | Number(W.y & ht), me = ce;
|
|
4852
|
+
return F && z(ce) && (me = u.neg(ce), ge ^= 1), new J(Z, me, q ? void 0 : ge);
|
|
4853
4853
|
}
|
|
4854
4854
|
return { seed: ie, k2sig: S };
|
|
4855
4855
|
}
|
|
@@ -4858,17 +4858,17 @@ function E1(t, e, n = {}) {
|
|
|
4858
4858
|
return s1(s.outputLen, u.BYTES, o)(F, B).toBytes(N.format);
|
|
4859
4859
|
}
|
|
4860
4860
|
function $(U, R, N, F = {}) {
|
|
4861
|
-
const { lowS: B, prehash:
|
|
4862
|
-
if (N = Ce(N, void 0, "publicKey"), R = _(R,
|
|
4863
|
-
const ue = U instanceof
|
|
4861
|
+
const { lowS: B, prehash: j, format: Y } = Js(F, O);
|
|
4862
|
+
if (N = Ce(N, void 0, "publicKey"), R = _(R, j), !ko(U)) {
|
|
4863
|
+
const ue = U instanceof J ? ", use sig.toBytes()" : "";
|
|
4864
4864
|
throw new Error("verify expects Uint8Array signature" + ue);
|
|
4865
4865
|
}
|
|
4866
|
-
M(U,
|
|
4866
|
+
M(U, Y);
|
|
4867
4867
|
try {
|
|
4868
|
-
const ue =
|
|
4868
|
+
const ue = J.fromBytes(U, Y), ae = t.fromBytes(N);
|
|
4869
4869
|
if (B && ue.hasHighS())
|
|
4870
4870
|
return !1;
|
|
4871
|
-
const { r: ie, s: k } = ue, S =
|
|
4871
|
+
const { r: ie, s: k } = ue, S = se(R), A = u.inv(k), I = u.create(S * A), D = u.create(ie * A), W = t.BASE.multiplyUnsafe(I).add(ae.multiplyUnsafe(D));
|
|
4872
4872
|
return W.is0() ? !1 : u.create(W.x) === ie;
|
|
4873
4873
|
} catch {
|
|
4874
4874
|
return !1;
|
|
@@ -4876,7 +4876,7 @@ function E1(t, e, n = {}) {
|
|
|
4876
4876
|
}
|
|
4877
4877
|
function X(U, R, N = {}) {
|
|
4878
4878
|
const { prehash: F } = Js(N, O);
|
|
4879
|
-
return R = _(R, F),
|
|
4879
|
+
return R = _(R, F), J.fromBytes(U, "recovered").recoverPublicKey(R).toBytes();
|
|
4880
4880
|
}
|
|
4881
4881
|
return Object.freeze({
|
|
4882
4882
|
keygen: m,
|
|
@@ -4888,7 +4888,7 @@ function E1(t, e, n = {}) {
|
|
|
4888
4888
|
sign: v,
|
|
4889
4889
|
verify: $,
|
|
4890
4890
|
recoverPublicKey: X,
|
|
4891
|
-
Signature:
|
|
4891
|
+
Signature: J,
|
|
4892
4892
|
hash: s
|
|
4893
4893
|
});
|
|
4894
4894
|
}
|
|
@@ -5109,11 +5109,11 @@ function q1(t, e, n) {
|
|
|
5109
5109
|
if (j1(t), !Ue || !Kt) return;
|
|
5110
5110
|
const s = n.vertical ? qo : Vo;
|
|
5111
5111
|
if (!s) return;
|
|
5112
|
-
const i = e.width, o = e.height, c = n.px, u = n.py, h = n.w, f = n.h, m = c / i * 2 - 1, g = 1 - (u + f) / o * 2, x = (c + h) / i * 2 - 1, T = 1 - u / o * 2, L = !!(lt && Pn), O = t.getParameter(t.CURRENT_PROGRAM),
|
|
5112
|
+
const i = e.width, o = e.height, c = n.px, u = n.py, h = n.w, f = n.h, m = c / i * 2 - 1, g = 1 - (u + f) / o * 2, x = (c + h) / i * 2 - 1, T = 1 - u / o * 2, L = !!(lt && Pn), O = t.getParameter(t.CURRENT_PROGRAM), q = t.getParameter(t.ACTIVE_TEXTURE);
|
|
5113
5113
|
t.activeTexture(t.TEXTURE0);
|
|
5114
|
-
const
|
|
5114
|
+
const z = t.getParameter(t.TEXTURE_BINDING_2D), C = t.getParameter(t.ARRAY_BUFFER_BINDING), H = t.getParameter(t.FRAMEBUFFER_BINDING), M = t.getParameter(t.VIEWPORT), J = t.isEnabled(t.BLEND), oe = t.getParameter(t.BLEND_SRC_RGB), se = t.getParameter(t.BLEND_DST_RGB), K = t.getParameter(t.BLEND_SRC_ALPHA), he = t.getParameter(t.BLEND_DST_ALPHA), _ = t.getParameter(t.BLEND_EQUATION_RGB), b = t.getParameter(t.BLEND_EQUATION_ALPHA), v = t.isEnabled(t.DEPTH_TEST), $ = t.isEnabled(t.SCISSOR_TEST), X = t.isEnabled(t.STENCIL_TEST), U = t.isEnabled(t.CULL_FACE), R = t.getParameter(t.COLOR_WRITEMASK), N = t.getParameter(t.UNPACK_FLIP_Y_WEBGL), F = L ? t.getParameter(Xo) : null, B = !L && it >= 0 ? Ni(t, it) : null, j = !L && ot >= 0 ? Ni(t, ot) : null;
|
|
5115
5115
|
t.bindFramebuffer(t.FRAMEBUFFER, null), t.viewport(0, 0, i, o), 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, s), t.uniform1i(t.getUniformLocation(Ue, "u_tex"), 0), t.uniform1f(t.getUniformLocation(Ue, "u_alpha"), 1);
|
|
5116
|
-
const
|
|
5116
|
+
const Y = new Float32Array([
|
|
5117
5117
|
m,
|
|
5118
5118
|
g,
|
|
5119
5119
|
0,
|
|
@@ -5139,7 +5139,7 @@ function q1(t, e, n) {
|
|
|
5139
5139
|
1,
|
|
5140
5140
|
1
|
|
5141
5141
|
]);
|
|
5142
|
-
L ? (lt.bind(Pn), t.bindBuffer(t.ARRAY_BUFFER, Kt), t.bufferData(t.ARRAY_BUFFER,
|
|
5142
|
+
L ? (lt.bind(Pn), t.bindBuffer(t.ARRAY_BUFFER, Kt), t.bufferData(t.ARRAY_BUFFER, Y, t.DYNAMIC_DRAW)) : (t.bindBuffer(t.ARRAY_BUFFER, Kt), t.bufferData(t.ARRAY_BUFFER, Y, 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), L ? lt.bind(F) : (j && Mi(t, j), B && Mi(t, B)), t.bindFramebuffer(t.FRAMEBUFFER, H), t.viewport(M[0], M[1], M[2], M[3]), t.bindBuffer(t.ARRAY_BUFFER, C), t.colorMask(R[0], R[1], R[2], R[3]), t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL, N ? 1 : 0), $ ? t.enable(t.SCISSOR_TEST) : t.disable(t.SCISSOR_TEST), X ? t.enable(t.STENCIL_TEST) : t.disable(t.STENCIL_TEST), U ? t.enable(t.CULL_FACE) : t.disable(t.CULL_FACE), v ? t.enable(t.DEPTH_TEST) : t.disable(t.DEPTH_TEST), J ? t.enable(t.BLEND) : t.disable(t.BLEND), t.blendFuncSeparate(oe, se, K, he), t.blendEquationSeparate(_, b), t.activeTexture(t.TEXTURE0), t.bindTexture(t.TEXTURE_2D, z), t.activeTexture(q), t.useProgram(O);
|
|
5143
5143
|
}
|
|
5144
5144
|
class H1 {
|
|
5145
5145
|
canvas = null;
|
|
@@ -6072,15 +6072,15 @@ class H1 {
|
|
|
6072
6072
|
if (!this.canvas)
|
|
6073
6073
|
throw new Error("Canvas not initialized");
|
|
6074
6074
|
if ((e.data.format || "blob") === "bitmap") {
|
|
6075
|
-
const
|
|
6076
|
-
this.postMessage("capture-frame-result", { id: e.id, bitmap:
|
|
6075
|
+
const J = this.canvas.transferToImageBitmap();
|
|
6076
|
+
this.postMessage("capture-frame-result", { id: e.id, bitmap: J }, [J]);
|
|
6077
6077
|
return;
|
|
6078
6078
|
}
|
|
6079
6079
|
const s = e.data.type || "image/jpeg", i = this.canvas.width, o = this.canvas.height;
|
|
6080
6080
|
let c = i, u = o;
|
|
6081
6081
|
if (typeof e.data.resolution == "number") {
|
|
6082
|
-
const
|
|
6083
|
-
c = Math.max(1, Math.floor(i *
|
|
6082
|
+
const J = e.data.resolution > 0 ? e.data.resolution : 1;
|
|
6083
|
+
c = Math.max(1, Math.floor(i * J)), u = Math.max(1, Math.floor(o * J));
|
|
6084
6084
|
} else e.data.resolution && typeof e.data.resolution == "object" && (c = Math.max(1, Math.floor(e.data.resolution.width)), u = Math.max(1, Math.floor(e.data.resolution.height)));
|
|
6085
6085
|
const h = i / o, f = c / u;
|
|
6086
6086
|
let m = 0, g = 0, x = i, T = o;
|
|
@@ -6088,25 +6088,27 @@ class H1 {
|
|
|
6088
6088
|
let L;
|
|
6089
6089
|
const O = this.getContextAndFinish();
|
|
6090
6090
|
if (O) {
|
|
6091
|
-
const
|
|
6092
|
-
O.readPixels(0, 0, i, o, O.RGBA, O.UNSIGNED_BYTE,
|
|
6093
|
-
const
|
|
6094
|
-
for (let
|
|
6095
|
-
const
|
|
6096
|
-
|
|
6091
|
+
const J = new Uint8Array(i * o * 4);
|
|
6092
|
+
O.readPixels(0, 0, i, o, O.RGBA, O.UNSIGNED_BYTE, J);
|
|
6093
|
+
const oe = new Uint8ClampedArray(i * o * 4);
|
|
6094
|
+
for (let he = 0; he < o; he++) {
|
|
6095
|
+
const _ = (o - 1 - he) * i * 4, b = he * i * 4;
|
|
6096
|
+
oe.set(J.subarray(_, _ + i * 4), b);
|
|
6097
6097
|
}
|
|
6098
6098
|
L = new OffscreenCanvas(i, o);
|
|
6099
|
-
const
|
|
6100
|
-
if (!
|
|
6101
|
-
const
|
|
6102
|
-
|
|
6099
|
+
const se = L.getContext("2d");
|
|
6100
|
+
if (!se) throw new Error("Failed to create source context");
|
|
6101
|
+
const K = new ImageData(oe, i, o);
|
|
6102
|
+
se.putImageData(K, 0, 0), this.debugLog("Captured frame from WebGL using readPixels (post-render)");
|
|
6103
6103
|
} else
|
|
6104
6104
|
L = this.canvas, this.debugLog("Captured frame from 2D canvas (post-render)");
|
|
6105
|
-
const
|
|
6106
|
-
if (!
|
|
6107
|
-
|
|
6108
|
-
const
|
|
6109
|
-
|
|
6105
|
+
const q = new OffscreenCanvas(c, u), z = q.getContext("2d");
|
|
6106
|
+
if (!z) throw new Error("Failed to get 2D context");
|
|
6107
|
+
z.drawImage(L, m, g, x, T, 0, 0, c, u);
|
|
6108
|
+
const C = e.data.quality, H = typeof C == "number" && Number.isFinite(C) ? Math.min(1, Math.max(0, C)) : void 0, M = await q.convertToBlob(
|
|
6109
|
+
H !== void 0 ? { type: s, quality: H } : { type: s }
|
|
6110
|
+
);
|
|
6111
|
+
this.postMessage("capture-frame-result", { id: e.id, blob: M });
|
|
6110
6112
|
} catch (n) {
|
|
6111
6113
|
this.postMessage("error", {
|
|
6112
6114
|
id: e.id,
|
|
@@ -6831,27 +6833,27 @@ var d;
|
|
|
6831
6833
|
t[t._from = L] = "_from";
|
|
6832
6834
|
const O = L + 1;
|
|
6833
6835
|
t[t._get = O] = "_get";
|
|
6834
|
-
const
|
|
6835
|
-
t[t._global =
|
|
6836
|
-
const
|
|
6837
|
-
t[t._implements =
|
|
6838
|
-
const
|
|
6839
|
-
t[t._infer =
|
|
6840
|
-
const
|
|
6841
|
-
t[t._interface =
|
|
6842
|
-
const M =
|
|
6836
|
+
const q = O + 1;
|
|
6837
|
+
t[t._global = q] = "_global";
|
|
6838
|
+
const z = q + 1;
|
|
6839
|
+
t[t._implements = z] = "_implements";
|
|
6840
|
+
const C = z + 1;
|
|
6841
|
+
t[t._infer = C] = "_infer";
|
|
6842
|
+
const H = C + 1;
|
|
6843
|
+
t[t._interface = H] = "_interface";
|
|
6844
|
+
const M = H + 1;
|
|
6843
6845
|
t[t._is = M] = "_is";
|
|
6844
|
-
const
|
|
6845
|
-
t[t._keyof =
|
|
6846
|
-
const oe =
|
|
6846
|
+
const J = M + 1;
|
|
6847
|
+
t[t._keyof = J] = "_keyof";
|
|
6848
|
+
const oe = J + 1;
|
|
6847
6849
|
t[t._mixins = oe] = "_mixins";
|
|
6848
|
-
const
|
|
6849
|
-
t[t._module =
|
|
6850
|
-
const
|
|
6851
|
-
t[t._namespace =
|
|
6852
|
-
const
|
|
6853
|
-
t[t._of =
|
|
6854
|
-
const _ =
|
|
6850
|
+
const se = oe + 1;
|
|
6851
|
+
t[t._module = se] = "_module";
|
|
6852
|
+
const K = se + 1;
|
|
6853
|
+
t[t._namespace = K] = "_namespace";
|
|
6854
|
+
const he = K + 1;
|
|
6855
|
+
t[t._of = he] = "_of";
|
|
6856
|
+
const _ = he + 1;
|
|
6855
6857
|
t[t._opaque = _] = "_opaque";
|
|
6856
6858
|
const b = _ + 1;
|
|
6857
6859
|
t[t._out = b] = "_out";
|
|
@@ -6871,11 +6873,11 @@ var d;
|
|
|
6871
6873
|
t[t._require = F] = "_require";
|
|
6872
6874
|
const B = F + 1;
|
|
6873
6875
|
t[t._satisfies = B] = "_satisfies";
|
|
6874
|
-
const
|
|
6875
|
-
t[t._set =
|
|
6876
|
-
const
|
|
6877
|
-
t[t._static =
|
|
6878
|
-
const ue =
|
|
6876
|
+
const j = B + 1;
|
|
6877
|
+
t[t._set = j] = "_set";
|
|
6878
|
+
const Y = j + 1;
|
|
6879
|
+
t[t._static = Y] = "_static";
|
|
6880
|
+
const ue = Y + 1;
|
|
6879
6881
|
t[t._symbol = ue] = "_symbol";
|
|
6880
6882
|
const ae = ue + 1;
|
|
6881
6883
|
t[t._type = ae] = "_type";
|
|
@@ -6915,26 +6917,26 @@ var r;
|
|
|
6915
6917
|
t[t.eof = L] = "eof";
|
|
6916
6918
|
const O = 7680;
|
|
6917
6919
|
t[t.bracketL = O] = "bracketL";
|
|
6918
|
-
const
|
|
6919
|
-
t[t.bracketR =
|
|
6920
|
-
const
|
|
6921
|
-
t[t.braceL =
|
|
6922
|
-
const
|
|
6923
|
-
t[t.braceBarL =
|
|
6924
|
-
const
|
|
6925
|
-
t[t.braceR =
|
|
6920
|
+
const q = 8192;
|
|
6921
|
+
t[t.bracketR = q] = "bracketR";
|
|
6922
|
+
const z = 9728;
|
|
6923
|
+
t[t.braceL = z] = "braceL";
|
|
6924
|
+
const C = 10752;
|
|
6925
|
+
t[t.braceBarL = C] = "braceBarL";
|
|
6926
|
+
const H = 11264;
|
|
6927
|
+
t[t.braceR = H] = "braceR";
|
|
6926
6928
|
const M = 12288;
|
|
6927
6929
|
t[t.braceBarR = M] = "braceBarR";
|
|
6928
|
-
const
|
|
6929
|
-
t[t.parenL =
|
|
6930
|
+
const J = 13824;
|
|
6931
|
+
t[t.parenL = J] = "parenL";
|
|
6930
6932
|
const oe = 14336;
|
|
6931
6933
|
t[t.parenR = oe] = "parenR";
|
|
6932
|
-
const
|
|
6933
|
-
t[t.comma =
|
|
6934
|
-
const
|
|
6935
|
-
t[t.semi =
|
|
6936
|
-
const
|
|
6937
|
-
t[t.colon =
|
|
6934
|
+
const se = 15360;
|
|
6935
|
+
t[t.comma = se] = "comma";
|
|
6936
|
+
const K = 16384;
|
|
6937
|
+
t[t.semi = K] = "semi";
|
|
6938
|
+
const he = 17408;
|
|
6939
|
+
t[t.colon = he] = "colon";
|
|
6938
6940
|
const _ = 18432;
|
|
6939
6941
|
t[t.doubleColon = _] = "doubleColon";
|
|
6940
6942
|
const b = 19456;
|
|
@@ -6955,10 +6957,10 @@ var r;
|
|
|
6955
6957
|
t[t.dollarBraceL = F] = "dollarBraceL";
|
|
6956
6958
|
const B = 27648;
|
|
6957
6959
|
t[t.at = B] = "at";
|
|
6958
|
-
const
|
|
6959
|
-
t[t.hash =
|
|
6960
|
-
const
|
|
6961
|
-
t[t.eq =
|
|
6960
|
+
const j = 29184;
|
|
6961
|
+
t[t.hash = j] = "hash";
|
|
6962
|
+
const Y = 29728;
|
|
6963
|
+
t[t.eq = Y] = "eq";
|
|
6962
6964
|
const ue = 30752;
|
|
6963
6965
|
t[t.assign = ue] = "assign";
|
|
6964
6966
|
const ae = 32640;
|
|
@@ -6983,8 +6985,8 @@ var r;
|
|
|
6983
6985
|
t[t.bitwiseXOR = ce] = "bitwiseXOR";
|
|
6984
6986
|
const ge = 41990;
|
|
6985
6987
|
t[t.bitwiseAND = ge] = "bitwiseAND";
|
|
6986
|
-
const
|
|
6987
|
-
t[t.equality =
|
|
6988
|
+
const me = 43015;
|
|
6989
|
+
t[t.equality = me] = "equality";
|
|
6988
6990
|
const Se = 44040;
|
|
6989
6991
|
t[t.lessThan = Se] = "lessThan";
|
|
6990
6992
|
const Le = 45064;
|
|
@@ -7478,26 +7480,26 @@ var p;
|
|
|
7478
7480
|
t[t.leftParenthesis = L] = "leftParenthesis";
|
|
7479
7481
|
const O = 41;
|
|
7480
7482
|
t[t.rightParenthesis = O] = "rightParenthesis";
|
|
7481
|
-
const
|
|
7482
|
-
t[t.asterisk =
|
|
7483
|
-
const
|
|
7484
|
-
t[t.plusSign =
|
|
7485
|
-
const
|
|
7486
|
-
t[t.comma =
|
|
7487
|
-
const
|
|
7488
|
-
t[t.dash =
|
|
7483
|
+
const q = 42;
|
|
7484
|
+
t[t.asterisk = q] = "asterisk";
|
|
7485
|
+
const z = 43;
|
|
7486
|
+
t[t.plusSign = z] = "plusSign";
|
|
7487
|
+
const C = 44;
|
|
7488
|
+
t[t.comma = C] = "comma";
|
|
7489
|
+
const H = 45;
|
|
7490
|
+
t[t.dash = H] = "dash";
|
|
7489
7491
|
const M = 46;
|
|
7490
7492
|
t[t.dot = M] = "dot";
|
|
7491
|
-
const
|
|
7492
|
-
t[t.slash =
|
|
7493
|
+
const J = 47;
|
|
7494
|
+
t[t.slash = J] = "slash";
|
|
7493
7495
|
const oe = 48;
|
|
7494
7496
|
t[t.digit0 = oe] = "digit0";
|
|
7495
|
-
const
|
|
7496
|
-
t[t.digit1 =
|
|
7497
|
-
const
|
|
7498
|
-
t[t.digit2 =
|
|
7499
|
-
const
|
|
7500
|
-
t[t.digit3 =
|
|
7497
|
+
const se = 49;
|
|
7498
|
+
t[t.digit1 = se] = "digit1";
|
|
7499
|
+
const K = 50;
|
|
7500
|
+
t[t.digit2 = K] = "digit2";
|
|
7501
|
+
const he = 51;
|
|
7502
|
+
t[t.digit3 = he] = "digit3";
|
|
7501
7503
|
const _ = 52;
|
|
7502
7504
|
t[t.digit4 = _] = "digit4";
|
|
7503
7505
|
const b = 53;
|
|
@@ -7518,10 +7520,10 @@ var p;
|
|
|
7518
7520
|
t[t.lessThan = F] = "lessThan";
|
|
7519
7521
|
const B = 61;
|
|
7520
7522
|
t[t.equalsTo = B] = "equalsTo";
|
|
7521
|
-
const
|
|
7522
|
-
t[t.greaterThan =
|
|
7523
|
-
const
|
|
7524
|
-
t[t.questionMark =
|
|
7523
|
+
const j = 62;
|
|
7524
|
+
t[t.greaterThan = j] = "greaterThan";
|
|
7525
|
+
const Y = 63;
|
|
7526
|
+
t[t.questionMark = Y] = "questionMark";
|
|
7525
7527
|
const ue = 64;
|
|
7526
7528
|
t[t.atSign = ue] = "atSign";
|
|
7527
7529
|
const ae = 65;
|
|
@@ -7546,8 +7548,8 @@ var p;
|
|
|
7546
7548
|
t[t.uppercaseJ = ce] = "uppercaseJ";
|
|
7547
7549
|
const ge = 75;
|
|
7548
7550
|
t[t.uppercaseK = ge] = "uppercaseK";
|
|
7549
|
-
const
|
|
7550
|
-
t[t.uppercaseL =
|
|
7551
|
+
const me = 76;
|
|
7552
|
+
t[t.uppercaseL = me] = "uppercaseL";
|
|
7551
7553
|
const Se = 77;
|
|
7552
7554
|
t[t.uppercaseM = Se] = "uppercaseM";
|
|
7553
7555
|
const Le = 78;
|
|
@@ -7657,7 +7659,7 @@ var p;
|
|
|
7657
7659
|
const qs = 8233;
|
|
7658
7660
|
t[t.paragraphSeparator = qs] = "paragraphSeparator";
|
|
7659
7661
|
})(p || (p = {}));
|
|
7660
|
-
let Hn, le, fe, a,
|
|
7662
|
+
let Hn, le, fe, a, P, Wo;
|
|
7661
7663
|
function en() {
|
|
7662
7664
|
return Wo++;
|
|
7663
7665
|
}
|
|
@@ -7676,13 +7678,13 @@ class ru {
|
|
|
7676
7678
|
function iu(t) {
|
|
7677
7679
|
let e = 1, n = 1;
|
|
7678
7680
|
for (let s = 0; s < t; s++)
|
|
7679
|
-
|
|
7681
|
+
P.charCodeAt(s) === p.lineFeed ? (e++, n = 1) : n++;
|
|
7680
7682
|
return new ru(e, n);
|
|
7681
7683
|
}
|
|
7682
7684
|
function ou(t, e, n, s) {
|
|
7683
|
-
|
|
7685
|
+
P = t, a = new Pe(), Wo = 1, Hn = e, le = n, fe = s;
|
|
7684
7686
|
}
|
|
7685
|
-
function
|
|
7687
|
+
function V(t) {
|
|
7686
7688
|
return a.contextualKeyword === t;
|
|
7687
7689
|
}
|
|
7688
7690
|
function Nr(t) {
|
|
@@ -7693,7 +7695,7 @@ function xe(t) {
|
|
|
7693
7695
|
return a.contextualKeyword === t && y(r.name);
|
|
7694
7696
|
}
|
|
7695
7697
|
function ve(t) {
|
|
7696
|
-
xe(t) ||
|
|
7698
|
+
xe(t) || te();
|
|
7697
7699
|
}
|
|
7698
7700
|
function Be() {
|
|
7699
7701
|
return l(r.eof) || l(r.braceR) || De();
|
|
@@ -7701,7 +7703,7 @@ function Be() {
|
|
|
7701
7703
|
function De() {
|
|
7702
7704
|
const t = a.tokens[a.tokens.length - 1], e = t ? t.end : 0;
|
|
7703
7705
|
for (let n = e; n < a.start; n++) {
|
|
7704
|
-
const s =
|
|
7706
|
+
const s = P.charCodeAt(n);
|
|
7705
7707
|
if (s === p.lineFeed || s === p.carriageReturn || s === 8232 || s === 8233)
|
|
7706
7708
|
return !0;
|
|
7707
7709
|
}
|
|
@@ -7710,7 +7712,7 @@ function De() {
|
|
|
7710
7712
|
function Go() {
|
|
7711
7713
|
const t = Mr();
|
|
7712
7714
|
for (let e = a.end; e < t; e++) {
|
|
7713
|
-
const n =
|
|
7715
|
+
const n = P.charCodeAt(e);
|
|
7714
7716
|
if (n === p.lineFeed || n === p.carriageReturn || n === 8232 || n === 8233)
|
|
7715
7717
|
return !0;
|
|
7716
7718
|
}
|
|
@@ -7720,16 +7722,16 @@ function Qe() {
|
|
|
7720
7722
|
return y(r.semi) || Be();
|
|
7721
7723
|
}
|
|
7722
7724
|
function be() {
|
|
7723
|
-
Qe() ||
|
|
7725
|
+
Qe() || te('Unexpected token, expected ";"');
|
|
7724
7726
|
}
|
|
7725
7727
|
function w(t) {
|
|
7726
|
-
y(t) ||
|
|
7728
|
+
y(t) || te(`Unexpected token, expected "${tu(t)}"`);
|
|
7727
7729
|
}
|
|
7728
|
-
function
|
|
7730
|
+
function te(t = "Unexpected token", e = a.start) {
|
|
7729
7731
|
if (a.error)
|
|
7730
7732
|
return;
|
|
7731
7733
|
const n = new SyntaxError(t);
|
|
7732
|
-
n.pos = e, a.error = n, a.pos =
|
|
7734
|
+
n.pos = e, a.error = n, a.pos = P.length, ee(r.eof);
|
|
7733
7735
|
}
|
|
7734
7736
|
const Yo = [
|
|
7735
7737
|
9,
|
|
@@ -17093,7 +17095,7 @@ const ji = new Int32Array([
|
|
|
17093
17095
|
]);
|
|
17094
17096
|
function cu() {
|
|
17095
17097
|
let t = 0, e = 0, n = a.pos;
|
|
17096
|
-
for (; n <
|
|
17098
|
+
for (; n < P.length && (e = P.charCodeAt(n), !(e < p.lowercaseA || e > p.lowercaseZ)); ) {
|
|
17097
17099
|
const i = ji[t + (e - p.lowercaseA) + 1];
|
|
17098
17100
|
if (i === -1)
|
|
17099
17101
|
break;
|
|
@@ -17101,25 +17103,25 @@ function cu() {
|
|
|
17101
17103
|
}
|
|
17102
17104
|
const s = ji[t];
|
|
17103
17105
|
if (s > -1 && !Ge[e]) {
|
|
17104
|
-
a.pos = n, s & 1 ?
|
|
17106
|
+
a.pos = n, s & 1 ? ee(s >>> 1) : ee(r.name, s >>> 1);
|
|
17105
17107
|
return;
|
|
17106
17108
|
}
|
|
17107
|
-
for (; n <
|
|
17108
|
-
const i =
|
|
17109
|
+
for (; n < P.length; ) {
|
|
17110
|
+
const i = P.charCodeAt(n);
|
|
17109
17111
|
if (Ge[i])
|
|
17110
17112
|
n++;
|
|
17111
17113
|
else if (i === p.backslash) {
|
|
17112
|
-
if (n += 2,
|
|
17113
|
-
for (; n <
|
|
17114
|
+
if (n += 2, P.charCodeAt(n) === p.leftCurlyBrace) {
|
|
17115
|
+
for (; n < P.length && P.charCodeAt(n) !== p.rightCurlyBrace; )
|
|
17114
17116
|
n++;
|
|
17115
17117
|
n++;
|
|
17116
17118
|
}
|
|
17117
|
-
} else if (i === p.atSign &&
|
|
17119
|
+
} else if (i === p.atSign && P.charCodeAt(n + 1) === p.atSign)
|
|
17118
17120
|
n += 2;
|
|
17119
17121
|
else
|
|
17120
17122
|
break;
|
|
17121
17123
|
}
|
|
17122
|
-
a.pos = n,
|
|
17124
|
+
a.pos = n, ee(r.name);
|
|
17123
17125
|
}
|
|
17124
17126
|
var G;
|
|
17125
17127
|
(function(t) {
|
|
@@ -17213,7 +17215,7 @@ function re(t) {
|
|
|
17213
17215
|
const e = a.isType;
|
|
17214
17216
|
return a.isType = !0, e;
|
|
17215
17217
|
}
|
|
17216
|
-
function
|
|
17218
|
+
function ne(t) {
|
|
17217
17219
|
a.isType = t;
|
|
17218
17220
|
}
|
|
17219
17221
|
function y(t) {
|
|
@@ -17248,50 +17250,50 @@ function Mr() {
|
|
|
17248
17250
|
}
|
|
17249
17251
|
function Qo(t) {
|
|
17250
17252
|
$i.lastIndex = t;
|
|
17251
|
-
const e = $i.exec(
|
|
17253
|
+
const e = $i.exec(P);
|
|
17252
17254
|
return t + e[0].length;
|
|
17253
17255
|
}
|
|
17254
17256
|
function ea() {
|
|
17255
|
-
return
|
|
17257
|
+
return P.charCodeAt(Mr());
|
|
17256
17258
|
}
|
|
17257
17259
|
function ta() {
|
|
17258
|
-
if (sa(), a.start = a.pos, a.pos >=
|
|
17260
|
+
if (sa(), a.start = a.pos, a.pos >= P.length) {
|
|
17259
17261
|
const t = a.tokens;
|
|
17260
|
-
t.length >= 2 && t[t.length - 1].start >=
|
|
17262
|
+
t.length >= 2 && t[t.length - 1].start >= P.length && t[t.length - 2].start >= P.length && te("Unexpectedly reached the end of input."), ee(r.eof);
|
|
17261
17263
|
return;
|
|
17262
17264
|
}
|
|
17263
|
-
pu(
|
|
17265
|
+
pu(P.charCodeAt(a.pos));
|
|
17264
17266
|
}
|
|
17265
17267
|
function pu(t) {
|
|
17266
|
-
un[t] || t === p.backslash || t === p.atSign &&
|
|
17268
|
+
un[t] || t === p.backslash || t === p.atSign && P.charCodeAt(a.pos + 1) === p.atSign ? cu() : oa(t);
|
|
17267
17269
|
}
|
|
17268
17270
|
function gu() {
|
|
17269
|
-
for (;
|
|
17270
|
-
if (a.pos++, a.pos >
|
|
17271
|
-
|
|
17271
|
+
for (; P.charCodeAt(a.pos) !== p.asterisk || P.charCodeAt(a.pos + 1) !== p.slash; )
|
|
17272
|
+
if (a.pos++, a.pos > P.length) {
|
|
17273
|
+
te("Unterminated comment", a.pos - 2);
|
|
17272
17274
|
return;
|
|
17273
17275
|
}
|
|
17274
17276
|
a.pos += 2;
|
|
17275
17277
|
}
|
|
17276
17278
|
function na(t) {
|
|
17277
|
-
let e =
|
|
17278
|
-
if (a.pos <
|
|
17279
|
-
for (; e !== p.lineFeed && e !== p.carriageReturn && e !== p.lineSeparator && e !== p.paragraphSeparator && ++a.pos <
|
|
17280
|
-
e =
|
|
17279
|
+
let e = P.charCodeAt(a.pos += t);
|
|
17280
|
+
if (a.pos < P.length)
|
|
17281
|
+
for (; e !== p.lineFeed && e !== p.carriageReturn && e !== p.lineSeparator && e !== p.paragraphSeparator && ++a.pos < P.length; )
|
|
17282
|
+
e = P.charCodeAt(a.pos);
|
|
17281
17283
|
}
|
|
17282
17284
|
function sa() {
|
|
17283
|
-
for (; a.pos <
|
|
17284
|
-
const t =
|
|
17285
|
+
for (; a.pos < P.length; ) {
|
|
17286
|
+
const t = P.charCodeAt(a.pos);
|
|
17285
17287
|
switch (t) {
|
|
17286
17288
|
case p.carriageReturn:
|
|
17287
|
-
|
|
17289
|
+
P.charCodeAt(a.pos + 1) === p.lineFeed && ++a.pos;
|
|
17288
17290
|
case p.lineFeed:
|
|
17289
17291
|
case p.lineSeparator:
|
|
17290
17292
|
case p.paragraphSeparator:
|
|
17291
17293
|
++a.pos;
|
|
17292
17294
|
break;
|
|
17293
17295
|
case p.slash:
|
|
17294
|
-
switch (
|
|
17296
|
+
switch (P.charCodeAt(a.pos + 1)) {
|
|
17295
17297
|
case p.asterisk:
|
|
17296
17298
|
a.pos += 2, gu();
|
|
17297
17299
|
break;
|
|
@@ -17310,152 +17312,152 @@ function sa() {
|
|
|
17310
17312
|
}
|
|
17311
17313
|
}
|
|
17312
17314
|
}
|
|
17313
|
-
function
|
|
17315
|
+
function ee(t, e = d.NONE) {
|
|
17314
17316
|
a.end = a.pos, a.type = t, a.contextualKeyword = e;
|
|
17315
17317
|
}
|
|
17316
17318
|
function bu() {
|
|
17317
|
-
const t =
|
|
17319
|
+
const t = P.charCodeAt(a.pos + 1);
|
|
17318
17320
|
if (t >= p.digit0 && t <= p.digit9) {
|
|
17319
17321
|
aa(!0);
|
|
17320
17322
|
return;
|
|
17321
17323
|
}
|
|
17322
|
-
t === p.dot &&
|
|
17324
|
+
t === p.dot && P.charCodeAt(a.pos + 2) === p.dot ? (a.pos += 3, ee(r.ellipsis)) : (++a.pos, ee(r.dot));
|
|
17323
17325
|
}
|
|
17324
17326
|
function _u() {
|
|
17325
|
-
|
|
17327
|
+
P.charCodeAt(a.pos + 1) === p.equalsTo ? de(r.assign, 2) : de(r.slash, 1);
|
|
17326
17328
|
}
|
|
17327
17329
|
function yu(t) {
|
|
17328
|
-
let e = t === p.asterisk ? r.star : r.modulo, n = 1, s =
|
|
17329
|
-
t === p.asterisk && s === p.asterisk && (n++, s =
|
|
17330
|
+
let e = t === p.asterisk ? r.star : r.modulo, n = 1, s = P.charCodeAt(a.pos + 1);
|
|
17331
|
+
t === p.asterisk && s === p.asterisk && (n++, s = P.charCodeAt(a.pos + 2), e = r.exponent), s === p.equalsTo && P.charCodeAt(a.pos + 2) !== p.greaterThan && (n++, e = r.assign), de(e, n);
|
|
17330
17332
|
}
|
|
17331
17333
|
function ku(t) {
|
|
17332
|
-
const e =
|
|
17334
|
+
const e = P.charCodeAt(a.pos + 1);
|
|
17333
17335
|
if (e === t) {
|
|
17334
|
-
|
|
17336
|
+
P.charCodeAt(a.pos + 2) === p.equalsTo ? de(r.assign, 3) : de(t === p.verticalBar ? r.logicalOR : r.logicalAND, 2);
|
|
17335
17337
|
return;
|
|
17336
17338
|
}
|
|
17337
17339
|
if (t === p.verticalBar) {
|
|
17338
17340
|
if (e === p.greaterThan) {
|
|
17339
|
-
|
|
17341
|
+
de(r.pipeline, 2);
|
|
17340
17342
|
return;
|
|
17341
17343
|
} else if (e === p.rightCurlyBrace && fe) {
|
|
17342
|
-
|
|
17344
|
+
de(r.braceBarR, 2);
|
|
17343
17345
|
return;
|
|
17344
17346
|
}
|
|
17345
17347
|
}
|
|
17346
17348
|
if (e === p.equalsTo) {
|
|
17347
|
-
|
|
17349
|
+
de(r.assign, 2);
|
|
17348
17350
|
return;
|
|
17349
17351
|
}
|
|
17350
|
-
|
|
17352
|
+
de(t === p.verticalBar ? r.bitwiseOR : r.bitwiseAND, 1);
|
|
17351
17353
|
}
|
|
17352
17354
|
function vu() {
|
|
17353
|
-
|
|
17355
|
+
P.charCodeAt(a.pos + 1) === p.equalsTo ? de(r.assign, 2) : de(r.bitwiseXOR, 1);
|
|
17354
17356
|
}
|
|
17355
17357
|
function wu(t) {
|
|
17356
|
-
const e =
|
|
17358
|
+
const e = P.charCodeAt(a.pos + 1);
|
|
17357
17359
|
if (e === t) {
|
|
17358
|
-
|
|
17360
|
+
de(r.preIncDec, 2);
|
|
17359
17361
|
return;
|
|
17360
17362
|
}
|
|
17361
|
-
e === p.equalsTo ?
|
|
17363
|
+
e === p.equalsTo ? de(r.assign, 2) : t === p.plusSign ? de(r.plus, 1) : de(r.minus, 1);
|
|
17362
17364
|
}
|
|
17363
17365
|
function xu() {
|
|
17364
|
-
const t =
|
|
17366
|
+
const t = P.charCodeAt(a.pos + 1);
|
|
17365
17367
|
if (t === p.lessThan) {
|
|
17366
|
-
if (
|
|
17367
|
-
|
|
17368
|
+
if (P.charCodeAt(a.pos + 2) === p.equalsTo) {
|
|
17369
|
+
de(r.assign, 3);
|
|
17368
17370
|
return;
|
|
17369
17371
|
}
|
|
17370
|
-
a.isType ?
|
|
17372
|
+
a.isType ? de(r.lessThan, 1) : de(r.bitShiftL, 2);
|
|
17371
17373
|
return;
|
|
17372
17374
|
}
|
|
17373
|
-
t === p.equalsTo ?
|
|
17375
|
+
t === p.equalsTo ? de(r.relationalOrEqual, 2) : de(r.lessThan, 1);
|
|
17374
17376
|
}
|
|
17375
17377
|
function ra() {
|
|
17376
17378
|
if (a.isType) {
|
|
17377
|
-
|
|
17379
|
+
de(r.greaterThan, 1);
|
|
17378
17380
|
return;
|
|
17379
17381
|
}
|
|
17380
|
-
const t =
|
|
17382
|
+
const t = P.charCodeAt(a.pos + 1);
|
|
17381
17383
|
if (t === p.greaterThan) {
|
|
17382
|
-
const e =
|
|
17383
|
-
if (
|
|
17384
|
-
|
|
17384
|
+
const e = P.charCodeAt(a.pos + 2) === p.greaterThan ? 3 : 2;
|
|
17385
|
+
if (P.charCodeAt(a.pos + e) === p.equalsTo) {
|
|
17386
|
+
de(r.assign, e + 1);
|
|
17385
17387
|
return;
|
|
17386
17388
|
}
|
|
17387
|
-
|
|
17389
|
+
de(r.bitShiftR, e);
|
|
17388
17390
|
return;
|
|
17389
17391
|
}
|
|
17390
|
-
t === p.equalsTo ?
|
|
17392
|
+
t === p.equalsTo ? de(r.relationalOrEqual, 2) : de(r.greaterThan, 1);
|
|
17391
17393
|
}
|
|
17392
17394
|
function ia() {
|
|
17393
17395
|
a.type === r.greaterThan && (a.pos -= 1, ra());
|
|
17394
17396
|
}
|
|
17395
17397
|
function Eu(t) {
|
|
17396
|
-
const e =
|
|
17398
|
+
const e = P.charCodeAt(a.pos + 1);
|
|
17397
17399
|
if (e === p.equalsTo) {
|
|
17398
|
-
|
|
17400
|
+
de(r.equality, P.charCodeAt(a.pos + 2) === p.equalsTo ? 3 : 2);
|
|
17399
17401
|
return;
|
|
17400
17402
|
}
|
|
17401
17403
|
if (t === p.equalsTo && e === p.greaterThan) {
|
|
17402
|
-
a.pos += 2,
|
|
17404
|
+
a.pos += 2, ee(r.arrow);
|
|
17403
17405
|
return;
|
|
17404
17406
|
}
|
|
17405
|
-
|
|
17407
|
+
de(t === p.equalsTo ? r.eq : r.bang, 1);
|
|
17406
17408
|
}
|
|
17407
17409
|
function Su() {
|
|
17408
|
-
const t =
|
|
17410
|
+
const t = P.charCodeAt(a.pos + 1), e = P.charCodeAt(a.pos + 2);
|
|
17409
17411
|
t === p.questionMark && // In Flow (but not TypeScript), ??string is a valid type that should be
|
|
17410
17412
|
// tokenized as two individual ? tokens.
|
|
17411
|
-
!(fe && a.isType) ? e === p.equalsTo ?
|
|
17413
|
+
!(fe && a.isType) ? e === p.equalsTo ? de(r.assign, 3) : de(r.nullishCoalescing, 2) : t === p.dot && !(e >= p.digit0 && e <= p.digit9) ? (a.pos += 2, ee(r.questionDot)) : (++a.pos, ee(r.question));
|
|
17412
17414
|
}
|
|
17413
17415
|
function oa(t) {
|
|
17414
17416
|
switch (t) {
|
|
17415
17417
|
case p.numberSign:
|
|
17416
|
-
++a.pos,
|
|
17418
|
+
++a.pos, ee(r.hash);
|
|
17417
17419
|
return;
|
|
17418
17420
|
case p.dot:
|
|
17419
17421
|
bu();
|
|
17420
17422
|
return;
|
|
17421
17423
|
case p.leftParenthesis:
|
|
17422
|
-
++a.pos,
|
|
17424
|
+
++a.pos, ee(r.parenL);
|
|
17423
17425
|
return;
|
|
17424
17426
|
case p.rightParenthesis:
|
|
17425
|
-
++a.pos,
|
|
17427
|
+
++a.pos, ee(r.parenR);
|
|
17426
17428
|
return;
|
|
17427
17429
|
case p.semicolon:
|
|
17428
|
-
++a.pos,
|
|
17430
|
+
++a.pos, ee(r.semi);
|
|
17429
17431
|
return;
|
|
17430
17432
|
case p.comma:
|
|
17431
|
-
++a.pos,
|
|
17433
|
+
++a.pos, ee(r.comma);
|
|
17432
17434
|
return;
|
|
17433
17435
|
case p.leftSquareBracket:
|
|
17434
|
-
++a.pos,
|
|
17436
|
+
++a.pos, ee(r.bracketL);
|
|
17435
17437
|
return;
|
|
17436
17438
|
case p.rightSquareBracket:
|
|
17437
|
-
++a.pos,
|
|
17439
|
+
++a.pos, ee(r.bracketR);
|
|
17438
17440
|
return;
|
|
17439
17441
|
case p.leftCurlyBrace:
|
|
17440
|
-
fe &&
|
|
17442
|
+
fe && P.charCodeAt(a.pos + 1) === p.verticalBar ? de(r.braceBarL, 2) : (++a.pos, ee(r.braceL));
|
|
17441
17443
|
return;
|
|
17442
17444
|
case p.rightCurlyBrace:
|
|
17443
|
-
++a.pos,
|
|
17445
|
+
++a.pos, ee(r.braceR);
|
|
17444
17446
|
return;
|
|
17445
17447
|
case p.colon:
|
|
17446
|
-
|
|
17448
|
+
P.charCodeAt(a.pos + 1) === p.colon ? de(r.doubleColon, 2) : (++a.pos, ee(r.colon));
|
|
17447
17449
|
return;
|
|
17448
17450
|
case p.questionMark:
|
|
17449
17451
|
Su();
|
|
17450
17452
|
return;
|
|
17451
17453
|
case p.atSign:
|
|
17452
|
-
++a.pos,
|
|
17454
|
+
++a.pos, ee(r.at);
|
|
17453
17455
|
return;
|
|
17454
17456
|
case p.graveAccent:
|
|
17455
|
-
++a.pos,
|
|
17457
|
+
++a.pos, ee(r.backQuote);
|
|
17456
17458
|
return;
|
|
17457
17459
|
case p.digit0: {
|
|
17458
|
-
const e =
|
|
17460
|
+
const e = P.charCodeAt(a.pos + 1);
|
|
17459
17461
|
if (e === p.lowercaseX || e === p.uppercaseX || e === p.lowercaseO || e === p.uppercaseO || e === p.lowercaseB || e === p.uppercaseB) {
|
|
17460
17462
|
Iu();
|
|
17461
17463
|
return;
|
|
@@ -17505,23 +17507,23 @@ function oa(t) {
|
|
|
17505
17507
|
Eu(t);
|
|
17506
17508
|
return;
|
|
17507
17509
|
case p.tilde:
|
|
17508
|
-
|
|
17510
|
+
de(r.tilde, 1);
|
|
17509
17511
|
return;
|
|
17510
17512
|
}
|
|
17511
|
-
|
|
17513
|
+
te(`Unexpected character '${String.fromCharCode(t)}'`, a.pos);
|
|
17512
17514
|
}
|
|
17513
|
-
function
|
|
17514
|
-
a.pos += e,
|
|
17515
|
+
function de(t, e) {
|
|
17516
|
+
a.pos += e, ee(t);
|
|
17515
17517
|
}
|
|
17516
17518
|
function Tu() {
|
|
17517
17519
|
const t = a.pos;
|
|
17518
17520
|
let e = !1, n = !1;
|
|
17519
17521
|
for (; ; ) {
|
|
17520
|
-
if (a.pos >=
|
|
17521
|
-
|
|
17522
|
+
if (a.pos >= P.length) {
|
|
17523
|
+
te("Unterminated regular expression", t);
|
|
17522
17524
|
return;
|
|
17523
17525
|
}
|
|
17524
|
-
const s =
|
|
17526
|
+
const s = P.charCodeAt(a.pos);
|
|
17525
17527
|
if (e)
|
|
17526
17528
|
e = !1;
|
|
17527
17529
|
else {
|
|
@@ -17535,11 +17537,11 @@ function Tu() {
|
|
|
17535
17537
|
}
|
|
17536
17538
|
++a.pos;
|
|
17537
17539
|
}
|
|
17538
|
-
++a.pos, Cu(),
|
|
17540
|
+
++a.pos, Cu(), ee(r.regexp);
|
|
17539
17541
|
}
|
|
17540
17542
|
function tr() {
|
|
17541
17543
|
for (; ; ) {
|
|
17542
|
-
const t =
|
|
17544
|
+
const t = P.charCodeAt(a.pos);
|
|
17543
17545
|
if (t >= p.digit0 && t <= p.digit9 || t === p.underscore)
|
|
17544
17546
|
a.pos++;
|
|
17545
17547
|
else
|
|
@@ -17548,73 +17550,73 @@ function tr() {
|
|
|
17548
17550
|
}
|
|
17549
17551
|
function Iu() {
|
|
17550
17552
|
for (a.pos += 2; ; ) {
|
|
17551
|
-
const e =
|
|
17553
|
+
const e = P.charCodeAt(a.pos);
|
|
17552
17554
|
if (e >= p.digit0 && e <= p.digit9 || e >= p.lowercaseA && e <= p.lowercaseF || e >= p.uppercaseA && e <= p.uppercaseF || e === p.underscore)
|
|
17553
17555
|
a.pos++;
|
|
17554
17556
|
else
|
|
17555
17557
|
break;
|
|
17556
17558
|
}
|
|
17557
|
-
|
|
17559
|
+
P.charCodeAt(a.pos) === p.lowercaseN ? (++a.pos, ee(r.bigint)) : ee(r.num);
|
|
17558
17560
|
}
|
|
17559
17561
|
function aa(t) {
|
|
17560
17562
|
let e = !1, n = !1;
|
|
17561
17563
|
t || tr();
|
|
17562
|
-
let s =
|
|
17563
|
-
if (s === p.dot && (++a.pos, tr(), s =
|
|
17564
|
-
|
|
17564
|
+
let s = P.charCodeAt(a.pos);
|
|
17565
|
+
if (s === p.dot && (++a.pos, tr(), s = P.charCodeAt(a.pos)), (s === p.uppercaseE || s === p.lowercaseE) && (s = P.charCodeAt(++a.pos), (s === p.plusSign || s === p.dash) && ++a.pos, tr(), s = P.charCodeAt(a.pos)), s === p.lowercaseN ? (++a.pos, e = !0) : s === p.lowercaseM && (++a.pos, n = !0), e) {
|
|
17566
|
+
ee(r.bigint);
|
|
17565
17567
|
return;
|
|
17566
17568
|
}
|
|
17567
17569
|
if (n) {
|
|
17568
|
-
|
|
17570
|
+
ee(r.decimal);
|
|
17569
17571
|
return;
|
|
17570
17572
|
}
|
|
17571
|
-
|
|
17573
|
+
ee(r.num);
|
|
17572
17574
|
}
|
|
17573
17575
|
function Au(t) {
|
|
17574
17576
|
for (a.pos++; ; ) {
|
|
17575
|
-
if (a.pos >=
|
|
17576
|
-
|
|
17577
|
+
if (a.pos >= P.length) {
|
|
17578
|
+
te("Unterminated string constant");
|
|
17577
17579
|
return;
|
|
17578
17580
|
}
|
|
17579
|
-
const e =
|
|
17581
|
+
const e = P.charCodeAt(a.pos);
|
|
17580
17582
|
if (e === p.backslash)
|
|
17581
17583
|
a.pos++;
|
|
17582
17584
|
else if (e === t)
|
|
17583
17585
|
break;
|
|
17584
17586
|
a.pos++;
|
|
17585
17587
|
}
|
|
17586
|
-
a.pos++,
|
|
17588
|
+
a.pos++, ee(r.string);
|
|
17587
17589
|
}
|
|
17588
17590
|
function Ru() {
|
|
17589
17591
|
for (; ; ) {
|
|
17590
|
-
if (a.pos >=
|
|
17591
|
-
|
|
17592
|
+
if (a.pos >= P.length) {
|
|
17593
|
+
te("Unterminated template");
|
|
17592
17594
|
return;
|
|
17593
17595
|
}
|
|
17594
|
-
const t =
|
|
17595
|
-
if (t === p.graveAccent || t === p.dollarSign &&
|
|
17596
|
+
const t = P.charCodeAt(a.pos);
|
|
17597
|
+
if (t === p.graveAccent || t === p.dollarSign && P.charCodeAt(a.pos + 1) === p.leftCurlyBrace) {
|
|
17596
17598
|
if (a.pos === a.start && l(r.template))
|
|
17597
17599
|
if (t === p.dollarSign) {
|
|
17598
|
-
a.pos += 2,
|
|
17600
|
+
a.pos += 2, ee(r.dollarBraceL);
|
|
17599
17601
|
return;
|
|
17600
17602
|
} else {
|
|
17601
|
-
++a.pos,
|
|
17603
|
+
++a.pos, ee(r.backQuote);
|
|
17602
17604
|
return;
|
|
17603
17605
|
}
|
|
17604
|
-
|
|
17606
|
+
ee(r.template);
|
|
17605
17607
|
return;
|
|
17606
17608
|
}
|
|
17607
17609
|
t === p.backslash && a.pos++, a.pos++;
|
|
17608
17610
|
}
|
|
17609
17611
|
}
|
|
17610
17612
|
function Cu() {
|
|
17611
|
-
for (; a.pos <
|
|
17612
|
-
const t =
|
|
17613
|
+
for (; a.pos < P.length; ) {
|
|
17614
|
+
const t = P.charCodeAt(a.pos);
|
|
17613
17615
|
if (Ge[t])
|
|
17614
17616
|
a.pos++;
|
|
17615
17617
|
else if (t === p.backslash) {
|
|
17616
|
-
if (a.pos += 2,
|
|
17617
|
-
for (; a.pos <
|
|
17618
|
+
if (a.pos += 2, P.charCodeAt(a.pos) === p.leftCurlyBrace) {
|
|
17619
|
+
for (; a.pos < P.length && P.charCodeAt(a.pos) !== p.rightCurlyBrace; )
|
|
17618
17620
|
a.pos++;
|
|
17619
17621
|
a.pos++;
|
|
17620
17622
|
}
|
|
@@ -18624,119 +18626,119 @@ var Tt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
18624
18626
|
t.exports = s();
|
|
18625
18627
|
})(Tt, function() {
|
|
18626
18628
|
const n = /^[\w+.-]+:\/\//, s = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/, i = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;
|
|
18627
|
-
function o(
|
|
18628
|
-
return n.test(
|
|
18629
|
+
function o(C) {
|
|
18630
|
+
return n.test(C);
|
|
18629
18631
|
}
|
|
18630
|
-
function c(
|
|
18631
|
-
return
|
|
18632
|
+
function c(C) {
|
|
18633
|
+
return C.startsWith("//");
|
|
18632
18634
|
}
|
|
18633
|
-
function u(
|
|
18634
|
-
return
|
|
18635
|
+
function u(C) {
|
|
18636
|
+
return C.startsWith("/");
|
|
18635
18637
|
}
|
|
18636
|
-
function h(
|
|
18637
|
-
return
|
|
18638
|
+
function h(C) {
|
|
18639
|
+
return C.startsWith("file:");
|
|
18638
18640
|
}
|
|
18639
|
-
function f(
|
|
18640
|
-
return /^[.?#]/.test(
|
|
18641
|
+
function f(C) {
|
|
18642
|
+
return /^[.?#]/.test(C);
|
|
18641
18643
|
}
|
|
18642
|
-
function m(
|
|
18643
|
-
const
|
|
18644
|
-
return x(
|
|
18644
|
+
function m(C) {
|
|
18645
|
+
const H = s.exec(C);
|
|
18646
|
+
return x(H[1], H[2] || "", H[3], H[4] || "", H[5] || "/", H[6] || "", H[7] || "");
|
|
18645
18647
|
}
|
|
18646
|
-
function g(
|
|
18647
|
-
const
|
|
18648
|
-
return x("file:", "",
|
|
18648
|
+
function g(C) {
|
|
18649
|
+
const H = i.exec(C), M = H[2];
|
|
18650
|
+
return x("file:", "", H[1] || "", "", u(M) ? M : "/" + M, H[3] || "", H[4] || "");
|
|
18649
18651
|
}
|
|
18650
|
-
function x(
|
|
18652
|
+
function x(C, H, M, J, oe, se, K) {
|
|
18651
18653
|
return {
|
|
18652
|
-
scheme:
|
|
18653
|
-
user:
|
|
18654
|
+
scheme: C,
|
|
18655
|
+
user: H,
|
|
18654
18656
|
host: M,
|
|
18655
|
-
port:
|
|
18657
|
+
port: J,
|
|
18656
18658
|
path: oe,
|
|
18657
|
-
query:
|
|
18658
|
-
hash:
|
|
18659
|
+
query: se,
|
|
18660
|
+
hash: K,
|
|
18659
18661
|
type: 7
|
|
18660
18662
|
};
|
|
18661
18663
|
}
|
|
18662
|
-
function T(
|
|
18663
|
-
if (c(
|
|
18664
|
-
const M = m("http:" +
|
|
18664
|
+
function T(C) {
|
|
18665
|
+
if (c(C)) {
|
|
18666
|
+
const M = m("http:" + C);
|
|
18665
18667
|
return M.scheme = "", M.type = 6, M;
|
|
18666
18668
|
}
|
|
18667
|
-
if (u(
|
|
18668
|
-
const M = m("http://foo.com" +
|
|
18669
|
+
if (u(C)) {
|
|
18670
|
+
const M = m("http://foo.com" + C);
|
|
18669
18671
|
return M.scheme = "", M.host = "", M.type = 5, M;
|
|
18670
18672
|
}
|
|
18671
|
-
if (h(
|
|
18672
|
-
return g(
|
|
18673
|
-
if (o(
|
|
18674
|
-
return m(
|
|
18675
|
-
const
|
|
18676
|
-
return
|
|
18677
|
-
}
|
|
18678
|
-
function L(
|
|
18679
|
-
if (
|
|
18680
|
-
return
|
|
18681
|
-
const
|
|
18682
|
-
return
|
|
18683
|
-
}
|
|
18684
|
-
function O(
|
|
18685
|
-
H
|
|
18686
|
-
}
|
|
18687
|
-
function
|
|
18688
|
-
const M =
|
|
18689
|
-
let oe = 1,
|
|
18690
|
-
for (let _ = 1; _ <
|
|
18691
|
-
const b =
|
|
18673
|
+
if (h(C))
|
|
18674
|
+
return g(C);
|
|
18675
|
+
if (o(C))
|
|
18676
|
+
return m(C);
|
|
18677
|
+
const H = m("http://foo.com/" + C);
|
|
18678
|
+
return H.scheme = "", H.host = "", H.type = C ? C.startsWith("?") ? 3 : C.startsWith("#") ? 2 : 4 : 1, H;
|
|
18679
|
+
}
|
|
18680
|
+
function L(C) {
|
|
18681
|
+
if (C.endsWith("/.."))
|
|
18682
|
+
return C;
|
|
18683
|
+
const H = C.lastIndexOf("/");
|
|
18684
|
+
return C.slice(0, H + 1);
|
|
18685
|
+
}
|
|
18686
|
+
function O(C, H) {
|
|
18687
|
+
q(H, H.type), C.path === "/" ? C.path = H.path : C.path = L(H.path) + C.path;
|
|
18688
|
+
}
|
|
18689
|
+
function q(C, H) {
|
|
18690
|
+
const M = H <= 4, J = C.path.split("/");
|
|
18691
|
+
let oe = 1, se = 0, K = !1;
|
|
18692
|
+
for (let _ = 1; _ < J.length; _++) {
|
|
18693
|
+
const b = J[_];
|
|
18692
18694
|
if (!b) {
|
|
18693
|
-
|
|
18695
|
+
K = !0;
|
|
18694
18696
|
continue;
|
|
18695
18697
|
}
|
|
18696
|
-
if (
|
|
18698
|
+
if (K = !1, b !== ".") {
|
|
18697
18699
|
if (b === "..") {
|
|
18698
|
-
|
|
18700
|
+
se ? (K = !0, se--, oe--) : M && (J[oe++] = b);
|
|
18699
18701
|
continue;
|
|
18700
18702
|
}
|
|
18701
|
-
|
|
18703
|
+
J[oe++] = b, se++;
|
|
18702
18704
|
}
|
|
18703
18705
|
}
|
|
18704
|
-
let
|
|
18706
|
+
let he = "";
|
|
18705
18707
|
for (let _ = 1; _ < oe; _++)
|
|
18706
|
-
|
|
18707
|
-
(!
|
|
18708
|
+
he += "/" + J[_];
|
|
18709
|
+
(!he || K && !he.endsWith("/..")) && (he += "/"), C.path = he;
|
|
18708
18710
|
}
|
|
18709
|
-
function
|
|
18710
|
-
if (!
|
|
18711
|
+
function z(C, H) {
|
|
18712
|
+
if (!C && !H)
|
|
18711
18713
|
return "";
|
|
18712
|
-
const M = T(
|
|
18713
|
-
let
|
|
18714
|
-
if (
|
|
18715
|
-
const
|
|
18716
|
-
switch (
|
|
18714
|
+
const M = T(C);
|
|
18715
|
+
let J = M.type;
|
|
18716
|
+
if (H && J !== 7) {
|
|
18717
|
+
const se = T(H), K = se.type;
|
|
18718
|
+
switch (J) {
|
|
18717
18719
|
case 1:
|
|
18718
|
-
M.hash =
|
|
18720
|
+
M.hash = se.hash;
|
|
18719
18721
|
case 2:
|
|
18720
|
-
M.query =
|
|
18722
|
+
M.query = se.query;
|
|
18721
18723
|
case 3:
|
|
18722
18724
|
case 4:
|
|
18723
|
-
O(M,
|
|
18725
|
+
O(M, se);
|
|
18724
18726
|
case 5:
|
|
18725
|
-
M.user =
|
|
18727
|
+
M.user = se.user, M.host = se.host, M.port = se.port;
|
|
18726
18728
|
case 6:
|
|
18727
|
-
M.scheme =
|
|
18729
|
+
M.scheme = se.scheme;
|
|
18728
18730
|
}
|
|
18729
|
-
|
|
18731
|
+
K > J && (J = K);
|
|
18730
18732
|
}
|
|
18731
|
-
|
|
18733
|
+
q(M, J);
|
|
18732
18734
|
const oe = M.query + M.hash;
|
|
18733
|
-
switch (
|
|
18735
|
+
switch (J) {
|
|
18734
18736
|
case 2:
|
|
18735
18737
|
case 3:
|
|
18736
18738
|
return oe;
|
|
18737
18739
|
case 4: {
|
|
18738
|
-
const
|
|
18739
|
-
return
|
|
18740
|
+
const se = M.path.slice(1);
|
|
18741
|
+
return se ? f(H || C) && !f(se) ? "./" + se + oe : se + oe : oe || ".";
|
|
18740
18742
|
}
|
|
18741
18743
|
case 5:
|
|
18742
18744
|
return M.path + oe;
|
|
@@ -18744,7 +18746,7 @@ var Tt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
18744
18746
|
return M.scheme + "//" + M.user + M.host + M.port + M.path + oe;
|
|
18745
18747
|
}
|
|
18746
18748
|
}
|
|
18747
|
-
return
|
|
18749
|
+
return z;
|
|
18748
18750
|
});
|
|
18749
18751
|
})(ju);
|
|
18750
18752
|
var nr = class {
|
|
@@ -18816,8 +18818,8 @@ function Ju(t, e, n, s, i, o, c, u, h) {
|
|
|
18816
18818
|
} = e, T = Qu(f, n), L = el(T, s);
|
|
18817
18819
|
if (!i)
|
|
18818
18820
|
return nl(T, L) ? void 0 : Gi(T, L, [s]);
|
|
18819
|
-
const O = qu(m, i),
|
|
18820
|
-
if (O === g.length && (g[O] = null), !sl(T, L, O, o, c,
|
|
18821
|
+
const O = qu(m, i), q = da;
|
|
18822
|
+
if (O === g.length && (g[O] = null), !sl(T, L, O, o, c, q))
|
|
18821
18823
|
return Gi(
|
|
18822
18824
|
T,
|
|
18823
18825
|
L,
|
|
@@ -18866,8 +18868,8 @@ function rl({ code: t, mappings: e }, n, s, i, o) {
|
|
|
18866
18868
|
f !== g && sr(u, m, 0, n, m, 0);
|
|
18867
18869
|
for (let O = 0; O < t.length; O++) {
|
|
18868
18870
|
if (O === f) {
|
|
18869
|
-
const
|
|
18870
|
-
for (sr(u, m,
|
|
18871
|
+
const q = f - g, z = c[h];
|
|
18872
|
+
for (sr(u, m, q, n, m, z); (f === O || f === void 0) && h < e.length - 1; )
|
|
18871
18873
|
h++, f = e[h];
|
|
18872
18874
|
}
|
|
18873
18875
|
t.charCodeAt(O) === p.lineFeed && (m++, g = O + 1, f !== g && sr(u, m, 0, n, m, 0));
|
|
@@ -19250,8 +19252,8 @@ var hl = (
|
|
|
19250
19252
|
}
|
|
19251
19253
|
return S.prototype.getChecker = function(A, I, D) {
|
|
19252
19254
|
var W = this, Z = o(A, this.name), ce = Z.getChecker(A, I, D);
|
|
19253
|
-
return Z instanceof F || Z instanceof S ? ce : function(ge,
|
|
19254
|
-
return ce(ge,
|
|
19255
|
+
return Z instanceof F || Z instanceof S ? ce : function(ge, me) {
|
|
19256
|
+
return ce(ge, me) ? !0 : me.fail(null, W._failMsg, 0);
|
|
19255
19257
|
};
|
|
19256
19258
|
}, S;
|
|
19257
19259
|
}(s)
|
|
@@ -19329,8 +19331,8 @@ var hl = (
|
|
|
19329
19331
|
if (!Array.isArray(Z))
|
|
19330
19332
|
return ce.fail(null, "is not an array", 0);
|
|
19331
19333
|
for (var ge = 0; ge < D.length; ge++) {
|
|
19332
|
-
var
|
|
19333
|
-
if (!
|
|
19334
|
+
var me = D[ge](Z[ge], ce);
|
|
19335
|
+
if (!me)
|
|
19334
19336
|
return ce.fail(ge, null, 1);
|
|
19335
19337
|
}
|
|
19336
19338
|
return !0;
|
|
@@ -19369,8 +19371,8 @@ var hl = (
|
|
|
19369
19371
|
return Z.getChecker(A, I);
|
|
19370
19372
|
});
|
|
19371
19373
|
return function(Z, ce) {
|
|
19372
|
-
for (var ge = ce.unionResolver(),
|
|
19373
|
-
var Se = W[
|
|
19374
|
+
for (var ge = ce.unionResolver(), me = 0; me < W.length; me++) {
|
|
19375
|
+
var Se = W[me](Z, ge.createContext());
|
|
19374
19376
|
if (Se)
|
|
19375
19377
|
return !0;
|
|
19376
19378
|
}
|
|
@@ -19380,15 +19382,15 @@ var hl = (
|
|
|
19380
19382
|
}(s)
|
|
19381
19383
|
);
|
|
19382
19384
|
t.TUnion = O;
|
|
19383
|
-
function
|
|
19385
|
+
function q() {
|
|
19384
19386
|
for (var k = [], S = 0; S < arguments.length; S++)
|
|
19385
19387
|
k[S] = arguments[S];
|
|
19386
|
-
return new
|
|
19388
|
+
return new z(k.map(function(A) {
|
|
19387
19389
|
return i(A);
|
|
19388
19390
|
}));
|
|
19389
19391
|
}
|
|
19390
|
-
t.intersection =
|
|
19391
|
-
var
|
|
19392
|
+
t.intersection = q;
|
|
19393
|
+
var z = (
|
|
19392
19394
|
/** @class */
|
|
19393
19395
|
function(k) {
|
|
19394
19396
|
e(S, k);
|
|
@@ -19401,20 +19403,20 @@ var hl = (
|
|
|
19401
19403
|
return Z.getChecker(A, I, D);
|
|
19402
19404
|
});
|
|
19403
19405
|
return function(Z, ce) {
|
|
19404
|
-
var ge = W.every(function(
|
|
19405
|
-
return
|
|
19406
|
+
var ge = W.every(function(me) {
|
|
19407
|
+
return me(Z, ce);
|
|
19406
19408
|
});
|
|
19407
19409
|
return ge ? !0 : ce.fail(null, null, 0);
|
|
19408
19410
|
};
|
|
19409
19411
|
}, S;
|
|
19410
19412
|
}(s)
|
|
19411
19413
|
);
|
|
19412
|
-
t.TIntersection =
|
|
19413
|
-
function
|
|
19414
|
-
return new
|
|
19414
|
+
t.TIntersection = z;
|
|
19415
|
+
function C(k) {
|
|
19416
|
+
return new H(k);
|
|
19415
19417
|
}
|
|
19416
|
-
t.enumtype =
|
|
19417
|
-
var
|
|
19418
|
+
t.enumtype = C;
|
|
19419
|
+
var H = (
|
|
19418
19420
|
/** @class */
|
|
19419
19421
|
function(k) {
|
|
19420
19422
|
e(S, k);
|
|
@@ -19432,12 +19434,12 @@ var hl = (
|
|
|
19432
19434
|
}, S;
|
|
19433
19435
|
}(s)
|
|
19434
19436
|
);
|
|
19435
|
-
t.TEnumType =
|
|
19437
|
+
t.TEnumType = H;
|
|
19436
19438
|
function M(k, S) {
|
|
19437
|
-
return new
|
|
19439
|
+
return new J(k, S);
|
|
19438
19440
|
}
|
|
19439
19441
|
t.enumlit = M;
|
|
19440
|
-
var
|
|
19442
|
+
var J = (
|
|
19441
19443
|
/** @class */
|
|
19442
19444
|
function(k) {
|
|
19443
19445
|
e(S, k);
|
|
@@ -19447,7 +19449,7 @@ var hl = (
|
|
|
19447
19449
|
}
|
|
19448
19450
|
return S.prototype.getChecker = function(A, I) {
|
|
19449
19451
|
var D = this, W = o(A, this.enumName);
|
|
19450
|
-
if (!(W instanceof
|
|
19452
|
+
if (!(W instanceof H))
|
|
19451
19453
|
throw new Error("Type " + this.enumName + " used in enumlit is not an enum type");
|
|
19452
19454
|
var Z = W.members[this.prop];
|
|
19453
19455
|
if (!W.members.hasOwnProperty(this.prop))
|
|
@@ -19458,20 +19460,20 @@ var hl = (
|
|
|
19458
19460
|
}, S;
|
|
19459
19461
|
}(s)
|
|
19460
19462
|
);
|
|
19461
|
-
t.TEnumLiteral =
|
|
19463
|
+
t.TEnumLiteral = J;
|
|
19462
19464
|
function oe(k) {
|
|
19463
19465
|
return Object.keys(k).map(function(S) {
|
|
19464
|
-
return
|
|
19466
|
+
return se(S, k[S]);
|
|
19465
19467
|
});
|
|
19466
19468
|
}
|
|
19467
|
-
function
|
|
19469
|
+
function se(k, S) {
|
|
19468
19470
|
return S instanceof b ? new v(k, S.ttype, !0) : new v(k, i(S), !1);
|
|
19469
19471
|
}
|
|
19470
|
-
function
|
|
19471
|
-
return new
|
|
19472
|
+
function K(k, S) {
|
|
19473
|
+
return new he(k, oe(S));
|
|
19472
19474
|
}
|
|
19473
|
-
t.iface =
|
|
19474
|
-
var
|
|
19475
|
+
t.iface = K;
|
|
19476
|
+
var he = (
|
|
19475
19477
|
/** @class */
|
|
19476
19478
|
function(k) {
|
|
19477
19479
|
e(S, k);
|
|
@@ -19486,7 +19488,7 @@ var hl = (
|
|
|
19486
19488
|
return o(A, ke).getChecker(A, I);
|
|
19487
19489
|
}), ce = this.props.map(function(ke) {
|
|
19488
19490
|
return ke.ttype.getChecker(A, I);
|
|
19489
|
-
}), ge = new n.NoopContext(),
|
|
19491
|
+
}), ge = new n.NoopContext(), me = this.props.map(function(ke, Ae) {
|
|
19490
19492
|
return !ke.isOpt && !ce[Ae](void 0, ge);
|
|
19491
19493
|
}), Se = function(ke, Ae) {
|
|
19492
19494
|
if (typeof ke != "object" || ke === null)
|
|
@@ -19497,7 +19499,7 @@ var hl = (
|
|
|
19497
19499
|
for (var Re = 0; Re < ce.length; Re++) {
|
|
19498
19500
|
var _t = W.props[Re].name, Lt = ke[_t];
|
|
19499
19501
|
if (Lt === void 0) {
|
|
19500
|
-
if (
|
|
19502
|
+
if (me[Re])
|
|
19501
19503
|
return Ae.fail(_t, "is missing", 1);
|
|
19502
19504
|
} else {
|
|
19503
19505
|
var Ht = ce[Re](Lt, Ae);
|
|
@@ -19523,7 +19525,7 @@ var hl = (
|
|
|
19523
19525
|
}, S;
|
|
19524
19526
|
}(s)
|
|
19525
19527
|
);
|
|
19526
|
-
t.TIface =
|
|
19528
|
+
t.TIface = he;
|
|
19527
19529
|
function _(k) {
|
|
19528
19530
|
return new b(i(k));
|
|
19529
19531
|
}
|
|
@@ -19600,28 +19602,28 @@ var hl = (
|
|
|
19600
19602
|
return I.params = A, I;
|
|
19601
19603
|
}
|
|
19602
19604
|
return S.prototype.getChecker = function(A, I) {
|
|
19603
|
-
var D = this, W = this.params.map(function(
|
|
19604
|
-
return
|
|
19605
|
-
}), Z = new n.NoopContext(), ce = this.params.map(function(
|
|
19606
|
-
return !
|
|
19607
|
-
}), ge = function(
|
|
19608
|
-
if (!Array.isArray(
|
|
19605
|
+
var D = this, W = this.params.map(function(me) {
|
|
19606
|
+
return me.ttype.getChecker(A, I);
|
|
19607
|
+
}), Z = new n.NoopContext(), ce = this.params.map(function(me, Se) {
|
|
19608
|
+
return !me.isOpt && !W[Se](void 0, Z);
|
|
19609
|
+
}), ge = function(me, Se) {
|
|
19610
|
+
if (!Array.isArray(me))
|
|
19609
19611
|
return Se.fail(null, "is not an array", 0);
|
|
19610
19612
|
for (var Le = 0; Le < W.length; Le++) {
|
|
19611
19613
|
var ke = D.params[Le];
|
|
19612
|
-
if (
|
|
19614
|
+
if (me[Le] === void 0) {
|
|
19613
19615
|
if (ce[Le])
|
|
19614
19616
|
return Se.fail(ke.name, "is missing", 1);
|
|
19615
19617
|
} else {
|
|
19616
|
-
var Ae = W[Le](
|
|
19618
|
+
var Ae = W[Le](me[Le], Se);
|
|
19617
19619
|
if (!Ae)
|
|
19618
19620
|
return Se.fail(ke.name, null, 1);
|
|
19619
19621
|
}
|
|
19620
19622
|
}
|
|
19621
19623
|
return !0;
|
|
19622
19624
|
};
|
|
19623
|
-
return I ? function(
|
|
19624
|
-
return ge(
|
|
19625
|
+
return I ? function(me, Se) {
|
|
19626
|
+
return ge(me, Se) ? me.length <= W.length ? !0 : Se.fail(W.length, "is extraneous", 2) : !1;
|
|
19625
19627
|
} : ge;
|
|
19626
19628
|
}, S;
|
|
19627
19629
|
}(s)
|
|
@@ -19674,11 +19676,11 @@ var hl = (
|
|
|
19674
19676
|
never: new F(function(k) {
|
|
19675
19677
|
return !1;
|
|
19676
19678
|
}, "is unexpected"),
|
|
19677
|
-
Date: new F(
|
|
19678
|
-
RegExp: new F(
|
|
19679
|
+
Date: new F(j("[object Date]"), "is not a Date"),
|
|
19680
|
+
RegExp: new F(j("[object RegExp]"), "is not a RegExp")
|
|
19679
19681
|
};
|
|
19680
19682
|
var B = Object.prototype.toString;
|
|
19681
|
-
function
|
|
19683
|
+
function j(k) {
|
|
19682
19684
|
return function(S) {
|
|
19683
19685
|
return typeof S == "object" && S && B.call(S) === k;
|
|
19684
19686
|
};
|
|
@@ -19686,7 +19688,7 @@ var hl = (
|
|
|
19686
19688
|
typeof Buffer < "u" && (t.basicTypes.Buffer = new F(function(k) {
|
|
19687
19689
|
return Buffer.isBuffer(k);
|
|
19688
19690
|
}, "is not a Buffer"));
|
|
19689
|
-
for (var
|
|
19691
|
+
for (var Y = function(k) {
|
|
19690
19692
|
t.basicTypes[k.name] = new F(function(S) {
|
|
19691
19693
|
return S instanceof k;
|
|
19692
19694
|
}, "is not a " + k.name);
|
|
@@ -19703,7 +19705,7 @@ var hl = (
|
|
|
19703
19705
|
ArrayBuffer
|
|
19704
19706
|
]; ue < ae.length; ue++) {
|
|
19705
19707
|
var ie = ae[ue];
|
|
19706
|
-
|
|
19708
|
+
Y(ie);
|
|
19707
19709
|
}
|
|
19708
19710
|
})(mr);
|
|
19709
19711
|
(function(t) {
|
|
@@ -19781,9 +19783,9 @@ var hl = (
|
|
|
19781
19783
|
for (var h = [], f = 0; f < arguments.length; f++)
|
|
19782
19784
|
h[f] = arguments[f];
|
|
19783
19785
|
for (var m = Object.assign.apply(Object, e([{}, n.basicTypes], h)), g = {}, x = 0, T = h; x < T.length; x++)
|
|
19784
|
-
for (var L = T[x], O = 0,
|
|
19785
|
-
var
|
|
19786
|
-
g[
|
|
19786
|
+
for (var L = T[x], O = 0, q = Object.keys(L); O < q.length; O++) {
|
|
19787
|
+
var z = q[O];
|
|
19788
|
+
g[z] = new u(m, L[z]);
|
|
19787
19789
|
}
|
|
19788
19790
|
return g;
|
|
19789
19791
|
}
|
|
@@ -19897,10 +19899,10 @@ function ba(t) {
|
|
|
19897
19899
|
E(), Wn(t);
|
|
19898
19900
|
}
|
|
19899
19901
|
function bt(t) {
|
|
19900
|
-
|
|
19902
|
+
Q(), Or(t);
|
|
19901
19903
|
}
|
|
19902
19904
|
function Ln() {
|
|
19903
|
-
|
|
19905
|
+
Q(), a.tokens[a.tokens.length - 1].identifierRole = G.ImportDeclaration;
|
|
19904
19906
|
}
|
|
19905
19907
|
function Or(t) {
|
|
19906
19908
|
let e;
|
|
@@ -19910,7 +19912,7 @@ function Wn(t) {
|
|
|
19910
19912
|
switch (a.type) {
|
|
19911
19913
|
case r._this: {
|
|
19912
19914
|
const e = re(0);
|
|
19913
|
-
E(),
|
|
19915
|
+
E(), ne(e);
|
|
19914
19916
|
return;
|
|
19915
19917
|
}
|
|
19916
19918
|
case r._yield:
|
|
@@ -19931,7 +19933,7 @@ function Wn(t) {
|
|
|
19931
19933
|
Zr(!0, t);
|
|
19932
19934
|
return;
|
|
19933
19935
|
default:
|
|
19934
|
-
|
|
19936
|
+
te();
|
|
19935
19937
|
}
|
|
19936
19938
|
}
|
|
19937
19939
|
function $r(t, e, n = !1, s = !1, i = 0) {
|
|
@@ -20020,8 +20022,8 @@ function ka(t) {
|
|
|
20020
20022
|
return null;
|
|
20021
20023
|
}
|
|
20022
20024
|
function fn() {
|
|
20023
|
-
for (
|
|
20024
|
-
|
|
20025
|
+
for (Q(); y(r.dot); )
|
|
20026
|
+
Q();
|
|
20025
20027
|
}
|
|
20026
20028
|
function vl() {
|
|
20027
20029
|
fn(), !De() && l(r.lessThan) && Vt();
|
|
@@ -20041,16 +20043,16 @@ function va() {
|
|
|
20041
20043
|
function Sl() {
|
|
20042
20044
|
y(r._const);
|
|
20043
20045
|
const t = y(r._in), e = xe(d._out);
|
|
20044
|
-
y(r._const), (t || e) && !l(r.name) ? a.tokens[a.tokens.length - 1].type = r.name :
|
|
20046
|
+
y(r._const), (t || e) && !l(r.name) ? a.tokens[a.tokens.length - 1].type = r.name : Q(), y(r._extends) && ye(), y(r.eq) && ye();
|
|
20045
20047
|
}
|
|
20046
20048
|
function Pt() {
|
|
20047
20049
|
l(r.lessThan) && Gn();
|
|
20048
20050
|
}
|
|
20049
20051
|
function Gn() {
|
|
20050
20052
|
const t = re(0);
|
|
20051
|
-
for (l(r.lessThan) || l(r.typeParameterStart) ? E() :
|
|
20053
|
+
for (l(r.lessThan) || l(r.typeParameterStart) ? E() : te(); !y(r.greaterThan) && !a.error; )
|
|
20052
20054
|
Sl(), y(r.comma);
|
|
20053
|
-
|
|
20055
|
+
ne(t);
|
|
20054
20056
|
}
|
|
20055
20057
|
function Vr(t) {
|
|
20056
20058
|
const e = t === r.arrow;
|
|
@@ -20078,7 +20080,7 @@ function wa() {
|
|
|
20078
20080
|
if (!(l(r.bracketL) && Il()))
|
|
20079
20081
|
return !1;
|
|
20080
20082
|
const t = re(0);
|
|
20081
|
-
return w(r.bracketL),
|
|
20083
|
+
return w(r.bracketL), Q(), hn(), w(r.bracketR), jt(), Un(), ne(t), !0;
|
|
20082
20084
|
}
|
|
20083
20085
|
function Zi(t) {
|
|
20084
20086
|
y(r.question), !t && (l(r.parenL) || l(r.lessThan)) ? (Vr(r.colon), Un()) : (jt(), Un());
|
|
@@ -20093,7 +20095,7 @@ function Al() {
|
|
|
20093
20095
|
return;
|
|
20094
20096
|
}
|
|
20095
20097
|
const t = !!ka([d._readonly]);
|
|
20096
|
-
wa() || ((
|
|
20098
|
+
wa() || ((V(d._get) || V(d._set)) && ya(), sn(
|
|
20097
20099
|
-1
|
|
20098
20100
|
/* Types don't need context IDs. */
|
|
20099
20101
|
), Zi(t));
|
|
@@ -20110,10 +20112,10 @@ function Cl() {
|
|
|
20110
20112
|
return a.restoreFromSnapshot(t), e;
|
|
20111
20113
|
}
|
|
20112
20114
|
function Pl() {
|
|
20113
|
-
return E(), y(r.plus) || y(r.minus) ?
|
|
20115
|
+
return E(), y(r.plus) || y(r.minus) ? V(d._readonly) : (V(d._readonly) && E(), !l(r.bracketL) || (E(), !pr()) ? !1 : (E(), l(r._in)));
|
|
20114
20116
|
}
|
|
20115
20117
|
function Dl() {
|
|
20116
|
-
|
|
20118
|
+
Q(), w(r._in), ye();
|
|
20117
20119
|
}
|
|
20118
20120
|
function Ll() {
|
|
20119
20121
|
w(r.braceL), l(r.plus) || l(r.minus) ? (E(), ve(d._readonly)) : xe(d._readonly), w(r.bracketL), Dl(), xe(d._as) && ye(), w(r.bracketR), l(r.plus) || l(r.minus) ? (E(), w(r.question)) : y(r.question), Gl(), be(), w(r.braceR);
|
|
@@ -20167,7 +20169,7 @@ function Bl() {
|
|
|
20167
20169
|
E(), $t();
|
|
20168
20170
|
return;
|
|
20169
20171
|
case r._this: {
|
|
20170
|
-
xl(),
|
|
20172
|
+
xl(), V(d._is) && !De() && wl();
|
|
20171
20173
|
return;
|
|
20172
20174
|
}
|
|
20173
20175
|
case r._typeof:
|
|
@@ -20195,14 +20197,14 @@ function Bl() {
|
|
|
20195
20197
|
}
|
|
20196
20198
|
break;
|
|
20197
20199
|
}
|
|
20198
|
-
|
|
20200
|
+
te();
|
|
20199
20201
|
}
|
|
20200
20202
|
function Ol() {
|
|
20201
20203
|
for (Bl(); !De() && y(r.bracketL); )
|
|
20202
20204
|
y(r.bracketR) || (ye(), w(r.bracketR));
|
|
20203
20205
|
}
|
|
20204
20206
|
function $l() {
|
|
20205
|
-
if (ve(d._infer),
|
|
20207
|
+
if (ve(d._infer), Q(), l(r._extends)) {
|
|
20206
20208
|
const t = a.snapshot();
|
|
20207
20209
|
w(r._extends);
|
|
20208
20210
|
const e = a.inDisallowConditionalTypesContext;
|
|
@@ -20210,9 +20212,9 @@ function $l() {
|
|
|
20210
20212
|
}
|
|
20211
20213
|
}
|
|
20212
20214
|
function gr() {
|
|
20213
|
-
if (
|
|
20215
|
+
if (V(d._keyof) || V(d._unique) || V(d._readonly))
|
|
20214
20216
|
E(), gr();
|
|
20215
|
-
else if (
|
|
20217
|
+
else if (V(d._infer))
|
|
20216
20218
|
$l();
|
|
20217
20219
|
else {
|
|
20218
20220
|
const t = a.inDisallowConditionalTypesContext;
|
|
@@ -20252,7 +20254,7 @@ function Xl() {
|
|
|
20252
20254
|
}
|
|
20253
20255
|
function nn(t) {
|
|
20254
20256
|
const e = re(0);
|
|
20255
|
-
w(t), Yl() || ye(),
|
|
20257
|
+
w(t), Yl() || ye(), ne(e);
|
|
20256
20258
|
}
|
|
20257
20259
|
function Wl() {
|
|
20258
20260
|
l(r.colon) && nn(r.colon);
|
|
@@ -20265,11 +20267,11 @@ function Gl() {
|
|
|
20265
20267
|
}
|
|
20266
20268
|
function Yl() {
|
|
20267
20269
|
const t = a.snapshot();
|
|
20268
|
-
return
|
|
20270
|
+
return V(d._asserts) ? (E(), xe(d._is) ? (ye(), !0) : pr() || l(r._this) ? (E(), xe(d._is) && ye(), !0) : (a.restoreFromSnapshot(t), !1)) : pr() || l(r._this) ? (E(), V(d._is) && !De() ? (E(), ye(), !0) : (a.restoreFromSnapshot(t), !1)) : !1;
|
|
20269
20271
|
}
|
|
20270
20272
|
function hn() {
|
|
20271
20273
|
const t = re(0);
|
|
20272
|
-
w(r.colon), ye(),
|
|
20274
|
+
w(r.colon), ye(), ne(t);
|
|
20273
20275
|
}
|
|
20274
20276
|
function ye() {
|
|
20275
20277
|
if (Qi(), a.inDisallowConditionalTypesContext || De() || !y(r._extends))
|
|
@@ -20278,7 +20280,7 @@ function ye() {
|
|
|
20278
20280
|
a.inDisallowConditionalTypesContext = !0, Qi(), a.inDisallowConditionalTypesContext = t, w(r.question), ye(), w(r.colon), ye();
|
|
20279
20281
|
}
|
|
20280
20282
|
function zl() {
|
|
20281
|
-
return
|
|
20283
|
+
return V(d._abstract) && _e() === r._new;
|
|
20282
20284
|
}
|
|
20283
20285
|
function Qi() {
|
|
20284
20286
|
if (Vl()) {
|
|
@@ -20296,7 +20298,7 @@ function Qi() {
|
|
|
20296
20298
|
}
|
|
20297
20299
|
function Kl() {
|
|
20298
20300
|
const t = re(1);
|
|
20299
|
-
ye(), w(r.greaterThan),
|
|
20301
|
+
ye(), w(r.greaterThan), ne(t), dn();
|
|
20300
20302
|
}
|
|
20301
20303
|
function Zl() {
|
|
20302
20304
|
if (y(r.jsxTagStart)) {
|
|
@@ -20304,7 +20306,7 @@ function Zl() {
|
|
|
20304
20306
|
const t = re(1);
|
|
20305
20307
|
for (; !l(r.greaterThan) && !a.error; )
|
|
20306
20308
|
ye(), y(r.comma);
|
|
20307
|
-
je(),
|
|
20309
|
+
je(), ne(t);
|
|
20308
20310
|
}
|
|
20309
20311
|
}
|
|
20310
20312
|
function Ea() {
|
|
@@ -20321,7 +20323,7 @@ function ef() {
|
|
|
20321
20323
|
bt(!1), Pt(), w(r.eq), ye(), be();
|
|
20322
20324
|
}
|
|
20323
20325
|
function tf() {
|
|
20324
|
-
if (l(r.string) ? $t() :
|
|
20326
|
+
if (l(r.string) ? $t() : Q(), y(r.eq)) {
|
|
20325
20327
|
const t = a.tokens.length - 1;
|
|
20326
20328
|
Ie(), a.tokens[t].rhsEndIndex = a.tokens.length;
|
|
20327
20329
|
}
|
|
@@ -20340,19 +20342,19 @@ function br() {
|
|
|
20340
20342
|
bt(!1), y(r.dot) ? br() : Hr();
|
|
20341
20343
|
}
|
|
20342
20344
|
function Sa() {
|
|
20343
|
-
|
|
20345
|
+
V(d._global) ? Q() : l(r.string) ? at() : te(), l(r.braceL) ? Hr() : be();
|
|
20344
20346
|
}
|
|
20345
20347
|
function _r() {
|
|
20346
20348
|
Ln(), w(r.eq), sf(), be();
|
|
20347
20349
|
}
|
|
20348
20350
|
function nf() {
|
|
20349
|
-
return
|
|
20351
|
+
return V(d._require) && _e() === r.parenL;
|
|
20350
20352
|
}
|
|
20351
20353
|
function sf() {
|
|
20352
20354
|
nf() ? rf() : fn();
|
|
20353
20355
|
}
|
|
20354
20356
|
function rf() {
|
|
20355
|
-
ve(d._require), w(r.parenL), l(r.string) ||
|
|
20357
|
+
ve(d._require), w(r.parenL), l(r.string) || te(), $t(), w(r.parenR);
|
|
20356
20358
|
}
|
|
20357
20359
|
function of() {
|
|
20358
20360
|
if (Qe())
|
|
@@ -20366,7 +20368,7 @@ function of() {
|
|
|
20366
20368
|
e,
|
|
20367
20369
|
/* isStatement */
|
|
20368
20370
|
!0
|
|
20369
|
-
),
|
|
20371
|
+
), ne(t), !0;
|
|
20370
20372
|
}
|
|
20371
20373
|
case r._class: {
|
|
20372
20374
|
const t = re(1);
|
|
@@ -20375,17 +20377,17 @@ function of() {
|
|
|
20375
20377
|
!0,
|
|
20376
20378
|
/* optionalId */
|
|
20377
20379
|
!1
|
|
20378
|
-
),
|
|
20380
|
+
), ne(t), !0;
|
|
20379
20381
|
}
|
|
20380
20382
|
case r._const:
|
|
20381
20383
|
if (l(r._const) && Nr(d._enum)) {
|
|
20382
20384
|
const t = re(1);
|
|
20383
|
-
return w(r._const), ve(d._enum), a.tokens[a.tokens.length - 1].type = r._enum, qr(),
|
|
20385
|
+
return w(r._const), ve(d._enum), a.tokens[a.tokens.length - 1].type = r._enum, qr(), ne(t), !0;
|
|
20384
20386
|
}
|
|
20385
20387
|
case r._var:
|
|
20386
20388
|
case r._let: {
|
|
20387
20389
|
const t = re(1);
|
|
20388
|
-
return xn(a.type !== r._var),
|
|
20390
|
+
return xn(a.type !== r._var), ne(t), !0;
|
|
20389
20391
|
}
|
|
20390
20392
|
case r.name: {
|
|
20391
20393
|
const t = re(1), e = a.contextualKeyword;
|
|
@@ -20394,7 +20396,7 @@ function of() {
|
|
|
20394
20396
|
e,
|
|
20395
20397
|
/* isBeforeToken */
|
|
20396
20398
|
!0
|
|
20397
|
-
),
|
|
20399
|
+
), ne(t), n;
|
|
20398
20400
|
}
|
|
20399
20401
|
default:
|
|
20400
20402
|
return !1;
|
|
@@ -20446,30 +20448,30 @@ function Yn(t, e) {
|
|
|
20446
20448
|
case d._interface:
|
|
20447
20449
|
if (Ft(e) && l(r.name)) {
|
|
20448
20450
|
const n = re(e ? 2 : 1);
|
|
20449
|
-
return Ql(),
|
|
20451
|
+
return Ql(), ne(n), !0;
|
|
20450
20452
|
}
|
|
20451
20453
|
break;
|
|
20452
20454
|
case d._module:
|
|
20453
20455
|
if (Ft(e)) {
|
|
20454
20456
|
if (l(r.string)) {
|
|
20455
20457
|
const n = re(e ? 2 : 1);
|
|
20456
|
-
return Sa(),
|
|
20458
|
+
return Sa(), ne(n), !0;
|
|
20457
20459
|
} else if (l(r.name)) {
|
|
20458
20460
|
const n = re(e ? 2 : 1);
|
|
20459
|
-
return br(),
|
|
20461
|
+
return br(), ne(n), !0;
|
|
20460
20462
|
}
|
|
20461
20463
|
}
|
|
20462
20464
|
break;
|
|
20463
20465
|
case d._namespace:
|
|
20464
20466
|
if (Ft(e) && l(r.name)) {
|
|
20465
20467
|
const n = re(e ? 2 : 1);
|
|
20466
|
-
return br(),
|
|
20468
|
+
return br(), ne(n), !0;
|
|
20467
20469
|
}
|
|
20468
20470
|
break;
|
|
20469
20471
|
case d._type:
|
|
20470
20472
|
if (Ft(e) && l(r.name)) {
|
|
20471
20473
|
const n = re(e ? 2 : 1);
|
|
20472
|
-
return ef(),
|
|
20474
|
+
return ef(), ne(n), !0;
|
|
20473
20475
|
}
|
|
20474
20476
|
break;
|
|
20475
20477
|
}
|
|
@@ -20483,13 +20485,13 @@ function cf() {
|
|
|
20483
20485
|
return Gn(), qt(), Wl(), w(r.arrow), a.error ? (a.restoreFromSnapshot(t), !1) : (mn(!0), !0);
|
|
20484
20486
|
}
|
|
20485
20487
|
function Xr() {
|
|
20486
|
-
a.type === r.bitShiftL && (a.pos -= 1,
|
|
20488
|
+
a.type === r.bitShiftL && (a.pos -= 1, ee(r.lessThan)), Vt();
|
|
20487
20489
|
}
|
|
20488
20490
|
function Vt() {
|
|
20489
20491
|
const t = re(0);
|
|
20490
20492
|
for (w(r.lessThan); !l(r.greaterThan) && !a.error; )
|
|
20491
20493
|
ye(), y(r.comma);
|
|
20492
|
-
t ? (w(r.greaterThan),
|
|
20494
|
+
t ? (w(r.greaterThan), ne(t)) : (ne(t), ia(), w(r.greaterThan), a.tokens[a.tokens.length - 1].isType = !0);
|
|
20493
20495
|
}
|
|
20494
20496
|
function Ta() {
|
|
20495
20497
|
if (l(r.name))
|
|
@@ -20529,7 +20531,7 @@ function lf(t, e, n) {
|
|
|
20529
20531
|
// cause us to bail out.
|
|
20530
20532
|
// a<b>>c is not (a<b>)>c, but a<(b>>c)
|
|
20531
20533
|
(a.type === r.greaterThan || // a<b>c is (a<b)>c
|
|
20532
|
-
a.type !== r.parenL && a.type & r.IS_EXPRESSION_START && !De()) &&
|
|
20534
|
+
a.type !== r.parenL && a.type & r.IS_EXPRESSION_START && !De()) && te()
|
|
20533
20535
|
), a.error)
|
|
20534
20536
|
a.restoreFromSnapshot(s);
|
|
20535
20537
|
else
|
|
@@ -20539,53 +20541,53 @@ function lf(t, e, n) {
|
|
|
20539
20541
|
}
|
|
20540
20542
|
function ff() {
|
|
20541
20543
|
if (y(r._import))
|
|
20542
|
-
return
|
|
20544
|
+
return V(d._type) && _e() !== r.eq && ve(d._type), _r(), !0;
|
|
20543
20545
|
if (y(r.eq))
|
|
20544
20546
|
return Te(), be(), !0;
|
|
20545
20547
|
if (xe(d._as))
|
|
20546
|
-
return ve(d._namespace),
|
|
20547
|
-
if (
|
|
20548
|
+
return ve(d._namespace), Q(), be(), !0;
|
|
20549
|
+
if (V(d._type)) {
|
|
20548
20550
|
const t = _e();
|
|
20549
20551
|
(t === r.braceL || t === r.star) && E();
|
|
20550
20552
|
}
|
|
20551
20553
|
return !1;
|
|
20552
20554
|
}
|
|
20553
20555
|
function hf() {
|
|
20554
|
-
if (
|
|
20556
|
+
if (Q(), l(r.comma) || l(r.braceR)) {
|
|
20555
20557
|
a.tokens[a.tokens.length - 1].identifierRole = G.ImportDeclaration;
|
|
20556
20558
|
return;
|
|
20557
20559
|
}
|
|
20558
|
-
if (
|
|
20560
|
+
if (Q(), l(r.comma) || l(r.braceR)) {
|
|
20559
20561
|
a.tokens[a.tokens.length - 1].identifierRole = G.ImportDeclaration, a.tokens[a.tokens.length - 2].isType = !0, a.tokens[a.tokens.length - 1].isType = !0;
|
|
20560
20562
|
return;
|
|
20561
20563
|
}
|
|
20562
|
-
if (
|
|
20564
|
+
if (Q(), l(r.comma) || l(r.braceR)) {
|
|
20563
20565
|
a.tokens[a.tokens.length - 3].identifierRole = G.ImportAccess, a.tokens[a.tokens.length - 1].identifierRole = G.ImportDeclaration;
|
|
20564
20566
|
return;
|
|
20565
20567
|
}
|
|
20566
|
-
|
|
20568
|
+
Q(), a.tokens[a.tokens.length - 3].identifierRole = G.ImportAccess, a.tokens[a.tokens.length - 1].identifierRole = G.ImportDeclaration, a.tokens[a.tokens.length - 4].isType = !0, a.tokens[a.tokens.length - 3].isType = !0, a.tokens[a.tokens.length - 2].isType = !0, a.tokens[a.tokens.length - 1].isType = !0;
|
|
20567
20569
|
}
|
|
20568
20570
|
function df() {
|
|
20569
|
-
if (
|
|
20571
|
+
if (Q(), l(r.comma) || l(r.braceR)) {
|
|
20570
20572
|
a.tokens[a.tokens.length - 1].identifierRole = G.ExportAccess;
|
|
20571
20573
|
return;
|
|
20572
20574
|
}
|
|
20573
|
-
if (
|
|
20575
|
+
if (Q(), l(r.comma) || l(r.braceR)) {
|
|
20574
20576
|
a.tokens[a.tokens.length - 1].identifierRole = G.ExportAccess, a.tokens[a.tokens.length - 2].isType = !0, a.tokens[a.tokens.length - 1].isType = !0;
|
|
20575
20577
|
return;
|
|
20576
20578
|
}
|
|
20577
|
-
if (
|
|
20579
|
+
if (Q(), l(r.comma) || l(r.braceR)) {
|
|
20578
20580
|
a.tokens[a.tokens.length - 3].identifierRole = G.ExportAccess;
|
|
20579
20581
|
return;
|
|
20580
20582
|
}
|
|
20581
|
-
|
|
20583
|
+
Q(), a.tokens[a.tokens.length - 3].identifierRole = G.ExportAccess, a.tokens[a.tokens.length - 4].isType = !0, a.tokens[a.tokens.length - 3].isType = !0, a.tokens[a.tokens.length - 2].isType = !0, a.tokens[a.tokens.length - 1].isType = !0;
|
|
20582
20584
|
}
|
|
20583
20585
|
function mf() {
|
|
20584
|
-
if (
|
|
20586
|
+
if (V(d._abstract) && _e() === r._class)
|
|
20585
20587
|
return a.type = r._abstract, E(), Rt(!0, !0), !0;
|
|
20586
|
-
if (
|
|
20588
|
+
if (V(d._interface)) {
|
|
20587
20589
|
const t = re(2);
|
|
20588
|
-
return Yn(d._interface, !0),
|
|
20590
|
+
return Yn(d._interface, !0), ne(t), !0;
|
|
20589
20591
|
}
|
|
20590
20592
|
return !1;
|
|
20591
20593
|
}
|
|
@@ -20625,13 +20627,13 @@ function _f() {
|
|
|
20625
20627
|
if (l(r.name))
|
|
20626
20628
|
if (t) {
|
|
20627
20629
|
const n = re(2);
|
|
20628
|
-
e = eo(),
|
|
20630
|
+
e = eo(), ne(n);
|
|
20629
20631
|
} else
|
|
20630
20632
|
e = eo();
|
|
20631
20633
|
if (!e)
|
|
20632
20634
|
if (t) {
|
|
20633
20635
|
const n = re(2);
|
|
20634
|
-
Oe(!0),
|
|
20636
|
+
Oe(!0), ne(n);
|
|
20635
20637
|
} else
|
|
20636
20638
|
Oe(!0);
|
|
20637
20639
|
}
|
|
@@ -20639,7 +20641,7 @@ function yf(t) {
|
|
|
20639
20641
|
if (t && (l(r.lessThan) || l(r.bitShiftL)) && Xr(), xe(d._implements)) {
|
|
20640
20642
|
a.tokens[a.tokens.length - 1].type = r._implements;
|
|
20641
20643
|
const e = re(1);
|
|
20642
|
-
Ea(),
|
|
20644
|
+
Ea(), ne(e);
|
|
20643
20645
|
}
|
|
20644
20646
|
}
|
|
20645
20647
|
function kf() {
|
|
@@ -20650,7 +20652,7 @@ function vf() {
|
|
|
20650
20652
|
}
|
|
20651
20653
|
function wf() {
|
|
20652
20654
|
const t = re(0);
|
|
20653
|
-
De() || y(r.bang), jt(),
|
|
20655
|
+
De() || y(r.bang), jt(), ne(t);
|
|
20654
20656
|
}
|
|
20655
20657
|
function xf() {
|
|
20656
20658
|
l(r.colon) && hn();
|
|
@@ -20667,7 +20669,7 @@ function Sf(t, e) {
|
|
|
20667
20669
|
a.restoreFromSnapshot(n);
|
|
20668
20670
|
else
|
|
20669
20671
|
return s;
|
|
20670
|
-
return a.type = r.typeParameterStart, Gn(), s = tt(t, e), s ||
|
|
20672
|
+
return a.type = r.typeParameterStart, Gn(), s = tt(t, e), s || te(), s;
|
|
20671
20673
|
}
|
|
20672
20674
|
function Tf(t, e) {
|
|
20673
20675
|
if (!l(r.lessThan))
|
|
@@ -20675,7 +20677,7 @@ function Tf(t, e) {
|
|
|
20675
20677
|
const n = a.snapshot();
|
|
20676
20678
|
Gn();
|
|
20677
20679
|
const s = tt(t, e);
|
|
20678
|
-
if (s ||
|
|
20680
|
+
if (s || te(), a.error)
|
|
20679
20681
|
a.restoreFromSnapshot(n);
|
|
20680
20682
|
else
|
|
20681
20683
|
return s;
|
|
@@ -20684,13 +20686,13 @@ function Tf(t, e) {
|
|
|
20684
20686
|
function If() {
|
|
20685
20687
|
if (l(r.colon)) {
|
|
20686
20688
|
const t = a.snapshot();
|
|
20687
|
-
nn(r.colon), Be() &&
|
|
20689
|
+
nn(r.colon), Be() && te(), l(r.arrow) || te(), a.error && a.restoreFromSnapshot(t);
|
|
20688
20690
|
}
|
|
20689
20691
|
return y(r.arrow);
|
|
20690
20692
|
}
|
|
20691
20693
|
function Af() {
|
|
20692
20694
|
const t = re(0);
|
|
20693
|
-
y(r.question), jt(),
|
|
20695
|
+
y(r.question), jt(), ne(t);
|
|
20694
20696
|
}
|
|
20695
20697
|
function Rf() {
|
|
20696
20698
|
(l(r.lessThan) || l(r.bitShiftL)) && Xr(), Wa();
|
|
@@ -20698,21 +20700,21 @@ function Rf() {
|
|
|
20698
20700
|
function Cf() {
|
|
20699
20701
|
let t = !1, e = !1;
|
|
20700
20702
|
for (; ; ) {
|
|
20701
|
-
if (a.pos >=
|
|
20702
|
-
|
|
20703
|
+
if (a.pos >= P.length) {
|
|
20704
|
+
te("Unterminated JSX contents");
|
|
20703
20705
|
return;
|
|
20704
20706
|
}
|
|
20705
|
-
const n =
|
|
20707
|
+
const n = P.charCodeAt(a.pos);
|
|
20706
20708
|
if (n === p.lessThan || n === p.leftCurlyBrace) {
|
|
20707
20709
|
if (a.pos === a.start) {
|
|
20708
20710
|
if (n === p.lessThan) {
|
|
20709
|
-
a.pos++,
|
|
20711
|
+
a.pos++, ee(r.jsxTagStart);
|
|
20710
20712
|
return;
|
|
20711
20713
|
}
|
|
20712
20714
|
oa(n);
|
|
20713
20715
|
return;
|
|
20714
20716
|
}
|
|
20715
|
-
|
|
20717
|
+
ee(t && !e ? r.jsxEmptyText : r.jsxText);
|
|
20716
20718
|
return;
|
|
20717
20719
|
}
|
|
20718
20720
|
n === p.lineFeed ? t = !0 : n !== p.space && n !== p.carriageReturn && n !== p.tab && (e = !0), a.pos++;
|
|
@@ -20720,28 +20722,28 @@ function Cf() {
|
|
|
20720
20722
|
}
|
|
20721
20723
|
function Pf(t) {
|
|
20722
20724
|
for (a.pos++; ; ) {
|
|
20723
|
-
if (a.pos >=
|
|
20724
|
-
|
|
20725
|
+
if (a.pos >= P.length) {
|
|
20726
|
+
te("Unterminated string constant");
|
|
20725
20727
|
return;
|
|
20726
20728
|
}
|
|
20727
|
-
if (
|
|
20729
|
+
if (P.charCodeAt(a.pos) === t) {
|
|
20728
20730
|
a.pos++;
|
|
20729
20731
|
break;
|
|
20730
20732
|
}
|
|
20731
20733
|
a.pos++;
|
|
20732
20734
|
}
|
|
20733
|
-
|
|
20735
|
+
ee(r.string);
|
|
20734
20736
|
}
|
|
20735
20737
|
function Df() {
|
|
20736
20738
|
let t;
|
|
20737
20739
|
do {
|
|
20738
|
-
if (a.pos >
|
|
20739
|
-
|
|
20740
|
+
if (a.pos > P.length) {
|
|
20741
|
+
te("Unexpectedly reached the end of input.");
|
|
20740
20742
|
return;
|
|
20741
20743
|
}
|
|
20742
|
-
t =
|
|
20744
|
+
t = P.charCodeAt(++a.pos);
|
|
20743
20745
|
} while (Ge[t] || t === p.dash);
|
|
20744
|
-
|
|
20746
|
+
ee(r.jsxName);
|
|
20745
20747
|
}
|
|
20746
20748
|
function yr() {
|
|
20747
20749
|
je();
|
|
@@ -20760,7 +20762,7 @@ function Aa() {
|
|
|
20760
20762
|
for (; l(r.dot); )
|
|
20761
20763
|
e = !0, je(), yr();
|
|
20762
20764
|
if (!e) {
|
|
20763
|
-
const n = a.tokens[t], s =
|
|
20765
|
+
const n = a.tokens[t], s = P.charCodeAt(n.start);
|
|
20764
20766
|
s >= p.lowercaseA && s <= p.lowercaseZ && (n.identifierRole = null);
|
|
20765
20767
|
}
|
|
20766
20768
|
}
|
|
@@ -20776,7 +20778,7 @@ function Lf() {
|
|
|
20776
20778
|
je();
|
|
20777
20779
|
return;
|
|
20778
20780
|
default:
|
|
20779
|
-
|
|
20781
|
+
te("JSX value should be either an expression or a quoted JSX text");
|
|
20780
20782
|
}
|
|
20781
20783
|
}
|
|
20782
20784
|
function Ff() {
|
|
@@ -20792,7 +20794,7 @@ function Uf(t) {
|
|
|
20792
20794
|
e = !0, w(r.ellipsis), Ie(), je();
|
|
20793
20795
|
continue;
|
|
20794
20796
|
}
|
|
20795
|
-
e && a.end - a.start === 3 &&
|
|
20797
|
+
e && a.end - a.start === 3 && P.charCodeAt(a.start) === p.lowercaseK && P.charCodeAt(a.start + 1) === p.lowercaseE && P.charCodeAt(a.start + 2) === p.lowercaseY && (a.tokens[t].jsxRole = Xe.KeyAfterPropSpread), Ia(G.ObjectKey), l(r.eq) && (je(), Lf());
|
|
20796
20798
|
}
|
|
20797
20799
|
const n = l(r.slash);
|
|
20798
20800
|
return n && je(), n;
|
|
@@ -20824,7 +20826,7 @@ function Ra() {
|
|
|
20824
20826
|
E(), l(r.ellipsis) ? (Ff(), Ut(), e += 2) : (l(r.braceR) || (e++, Te()), Ut());
|
|
20825
20827
|
break;
|
|
20826
20828
|
default:
|
|
20827
|
-
|
|
20829
|
+
te();
|
|
20828
20830
|
return;
|
|
20829
20831
|
}
|
|
20830
20832
|
}
|
|
@@ -20833,7 +20835,7 @@ function Ca() {
|
|
|
20833
20835
|
}
|
|
20834
20836
|
function je() {
|
|
20835
20837
|
a.tokens.push(new Xn()), sa(), a.start = a.pos;
|
|
20836
|
-
const t =
|
|
20838
|
+
const t = P.charCodeAt(a.pos);
|
|
20837
20839
|
if (un[t])
|
|
20838
20840
|
Df();
|
|
20839
20841
|
else if (t === p.quotationMark || t === p.apostrophe)
|
|
@@ -20841,28 +20843,28 @@ function je() {
|
|
|
20841
20843
|
else
|
|
20842
20844
|
switch (++a.pos, t) {
|
|
20843
20845
|
case p.greaterThan:
|
|
20844
|
-
|
|
20846
|
+
ee(r.jsxTagEnd);
|
|
20845
20847
|
break;
|
|
20846
20848
|
case p.lessThan:
|
|
20847
|
-
|
|
20849
|
+
ee(r.jsxTagStart);
|
|
20848
20850
|
break;
|
|
20849
20851
|
case p.slash:
|
|
20850
|
-
|
|
20852
|
+
ee(r.slash);
|
|
20851
20853
|
break;
|
|
20852
20854
|
case p.equalsTo:
|
|
20853
|
-
|
|
20855
|
+
ee(r.eq);
|
|
20854
20856
|
break;
|
|
20855
20857
|
case p.leftCurlyBrace:
|
|
20856
|
-
|
|
20858
|
+
ee(r.braceL);
|
|
20857
20859
|
break;
|
|
20858
20860
|
case p.dot:
|
|
20859
|
-
|
|
20861
|
+
ee(r.dot);
|
|
20860
20862
|
break;
|
|
20861
20863
|
case p.colon:
|
|
20862
|
-
|
|
20864
|
+
ee(r.colon);
|
|
20863
20865
|
break;
|
|
20864
20866
|
default:
|
|
20865
|
-
|
|
20867
|
+
te();
|
|
20866
20868
|
}
|
|
20867
20869
|
}
|
|
20868
20870
|
function Ut() {
|
|
@@ -20915,7 +20917,7 @@ function Vf(t) {
|
|
|
20915
20917
|
function vn(t, e, n) {
|
|
20916
20918
|
if (le && (r._in & r.PRECEDENCE_MASK) > e && !De() && (xe(d._as) || xe(d._satisfies))) {
|
|
20917
20919
|
const i = re(1);
|
|
20918
|
-
ye(),
|
|
20920
|
+
ye(), ne(i), ia(), vn(t, e, n);
|
|
20919
20921
|
return;
|
|
20920
20922
|
}
|
|
20921
20923
|
const s = a.type & r.PRECEDENCE_MASK;
|
|
@@ -20929,7 +20931,7 @@ function vn(t, e, n) {
|
|
|
20929
20931
|
function dn() {
|
|
20930
20932
|
if (le && !Hn && y(r.lessThan))
|
|
20931
20933
|
return Kl(), !1;
|
|
20932
|
-
if (
|
|
20934
|
+
if (V(d._module) && ea() === p.leftCurlyBrace && !Go())
|
|
20933
20935
|
return nh(), !1;
|
|
20934
20936
|
if (a.type & r.IS_PREFIX)
|
|
20935
20937
|
return E(), dn(), !1;
|
|
@@ -21006,7 +21008,7 @@ function Yr() {
|
|
|
21006
21008
|
}
|
|
21007
21009
|
function at() {
|
|
21008
21010
|
if (y(r.modulo))
|
|
21009
|
-
return
|
|
21011
|
+
return Q(), !1;
|
|
21010
21012
|
if (l(r.jsxText) || l(r.jsxEmptyText))
|
|
21011
21013
|
return $t(), !1;
|
|
21012
21014
|
if (l(r.lessThan) && Hn)
|
|
@@ -21028,10 +21030,10 @@ function at() {
|
|
|
21028
21030
|
case r._false:
|
|
21029
21031
|
return E(), !1;
|
|
21030
21032
|
case r._import:
|
|
21031
|
-
return E(), l(r.dot) && (a.tokens[a.tokens.length - 1].type = r.name, E(),
|
|
21033
|
+
return E(), l(r.dot) && (a.tokens[a.tokens.length - 1].type = r.name, E(), Q()), !1;
|
|
21032
21034
|
case r.name: {
|
|
21033
21035
|
const e = a.tokens.length, n = a.start, s = a.contextualKeyword;
|
|
21034
|
-
return
|
|
21036
|
+
return Q(), s === d._await ? (eh(), !1) : s === d._async && l(r._function) && !Be() ? (E(), At(n, !1), !1) : t && s === d._async && !Be() && l(r.name) ? (a.scopeDepth++, bt(!1), w(r.arrow), rn(e), !0) : l(r._do) && !Be() ? (E(), gt(), !1) : t && !Be() && l(r.arrow) ? (a.scopeDepth++, Or(!1), w(r.arrow), rn(e), !0) : (a.tokens[a.tokens.length - 1].identifierRole = G.Access, !1);
|
|
21035
21037
|
}
|
|
21036
21038
|
case r._do:
|
|
21037
21039
|
return E(), gt(), !1;
|
|
@@ -21058,15 +21060,15 @@ function at() {
|
|
|
21058
21060
|
return un[e] || e === p.backslash ? Nn() : E(), !1;
|
|
21059
21061
|
}
|
|
21060
21062
|
default:
|
|
21061
|
-
return
|
|
21063
|
+
return te(), !1;
|
|
21062
21064
|
}
|
|
21063
21065
|
}
|
|
21064
21066
|
function Nn() {
|
|
21065
|
-
y(r.hash),
|
|
21067
|
+
y(r.hash), Q();
|
|
21066
21068
|
}
|
|
21067
21069
|
function Wf() {
|
|
21068
21070
|
const t = a.start;
|
|
21069
|
-
|
|
21071
|
+
Q(), y(r.dot) && Q(), At(t, !1);
|
|
21070
21072
|
}
|
|
21071
21073
|
function $t() {
|
|
21072
21074
|
E();
|
|
@@ -21105,7 +21107,7 @@ function zr() {
|
|
|
21105
21107
|
}
|
|
21106
21108
|
function Yf() {
|
|
21107
21109
|
if (w(r._new), y(r.dot)) {
|
|
21108
|
-
|
|
21110
|
+
Q();
|
|
21109
21111
|
return;
|
|
21110
21112
|
}
|
|
21111
21113
|
zf(), fe && Ih(), y(r.parenL) && Ma(r.parenR);
|
|
@@ -21133,7 +21135,7 @@ function Zr(t, e) {
|
|
|
21133
21135
|
break;
|
|
21134
21136
|
continue;
|
|
21135
21137
|
}
|
|
21136
|
-
t || (i = y(r.star)), !t &&
|
|
21138
|
+
t || (i = y(r.star)), !t && V(d._async) ? (i && te(), Q(), l(r.colon) || l(r.parenL) || l(r.braceR) || l(r.eq) || l(r.comma) || (l(r.star) && (E(), i = !0), sn(n))) : sn(n), Qf(t, e, n);
|
|
21137
21139
|
}
|
|
21138
21140
|
a.tokens[a.tokens.length - 1].contextId = n;
|
|
21139
21141
|
}
|
|
@@ -21146,7 +21148,7 @@ function Kf(t) {
|
|
|
21146
21148
|
}
|
|
21147
21149
|
function Zf(t, e) {
|
|
21148
21150
|
const n = a.start;
|
|
21149
|
-
return l(r.parenL) ? (t &&
|
|
21151
|
+
return l(r.parenL) ? (t && te(), vr(
|
|
21150
21152
|
n,
|
|
21151
21153
|
/* isConstructor */
|
|
21152
21154
|
!1
|
|
@@ -21201,7 +21203,7 @@ function Ma(t, e = !1) {
|
|
|
21201
21203
|
function Ba(t) {
|
|
21202
21204
|
t && l(r.comma) || (l(r.ellipsis) ? (ga(), zr()) : l(r.question) ? E() : Ie(!1, !0));
|
|
21203
21205
|
}
|
|
21204
|
-
function
|
|
21206
|
+
function Q() {
|
|
21205
21207
|
E(), a.tokens[a.tokens.length - 1].type = r.name;
|
|
21206
21208
|
}
|
|
21207
21209
|
function eh() {
|
|
@@ -21218,14 +21220,14 @@ function sh(t) {
|
|
|
21218
21220
|
}
|
|
21219
21221
|
function st(t) {
|
|
21220
21222
|
const e = re(0);
|
|
21221
|
-
w(t || r.colon), Me(),
|
|
21223
|
+
w(t || r.colon), Me(), ne(e);
|
|
21222
21224
|
}
|
|
21223
21225
|
function to() {
|
|
21224
21226
|
w(r.modulo), ve(d._checks), y(r.parenL) && (Te(), w(r.parenR));
|
|
21225
21227
|
}
|
|
21226
21228
|
function Jr() {
|
|
21227
21229
|
const t = re(0);
|
|
21228
|
-
w(r.colon), l(r.modulo) ? to() : (Me(), l(r.modulo) && to()),
|
|
21230
|
+
w(r.colon), l(r.modulo) ? to() : (Me(), l(r.modulo) && to()), ne(t);
|
|
21229
21231
|
}
|
|
21230
21232
|
function rh() {
|
|
21231
21233
|
E(), Qr(
|
|
@@ -21234,28 +21236,28 @@ function rh() {
|
|
|
21234
21236
|
);
|
|
21235
21237
|
}
|
|
21236
21238
|
function ih() {
|
|
21237
|
-
E(),
|
|
21239
|
+
E(), Q(), l(r.lessThan) && ze(), w(r.parenL), xr(), w(r.parenR), Jr(), be();
|
|
21238
21240
|
}
|
|
21239
21241
|
function wr() {
|
|
21240
|
-
l(r._class) ? rh() : l(r._function) ? ih() : l(r._var) ? oh() : xe(d._module) ? y(r.dot) ? uh() : ah() :
|
|
21242
|
+
l(r._class) ? rh() : l(r._function) ? ih() : l(r._var) ? oh() : xe(d._module) ? y(r.dot) ? uh() : ah() : V(d._type) ? lh() : V(d._opaque) ? fh() : V(d._interface) ? hh() : l(r._export) ? ch() : te();
|
|
21241
21243
|
}
|
|
21242
21244
|
function oh() {
|
|
21243
21245
|
E(), Va(), be();
|
|
21244
21246
|
}
|
|
21245
21247
|
function ah() {
|
|
21246
|
-
for (l(r.string) ? at() :
|
|
21247
|
-
l(r._import) ? (E(), Ja()) :
|
|
21248
|
+
for (l(r.string) ? at() : Q(), w(r.braceL); !l(r.braceR) && !a.error; )
|
|
21249
|
+
l(r._import) ? (E(), Ja()) : te();
|
|
21248
21250
|
w(r.braceR);
|
|
21249
21251
|
}
|
|
21250
21252
|
function ch() {
|
|
21251
21253
|
w(r._export), y(r._default) ? l(r._function) || l(r._class) ? wr() : (Me(), be()) : l(r._var) || // declare export var ...
|
|
21252
21254
|
l(r._function) || // declare export function ...
|
|
21253
21255
|
l(r._class) || // declare export class ...
|
|
21254
|
-
|
|
21256
|
+
V(d._opaque) ? wr() : l(r.star) || // declare export * from ''
|
|
21255
21257
|
l(r.braceL) || // declare export {} ...
|
|
21256
|
-
|
|
21257
|
-
|
|
21258
|
-
|
|
21258
|
+
V(d._interface) || // declare export interface ...
|
|
21259
|
+
V(d._type) || // declare export type ...
|
|
21260
|
+
V(d._opaque) ? Ka() : te();
|
|
21259
21261
|
}
|
|
21260
21262
|
function uh() {
|
|
21261
21263
|
ve(d._exports), Dt(), be();
|
|
@@ -21274,13 +21276,13 @@ function Qr(t = !1) {
|
|
|
21274
21276
|
do
|
|
21275
21277
|
wn();
|
|
21276
21278
|
while (!t && y(r.comma));
|
|
21277
|
-
if (
|
|
21279
|
+
if (V(d._mixins)) {
|
|
21278
21280
|
E();
|
|
21279
21281
|
do
|
|
21280
21282
|
wn();
|
|
21281
21283
|
while (y(r.comma));
|
|
21282
21284
|
}
|
|
21283
|
-
if (
|
|
21285
|
+
if (V(d._implements)) {
|
|
21284
21286
|
E();
|
|
21285
21287
|
do
|
|
21286
21288
|
wn();
|
|
@@ -21295,7 +21297,7 @@ function ei() {
|
|
|
21295
21297
|
Qr();
|
|
21296
21298
|
}
|
|
21297
21299
|
function Kn() {
|
|
21298
|
-
|
|
21300
|
+
Q();
|
|
21299
21301
|
}
|
|
21300
21302
|
function ti() {
|
|
21301
21303
|
Kn(), l(r.lessThan) && ze(), st(r.eq), be();
|
|
@@ -21308,17 +21310,17 @@ function dh() {
|
|
|
21308
21310
|
}
|
|
21309
21311
|
function ze() {
|
|
21310
21312
|
const t = re(0);
|
|
21311
|
-
l(r.lessThan) || l(r.typeParameterStart) ? E() :
|
|
21313
|
+
l(r.lessThan) || l(r.typeParameterStart) ? E() : te();
|
|
21312
21314
|
do
|
|
21313
21315
|
dh(), l(r.greaterThan) || w(r.comma);
|
|
21314
21316
|
while (!l(r.greaterThan) && !a.error);
|
|
21315
|
-
w(r.greaterThan),
|
|
21317
|
+
w(r.greaterThan), ne(t);
|
|
21316
21318
|
}
|
|
21317
21319
|
function It() {
|
|
21318
21320
|
const t = re(0);
|
|
21319
21321
|
for (w(r.lessThan); !l(r.greaterThan) && !a.error; )
|
|
21320
21322
|
Me(), l(r.greaterThan) || w(r.comma);
|
|
21321
|
-
w(r.greaterThan),
|
|
21323
|
+
w(r.greaterThan), ne(t);
|
|
21322
21324
|
}
|
|
21323
21325
|
function mh() {
|
|
21324
21326
|
if (ve(d._interface), y(r._extends))
|
|
@@ -21328,7 +21330,7 @@ function mh() {
|
|
|
21328
21330
|
Mn(!1, !1, !1);
|
|
21329
21331
|
}
|
|
21330
21332
|
function si() {
|
|
21331
|
-
l(r.num) || l(r.string) ? at() :
|
|
21333
|
+
l(r.num) || l(r.string) ? at() : Q();
|
|
21332
21334
|
}
|
|
21333
21335
|
function ph() {
|
|
21334
21336
|
_e() === r.colon ? (si(), st()) : Me(), w(r.bracketR), st();
|
|
@@ -21347,11 +21349,11 @@ function bh() {
|
|
|
21347
21349
|
function Mn(t, e, n) {
|
|
21348
21350
|
let s;
|
|
21349
21351
|
for (e && l(r.braceBarL) ? (w(r.braceBarL), s = r.braceBarR) : (w(r.braceL), s = r.braceR); !l(s) && !a.error; ) {
|
|
21350
|
-
if (n &&
|
|
21352
|
+
if (n && V(d._proto)) {
|
|
21351
21353
|
const i = _e();
|
|
21352
21354
|
i !== r.colon && i !== r.question && (E(), t = !1);
|
|
21353
21355
|
}
|
|
21354
|
-
if (t &&
|
|
21356
|
+
if (t && V(d._static)) {
|
|
21355
21357
|
const i = _e();
|
|
21356
21358
|
i !== r.colon && i !== r.question && E();
|
|
21357
21359
|
}
|
|
@@ -21360,7 +21362,7 @@ function Mn(t, e, n) {
|
|
|
21360
21362
|
else if (l(r.parenL) || l(r.lessThan))
|
|
21361
21363
|
bh();
|
|
21362
21364
|
else {
|
|
21363
|
-
if (
|
|
21365
|
+
if (V(d._get) || V(d._set)) {
|
|
21364
21366
|
const i = _e();
|
|
21365
21367
|
(i === r.name || i === r.string || i === r.num) && E();
|
|
21366
21368
|
}
|
|
@@ -21379,11 +21381,11 @@ function _h() {
|
|
|
21379
21381
|
si(), l(r.lessThan) || l(r.parenL) ? ri() : (y(r.question), st());
|
|
21380
21382
|
}
|
|
21381
21383
|
function yh() {
|
|
21382
|
-
!y(r.semi) && !y(r.comma) && !l(r.braceR) && !l(r.braceBarR) &&
|
|
21384
|
+
!y(r.semi) && !y(r.comma) && !l(r.braceR) && !l(r.braceBarR) && te();
|
|
21383
21385
|
}
|
|
21384
21386
|
function Oa(t) {
|
|
21385
|
-
for (t ||
|
|
21386
|
-
|
|
21387
|
+
for (t || Q(); y(r.dot); )
|
|
21388
|
+
Q();
|
|
21387
21389
|
}
|
|
21388
21390
|
function kh() {
|
|
21389
21391
|
Oa(!0), l(r.lessThan) && It();
|
|
@@ -21392,13 +21394,13 @@ function vh() {
|
|
|
21392
21394
|
w(r._typeof), $a();
|
|
21393
21395
|
}
|
|
21394
21396
|
function wh() {
|
|
21395
|
-
for (w(r.bracketL); a.pos <
|
|
21397
|
+
for (w(r.bracketL); a.pos < P.length && !l(r.bracketR) && (Me(), !l(r.bracketR)); )
|
|
21396
21398
|
w(r.comma);
|
|
21397
21399
|
w(r.bracketR);
|
|
21398
21400
|
}
|
|
21399
21401
|
function Bn() {
|
|
21400
21402
|
const t = _e();
|
|
21401
|
-
t === r.colon || t === r.question ? (
|
|
21403
|
+
t === r.colon || t === r.question ? (Q(), y(r.question), st()) : Me();
|
|
21402
21404
|
}
|
|
21403
21405
|
function xr() {
|
|
21404
21406
|
for (; !l(r.parenR) && !l(r.ellipsis) && !a.error; )
|
|
@@ -21410,11 +21412,11 @@ function $a() {
|
|
|
21410
21412
|
const e = a.noAnonFunctionType;
|
|
21411
21413
|
switch (a.type) {
|
|
21412
21414
|
case r.name: {
|
|
21413
|
-
if (
|
|
21415
|
+
if (V(d._interface)) {
|
|
21414
21416
|
mh();
|
|
21415
21417
|
return;
|
|
21416
21418
|
}
|
|
21417
|
-
|
|
21419
|
+
Q(), kh();
|
|
21418
21420
|
return;
|
|
21419
21421
|
}
|
|
21420
21422
|
case r.braceL:
|
|
@@ -21466,7 +21468,7 @@ function $a() {
|
|
|
21466
21468
|
return;
|
|
21467
21469
|
}
|
|
21468
21470
|
}
|
|
21469
|
-
|
|
21471
|
+
te();
|
|
21470
21472
|
}
|
|
21471
21473
|
function xh() {
|
|
21472
21474
|
for ($a(); !Be() && (l(r.bracketL) || l(r.questionDot)); )
|
|
@@ -21493,7 +21495,7 @@ function Dt() {
|
|
|
21493
21495
|
st();
|
|
21494
21496
|
}
|
|
21495
21497
|
function Va() {
|
|
21496
|
-
|
|
21498
|
+
Q(), l(r.colon) && Dt();
|
|
21497
21499
|
}
|
|
21498
21500
|
function ii() {
|
|
21499
21501
|
(l(r.plus) || l(r.minus)) && (E(), a.tokens[a.tokens.length - 1].isType = !0);
|
|
@@ -21527,94 +21529,94 @@ function Ih() {
|
|
|
21527
21529
|
function Ah() {
|
|
21528
21530
|
if (l(r.name) && a.contextualKeyword === d._interface) {
|
|
21529
21531
|
const t = re(0);
|
|
21530
|
-
return E(), ei(),
|
|
21531
|
-
} else if (
|
|
21532
|
+
return E(), ei(), ne(t), !0;
|
|
21533
|
+
} else if (V(d._enum))
|
|
21532
21534
|
return qa(), !0;
|
|
21533
21535
|
return !1;
|
|
21534
21536
|
}
|
|
21535
21537
|
function Rh() {
|
|
21536
|
-
return
|
|
21538
|
+
return V(d._enum) ? (qa(), !0) : !1;
|
|
21537
21539
|
}
|
|
21538
21540
|
function Ch(t) {
|
|
21539
21541
|
if (t === d._declare) {
|
|
21540
21542
|
if (l(r._class) || l(r.name) || l(r._function) || l(r._var) || l(r._export)) {
|
|
21541
21543
|
const e = re(1);
|
|
21542
|
-
wr(),
|
|
21544
|
+
wr(), ne(e);
|
|
21543
21545
|
}
|
|
21544
21546
|
} else if (l(r.name)) {
|
|
21545
21547
|
if (t === d._interface) {
|
|
21546
21548
|
const e = re(1);
|
|
21547
|
-
ei(),
|
|
21549
|
+
ei(), ne(e);
|
|
21548
21550
|
} else if (t === d._type) {
|
|
21549
21551
|
const e = re(1);
|
|
21550
|
-
ti(),
|
|
21552
|
+
ti(), ne(e);
|
|
21551
21553
|
} else if (t === d._opaque) {
|
|
21552
21554
|
const e = re(1);
|
|
21553
|
-
ni(!1),
|
|
21555
|
+
ni(!1), ne(e);
|
|
21554
21556
|
}
|
|
21555
21557
|
}
|
|
21556
21558
|
be();
|
|
21557
21559
|
}
|
|
21558
21560
|
function Ph() {
|
|
21559
|
-
return
|
|
21561
|
+
return V(d._type) || V(d._interface) || V(d._opaque) || V(d._enum);
|
|
21560
21562
|
}
|
|
21561
21563
|
function Dh() {
|
|
21562
21564
|
return l(r.name) && (a.contextualKeyword === d._type || a.contextualKeyword === d._interface || a.contextualKeyword === d._opaque || a.contextualKeyword === d._enum);
|
|
21563
21565
|
}
|
|
21564
21566
|
function Lh() {
|
|
21565
|
-
if (
|
|
21567
|
+
if (V(d._type)) {
|
|
21566
21568
|
const t = re(1);
|
|
21567
|
-
E(), l(r.braceL) ? (ai(), on()) : ti(),
|
|
21568
|
-
} else if (
|
|
21569
|
+
E(), l(r.braceL) ? (ai(), on()) : ti(), ne(t);
|
|
21570
|
+
} else if (V(d._opaque)) {
|
|
21569
21571
|
const t = re(1);
|
|
21570
|
-
E(), ni(!1),
|
|
21571
|
-
} else if (
|
|
21572
|
+
E(), ni(!1), ne(t);
|
|
21573
|
+
} else if (V(d._interface)) {
|
|
21572
21574
|
const t = re(1);
|
|
21573
|
-
E(), ei(),
|
|
21575
|
+
E(), ei(), ne(t);
|
|
21574
21576
|
} else
|
|
21575
21577
|
Oe(!0);
|
|
21576
21578
|
}
|
|
21577
21579
|
function Fh() {
|
|
21578
|
-
return l(r.star) ||
|
|
21580
|
+
return l(r.star) || V(d._type) && _e() === r.star;
|
|
21579
21581
|
}
|
|
21580
21582
|
function Uh() {
|
|
21581
21583
|
if (xe(d._type)) {
|
|
21582
21584
|
const t = re(2);
|
|
21583
|
-
Er(),
|
|
21585
|
+
Er(), ne(t);
|
|
21584
21586
|
} else
|
|
21585
21587
|
Er();
|
|
21586
21588
|
}
|
|
21587
21589
|
function Nh(t) {
|
|
21588
|
-
if (t && l(r.lessThan) && It(),
|
|
21590
|
+
if (t && l(r.lessThan) && It(), V(d._implements)) {
|
|
21589
21591
|
const e = re(0);
|
|
21590
21592
|
E(), a.tokens[a.tokens.length - 1].type = r._implements;
|
|
21591
21593
|
do
|
|
21592
21594
|
Kn(), l(r.lessThan) && It();
|
|
21593
21595
|
while (y(r.comma));
|
|
21594
|
-
|
|
21596
|
+
ne(e);
|
|
21595
21597
|
}
|
|
21596
21598
|
}
|
|
21597
21599
|
function Mh() {
|
|
21598
|
-
l(r.lessThan) && (ze(), l(r.parenL) ||
|
|
21600
|
+
l(r.lessThan) && (ze(), l(r.parenL) || te());
|
|
21599
21601
|
}
|
|
21600
21602
|
function Bh() {
|
|
21601
21603
|
const t = re(0);
|
|
21602
|
-
y(r.question), l(r.colon) && Dt(),
|
|
21604
|
+
y(r.question), l(r.colon) && Dt(), ne(t);
|
|
21603
21605
|
}
|
|
21604
21606
|
function Oh() {
|
|
21605
|
-
if (l(r._typeof) ||
|
|
21607
|
+
if (l(r._typeof) || V(d._type)) {
|
|
21606
21608
|
const t = ln();
|
|
21607
21609
|
(sh(t) || t.type === r.braceL || t.type === r.star) && E();
|
|
21608
21610
|
}
|
|
21609
21611
|
}
|
|
21610
21612
|
function $h() {
|
|
21611
21613
|
const t = a.contextualKeyword === d._type || a.type === r._typeof;
|
|
21612
|
-
t ? E() :
|
|
21614
|
+
t ? E() : Q(), V(d._as) && !Nr(d._as) ? (Q(), t && !l(r.name) && !(a.type & r.IS_KEYWORD) || Q()) : (t && (l(r.name) || a.type & r.IS_KEYWORD) && Q(), xe(d._as) && Q());
|
|
21613
21615
|
}
|
|
21614
21616
|
function jh() {
|
|
21615
21617
|
if (l(r.lessThan)) {
|
|
21616
21618
|
const t = re(0);
|
|
21617
|
-
ze(),
|
|
21619
|
+
ze(), ne(t);
|
|
21618
21620
|
}
|
|
21619
21621
|
}
|
|
21620
21622
|
function Vh() {
|
|
@@ -21635,16 +21637,16 @@ function Hh(t, e) {
|
|
|
21635
21637
|
else
|
|
21636
21638
|
return s;
|
|
21637
21639
|
const i = re(0);
|
|
21638
|
-
if (ze(),
|
|
21640
|
+
if (ze(), ne(i), s = tt(t, e), s)
|
|
21639
21641
|
return !0;
|
|
21640
|
-
|
|
21642
|
+
te();
|
|
21641
21643
|
}
|
|
21642
21644
|
return tt(t, e);
|
|
21643
21645
|
}
|
|
21644
21646
|
function Xh() {
|
|
21645
21647
|
if (l(r.colon)) {
|
|
21646
21648
|
const t = re(0), e = a.snapshot(), n = a.noAnonFunctionType;
|
|
21647
|
-
a.noAnonFunctionType = !0, Jr(), a.noAnonFunctionType = n, Be() &&
|
|
21649
|
+
a.noAnonFunctionType = !0, Jr(), a.noAnonFunctionType = n, Be() && te(), l(r.arrow) || te(), a.error && a.restoreFromSnapshot(e), ne(t);
|
|
21648
21650
|
}
|
|
21649
21651
|
return y(r.arrow);
|
|
21650
21652
|
}
|
|
@@ -21663,7 +21665,7 @@ function Gh() {
|
|
|
21663
21665
|
return qt(), kr() ? (rn(t), !0) : !1;
|
|
21664
21666
|
}
|
|
21665
21667
|
function qa() {
|
|
21666
|
-
ve(d._enum), a.tokens[a.tokens.length - 1].type = r._enum,
|
|
21668
|
+
ve(d._enum), a.tokens[a.tokens.length - 1].type = r._enum, Q(), Yh();
|
|
21667
21669
|
}
|
|
21668
21670
|
function Yh() {
|
|
21669
21671
|
xe(d._of) && E(), w(r.braceL), zh(), w(r.braceR);
|
|
@@ -21673,7 +21675,7 @@ function zh() {
|
|
|
21673
21675
|
Kh(), l(r.braceR) || w(r.comma);
|
|
21674
21676
|
}
|
|
21675
21677
|
function Kh() {
|
|
21676
|
-
|
|
21678
|
+
Q(), y(r.eq) && E();
|
|
21677
21679
|
}
|
|
21678
21680
|
function Zh() {
|
|
21679
21681
|
if (Zn(r.eof), a.scopes.push(new nt(0, a.tokens.length, !0)), a.scopeDepth !== 0)
|
|
@@ -21703,10 +21705,10 @@ function Jh(t) {
|
|
|
21703
21705
|
return;
|
|
21704
21706
|
case r._function:
|
|
21705
21707
|
if (_e() === r.dot) break;
|
|
21706
|
-
t ||
|
|
21708
|
+
t || te(), od();
|
|
21707
21709
|
return;
|
|
21708
21710
|
case r._class:
|
|
21709
|
-
t ||
|
|
21711
|
+
t || te(), Rt(!0);
|
|
21710
21712
|
return;
|
|
21711
21713
|
case r._if:
|
|
21712
21714
|
ad();
|
|
@@ -21725,7 +21727,7 @@ function Jh(t) {
|
|
|
21725
21727
|
return;
|
|
21726
21728
|
case r._let:
|
|
21727
21729
|
case r._const:
|
|
21728
|
-
t ||
|
|
21730
|
+
t || te();
|
|
21729
21731
|
case r._var:
|
|
21730
21732
|
xn(e !== r._var);
|
|
21731
21733
|
return;
|
|
@@ -21778,10 +21780,10 @@ function Jh(t) {
|
|
|
21778
21780
|
y(r.colon) ? pd() : gd(s);
|
|
21779
21781
|
}
|
|
21780
21782
|
function Ha() {
|
|
21781
|
-
if (!
|
|
21783
|
+
if (!V(d._await))
|
|
21782
21784
|
return !1;
|
|
21783
21785
|
const t = a.snapshot();
|
|
21784
|
-
return E(), !
|
|
21786
|
+
return E(), !V(d._using) || De() || (E(), !l(r.name) || De()) ? (a.restoreFromSnapshot(t), !1) : (a.restoreFromSnapshot(t), !0);
|
|
21785
21787
|
}
|
|
21786
21788
|
function oi() {
|
|
21787
21789
|
for (; l(r.at); )
|
|
@@ -21791,8 +21793,8 @@ function Xa() {
|
|
|
21791
21793
|
if (E(), y(r.parenL))
|
|
21792
21794
|
Te(), w(r.parenR);
|
|
21793
21795
|
else {
|
|
21794
|
-
for (
|
|
21795
|
-
|
|
21796
|
+
for (Q(); y(r.dot); )
|
|
21797
|
+
Q();
|
|
21796
21798
|
Qh();
|
|
21797
21799
|
}
|
|
21798
21800
|
}
|
|
@@ -21803,7 +21805,7 @@ function Wa() {
|
|
|
21803
21805
|
y(r.parenL) && pt();
|
|
21804
21806
|
}
|
|
21805
21807
|
function ed() {
|
|
21806
|
-
E(), Qe() || (
|
|
21808
|
+
E(), Qe() || (Q(), be());
|
|
21807
21809
|
}
|
|
21808
21810
|
function td() {
|
|
21809
21811
|
E(), be();
|
|
@@ -21819,29 +21821,29 @@ function sd() {
|
|
|
21819
21821
|
a.scopes.push(new nt(t, e, !1)), a.scopeDepth--;
|
|
21820
21822
|
}
|
|
21821
21823
|
function rd() {
|
|
21822
|
-
return !(!
|
|
21824
|
+
return !(!V(d._using) || Nr(d._of));
|
|
21823
21825
|
}
|
|
21824
21826
|
function id() {
|
|
21825
21827
|
E();
|
|
21826
21828
|
let t = !1;
|
|
21827
|
-
if (
|
|
21828
|
-
t &&
|
|
21829
|
+
if (V(d._await) && (t = !0, E()), w(r.parenL), l(r.semi)) {
|
|
21830
|
+
t && te(), ir();
|
|
21829
21831
|
return;
|
|
21830
21832
|
}
|
|
21831
21833
|
const e = Ha();
|
|
21832
21834
|
if (e || l(r._var) || l(r._let) || l(r._const) || rd()) {
|
|
21833
|
-
if (e && ve(d._await), E(), Ga(!0, a.type !== r._var), l(r._in) ||
|
|
21835
|
+
if (e && ve(d._await), E(), Ga(!0, a.type !== r._var), l(r._in) || V(d._of)) {
|
|
21834
21836
|
ro(t);
|
|
21835
21837
|
return;
|
|
21836
21838
|
}
|
|
21837
21839
|
ir();
|
|
21838
21840
|
return;
|
|
21839
21841
|
}
|
|
21840
|
-
if (Te(!0), l(r._in) ||
|
|
21842
|
+
if (Te(!0), l(r._in) || V(d._of)) {
|
|
21841
21843
|
ro(t);
|
|
21842
21844
|
return;
|
|
21843
21845
|
}
|
|
21844
|
-
t &&
|
|
21846
|
+
t && te(), ir();
|
|
21845
21847
|
}
|
|
21846
21848
|
function od() {
|
|
21847
21849
|
const t = a.start;
|
|
@@ -21931,7 +21933,7 @@ function bd(t) {
|
|
|
21931
21933
|
Wn(t), le ? wf() : fe && Vh();
|
|
21932
21934
|
}
|
|
21933
21935
|
function At(t, e, n = !1) {
|
|
21934
|
-
l(r.star) && E(), e && !n && !l(r.name) && !l(r._yield) &&
|
|
21936
|
+
l(r.star) && E(), e && !n && !l(r.name) && !l(r._yield) && te();
|
|
21935
21937
|
let s = null;
|
|
21936
21938
|
l(r.name) && (e || (s = a.tokens.length, a.scopeDepth++), bt(!1));
|
|
21937
21939
|
const i = a.tokens.length;
|
|
@@ -21987,7 +21989,7 @@ function yd(t, e) {
|
|
|
21987
21989
|
]);
|
|
21988
21990
|
let n = !1;
|
|
21989
21991
|
if (l(r.name) && a.contextualKeyword === d._static) {
|
|
21990
|
-
if (
|
|
21992
|
+
if (Q(), za()) {
|
|
21991
21993
|
zt(
|
|
21992
21994
|
t,
|
|
21993
21995
|
/* isConstructor */
|
|
@@ -22027,7 +22029,7 @@ function kd(t, e, n) {
|
|
|
22027
22029
|
t,
|
|
22028
22030
|
/* isConstructor */
|
|
22029
22031
|
!1
|
|
22030
|
-
)) : i.contextualKeyword === d._accessor && !Qe() ? (Yt(n), En()) : Qe() ? En() :
|
|
22032
|
+
)) : i.contextualKeyword === d._accessor && !Qe() ? (Yt(n), En()) : Qe() ? En() : te();
|
|
22031
22033
|
}
|
|
22032
22034
|
function zt(t, e) {
|
|
22033
22035
|
le ? Pt() : fe && l(r.lessThan) && ze(), vr(t, e);
|
|
@@ -22038,7 +22040,7 @@ function Yt(t) {
|
|
|
22038
22040
|
function io() {
|
|
22039
22041
|
if (le) {
|
|
22040
22042
|
const t = re(0);
|
|
22041
|
-
y(r.question),
|
|
22043
|
+
y(r.question), ne(t);
|
|
22042
22044
|
}
|
|
22043
22045
|
}
|
|
22044
22046
|
function En() {
|
|
@@ -22049,7 +22051,7 @@ function En() {
|
|
|
22049
22051
|
be();
|
|
22050
22052
|
}
|
|
22051
22053
|
function vd(t, e = !1) {
|
|
22052
|
-
le && (!t || e) &&
|
|
22054
|
+
le && (!t || e) && V(d._implements) || (l(r.name) && bt(!0), le ? Pt() : fe && l(r.lessThan) && ze());
|
|
22053
22055
|
}
|
|
22054
22056
|
function wd() {
|
|
22055
22057
|
let t = !1;
|
|
@@ -22057,13 +22059,13 @@ function wd() {
|
|
|
22057
22059
|
}
|
|
22058
22060
|
function Ka() {
|
|
22059
22061
|
const t = a.tokens.length - 1;
|
|
22060
|
-
le && ff() || (Td() ? Id() : Sd() ? (
|
|
22062
|
+
le && ff() || (Td() ? Id() : Sd() ? (Q(), l(r.comma) && _e() === r.star ? (w(r.comma), w(r.star), ve(d._as), Q()) : Za(), on()) : y(r._default) ? xd() : Rd() ? Ed() : (ai(), on()), a.tokens[t].rhsEndIndex = a.tokens.length);
|
|
22061
22063
|
}
|
|
22062
22064
|
function xd() {
|
|
22063
22065
|
if (le && mf() || fe && Rh())
|
|
22064
22066
|
return;
|
|
22065
22067
|
const t = a.start;
|
|
22066
|
-
y(r._function) ? At(t, !0, !0) :
|
|
22068
|
+
y(r._function) ? At(t, !0, !0) : V(d._async) && _e() === r._function ? (xe(d._async), y(r._function), At(t, !0, !0)) : l(r._class) ? Rt(!0, !0) : l(r.at) ? (oi(), Rt(!0, !0)) : (Ie(), be());
|
|
22067
22069
|
}
|
|
22068
22070
|
function Ed() {
|
|
22069
22071
|
le ? _f() : fe ? Lh() : Oe(!0);
|
|
@@ -22081,7 +22083,7 @@ function Sd() {
|
|
|
22081
22083
|
if (e.type === r.comma)
|
|
22082
22084
|
return !0;
|
|
22083
22085
|
if (n) {
|
|
22084
|
-
const s =
|
|
22086
|
+
const s = P.charCodeAt(Qo(t + 4));
|
|
22085
22087
|
return s === p.quotationMark || s === p.apostrophe;
|
|
22086
22088
|
}
|
|
22087
22089
|
return !1;
|
|
@@ -22099,13 +22101,13 @@ function Id() {
|
|
|
22099
22101
|
fe ? Uh() : Er();
|
|
22100
22102
|
}
|
|
22101
22103
|
function Er() {
|
|
22102
|
-
w(r.star),
|
|
22104
|
+
w(r.star), V(d._as) ? Ad() : on();
|
|
22103
22105
|
}
|
|
22104
22106
|
function Ad() {
|
|
22105
|
-
E(), a.tokens[a.tokens.length - 1].type = r._as,
|
|
22107
|
+
E(), a.tokens[a.tokens.length - 1].type = r._as, Q(), Za(), on();
|
|
22106
22108
|
}
|
|
22107
22109
|
function Rd() {
|
|
22108
|
-
return le && Ta() || fe && Ph() || a.type === r._var || a.type === r._const || a.type === r._let || a.type === r._function || a.type === r._class ||
|
|
22110
|
+
return le && Ta() || fe && Ph() || a.type === r._var || a.type === r._const || a.type === r._let || a.type === r._function || a.type === r._class || V(d._async) || l(r.at);
|
|
22109
22111
|
}
|
|
22110
22112
|
function ai() {
|
|
22111
22113
|
let t = !0;
|
|
@@ -22122,21 +22124,21 @@ function Cd() {
|
|
|
22122
22124
|
df();
|
|
22123
22125
|
return;
|
|
22124
22126
|
}
|
|
22125
|
-
|
|
22127
|
+
Q(), a.tokens[a.tokens.length - 1].identifierRole = G.ExportAccess, xe(d._as) && Q();
|
|
22126
22128
|
}
|
|
22127
22129
|
function Pd() {
|
|
22128
22130
|
const t = a.snapshot();
|
|
22129
|
-
return ve(d._module), xe(d._from) ?
|
|
22131
|
+
return ve(d._module), xe(d._from) ? V(d._from) ? (a.restoreFromSnapshot(t), !0) : (a.restoreFromSnapshot(t), !1) : l(r.comma) ? (a.restoreFromSnapshot(t), !1) : (a.restoreFromSnapshot(t), !0);
|
|
22130
22132
|
}
|
|
22131
22133
|
function Dd() {
|
|
22132
|
-
|
|
22134
|
+
V(d._module) && Pd() && E();
|
|
22133
22135
|
}
|
|
22134
22136
|
function Ja() {
|
|
22135
22137
|
if (le && l(r.name) && _e() === r.eq) {
|
|
22136
22138
|
_r();
|
|
22137
22139
|
return;
|
|
22138
22140
|
}
|
|
22139
|
-
if (le &&
|
|
22141
|
+
if (le && V(d._type)) {
|
|
22140
22142
|
const t = ln();
|
|
22141
22143
|
if (t.type === r.name && t.contextualKeyword !== d._from) {
|
|
22142
22144
|
if (ve(d._type), _e() === r.eq) {
|
|
@@ -22164,7 +22166,7 @@ function Fd() {
|
|
|
22164
22166
|
for (w(r.braceL); !y(r.braceR) && !a.error; ) {
|
|
22165
22167
|
if (t)
|
|
22166
22168
|
t = !1;
|
|
22167
|
-
else if (y(r.colon) &&
|
|
22169
|
+
else if (y(r.colon) && te(
|
|
22168
22170
|
"ES2015 named imports do not destructure. Use another statement for destructuring after the import."
|
|
22169
22171
|
), w(r.comma), y(r.braceR))
|
|
22170
22172
|
break;
|
|
@@ -22181,13 +22183,13 @@ function Ud() {
|
|
|
22181
22183
|
$h();
|
|
22182
22184
|
return;
|
|
22183
22185
|
}
|
|
22184
|
-
Ln(),
|
|
22186
|
+
Ln(), V(d._as) && (a.tokens[a.tokens.length - 1].identifierRole = G.ImportAccess, E(), Ln());
|
|
22185
22187
|
}
|
|
22186
22188
|
function Qa() {
|
|
22187
|
-
(l(r._with) ||
|
|
22189
|
+
(l(r._with) || V(d._assert) && !De()) && (E(), Zr(!1, !1));
|
|
22188
22190
|
}
|
|
22189
22191
|
function Nd() {
|
|
22190
|
-
return a.pos === 0 &&
|
|
22192
|
+
return a.pos === 0 && P.charCodeAt(0) === p.numberSign && P.charCodeAt(1) === p.exclamationMark && na(2), ta(), Zh();
|
|
22191
22193
|
}
|
|
22192
22194
|
class Md {
|
|
22193
22195
|
constructor(e, n) {
|
|
@@ -22437,9 +22439,9 @@ function $d(t, e, n, s) {
|
|
|
22437
22439
|
e.nextToken();
|
|
22438
22440
|
else {
|
|
22439
22441
|
const T = e.currentIndex();
|
|
22440
|
-
let L = !1, O = !1,
|
|
22442
|
+
let L = !1, O = !1, q = !1;
|
|
22441
22443
|
for (; On(e.currentToken()); )
|
|
22442
|
-
e.matches1(r._static) && (L = !0), e.matches1(r.hash) && (O = !0), (e.matches1(r._declare) || e.matches1(r._abstract)) && (
|
|
22444
|
+
e.matches1(r._static) && (L = !0), e.matches1(r.hash) && (O = !0), (e.matches1(r._declare) || e.matches1(r._abstract)) && (q = !0), e.nextToken();
|
|
22443
22445
|
if (L && e.matches1(r.braceL)) {
|
|
22444
22446
|
or(e, x);
|
|
22445
22447
|
continue;
|
|
@@ -22452,7 +22454,7 @@ function $d(t, e, n, s) {
|
|
|
22452
22454
|
({ constructorInitializerStatements: c, constructorInsertPos: f } = ao(e));
|
|
22453
22455
|
continue;
|
|
22454
22456
|
}
|
|
22455
|
-
const
|
|
22457
|
+
const z = e.currentIndex();
|
|
22456
22458
|
if (Vd(e), e.matches1(r.lessThan) || e.matches1(r.parenL)) {
|
|
22457
22459
|
or(e, x);
|
|
22458
22460
|
continue;
|
|
@@ -22460,19 +22462,19 @@ function $d(t, e, n, s) {
|
|
|
22460
22462
|
for (; e.currentToken().isType; )
|
|
22461
22463
|
e.nextToken();
|
|
22462
22464
|
if (e.matches1(r.eq)) {
|
|
22463
|
-
const
|
|
22464
|
-
if (
|
|
22465
|
+
const C = e.currentIndex(), H = e.currentToken().rhsEndIndex;
|
|
22466
|
+
if (H == null)
|
|
22465
22467
|
throw new Error("Expected rhsEndIndex on class field assignment.");
|
|
22466
|
-
for (e.nextToken(); e.currentIndex() <
|
|
22468
|
+
for (e.nextToken(); e.currentIndex() < H; )
|
|
22467
22469
|
t.processToken();
|
|
22468
22470
|
let M;
|
|
22469
22471
|
L ? (M = n.claimFreeName("__initStatic"), h.push(M)) : (M = n.claimFreeName("__init"), u.push(M)), m.push({
|
|
22470
22472
|
initializerName: M,
|
|
22471
|
-
equalsIndex:
|
|
22472
|
-
start:
|
|
22473
|
+
equalsIndex: C,
|
|
22474
|
+
start: z,
|
|
22473
22475
|
end: e.currentIndex()
|
|
22474
22476
|
});
|
|
22475
|
-
} else (!s ||
|
|
22477
|
+
} else (!s || q) && g.push({ start: T, end: e.currentIndex() });
|
|
22476
22478
|
}
|
|
22477
22479
|
return e.restoreToSnapshot(i), s ? {
|
|
22478
22480
|
headerInfo: o,
|
|
@@ -24266,4 +24268,4 @@ throw new Error("Scene code must define a render function");`, c = Object.getPro
|
|
|
24266
24268
|
}
|
|
24267
24269
|
}
|
|
24268
24270
|
self.setSceneCode = im;
|
|
24269
|
-
//# sourceMappingURL=viji.worker-
|
|
24271
|
+
//# sourceMappingURL=viji.worker-Bu5UOGpW.js.map
|