@mlightcad/mtext-renderer 0.10.8 → 0.10.9
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/index.js +849 -828
- package/dist/index.umd.cjs +6 -6
- package/dist/mtext-renderer-worker.js +783 -762
- package/lib/renderer/mtextProcessor.d.ts +10 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -801,9 +801,9 @@ function Fs(t, e, r) {
|
|
|
801
801
|
var h = jr(t, Dn);
|
|
802
802
|
switch (h) {
|
|
803
803
|
case 16:
|
|
804
|
-
var
|
|
804
|
+
var p = Ue[o - 1];
|
|
805
805
|
for (c = Oe(t, 2, 3); c; --c)
|
|
806
|
-
Ue[o++] =
|
|
806
|
+
Ue[o++] = p;
|
|
807
807
|
break;
|
|
808
808
|
case 17:
|
|
809
809
|
for (c = Oe(t, 3, 3); c; --c)
|
|
@@ -889,23 +889,23 @@ Je.prototype.addY = function(t) {
|
|
|
889
889
|
this.addPoint(null, t);
|
|
890
890
|
};
|
|
891
891
|
Je.prototype.addBezier = function(t, e, r, n, a, i, s, o) {
|
|
892
|
-
var c = [t, e], u = [r, n], h = [a, i],
|
|
892
|
+
var c = [t, e], u = [r, n], h = [a, i], p = [s, o];
|
|
893
893
|
this.addPoint(t, e), this.addPoint(s, o);
|
|
894
894
|
for (var l = 0; l <= 1; l++) {
|
|
895
|
-
var g = 6 * c[l] - 12 * u[l] + 6 * h[l], x = -3 * c[l] + 9 * u[l] - 9 * h[l] + 3 *
|
|
895
|
+
var g = 6 * c[l] - 12 * u[l] + 6 * h[l], x = -3 * c[l] + 9 * u[l] - 9 * h[l] + 3 * p[l], v = 3 * u[l] - 3 * c[l];
|
|
896
896
|
if (x === 0) {
|
|
897
897
|
if (g === 0)
|
|
898
898
|
continue;
|
|
899
|
-
var
|
|
900
|
-
0 <
|
|
899
|
+
var b = -v / g;
|
|
900
|
+
0 < b && b < 1 && (l === 0 && this.addX(ht(c[l], u[l], h[l], p[l], b)), l === 1 && this.addY(ht(c[l], u[l], h[l], p[l], b)));
|
|
901
901
|
continue;
|
|
902
902
|
}
|
|
903
903
|
var m = Math.pow(g, 2) - 4 * v * x;
|
|
904
904
|
if (!(m < 0)) {
|
|
905
905
|
var F = (-g + Math.sqrt(m)) / (2 * x);
|
|
906
|
-
0 < F && F < 1 && (l === 0 && this.addX(ht(c[l], u[l], h[l],
|
|
906
|
+
0 < F && F < 1 && (l === 0 && this.addX(ht(c[l], u[l], h[l], p[l], F)), l === 1 && this.addY(ht(c[l], u[l], h[l], p[l], F)));
|
|
907
907
|
var w = (-g - Math.sqrt(m)) / (2 * x);
|
|
908
|
-
0 < w && w < 1 && (l === 0 && this.addX(ht(c[l], u[l], h[l],
|
|
908
|
+
0 < w && w < 1 && (l === 0 && this.addX(ht(c[l], u[l], h[l], p[l], w)), l === 1 && this.addY(ht(c[l], u[l], h[l], p[l], w)));
|
|
909
909
|
}
|
|
910
910
|
}
|
|
911
911
|
};
|
|
@@ -1373,8 +1373,8 @@ R.TABLE = function(t) {
|
|
|
1373
1373
|
s.type === "TABLE" ? (a.push(e.length), e = e.concat([0, 0]), n.push(u)) : e = e.concat(u);
|
|
1374
1374
|
}
|
|
1375
1375
|
for (var h = 0; h < n.length; h += 1) {
|
|
1376
|
-
var
|
|
1377
|
-
P.argument(l < 65536, "Table " + t.tableName + " too big."), e[
|
|
1376
|
+
var p = a[h], l = e.length;
|
|
1377
|
+
P.argument(l < 65536, "Table " + t.tableName + " too big."), e[p] = l >> 8, e[p + 1] = l & 255, e = e.concat(n[h]);
|
|
1378
1378
|
}
|
|
1379
1379
|
return e;
|
|
1380
1380
|
};
|
|
@@ -1881,9 +1881,9 @@ function Ps(t, e, r, n, a) {
|
|
|
1881
1881
|
t.length = e.parseUShort(), t.language = e.parseUShort();
|
|
1882
1882
|
var i;
|
|
1883
1883
|
t.segCount = i = e.parseUShort() >> 1, e.skip("uShort", 3), t.glyphIndexMap = {};
|
|
1884
|
-
for (var s = new _.Parser(r, n + a + 14), o = new _.Parser(r, n + a + 16 + i * 2), c = new _.Parser(r, n + a + 16 + i * 4), u = new _.Parser(r, n + a + 16 + i * 6), h = n + a + 16 + i * 8,
|
|
1885
|
-
for (var l = void 0, g = s.parseUShort(), x = o.parseUShort(), v = c.parseShort(),
|
|
1886
|
-
|
|
1884
|
+
for (var s = new _.Parser(r, n + a + 14), o = new _.Parser(r, n + a + 16 + i * 2), c = new _.Parser(r, n + a + 16 + i * 4), u = new _.Parser(r, n + a + 16 + i * 6), h = n + a + 16 + i * 8, p = 0; p < i - 1; p += 1)
|
|
1885
|
+
for (var l = void 0, g = s.parseUShort(), x = o.parseUShort(), v = c.parseShort(), b = u.parseUShort(), m = x; m <= g; m += 1)
|
|
1886
|
+
b !== 0 ? (h = u.offset + u.relativeOffset - 2, h += b, h += (m - x) * 2, l = _.getUShort(r, h), l !== 0 && (l = l + v & 65535)) : l = m + v & 65535, t.glyphIndexMap[m] = l;
|
|
1887
1887
|
}
|
|
1888
1888
|
function Ns(t, e) {
|
|
1889
1889
|
var r = {};
|
|
@@ -1965,14 +1965,14 @@ function zs(t) {
|
|
|
1965
1965
|
});
|
|
1966
1966
|
}
|
|
1967
1967
|
Hs(i);
|
|
1968
|
-
var c = i.segments.length, u = 0, h = [],
|
|
1968
|
+
var c = i.segments.length, u = 0, h = [], p = [], l = [], g = [], x = [], v = [];
|
|
1969
1969
|
for (r = 0; r < c; r += 1) {
|
|
1970
|
-
var
|
|
1971
|
-
|
|
1970
|
+
var b = i.segments[r];
|
|
1971
|
+
b.end <= 65535 && b.start <= 65535 ? (h = h.concat({ name: "end_" + r, type: "USHORT", value: b.end }), p = p.concat({ name: "start_" + r, type: "USHORT", value: b.start }), l = l.concat({ name: "idDelta_" + r, type: "SHORT", value: b.delta }), g = g.concat({ name: "idRangeOffset_" + r, type: "USHORT", value: b.offset }), b.glyphId !== void 0 && (x = x.concat({ name: "glyph_" + r, type: "USHORT", value: b.glyphId }))) : u += 1, !e && b.glyphIndex !== void 0 && (v = v.concat({ name: "cmap12Start_" + r, type: "ULONG", value: b.start }), v = v.concat({ name: "cmap12End_" + r, type: "ULONG", value: b.end }), v = v.concat({ name: "cmap12Glyph_" + r, type: "ULONG", value: b.glyphIndex }));
|
|
1972
1972
|
}
|
|
1973
|
-
if (i.segCountX2 = (c - u) * 2, i.searchRange = Math.pow(2, Math.floor(Math.log(c - u) / Math.log(2))) * 2, i.entrySelector = Math.log(i.searchRange / 2) / Math.log(2), i.rangeShift = i.segCountX2 - i.searchRange, i.fields = i.fields.concat(h), i.fields.push({ name: "reservedPad", type: "USHORT", value: 0 }), i.fields = i.fields.concat(
|
|
1973
|
+
if (i.segCountX2 = (c - u) * 2, i.searchRange = Math.pow(2, Math.floor(Math.log(c - u) / Math.log(2))) * 2, i.entrySelector = Math.log(i.searchRange / 2) / Math.log(2), i.rangeShift = i.segCountX2 - i.searchRange, i.fields = i.fields.concat(h), i.fields.push({ name: "reservedPad", type: "USHORT", value: 0 }), i.fields = i.fields.concat(p), i.fields = i.fields.concat(l), i.fields = i.fields.concat(g), i.fields = i.fields.concat(x), i.cmap4Length = 14 + // Subtable header
|
|
1974
1974
|
h.length * 2 + 2 + // reservedPad
|
|
1975
|
-
|
|
1975
|
+
p.length * 2 + l.length * 2 + g.length * 2 + x.length * 2, !e) {
|
|
1976
1976
|
var m = 16 + // Subtable header
|
|
1977
1977
|
v.length * 4;
|
|
1978
1978
|
i.cmap12Offset = 12 + 2 * 2 + 4 + i.cmap4Length, i.fields = i.fields.concat([
|
|
@@ -3261,8 +3261,8 @@ ke.prototype.getPath = function(t, e, r, n, a) {
|
|
|
3261
3261
|
var u = 1 / (this.path.unitsPerEm || 1e3) * r;
|
|
3262
3262
|
o === void 0 && (o = u), c === void 0 && (c = u);
|
|
3263
3263
|
}
|
|
3264
|
-
for (var h = new he(),
|
|
3265
|
-
var l = i[
|
|
3264
|
+
for (var h = new he(), p = 0; p < i.length; p += 1) {
|
|
3265
|
+
var l = i[p];
|
|
3266
3266
|
l.type === "M" ? h.moveTo(t + l.x * o, e + -l.y * c) : l.type === "L" ? h.lineTo(t + l.x * o, e + -l.y * c) : l.type === "Q" ? h.quadraticCurveTo(
|
|
3267
3267
|
t + l.x1 * o,
|
|
3268
3268
|
e + -l.y1 * c,
|
|
@@ -3306,10 +3306,10 @@ ke.prototype.draw = function(t, e, r, n, a) {
|
|
|
3306
3306
|
this.getPath(e, r, n, a).draw(t);
|
|
3307
3307
|
};
|
|
3308
3308
|
ke.prototype.drawPoints = function(t, e, r, n) {
|
|
3309
|
-
function a(
|
|
3309
|
+
function a(p, l, g, x) {
|
|
3310
3310
|
t.beginPath();
|
|
3311
|
-
for (var v = 0; v <
|
|
3312
|
-
t.moveTo(l +
|
|
3311
|
+
for (var v = 0; v < p.length; v += 1)
|
|
3312
|
+
t.moveTo(l + p[v].x * x, g + p[v].y * x), t.arc(l + p[v].x * x, g + p[v].y * x, 2, 0, Math.PI * 2, !1);
|
|
3313
3313
|
t.closePath(), t.fill();
|
|
3314
3314
|
}
|
|
3315
3315
|
e = e !== void 0 ? e : 0, r = r !== void 0 ? r : 0, n = n !== void 0 ? n : 24;
|
|
@@ -3410,8 +3410,8 @@ function qe(t, e, r) {
|
|
|
3410
3410
|
o = s + n[i];
|
|
3411
3411
|
} else
|
|
3412
3412
|
o = e + 2;
|
|
3413
|
-
for (var
|
|
3414
|
-
var l = _.getBytes(t, s + n[
|
|
3413
|
+
for (var p = 0; p < n.length - 1; p += 1) {
|
|
3414
|
+
var l = _.getBytes(t, s + n[p], s + n[p + 1]);
|
|
3415
3415
|
r && (l = r(l)), a.push(l);
|
|
3416
3416
|
}
|
|
3417
3417
|
return { objects: a, startOffset: e, endOffset: o };
|
|
@@ -3558,7 +3558,7 @@ function Vn(t, e, r, n) {
|
|
|
3558
3558
|
if (c !== 0 && u !== 0) {
|
|
3559
3559
|
var h = yi(t, u + e, c, n);
|
|
3560
3560
|
if (o._defaultWidthX = h.defaultWidthX, o._nominalWidthX = h.nominalWidthX, h.subrs !== 0) {
|
|
3561
|
-
var
|
|
3561
|
+
var p = u + h.subrs, l = qe(t, p + e);
|
|
3562
3562
|
o._subrs = l.objects, o._subrsBias = Qr(o._subrs);
|
|
3563
3563
|
}
|
|
3564
3564
|
o._privateDict = h;
|
|
@@ -3583,7 +3583,7 @@ function so(t, e, r, n) {
|
|
|
3583
3583
|
else if (c === 2)
|
|
3584
3584
|
for (; o.length <= r; ) {
|
|
3585
3585
|
a = s.parseSID(), i = s.parseCard16();
|
|
3586
|
-
for (var
|
|
3586
|
+
for (var p = 0; p <= i; p += 1)
|
|
3587
3587
|
o.push(kt(n, a)), a += 1;
|
|
3588
3588
|
}
|
|
3589
3589
|
else
|
|
@@ -3599,22 +3599,22 @@ function oo(t, e, r) {
|
|
|
3599
3599
|
var u = i.parseCard8();
|
|
3600
3600
|
n = 1;
|
|
3601
3601
|
for (var h = 0; h < u; h += 1)
|
|
3602
|
-
for (var
|
|
3602
|
+
for (var p = i.parseCard8(), l = i.parseCard8(), g = p; g <= p + l; g += 1)
|
|
3603
3603
|
a[g] = n, n += 1;
|
|
3604
3604
|
} else
|
|
3605
3605
|
throw new Error("Unknown encoding format " + s);
|
|
3606
3606
|
return new or(a, r);
|
|
3607
3607
|
}
|
|
3608
3608
|
function qn(t, e, r) {
|
|
3609
|
-
var n, a, i, s, o = new he(), c = [], u = 0, h = !1,
|
|
3609
|
+
var n, a, i, s, o = new he(), c = [], u = 0, h = !1, p = !1, l = 0, g = 0, x, v, b, m;
|
|
3610
3610
|
if (t.isCIDFont) {
|
|
3611
3611
|
var F = t.tables.cff.topDict._fdSelect[e.index], w = t.tables.cff.topDict._fdArray[F];
|
|
3612
|
-
x = w._subrs, v = w._subrsBias,
|
|
3612
|
+
x = w._subrs, v = w._subrsBias, b = w._defaultWidthX, m = w._nominalWidthX;
|
|
3613
3613
|
} else
|
|
3614
|
-
x = t.tables.cff.topDict._subrs, v = t.tables.cff.topDict._subrsBias,
|
|
3615
|
-
var k =
|
|
3614
|
+
x = t.tables.cff.topDict._subrs, v = t.tables.cff.topDict._subrsBias, b = t.tables.cff.topDict._defaultWidthX, m = t.tables.cff.topDict._nominalWidthX;
|
|
3615
|
+
var k = b;
|
|
3616
3616
|
function C(O, H) {
|
|
3617
|
-
|
|
3617
|
+
p && o.closePath(), o.moveTo(O, H), p = !0;
|
|
3618
3618
|
}
|
|
3619
3619
|
function U() {
|
|
3620
3620
|
var O;
|
|
@@ -3673,7 +3673,7 @@ function qn(t, e, r) {
|
|
|
3673
3673
|
}
|
|
3674
3674
|
break;
|
|
3675
3675
|
case 14:
|
|
3676
|
-
c.length > 0 && !h && (k = c.shift() + m, h = !0),
|
|
3676
|
+
c.length > 0 && !h && (k = c.shift() + m, h = !0), p && (o.closePath(), p = !1);
|
|
3677
3677
|
break;
|
|
3678
3678
|
case 18:
|
|
3679
3679
|
U();
|
|
@@ -3742,17 +3742,17 @@ function co(t, e, r, n) {
|
|
|
3742
3742
|
var u = s.parseCard16(), h = s.parseCard16();
|
|
3743
3743
|
if (h !== 0)
|
|
3744
3744
|
throw new Error("CFF Table CID Font FDSelect format 3 range has bad initial GID " + h);
|
|
3745
|
-
for (var
|
|
3746
|
-
if (i = s.parseCard8(),
|
|
3745
|
+
for (var p, l = 0; l < u; l++) {
|
|
3746
|
+
if (i = s.parseCard8(), p = s.parseCard16(), i >= n)
|
|
3747
3747
|
throw new Error("CFF table CID Font FDSelect has bad FD index value " + i + " (FD count " + n + ")");
|
|
3748
|
-
if (
|
|
3749
|
-
throw new Error("CFF Table CID Font FDSelect format 3 range has bad GID " +
|
|
3750
|
-
for (; h <
|
|
3748
|
+
if (p > r)
|
|
3749
|
+
throw new Error("CFF Table CID Font FDSelect format 3 range has bad GID " + p);
|
|
3750
|
+
for (; h < p; h++)
|
|
3751
3751
|
a.push(i);
|
|
3752
|
-
h =
|
|
3752
|
+
h = p;
|
|
3753
3753
|
}
|
|
3754
|
-
if (
|
|
3755
|
-
throw new Error("CFF Table CID Font FDSelect format 3 range has bad final GID " +
|
|
3754
|
+
if (p !== r)
|
|
3755
|
+
throw new Error("CFF Table CID Font FDSelect format 3 range has bad final GID " + p);
|
|
3756
3756
|
} else
|
|
3757
3757
|
throw new Error("CFF Table CID Font FDSelect table has unsupported format " + o);
|
|
3758
3758
|
return a;
|
|
@@ -3766,16 +3766,16 @@ function uo(t, e, r, n) {
|
|
|
3766
3766
|
throw new Error("CFF table has too many fonts in 'FontSet' - count of fonts NameIndex.length = " + u.length);
|
|
3767
3767
|
var h = u[0];
|
|
3768
3768
|
if (r.tables.cff.topDict = h, h._privateDict && (r.defaultWidthX = h._privateDict.defaultWidthX, r.nominalWidthX = h._privateDict.nominalWidthX), h.ros[0] !== void 0 && h.ros[1] !== void 0 && (r.isCIDFont = !0), r.isCIDFont) {
|
|
3769
|
-
var
|
|
3770
|
-
if (
|
|
3769
|
+
var p = h.fdArray, l = h.fdSelect;
|
|
3770
|
+
if (p === 0 || l === 0)
|
|
3771
3771
|
throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");
|
|
3772
|
-
|
|
3773
|
-
var g = qe(t,
|
|
3772
|
+
p += e;
|
|
3773
|
+
var g = qe(t, p), x = Vn(t, e, g.objects, o.objects);
|
|
3774
3774
|
h._fdArray = x, l += e, h._fdSelect = co(t, l, r.numGlyphs, x.length);
|
|
3775
3775
|
}
|
|
3776
|
-
var v = e + h.private[1],
|
|
3777
|
-
if (r.defaultWidthX =
|
|
3778
|
-
var m = v +
|
|
3776
|
+
var v = e + h.private[1], b = yi(t, v, h.private[0], o.objects);
|
|
3777
|
+
if (r.defaultWidthX = b.defaultWidthX, r.nominalWidthX = b.nominalWidthX, b.subrs !== 0) {
|
|
3778
|
+
var m = v + b.subrs, F = qe(t, m);
|
|
3779
3779
|
r.subrs = F.objects, r.subrsBias = Qr(r.subrs);
|
|
3780
3780
|
} else
|
|
3781
3781
|
r.subrs = [], r.subrsBias = 0;
|
|
@@ -3878,8 +3878,8 @@ function vo(t) {
|
|
|
3878
3878
|
else if (c.type === "L")
|
|
3879
3879
|
s = Math.round(c.x - n), o = Math.round(c.y - a), e.push({ name: "dx", type: "NUMBER", value: s }), e.push({ name: "dy", type: "NUMBER", value: o }), e.push({ name: "rlineto", type: "OP", value: 5 }), n = Math.round(c.x), a = Math.round(c.y);
|
|
3880
3880
|
else if (c.type === "C") {
|
|
3881
|
-
var
|
|
3882
|
-
s = Math.round(c.x - c.x2), o = Math.round(c.y - c.y2), e.push({ name: "dx1", type: "NUMBER", value:
|
|
3881
|
+
var p = Math.round(c.x1 - n), l = Math.round(c.y1 - a), g = Math.round(c.x2 - c.x1), x = Math.round(c.y2 - c.y1);
|
|
3882
|
+
s = Math.round(c.x - c.x2), o = Math.round(c.y - c.y2), e.push({ name: "dx1", type: "NUMBER", value: p }), e.push({ name: "dy1", type: "NUMBER", value: l }), e.push({ name: "dx2", type: "NUMBER", value: g }), e.push({ name: "dy2", type: "NUMBER", value: x }), e.push({ name: "dx", type: "NUMBER", value: s }), e.push({ name: "dy", type: "NUMBER", value: o }), e.push({ name: "rrcurveto", type: "OP", value: 8 }), n = Math.round(c.x), a = Math.round(c.y);
|
|
3883
3883
|
}
|
|
3884
3884
|
}
|
|
3885
3885
|
return e.push({ name: "endchar", type: "OP", value: 14 }), e;
|
|
@@ -3926,8 +3926,8 @@ function xo(t, e) {
|
|
|
3926
3926
|
r.header = ho(), r.nameIndex = lo([e.postScriptName]);
|
|
3927
3927
|
var h = Xn(a, u);
|
|
3928
3928
|
r.topDictIndex = Yn(h), r.globalSubrIndex = po(), r.charsets = go(s, u), r.charStringsIndex = yo(t), r.privateDict = mo(i, u), r.stringIndex = fo(u);
|
|
3929
|
-
var
|
|
3930
|
-
return a.charset =
|
|
3929
|
+
var p = r.header.sizeOf() + r.nameIndex.sizeOf() + r.topDictIndex.sizeOf() + r.stringIndex.sizeOf() + r.globalSubrIndex.sizeOf();
|
|
3930
|
+
return a.charset = p, a.encoding = 0, a.charStrings = a.charset + r.charsets.sizeOf(), a.private[1] = a.charStrings + r.charStringsIndex.sizeOf(), h = Xn(a, u), r.topDictIndex = Yn(h), r;
|
|
3931
3931
|
}
|
|
3932
3932
|
var bi = { parse: uo, make: xo };
|
|
3933
3933
|
function bo(t, e) {
|
|
@@ -4780,12 +4780,12 @@ function Ai(t, e, r) {
|
|
|
4780
4780
|
}
|
|
4781
4781
|
function Do(t, e, r) {
|
|
4782
4782
|
for (var n = {}, a = new _.Parser(t, e), i = a.parseUShort(), s = a.parseUShort(), o = a.offset + a.parseUShort(), c = 0; c < s; c++) {
|
|
4783
|
-
var u = a.parseUShort(), h = a.parseUShort(),
|
|
4784
|
-
if (m !== void 0 &&
|
|
4783
|
+
var u = a.parseUShort(), h = a.parseUShort(), p = a.parseUShort(), l = a.parseUShort(), g = Ci[l] || l, x = a.parseUShort(), v = a.parseUShort(), b = Ro(u, p, r), m = Ai(u, h, p);
|
|
4784
|
+
if (m !== void 0 && b !== void 0) {
|
|
4785
4785
|
var F = void 0;
|
|
4786
4786
|
if (m === Jr ? F = gt.UTF16(t, o + v, x) : F = gt.MACSTRING(t, o + v, x, m), F) {
|
|
4787
4787
|
var w = n[g];
|
|
4788
|
-
w === void 0 && (w = n[g] = {}), w[
|
|
4788
|
+
w === void 0 && (w = n[g] = {}), w[b] = F;
|
|
4789
4789
|
}
|
|
4790
4790
|
}
|
|
4791
4791
|
}
|
|
@@ -4836,15 +4836,15 @@ function Po(t, e) {
|
|
|
4836
4836
|
throw new Error('Name table entry "' + s + '" does not exist, see nameTableNames for complete list.');
|
|
4837
4837
|
a[r] = t[s], n.push(r);
|
|
4838
4838
|
}
|
|
4839
|
-
for (var c = xr(Ei), u = xr(Li), h = [],
|
|
4839
|
+
for (var c = xr(Ei), u = xr(Li), h = [], p = [], l = 0; l < n.length; l++) {
|
|
4840
4840
|
r = n[l];
|
|
4841
4841
|
var g = a[r];
|
|
4842
4842
|
for (var x in g) {
|
|
4843
|
-
var v = g[x],
|
|
4844
|
-
k === void 0 && (
|
|
4845
|
-
var C = $n(k,
|
|
4843
|
+
var v = g[x], b = 1, m = c[x], F = Oo[m], w = Ai(b, F, m), k = R.MACSTRING(v, w);
|
|
4844
|
+
k === void 0 && (b = 0, m = e.indexOf(x), m < 0 && (m = e.length, e.push(x)), F = 4, k = R.UTF16(v));
|
|
4845
|
+
var C = $n(k, p);
|
|
4846
4846
|
h.push(jn(
|
|
4847
|
-
|
|
4847
|
+
b,
|
|
4848
4848
|
F,
|
|
4849
4849
|
m,
|
|
4850
4850
|
r,
|
|
@@ -4853,7 +4853,7 @@ function Po(t, e) {
|
|
|
4853
4853
|
));
|
|
4854
4854
|
var U = u[x];
|
|
4855
4855
|
if (U !== void 0) {
|
|
4856
|
-
var B = R.UTF16(v), O = $n(B,
|
|
4856
|
+
var B = R.UTF16(v), O = $n(B, p);
|
|
4857
4857
|
h.push(jn(
|
|
4858
4858
|
3,
|
|
4859
4859
|
1,
|
|
@@ -4874,7 +4874,7 @@ function Po(t, e) {
|
|
|
4874
4874
|
{ name: "stringOffset", type: "USHORT", value: 6 + h.length * 12 }
|
|
4875
4875
|
]), W = 0; W < h.length; W++)
|
|
4876
4876
|
H.fields.push({ name: "record_" + W, type: "RECORD", value: h[W] });
|
|
4877
|
-
return H.fields.push({ name: "strings", type: "LITERAL", value:
|
|
4877
|
+
return H.fields.push({ name: "strings", type: "LITERAL", value: p }), H;
|
|
4878
4878
|
}
|
|
4879
4879
|
var Bi = { parse: Do, make: Po }, en = [
|
|
4880
4880
|
{ begin: 0, end: 127 },
|
|
@@ -5536,8 +5536,8 @@ function Mi(t) {
|
|
|
5536
5536
|
for (n.push({ name: u.tag + " Table Record", type: "RECORD", value: u }), a.push({ name: o.tableName + " table", type: "RECORD", value: o }), i += c, P.argument(!isNaN(i), "Something went wrong calculating the offset."); i % 4 !== 0; )
|
|
5537
5537
|
i += 1, a.push({ name: "padding", type: "BYTE", value: 0 });
|
|
5538
5538
|
}
|
|
5539
|
-
return n.sort(function(h,
|
|
5540
|
-
return h.value.tag >
|
|
5539
|
+
return n.sort(function(h, p) {
|
|
5540
|
+
return h.value.tag > p.value.tag ? 1 : -1;
|
|
5541
5541
|
}), e.fields = e.fields.concat(n), e.fields = e.fields.concat(a), e;
|
|
5542
5542
|
}
|
|
5543
5543
|
function Qn(t, e, r) {
|
|
@@ -5556,16 +5556,16 @@ function jo(t) {
|
|
|
5556
5556
|
return e / t.length;
|
|
5557
5557
|
}
|
|
5558
5558
|
function $o(t) {
|
|
5559
|
-
for (var e = [], r = [], n = [], a = [], i = [], s = [], o = [], c, u = 0, h = 0,
|
|
5560
|
-
var v = t.glyphs.get(x),
|
|
5559
|
+
for (var e = [], r = [], n = [], a = [], i = [], s = [], o = [], c, u = 0, h = 0, p = 0, l = 0, g = 0, x = 0; x < t.glyphs.length; x += 1) {
|
|
5560
|
+
var v = t.glyphs.get(x), b = v.unicode | 0;
|
|
5561
5561
|
if (isNaN(v.advanceWidth))
|
|
5562
5562
|
throw new Error("Glyph " + v.name + " (" + x + "): advanceWidth is not a number.");
|
|
5563
|
-
(c >
|
|
5564
|
-
var m = tn.getUnicodeRange(
|
|
5563
|
+
(c > b || c === void 0) && b > 0 && (c = b), u < b && (u = b);
|
|
5564
|
+
var m = tn.getUnicodeRange(b);
|
|
5565
5565
|
if (m < 32)
|
|
5566
5566
|
h |= 1 << m;
|
|
5567
5567
|
else if (m < 64)
|
|
5568
|
-
|
|
5568
|
+
p |= 1 << m - 32;
|
|
5569
5569
|
else if (m < 96)
|
|
5570
5570
|
l |= 1 << m - 64;
|
|
5571
5571
|
else if (m < 123)
|
|
@@ -5612,7 +5612,7 @@ function $o(t) {
|
|
|
5612
5612
|
usFirstCharIndex: c,
|
|
5613
5613
|
usLastCharIndex: u,
|
|
5614
5614
|
ulUnicodeRange1: h,
|
|
5615
|
-
ulUnicodeRange2:
|
|
5615
|
+
ulUnicodeRange2: p,
|
|
5616
5616
|
ulUnicodeRange3: l,
|
|
5617
5617
|
ulUnicodeRange4: g,
|
|
5618
5618
|
// See http://typophile.com/node/13081 for more info on vertical metrics.
|
|
@@ -5848,8 +5848,8 @@ Ut.prototype = {
|
|
|
5848
5848
|
subtables: [],
|
|
5849
5849
|
markFilteringSet: void 0
|
|
5850
5850
|
};
|
|
5851
|
-
var
|
|
5852
|
-
return u.push(o), c.push(
|
|
5851
|
+
var p = u.length;
|
|
5852
|
+
return u.push(o), c.push(p), [o];
|
|
5853
5853
|
}
|
|
5854
5854
|
}
|
|
5855
5855
|
return s;
|
|
@@ -5926,7 +5926,7 @@ Ot.prototype.getKerningValue = function(t, e, r) {
|
|
|
5926
5926
|
}
|
|
5927
5927
|
break;
|
|
5928
5928
|
case 2:
|
|
5929
|
-
var
|
|
5929
|
+
var p = this.getGlyphClass(s.classDef1, e), l = this.getGlyphClass(s.classDef2, r), g = s.classRecords[p][l];
|
|
5930
5930
|
return g.value1 && g.value1.xAdvance || 0;
|
|
5931
5931
|
}
|
|
5932
5932
|
}
|
|
@@ -5977,10 +5977,10 @@ me.prototype.getSingle = function(t, e, r) {
|
|
|
5977
5977
|
for (var s = a[i].subtables, o = 0; o < s.length; o++) {
|
|
5978
5978
|
var c = s[o], u = this.expandCoverage(c.coverage), h = void 0;
|
|
5979
5979
|
if (c.substFormat === 1) {
|
|
5980
|
-
var
|
|
5980
|
+
var p = c.deltaGlyphId;
|
|
5981
5981
|
for (h = 0; h < u.length; h++) {
|
|
5982
5982
|
var l = u[h];
|
|
5983
|
-
n.push({ sub: l, by: l +
|
|
5983
|
+
n.push({ sub: l, by: l + p });
|
|
5984
5984
|
}
|
|
5985
5985
|
} else {
|
|
5986
5986
|
var g = c.substitute;
|
|
@@ -5995,8 +5995,8 @@ me.prototype.getMultiple = function(t, e, r) {
|
|
|
5995
5995
|
for (var s = a[i].subtables, o = 0; o < s.length; o++) {
|
|
5996
5996
|
var c = s[o], u = this.expandCoverage(c.coverage), h = void 0;
|
|
5997
5997
|
for (h = 0; h < u.length; h++) {
|
|
5998
|
-
var
|
|
5999
|
-
n.push({ sub:
|
|
5998
|
+
var p = u[h], l = c.sequences[h];
|
|
5999
|
+
n.push({ sub: p, by: l });
|
|
6000
6000
|
}
|
|
6001
6001
|
}
|
|
6002
6002
|
return n;
|
|
@@ -6004,15 +6004,15 @@ me.prototype.getMultiple = function(t, e, r) {
|
|
|
6004
6004
|
me.prototype.getAlternates = function(t, e, r) {
|
|
6005
6005
|
for (var n = [], a = this.getLookupTables(e, r, t, 3), i = 0; i < a.length; i++)
|
|
6006
6006
|
for (var s = a[i].subtables, o = 0; o < s.length; o++)
|
|
6007
|
-
for (var c = s[o], u = this.expandCoverage(c.coverage), h = c.alternateSets,
|
|
6008
|
-
n.push({ sub: u[
|
|
6007
|
+
for (var c = s[o], u = this.expandCoverage(c.coverage), h = c.alternateSets, p = 0; p < u.length; p++)
|
|
6008
|
+
n.push({ sub: u[p], by: h[p] });
|
|
6009
6009
|
return n;
|
|
6010
6010
|
};
|
|
6011
6011
|
me.prototype.getLigatures = function(t, e, r) {
|
|
6012
6012
|
for (var n = [], a = this.getLookupTables(e, r, t, 4), i = 0; i < a.length; i++)
|
|
6013
6013
|
for (var s = a[i].subtables, o = 0; o < s.length; o++)
|
|
6014
|
-
for (var c = s[o], u = this.expandCoverage(c.coverage), h = c.ligatureSets,
|
|
6015
|
-
for (var l = u[
|
|
6014
|
+
for (var c = s[o], u = this.expandCoverage(c.coverage), h = c.ligatureSets, p = 0; p < u.length; p++)
|
|
6015
|
+
for (var l = u[p], g = h[p], x = 0; x < g.length; x++) {
|
|
6016
6016
|
var v = g[x];
|
|
6017
6017
|
n.push({
|
|
6018
6018
|
sub: [l].concat(v.components),
|
|
@@ -6068,8 +6068,8 @@ me.prototype.addLigature = function(t, e, r, n) {
|
|
|
6068
6068
|
components: o
|
|
6069
6069
|
}, u = this.binSearch(i.coverage.glyphs, s);
|
|
6070
6070
|
if (u >= 0) {
|
|
6071
|
-
for (var h = i.ligatureSets[u],
|
|
6072
|
-
if (Ko(h[
|
|
6071
|
+
for (var h = i.ligatureSets[u], p = 0; p < h.length; p++)
|
|
6072
|
+
if (Ko(h[p].components, o))
|
|
6073
6073
|
return;
|
|
6074
6074
|
h.push(c);
|
|
6075
6075
|
} else
|
|
@@ -6137,15 +6137,15 @@ function Ii(t, e, r) {
|
|
|
6137
6137
|
a = [];
|
|
6138
6138
|
for (var h = 0; h < u; h += 1)
|
|
6139
6139
|
if (i = n.parseByte(), a.push(i), (i & 8) > 0)
|
|
6140
|
-
for (var
|
|
6140
|
+
for (var p = n.parseByte(), l = 0; l < p; l += 1)
|
|
6141
6141
|
a.push(i), h += 1;
|
|
6142
6142
|
if (P.argument(a.length === u, "Bad flags."), s.length > 0) {
|
|
6143
6143
|
var g = [], x;
|
|
6144
6144
|
if (u > 0) {
|
|
6145
6145
|
for (var v = 0; v < u; v += 1)
|
|
6146
6146
|
i = a[v], x = {}, x.onCurve = !!(i & 1), x.lastPointOfContour = s.indexOf(v) >= 0, g.push(x);
|
|
6147
|
-
for (var
|
|
6148
|
-
i = a[m], x = g[m], x.x = ta(n, i,
|
|
6147
|
+
for (var b = 0, m = 0; m < u; m += 1)
|
|
6148
|
+
i = a[m], x = g[m], x.x = ta(n, i, b, 2, 16), b = x.x;
|
|
6149
6149
|
for (var F = 0, w = 0; w < u; w += 1)
|
|
6150
6150
|
i = a[w], x = g[w], x.y = ta(n, i, F, 4, 32), F = x.y;
|
|
6151
6151
|
}
|
|
@@ -6437,8 +6437,8 @@ Rt.prototype.interpolate = function(t, e, r, n) {
|
|
|
6437
6437
|
};
|
|
6438
6438
|
Rt.prototype.setRelative = function(t, e, r, n, a) {
|
|
6439
6439
|
n = n || this;
|
|
6440
|
-
var i = a ? e.xo : e.x, s = a ? e.yo : e.y, o = i + r * n.x, c = s + r * n.y, u = n.normalSlope, h = this.slope,
|
|
6441
|
-
t.x = (h *
|
|
6440
|
+
var i = a ? e.xo : e.x, s = a ? e.yo : e.y, o = i + r * n.x, c = s + r * n.y, u = n.normalSlope, h = this.slope, p = t.x, l = t.y;
|
|
6441
|
+
t.x = (h * p - u * o + c - l) / (h - u), t.y = h * (t.x - p) + l;
|
|
6442
6442
|
};
|
|
6443
6443
|
Rt.prototype.touch = function(t) {
|
|
6444
6444
|
t.xTouched = !0, t.yTouched = !0;
|
|
@@ -6526,10 +6526,10 @@ Gi = function(t, e) {
|
|
|
6526
6526
|
var c = e.font;
|
|
6527
6527
|
s = [], i = [];
|
|
6528
6528
|
for (var u = 0; u < a.length; u++) {
|
|
6529
|
-
var h = a[u],
|
|
6530
|
-
o = new je("glyf",
|
|
6531
|
-
for (var l = Math.round(h.dx * r), g = Math.round(h.dy * n), x = o.gZone, v = o.contours,
|
|
6532
|
-
var m = x[
|
|
6529
|
+
var h = a[u], p = c.glyphs.get(h.glyphIndex);
|
|
6530
|
+
o = new je("glyf", p.instructions), exports.DEBUG && (console.log("---EXEC COMP " + u + "---"), o.step = -1), rn(p, o, r, n);
|
|
6531
|
+
for (var l = Math.round(h.dx * r), g = Math.round(h.dy * n), x = o.gZone, v = o.contours, b = 0; b < x.length; b++) {
|
|
6532
|
+
var m = x[b];
|
|
6533
6533
|
m.xTouched = m.yTouched = !1, m.xo = m.x = m.x + l, m.yo = m.y = m.y + g;
|
|
6534
6534
|
}
|
|
6535
6535
|
var F = s.length;
|
|
@@ -6552,8 +6552,8 @@ rn = function(t, e, r, n) {
|
|
|
6552
6552
|
c.lastPointOfContour,
|
|
6553
6553
|
c.onCurve
|
|
6554
6554
|
);
|
|
6555
|
-
for (var h,
|
|
6556
|
-
c = s[l], h || (h = c, o.push(l)), c.lastPointOfContour ? (c.nextPointOnContour = h, h.prevPointOnContour = c, h = void 0) : (
|
|
6555
|
+
for (var h, p, l = 0; l < i; l++)
|
|
6556
|
+
c = s[l], h || (h = c, o.push(l)), c.lastPointOfContour ? (c.nextPointOnContour = h, h.prevPointOnContour = c, h = void 0) : (p = s[l + 1], c.nextPointOnContour = p, p.prevPointOnContour = c);
|
|
6557
6557
|
if (!e.inhibitGridFit) {
|
|
6558
6558
|
if (exports.DEBUG) {
|
|
6559
6559
|
console.log("PROCESSING GLYPH", e.stack);
|
|
@@ -6648,10 +6648,10 @@ function dc(t) {
|
|
|
6648
6648
|
t.fv = t.pv, exports.DEBUG && console.log(t.step, "SFVTPV[]");
|
|
6649
6649
|
}
|
|
6650
6650
|
function gc(t) {
|
|
6651
|
-
var e = t.stack, r = e.pop(), n = e.pop(), a = e.pop(), i = e.pop(), s = e.pop(), o = t.z0, c = t.z1, u = o[r], h = o[n],
|
|
6651
|
+
var e = t.stack, r = e.pop(), n = e.pop(), a = e.pop(), i = e.pop(), s = e.pop(), o = t.z0, c = t.z1, u = o[r], h = o[n], p = c[a], l = c[i], g = t.z2[s];
|
|
6652
6652
|
exports.DEBUG && console.log("ISECT[], ", r, n, a, i, s);
|
|
6653
|
-
var x = u.x, v = u.y,
|
|
6654
|
-
g.x = (B * (F - k) - O * (x -
|
|
6653
|
+
var x = u.x, v = u.y, b = h.x, m = h.y, F = p.x, w = p.y, k = l.x, C = l.y, U = (x - b) * (w - C) - (v - m) * (F - k), B = x * m - v * b, O = F * C - w * k;
|
|
6654
|
+
g.x = (B * (F - k) - O * (x - b)) / U, g.y = (B * (w - C) - O * (v - m)) / U;
|
|
6655
6655
|
}
|
|
6656
6656
|
function vc(t) {
|
|
6657
6657
|
t.rp0 = t.stack.pop(), exports.DEBUG && console.log(t.step, "SRP0[]", t.rp0);
|
|
@@ -6805,8 +6805,8 @@ function ca(t, e) {
|
|
|
6805
6805
|
}
|
|
6806
6806
|
function ua(t, e) {
|
|
6807
6807
|
for (var r = e.stack, n = t ? e.rp1 : e.rp2, a = (t ? e.z0 : e.z1)[n], i = e.fv, s = e.pv, o = e.loop, c = e.z2; o--; ) {
|
|
6808
|
-
var u = r.pop(), h = c[u],
|
|
6809
|
-
i.setRelative(h, h,
|
|
6808
|
+
var u = r.pop(), h = c[u], p = s.distance(a, a, !1, !0);
|
|
6809
|
+
i.setRelative(h, h, p, s), i.touch(h), exports.DEBUG && console.log(
|
|
6810
6810
|
e.step,
|
|
6811
6811
|
(e.loop > 1 ? "loop " + (e.loop - o) + ": " : "") + "SHP[" + (t ? "rp1" : "rp2") + "]",
|
|
6812
6812
|
u
|
|
@@ -6836,7 +6836,7 @@ function la(t, e) {
|
|
|
6836
6836
|
default:
|
|
6837
6837
|
throw new Error("Invalid zone");
|
|
6838
6838
|
}
|
|
6839
|
-
for (var u, h = s.distance(a, a, !1, !0),
|
|
6839
|
+
for (var u, h = s.distance(a, a, !1, !0), p = c.length - 2, l = 0; l < p; l++)
|
|
6840
6840
|
u = c[l], i.setRelative(u, u, h, s);
|
|
6841
6841
|
}
|
|
6842
6842
|
function Nc(t) {
|
|
@@ -6853,7 +6853,7 @@ function Nc(t) {
|
|
|
6853
6853
|
}
|
|
6854
6854
|
function Gc(t) {
|
|
6855
6855
|
for (var e = t.stack, r = t.rp1, n = t.rp2, a = t.loop, i = t.z0[r], s = t.z1[n], o = t.fv, c = t.dpv, u = t.z2; a--; ) {
|
|
6856
|
-
var h = e.pop(),
|
|
6856
|
+
var h = e.pop(), p = u[h];
|
|
6857
6857
|
exports.DEBUG && console.log(
|
|
6858
6858
|
t.step,
|
|
6859
6859
|
(t.loop > 1 ? "loop " + (t.loop - a) + ": " : "") + "IP[]",
|
|
@@ -6861,7 +6861,7 @@ function Gc(t) {
|
|
|
6861
6861
|
r,
|
|
6862
6862
|
"<->",
|
|
6863
6863
|
n
|
|
6864
|
-
), o.interpolate(
|
|
6864
|
+
), o.interpolate(p, i, s, c), o.touch(p);
|
|
6865
6865
|
}
|
|
6866
6866
|
t.loop = 1;
|
|
6867
6867
|
}
|
|
@@ -7002,11 +7002,11 @@ function Fr(t, e) {
|
|
|
7002
7002
|
var r = e.stack, n = r.pop(), a = e.fv, i = e.pv, s = e.ppem, o = e.deltaBase + (t - 1) * 16, c = e.deltaShift, u = e.z0;
|
|
7003
7003
|
exports.DEBUG && console.log(e.step, "DELTAP[" + t + "]", n, r);
|
|
7004
7004
|
for (var h = 0; h < n; h++) {
|
|
7005
|
-
var
|
|
7005
|
+
var p = r.pop(), l = r.pop(), g = o + ((l & 240) >> 4);
|
|
7006
7006
|
if (g === s) {
|
|
7007
7007
|
var x = (l & 15) - 8;
|
|
7008
|
-
x >= 0 && x++, exports.DEBUG && console.log(e.step, "DELTAPFIX",
|
|
7009
|
-
var v = u[
|
|
7008
|
+
x >= 0 && x++, exports.DEBUG && console.log(e.step, "DELTAPFIX", p, "by", x * c);
|
|
7009
|
+
var v = u[p];
|
|
7010
7010
|
a.setRelative(v, v, x * c, i);
|
|
7011
7011
|
}
|
|
7012
7012
|
}
|
|
@@ -7065,9 +7065,9 @@ function kr(t, e) {
|
|
|
7065
7065
|
for (var o = 0; o < n; o++) {
|
|
7066
7066
|
var c = r.pop(), u = r.pop(), h = i + ((u & 240) >> 4);
|
|
7067
7067
|
if (h === a) {
|
|
7068
|
-
var
|
|
7069
|
-
|
|
7070
|
-
var l =
|
|
7068
|
+
var p = (u & 15) - 8;
|
|
7069
|
+
p >= 0 && p++;
|
|
7070
|
+
var l = p * s;
|
|
7071
7071
|
exports.DEBUG && console.log(e.step, "DELTACFIX", c, "by", l), e.cvt[c] += l;
|
|
7072
7072
|
}
|
|
7073
7073
|
}
|
|
@@ -7211,8 +7211,8 @@ function Ve(t, e) {
|
|
|
7211
7211
|
e.ip = r;
|
|
7212
7212
|
}
|
|
7213
7213
|
function D(t, e, r, n, a, i) {
|
|
7214
|
-
var s = i.stack, o = t && s.pop(), c = s.pop(), u = i.rp0, h = i.z0[u],
|
|
7215
|
-
|
|
7214
|
+
var s = i.stack, o = t && s.pop(), c = s.pop(), u = i.rp0, h = i.z0[u], p = i.z1[c], l = i.minDis, g = i.fv, x = i.dpv, v, b, m, F;
|
|
7215
|
+
b = v = x.distance(p, h, !0, !0), m = b >= 0 ? 1 : -1, b = Math.abs(b), t && (F = i.cvt[o], n && Math.abs(b - F) < i.cvCutIn && (b = F)), r && b < l && (b = l), n && (b = i.round(b)), g.setRelative(p, h, m * b, x), g.touch(p), exports.DEBUG && console.log(
|
|
7216
7216
|
i.step,
|
|
7217
7217
|
(t ? "MIRP[" : "MDRP[") + (e ? "M" : "m") + (r ? ">" : "_") + (n ? "R" : "_") + (a === 0 ? "Gr" : a === 1 ? "Bl" : a === 2 ? "Wh" : "") + "]",
|
|
7218
7218
|
t ? o + "(" + i.cvt[o] + "," + F + ")" : "",
|
|
@@ -7220,7 +7220,7 @@ function D(t, e, r, n, a, i) {
|
|
|
7220
7220
|
"(d =",
|
|
7221
7221
|
v,
|
|
7222
7222
|
"->",
|
|
7223
|
-
m *
|
|
7223
|
+
m * b,
|
|
7224
7224
|
")"
|
|
7225
7225
|
), i.rp1 = i.rp0, i.rp2 = c, e && (i.rp0 = c);
|
|
7226
7226
|
}
|
|
@@ -8096,11 +8096,11 @@ function Pu(t, e) {
|
|
|
8096
8096
|
var u = new Ce(c, 0), h = Tr(
|
|
8097
8097
|
e.backtrackCoverage,
|
|
8098
8098
|
u
|
|
8099
|
-
),
|
|
8100
|
-
if (
|
|
8099
|
+
), p = n.length === e.inputCoverage.length && o.length === e.lookaheadCoverage.length && h.length === e.backtrackCoverage.length, l = [];
|
|
8100
|
+
if (p)
|
|
8101
8101
|
for (var g = 0; g < e.lookupRecords.length; g++)
|
|
8102
|
-
for (var x = e.lookupRecords[g], v = x.lookupListIndex,
|
|
8103
|
-
var F =
|
|
8102
|
+
for (var x = e.lookupRecords[g], v = x.lookupListIndex, b = this.getLookupByIndex(v), m = 0; m < b.subtables.length; m++) {
|
|
8103
|
+
var F = b.subtables[m], w = this.getLookupMethod(b, F), k = this.getSubstitutionType(b, F);
|
|
8104
8104
|
if (k === "12")
|
|
8105
8105
|
for (var C = 0; C < n.length; C++) {
|
|
8106
8106
|
var U = t.get(C), B = w(U);
|
|
@@ -8237,8 +8237,8 @@ xe.prototype.lookupFeature = function(t) {
|
|
|
8237
8237
|
);
|
|
8238
8238
|
for (var a = this.getFeatureLookups(n), i = [].concat(e.context), s = 0; s < a.length; s++)
|
|
8239
8239
|
for (var o = a[s], c = this.getLookupSubtables(o), u = 0; u < c.length; u++) {
|
|
8240
|
-
var h = c[u],
|
|
8241
|
-
switch (
|
|
8240
|
+
var h = c[u], p = this.getSubstitutionType(o, h), l = this.getLookupMethod(o, h), g = void 0;
|
|
8241
|
+
switch (p) {
|
|
8242
8242
|
case "11":
|
|
8243
8243
|
g = l(e.current), g && i.splice(r, 1, new it({
|
|
8244
8244
|
id: 11,
|
|
@@ -8445,14 +8445,14 @@ function Ju(t) {
|
|
|
8445
8445
|
break;
|
|
8446
8446
|
}
|
|
8447
8447
|
if (n.indexOf(h) !== -1) {
|
|
8448
|
-
var
|
|
8448
|
+
var p = e.query.lookupFeature({
|
|
8449
8449
|
tag: h,
|
|
8450
8450
|
script: r,
|
|
8451
8451
|
contextParams: i
|
|
8452
8452
|
});
|
|
8453
|
-
if (
|
|
8454
|
-
return console.info(
|
|
8455
|
-
|
|
8453
|
+
if (p instanceof Error)
|
|
8454
|
+
return console.info(p.message);
|
|
8455
|
+
p.forEach(function(l, g) {
|
|
8456
8456
|
l instanceof it && (dn(l, a, g), i.context[g] = l.substitution);
|
|
8457
8457
|
});
|
|
8458
8458
|
}
|
|
@@ -8697,8 +8697,8 @@ j.prototype.updateFeatures = function(t) {
|
|
|
8697
8697
|
});
|
|
8698
8698
|
};
|
|
8699
8699
|
j.prototype.stringToGlyphs = function(t, e) {
|
|
8700
|
-
var r = this, n = new Ae(), a = function(
|
|
8701
|
-
return r.charToGlyphIndex(
|
|
8700
|
+
var r = this, n = new Ae(), a = function(p) {
|
|
8701
|
+
return r.charToGlyphIndex(p.char);
|
|
8702
8702
|
};
|
|
8703
8703
|
n.registerModifier("glyphIndex", null, a);
|
|
8704
8704
|
var i = e ? this.updateFeatures(e.features) : this.defaultRenderOptions.features;
|
|
@@ -8741,9 +8741,9 @@ j.prototype.forEachGlyph = function(t, e, r, n, a, i) {
|
|
|
8741
8741
|
c = this.position.getKerningTables(u, a.language);
|
|
8742
8742
|
}
|
|
8743
8743
|
for (var h = 0; h < o.length; h += 1) {
|
|
8744
|
-
var
|
|
8745
|
-
if (i.call(this,
|
|
8746
|
-
var l = c ? this.position.getKerningValue(c,
|
|
8744
|
+
var p = o[h];
|
|
8745
|
+
if (i.call(this, p, e, r, n, a), p.advanceWidth && (e += p.advanceWidth * s), a.kerning && h < o.length - 1) {
|
|
8746
|
+
var l = c ? this.position.getKerningValue(c, p.index, o[h + 1].index) : this.getKerningValue(p, o[h + 1]);
|
|
8747
8747
|
e += l * s;
|
|
8748
8748
|
}
|
|
8749
8749
|
a.letterSpacing ? e += a.letterSpacing * n : a.tracking && (e += a.tracking / 1e3 * n);
|
|
@@ -8938,8 +8938,8 @@ function gh(t, e, r) {
|
|
|
8938
8938
|
P.argument(a === 65536, "Unsupported fvar table version.");
|
|
8939
8939
|
var i = n.parseOffset16();
|
|
8940
8940
|
n.skip("uShort", 1);
|
|
8941
|
-
for (var s = n.parseUShort(), o = n.parseUShort(), c = n.parseUShort(), u = n.parseUShort(), h = [],
|
|
8942
|
-
h.push(lh(t, e + i +
|
|
8941
|
+
for (var s = n.parseUShort(), o = n.parseUShort(), c = n.parseUShort(), u = n.parseUShort(), h = [], p = 0; p < s; p++)
|
|
8942
|
+
h.push(lh(t, e + i + p * o, r));
|
|
8943
8943
|
for (var l = [], g = e + i + s * o, x = 0; x < c; x++)
|
|
8944
8944
|
l.push(ph(t, g + x * u, h, r));
|
|
8945
8945
|
return { axes: h, instances: l };
|
|
@@ -9184,7 +9184,7 @@ function Ih(t, e) {
|
|
|
9184
9184
|
s = _.getUShort(i, 12), o = Mh(i, s);
|
|
9185
9185
|
} else
|
|
9186
9186
|
throw new Error("Unsupported OpenType signature " + c);
|
|
9187
|
-
for (var h,
|
|
9187
|
+
for (var h, p, l, g, x, v, b, m, F, w, k, C, U = 0; U < s; U += 1) {
|
|
9188
9188
|
var B = o[U], O = void 0;
|
|
9189
9189
|
switch (B.tag) {
|
|
9190
9190
|
case "cmap":
|
|
@@ -9194,7 +9194,7 @@ function Ih(t, e) {
|
|
|
9194
9194
|
O = ie(i, B), C = new _.Parser(O.data, O.offset), a.tables.cvt = C.parseShortList(B.length / 2);
|
|
9195
9195
|
break;
|
|
9196
9196
|
case "fvar":
|
|
9197
|
-
|
|
9197
|
+
p = B;
|
|
9198
9198
|
break;
|
|
9199
9199
|
case "fpgm":
|
|
9200
9200
|
O = ie(i, B), C = new _.Parser(O.data, O.offset), a.tables.fpgm = C.parseByteList(B.length);
|
|
@@ -9206,7 +9206,7 @@ function Ih(t, e) {
|
|
|
9206
9206
|
O = ie(i, B), a.tables.hhea = wi.parse(O.data, O.offset), a.ascender = a.tables.hhea.ascender, a.descender = a.tables.hhea.descender, a.numberOfHMetrics = a.tables.hhea.numberOfHMetrics;
|
|
9207
9207
|
break;
|
|
9208
9208
|
case "hmtx":
|
|
9209
|
-
|
|
9209
|
+
b = B;
|
|
9210
9210
|
break;
|
|
9211
9211
|
case "ltag":
|
|
9212
9212
|
O = ie(i, B), n = ki.parse(O.data, O.offset);
|
|
@@ -9261,7 +9261,7 @@ function Ih(t, e) {
|
|
|
9261
9261
|
bi.parse($.data, $.offset, a, e);
|
|
9262
9262
|
} else
|
|
9263
9263
|
throw new Error("Font doesn't contain TrueType or CFF outlines.");
|
|
9264
|
-
var K = ie(i,
|
|
9264
|
+
var K = ie(i, b);
|
|
9265
9265
|
if (Fi.parse(a, K.data, K.offset, a.numberOfHMetrics, a.numGlyphs, a.glyphs, e), Ys(a, e), m) {
|
|
9266
9266
|
var Q = ie(i, m);
|
|
9267
9267
|
a.kerningPairs = Uh.parse(Q.data, Q.offset);
|
|
@@ -9279,8 +9279,8 @@ function Ih(t, e) {
|
|
|
9279
9279
|
var oe = ie(i, v);
|
|
9280
9280
|
a.tables.gsub = Oi.parse(oe.data, oe.offset);
|
|
9281
9281
|
}
|
|
9282
|
-
if (
|
|
9283
|
-
var fe = ie(i,
|
|
9282
|
+
if (p) {
|
|
9283
|
+
var fe = ie(i, p);
|
|
9284
9284
|
a.tables.fvar = vh.parse(fe.data, fe.offset, a.names);
|
|
9285
9285
|
}
|
|
9286
9286
|
if (k) {
|
|
@@ -9293,30 +9293,30 @@ function Sa(t, e = !1) {
|
|
|
9293
9293
|
const r = t[0].index !== null, n = new Set(Object.keys(t[0].attributes)), a = new Set(Object.keys(t[0].morphAttributes)), i = {}, s = {}, o = t[0].morphTargetsRelative, c = new rs();
|
|
9294
9294
|
let u = 0;
|
|
9295
9295
|
for (let h = 0; h < t.length; ++h) {
|
|
9296
|
-
const
|
|
9296
|
+
const p = t[h];
|
|
9297
9297
|
let l = 0;
|
|
9298
|
-
if (r !== (
|
|
9298
|
+
if (r !== (p.index !== null))
|
|
9299
9299
|
return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " + h + ". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."), null;
|
|
9300
|
-
for (const g in
|
|
9300
|
+
for (const g in p.attributes) {
|
|
9301
9301
|
if (!n.has(g))
|
|
9302
9302
|
return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " + h + '. All geometries must have compatible attributes; make sure "' + g + '" attribute exists among all geometries, or in none of them.'), null;
|
|
9303
|
-
i[g] === void 0 && (i[g] = []), i[g].push(
|
|
9303
|
+
i[g] === void 0 && (i[g] = []), i[g].push(p.attributes[g]), l++;
|
|
9304
9304
|
}
|
|
9305
9305
|
if (l !== n.size)
|
|
9306
9306
|
return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " + h + ". Make sure all geometries have the same number of attributes."), null;
|
|
9307
|
-
if (o !==
|
|
9307
|
+
if (o !== p.morphTargetsRelative)
|
|
9308
9308
|
return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " + h + ". .morphTargetsRelative must be consistent throughout all geometries."), null;
|
|
9309
|
-
for (const g in
|
|
9309
|
+
for (const g in p.morphAttributes) {
|
|
9310
9310
|
if (!a.has(g))
|
|
9311
9311
|
return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " + h + ". .morphAttributes must be consistent throughout all geometries."), null;
|
|
9312
|
-
s[g] === void 0 && (s[g] = []), s[g].push(
|
|
9312
|
+
s[g] === void 0 && (s[g] = []), s[g].push(p.morphAttributes[g]);
|
|
9313
9313
|
}
|
|
9314
9314
|
if (e) {
|
|
9315
9315
|
let g;
|
|
9316
9316
|
if (r)
|
|
9317
|
-
g =
|
|
9318
|
-
else if (
|
|
9319
|
-
g =
|
|
9317
|
+
g = p.index.count;
|
|
9318
|
+
else if (p.attributes.position !== void 0)
|
|
9319
|
+
g = p.attributes.position.count;
|
|
9320
9320
|
else
|
|
9321
9321
|
return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " + h + ". The geometry must have either an index or a position attribute"), null;
|
|
9322
9322
|
c.addGroup(u, g, h), u += g;
|
|
@@ -9324,26 +9324,26 @@ function Sa(t, e = !1) {
|
|
|
9324
9324
|
}
|
|
9325
9325
|
if (r) {
|
|
9326
9326
|
let h = 0;
|
|
9327
|
-
const
|
|
9327
|
+
const p = [];
|
|
9328
9328
|
for (let l = 0; l < t.length; ++l) {
|
|
9329
9329
|
const g = t[l].index;
|
|
9330
9330
|
for (let x = 0; x < g.count; ++x)
|
|
9331
|
-
|
|
9331
|
+
p.push(g.getX(x) + h);
|
|
9332
9332
|
h += t[l].attributes.position.count;
|
|
9333
9333
|
}
|
|
9334
|
-
c.setIndex(
|
|
9334
|
+
c.setIndex(p);
|
|
9335
9335
|
}
|
|
9336
9336
|
for (const h in i) {
|
|
9337
|
-
const
|
|
9338
|
-
if (!
|
|
9337
|
+
const p = wa(i[h]);
|
|
9338
|
+
if (!p)
|
|
9339
9339
|
return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the " + h + " attribute."), null;
|
|
9340
|
-
c.setAttribute(h,
|
|
9340
|
+
c.setAttribute(h, p);
|
|
9341
9341
|
}
|
|
9342
9342
|
for (const h in s) {
|
|
9343
|
-
const
|
|
9344
|
-
if (
|
|
9343
|
+
const p = s[h][0].length;
|
|
9344
|
+
if (p === 0) break;
|
|
9345
9345
|
c.morphAttributes = c.morphAttributes || {}, c.morphAttributes[h] = [];
|
|
9346
|
-
for (let l = 0; l <
|
|
9346
|
+
for (let l = 0; l < p; ++l) {
|
|
9347
9347
|
const g = [];
|
|
9348
9348
|
for (let v = 0; v < s[h].length; ++v)
|
|
9349
9349
|
g.push(s[h][v][l]);
|
|
@@ -9374,11 +9374,11 @@ function wa(t) {
|
|
|
9374
9374
|
for (let u = 0; u < t.length; ++u) {
|
|
9375
9375
|
const h = t[u];
|
|
9376
9376
|
if (h.isInterleavedBufferAttribute) {
|
|
9377
|
-
const
|
|
9377
|
+
const p = c / r;
|
|
9378
9378
|
for (let l = 0, g = h.count; l < g; l++)
|
|
9379
9379
|
for (let x = 0; x < r; x++) {
|
|
9380
9380
|
const v = h.getComponent(l, x);
|
|
9381
|
-
o.setComponent(l +
|
|
9381
|
+
o.setComponent(l + p, x, v);
|
|
9382
9382
|
}
|
|
9383
9383
|
} else
|
|
9384
9384
|
s.set(h.array, c);
|
|
@@ -9390,7 +9390,7 @@ function Dh(t, e = 1e-4) {
|
|
|
9390
9390
|
e = Math.max(e, Number.EPSILON);
|
|
9391
9391
|
const r = {}, n = t.getIndex(), a = t.getAttribute("position"), i = n ? n.count : a.count;
|
|
9392
9392
|
let s = 0;
|
|
9393
|
-
const o = Object.keys(t.attributes), c = {}, u = {}, h = [],
|
|
9393
|
+
const o = Object.keys(t.attributes), c = {}, u = {}, h = [], p = ["getX", "getY", "getZ", "getW"], l = ["setX", "setY", "setZ", "setW"];
|
|
9394
9394
|
for (let F = 0, w = o.length; F < w; F++) {
|
|
9395
9395
|
const k = o[F], C = t.attributes[k];
|
|
9396
9396
|
c[k] = new C.constructor(
|
|
@@ -9404,14 +9404,14 @@ function Dh(t, e = 1e-4) {
|
|
|
9404
9404
|
u[k][O] = new B.constructor(H, B.itemSize, B.normalized);
|
|
9405
9405
|
}));
|
|
9406
9406
|
}
|
|
9407
|
-
const g = e * 0.5, x = Math.log10(1 / e), v = Math.pow(10, x),
|
|
9407
|
+
const g = e * 0.5, x = Math.log10(1 / e), v = Math.pow(10, x), b = g * v;
|
|
9408
9408
|
for (let F = 0; F < i; F++) {
|
|
9409
9409
|
const w = n ? n.getX(F) : F;
|
|
9410
9410
|
let k = "";
|
|
9411
9411
|
for (let C = 0, U = o.length; C < U; C++) {
|
|
9412
9412
|
const B = o[C], O = t.getAttribute(B), H = O.itemSize;
|
|
9413
9413
|
for (let W = 0; W < H; W++)
|
|
9414
|
-
k += `${~~(O[
|
|
9414
|
+
k += `${~~(O[p[W]](w) * v + b)},`;
|
|
9415
9415
|
}
|
|
9416
9416
|
if (k in r)
|
|
9417
9417
|
h.push(r[k]);
|
|
@@ -9419,7 +9419,7 @@ function Dh(t, e = 1e-4) {
|
|
|
9419
9419
|
for (let C = 0, U = o.length; C < U; C++) {
|
|
9420
9420
|
const B = o[C], O = t.getAttribute(B), H = t.morphAttributes[B], W = O.itemSize, z = c[B], le = u[B];
|
|
9421
9421
|
for (let ce = 0; ce < W; ce++) {
|
|
9422
|
-
const $ =
|
|
9422
|
+
const $ = p[ce], K = l[ce];
|
|
9423
9423
|
if (z[K](s, O[$](w)), H)
|
|
9424
9424
|
for (let Q = 0, ae = H.length; Q < ae; Q++)
|
|
9425
9425
|
le[Q][K](s, H[Q][$](w));
|
|
@@ -9500,8 +9500,8 @@ function Ph(t, e, r) {
|
|
|
9500
9500
|
`)
|
|
9501
9501
|
o = 0, c -= i;
|
|
9502
9502
|
else {
|
|
9503
|
-
const
|
|
9504
|
-
o +=
|
|
9503
|
+
const p = Nh(h, a, o, c, r);
|
|
9504
|
+
o += p.offsetX, s.push(p.path);
|
|
9505
9505
|
}
|
|
9506
9506
|
}
|
|
9507
9507
|
return s;
|
|
@@ -9513,22 +9513,22 @@ function Nh(t, e, r, n, a) {
|
|
|
9513
9513
|
return;
|
|
9514
9514
|
}
|
|
9515
9515
|
const s = new Ya();
|
|
9516
|
-
let o, c, u, h,
|
|
9516
|
+
let o, c, u, h, p, l, g, x;
|
|
9517
9517
|
if (i.o) {
|
|
9518
9518
|
const v = i._cachedOutline || (i._cachedOutline = i.o.split(" "));
|
|
9519
|
-
for (let
|
|
9520
|
-
switch (v[
|
|
9519
|
+
for (let b = 0, m = v.length; b < m; )
|
|
9520
|
+
switch (v[b++]) {
|
|
9521
9521
|
case "m":
|
|
9522
|
-
o = v[
|
|
9522
|
+
o = v[b++] * e + r, c = v[b++] * e + n, s.moveTo(o, c);
|
|
9523
9523
|
break;
|
|
9524
9524
|
case "l":
|
|
9525
|
-
o = v[
|
|
9525
|
+
o = v[b++] * e + r, c = v[b++] * e + n, s.lineTo(o, c);
|
|
9526
9526
|
break;
|
|
9527
9527
|
case "q":
|
|
9528
|
-
u = v[
|
|
9528
|
+
u = v[b++] * e + r, h = v[b++] * e + n, p = v[b++] * e + r, l = v[b++] * e + n, s.quadraticCurveTo(p, l, u, h);
|
|
9529
9529
|
break;
|
|
9530
9530
|
case "b":
|
|
9531
|
-
u = v[
|
|
9531
|
+
u = v[b++] * e + r, h = v[b++] * e + n, p = v[b++] * e + r, l = v[b++] * e + n, g = v[b++] * e + r, x = v[b++] * e + n, s.bezierCurveTo(p, l, g, x, u, h);
|
|
9532
9532
|
break;
|
|
9533
9533
|
}
|
|
9534
9534
|
}
|
|
@@ -9590,9 +9590,9 @@ function Hh(t, e, r, n = "ltr") {
|
|
|
9590
9590
|
`)
|
|
9591
9591
|
c = 0, u -= s;
|
|
9592
9592
|
else {
|
|
9593
|
-
const
|
|
9594
|
-
if (!
|
|
9595
|
-
n === "tb" ? (c = 0, u += r.ascender * i) : c +=
|
|
9593
|
+
const p = zh(h, i, c, u, r);
|
|
9594
|
+
if (!p) continue;
|
|
9595
|
+
n === "tb" ? (c = 0, u += r.ascender * i) : c += p.offsetX, o.push(p.path);
|
|
9596
9596
|
}
|
|
9597
9597
|
return o;
|
|
9598
9598
|
}
|
|
@@ -9610,19 +9610,19 @@ function zh(t, e, r, n, a) {
|
|
|
9610
9610
|
let c = 0;
|
|
9611
9611
|
for (; c < o.length; ) {
|
|
9612
9612
|
const u = o[c++];
|
|
9613
|
-
let h,
|
|
9613
|
+
let h, p, l, g, x, v, b, m;
|
|
9614
9614
|
switch (u) {
|
|
9615
9615
|
case "m":
|
|
9616
|
-
h = parseFloat(o[c++]) * e + r,
|
|
9616
|
+
h = parseFloat(o[c++]) * e + r, p = parseFloat(o[c++]) * e + n, s.moveTo(h, p);
|
|
9617
9617
|
break;
|
|
9618
9618
|
case "l":
|
|
9619
|
-
h = parseFloat(o[c++]) * e + r,
|
|
9619
|
+
h = parseFloat(o[c++]) * e + r, p = parseFloat(o[c++]) * e + n, s.lineTo(h, p);
|
|
9620
9620
|
break;
|
|
9621
9621
|
case "q":
|
|
9622
9622
|
l = parseFloat(o[c++]) * e + r, g = parseFloat(o[c++]) * e + n, x = parseFloat(o[c++]) * e + r, v = parseFloat(o[c++]) * e + n, s.quadraticCurveTo(x, v, l, g);
|
|
9623
9623
|
break;
|
|
9624
9624
|
case "b":
|
|
9625
|
-
l = parseFloat(o[c++]) * e + r, g = parseFloat(o[c++]) * e + n, x = parseFloat(o[c++]) * e + r, v = parseFloat(o[c++]) * e + n,
|
|
9625
|
+
l = parseFloat(o[c++]) * e + r, g = parseFloat(o[c++]) * e + n, x = parseFloat(o[c++]) * e + r, v = parseFloat(o[c++]) * e + n, b = parseFloat(o[c++]) * e + r, m = parseFloat(o[c++]) * e + n, s.bezierCurveTo(x, v, b, m, l, g);
|
|
9626
9626
|
break;
|
|
9627
9627
|
}
|
|
9628
9628
|
}
|
|
@@ -9633,8 +9633,8 @@ function Wh(t, e) {
|
|
|
9633
9633
|
let r = !1;
|
|
9634
9634
|
const { x: n, y: a } = t, i = e.length;
|
|
9635
9635
|
for (let s = 0, o = i - 1; s < i; o = s++) {
|
|
9636
|
-
const c = e[s].x, u = e[s].y, h = e[o].x,
|
|
9637
|
-
u > a !=
|
|
9636
|
+
const c = e[s].x, u = e[s].y, h = e[o].x, p = e[o].y;
|
|
9637
|
+
u > a != p > a && n < (h - c) * (a - u) / (p - u) + c && (r = !r);
|
|
9638
9638
|
}
|
|
9639
9639
|
return r;
|
|
9640
9640
|
}
|
|
@@ -9715,23 +9715,23 @@ function jh(t, e = 32) {
|
|
|
9715
9715
|
for (; x.length; ) {
|
|
9716
9716
|
const v = x.pop();
|
|
9717
9717
|
c[v.idx] = v.d, u[v.idx] = g;
|
|
9718
|
-
for (const
|
|
9718
|
+
for (const b of i[v.idx]) x.push({ idx: b, d: v.d + 1 });
|
|
9719
9719
|
}
|
|
9720
9720
|
}
|
|
9721
|
-
const h = [],
|
|
9721
|
+
const h = [], p = /* @__PURE__ */ new Set();
|
|
9722
9722
|
function l(g) {
|
|
9723
9723
|
const x = ka(r[g], !0);
|
|
9724
|
-
|
|
9724
|
+
p.add(g);
|
|
9725
9725
|
for (const v of i[g])
|
|
9726
|
-
if (!
|
|
9727
|
-
const
|
|
9728
|
-
x.holes.push(
|
|
9726
|
+
if (!p.has(v) && c[v] === c[g] + 1) {
|
|
9727
|
+
const b = ka(r[v], !1);
|
|
9728
|
+
x.holes.push(b), p.add(v);
|
|
9729
9729
|
}
|
|
9730
9730
|
h.push(x);
|
|
9731
9731
|
}
|
|
9732
9732
|
for (const g of s) l(g);
|
|
9733
9733
|
for (let g = 0; g < o; g++)
|
|
9734
|
-
|
|
9734
|
+
p.has(g) || l(g);
|
|
9735
9735
|
return h;
|
|
9736
9736
|
}
|
|
9737
9737
|
class $h {
|
|
@@ -10259,9 +10259,9 @@ class tl {
|
|
|
10259
10259
|
if (u > 0) {
|
|
10260
10260
|
const h = e.readBytes(u);
|
|
10261
10261
|
if (h.length === u) {
|
|
10262
|
-
const
|
|
10262
|
+
const p = h.indexOf(0);
|
|
10263
10263
|
let l = 0;
|
|
10264
|
-
|
|
10264
|
+
p >= 0 && p < h.length && (l = p + 1), l < h.length && (s[c] = h.subarray(l));
|
|
10265
10265
|
}
|
|
10266
10266
|
}
|
|
10267
10267
|
} catch {
|
|
@@ -10531,20 +10531,20 @@ class Tt {
|
|
|
10531
10531
|
const { strokeWidth: r = "0.5%", strokeColor: n = "black", isAutoFit: a = !1 } = e;
|
|
10532
10532
|
let i, s;
|
|
10533
10533
|
if (a) {
|
|
10534
|
-
const o = this.bbox, c = 0.2, u = o.maxX - o.minX, h = o.maxY - o.minY,
|
|
10534
|
+
const o = this.bbox, c = 0.2, u = o.maxX - o.minX, h = o.maxY - o.minY, p = u === 0 ? h : u, l = h === 0 ? u : h, g = o.minX - p * c, x = o.maxX + p * c, v = o.minY - l * c, b = o.maxY + l * c;
|
|
10535
10535
|
s = this.polylines.map((m) => {
|
|
10536
10536
|
let F = "";
|
|
10537
10537
|
return m.forEach((w, k) => {
|
|
10538
10538
|
const C = w.x, U = -w.y;
|
|
10539
10539
|
F += k === 0 ? `M ${C} ${U} ` : `L ${C} ${U} `;
|
|
10540
10540
|
}), `<path d="${F}" stroke="${n}" stroke-width="${r}" fill="none"/>`;
|
|
10541
|
-
}).join(""), i = `${g} ${-
|
|
10541
|
+
}).join(""), i = `${g} ${-b} ${x - g} ${b - v}`;
|
|
10542
10542
|
} else
|
|
10543
10543
|
i = "0 0 20 20", s = this.polylines.map((o) => {
|
|
10544
10544
|
let c = "";
|
|
10545
10545
|
return o.forEach((u, h) => {
|
|
10546
|
-
const
|
|
10547
|
-
c += h === 0 ? `M ${
|
|
10546
|
+
const p = u.x + 5, l = -u.y + 15;
|
|
10547
|
+
c += h === 0 ? `M ${p} ${l} ` : `L ${p} ${l} `;
|
|
10548
10548
|
}), `<path d="${c}" stroke="${n}" stroke-width="${r}" fill="none"/>`;
|
|
10549
10549
|
}).join("");
|
|
10550
10550
|
return `<svg width="100%" height="100%" viewBox="${i}" preserveAspectRatio="xMidYMid meet">${s}</svg>`;
|
|
@@ -10624,13 +10624,13 @@ class al {
|
|
|
10624
10624
|
var a;
|
|
10625
10625
|
const i = e.bbox, s = i.maxY - i.minY, o = i.maxX - i.minX, c = s > 0 ? r / s : 1, u = o > 0 ? n / o : 1, h = (a = e.lastPoint) == null ? void 0 : a.clone();
|
|
10626
10626
|
h && (h.x *= u, h.y *= c);
|
|
10627
|
-
const
|
|
10627
|
+
const p = e.polylines.map(
|
|
10628
10628
|
(l) => l.map((g) => {
|
|
10629
10629
|
const x = g.clone();
|
|
10630
10630
|
return x.x *= u, x.y *= c, x;
|
|
10631
10631
|
})
|
|
10632
10632
|
);
|
|
10633
|
-
return new Tt(h,
|
|
10633
|
+
return new Tt(h, p);
|
|
10634
10634
|
}
|
|
10635
10635
|
/**
|
|
10636
10636
|
* Parses the shape of a character.
|
|
@@ -10814,7 +10814,7 @@ class al {
|
|
|
10814
10814
|
let i = r;
|
|
10815
10815
|
const s = e[++i] * n.scale, o = ge.byteToSByte(e[++i]), c = (o & 112) >> 4;
|
|
10816
10816
|
let u = o & 7;
|
|
10817
|
-
const h = o < 0,
|
|
10817
|
+
const h = o < 0, p = Math.PI / 4 * c, l = n.currentPoint.clone().subtract(new te(Math.cos(p) * s, Math.sin(p) * s)), g = Bt.fromOctant(l, s, c, u, h);
|
|
10818
10818
|
if (n.isPenDown) {
|
|
10819
10819
|
const x = g.tessellate();
|
|
10820
10820
|
n.currentPolyline.pop(), n.currentPolyline.push(...x.slice());
|
|
@@ -10823,14 +10823,14 @@ class al {
|
|
|
10823
10823
|
}
|
|
10824
10824
|
handleFractionalArc(e, r, n) {
|
|
10825
10825
|
let a = r;
|
|
10826
|
-
const i = e[++a], s = e[++a], o = e[++a], c = e[++a], u = (o * 255 + c) * n.scale, h = ge.byteToSByte(e[++a]),
|
|
10826
|
+
const i = e[++a], s = e[++a], o = e[++a], c = e[++a], u = (o * 255 + c) * n.scale, h = ge.byteToSByte(e[++a]), p = (h & 112) >> 4;
|
|
10827
10827
|
let l = h & 7;
|
|
10828
10828
|
l === 0 && (l = 8), s !== 0 && l--;
|
|
10829
10829
|
const g = Math.PI / 4;
|
|
10830
|
-
let x = g * l, v = nl,
|
|
10831
|
-
h < 0 && (v = -v, x = -x,
|
|
10832
|
-
let m = g *
|
|
10833
|
-
m += g * i / 256 *
|
|
10830
|
+
let x = g * l, v = nl, b = 1;
|
|
10831
|
+
h < 0 && (v = -v, x = -x, b = -1);
|
|
10832
|
+
let m = g * p, F = m + x;
|
|
10833
|
+
m += g * i / 256 * b, F += g * s / 256 * b;
|
|
10834
10834
|
const w = n.currentPoint.clone().subtract(new te(u * Math.cos(m), u * Math.sin(m)));
|
|
10835
10835
|
if (n.currentPoint = w.clone().add(new te(u * Math.cos(F), u * Math.sin(F))), n.isPenDown) {
|
|
10836
10836
|
let k = m;
|
|
@@ -11092,10 +11092,10 @@ function gl(t) {
|
|
|
11092
11092
|
var yn = {};
|
|
11093
11093
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
11094
11094
|
yn.read = function(t, e, r, n, a) {
|
|
11095
|
-
var i, s, o = a * 8 - n - 1, c = (1 << o) - 1, u = c >> 1, h = -7,
|
|
11096
|
-
for (
|
|
11095
|
+
var i, s, o = a * 8 - n - 1, c = (1 << o) - 1, u = c >> 1, h = -7, p = r ? a - 1 : 0, l = r ? -1 : 1, g = t[e + p];
|
|
11096
|
+
for (p += l, i = g & (1 << -h) - 1, g >>= -h, h += o; h > 0; i = i * 256 + t[e + p], p += l, h -= 8)
|
|
11097
11097
|
;
|
|
11098
|
-
for (s = i & (1 << -h) - 1, i >>= -h, h += n; h > 0; s = s * 256 + t[e +
|
|
11098
|
+
for (s = i & (1 << -h) - 1, i >>= -h, h += n; h > 0; s = s * 256 + t[e + p], p += l, h -= 8)
|
|
11099
11099
|
;
|
|
11100
11100
|
if (i === 0)
|
|
11101
11101
|
i = 1 - u;
|
|
@@ -11107,8 +11107,8 @@ yn.read = function(t, e, r, n, a) {
|
|
|
11107
11107
|
return (g ? -1 : 1) * s * Math.pow(2, i - n);
|
|
11108
11108
|
};
|
|
11109
11109
|
yn.write = function(t, e, r, n, a, i) {
|
|
11110
|
-
var s, o, c, u = i * 8 - a - 1, h = (1 << u) - 1,
|
|
11111
|
-
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (o = isNaN(e) ? 1 : 0, s = h) : (s = Math.floor(Math.log(e) / Math.LN2), e * (c = Math.pow(2, -s)) < 1 && (s--, c *= 2), s +
|
|
11110
|
+
var s, o, c, u = i * 8 - a - 1, h = (1 << u) - 1, p = h >> 1, l = a === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, g = n ? 0 : i - 1, x = n ? 1 : -1, v = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
|
|
11111
|
+
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (o = isNaN(e) ? 1 : 0, s = h) : (s = Math.floor(Math.log(e) / Math.LN2), e * (c = Math.pow(2, -s)) < 1 && (s--, c *= 2), s + p >= 1 ? e += l / c : e += l * Math.pow(2, 1 - p), e * c >= 2 && (s++, c /= 2), s + p >= h ? (o = 0, s = h) : s + p >= 1 ? (o = (e * c - 1) * Math.pow(2, a), s = s + p) : (o = e * Math.pow(2, p - 1) * Math.pow(2, a), s = 0)); a >= 8; t[r + g] = o & 255, g += x, o /= 256, a -= 8)
|
|
11112
11112
|
;
|
|
11113
11113
|
for (s = s << a | o, u += a; u > 0; t[r + g] = s & 255, g += x, s /= 256, u -= 8)
|
|
11114
11114
|
;
|
|
@@ -11129,10 +11129,10 @@ yn.write = function(t, e, r, n, a, i) {
|
|
|
11129
11129
|
);
|
|
11130
11130
|
function i() {
|
|
11131
11131
|
try {
|
|
11132
|
-
var y = new Uint8Array(1),
|
|
11132
|
+
var y = new Uint8Array(1), f = { foo: function() {
|
|
11133
11133
|
return 42;
|
|
11134
11134
|
} };
|
|
11135
|
-
return Object.setPrototypeOf(
|
|
11135
|
+
return Object.setPrototypeOf(f, Uint8Array.prototype), Object.setPrototypeOf(y, f), y.foo() === 42;
|
|
11136
11136
|
} catch {
|
|
11137
11137
|
return !1;
|
|
11138
11138
|
}
|
|
@@ -11153,23 +11153,23 @@ yn.write = function(t, e, r, n, a, i) {
|
|
|
11153
11153
|
function s(y) {
|
|
11154
11154
|
if (y > a)
|
|
11155
11155
|
throw new RangeError('The value "' + y + '" is invalid for option "size"');
|
|
11156
|
-
var
|
|
11157
|
-
return Object.setPrototypeOf(
|
|
11156
|
+
var f = new Uint8Array(y);
|
|
11157
|
+
return Object.setPrototypeOf(f, o.prototype), f;
|
|
11158
11158
|
}
|
|
11159
|
-
function o(y,
|
|
11159
|
+
function o(y, f, d) {
|
|
11160
11160
|
if (typeof y == "number") {
|
|
11161
|
-
if (typeof
|
|
11161
|
+
if (typeof f == "string")
|
|
11162
11162
|
throw new TypeError(
|
|
11163
11163
|
'The "string" argument must be of type string. Received type number'
|
|
11164
11164
|
);
|
|
11165
|
-
return
|
|
11165
|
+
return p(y);
|
|
11166
11166
|
}
|
|
11167
|
-
return c(y,
|
|
11167
|
+
return c(y, f, d);
|
|
11168
11168
|
}
|
|
11169
11169
|
o.poolSize = 8192;
|
|
11170
|
-
function c(y,
|
|
11170
|
+
function c(y, f, d) {
|
|
11171
11171
|
if (typeof y == "string")
|
|
11172
|
-
return l(y,
|
|
11172
|
+
return l(y, f);
|
|
11173
11173
|
if (ArrayBuffer.isView(y))
|
|
11174
11174
|
return x(y);
|
|
11175
11175
|
if (y == null)
|
|
@@ -11177,28 +11177,28 @@ yn.write = function(t, e, r, n, a, i) {
|
|
|
11177
11177
|
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof y
|
|
11178
11178
|
);
|
|
11179
11179
|
if (Be(y, ArrayBuffer) || y && Be(y.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (Be(y, SharedArrayBuffer) || y && Be(y.buffer, SharedArrayBuffer)))
|
|
11180
|
-
return v(y,
|
|
11180
|
+
return v(y, f, d);
|
|
11181
11181
|
if (typeof y == "number")
|
|
11182
11182
|
throw new TypeError(
|
|
11183
11183
|
'The "value" argument must not be of type number. Received type number'
|
|
11184
11184
|
);
|
|
11185
|
-
var
|
|
11186
|
-
if (
|
|
11187
|
-
return o.from(
|
|
11188
|
-
var T =
|
|
11185
|
+
var S = y.valueOf && y.valueOf();
|
|
11186
|
+
if (S != null && S !== y)
|
|
11187
|
+
return o.from(S, f, d);
|
|
11188
|
+
var T = b(y);
|
|
11189
11189
|
if (T) return T;
|
|
11190
11190
|
if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof y[Symbol.toPrimitive] == "function")
|
|
11191
11191
|
return o.from(
|
|
11192
11192
|
y[Symbol.toPrimitive]("string"),
|
|
11193
|
-
|
|
11193
|
+
f,
|
|
11194
11194
|
d
|
|
11195
11195
|
);
|
|
11196
11196
|
throw new TypeError(
|
|
11197
11197
|
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof y
|
|
11198
11198
|
);
|
|
11199
11199
|
}
|
|
11200
|
-
o.from = function(y,
|
|
11201
|
-
return c(y,
|
|
11200
|
+
o.from = function(y, f, d) {
|
|
11201
|
+
return c(y, f, d);
|
|
11202
11202
|
}, Object.setPrototypeOf(o.prototype, Uint8Array.prototype), Object.setPrototypeOf(o, Uint8Array);
|
|
11203
11203
|
function u(y) {
|
|
11204
11204
|
if (typeof y != "number")
|
|
@@ -11206,50 +11206,50 @@ yn.write = function(t, e, r, n, a, i) {
|
|
|
11206
11206
|
if (y < 0)
|
|
11207
11207
|
throw new RangeError('The value "' + y + '" is invalid for option "size"');
|
|
11208
11208
|
}
|
|
11209
|
-
function h(y,
|
|
11210
|
-
return u(y), y <= 0 ? s(y) :
|
|
11209
|
+
function h(y, f, d) {
|
|
11210
|
+
return u(y), y <= 0 ? s(y) : f !== void 0 ? typeof d == "string" ? s(y).fill(f, d) : s(y).fill(f) : s(y);
|
|
11211
11211
|
}
|
|
11212
|
-
o.alloc = function(y,
|
|
11213
|
-
return h(y,
|
|
11212
|
+
o.alloc = function(y, f, d) {
|
|
11213
|
+
return h(y, f, d);
|
|
11214
11214
|
};
|
|
11215
|
-
function
|
|
11215
|
+
function p(y) {
|
|
11216
11216
|
return u(y), s(y < 0 ? 0 : m(y) | 0);
|
|
11217
11217
|
}
|
|
11218
11218
|
o.allocUnsafe = function(y) {
|
|
11219
|
-
return
|
|
11219
|
+
return p(y);
|
|
11220
11220
|
}, o.allocUnsafeSlow = function(y) {
|
|
11221
|
-
return
|
|
11221
|
+
return p(y);
|
|
11222
11222
|
};
|
|
11223
|
-
function l(y,
|
|
11224
|
-
if ((typeof
|
|
11225
|
-
throw new TypeError("Unknown encoding: " +
|
|
11226
|
-
var d = w(y,
|
|
11227
|
-
return T !== d && (
|
|
11223
|
+
function l(y, f) {
|
|
11224
|
+
if ((typeof f != "string" || f === "") && (f = "utf8"), !o.isEncoding(f))
|
|
11225
|
+
throw new TypeError("Unknown encoding: " + f);
|
|
11226
|
+
var d = w(y, f) | 0, S = s(d), T = S.write(y, f);
|
|
11227
|
+
return T !== d && (S = S.slice(0, T)), S;
|
|
11228
11228
|
}
|
|
11229
11229
|
function g(y) {
|
|
11230
|
-
for (var
|
|
11231
|
-
d[
|
|
11230
|
+
for (var f = y.length < 0 ? 0 : m(y.length) | 0, d = s(f), S = 0; S < f; S += 1)
|
|
11231
|
+
d[S] = y[S] & 255;
|
|
11232
11232
|
return d;
|
|
11233
11233
|
}
|
|
11234
11234
|
function x(y) {
|
|
11235
11235
|
if (Be(y, Uint8Array)) {
|
|
11236
|
-
var
|
|
11237
|
-
return v(
|
|
11236
|
+
var f = new Uint8Array(y);
|
|
11237
|
+
return v(f.buffer, f.byteOffset, f.byteLength);
|
|
11238
11238
|
}
|
|
11239
11239
|
return g(y);
|
|
11240
11240
|
}
|
|
11241
|
-
function v(y,
|
|
11242
|
-
if (
|
|
11241
|
+
function v(y, f, d) {
|
|
11242
|
+
if (f < 0 || y.byteLength < f)
|
|
11243
11243
|
throw new RangeError('"offset" is outside of buffer bounds');
|
|
11244
|
-
if (y.byteLength <
|
|
11244
|
+
if (y.byteLength < f + (d || 0))
|
|
11245
11245
|
throw new RangeError('"length" is outside of buffer bounds');
|
|
11246
|
-
var
|
|
11247
|
-
return
|
|
11246
|
+
var S;
|
|
11247
|
+
return f === void 0 && d === void 0 ? S = new Uint8Array(y) : d === void 0 ? S = new Uint8Array(y, f) : S = new Uint8Array(y, f, d), Object.setPrototypeOf(S, o.prototype), S;
|
|
11248
11248
|
}
|
|
11249
|
-
function
|
|
11249
|
+
function b(y) {
|
|
11250
11250
|
if (o.isBuffer(y)) {
|
|
11251
|
-
var
|
|
11252
|
-
return d.length === 0 || y.copy(d, 0, 0,
|
|
11251
|
+
var f = m(y.length) | 0, d = s(f);
|
|
11252
|
+
return d.length === 0 || y.copy(d, 0, 0, f), d;
|
|
11253
11253
|
}
|
|
11254
11254
|
if (y.length !== void 0)
|
|
11255
11255
|
return typeof y.length != "number" || pr(y.length) ? s(0) : g(y);
|
|
@@ -11264,22 +11264,22 @@ yn.write = function(t, e, r, n, a, i) {
|
|
|
11264
11264
|
function F(y) {
|
|
11265
11265
|
return +y != y && (y = 0), o.alloc(+y);
|
|
11266
11266
|
}
|
|
11267
|
-
o.isBuffer = function(
|
|
11268
|
-
return
|
|
11269
|
-
}, o.compare = function(
|
|
11270
|
-
if (Be(
|
|
11267
|
+
o.isBuffer = function(f) {
|
|
11268
|
+
return f != null && f._isBuffer === !0 && f !== o.prototype;
|
|
11269
|
+
}, o.compare = function(f, d) {
|
|
11270
|
+
if (Be(f, Uint8Array) && (f = o.from(f, f.offset, f.byteLength)), Be(d, Uint8Array) && (d = o.from(d, d.offset, d.byteLength)), !o.isBuffer(f) || !o.isBuffer(d))
|
|
11271
11271
|
throw new TypeError(
|
|
11272
11272
|
'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
|
|
11273
11273
|
);
|
|
11274
|
-
if (
|
|
11275
|
-
for (var
|
|
11276
|
-
if (
|
|
11277
|
-
|
|
11274
|
+
if (f === d) return 0;
|
|
11275
|
+
for (var S = f.length, T = d.length, L = 0, A = Math.min(S, T); L < A; ++L)
|
|
11276
|
+
if (f[L] !== d[L]) {
|
|
11277
|
+
S = f[L], T = d[L];
|
|
11278
11278
|
break;
|
|
11279
11279
|
}
|
|
11280
|
-
return
|
|
11281
|
-
}, o.isEncoding = function(
|
|
11282
|
-
switch (String(
|
|
11280
|
+
return S < T ? -1 : T < S ? 1 : 0;
|
|
11281
|
+
}, o.isEncoding = function(f) {
|
|
11282
|
+
switch (String(f).toLowerCase()) {
|
|
11283
11283
|
case "hex":
|
|
11284
11284
|
case "utf8":
|
|
11285
11285
|
case "utf-8":
|
|
@@ -11295,18 +11295,18 @@ yn.write = function(t, e, r, n, a, i) {
|
|
|
11295
11295
|
default:
|
|
11296
11296
|
return !1;
|
|
11297
11297
|
}
|
|
11298
|
-
}, o.concat = function(
|
|
11299
|
-
if (!Array.isArray(
|
|
11298
|
+
}, o.concat = function(f, d) {
|
|
11299
|
+
if (!Array.isArray(f))
|
|
11300
11300
|
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
11301
|
-
if (
|
|
11301
|
+
if (f.length === 0)
|
|
11302
11302
|
return o.alloc(0);
|
|
11303
|
-
var
|
|
11303
|
+
var S;
|
|
11304
11304
|
if (d === void 0)
|
|
11305
|
-
for (d = 0,
|
|
11306
|
-
d +=
|
|
11305
|
+
for (d = 0, S = 0; S < f.length; ++S)
|
|
11306
|
+
d += f[S].length;
|
|
11307
11307
|
var T = o.allocUnsafe(d), L = 0;
|
|
11308
|
-
for (
|
|
11309
|
-
var A =
|
|
11308
|
+
for (S = 0; S < f.length; ++S) {
|
|
11309
|
+
var A = f[S];
|
|
11310
11310
|
if (Be(A, Uint8Array))
|
|
11311
11311
|
L + A.length > T.length ? o.from(A).copy(T, L) : Uint8Array.prototype.set.call(
|
|
11312
11312
|
T,
|
|
@@ -11321,7 +11321,7 @@ yn.write = function(t, e, r, n, a, i) {
|
|
|
11321
11321
|
}
|
|
11322
11322
|
return T;
|
|
11323
11323
|
};
|
|
11324
|
-
function w(y,
|
|
11324
|
+
function w(y, f) {
|
|
11325
11325
|
if (o.isBuffer(y))
|
|
11326
11326
|
return y.length;
|
|
11327
11327
|
if (ArrayBuffer.isView(y) || Be(y, ArrayBuffer))
|
|
@@ -11330,10 +11330,10 @@ yn.write = function(t, e, r, n, a, i) {
|
|
|
11330
11330
|
throw new TypeError(
|
|
11331
11331
|
'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof y
|
|
11332
11332
|
);
|
|
11333
|
-
var d = y.length,
|
|
11334
|
-
if (!
|
|
11333
|
+
var d = y.length, S = arguments.length > 2 && arguments[2] === !0;
|
|
11334
|
+
if (!S && d === 0) return 0;
|
|
11335
11335
|
for (var T = !1; ; )
|
|
11336
|
-
switch (
|
|
11336
|
+
switch (f) {
|
|
11337
11337
|
case "ascii":
|
|
11338
11338
|
case "latin1":
|
|
11339
11339
|
case "binary":
|
|
@@ -11352,113 +11352,113 @@ yn.write = function(t, e, r, n, a, i) {
|
|
|
11352
11352
|
return Fn(y).length;
|
|
11353
11353
|
default:
|
|
11354
11354
|
if (T)
|
|
11355
|
-
return
|
|
11356
|
-
|
|
11355
|
+
return S ? -1 : ze(y).length;
|
|
11356
|
+
f = ("" + f).toLowerCase(), T = !0;
|
|
11357
11357
|
}
|
|
11358
11358
|
}
|
|
11359
11359
|
o.byteLength = w;
|
|
11360
|
-
function k(y,
|
|
11361
|
-
var
|
|
11362
|
-
if ((
|
|
11360
|
+
function k(y, f, d) {
|
|
11361
|
+
var S = !1;
|
|
11362
|
+
if ((f === void 0 || f < 0) && (f = 0), f > this.length || ((d === void 0 || d > this.length) && (d = this.length), d <= 0) || (d >>>= 0, f >>>= 0, d <= f))
|
|
11363
11363
|
return "";
|
|
11364
11364
|
for (y || (y = "utf8"); ; )
|
|
11365
11365
|
switch (y) {
|
|
11366
11366
|
case "hex":
|
|
11367
|
-
return oe(this,
|
|
11367
|
+
return oe(this, f, d);
|
|
11368
11368
|
case "utf8":
|
|
11369
11369
|
case "utf-8":
|
|
11370
|
-
return $(this,
|
|
11370
|
+
return $(this, f, d);
|
|
11371
11371
|
case "ascii":
|
|
11372
|
-
return ae(this,
|
|
11372
|
+
return ae(this, f, d);
|
|
11373
11373
|
case "latin1":
|
|
11374
11374
|
case "binary":
|
|
11375
|
-
return ue(this,
|
|
11375
|
+
return ue(this, f, d);
|
|
11376
11376
|
case "base64":
|
|
11377
|
-
return ce(this,
|
|
11377
|
+
return ce(this, f, d);
|
|
11378
11378
|
case "ucs2":
|
|
11379
11379
|
case "ucs-2":
|
|
11380
11380
|
case "utf16le":
|
|
11381
11381
|
case "utf-16le":
|
|
11382
|
-
return fe(this,
|
|
11382
|
+
return fe(this, f, d);
|
|
11383
11383
|
default:
|
|
11384
|
-
if (
|
|
11385
|
-
y = (y + "").toLowerCase(),
|
|
11384
|
+
if (S) throw new TypeError("Unknown encoding: " + y);
|
|
11385
|
+
y = (y + "").toLowerCase(), S = !0;
|
|
11386
11386
|
}
|
|
11387
11387
|
}
|
|
11388
11388
|
o.prototype._isBuffer = !0;
|
|
11389
|
-
function C(y,
|
|
11390
|
-
var
|
|
11391
|
-
y[
|
|
11389
|
+
function C(y, f, d) {
|
|
11390
|
+
var S = y[f];
|
|
11391
|
+
y[f] = y[d], y[d] = S;
|
|
11392
11392
|
}
|
|
11393
11393
|
o.prototype.swap16 = function() {
|
|
11394
|
-
var
|
|
11395
|
-
if (
|
|
11394
|
+
var f = this.length;
|
|
11395
|
+
if (f % 2 !== 0)
|
|
11396
11396
|
throw new RangeError("Buffer size must be a multiple of 16-bits");
|
|
11397
|
-
for (var d = 0; d <
|
|
11397
|
+
for (var d = 0; d < f; d += 2)
|
|
11398
11398
|
C(this, d, d + 1);
|
|
11399
11399
|
return this;
|
|
11400
11400
|
}, o.prototype.swap32 = function() {
|
|
11401
|
-
var
|
|
11402
|
-
if (
|
|
11401
|
+
var f = this.length;
|
|
11402
|
+
if (f % 4 !== 0)
|
|
11403
11403
|
throw new RangeError("Buffer size must be a multiple of 32-bits");
|
|
11404
|
-
for (var d = 0; d <
|
|
11404
|
+
for (var d = 0; d < f; d += 4)
|
|
11405
11405
|
C(this, d, d + 3), C(this, d + 1, d + 2);
|
|
11406
11406
|
return this;
|
|
11407
11407
|
}, o.prototype.swap64 = function() {
|
|
11408
|
-
var
|
|
11409
|
-
if (
|
|
11408
|
+
var f = this.length;
|
|
11409
|
+
if (f % 8 !== 0)
|
|
11410
11410
|
throw new RangeError("Buffer size must be a multiple of 64-bits");
|
|
11411
|
-
for (var d = 0; d <
|
|
11411
|
+
for (var d = 0; d < f; d += 8)
|
|
11412
11412
|
C(this, d, d + 7), C(this, d + 1, d + 6), C(this, d + 2, d + 5), C(this, d + 3, d + 4);
|
|
11413
11413
|
return this;
|
|
11414
11414
|
}, o.prototype.toString = function() {
|
|
11415
|
-
var
|
|
11416
|
-
return
|
|
11417
|
-
}, o.prototype.toLocaleString = o.prototype.toString, o.prototype.equals = function(
|
|
11418
|
-
if (!o.isBuffer(
|
|
11419
|
-
return this ===
|
|
11415
|
+
var f = this.length;
|
|
11416
|
+
return f === 0 ? "" : arguments.length === 0 ? $(this, 0, f) : k.apply(this, arguments);
|
|
11417
|
+
}, o.prototype.toLocaleString = o.prototype.toString, o.prototype.equals = function(f) {
|
|
11418
|
+
if (!o.isBuffer(f)) throw new TypeError("Argument must be a Buffer");
|
|
11419
|
+
return this === f ? !0 : o.compare(this, f) === 0;
|
|
11420
11420
|
}, o.prototype.inspect = function() {
|
|
11421
|
-
var
|
|
11422
|
-
return
|
|
11423
|
-
}, n && (o.prototype[n] = o.prototype.inspect), o.prototype.compare = function(
|
|
11424
|
-
if (Be(
|
|
11421
|
+
var f = "", d = t.INSPECT_MAX_BYTES;
|
|
11422
|
+
return f = this.toString("hex", 0, d).replace(/(.{2})/g, "$1 ").trim(), this.length > d && (f += " ... "), "<Buffer " + f + ">";
|
|
11423
|
+
}, n && (o.prototype[n] = o.prototype.inspect), o.prototype.compare = function(f, d, S, T, L) {
|
|
11424
|
+
if (Be(f, Uint8Array) && (f = o.from(f, f.offset, f.byteLength)), !o.isBuffer(f))
|
|
11425
11425
|
throw new TypeError(
|
|
11426
|
-
'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof
|
|
11426
|
+
'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof f
|
|
11427
11427
|
);
|
|
11428
|
-
if (d === void 0 && (d = 0),
|
|
11428
|
+
if (d === void 0 && (d = 0), S === void 0 && (S = f ? f.length : 0), T === void 0 && (T = 0), L === void 0 && (L = this.length), d < 0 || S > f.length || T < 0 || L > this.length)
|
|
11429
11429
|
throw new RangeError("out of range index");
|
|
11430
|
-
if (T >= L && d >=
|
|
11430
|
+
if (T >= L && d >= S)
|
|
11431
11431
|
return 0;
|
|
11432
11432
|
if (T >= L)
|
|
11433
11433
|
return -1;
|
|
11434
|
-
if (d >=
|
|
11434
|
+
if (d >= S)
|
|
11435
11435
|
return 1;
|
|
11436
|
-
if (d >>>= 0,
|
|
11437
|
-
for (var A = L - T, V =
|
|
11436
|
+
if (d >>>= 0, S >>>= 0, T >>>= 0, L >>>= 0, this === f) return 0;
|
|
11437
|
+
for (var A = L - T, V = S - d, Y = Math.min(A, V), J = this.slice(T, L), de = f.slice(d, S), ee = 0; ee < Y; ++ee)
|
|
11438
11438
|
if (J[ee] !== de[ee]) {
|
|
11439
11439
|
A = J[ee], V = de[ee];
|
|
11440
11440
|
break;
|
|
11441
11441
|
}
|
|
11442
11442
|
return A < V ? -1 : V < A ? 1 : 0;
|
|
11443
11443
|
};
|
|
11444
|
-
function U(y,
|
|
11444
|
+
function U(y, f, d, S, T) {
|
|
11445
11445
|
if (y.length === 0) return -1;
|
|
11446
|
-
if (typeof d == "string" ? (
|
|
11446
|
+
if (typeof d == "string" ? (S = d, d = 0) : d > 2147483647 ? d = 2147483647 : d < -2147483648 && (d = -2147483648), d = +d, pr(d) && (d = T ? 0 : y.length - 1), d < 0 && (d = y.length + d), d >= y.length) {
|
|
11447
11447
|
if (T) return -1;
|
|
11448
11448
|
d = y.length - 1;
|
|
11449
11449
|
} else if (d < 0)
|
|
11450
11450
|
if (T) d = 0;
|
|
11451
11451
|
else return -1;
|
|
11452
|
-
if (typeof
|
|
11453
|
-
return
|
|
11454
|
-
if (typeof
|
|
11455
|
-
return
|
|
11452
|
+
if (typeof f == "string" && (f = o.from(f, S)), o.isBuffer(f))
|
|
11453
|
+
return f.length === 0 ? -1 : B(y, f, d, S, T);
|
|
11454
|
+
if (typeof f == "number")
|
|
11455
|
+
return f = f & 255, typeof Uint8Array.prototype.indexOf == "function" ? T ? Uint8Array.prototype.indexOf.call(y, f, d) : Uint8Array.prototype.lastIndexOf.call(y, f, d) : B(y, [f], d, S, T);
|
|
11456
11456
|
throw new TypeError("val must be string, number or Buffer");
|
|
11457
11457
|
}
|
|
11458
|
-
function B(y,
|
|
11459
|
-
var L = 1, A = y.length, V =
|
|
11460
|
-
if (
|
|
11461
|
-
if (y.length < 2 ||
|
|
11458
|
+
function B(y, f, d, S, T) {
|
|
11459
|
+
var L = 1, A = y.length, V = f.length;
|
|
11460
|
+
if (S !== void 0 && (S = String(S).toLowerCase(), S === "ucs2" || S === "ucs-2" || S === "utf16le" || S === "utf-16le")) {
|
|
11461
|
+
if (y.length < 2 || f.length < 2)
|
|
11462
11462
|
return -1;
|
|
11463
11463
|
L = 2, A /= 2, V /= 2, d /= 2;
|
|
11464
11464
|
}
|
|
@@ -11469,14 +11469,14 @@ yn.write = function(t, e, r, n, a, i) {
|
|
|
11469
11469
|
if (T) {
|
|
11470
11470
|
var de = -1;
|
|
11471
11471
|
for (J = d; J < A; J++)
|
|
11472
|
-
if (Y(y, J) === Y(
|
|
11472
|
+
if (Y(y, J) === Y(f, de === -1 ? 0 : J - de)) {
|
|
11473
11473
|
if (de === -1 && (de = J), J - de + 1 === V) return de * L;
|
|
11474
11474
|
} else
|
|
11475
11475
|
de !== -1 && (J -= J - de), de = -1;
|
|
11476
11476
|
} else
|
|
11477
11477
|
for (d + V > A && (d = A - V), J = d; J >= 0; J--) {
|
|
11478
11478
|
for (var ee = !0, Ht = 0; Ht < V; Ht++)
|
|
11479
|
-
if (Y(y, J + Ht) !== Y(
|
|
11479
|
+
if (Y(y, J + Ht) !== Y(f, Ht)) {
|
|
11480
11480
|
ee = !1;
|
|
11481
11481
|
break;
|
|
11482
11482
|
}
|
|
@@ -11484,71 +11484,71 @@ yn.write = function(t, e, r, n, a, i) {
|
|
|
11484
11484
|
}
|
|
11485
11485
|
return -1;
|
|
11486
11486
|
}
|
|
11487
|
-
o.prototype.includes = function(
|
|
11488
|
-
return this.indexOf(
|
|
11489
|
-
}, o.prototype.indexOf = function(
|
|
11490
|
-
return U(this,
|
|
11491
|
-
}, o.prototype.lastIndexOf = function(
|
|
11492
|
-
return U(this,
|
|
11487
|
+
o.prototype.includes = function(f, d, S) {
|
|
11488
|
+
return this.indexOf(f, d, S) !== -1;
|
|
11489
|
+
}, o.prototype.indexOf = function(f, d, S) {
|
|
11490
|
+
return U(this, f, d, S, !0);
|
|
11491
|
+
}, o.prototype.lastIndexOf = function(f, d, S) {
|
|
11492
|
+
return U(this, f, d, S, !1);
|
|
11493
11493
|
};
|
|
11494
|
-
function O(y,
|
|
11494
|
+
function O(y, f, d, S) {
|
|
11495
11495
|
d = Number(d) || 0;
|
|
11496
11496
|
var T = y.length - d;
|
|
11497
|
-
|
|
11498
|
-
var L =
|
|
11499
|
-
|
|
11500
|
-
for (var A = 0; A <
|
|
11501
|
-
var V = parseInt(
|
|
11497
|
+
S ? (S = Number(S), S > T && (S = T)) : S = T;
|
|
11498
|
+
var L = f.length;
|
|
11499
|
+
S > L / 2 && (S = L / 2);
|
|
11500
|
+
for (var A = 0; A < S; ++A) {
|
|
11501
|
+
var V = parseInt(f.substr(A * 2, 2), 16);
|
|
11502
11502
|
if (pr(V)) return A;
|
|
11503
11503
|
y[d + A] = V;
|
|
11504
11504
|
}
|
|
11505
11505
|
return A;
|
|
11506
11506
|
}
|
|
11507
|
-
function H(y,
|
|
11508
|
-
return Gt(ze(
|
|
11507
|
+
function H(y, f, d, S) {
|
|
11508
|
+
return Gt(ze(f, y.length - d), y, d, S);
|
|
11509
11509
|
}
|
|
11510
|
-
function W(y,
|
|
11511
|
-
return Gt(Ji(
|
|
11510
|
+
function W(y, f, d, S) {
|
|
11511
|
+
return Gt(Ji(f), y, d, S);
|
|
11512
11512
|
}
|
|
11513
|
-
function z(y,
|
|
11514
|
-
return Gt(Fn(
|
|
11513
|
+
function z(y, f, d, S) {
|
|
11514
|
+
return Gt(Fn(f), y, d, S);
|
|
11515
11515
|
}
|
|
11516
|
-
function le(y,
|
|
11517
|
-
return Gt(es(
|
|
11516
|
+
function le(y, f, d, S) {
|
|
11517
|
+
return Gt(es(f, y.length - d), y, d, S);
|
|
11518
11518
|
}
|
|
11519
|
-
o.prototype.write = function(
|
|
11519
|
+
o.prototype.write = function(f, d, S, T) {
|
|
11520
11520
|
if (d === void 0)
|
|
11521
|
-
T = "utf8",
|
|
11522
|
-
else if (
|
|
11523
|
-
T = d,
|
|
11521
|
+
T = "utf8", S = this.length, d = 0;
|
|
11522
|
+
else if (S === void 0 && typeof d == "string")
|
|
11523
|
+
T = d, S = this.length, d = 0;
|
|
11524
11524
|
else if (isFinite(d))
|
|
11525
|
-
d = d >>> 0, isFinite(
|
|
11525
|
+
d = d >>> 0, isFinite(S) ? (S = S >>> 0, T === void 0 && (T = "utf8")) : (T = S, S = void 0);
|
|
11526
11526
|
else
|
|
11527
11527
|
throw new Error(
|
|
11528
11528
|
"Buffer.write(string, encoding, offset[, length]) is no longer supported"
|
|
11529
11529
|
);
|
|
11530
11530
|
var L = this.length - d;
|
|
11531
|
-
if ((
|
|
11531
|
+
if ((S === void 0 || S > L) && (S = L), f.length > 0 && (S < 0 || d < 0) || d > this.length)
|
|
11532
11532
|
throw new RangeError("Attempt to write outside buffer bounds");
|
|
11533
11533
|
T || (T = "utf8");
|
|
11534
11534
|
for (var A = !1; ; )
|
|
11535
11535
|
switch (T) {
|
|
11536
11536
|
case "hex":
|
|
11537
|
-
return O(this,
|
|
11537
|
+
return O(this, f, d, S);
|
|
11538
11538
|
case "utf8":
|
|
11539
11539
|
case "utf-8":
|
|
11540
|
-
return H(this,
|
|
11540
|
+
return H(this, f, d, S);
|
|
11541
11541
|
case "ascii":
|
|
11542
11542
|
case "latin1":
|
|
11543
11543
|
case "binary":
|
|
11544
|
-
return W(this,
|
|
11544
|
+
return W(this, f, d, S);
|
|
11545
11545
|
case "base64":
|
|
11546
|
-
return z(this,
|
|
11546
|
+
return z(this, f, d, S);
|
|
11547
11547
|
case "ucs2":
|
|
11548
11548
|
case "ucs-2":
|
|
11549
11549
|
case "utf16le":
|
|
11550
11550
|
case "utf-16le":
|
|
11551
|
-
return le(this,
|
|
11551
|
+
return le(this, f, d, S);
|
|
11552
11552
|
default:
|
|
11553
11553
|
if (A) throw new TypeError("Unknown encoding: " + T);
|
|
11554
11554
|
T = ("" + T).toLowerCase(), A = !0;
|
|
@@ -11559,12 +11559,12 @@ yn.write = function(t, e, r, n, a, i) {
|
|
|
11559
11559
|
data: Array.prototype.slice.call(this._arr || this, 0)
|
|
11560
11560
|
};
|
|
11561
11561
|
};
|
|
11562
|
-
function ce(y,
|
|
11563
|
-
return
|
|
11562
|
+
function ce(y, f, d) {
|
|
11563
|
+
return f === 0 && d === y.length ? e.fromByteArray(y) : e.fromByteArray(y.slice(f, d));
|
|
11564
11564
|
}
|
|
11565
|
-
function $(y,
|
|
11565
|
+
function $(y, f, d) {
|
|
11566
11566
|
d = Math.min(y.length, d);
|
|
11567
|
-
for (var
|
|
11567
|
+
for (var S = [], T = f; T < d; ) {
|
|
11568
11568
|
var L = y[T], A = null, V = L > 239 ? 4 : L > 223 ? 3 : L > 191 ? 2 : 1;
|
|
11569
11569
|
if (T + V <= d) {
|
|
11570
11570
|
var Y, J, de, ee;
|
|
@@ -11582,231 +11582,231 @@ yn.write = function(t, e, r, n, a, i) {
|
|
|
11582
11582
|
Y = y[T + 1], J = y[T + 2], de = y[T + 3], (Y & 192) === 128 && (J & 192) === 128 && (de & 192) === 128 && (ee = (L & 15) << 18 | (Y & 63) << 12 | (J & 63) << 6 | de & 63, ee > 65535 && ee < 1114112 && (A = ee));
|
|
11583
11583
|
}
|
|
11584
11584
|
}
|
|
11585
|
-
A === null ? (A = 65533, V = 1) : A > 65535 && (A -= 65536,
|
|
11585
|
+
A === null ? (A = 65533, V = 1) : A > 65535 && (A -= 65536, S.push(A >>> 10 & 1023 | 55296), A = 56320 | A & 1023), S.push(A), T += V;
|
|
11586
11586
|
}
|
|
11587
|
-
return Q(
|
|
11587
|
+
return Q(S);
|
|
11588
11588
|
}
|
|
11589
11589
|
var K = 4096;
|
|
11590
11590
|
function Q(y) {
|
|
11591
|
-
var
|
|
11592
|
-
if (
|
|
11591
|
+
var f = y.length;
|
|
11592
|
+
if (f <= K)
|
|
11593
11593
|
return String.fromCharCode.apply(String, y);
|
|
11594
|
-
for (var d = "",
|
|
11594
|
+
for (var d = "", S = 0; S < f; )
|
|
11595
11595
|
d += String.fromCharCode.apply(
|
|
11596
11596
|
String,
|
|
11597
|
-
y.slice(
|
|
11597
|
+
y.slice(S, S += K)
|
|
11598
11598
|
);
|
|
11599
11599
|
return d;
|
|
11600
11600
|
}
|
|
11601
|
-
function ae(y,
|
|
11602
|
-
var
|
|
11601
|
+
function ae(y, f, d) {
|
|
11602
|
+
var S = "";
|
|
11603
11603
|
d = Math.min(y.length, d);
|
|
11604
|
-
for (var T =
|
|
11605
|
-
|
|
11606
|
-
return
|
|
11604
|
+
for (var T = f; T < d; ++T)
|
|
11605
|
+
S += String.fromCharCode(y[T] & 127);
|
|
11606
|
+
return S;
|
|
11607
11607
|
}
|
|
11608
|
-
function ue(y,
|
|
11609
|
-
var
|
|
11608
|
+
function ue(y, f, d) {
|
|
11609
|
+
var S = "";
|
|
11610
11610
|
d = Math.min(y.length, d);
|
|
11611
|
-
for (var T =
|
|
11612
|
-
|
|
11613
|
-
return
|
|
11611
|
+
for (var T = f; T < d; ++T)
|
|
11612
|
+
S += String.fromCharCode(y[T]);
|
|
11613
|
+
return S;
|
|
11614
11614
|
}
|
|
11615
|
-
function oe(y,
|
|
11616
|
-
var
|
|
11617
|
-
(!
|
|
11618
|
-
for (var T = "", L =
|
|
11615
|
+
function oe(y, f, d) {
|
|
11616
|
+
var S = y.length;
|
|
11617
|
+
(!f || f < 0) && (f = 0), (!d || d < 0 || d > S) && (d = S);
|
|
11618
|
+
for (var T = "", L = f; L < d; ++L)
|
|
11619
11619
|
T += ts[y[L]];
|
|
11620
11620
|
return T;
|
|
11621
11621
|
}
|
|
11622
|
-
function fe(y,
|
|
11623
|
-
for (var
|
|
11624
|
-
T += String.fromCharCode(
|
|
11622
|
+
function fe(y, f, d) {
|
|
11623
|
+
for (var S = y.slice(f, d), T = "", L = 0; L < S.length - 1; L += 2)
|
|
11624
|
+
T += String.fromCharCode(S[L] + S[L + 1] * 256);
|
|
11625
11625
|
return T;
|
|
11626
11626
|
}
|
|
11627
|
-
o.prototype.slice = function(
|
|
11628
|
-
var
|
|
11629
|
-
|
|
11630
|
-
var T = this.subarray(
|
|
11627
|
+
o.prototype.slice = function(f, d) {
|
|
11628
|
+
var S = this.length;
|
|
11629
|
+
f = ~~f, d = d === void 0 ? S : ~~d, f < 0 ? (f += S, f < 0 && (f = 0)) : f > S && (f = S), d < 0 ? (d += S, d < 0 && (d = 0)) : d > S && (d = S), d < f && (d = f);
|
|
11630
|
+
var T = this.subarray(f, d);
|
|
11631
11631
|
return Object.setPrototypeOf(T, o.prototype), T;
|
|
11632
11632
|
};
|
|
11633
|
-
function G(y,
|
|
11633
|
+
function G(y, f, d) {
|
|
11634
11634
|
if (y % 1 !== 0 || y < 0) throw new RangeError("offset is not uint");
|
|
11635
|
-
if (y +
|
|
11635
|
+
if (y + f > d) throw new RangeError("Trying to access beyond buffer length");
|
|
11636
11636
|
}
|
|
11637
|
-
o.prototype.readUintLE = o.prototype.readUIntLE = function(
|
|
11638
|
-
|
|
11639
|
-
for (var T = this[
|
|
11640
|
-
T += this[
|
|
11637
|
+
o.prototype.readUintLE = o.prototype.readUIntLE = function(f, d, S) {
|
|
11638
|
+
f = f >>> 0, d = d >>> 0, S || G(f, d, this.length);
|
|
11639
|
+
for (var T = this[f], L = 1, A = 0; ++A < d && (L *= 256); )
|
|
11640
|
+
T += this[f + A] * L;
|
|
11641
11641
|
return T;
|
|
11642
|
-
}, o.prototype.readUintBE = o.prototype.readUIntBE = function(
|
|
11643
|
-
|
|
11644
|
-
for (var T = this[
|
|
11645
|
-
T += this[
|
|
11642
|
+
}, o.prototype.readUintBE = o.prototype.readUIntBE = function(f, d, S) {
|
|
11643
|
+
f = f >>> 0, d = d >>> 0, S || G(f, d, this.length);
|
|
11644
|
+
for (var T = this[f + --d], L = 1; d > 0 && (L *= 256); )
|
|
11645
|
+
T += this[f + --d] * L;
|
|
11646
11646
|
return T;
|
|
11647
|
-
}, o.prototype.readUint8 = o.prototype.readUInt8 = function(
|
|
11648
|
-
return
|
|
11649
|
-
}, o.prototype.readUint16LE = o.prototype.readUInt16LE = function(
|
|
11650
|
-
return
|
|
11651
|
-
}, o.prototype.readUint16BE = o.prototype.readUInt16BE = function(
|
|
11652
|
-
return
|
|
11653
|
-
}, o.prototype.readUint32LE = o.prototype.readUInt32LE = function(
|
|
11654
|
-
return
|
|
11655
|
-
}, o.prototype.readUint32BE = o.prototype.readUInt32BE = function(
|
|
11656
|
-
return
|
|
11657
|
-
}, o.prototype.readIntLE = function(
|
|
11658
|
-
|
|
11659
|
-
for (var T = this[
|
|
11660
|
-
T += this[
|
|
11647
|
+
}, o.prototype.readUint8 = o.prototype.readUInt8 = function(f, d) {
|
|
11648
|
+
return f = f >>> 0, d || G(f, 1, this.length), this[f];
|
|
11649
|
+
}, o.prototype.readUint16LE = o.prototype.readUInt16LE = function(f, d) {
|
|
11650
|
+
return f = f >>> 0, d || G(f, 2, this.length), this[f] | this[f + 1] << 8;
|
|
11651
|
+
}, o.prototype.readUint16BE = o.prototype.readUInt16BE = function(f, d) {
|
|
11652
|
+
return f = f >>> 0, d || G(f, 2, this.length), this[f] << 8 | this[f + 1];
|
|
11653
|
+
}, o.prototype.readUint32LE = o.prototype.readUInt32LE = function(f, d) {
|
|
11654
|
+
return f = f >>> 0, d || G(f, 4, this.length), (this[f] | this[f + 1] << 8 | this[f + 2] << 16) + this[f + 3] * 16777216;
|
|
11655
|
+
}, o.prototype.readUint32BE = o.prototype.readUInt32BE = function(f, d) {
|
|
11656
|
+
return f = f >>> 0, d || G(f, 4, this.length), this[f] * 16777216 + (this[f + 1] << 16 | this[f + 2] << 8 | this[f + 3]);
|
|
11657
|
+
}, o.prototype.readIntLE = function(f, d, S) {
|
|
11658
|
+
f = f >>> 0, d = d >>> 0, S || G(f, d, this.length);
|
|
11659
|
+
for (var T = this[f], L = 1, A = 0; ++A < d && (L *= 256); )
|
|
11660
|
+
T += this[f + A] * L;
|
|
11661
11661
|
return L *= 128, T >= L && (T -= Math.pow(2, 8 * d)), T;
|
|
11662
|
-
}, o.prototype.readIntBE = function(
|
|
11663
|
-
|
|
11664
|
-
for (var T = d, L = 1, A = this[
|
|
11665
|
-
A += this[
|
|
11662
|
+
}, o.prototype.readIntBE = function(f, d, S) {
|
|
11663
|
+
f = f >>> 0, d = d >>> 0, S || G(f, d, this.length);
|
|
11664
|
+
for (var T = d, L = 1, A = this[f + --T]; T > 0 && (L *= 256); )
|
|
11665
|
+
A += this[f + --T] * L;
|
|
11666
11666
|
return L *= 128, A >= L && (A -= Math.pow(2, 8 * d)), A;
|
|
11667
|
-
}, o.prototype.readInt8 = function(
|
|
11668
|
-
return
|
|
11669
|
-
}, o.prototype.readInt16LE = function(
|
|
11670
|
-
|
|
11671
|
-
var
|
|
11672
|
-
return
|
|
11673
|
-
}, o.prototype.readInt16BE = function(
|
|
11674
|
-
|
|
11675
|
-
var
|
|
11676
|
-
return
|
|
11677
|
-
}, o.prototype.readInt32LE = function(
|
|
11678
|
-
return
|
|
11679
|
-
}, o.prototype.readInt32BE = function(
|
|
11680
|
-
return
|
|
11681
|
-
}, o.prototype.readFloatLE = function(
|
|
11682
|
-
return
|
|
11683
|
-
}, o.prototype.readFloatBE = function(
|
|
11684
|
-
return
|
|
11685
|
-
}, o.prototype.readDoubleLE = function(
|
|
11686
|
-
return
|
|
11687
|
-
}, o.prototype.readDoubleBE = function(
|
|
11688
|
-
return
|
|
11667
|
+
}, o.prototype.readInt8 = function(f, d) {
|
|
11668
|
+
return f = f >>> 0, d || G(f, 1, this.length), this[f] & 128 ? (255 - this[f] + 1) * -1 : this[f];
|
|
11669
|
+
}, o.prototype.readInt16LE = function(f, d) {
|
|
11670
|
+
f = f >>> 0, d || G(f, 2, this.length);
|
|
11671
|
+
var S = this[f] | this[f + 1] << 8;
|
|
11672
|
+
return S & 32768 ? S | 4294901760 : S;
|
|
11673
|
+
}, o.prototype.readInt16BE = function(f, d) {
|
|
11674
|
+
f = f >>> 0, d || G(f, 2, this.length);
|
|
11675
|
+
var S = this[f + 1] | this[f] << 8;
|
|
11676
|
+
return S & 32768 ? S | 4294901760 : S;
|
|
11677
|
+
}, o.prototype.readInt32LE = function(f, d) {
|
|
11678
|
+
return f = f >>> 0, d || G(f, 4, this.length), this[f] | this[f + 1] << 8 | this[f + 2] << 16 | this[f + 3] << 24;
|
|
11679
|
+
}, o.prototype.readInt32BE = function(f, d) {
|
|
11680
|
+
return f = f >>> 0, d || G(f, 4, this.length), this[f] << 24 | this[f + 1] << 16 | this[f + 2] << 8 | this[f + 3];
|
|
11681
|
+
}, o.prototype.readFloatLE = function(f, d) {
|
|
11682
|
+
return f = f >>> 0, d || G(f, 4, this.length), r.read(this, f, !0, 23, 4);
|
|
11683
|
+
}, o.prototype.readFloatBE = function(f, d) {
|
|
11684
|
+
return f = f >>> 0, d || G(f, 4, this.length), r.read(this, f, !1, 23, 4);
|
|
11685
|
+
}, o.prototype.readDoubleLE = function(f, d) {
|
|
11686
|
+
return f = f >>> 0, d || G(f, 8, this.length), r.read(this, f, !0, 52, 8);
|
|
11687
|
+
}, o.prototype.readDoubleBE = function(f, d) {
|
|
11688
|
+
return f = f >>> 0, d || G(f, 8, this.length), r.read(this, f, !1, 52, 8);
|
|
11689
11689
|
};
|
|
11690
|
-
function q(y,
|
|
11690
|
+
function q(y, f, d, S, T, L) {
|
|
11691
11691
|
if (!o.isBuffer(y)) throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
11692
|
-
if (
|
|
11693
|
-
if (d +
|
|
11692
|
+
if (f > T || f < L) throw new RangeError('"value" argument is out of bounds');
|
|
11693
|
+
if (d + S > y.length) throw new RangeError("Index out of range");
|
|
11694
11694
|
}
|
|
11695
|
-
o.prototype.writeUintLE = o.prototype.writeUIntLE = function(
|
|
11696
|
-
if (
|
|
11697
|
-
var L = Math.pow(2, 8 *
|
|
11698
|
-
q(this,
|
|
11695
|
+
o.prototype.writeUintLE = o.prototype.writeUIntLE = function(f, d, S, T) {
|
|
11696
|
+
if (f = +f, d = d >>> 0, S = S >>> 0, !T) {
|
|
11697
|
+
var L = Math.pow(2, 8 * S) - 1;
|
|
11698
|
+
q(this, f, d, S, L, 0);
|
|
11699
11699
|
}
|
|
11700
11700
|
var A = 1, V = 0;
|
|
11701
|
-
for (this[d] =
|
|
11702
|
-
this[d + V] =
|
|
11703
|
-
return d +
|
|
11704
|
-
}, o.prototype.writeUintBE = o.prototype.writeUIntBE = function(
|
|
11705
|
-
if (
|
|
11706
|
-
var L = Math.pow(2, 8 *
|
|
11707
|
-
q(this,
|
|
11701
|
+
for (this[d] = f & 255; ++V < S && (A *= 256); )
|
|
11702
|
+
this[d + V] = f / A & 255;
|
|
11703
|
+
return d + S;
|
|
11704
|
+
}, o.prototype.writeUintBE = o.prototype.writeUIntBE = function(f, d, S, T) {
|
|
11705
|
+
if (f = +f, d = d >>> 0, S = S >>> 0, !T) {
|
|
11706
|
+
var L = Math.pow(2, 8 * S) - 1;
|
|
11707
|
+
q(this, f, d, S, L, 0);
|
|
11708
11708
|
}
|
|
11709
|
-
var A =
|
|
11710
|
-
for (this[d + A] =
|
|
11711
|
-
this[d + A] =
|
|
11712
|
-
return d +
|
|
11713
|
-
}, o.prototype.writeUint8 = o.prototype.writeUInt8 = function(
|
|
11714
|
-
return
|
|
11715
|
-
}, o.prototype.writeUint16LE = o.prototype.writeUInt16LE = function(
|
|
11716
|
-
return
|
|
11717
|
-
}, o.prototype.writeUint16BE = o.prototype.writeUInt16BE = function(
|
|
11718
|
-
return
|
|
11719
|
-
}, o.prototype.writeUint32LE = o.prototype.writeUInt32LE = function(
|
|
11720
|
-
return
|
|
11721
|
-
}, o.prototype.writeUint32BE = o.prototype.writeUInt32BE = function(
|
|
11722
|
-
return
|
|
11723
|
-
}, o.prototype.writeIntLE = function(
|
|
11724
|
-
if (
|
|
11725
|
-
var L = Math.pow(2, 8 *
|
|
11726
|
-
q(this,
|
|
11709
|
+
var A = S - 1, V = 1;
|
|
11710
|
+
for (this[d + A] = f & 255; --A >= 0 && (V *= 256); )
|
|
11711
|
+
this[d + A] = f / V & 255;
|
|
11712
|
+
return d + S;
|
|
11713
|
+
}, o.prototype.writeUint8 = o.prototype.writeUInt8 = function(f, d, S) {
|
|
11714
|
+
return f = +f, d = d >>> 0, S || q(this, f, d, 1, 255, 0), this[d] = f & 255, d + 1;
|
|
11715
|
+
}, o.prototype.writeUint16LE = o.prototype.writeUInt16LE = function(f, d, S) {
|
|
11716
|
+
return f = +f, d = d >>> 0, S || q(this, f, d, 2, 65535, 0), this[d] = f & 255, this[d + 1] = f >>> 8, d + 2;
|
|
11717
|
+
}, o.prototype.writeUint16BE = o.prototype.writeUInt16BE = function(f, d, S) {
|
|
11718
|
+
return f = +f, d = d >>> 0, S || q(this, f, d, 2, 65535, 0), this[d] = f >>> 8, this[d + 1] = f & 255, d + 2;
|
|
11719
|
+
}, o.prototype.writeUint32LE = o.prototype.writeUInt32LE = function(f, d, S) {
|
|
11720
|
+
return f = +f, d = d >>> 0, S || q(this, f, d, 4, 4294967295, 0), this[d + 3] = f >>> 24, this[d + 2] = f >>> 16, this[d + 1] = f >>> 8, this[d] = f & 255, d + 4;
|
|
11721
|
+
}, o.prototype.writeUint32BE = o.prototype.writeUInt32BE = function(f, d, S) {
|
|
11722
|
+
return f = +f, d = d >>> 0, S || q(this, f, d, 4, 4294967295, 0), this[d] = f >>> 24, this[d + 1] = f >>> 16, this[d + 2] = f >>> 8, this[d + 3] = f & 255, d + 4;
|
|
11723
|
+
}, o.prototype.writeIntLE = function(f, d, S, T) {
|
|
11724
|
+
if (f = +f, d = d >>> 0, !T) {
|
|
11725
|
+
var L = Math.pow(2, 8 * S - 1);
|
|
11726
|
+
q(this, f, d, S, L - 1, -L);
|
|
11727
11727
|
}
|
|
11728
11728
|
var A = 0, V = 1, Y = 0;
|
|
11729
|
-
for (this[d] =
|
|
11730
|
-
|
|
11731
|
-
return d +
|
|
11732
|
-
}, o.prototype.writeIntBE = function(
|
|
11733
|
-
if (
|
|
11734
|
-
var L = Math.pow(2, 8 *
|
|
11735
|
-
q(this,
|
|
11729
|
+
for (this[d] = f & 255; ++A < S && (V *= 256); )
|
|
11730
|
+
f < 0 && Y === 0 && this[d + A - 1] !== 0 && (Y = 1), this[d + A] = (f / V >> 0) - Y & 255;
|
|
11731
|
+
return d + S;
|
|
11732
|
+
}, o.prototype.writeIntBE = function(f, d, S, T) {
|
|
11733
|
+
if (f = +f, d = d >>> 0, !T) {
|
|
11734
|
+
var L = Math.pow(2, 8 * S - 1);
|
|
11735
|
+
q(this, f, d, S, L - 1, -L);
|
|
11736
11736
|
}
|
|
11737
|
-
var A =
|
|
11738
|
-
for (this[d + A] =
|
|
11739
|
-
|
|
11740
|
-
return d +
|
|
11741
|
-
}, o.prototype.writeInt8 = function(
|
|
11742
|
-
return
|
|
11743
|
-
}, o.prototype.writeInt16LE = function(
|
|
11744
|
-
return
|
|
11745
|
-
}, o.prototype.writeInt16BE = function(
|
|
11746
|
-
return
|
|
11747
|
-
}, o.prototype.writeInt32LE = function(
|
|
11748
|
-
return
|
|
11749
|
-
}, o.prototype.writeInt32BE = function(
|
|
11750
|
-
return
|
|
11737
|
+
var A = S - 1, V = 1, Y = 0;
|
|
11738
|
+
for (this[d + A] = f & 255; --A >= 0 && (V *= 256); )
|
|
11739
|
+
f < 0 && Y === 0 && this[d + A + 1] !== 0 && (Y = 1), this[d + A] = (f / V >> 0) - Y & 255;
|
|
11740
|
+
return d + S;
|
|
11741
|
+
}, o.prototype.writeInt8 = function(f, d, S) {
|
|
11742
|
+
return f = +f, d = d >>> 0, S || q(this, f, d, 1, 127, -128), f < 0 && (f = 255 + f + 1), this[d] = f & 255, d + 1;
|
|
11743
|
+
}, o.prototype.writeInt16LE = function(f, d, S) {
|
|
11744
|
+
return f = +f, d = d >>> 0, S || q(this, f, d, 2, 32767, -32768), this[d] = f & 255, this[d + 1] = f >>> 8, d + 2;
|
|
11745
|
+
}, o.prototype.writeInt16BE = function(f, d, S) {
|
|
11746
|
+
return f = +f, d = d >>> 0, S || q(this, f, d, 2, 32767, -32768), this[d] = f >>> 8, this[d + 1] = f & 255, d + 2;
|
|
11747
|
+
}, o.prototype.writeInt32LE = function(f, d, S) {
|
|
11748
|
+
return f = +f, d = d >>> 0, S || q(this, f, d, 4, 2147483647, -2147483648), this[d] = f & 255, this[d + 1] = f >>> 8, this[d + 2] = f >>> 16, this[d + 3] = f >>> 24, d + 4;
|
|
11749
|
+
}, o.prototype.writeInt32BE = function(f, d, S) {
|
|
11750
|
+
return f = +f, d = d >>> 0, S || q(this, f, d, 4, 2147483647, -2147483648), f < 0 && (f = 4294967295 + f + 1), this[d] = f >>> 24, this[d + 1] = f >>> 16, this[d + 2] = f >>> 8, this[d + 3] = f & 255, d + 4;
|
|
11751
11751
|
};
|
|
11752
|
-
function ut(y,
|
|
11753
|
-
if (d +
|
|
11752
|
+
function ut(y, f, d, S, T, L) {
|
|
11753
|
+
if (d + S > y.length) throw new RangeError("Index out of range");
|
|
11754
11754
|
if (d < 0) throw new RangeError("Index out of range");
|
|
11755
11755
|
}
|
|
11756
|
-
function _t(y,
|
|
11757
|
-
return
|
|
11756
|
+
function _t(y, f, d, S, T) {
|
|
11757
|
+
return f = +f, d = d >>> 0, T || ut(y, f, d, 4), r.write(y, f, d, S, 23, 4), d + 4;
|
|
11758
11758
|
}
|
|
11759
|
-
o.prototype.writeFloatLE = function(
|
|
11760
|
-
return _t(this,
|
|
11761
|
-
}, o.prototype.writeFloatBE = function(
|
|
11762
|
-
return _t(this,
|
|
11759
|
+
o.prototype.writeFloatLE = function(f, d, S) {
|
|
11760
|
+
return _t(this, f, d, !0, S);
|
|
11761
|
+
}, o.prototype.writeFloatBE = function(f, d, S) {
|
|
11762
|
+
return _t(this, f, d, !1, S);
|
|
11763
11763
|
};
|
|
11764
|
-
function Pt(y,
|
|
11765
|
-
return
|
|
11766
|
-
}
|
|
11767
|
-
o.prototype.writeDoubleLE = function(
|
|
11768
|
-
return Pt(this,
|
|
11769
|
-
}, o.prototype.writeDoubleBE = function(
|
|
11770
|
-
return Pt(this,
|
|
11771
|
-
}, o.prototype.copy = function(
|
|
11772
|
-
if (!o.isBuffer(
|
|
11773
|
-
if (
|
|
11764
|
+
function Pt(y, f, d, S, T) {
|
|
11765
|
+
return f = +f, d = d >>> 0, T || ut(y, f, d, 8), r.write(y, f, d, S, 52, 8), d + 8;
|
|
11766
|
+
}
|
|
11767
|
+
o.prototype.writeDoubleLE = function(f, d, S) {
|
|
11768
|
+
return Pt(this, f, d, !0, S);
|
|
11769
|
+
}, o.prototype.writeDoubleBE = function(f, d, S) {
|
|
11770
|
+
return Pt(this, f, d, !1, S);
|
|
11771
|
+
}, o.prototype.copy = function(f, d, S, T) {
|
|
11772
|
+
if (!o.isBuffer(f)) throw new TypeError("argument should be a Buffer");
|
|
11773
|
+
if (S || (S = 0), !T && T !== 0 && (T = this.length), d >= f.length && (d = f.length), d || (d = 0), T > 0 && T < S && (T = S), T === S || f.length === 0 || this.length === 0) return 0;
|
|
11774
11774
|
if (d < 0)
|
|
11775
11775
|
throw new RangeError("targetStart out of bounds");
|
|
11776
|
-
if (
|
|
11776
|
+
if (S < 0 || S >= this.length) throw new RangeError("Index out of range");
|
|
11777
11777
|
if (T < 0) throw new RangeError("sourceEnd out of bounds");
|
|
11778
|
-
T > this.length && (T = this.length),
|
|
11779
|
-
var L = T -
|
|
11780
|
-
return this ===
|
|
11781
|
-
|
|
11782
|
-
this.subarray(
|
|
11778
|
+
T > this.length && (T = this.length), f.length - d < T - S && (T = f.length - d + S);
|
|
11779
|
+
var L = T - S;
|
|
11780
|
+
return this === f && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(d, S, T) : Uint8Array.prototype.set.call(
|
|
11781
|
+
f,
|
|
11782
|
+
this.subarray(S, T),
|
|
11783
11783
|
d
|
|
11784
11784
|
), L;
|
|
11785
|
-
}, o.prototype.fill = function(
|
|
11786
|
-
if (typeof
|
|
11787
|
-
if (typeof d == "string" ? (T = d, d = 0,
|
|
11785
|
+
}, o.prototype.fill = function(f, d, S, T) {
|
|
11786
|
+
if (typeof f == "string") {
|
|
11787
|
+
if (typeof d == "string" ? (T = d, d = 0, S = this.length) : typeof S == "string" && (T = S, S = this.length), T !== void 0 && typeof T != "string")
|
|
11788
11788
|
throw new TypeError("encoding must be a string");
|
|
11789
11789
|
if (typeof T == "string" && !o.isEncoding(T))
|
|
11790
11790
|
throw new TypeError("Unknown encoding: " + T);
|
|
11791
|
-
if (
|
|
11792
|
-
var L =
|
|
11793
|
-
(T === "utf8" && L < 128 || T === "latin1") && (
|
|
11791
|
+
if (f.length === 1) {
|
|
11792
|
+
var L = f.charCodeAt(0);
|
|
11793
|
+
(T === "utf8" && L < 128 || T === "latin1") && (f = L);
|
|
11794
11794
|
}
|
|
11795
|
-
} else typeof
|
|
11796
|
-
if (d < 0 || this.length < d || this.length <
|
|
11795
|
+
} else typeof f == "number" ? f = f & 255 : typeof f == "boolean" && (f = Number(f));
|
|
11796
|
+
if (d < 0 || this.length < d || this.length < S)
|
|
11797
11797
|
throw new RangeError("Out of range index");
|
|
11798
|
-
if (
|
|
11798
|
+
if (S <= d)
|
|
11799
11799
|
return this;
|
|
11800
|
-
d = d >>> 0,
|
|
11800
|
+
d = d >>> 0, S = S === void 0 ? this.length : S >>> 0, f || (f = 0);
|
|
11801
11801
|
var A;
|
|
11802
|
-
if (typeof
|
|
11803
|
-
for (A = d; A <
|
|
11804
|
-
this[A] =
|
|
11802
|
+
if (typeof f == "number")
|
|
11803
|
+
for (A = d; A < S; ++A)
|
|
11804
|
+
this[A] = f;
|
|
11805
11805
|
else {
|
|
11806
|
-
var V = o.isBuffer(
|
|
11806
|
+
var V = o.isBuffer(f) ? f : o.from(f, T), Y = V.length;
|
|
11807
11807
|
if (Y === 0)
|
|
11808
|
-
throw new TypeError('The value "' +
|
|
11809
|
-
for (A = 0; A <
|
|
11808
|
+
throw new TypeError('The value "' + f + '" is invalid for argument "value"');
|
|
11809
|
+
for (A = 0; A < S - d; ++A)
|
|
11810
11810
|
this[A + d] = V[A % Y];
|
|
11811
11811
|
}
|
|
11812
11812
|
return this;
|
|
@@ -11818,45 +11818,45 @@ yn.write = function(t, e, r, n, a, i) {
|
|
|
11818
11818
|
y = y + "=";
|
|
11819
11819
|
return y;
|
|
11820
11820
|
}
|
|
11821
|
-
function ze(y,
|
|
11822
|
-
|
|
11823
|
-
for (var d,
|
|
11821
|
+
function ze(y, f) {
|
|
11822
|
+
f = f || 1 / 0;
|
|
11823
|
+
for (var d, S = y.length, T = null, L = [], A = 0; A < S; ++A) {
|
|
11824
11824
|
if (d = y.charCodeAt(A), d > 55295 && d < 57344) {
|
|
11825
11825
|
if (!T) {
|
|
11826
11826
|
if (d > 56319) {
|
|
11827
|
-
(
|
|
11827
|
+
(f -= 3) > -1 && L.push(239, 191, 189);
|
|
11828
11828
|
continue;
|
|
11829
|
-
} else if (A + 1 ===
|
|
11830
|
-
(
|
|
11829
|
+
} else if (A + 1 === S) {
|
|
11830
|
+
(f -= 3) > -1 && L.push(239, 191, 189);
|
|
11831
11831
|
continue;
|
|
11832
11832
|
}
|
|
11833
11833
|
T = d;
|
|
11834
11834
|
continue;
|
|
11835
11835
|
}
|
|
11836
11836
|
if (d < 56320) {
|
|
11837
|
-
(
|
|
11837
|
+
(f -= 3) > -1 && L.push(239, 191, 189), T = d;
|
|
11838
11838
|
continue;
|
|
11839
11839
|
}
|
|
11840
11840
|
d = (T - 55296 << 10 | d - 56320) + 65536;
|
|
11841
|
-
} else T && (
|
|
11841
|
+
} else T && (f -= 3) > -1 && L.push(239, 191, 189);
|
|
11842
11842
|
if (T = null, d < 128) {
|
|
11843
|
-
if ((
|
|
11843
|
+
if ((f -= 1) < 0) break;
|
|
11844
11844
|
L.push(d);
|
|
11845
11845
|
} else if (d < 2048) {
|
|
11846
|
-
if ((
|
|
11846
|
+
if ((f -= 2) < 0) break;
|
|
11847
11847
|
L.push(
|
|
11848
11848
|
d >> 6 | 192,
|
|
11849
11849
|
d & 63 | 128
|
|
11850
11850
|
);
|
|
11851
11851
|
} else if (d < 65536) {
|
|
11852
|
-
if ((
|
|
11852
|
+
if ((f -= 3) < 0) break;
|
|
11853
11853
|
L.push(
|
|
11854
11854
|
d >> 12 | 224,
|
|
11855
11855
|
d >> 6 & 63 | 128,
|
|
11856
11856
|
d & 63 | 128
|
|
11857
11857
|
);
|
|
11858
11858
|
} else if (d < 1114112) {
|
|
11859
|
-
if ((
|
|
11859
|
+
if ((f -= 4) < 0) break;
|
|
11860
11860
|
L.push(
|
|
11861
11861
|
d >> 18 | 240,
|
|
11862
11862
|
d >> 12 & 63 | 128,
|
|
@@ -11869,34 +11869,34 @@ yn.write = function(t, e, r, n, a, i) {
|
|
|
11869
11869
|
return L;
|
|
11870
11870
|
}
|
|
11871
11871
|
function Ji(y) {
|
|
11872
|
-
for (var
|
|
11873
|
-
|
|
11874
|
-
return
|
|
11872
|
+
for (var f = [], d = 0; d < y.length; ++d)
|
|
11873
|
+
f.push(y.charCodeAt(d) & 255);
|
|
11874
|
+
return f;
|
|
11875
11875
|
}
|
|
11876
|
-
function es(y,
|
|
11877
|
-
for (var d,
|
|
11878
|
-
d = y.charCodeAt(A),
|
|
11876
|
+
function es(y, f) {
|
|
11877
|
+
for (var d, S, T, L = [], A = 0; A < y.length && !((f -= 2) < 0); ++A)
|
|
11878
|
+
d = y.charCodeAt(A), S = d >> 8, T = d % 256, L.push(T), L.push(S);
|
|
11879
11879
|
return L;
|
|
11880
11880
|
}
|
|
11881
11881
|
function Fn(y) {
|
|
11882
11882
|
return e.toByteArray(Nt(y));
|
|
11883
11883
|
}
|
|
11884
|
-
function Gt(y,
|
|
11885
|
-
for (var T = 0; T <
|
|
11886
|
-
|
|
11884
|
+
function Gt(y, f, d, S) {
|
|
11885
|
+
for (var T = 0; T < S && !(T + d >= f.length || T >= y.length); ++T)
|
|
11886
|
+
f[T + d] = y[T];
|
|
11887
11887
|
return T;
|
|
11888
11888
|
}
|
|
11889
|
-
function Be(y,
|
|
11890
|
-
return y instanceof
|
|
11889
|
+
function Be(y, f) {
|
|
11890
|
+
return y instanceof f || y != null && y.constructor != null && y.constructor.name != null && y.constructor.name === f.name;
|
|
11891
11891
|
}
|
|
11892
11892
|
function pr(y) {
|
|
11893
11893
|
return y !== y;
|
|
11894
11894
|
}
|
|
11895
11895
|
var ts = function() {
|
|
11896
|
-
for (var y = "0123456789abcdef",
|
|
11897
|
-
for (var
|
|
11898
|
-
|
|
11899
|
-
return
|
|
11896
|
+
for (var y = "0123456789abcdef", f = new Array(256), d = 0; d < 16; ++d)
|
|
11897
|
+
for (var S = d * 16, T = 0; T < 16; ++T)
|
|
11898
|
+
f[S + T] = y[d] + y[T];
|
|
11899
|
+
return f;
|
|
11900
11900
|
}();
|
|
11901
11901
|
})(vn);
|
|
11902
11902
|
var Jt = vn, pt = Jt.Buffer, Se = {}, we;
|
|
@@ -12047,7 +12047,7 @@ function xl() {
|
|
|
12047
12047
|
var F;
|
|
12048
12048
|
switch (this.encoding) {
|
|
12049
12049
|
case "utf16le":
|
|
12050
|
-
this.text =
|
|
12050
|
+
this.text = p, this.end = l, F = 4;
|
|
12051
12051
|
break;
|
|
12052
12052
|
case "utf8":
|
|
12053
12053
|
this.fillLast = c, F = 4;
|
|
@@ -12056,7 +12056,7 @@ function xl() {
|
|
|
12056
12056
|
this.text = g, this.end = x, F = 3;
|
|
12057
12057
|
break;
|
|
12058
12058
|
default:
|
|
12059
|
-
this.write = v, this.end =
|
|
12059
|
+
this.write = v, this.end = b;
|
|
12060
12060
|
return;
|
|
12061
12061
|
}
|
|
12062
12062
|
this.lastNeed = 0, this.lastTotal = 0, this.lastChar = t.allocUnsafe(F);
|
|
@@ -12112,7 +12112,7 @@ function xl() {
|
|
|
12112
12112
|
var F = m && m.length ? this.write(m) : "";
|
|
12113
12113
|
return this.lastNeed ? F + "�" : F;
|
|
12114
12114
|
}
|
|
12115
|
-
function
|
|
12115
|
+
function p(m, F) {
|
|
12116
12116
|
if ((m.length - F) % 2 === 0) {
|
|
12117
12117
|
var w = m.toString("utf16le", F);
|
|
12118
12118
|
if (w) {
|
|
@@ -12143,7 +12143,7 @@ function xl() {
|
|
|
12143
12143
|
function v(m) {
|
|
12144
12144
|
return m.toString(this.encoding);
|
|
12145
12145
|
}
|
|
12146
|
-
function
|
|
12146
|
+
function b(m) {
|
|
12147
12147
|
return m && m.length ? this.write(m) : "";
|
|
12148
12148
|
}
|
|
12149
12149
|
return Ar;
|
|
@@ -12199,22 +12199,22 @@ function bl() {
|
|
|
12199
12199
|
function s(u, h) {
|
|
12200
12200
|
}
|
|
12201
12201
|
s.prototype.write = function(u) {
|
|
12202
|
-
for (var h = t.alloc(u.length * 3),
|
|
12202
|
+
for (var h = t.alloc(u.length * 3), p = 0, l = 0; l < u.length; l++) {
|
|
12203
12203
|
var g = u.charCodeAt(l);
|
|
12204
|
-
g < 128 ? h[
|
|
12204
|
+
g < 128 ? h[p++] = g : g < 2048 ? (h[p++] = 192 + (g >>> 6), h[p++] = 128 + (g & 63)) : (h[p++] = 224 + (g >>> 12), h[p++] = 128 + (g >>> 6 & 63), h[p++] = 128 + (g & 63));
|
|
12205
12205
|
}
|
|
12206
|
-
return h.slice(0,
|
|
12206
|
+
return h.slice(0, p);
|
|
12207
12207
|
}, s.prototype.end = function() {
|
|
12208
12208
|
};
|
|
12209
12209
|
function o(u, h) {
|
|
12210
12210
|
this.acc = 0, this.contBytes = 0, this.accBytes = 0, this.defaultCharUnicode = h.defaultCharUnicode;
|
|
12211
12211
|
}
|
|
12212
12212
|
o.prototype.write = function(u) {
|
|
12213
|
-
for (var h = this.acc,
|
|
12213
|
+
for (var h = this.acc, p = this.contBytes, l = this.accBytes, g = "", x = 0; x < u.length; x++) {
|
|
12214
12214
|
var v = u[x];
|
|
12215
|
-
(v & 192) !== 128 ? (
|
|
12215
|
+
(v & 192) !== 128 ? (p > 0 && (g += this.defaultCharUnicode, p = 0), v < 128 ? g += String.fromCharCode(v) : v < 224 ? (h = v & 31, p = 1, l = 1) : v < 240 ? (h = v & 15, p = 2, l = 1) : g += this.defaultCharUnicode) : p > 0 ? (h = h << 6 | v & 63, p--, l++, p === 0 && (l === 2 && h < 128 && h > 0 ? g += this.defaultCharUnicode : l === 3 && h < 2048 ? g += this.defaultCharUnicode : g += String.fromCharCode(h))) : g += this.defaultCharUnicode;
|
|
12216
12216
|
}
|
|
12217
|
-
return this.acc = h, this.contBytes =
|
|
12217
|
+
return this.acc = h, this.contBytes = p, this.accBytes = l, g;
|
|
12218
12218
|
}, o.prototype.end = function() {
|
|
12219
12219
|
var u = 0;
|
|
12220
12220
|
return this.contBytes > 0 && (u += this.defaultCharUnicode), u;
|
|
@@ -12249,19 +12249,19 @@ function Sl() {
|
|
|
12249
12249
|
this.isLE = h.isLE, this.highSurrogate = 0;
|
|
12250
12250
|
}
|
|
12251
12251
|
r.prototype.write = function(u) {
|
|
12252
|
-
for (var h = t.from(u, "ucs2"),
|
|
12253
|
-
var v = h.readUInt16LE(x),
|
|
12252
|
+
for (var h = t.from(u, "ucs2"), p = t.alloc(h.length * 2), l = this.isLE ? p.writeUInt32LE : p.writeUInt32BE, g = 0, x = 0; x < h.length; x += 2) {
|
|
12253
|
+
var v = h.readUInt16LE(x), b = v >= 55296 && v < 56320, m = v >= 56320 && v < 57344;
|
|
12254
12254
|
if (this.highSurrogate)
|
|
12255
|
-
if (
|
|
12256
|
-
l.call(
|
|
12255
|
+
if (b || !m)
|
|
12256
|
+
l.call(p, this.highSurrogate, g), g += 4;
|
|
12257
12257
|
else {
|
|
12258
12258
|
var F = (this.highSurrogate - 55296 << 10 | v - 56320) + 65536;
|
|
12259
|
-
l.call(
|
|
12259
|
+
l.call(p, F, g), g += 4, this.highSurrogate = 0;
|
|
12260
12260
|
continue;
|
|
12261
12261
|
}
|
|
12262
|
-
|
|
12262
|
+
b ? this.highSurrogate = v : (l.call(p, v, g), g += 4, this.highSurrogate = 0);
|
|
12263
12263
|
}
|
|
12264
|
-
return g <
|
|
12264
|
+
return g < p.length && (p = p.slice(0, g)), p;
|
|
12265
12265
|
}, r.prototype.end = function() {
|
|
12266
12266
|
if (this.highSurrogate) {
|
|
12267
12267
|
var u = t.alloc(4);
|
|
@@ -12274,26 +12274,26 @@ function Sl() {
|
|
|
12274
12274
|
n.prototype.write = function(u) {
|
|
12275
12275
|
if (u.length === 0)
|
|
12276
12276
|
return "";
|
|
12277
|
-
var h = 0,
|
|
12277
|
+
var h = 0, p = 0, l = t.alloc(u.length + 4), g = 0, x = this.isLE, v = this.overflow, b = this.badChar;
|
|
12278
12278
|
if (v.length > 0) {
|
|
12279
12279
|
for (; h < u.length && v.length < 4; h++)
|
|
12280
12280
|
v.push(u[h]);
|
|
12281
|
-
v.length === 4 && (x ?
|
|
12281
|
+
v.length === 4 && (x ? p = v[h] | v[h + 1] << 8 | v[h + 2] << 16 | v[h + 3] << 24 : p = v[h + 3] | v[h + 2] << 8 | v[h + 1] << 16 | v[h] << 24, v.length = 0, g = a(l, g, p, b));
|
|
12282
12282
|
}
|
|
12283
12283
|
for (; h < u.length - 3; h += 4)
|
|
12284
|
-
x ?
|
|
12284
|
+
x ? p = u[h] | u[h + 1] << 8 | u[h + 2] << 16 | u[h + 3] << 24 : p = u[h + 3] | u[h + 2] << 8 | u[h + 1] << 16 | u[h] << 24, g = a(l, g, p, b);
|
|
12285
12285
|
for (; h < u.length; h++)
|
|
12286
12286
|
v.push(u[h]);
|
|
12287
12287
|
return l.slice(0, g).toString("ucs2");
|
|
12288
12288
|
};
|
|
12289
|
-
function a(u, h,
|
|
12290
|
-
if ((
|
|
12291
|
-
|
|
12292
|
-
var g = 55296 |
|
|
12289
|
+
function a(u, h, p, l) {
|
|
12290
|
+
if ((p < 0 || p > 1114111) && (p = l), p >= 65536) {
|
|
12291
|
+
p -= 65536;
|
|
12292
|
+
var g = 55296 | p >> 10;
|
|
12293
12293
|
u[h++] = g & 255, u[h++] = g >> 8;
|
|
12294
|
-
var
|
|
12294
|
+
var p = 56320 | p & 1023;
|
|
12295
12295
|
}
|
|
12296
|
-
return u[h++] =
|
|
12296
|
+
return u[h++] = p & 255, u[h++] = p >> 8, h;
|
|
12297
12297
|
}
|
|
12298
12298
|
n.prototype.end = function() {
|
|
12299
12299
|
this.overflow.length = 0;
|
|
@@ -12319,38 +12319,38 @@ function Sl() {
|
|
|
12319
12319
|
return "";
|
|
12320
12320
|
var h = c(this.initialBufs, this.options.defaultEncoding);
|
|
12321
12321
|
this.decoder = this.iconv.getDecoder(h, this.options);
|
|
12322
|
-
for (var
|
|
12323
|
-
|
|
12324
|
-
return this.initialBufs.length = this.initialBufsLen = 0,
|
|
12322
|
+
for (var p = "", l = 0; l < this.initialBufs.length; l++)
|
|
12323
|
+
p += this.decoder.write(this.initialBufs[l]);
|
|
12324
|
+
return this.initialBufs.length = this.initialBufsLen = 0, p;
|
|
12325
12325
|
}
|
|
12326
12326
|
return this.decoder.write(u);
|
|
12327
12327
|
}, o.prototype.end = function() {
|
|
12328
12328
|
if (!this.decoder) {
|
|
12329
12329
|
var u = c(this.initialBufs, this.options.defaultEncoding);
|
|
12330
12330
|
this.decoder = this.iconv.getDecoder(u, this.options);
|
|
12331
|
-
for (var h = "",
|
|
12332
|
-
h += this.decoder.write(this.initialBufs[
|
|
12331
|
+
for (var h = "", p = 0; p < this.initialBufs.length; p++)
|
|
12332
|
+
h += this.decoder.write(this.initialBufs[p]);
|
|
12333
12333
|
var l = this.decoder.end();
|
|
12334
12334
|
return l && (h += l), this.initialBufs.length = this.initialBufsLen = 0, h;
|
|
12335
12335
|
}
|
|
12336
12336
|
return this.decoder.end();
|
|
12337
12337
|
};
|
|
12338
12338
|
function c(u, h) {
|
|
12339
|
-
var
|
|
12339
|
+
var p = [], l = 0, g = 0, x = 0, v = 0, b = 0;
|
|
12340
12340
|
e:
|
|
12341
12341
|
for (var m = 0; m < u.length; m++)
|
|
12342
12342
|
for (var F = u[m], w = 0; w < F.length; w++)
|
|
12343
|
-
if (
|
|
12343
|
+
if (p.push(F[w]), p.length === 4) {
|
|
12344
12344
|
if (l === 0) {
|
|
12345
|
-
if (
|
|
12345
|
+
if (p[0] === 255 && p[1] === 254 && p[2] === 0 && p[3] === 0)
|
|
12346
12346
|
return "utf-32le";
|
|
12347
|
-
if (
|
|
12347
|
+
if (p[0] === 0 && p[1] === 0 && p[2] === 254 && p[3] === 255)
|
|
12348
12348
|
return "utf-32be";
|
|
12349
12349
|
}
|
|
12350
|
-
if ((
|
|
12350
|
+
if ((p[0] !== 0 || p[1] > 16) && x++, (p[3] !== 0 || p[2] > 16) && g++, p[0] === 0 && p[1] === 0 && (p[2] !== 0 || p[3] !== 0) && b++, (p[0] !== 0 || p[1] !== 0) && p[2] === 0 && p[3] === 0 && v++, p.length = 0, l++, l >= 100)
|
|
12351
12351
|
break e;
|
|
12352
12352
|
}
|
|
12353
|
-
return
|
|
12353
|
+
return b - x > v - g ? "utf-32be" : b - x < v - g ? "utf-32le" : h || "utf-32le";
|
|
12354
12354
|
}
|
|
12355
12355
|
return _e;
|
|
12356
12356
|
}
|
|
@@ -12367,8 +12367,8 @@ function wl() {
|
|
|
12367
12367
|
}
|
|
12368
12368
|
r.prototype.write = function(c) {
|
|
12369
12369
|
for (var u = t.from(c, "ucs2"), h = 0; h < u.length; h += 2) {
|
|
12370
|
-
var
|
|
12371
|
-
u[h] = u[h + 1], u[h + 1] =
|
|
12370
|
+
var p = u[h];
|
|
12371
|
+
u[h] = u[h + 1], u[h + 1] = p;
|
|
12372
12372
|
}
|
|
12373
12373
|
return u;
|
|
12374
12374
|
}, r.prototype.end = function() {
|
|
@@ -12379,10 +12379,10 @@ function wl() {
|
|
|
12379
12379
|
n.prototype.write = function(c) {
|
|
12380
12380
|
if (c.length == 0)
|
|
12381
12381
|
return "";
|
|
12382
|
-
var u = t.alloc(c.length + 1), h = 0,
|
|
12383
|
-
for (this.overflowByte !== -1 && (u[0] = c[0], u[1] = this.overflowByte, h = 1,
|
|
12384
|
-
u[
|
|
12385
|
-
return this.overflowByte = h == c.length - 1 ? c[c.length - 1] : -1, u.slice(0,
|
|
12382
|
+
var u = t.alloc(c.length + 1), h = 0, p = 0;
|
|
12383
|
+
for (this.overflowByte !== -1 && (u[0] = c[0], u[1] = this.overflowByte, h = 1, p = 2); h < c.length - 1; h += 2, p += 2)
|
|
12384
|
+
u[p] = c[h + 1], u[p + 1] = c[h];
|
|
12385
|
+
return this.overflowByte = h == c.length - 1 ? c[c.length - 1] : -1, u.slice(0, p).toString("ucs2");
|
|
12386
12386
|
}, n.prototype.end = function() {
|
|
12387
12387
|
this.overflowByte = -1;
|
|
12388
12388
|
}, jt.utf16 = a;
|
|
@@ -12407,8 +12407,8 @@ function wl() {
|
|
|
12407
12407
|
return "";
|
|
12408
12408
|
var u = o(this.initialBufs, this.options.defaultEncoding);
|
|
12409
12409
|
this.decoder = this.iconv.getDecoder(u, this.options);
|
|
12410
|
-
for (var h = "",
|
|
12411
|
-
h += this.decoder.write(this.initialBufs[
|
|
12410
|
+
for (var h = "", p = 0; p < this.initialBufs.length; p++)
|
|
12411
|
+
h += this.decoder.write(this.initialBufs[p]);
|
|
12412
12412
|
return this.initialBufs.length = this.initialBufsLen = 0, h;
|
|
12413
12413
|
}
|
|
12414
12414
|
return this.decoder.write(c);
|
|
@@ -12418,22 +12418,22 @@ function wl() {
|
|
|
12418
12418
|
this.decoder = this.iconv.getDecoder(c, this.options);
|
|
12419
12419
|
for (var u = "", h = 0; h < this.initialBufs.length; h++)
|
|
12420
12420
|
u += this.decoder.write(this.initialBufs[h]);
|
|
12421
|
-
var
|
|
12422
|
-
return
|
|
12421
|
+
var p = this.decoder.end();
|
|
12422
|
+
return p && (u += p), this.initialBufs.length = this.initialBufsLen = 0, u;
|
|
12423
12423
|
}
|
|
12424
12424
|
return this.decoder.end();
|
|
12425
12425
|
};
|
|
12426
12426
|
function o(c, u) {
|
|
12427
|
-
var h = [],
|
|
12427
|
+
var h = [], p = 0, l = 0, g = 0;
|
|
12428
12428
|
e:
|
|
12429
12429
|
for (var x = 0; x < c.length; x++)
|
|
12430
|
-
for (var v = c[x],
|
|
12431
|
-
if (h.push(v[
|
|
12432
|
-
if (
|
|
12430
|
+
for (var v = c[x], b = 0; b < v.length; b++)
|
|
12431
|
+
if (h.push(v[b]), h.length === 2) {
|
|
12432
|
+
if (p === 0) {
|
|
12433
12433
|
if (h[0] === 255 && h[1] === 254) return "utf-16le";
|
|
12434
12434
|
if (h[0] === 254 && h[1] === 255) return "utf-16be";
|
|
12435
12435
|
}
|
|
12436
|
-
if (h[0] === 0 && h[1] !== 0 && g++, h[0] !== 0 && h[1] === 0 && l++, h.length = 0,
|
|
12436
|
+
if (h[0] === 0 && h[1] !== 0 && g++, h[0] !== 0 && h[1] === 0 && l++, h.length = 0, p++, p >= 100)
|
|
12437
12437
|
break e;
|
|
12438
12438
|
}
|
|
12439
12439
|
return g > l ? "utf-16be" : g < l ? "utf-16le" : u || "utf-16le";
|
|
@@ -12446,91 +12446,91 @@ function Fl() {
|
|
|
12446
12446
|
Ua = 1;
|
|
12447
12447
|
var t = et.Buffer;
|
|
12448
12448
|
St.utf7 = e, St.unicode11utf7 = "utf7";
|
|
12449
|
-
function e(v,
|
|
12450
|
-
this.iconv =
|
|
12449
|
+
function e(v, b) {
|
|
12450
|
+
this.iconv = b;
|
|
12451
12451
|
}
|
|
12452
12452
|
e.prototype.encoder = n, e.prototype.decoder = a, e.prototype.bomAware = !0;
|
|
12453
12453
|
var r = /[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g;
|
|
12454
|
-
function n(v,
|
|
12455
|
-
this.iconv =
|
|
12454
|
+
function n(v, b) {
|
|
12455
|
+
this.iconv = b.iconv;
|
|
12456
12456
|
}
|
|
12457
12457
|
n.prototype.write = function(v) {
|
|
12458
|
-
return t.from(v.replace(r, (function(
|
|
12459
|
-
return "+" + (
|
|
12458
|
+
return t.from(v.replace(r, (function(b) {
|
|
12459
|
+
return "+" + (b === "+" ? "" : this.iconv.encode(b, "utf16-be").toString("base64").replace(/=+$/, "")) + "-";
|
|
12460
12460
|
}).bind(this)));
|
|
12461
12461
|
}, n.prototype.end = function() {
|
|
12462
12462
|
};
|
|
12463
|
-
function a(v,
|
|
12464
|
-
this.iconv =
|
|
12463
|
+
function a(v, b) {
|
|
12464
|
+
this.iconv = b.iconv, this.inBase64 = !1, this.base64Accum = "";
|
|
12465
12465
|
}
|
|
12466
12466
|
for (var i = /[A-Za-z0-9\/+]/, s = [], o = 0; o < 256; o++)
|
|
12467
12467
|
s[o] = i.test(String.fromCharCode(o));
|
|
12468
12468
|
var c = 43, u = 45, h = 38;
|
|
12469
12469
|
a.prototype.write = function(v) {
|
|
12470
|
-
for (var
|
|
12470
|
+
for (var b = "", m = 0, F = this.inBase64, w = this.base64Accum, k = 0; k < v.length; k++)
|
|
12471
12471
|
if (!F)
|
|
12472
|
-
v[k] == c && (
|
|
12472
|
+
v[k] == c && (b += this.iconv.decode(v.slice(m, k), "ascii"), m = k + 1, F = !0);
|
|
12473
12473
|
else if (!s[v[k]]) {
|
|
12474
12474
|
if (k == m && v[k] == u)
|
|
12475
|
-
|
|
12475
|
+
b += "+";
|
|
12476
12476
|
else {
|
|
12477
12477
|
var C = w + this.iconv.decode(v.slice(m, k), "ascii");
|
|
12478
|
-
|
|
12478
|
+
b += this.iconv.decode(t.from(C, "base64"), "utf16-be");
|
|
12479
12479
|
}
|
|
12480
12480
|
v[k] != u && k--, m = k + 1, F = !1, w = "";
|
|
12481
12481
|
}
|
|
12482
12482
|
if (!F)
|
|
12483
|
-
|
|
12483
|
+
b += this.iconv.decode(v.slice(m), "ascii");
|
|
12484
12484
|
else {
|
|
12485
12485
|
var C = w + this.iconv.decode(v.slice(m), "ascii"), U = C.length - C.length % 8;
|
|
12486
|
-
w = C.slice(U), C = C.slice(0, U),
|
|
12486
|
+
w = C.slice(U), C = C.slice(0, U), b += this.iconv.decode(t.from(C, "base64"), "utf16-be");
|
|
12487
12487
|
}
|
|
12488
|
-
return this.inBase64 = F, this.base64Accum = w,
|
|
12488
|
+
return this.inBase64 = F, this.base64Accum = w, b;
|
|
12489
12489
|
}, a.prototype.end = function() {
|
|
12490
12490
|
var v = "";
|
|
12491
12491
|
return this.inBase64 && this.base64Accum.length > 0 && (v = this.iconv.decode(t.from(this.base64Accum, "base64"), "utf16-be")), this.inBase64 = !1, this.base64Accum = "", v;
|
|
12492
|
-
}, St.utf7imap =
|
|
12493
|
-
function
|
|
12494
|
-
this.iconv =
|
|
12492
|
+
}, St.utf7imap = p;
|
|
12493
|
+
function p(v, b) {
|
|
12494
|
+
this.iconv = b;
|
|
12495
12495
|
}
|
|
12496
|
-
|
|
12497
|
-
function l(v,
|
|
12498
|
-
this.iconv =
|
|
12496
|
+
p.prototype.encoder = l, p.prototype.decoder = g, p.prototype.bomAware = !0;
|
|
12497
|
+
function l(v, b) {
|
|
12498
|
+
this.iconv = b.iconv, this.inBase64 = !1, this.base64Accum = t.alloc(6), this.base64AccumIdx = 0;
|
|
12499
12499
|
}
|
|
12500
12500
|
l.prototype.write = function(v) {
|
|
12501
|
-
for (var
|
|
12501
|
+
for (var b = this.inBase64, m = this.base64Accum, F = this.base64AccumIdx, w = t.alloc(v.length * 5 + 10), k = 0, C = 0; C < v.length; C++) {
|
|
12502
12502
|
var U = v.charCodeAt(C);
|
|
12503
|
-
U >= 32 && U <= 126 ? (
|
|
12503
|
+
U >= 32 && U <= 126 ? (b && (F > 0 && (k += w.write(m.slice(0, F).toString("base64").replace(/\//g, ",").replace(/=+$/, ""), k), F = 0), w[k++] = u, b = !1), b || (w[k++] = U, U === h && (w[k++] = u))) : (b || (w[k++] = h, b = !0), b && (m[F++] = U >> 8, m[F++] = U & 255, F == m.length && (k += w.write(m.toString("base64").replace(/\//g, ","), k), F = 0)));
|
|
12504
12504
|
}
|
|
12505
|
-
return this.inBase64 =
|
|
12505
|
+
return this.inBase64 = b, this.base64AccumIdx = F, w.slice(0, k);
|
|
12506
12506
|
}, l.prototype.end = function() {
|
|
12507
|
-
var v = t.alloc(10),
|
|
12508
|
-
return this.inBase64 && (this.base64AccumIdx > 0 && (
|
|
12507
|
+
var v = t.alloc(10), b = 0;
|
|
12508
|
+
return this.inBase64 && (this.base64AccumIdx > 0 && (b += v.write(this.base64Accum.slice(0, this.base64AccumIdx).toString("base64").replace(/\//g, ",").replace(/=+$/, ""), b), this.base64AccumIdx = 0), v[b++] = u, this.inBase64 = !1), v.slice(0, b);
|
|
12509
12509
|
};
|
|
12510
|
-
function g(v,
|
|
12511
|
-
this.iconv =
|
|
12510
|
+
function g(v, b) {
|
|
12511
|
+
this.iconv = b.iconv, this.inBase64 = !1, this.base64Accum = "";
|
|
12512
12512
|
}
|
|
12513
12513
|
var x = s.slice();
|
|
12514
12514
|
return x[44] = !0, g.prototype.write = function(v) {
|
|
12515
|
-
for (var
|
|
12515
|
+
for (var b = "", m = 0, F = this.inBase64, w = this.base64Accum, k = 0; k < v.length; k++)
|
|
12516
12516
|
if (!F)
|
|
12517
|
-
v[k] == h && (
|
|
12517
|
+
v[k] == h && (b += this.iconv.decode(v.slice(m, k), "ascii"), m = k + 1, F = !0);
|
|
12518
12518
|
else if (!x[v[k]]) {
|
|
12519
12519
|
if (k == m && v[k] == u)
|
|
12520
|
-
|
|
12520
|
+
b += "&";
|
|
12521
12521
|
else {
|
|
12522
12522
|
var C = w + this.iconv.decode(v.slice(m, k), "ascii").replace(/,/g, "/");
|
|
12523
|
-
|
|
12523
|
+
b += this.iconv.decode(t.from(C, "base64"), "utf16-be");
|
|
12524
12524
|
}
|
|
12525
12525
|
v[k] != u && k--, m = k + 1, F = !1, w = "";
|
|
12526
12526
|
}
|
|
12527
12527
|
if (!F)
|
|
12528
|
-
|
|
12528
|
+
b += this.iconv.decode(v.slice(m), "ascii");
|
|
12529
12529
|
else {
|
|
12530
12530
|
var C = w + this.iconv.decode(v.slice(m), "ascii").replace(/,/g, "/"), U = C.length - C.length % 8;
|
|
12531
|
-
w = C.slice(U), C = C.slice(0, U),
|
|
12531
|
+
w = C.slice(U), C = C.slice(0, U), b += this.iconv.decode(t.from(C, "base64"), "utf16-be");
|
|
12532
12532
|
}
|
|
12533
|
-
return this.inBase64 = F, this.base64Accum = w,
|
|
12533
|
+
return this.inBase64 = F, this.base64Accum = w, b;
|
|
12534
12534
|
}, g.prototype.end = function() {
|
|
12535
12535
|
var v = "";
|
|
12536
12536
|
return this.inBase64 && this.base64Accum.length > 0 && (v = this.iconv.decode(t.from(this.base64Accum, "base64"), "utf16-be")), this.inBase64 = !1, this.base64Accum = "", v;
|
|
@@ -13201,14 +13201,14 @@ function El() {
|
|
|
13201
13201
|
this._addDecodeChunk(x[v]);
|
|
13202
13202
|
if (typeof l.gb18030 == "function") {
|
|
13203
13203
|
this.gb18030 = l.gb18030();
|
|
13204
|
-
var
|
|
13204
|
+
var b = this.decodeTables.length;
|
|
13205
13205
|
this.decodeTables.push(i.slice(0));
|
|
13206
13206
|
var m = this.decodeTables.length;
|
|
13207
13207
|
this.decodeTables.push(i.slice(0));
|
|
13208
13208
|
for (var F = this.decodeTables[0], v = 129; v <= 254; v++)
|
|
13209
13209
|
for (var w = this.decodeTables[a - F[v]], k = 48; k <= 57; k++) {
|
|
13210
13210
|
if (w[k] === e)
|
|
13211
|
-
w[k] = a -
|
|
13211
|
+
w[k] = a - b;
|
|
13212
13212
|
else if (w[k] > a)
|
|
13213
13213
|
throw new Error("gb18030 decode tables conflict at byte 2");
|
|
13214
13214
|
for (var C = this.decodeTables[a - w[k]], U = 129; U <= 254; U++) {
|
|
@@ -13246,11 +13246,11 @@ function El() {
|
|
|
13246
13246
|
g.push(l & 255);
|
|
13247
13247
|
g.length == 0 && g.push(0);
|
|
13248
13248
|
for (var x = this.decodeTables[0], v = g.length - 1; v > 0; v--) {
|
|
13249
|
-
var
|
|
13250
|
-
if (
|
|
13249
|
+
var b = x[g[v]];
|
|
13250
|
+
if (b == e)
|
|
13251
13251
|
x[g[v]] = a - this.decodeTables.length, this.decodeTables.push(x = i.slice(0));
|
|
13252
|
-
else if (
|
|
13253
|
-
x = this.decodeTables[a -
|
|
13252
|
+
else if (b <= a)
|
|
13253
|
+
x = this.decodeTables[a - b];
|
|
13254
13254
|
else
|
|
13255
13255
|
throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + l.toString(16));
|
|
13256
13256
|
}
|
|
@@ -13259,28 +13259,28 @@ function El() {
|
|
|
13259
13259
|
var g = parseInt(l[0], 16), x = this._getDecodeTrieNode(g);
|
|
13260
13260
|
g = g & 255;
|
|
13261
13261
|
for (var v = 1; v < l.length; v++) {
|
|
13262
|
-
var
|
|
13263
|
-
if (typeof
|
|
13264
|
-
for (var m = 0; m <
|
|
13265
|
-
var F =
|
|
13262
|
+
var b = l[v];
|
|
13263
|
+
if (typeof b == "string")
|
|
13264
|
+
for (var m = 0; m < b.length; ) {
|
|
13265
|
+
var F = b.charCodeAt(m++);
|
|
13266
13266
|
if (F >= 55296 && F < 56320) {
|
|
13267
|
-
var w =
|
|
13267
|
+
var w = b.charCodeAt(m++);
|
|
13268
13268
|
if (w >= 56320 && w < 57344)
|
|
13269
13269
|
x[g++] = 65536 + (F - 55296) * 1024 + (w - 56320);
|
|
13270
13270
|
else
|
|
13271
13271
|
throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + l[0]);
|
|
13272
13272
|
} else if (F > 4080 && F <= 4095) {
|
|
13273
13273
|
for (var k = 4095 - F + 2, C = [], U = 0; U < k; U++)
|
|
13274
|
-
C.push(
|
|
13274
|
+
C.push(b.charCodeAt(m++));
|
|
13275
13275
|
x[g++] = n - this.decodeTableSeq.length, this.decodeTableSeq.push(C);
|
|
13276
13276
|
} else
|
|
13277
13277
|
x[g++] = F;
|
|
13278
13278
|
}
|
|
13279
|
-
else if (typeof
|
|
13280
|
-
for (var B = x[g - 1] + 1, m = 0; m <
|
|
13279
|
+
else if (typeof b == "number")
|
|
13280
|
+
for (var B = x[g - 1] + 1, m = 0; m < b; m++)
|
|
13281
13281
|
x[g++] = B++;
|
|
13282
13282
|
else
|
|
13283
|
-
throw new Error("Incorrect type '" + typeof
|
|
13283
|
+
throw new Error("Incorrect type '" + typeof b + "' given in " + this.encodingName + " at chunk " + l[0]);
|
|
13284
13284
|
}
|
|
13285
13285
|
if (g > 255)
|
|
13286
13286
|
throw new Error("Incorrect chunk in " + this.encodingName + " at addr " + l[0] + ": too long" + g);
|
|
@@ -13291,40 +13291,40 @@ function El() {
|
|
|
13291
13291
|
var x = this._getEncodeBucket(l), v = l & 255;
|
|
13292
13292
|
x[v] <= n ? this.encodeTableSeq[n - x[v]][s] = g : x[v] == e && (x[v] = g);
|
|
13293
13293
|
}, c.prototype._setEncodeSequence = function(l, g) {
|
|
13294
|
-
var x = l[0], v = this._getEncodeBucket(x),
|
|
13295
|
-
v[
|
|
13294
|
+
var x = l[0], v = this._getEncodeBucket(x), b = x & 255, m;
|
|
13295
|
+
v[b] <= n ? m = this.encodeTableSeq[n - v[b]] : (m = {}, v[b] !== e && (m[s] = v[b]), v[b] = n - this.encodeTableSeq.length, this.encodeTableSeq.push(m));
|
|
13296
13296
|
for (var F = 1; F < l.length - 1; F++) {
|
|
13297
13297
|
var w = m[x];
|
|
13298
13298
|
typeof w == "object" ? m = w : (m = m[x] = {}, w !== void 0 && (m[s] = w));
|
|
13299
13299
|
}
|
|
13300
13300
|
x = l[l.length - 1], m[x] = g;
|
|
13301
13301
|
}, c.prototype._fillEncodeTable = function(l, g, x) {
|
|
13302
|
-
for (var v = this.decodeTables[l],
|
|
13302
|
+
for (var v = this.decodeTables[l], b = !1, m = {}, F = 0; F < 256; F++) {
|
|
13303
13303
|
var w = v[F], k = g + F;
|
|
13304
13304
|
if (!x[k])
|
|
13305
13305
|
if (w >= 0)
|
|
13306
|
-
this._setEncodeChar(w, k),
|
|
13306
|
+
this._setEncodeChar(w, k), b = !0;
|
|
13307
13307
|
else if (w <= a) {
|
|
13308
13308
|
var C = a - w;
|
|
13309
13309
|
if (!m[C]) {
|
|
13310
13310
|
var U = k << 8 >>> 0;
|
|
13311
|
-
this._fillEncodeTable(C, U, x) ?
|
|
13311
|
+
this._fillEncodeTable(C, U, x) ? b = !0 : m[C] = !0;
|
|
13312
13312
|
}
|
|
13313
|
-
} else w <= n && (this._setEncodeSequence(this.decodeTableSeq[n - w], k),
|
|
13313
|
+
} else w <= n && (this._setEncodeSequence(this.decodeTableSeq[n - w], k), b = !0);
|
|
13314
13314
|
}
|
|
13315
|
-
return
|
|
13315
|
+
return b;
|
|
13316
13316
|
};
|
|
13317
13317
|
function u(l, g) {
|
|
13318
13318
|
this.leadSurrogate = -1, this.seqObj = void 0, this.encodeTable = g.encodeTable, this.encodeTableSeq = g.encodeTableSeq, this.defaultCharSingleByte = g.defCharSB, this.gb18030 = g.gb18030;
|
|
13319
13319
|
}
|
|
13320
13320
|
u.prototype.write = function(l) {
|
|
13321
|
-
for (var g = t.alloc(l.length * (this.gb18030 ? 4 : 3)), x = this.leadSurrogate, v = this.seqObj,
|
|
13322
|
-
if (
|
|
13321
|
+
for (var g = t.alloc(l.length * (this.gb18030 ? 4 : 3)), x = this.leadSurrogate, v = this.seqObj, b = -1, m = 0, F = 0; ; ) {
|
|
13322
|
+
if (b === -1) {
|
|
13323
13323
|
if (m == l.length) break;
|
|
13324
13324
|
var w = l.charCodeAt(m++);
|
|
13325
13325
|
} else {
|
|
13326
|
-
var w =
|
|
13327
|
-
|
|
13326
|
+
var w = b;
|
|
13327
|
+
b = -1;
|
|
13328
13328
|
}
|
|
13329
13329
|
if (w >= 55296 && w < 57344)
|
|
13330
13330
|
if (w < 56320)
|
|
@@ -13335,14 +13335,14 @@ function El() {
|
|
|
13335
13335
|
x = w, w = e;
|
|
13336
13336
|
else
|
|
13337
13337
|
x !== -1 ? (w = 65536 + (x - 55296) * 1024 + (w - 56320), x = -1) : w = e;
|
|
13338
|
-
else x !== -1 && (
|
|
13338
|
+
else x !== -1 && (b = w, w = e, x = -1);
|
|
13339
13339
|
var k = e;
|
|
13340
13340
|
if (v !== void 0 && w != e) {
|
|
13341
13341
|
var C = v[w];
|
|
13342
13342
|
if (typeof C == "object") {
|
|
13343
13343
|
v = C;
|
|
13344
13344
|
continue;
|
|
13345
|
-
} else typeof C == "number" ? k = C : C == null && (C = v[s], C !== void 0 && (k = C,
|
|
13345
|
+
} else typeof C == "number" ? k = C : C == null && (C = v[s], C !== void 0 && (k = C, b = w));
|
|
13346
13346
|
v = void 0;
|
|
13347
13347
|
} else if (w >= 0) {
|
|
13348
13348
|
var U = this.encodeTable[w >> 8];
|
|
@@ -13351,7 +13351,7 @@ function El() {
|
|
|
13351
13351
|
continue;
|
|
13352
13352
|
}
|
|
13353
13353
|
if (k == e && this.gb18030) {
|
|
13354
|
-
var B =
|
|
13354
|
+
var B = p(this.gb18030.uChars, w);
|
|
13355
13355
|
if (B != -1) {
|
|
13356
13356
|
var k = this.gb18030.gbChars[B] + (w - this.gb18030.uChars[B]);
|
|
13357
13357
|
g[F++] = 129 + Math.floor(k / 12600), k = k % 12600, g[F++] = 48 + Math.floor(k / 1260), k = k % 1260, g[F++] = 129 + Math.floor(k / 10), k = k % 10, g[F++] = 48 + k;
|
|
@@ -13371,21 +13371,21 @@ function El() {
|
|
|
13371
13371
|
}
|
|
13372
13372
|
return this.leadSurrogate !== -1 && (l[g++] = this.defaultCharSingleByte, this.leadSurrogate = -1), l.slice(0, g);
|
|
13373
13373
|
}
|
|
13374
|
-
}, u.prototype.findIdx =
|
|
13374
|
+
}, u.prototype.findIdx = p;
|
|
13375
13375
|
function h(l, g) {
|
|
13376
13376
|
this.nodeIdx = 0, this.prevBytes = [], this.decodeTables = g.decodeTables, this.decodeTableSeq = g.decodeTableSeq, this.defaultCharUnicode = g.defaultCharUnicode, this.gb18030 = g.gb18030;
|
|
13377
13377
|
}
|
|
13378
13378
|
h.prototype.write = function(l) {
|
|
13379
|
-
for (var g = t.alloc(l.length * 2), x = this.nodeIdx, v = this.prevBytes,
|
|
13380
|
-
var C = w >= 0 ? l[w] : v[w +
|
|
13379
|
+
for (var g = t.alloc(l.length * 2), x = this.nodeIdx, v = this.prevBytes, b = this.prevBytes.length, m = -this.prevBytes.length, F, w = 0, k = 0; w < l.length; w++) {
|
|
13380
|
+
var C = w >= 0 ? l[w] : v[w + b], F = this.decodeTables[x][C];
|
|
13381
13381
|
if (!(F >= 0)) if (F === e)
|
|
13382
13382
|
F = this.defaultCharUnicode.charCodeAt(0), w = m;
|
|
13383
13383
|
else if (F === r) {
|
|
13384
13384
|
if (w >= 3)
|
|
13385
13385
|
var U = (l[w - 3] - 129) * 12600 + (l[w - 2] - 48) * 1260 + (l[w - 1] - 129) * 10 + (C - 48);
|
|
13386
13386
|
else
|
|
13387
|
-
var U = (v[w - 3 +
|
|
13388
|
-
var B =
|
|
13387
|
+
var U = (v[w - 3 + b] - 129) * 12600 + ((w - 2 >= 0 ? l[w - 2] : v[w - 2 + b]) - 48) * 1260 + ((w - 1 >= 0 ? l[w - 1] : v[w - 1 + b]) - 129) * 10 + (C - 48);
|
|
13388
|
+
var B = p(this.gb18030.gbChars, U);
|
|
13389
13389
|
F = this.gb18030.uChars[B] + U - this.gb18030.gbChars[B];
|
|
13390
13390
|
} else if (F <= a) {
|
|
13391
13391
|
x = a - F;
|
|
@@ -13403,7 +13403,7 @@ function El() {
|
|
|
13403
13403
|
}
|
|
13404
13404
|
g[k++] = F & 255, g[k++] = F >> 8, x = 0, m = w + 1;
|
|
13405
13405
|
}
|
|
13406
|
-
return this.nodeIdx = x, this.prevBytes = m >= 0 ? Array.prototype.slice.call(l, m) : v.slice(m +
|
|
13406
|
+
return this.nodeIdx = x, this.prevBytes = m >= 0 ? Array.prototype.slice.call(l, m) : v.slice(m + b).concat(Array.prototype.slice.call(l)), g.slice(0, k).toString("ucs2");
|
|
13407
13407
|
}, h.prototype.end = function() {
|
|
13408
13408
|
for (var l = ""; this.prevBytes.length > 0; ) {
|
|
13409
13409
|
l += this.defaultCharUnicode;
|
|
@@ -13412,12 +13412,12 @@ function El() {
|
|
|
13412
13412
|
}
|
|
13413
13413
|
return this.prevBytes = [], this.nodeIdx = 0, l;
|
|
13414
13414
|
};
|
|
13415
|
-
function
|
|
13415
|
+
function p(l, g) {
|
|
13416
13416
|
if (l[0] > g)
|
|
13417
13417
|
return -1;
|
|
13418
13418
|
for (var x = 0, v = l.length; x < v - 1; ) {
|
|
13419
|
-
var
|
|
13420
|
-
l[
|
|
13419
|
+
var b = x + (v - x + 1 >> 1);
|
|
13420
|
+
l[b] <= g ? x = b : v = b;
|
|
13421
13421
|
}
|
|
13422
13422
|
return x;
|
|
13423
13423
|
}
|
|
@@ -22032,12 +22032,12 @@ const Pl = {}, Nl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
22032
22032
|
var e = et.Buffer, r = mn, n = Zi, a = t.exports;
|
|
22033
22033
|
a.encodings = null, a.defaultCharUnicode = "�", a.defaultCharSingleByte = "?", a.encode = function(o, c, u) {
|
|
22034
22034
|
o = "" + (o || "");
|
|
22035
|
-
var h = a.getEncoder(c, u),
|
|
22036
|
-
return l && l.length > 0 ? e.concat([
|
|
22035
|
+
var h = a.getEncoder(c, u), p = h.write(o), l = h.end();
|
|
22036
|
+
return l && l.length > 0 ? e.concat([p, l]) : p;
|
|
22037
22037
|
}, a.decode = function(o, c, u) {
|
|
22038
22038
|
typeof o == "string" && (a.skipDecodeWarning || (console.error("Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding"), a.skipDecodeWarning = !0), o = e.from("" + (o || ""), "binary"));
|
|
22039
|
-
var h = a.getDecoder(c, u),
|
|
22040
|
-
return l ?
|
|
22039
|
+
var h = a.getDecoder(c, u), p = h.write(o), l = h.end();
|
|
22040
|
+
return l ? p + l : p;
|
|
22041
22041
|
}, a.encodingExists = function(o) {
|
|
22042
22042
|
try {
|
|
22043
22043
|
return a.getCodec(o), !0;
|
|
@@ -22050,9 +22050,9 @@ const Pl = {}, Nl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
22050
22050
|
a.encodings = { __proto__: null }, n(a.encodings, c);
|
|
22051
22051
|
}
|
|
22052
22052
|
for (var u = a._canonicalizeEncoding(o), h = {}; ; ) {
|
|
22053
|
-
var
|
|
22054
|
-
if (
|
|
22055
|
-
return
|
|
22053
|
+
var p = a._codecDataCache[u];
|
|
22054
|
+
if (p)
|
|
22055
|
+
return p;
|
|
22056
22056
|
var l = a.encodings[u];
|
|
22057
22057
|
switch (typeof l) {
|
|
22058
22058
|
case "string":
|
|
@@ -22064,7 +22064,7 @@ const Pl = {}, Nl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
22064
22064
|
h.encodingName || (h.encodingName = u), u = l.type;
|
|
22065
22065
|
break;
|
|
22066
22066
|
case "function":
|
|
22067
|
-
return h.encodingName || (h.encodingName = u),
|
|
22067
|
+
return h.encodingName || (h.encodingName = u), p = new l(h, a), a._codecDataCache[h.encodingName] = p, p;
|
|
22068
22068
|
default:
|
|
22069
22069
|
throw new Error("Encoding not recognized: '" + o + "' (searched as: '" + u + "')");
|
|
22070
22070
|
}
|
|
@@ -22080,10 +22080,10 @@ const Pl = {}, Nl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
22080
22080
|
}, a.enableStreamingAPI = function(o) {
|
|
22081
22081
|
if (!a.supportsStreams) {
|
|
22082
22082
|
var c = _l()(o);
|
|
22083
|
-
a.IconvLiteEncoderStream = c.IconvLiteEncoderStream, a.IconvLiteDecoderStream = c.IconvLiteDecoderStream, a.encodeStream = function(h,
|
|
22084
|
-
return new a.IconvLiteEncoderStream(a.getEncoder(h,
|
|
22085
|
-
}, a.decodeStream = function(h,
|
|
22086
|
-
return new a.IconvLiteDecoderStream(a.getDecoder(h,
|
|
22083
|
+
a.IconvLiteEncoderStream = c.IconvLiteEncoderStream, a.IconvLiteDecoderStream = c.IconvLiteDecoderStream, a.encodeStream = function(h, p) {
|
|
22084
|
+
return new a.IconvLiteEncoderStream(a.getEncoder(h, p), p);
|
|
22085
|
+
}, a.decodeStream = function(h, p) {
|
|
22086
|
+
return new a.IconvLiteDecoderStream(a.getDecoder(h, p), p);
|
|
22087
22087
|
}, a.supportsStreams = !0;
|
|
22088
22088
|
}
|
|
22089
22089
|
};
|
|
@@ -22711,8 +22711,8 @@ function Zl(t) {
|
|
|
22711
22711
|
return null;
|
|
22712
22712
|
const i = (u) => {
|
|
22713
22713
|
if (u.endsWith("%")) {
|
|
22714
|
-
const
|
|
22715
|
-
return Ha(
|
|
22714
|
+
const p = Number.parseFloat(u.slice(0, -1));
|
|
22715
|
+
return Ha(p / 100 * 255);
|
|
22716
22716
|
}
|
|
22717
22717
|
const h = Number.parseFloat(u);
|
|
22718
22718
|
return Ha(h);
|
|
@@ -22879,11 +22879,11 @@ class Jl {
|
|
|
22879
22879
|
}, o = (c) => {
|
|
22880
22880
|
let u = "", h = c;
|
|
22881
22881
|
for (; e.hasData; ) {
|
|
22882
|
-
const [
|
|
22883
|
-
if (!(h &&
|
|
22884
|
-
if (h = !1, !l &&
|
|
22882
|
+
const [p, l] = i();
|
|
22883
|
+
if (!(h && p === " ")) {
|
|
22884
|
+
if (h = !1, !l && p === ";")
|
|
22885
22885
|
break;
|
|
22886
|
-
u +=
|
|
22886
|
+
u += p;
|
|
22887
22887
|
}
|
|
22888
22888
|
}
|
|
22889
22889
|
return u;
|
|
@@ -23188,11 +23188,11 @@ class Jl {
|
|
|
23188
23188
|
const h = r.peek();
|
|
23189
23189
|
if (h === "r" || h === "c") {
|
|
23190
23190
|
r.consume(1);
|
|
23191
|
-
const
|
|
23192
|
-
o.push(h +
|
|
23191
|
+
const p = c();
|
|
23192
|
+
o.push(h + p.toString());
|
|
23193
23193
|
} else {
|
|
23194
|
-
const
|
|
23195
|
-
isNaN(
|
|
23194
|
+
const p = c();
|
|
23195
|
+
isNaN(p) ? r.consume(1) : o.push(p);
|
|
23196
23196
|
}
|
|
23197
23197
|
}
|
|
23198
23198
|
break;
|
|
@@ -23262,17 +23262,17 @@ class Jl {
|
|
|
23262
23262
|
return [Z.WRAP_AT_DIMLINE, null];
|
|
23263
23263
|
case "S": {
|
|
23264
23264
|
this.inStackContext = !0;
|
|
23265
|
-
const
|
|
23266
|
-
return this.inStackContext = !1,
|
|
23265
|
+
const p = this.parseStacking();
|
|
23266
|
+
return this.inStackContext = !1, p;
|
|
23267
23267
|
}
|
|
23268
23268
|
case "m":
|
|
23269
23269
|
case "M":
|
|
23270
23270
|
if (this.scanner.peek() === "+") {
|
|
23271
23271
|
this.scanner.consume(1);
|
|
23272
|
-
const
|
|
23273
|
-
if (
|
|
23274
|
-
this.scanner.consume(
|
|
23275
|
-
const l = this.mifDecoder(
|
|
23272
|
+
const p = this.extractMifCode(this.mifCodeLength);
|
|
23273
|
+
if (p) {
|
|
23274
|
+
this.scanner.consume(p.length);
|
|
23275
|
+
const l = this.mifDecoder(p);
|
|
23276
23276
|
return s ? [e, s] : [e, l];
|
|
23277
23277
|
}
|
|
23278
23278
|
this.scanner.consume(-1);
|
|
@@ -23282,9 +23282,9 @@ class Jl {
|
|
|
23282
23282
|
case "U":
|
|
23283
23283
|
if (this.scanner.peek() === "+") {
|
|
23284
23284
|
this.scanner.consume(1);
|
|
23285
|
-
const
|
|
23286
|
-
if (
|
|
23287
|
-
const l =
|
|
23285
|
+
const p = this.scanner.tail.match(/^[0-9A-Fa-f]{4,8}/);
|
|
23286
|
+
if (p) {
|
|
23287
|
+
const l = p[0];
|
|
23288
23288
|
this.scanner.consume(l.length);
|
|
23289
23289
|
const g = parseInt(l, 16);
|
|
23290
23290
|
let x = "";
|
|
@@ -23302,21 +23302,21 @@ class Jl {
|
|
|
23302
23302
|
default:
|
|
23303
23303
|
if (h)
|
|
23304
23304
|
try {
|
|
23305
|
-
const
|
|
23306
|
-
if (this.yieldPropertyCommands &&
|
|
23307
|
-
return [Z.PROPERTIES_CHANGED,
|
|
23305
|
+
const p = this.parseProperties(h);
|
|
23306
|
+
if (this.yieldPropertyCommands && p)
|
|
23307
|
+
return [Z.PROPERTIES_CHANGED, p];
|
|
23308
23308
|
continue;
|
|
23309
23309
|
} catch {
|
|
23310
|
-
const
|
|
23311
|
-
s +=
|
|
23310
|
+
const p = this.scanner.tail.slice(u, this.scanner.currentIndex);
|
|
23311
|
+
s += p;
|
|
23312
23312
|
}
|
|
23313
23313
|
}
|
|
23314
23314
|
continue;
|
|
23315
23315
|
}
|
|
23316
23316
|
if (c === "%" && this.scanner.peek(1) === "%") {
|
|
23317
|
-
const h = this.scanner.peek(2).toLowerCase(),
|
|
23318
|
-
if (
|
|
23319
|
-
this.scanner.consume(3), s +=
|
|
23317
|
+
const h = this.scanner.peek(2).toLowerCase(), p = ql[h];
|
|
23318
|
+
if (p) {
|
|
23319
|
+
this.scanner.consume(3), s += p;
|
|
23320
23320
|
continue;
|
|
23321
23321
|
} else {
|
|
23322
23322
|
const l = [h, this.scanner.peek(3), this.scanner.peek(4)];
|
|
@@ -23342,11 +23342,11 @@ class Jl {
|
|
|
23342
23342
|
if (this.scanner.consume(1), this.yieldPropertyCommands) {
|
|
23343
23343
|
const h = this.ctxStack.current;
|
|
23344
23344
|
this.popCtx();
|
|
23345
|
-
const
|
|
23346
|
-
if (Object.keys(
|
|
23345
|
+
const p = this.getPropertyChanges(h, this.ctxStack.current);
|
|
23346
|
+
if (Object.keys(p).length > 0)
|
|
23347
23347
|
return [
|
|
23348
23348
|
Z.PROPERTIES_CHANGED,
|
|
23349
|
-
{ command: void 0, changes:
|
|
23349
|
+
{ command: void 0, changes: p, depth: this.ctxStack.depth }
|
|
23350
23350
|
];
|
|
23351
23351
|
} else
|
|
23352
23352
|
this.popCtx();
|
|
@@ -23356,15 +23356,15 @@ class Jl {
|
|
|
23356
23356
|
if (!this.inStackContext && c === "^") {
|
|
23357
23357
|
const h = this.scanner.peek(1);
|
|
23358
23358
|
if (h) {
|
|
23359
|
-
const
|
|
23360
|
-
if (this.scanner.consume(2),
|
|
23359
|
+
const p = h.charCodeAt(0);
|
|
23360
|
+
if (this.scanner.consume(2), p === 32)
|
|
23361
23361
|
s += "^";
|
|
23362
23362
|
else {
|
|
23363
|
-
if (
|
|
23363
|
+
if (p === 73)
|
|
23364
23364
|
return s ? [e, s] : [Z.TABULATOR, null];
|
|
23365
|
-
if (
|
|
23365
|
+
if (p === 74)
|
|
23366
23366
|
return s ? [e, s] : [Z.NEW_PARAGRAPH, null];
|
|
23367
|
-
if (
|
|
23367
|
+
if (p === 77)
|
|
23368
23368
|
continue;
|
|
23369
23369
|
s += "▯";
|
|
23370
23370
|
}
|
|
@@ -23834,13 +23834,13 @@ function nn(t, e, r) {
|
|
|
23834
23834
|
}
|
|
23835
23835
|
const c = n.slice(0, s).filter(a), u = n.slice(o + 1).filter(a), h = n.slice(s, o + 1).filter(i);
|
|
23836
23836
|
if (h.length === 0) return [...c, ...u];
|
|
23837
|
-
const
|
|
23838
|
-
return h.slice(1).forEach((l) =>
|
|
23837
|
+
const p = new M.Box3().copy(h[0].box);
|
|
23838
|
+
return h.slice(1).forEach((l) => p.union(l.box)), [
|
|
23839
23839
|
...c,
|
|
23840
23840
|
{
|
|
23841
23841
|
type: se.STACK,
|
|
23842
23842
|
char: "",
|
|
23843
|
-
box:
|
|
23843
|
+
box: p,
|
|
23844
23844
|
children: h
|
|
23845
23845
|
},
|
|
23846
23846
|
...u
|
|
@@ -23975,6 +23975,19 @@ class nf {
|
|
|
23975
23975
|
get currentFontSize() {
|
|
23976
23976
|
return this._currentContext.fontSize;
|
|
23977
23977
|
}
|
|
23978
|
+
/**
|
|
23979
|
+
* The drawing-space text height used for layout calculations.
|
|
23980
|
+
*
|
|
23981
|
+
* `currentFontSize` includes a font-specific scale factor so glyph outlines
|
|
23982
|
+
* from different font formats render at comparable visual sizes. That scale
|
|
23983
|
+
* must not leak into CAD layout metrics such as line height and attachment
|
|
23984
|
+
* offsets, otherwise middle/bottom aligned text shifts vertically depending
|
|
23985
|
+
* on the active font.
|
|
23986
|
+
*/
|
|
23987
|
+
get currentLayoutFontSize() {
|
|
23988
|
+
const e = this._currentContext.fontScaleFactor || 1;
|
|
23989
|
+
return this._currentContext.fontSize / e;
|
|
23990
|
+
}
|
|
23978
23991
|
/**
|
|
23979
23992
|
* The height of current line of texts
|
|
23980
23993
|
*/
|
|
@@ -24339,7 +24352,7 @@ class nf {
|
|
|
24339
24352
|
);
|
|
24340
24353
|
}
|
|
24341
24354
|
processStack(e, r, n, a, i) {
|
|
24342
|
-
const [s, o, c] = e, u = this._hOffset, h = this._vOffset,
|
|
24355
|
+
const [s, o, c] = e, u = this._hOffset, h = this._vOffset, p = this._currentContext.charTrackingFactor.value, l = this.currentLayoutFontSize, g = this._currentContext.fontSizeScaleFactor;
|
|
24343
24356
|
this._hOffset = u, this._currentContext.charTrackingFactor = { value: 1, isRelative: !1 };
|
|
24344
24357
|
let x = 0;
|
|
24345
24358
|
for (let w = 0; w < s.length; w++) {
|
|
@@ -24352,13 +24365,13 @@ class nf {
|
|
|
24352
24365
|
const k = this.getCharShape(o[w]);
|
|
24353
24366
|
k && (v += k.width * this.currentWidthFactor);
|
|
24354
24367
|
}
|
|
24355
|
-
const
|
|
24368
|
+
const b = Math.max(x, v), m = (b - x) / 2, F = (b - v) / 2;
|
|
24356
24369
|
if (c === "^") {
|
|
24357
24370
|
if (this._currentContext.fontSizeScaleFactor = g * 0.7, this.calcuateLineParams(), s && !o) {
|
|
24358
24371
|
const w = [], k = [], C = [], U = [];
|
|
24359
24372
|
this._hOffset = u, this._vOffset = this.convertTopAlignedVOffset(
|
|
24360
24373
|
h + l * 0.1,
|
|
24361
|
-
this.
|
|
24374
|
+
this.currentLayoutFontSize
|
|
24362
24375
|
);
|
|
24363
24376
|
for (let B = 0; B < s.length; B++)
|
|
24364
24377
|
this.processChar(
|
|
@@ -24373,7 +24386,7 @@ class nf {
|
|
|
24373
24386
|
const w = [], k = [], C = [], U = [];
|
|
24374
24387
|
this._hOffset = u, this._vOffset = this.convertTopAlignedVOffset(
|
|
24375
24388
|
h - l * 0.6,
|
|
24376
|
-
this.
|
|
24389
|
+
this.currentLayoutFontSize
|
|
24377
24390
|
);
|
|
24378
24391
|
for (let B = 0; B < o.length; B++)
|
|
24379
24392
|
this.processChar(
|
|
@@ -24389,8 +24402,8 @@ class nf {
|
|
|
24389
24402
|
} else {
|
|
24390
24403
|
const w = [], k = [], C = [], U = [];
|
|
24391
24404
|
this._hOffset = u + m, this._vOffset = this.convertTopAlignedVOffset(
|
|
24392
|
-
h + this.
|
|
24393
|
-
this.
|
|
24405
|
+
h + this.currentLayoutFontSize * 0.3,
|
|
24406
|
+
this.currentLayoutFontSize
|
|
24394
24407
|
);
|
|
24395
24408
|
for (let z = 0; z < s.length; z++)
|
|
24396
24409
|
this.processChar(
|
|
@@ -24403,14 +24416,14 @@ class nf {
|
|
|
24403
24416
|
r.push(...w), n.push(...k), a.push(...C), i.push(...U), (c === "/" || c === "#") && this.recordStackDivider(
|
|
24404
24417
|
u,
|
|
24405
24418
|
h,
|
|
24406
|
-
|
|
24419
|
+
b,
|
|
24407
24420
|
a,
|
|
24408
24421
|
i
|
|
24409
24422
|
);
|
|
24410
24423
|
const B = [], O = [], H = [], W = [];
|
|
24411
24424
|
this._hOffset = u + F, this._vOffset = this.convertTopAlignedVOffset(
|
|
24412
|
-
h - this.
|
|
24413
|
-
this.
|
|
24425
|
+
h - this.currentLayoutFontSize * 0.6,
|
|
24426
|
+
this.currentLayoutFontSize
|
|
24414
24427
|
);
|
|
24415
24428
|
for (let z = 0; z < o.length; z++)
|
|
24416
24429
|
this.processChar(
|
|
@@ -24423,10 +24436,10 @@ class nf {
|
|
|
24423
24436
|
if (r.push(...B), n.push(...O), a.push(...H), i.push(...W), c === "/" || c === "#") {
|
|
24424
24437
|
const z = new M.BufferGeometry(), le = new Float32Array([
|
|
24425
24438
|
u,
|
|
24426
|
-
h - this.
|
|
24439
|
+
h - this.currentLayoutFontSize * 0.8 + this.defaultFontSize * Zt,
|
|
24427
24440
|
0,
|
|
24428
|
-
u +
|
|
24429
|
-
h - this.
|
|
24441
|
+
u + b,
|
|
24442
|
+
h - this.currentLayoutFontSize * 0.8 + this.defaultFontSize * Zt,
|
|
24430
24443
|
0
|
|
24431
24444
|
]);
|
|
24432
24445
|
z.setAttribute(
|
|
@@ -24434,16 +24447,16 @@ class nf {
|
|
|
24434
24447
|
new M.BufferAttribute(le, 3)
|
|
24435
24448
|
), z.setIndex(null), z.userData = { isDecoration: !0 }, n.push(z);
|
|
24436
24449
|
}
|
|
24437
|
-
this._hOffset = u +
|
|
24450
|
+
this._hOffset = u + b;
|
|
24438
24451
|
}
|
|
24439
24452
|
this._vOffset = h, this._currentContext.charTrackingFactor = {
|
|
24440
|
-
value:
|
|
24453
|
+
value: p,
|
|
24441
24454
|
isRelative: !1
|
|
24442
24455
|
};
|
|
24443
24456
|
}
|
|
24444
24457
|
recordStackDivider(e, r, n, a, i) {
|
|
24445
24458
|
if (this._options.collectCharBoxes === !1) return;
|
|
24446
|
-
const s = r - this.
|
|
24459
|
+
const s = r - this.currentLayoutFontSize * 0.8 + this.defaultFontSize * Zt, o = new M.Box3(
|
|
24447
24460
|
new M.Vector3(e, s, 0),
|
|
24448
24461
|
new M.Vector3(e + n, s, 0)
|
|
24449
24462
|
);
|
|
@@ -24468,11 +24481,11 @@ class nf {
|
|
|
24468
24481
|
}
|
|
24469
24482
|
processBlank(e, r) {
|
|
24470
24483
|
if (this._options.collectCharBoxes !== !1) {
|
|
24471
|
-
const n = this._hOffset, a = this.flowDirection == Ye.BOTTOM_TO_TOP ? this._vOffset : this._vOffset - this.
|
|
24484
|
+
const n = this._hOffset, a = this.flowDirection == Ye.BOTTOM_TO_TOP ? this._vOffset : this._vOffset - this.currentLayoutFontSize, i = new M.Box3(
|
|
24472
24485
|
new M.Vector3(n, a, 0),
|
|
24473
24486
|
new M.Vector3(
|
|
24474
24487
|
n + this._currentContext.blankWidth,
|
|
24475
|
-
a + this.
|
|
24488
|
+
a + this.currentLayoutFontSize,
|
|
24476
24489
|
0
|
|
24477
24490
|
)
|
|
24478
24491
|
);
|
|
@@ -24516,10 +24529,10 @@ class nf {
|
|
|
24516
24529
|
o.scale(this.currentWidthFactor, 1, 1);
|
|
24517
24530
|
let c = this._currentContext.oblique;
|
|
24518
24531
|
if (this._currentContext.italic && (c += 15), c) {
|
|
24519
|
-
const
|
|
24532
|
+
const b = c * Math.PI / 180, m = new M.Matrix4();
|
|
24520
24533
|
m.set(
|
|
24521
24534
|
1,
|
|
24522
|
-
Math.tan(
|
|
24535
|
+
Math.tan(b),
|
|
24523
24536
|
0,
|
|
24524
24537
|
0,
|
|
24525
24538
|
0,
|
|
@@ -24538,26 +24551,26 @@ class nf {
|
|
|
24538
24551
|
}
|
|
24539
24552
|
const u = this.fontManager.getFontType(this.currentFont);
|
|
24540
24553
|
this._currentContext.bold && u === "mesh" && o.scale(1.06, 1.06, 1), this.hOffset > (this.maxLineWidth || 1 / 0) && (this.recordVisualLineBreak(a, i), this.advanceToNextLine(!1));
|
|
24541
|
-
const h = this.hOffset,
|
|
24542
|
-
if (o.translate(h,
|
|
24554
|
+
const h = this.hOffset, p = this.flowDirection == Ye.BOTTOM_TO_TOP ? this.vOffset : this.vOffset - this.currentLayoutFontSize, l = s.width * this.currentWidthFactor, g = this.currentLayoutFontSize;
|
|
24555
|
+
if (o.translate(h, p, 0), this.currentHorizontalAlignment == re.DISTRIBUTED ? this._hOffset += s.width * this.currentWidthFactor : this._hOffset += s.width * this.currentWordSpace * this.currentWidthFactor, r.push(o), this._lineHasRenderableChar = !0, this._options.collectCharBoxes !== !1) {
|
|
24543
24556
|
o.userData.char = e, o.boundingBox || o.computeBoundingBox();
|
|
24544
|
-
const
|
|
24557
|
+
const b = new M.Box3().copy(o.boundingBox);
|
|
24545
24558
|
o instanceof M.ShapeGeometry ? (this._lastCharBoxTarget = "mesh", a.push({
|
|
24546
24559
|
type: se.CHAR,
|
|
24547
|
-
box:
|
|
24560
|
+
box: b,
|
|
24548
24561
|
char: e,
|
|
24549
24562
|
children: []
|
|
24550
24563
|
})) : (this._lastCharBoxTarget = "line", i.push({
|
|
24551
24564
|
type: se.CHAR,
|
|
24552
|
-
box:
|
|
24565
|
+
box: b,
|
|
24553
24566
|
char: e,
|
|
24554
24567
|
children: []
|
|
24555
24568
|
}));
|
|
24556
24569
|
}
|
|
24557
24570
|
const x = g * 0.05, v = 1e-3;
|
|
24558
24571
|
if (this._currentContext.underline) {
|
|
24559
|
-
const
|
|
24560
|
-
|
|
24572
|
+
const b = new M.BufferGeometry(), m = p - x;
|
|
24573
|
+
b.setAttribute(
|
|
24561
24574
|
"position",
|
|
24562
24575
|
new M.BufferAttribute(
|
|
24563
24576
|
new Float32Array([
|
|
@@ -24570,11 +24583,11 @@ class nf {
|
|
|
24570
24583
|
]),
|
|
24571
24584
|
3
|
|
24572
24585
|
)
|
|
24573
|
-
),
|
|
24586
|
+
), b.setIndex(null), b.userData = { isDecoration: !0 }, n.push(b);
|
|
24574
24587
|
}
|
|
24575
24588
|
if (this._currentContext.overline) {
|
|
24576
|
-
const
|
|
24577
|
-
|
|
24589
|
+
const b = new M.BufferGeometry(), m = p + g + x;
|
|
24590
|
+
b.setAttribute(
|
|
24578
24591
|
"position",
|
|
24579
24592
|
new M.BufferAttribute(
|
|
24580
24593
|
new Float32Array([
|
|
@@ -24587,11 +24600,11 @@ class nf {
|
|
|
24587
24600
|
]),
|
|
24588
24601
|
3
|
|
24589
24602
|
)
|
|
24590
|
-
),
|
|
24603
|
+
), b.setIndex(null), b.userData = { isDecoration: !0 }, n.push(b);
|
|
24591
24604
|
}
|
|
24592
24605
|
if (this._currentContext.strikeThrough) {
|
|
24593
|
-
const
|
|
24594
|
-
|
|
24606
|
+
const b = new M.BufferGeometry(), m = p + g / 2 - g * 0.2;
|
|
24607
|
+
b.setAttribute(
|
|
24595
24608
|
"position",
|
|
24596
24609
|
new M.BufferAttribute(
|
|
24597
24610
|
new Float32Array([
|
|
@@ -24604,7 +24617,7 @@ class nf {
|
|
|
24604
24617
|
]),
|
|
24605
24618
|
3
|
|
24606
24619
|
)
|
|
24607
|
-
),
|
|
24620
|
+
), b.setIndex(null), b.userData = { isDecoration: !0 }, n.push(b);
|
|
24608
24621
|
}
|
|
24609
24622
|
}
|
|
24610
24623
|
processLastLine() {
|
|
@@ -24615,10 +24628,10 @@ class nf {
|
|
|
24615
24628
|
}
|
|
24616
24629
|
changeFont(e) {
|
|
24617
24630
|
let r = e;
|
|
24618
|
-
this._options.removeFontExtension && (r = e.replace(/\.(ttf|otf|woff|shx)$/, "")), this._currentContext.fontFace.family = this.fontManager.findAndReplaceFont(r), this._currentContext.blankWidth = this.calculateBlankWidthForFont(
|
|
24631
|
+
this._options.removeFontExtension && (r = e.replace(/\.(ttf|otf|woff|shx)$/, "")), this._currentContext.fontFace.family = this.fontManager.findAndReplaceFont(r), this.calcuateLineParams(), this._currentContext.blankWidth = this.calculateBlankWidthForFont(
|
|
24619
24632
|
this._currentContext.fontFace.family,
|
|
24620
|
-
this.
|
|
24621
|
-
)
|
|
24633
|
+
this.currentLayoutFontSize
|
|
24634
|
+
);
|
|
24622
24635
|
}
|
|
24623
24636
|
/**
|
|
24624
24637
|
* Calcuate font size, line space, line height and other parameters.
|
|
@@ -24652,16 +24665,16 @@ class nf {
|
|
|
24652
24665
|
}
|
|
24653
24666
|
countFinalCharBoxes(e, r, n) {
|
|
24654
24667
|
const a = [...e, ...r].filter(
|
|
24655
|
-
(
|
|
24668
|
+
(p) => p.char !== tr
|
|
24656
24669
|
);
|
|
24657
24670
|
if (n !== se.STACK)
|
|
24658
24671
|
return a.length;
|
|
24659
|
-
const i = (
|
|
24672
|
+
const i = (p) => p.type === se.CHAR && p.char.trim().length === 0, s = (p) => p.type === se.CHAR && p.char.trim().length > 0, o = a.findIndex(s);
|
|
24660
24673
|
if (o < 0) return a.filter(i).length;
|
|
24661
24674
|
let c = -1;
|
|
24662
|
-
for (let
|
|
24663
|
-
if (s(a[
|
|
24664
|
-
c =
|
|
24675
|
+
for (let p = a.length - 1; p >= 0; p--)
|
|
24676
|
+
if (s(a[p])) {
|
|
24677
|
+
c = p;
|
|
24665
24678
|
break;
|
|
24666
24679
|
}
|
|
24667
24680
|
const u = a.slice(0, o).filter(i), h = a.slice(c + 1).filter(i);
|
|
@@ -24696,10 +24709,10 @@ class nf {
|
|
|
24696
24709
|
var u, h;
|
|
24697
24710
|
const c = (h = (u = s.userData) == null ? void 0 : u.layout) == null ? void 0 : h.chars;
|
|
24698
24711
|
if (c && c.length > 0) {
|
|
24699
|
-
const
|
|
24712
|
+
const p = new M.Vector3(o, 0, 0);
|
|
24700
24713
|
c.forEach((l) => {
|
|
24701
24714
|
var g;
|
|
24702
|
-
return (g = l.box) == null ? void 0 : g.translate(
|
|
24715
|
+
return (g = l.box) == null ? void 0 : g.translate(p);
|
|
24703
24716
|
});
|
|
24704
24717
|
}
|
|
24705
24718
|
};
|
|
@@ -24758,9 +24771,9 @@ class nf {
|
|
|
24758
24771
|
o
|
|
24759
24772
|
), u = this.styleManager.getLineBasicMaterial(
|
|
24760
24773
|
o
|
|
24761
|
-
), h = this._options.collectCharBoxes !== !1,
|
|
24762
|
-
if (
|
|
24763
|
-
const g =
|
|
24774
|
+
), h = this._options.collectCharBoxes !== !1, p = e.filter((g) => g instanceof M.ShapeGeometry);
|
|
24775
|
+
if (p.length > 0) {
|
|
24776
|
+
const g = p.length > 1 ? Sa(p) : p[0], x = new M.Mesh(g, c);
|
|
24764
24777
|
x.userData.bboxIntersectionCheck = !0, x.userData.charBoxType = i, h && n.length > 0 && (x.userData.layout = { chars: n.slice() }), s.add(x);
|
|
24765
24778
|
}
|
|
24766
24779
|
const l = [
|
|
@@ -24942,49 +24955,57 @@ class cr extends M.Object3D {
|
|
|
24942
24955
|
* @returns The created Three.js object, or undefined if creation fails
|
|
24943
24956
|
*/
|
|
24944
24957
|
loadMText(e, r) {
|
|
24945
|
-
const { object: n, height: a } = this.createMTextGroup(
|
|
24958
|
+
const { object: n, height: a } = this.createMTextGroup(
|
|
24959
|
+
e,
|
|
24960
|
+
r
|
|
24961
|
+
);
|
|
24946
24962
|
if (!n)
|
|
24947
24963
|
return;
|
|
24948
24964
|
n.matrix.decompose(rt, Hr, Gr), e.position && (rt.x += e.position.x, rt.y += e.position.y, n.matrix.compose(rt, Hr, Gr));
|
|
24949
|
-
let i = e.width;
|
|
24965
|
+
let i = e.width, s = a;
|
|
24966
|
+
n.updateWorldMatrix(!0, !0);
|
|
24967
|
+
const o = new M.Box3().setFromObject(n);
|
|
24968
|
+
if (!o.isEmpty()) {
|
|
24969
|
+
const g = o.max.y - o.min.y;
|
|
24970
|
+
Number.isFinite(g) && g > 0 && (s = g);
|
|
24971
|
+
}
|
|
24950
24972
|
if (!Number.isFinite(i)) {
|
|
24951
|
-
|
|
24952
|
-
|
|
24953
|
-
i = Number.isFinite(l) && l > 0 ? l : 0;
|
|
24973
|
+
const g = o.max.x - o.min.x;
|
|
24974
|
+
i = Number.isFinite(g) && g > 0 ? g : 0;
|
|
24954
24975
|
}
|
|
24955
|
-
const
|
|
24976
|
+
const c = this.calculateAnchorPoint(
|
|
24956
24977
|
i,
|
|
24957
|
-
|
|
24978
|
+
s,
|
|
24958
24979
|
e.attachmentPoint,
|
|
24959
24980
|
e.drawingDirection
|
|
24960
|
-
),
|
|
24961
|
-
if (!
|
|
24962
|
-
const
|
|
24963
|
-
var
|
|
24964
|
-
(
|
|
24981
|
+
), u = (g) => {
|
|
24982
|
+
if (!g || g.length === 0) return;
|
|
24983
|
+
const x = new M.Vector3(c.x, c.y, 0), v = (b) => {
|
|
24984
|
+
var m;
|
|
24985
|
+
(m = b.box) == null || m.translate(x), b.children && b.children.length > 0 && b.children.forEach(v);
|
|
24965
24986
|
};
|
|
24966
|
-
|
|
24967
|
-
},
|
|
24968
|
-
!
|
|
24969
|
-
|
|
24987
|
+
g.forEach(v);
|
|
24988
|
+
}, h = (g) => {
|
|
24989
|
+
!g || g.length === 0 || g.forEach((x) => {
|
|
24990
|
+
x.y += c.y;
|
|
24970
24991
|
});
|
|
24971
24992
|
};
|
|
24972
|
-
n.traverse((
|
|
24973
|
-
var
|
|
24974
|
-
"geometry" in
|
|
24975
|
-
(
|
|
24976
|
-
),
|
|
24977
|
-
(
|
|
24978
|
-
),
|
|
24993
|
+
n.traverse((g) => {
|
|
24994
|
+
var x, v, b;
|
|
24995
|
+
"geometry" in g ? g.geometry.translate(c.x, c.y, 0) : u(
|
|
24996
|
+
(v = (x = g.userData) == null ? void 0 : x.layout) == null ? void 0 : v.chars
|
|
24997
|
+
), h(
|
|
24998
|
+
(b = g.userData) == null ? void 0 : b.lineLayouts
|
|
24999
|
+
), g.layers.enableAll();
|
|
24979
25000
|
});
|
|
24980
|
-
let
|
|
25001
|
+
let p = e.rotation || 0;
|
|
24981
25002
|
if (e.directionVector) {
|
|
24982
|
-
const
|
|
24983
|
-
|
|
25003
|
+
const g = e.directionVector, x = new M.Vector3(g.x, g.y, g.z), v = x.clone().cross(Wa), b = Wa.angleTo(x);
|
|
25004
|
+
p = v.z > 0 ? -b : b;
|
|
24984
25005
|
}
|
|
24985
25006
|
n.matrix.compose(rt, Hr, Gr);
|
|
24986
|
-
const
|
|
24987
|
-
return zr.makeTranslation(-
|
|
25007
|
+
const l = e.position ? rt.clone().sub(e.position) : rt;
|
|
25008
|
+
return zr.makeTranslation(-l.x, -l.y, 0), za.makeRotationZ(p), n.matrix.multiply(zr), n.matrix.multiply(za), n.matrix.multiply(zr.invert()), n.matrix.decompose(n.position, n.quaternion, n.scale), n;
|
|
24988
25009
|
}
|
|
24989
25010
|
/**
|
|
24990
25011
|
* Creates a group of text elements from MText data.
|
|
@@ -25025,7 +25046,7 @@ class cr extends M.Object3D {
|
|
|
25025
25046
|
X.MiddleCenter,
|
|
25026
25047
|
X.MiddleRight
|
|
25027
25048
|
].includes(e.attachmentPoint) ? s = Ze.MIDDLE : s = Ze.BOTTOM);
|
|
25028
|
-
const o = e.height || r.fixedTextHeight || 0, c = e.widthFactor || r.widthFactor || 1, u = e.lineSpaceFactor || 0.3, h = e.drawingDirection ?? Ye.LEFT_TO_RIGHT,
|
|
25049
|
+
const o = e.height || r.fixedTextHeight || 0, c = e.widthFactor || r.widthFactor || 1, u = e.lineSpaceFactor || 0.3, h = e.drawingDirection ?? Ye.LEFT_TO_RIGHT, p = {
|
|
25029
25050
|
fontSize: o,
|
|
25030
25051
|
widthFactor: c,
|
|
25031
25052
|
lineSpaceFactor: u,
|
|
@@ -25049,7 +25070,7 @@ class cr extends M.Object3D {
|
|
|
25049
25070
|
this._colorSettings,
|
|
25050
25071
|
this.styleManager,
|
|
25051
25072
|
this.fontManager,
|
|
25052
|
-
|
|
25073
|
+
p
|
|
25053
25074
|
), v = new Jl(e.text, l, {
|
|
25054
25075
|
resetParagraphParameters: !0,
|
|
25055
25076
|
yieldPropertyCommands: !0
|
|
@@ -25110,7 +25131,7 @@ class cr extends M.Object3D {
|
|
|
25110
25131
|
* @param boxes - Array to store the calculated bounding boxes
|
|
25111
25132
|
*/
|
|
25112
25133
|
getLayout(e, r, n) {
|
|
25113
|
-
var o, c, u, h,
|
|
25134
|
+
var o, c, u, h, p;
|
|
25114
25135
|
e.updateWorldMatrix(!1, !1);
|
|
25115
25136
|
const a = (c = (o = e.userData) == null ? void 0 : o.layout) == null ? void 0 : c.chars, i = (u = e.userData) == null ? void 0 : u.lineLayouts;
|
|
25116
25137
|
if (i && i.length > 0 && i.forEach((l) => {
|
|
@@ -25130,7 +25151,7 @@ class cr extends M.Object3D {
|
|
|
25130
25151
|
}
|
|
25131
25152
|
if (e instanceof M.Line || e instanceof M.Mesh) {
|
|
25132
25153
|
const l = e.geometry;
|
|
25133
|
-
if (!((
|
|
25154
|
+
if (!((p = l.userData) != null && p.isDecoration)) {
|
|
25134
25155
|
l.boundingBox === null && l.computeBoundingBox();
|
|
25135
25156
|
const g = new M.Box3().copy(l.boundingBox);
|
|
25136
25157
|
g.applyMatrix4(e.matrixWorld), r.push({
|
|
@@ -25149,32 +25170,32 @@ class cr extends M.Object3D {
|
|
|
25149
25170
|
var s, o, c, u, h;
|
|
25150
25171
|
e.updateWorldMatrix(!1, !1);
|
|
25151
25172
|
const n = (s = e.userData) == null ? void 0 : s.lineLayouts;
|
|
25152
|
-
n && n.length > 0 && n.forEach((
|
|
25153
|
-
Pe.set(0,
|
|
25173
|
+
n && n.length > 0 && n.forEach((p) => {
|
|
25174
|
+
Pe.set(0, p.y - p.height / 2, 0).applyMatrix4(e.matrixWorld), Ne.set(0, p.y + p.height / 2, 0).applyMatrix4(e.matrixWorld), r.hasLine = !0, r.minX = Math.min(r.minX, Pe.x, Ne.x), r.maxX = Math.max(r.maxX, Pe.x, Ne.x), r.minY = Math.min(r.minY, Pe.y, Ne.y), r.maxY = Math.max(r.maxY, Pe.y, Ne.y), r.minZ = Math.min(r.minZ, Pe.z, Ne.z), r.maxZ = Math.max(r.maxZ, Pe.z, Ne.z);
|
|
25154
25175
|
});
|
|
25155
25176
|
const a = (c = (o = e.userData) == null ? void 0 : o.layout) == null ? void 0 : c.chars;
|
|
25156
25177
|
if (a && a.length > 0) {
|
|
25157
|
-
const
|
|
25178
|
+
const p = (u = e.userData) == null ? void 0 : u.charBoxType;
|
|
25158
25179
|
nn(
|
|
25159
25180
|
a,
|
|
25160
25181
|
e.matrixWorld,
|
|
25161
|
-
|
|
25182
|
+
p
|
|
25162
25183
|
).forEach((g) => {
|
|
25163
25184
|
g.box && this.box.union(g.box);
|
|
25164
25185
|
});
|
|
25165
25186
|
return;
|
|
25166
25187
|
}
|
|
25167
25188
|
if (e instanceof M.Line || e instanceof M.Mesh) {
|
|
25168
|
-
const
|
|
25169
|
-
if (!((h =
|
|
25170
|
-
|
|
25171
|
-
const l = new M.Box3().copy(
|
|
25189
|
+
const p = e.geometry;
|
|
25190
|
+
if (!((h = p.userData) != null && h.isDecoration)) {
|
|
25191
|
+
p.boundingBox === null && p.computeBoundingBox();
|
|
25192
|
+
const l = new M.Box3().copy(p.boundingBox);
|
|
25172
25193
|
l.applyMatrix4(e.matrixWorld), this.box.union(l);
|
|
25173
25194
|
}
|
|
25174
25195
|
}
|
|
25175
25196
|
const i = e.children;
|
|
25176
|
-
for (let
|
|
25177
|
-
this.updateBoxFromObject(i[
|
|
25197
|
+
for (let p = 0, l = i.length; p < l; p++)
|
|
25198
|
+
this.updateBoxFromObject(i[p], r);
|
|
25178
25199
|
}
|
|
25179
25200
|
/**
|
|
25180
25201
|
* Remove the specified object from its parent and release geometry and material resource used
|
|
@@ -25401,31 +25422,31 @@ class af {
|
|
|
25401
25422
|
e.children.forEach((s) => {
|
|
25402
25423
|
const o = new M.BufferGeometry();
|
|
25403
25424
|
if (Object.keys(s.geometry.attributes).forEach((h) => {
|
|
25404
|
-
const
|
|
25405
|
-
|
|
25406
|
-
|
|
25407
|
-
|
|
25425
|
+
const p = s.geometry.attributes[h], l = new Float32Array(
|
|
25426
|
+
p.arrayBuffer,
|
|
25427
|
+
p.byteOffset,
|
|
25428
|
+
p.length
|
|
25408
25429
|
), g = new M.BufferAttribute(
|
|
25409
25430
|
l,
|
|
25410
|
-
|
|
25411
|
-
|
|
25431
|
+
p.itemSize,
|
|
25432
|
+
p.normalized
|
|
25412
25433
|
);
|
|
25413
25434
|
o.setAttribute(h, g);
|
|
25414
25435
|
}), s.geometry.index)
|
|
25415
25436
|
if (s.geometry.index.componentType === "uint32") {
|
|
25416
|
-
const
|
|
25437
|
+
const p = new Uint32Array(
|
|
25417
25438
|
s.geometry.index.arrayBuffer,
|
|
25418
25439
|
s.geometry.index.byteOffset,
|
|
25419
25440
|
s.geometry.index.length
|
|
25420
25441
|
);
|
|
25421
|
-
o.setIndex(new M.Uint32BufferAttribute(
|
|
25442
|
+
o.setIndex(new M.Uint32BufferAttribute(p, 1));
|
|
25422
25443
|
} else {
|
|
25423
|
-
const
|
|
25444
|
+
const p = new Uint16Array(
|
|
25424
25445
|
s.geometry.index.arrayBuffer,
|
|
25425
25446
|
s.geometry.index.byteOffset,
|
|
25426
25447
|
s.geometry.index.length
|
|
25427
25448
|
);
|
|
25428
|
-
o.setIndex(new M.Uint16BufferAttribute(
|
|
25449
|
+
o.setIndex(new M.Uint16BufferAttribute(p, 1));
|
|
25429
25450
|
}
|
|
25430
25451
|
let c;
|
|
25431
25452
|
if (s.type === "mesh") {
|
|
@@ -25510,7 +25531,7 @@ class af {
|
|
|
25510
25531
|
}));
|
|
25511
25532
|
}
|
|
25512
25533
|
collectLayout(e, r, n) {
|
|
25513
|
-
var o, c, u, h,
|
|
25534
|
+
var o, c, u, h, p;
|
|
25514
25535
|
e.updateWorldMatrix(!1, !1);
|
|
25515
25536
|
const a = (c = (o = e.userData) == null ? void 0 : o.layout) == null ? void 0 : c.chars, i = (u = e.userData) == null ? void 0 : u.lineLayouts;
|
|
25516
25537
|
if (i && i.length > 0 && i.forEach((l) => {
|
|
@@ -25530,7 +25551,7 @@ class af {
|
|
|
25530
25551
|
}
|
|
25531
25552
|
if (e instanceof M.Line || e instanceof M.Mesh) {
|
|
25532
25553
|
const l = e.geometry;
|
|
25533
|
-
if (!((
|
|
25554
|
+
if (!((p = l.userData) != null && p.isDecoration)) {
|
|
25534
25555
|
l.boundingBox === null && l.computeBoundingBox();
|
|
25535
25556
|
const g = new M.Box3().copy(l.boundingBox);
|
|
25536
25557
|
g.applyMatrix4(e.matrixWorld), r.push({
|