pdfkit 0.12.3 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -1
- package/README.md +1 -1
- package/js/data/sRGB_IEC61966_2_1.icc +0 -0
- package/js/pdfkit.es5.js +348 -17
- package/js/pdfkit.es5.js.map +1 -1
- package/js/pdfkit.esnext.js +322 -17
- package/js/pdfkit.esnext.js.map +1 -1
- package/js/pdfkit.js +365 -17
- package/js/pdfkit.js.map +1 -1
- package/js/pdfkit.standalone.js +1417 -433
- package/package.json +8 -11
- package/js/font/data/Courier-Bold.afm +0 -342
- package/js/font/data/Courier-BoldOblique.afm +0 -342
- package/js/font/data/Courier-Oblique.afm +0 -342
- package/js/font/data/Courier.afm +0 -342
- package/js/font/data/Helvetica-Bold.afm +0 -2827
- package/js/font/data/Helvetica-BoldOblique.afm +0 -2827
- package/js/font/data/Helvetica-Oblique.afm +0 -3051
- package/js/font/data/Helvetica.afm +0 -3051
- package/js/font/data/Symbol.afm +0 -213
- package/js/font/data/Times-Bold.afm +0 -2588
- package/js/font/data/Times-BoldItalic.afm +0 -2384
- package/js/font/data/Times-Italic.afm +0 -2667
- package/js/font/data/Times-Roman.afm +0 -2419
- package/js/font/data/ZapfDingbats.afm +0 -225
- package/js/pdfkit.standalone.orig.js +0 -68494
package/js/pdfkit.standalone.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.PDFDocument = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
|
2
|
-
(function (Buffer){
|
|
2
|
+
(function (Buffer,__dirname){
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
var stream = require('stream');
|
|
@@ -403,6 +403,11 @@ class PDFPage {
|
|
|
403
403
|
return data.Pattern != null ? data.Pattern : data.Pattern = {};
|
|
404
404
|
}
|
|
405
405
|
|
|
406
|
+
get colorSpaces() {
|
|
407
|
+
const data = this.resources.data;
|
|
408
|
+
return data.ColorSpace || (data.ColorSpace = {});
|
|
409
|
+
}
|
|
410
|
+
|
|
406
411
|
get annotations() {
|
|
407
412
|
const data = this.dictionary.data;
|
|
408
413
|
return data.Annots != null ? data.Annots : data.Annots = [];
|
|
@@ -1464,7 +1469,7 @@ class PDFGradient {
|
|
|
1464
1469
|
return pattern;
|
|
1465
1470
|
}
|
|
1466
1471
|
|
|
1467
|
-
apply(
|
|
1472
|
+
apply(stroke) {
|
|
1468
1473
|
// apply gradient transform to existing document ctm
|
|
1469
1474
|
const [m0, m1, m2, m3, m4, m5] = this.doc._ctm;
|
|
1470
1475
|
const [m11, m12, m21, m22, dx, dy] = this.transform;
|
|
@@ -1474,6 +1479,9 @@ class PDFGradient {
|
|
|
1474
1479
|
this.embed(m);
|
|
1475
1480
|
}
|
|
1476
1481
|
|
|
1482
|
+
this.doc._setColorSpace('Pattern', stroke);
|
|
1483
|
+
|
|
1484
|
+
const op = stroke ? 'SCN' : 'scn';
|
|
1477
1485
|
return this.doc.addContent(`/${this.id} ${op}`);
|
|
1478
1486
|
}
|
|
1479
1487
|
|
|
@@ -1538,24 +1546,119 @@ var Gradient = {
|
|
|
1538
1546
|
PDFRadialGradient
|
|
1539
1547
|
};
|
|
1540
1548
|
|
|
1549
|
+
/*
|
|
1550
|
+
PDF tiling pattern support. Uncolored only.
|
|
1551
|
+
*/
|
|
1552
|
+
const underlyingColorSpaces = ['DeviceCMYK', 'DeviceRGB'];
|
|
1553
|
+
|
|
1554
|
+
class PDFTilingPattern {
|
|
1555
|
+
constructor(doc, bBox, xStep, yStep, stream) {
|
|
1556
|
+
this.doc = doc;
|
|
1557
|
+
this.bBox = bBox;
|
|
1558
|
+
this.xStep = xStep;
|
|
1559
|
+
this.yStep = yStep;
|
|
1560
|
+
this.stream = stream;
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
createPattern() {
|
|
1564
|
+
// no resources needed for our current usage
|
|
1565
|
+
// required entry
|
|
1566
|
+
const resources = this.doc.ref();
|
|
1567
|
+
resources.end(); // apply default transform matrix (flipped in the default doc._ctm)
|
|
1568
|
+
// see document.js & gradient.js
|
|
1569
|
+
|
|
1570
|
+
const [m0, m1, m2, m3, m4, m5] = this.doc._ctm;
|
|
1571
|
+
const [m11, m12, m21, m22, dx, dy] = [1, 0, 0, 1, 0, 0];
|
|
1572
|
+
const m = [m0 * m11 + m2 * m12, m1 * m11 + m3 * m12, m0 * m21 + m2 * m22, m1 * m21 + m3 * m22, m0 * dx + m2 * dy + m4, m1 * dx + m3 * dy + m5];
|
|
1573
|
+
const pattern = this.doc.ref({
|
|
1574
|
+
Type: 'Pattern',
|
|
1575
|
+
PatternType: 1,
|
|
1576
|
+
// tiling
|
|
1577
|
+
PaintType: 2,
|
|
1578
|
+
// 1-colored, 2-uncolored
|
|
1579
|
+
TilingType: 2,
|
|
1580
|
+
// 2-no distortion
|
|
1581
|
+
BBox: this.bBox,
|
|
1582
|
+
XStep: this.xStep,
|
|
1583
|
+
YStep: this.yStep,
|
|
1584
|
+
Matrix: m.map(v => +v.toFixed(5)),
|
|
1585
|
+
Resources: resources
|
|
1586
|
+
});
|
|
1587
|
+
pattern.end(this.stream);
|
|
1588
|
+
return pattern;
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1591
|
+
embedPatternColorSpaces() {
|
|
1592
|
+
// map each pattern to an underlying color space
|
|
1593
|
+
// and embed on each page
|
|
1594
|
+
underlyingColorSpaces.forEach(csName => {
|
|
1595
|
+
const csId = this.getPatternColorSpaceId(csName);
|
|
1596
|
+
if (this.doc.page.colorSpaces[csId]) return;
|
|
1597
|
+
const cs = this.doc.ref(['Pattern', csName]);
|
|
1598
|
+
cs.end();
|
|
1599
|
+
this.doc.page.colorSpaces[csId] = cs;
|
|
1600
|
+
});
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
getPatternColorSpaceId(underlyingColorspace) {
|
|
1604
|
+
return `CsP${underlyingColorspace}`;
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1607
|
+
embed() {
|
|
1608
|
+
if (!this.id) {
|
|
1609
|
+
this.doc._patternCount = this.doc._patternCount + 1;
|
|
1610
|
+
this.id = 'P' + this.doc._patternCount;
|
|
1611
|
+
this.pattern = this.createPattern();
|
|
1612
|
+
} // patterns are embedded in each page
|
|
1613
|
+
|
|
1614
|
+
|
|
1615
|
+
if (!this.doc.page.patterns[this.id]) {
|
|
1616
|
+
this.doc.page.patterns[this.id] = this.pattern;
|
|
1617
|
+
}
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
apply(stroke, patternColor) {
|
|
1621
|
+
// do any embedding/creating that might be needed
|
|
1622
|
+
this.embedPatternColorSpaces();
|
|
1623
|
+
this.embed();
|
|
1624
|
+
|
|
1625
|
+
const normalizedColor = this.doc._normalizeColor(patternColor);
|
|
1626
|
+
|
|
1627
|
+
if (!normalizedColor) throw Error(`invalid pattern color. (value: ${patternColor})`); // select one of the pattern color spaces
|
|
1628
|
+
|
|
1629
|
+
const csId = this.getPatternColorSpaceId(this.doc._getColorSpace(normalizedColor));
|
|
1630
|
+
|
|
1631
|
+
this.doc._setColorSpace(csId, stroke); // stroke/fill using the pattern and color (in the above underlying color space)
|
|
1632
|
+
|
|
1633
|
+
|
|
1634
|
+
const op = stroke ? 'SCN' : 'scn';
|
|
1635
|
+
return this.doc.addContent(`${normalizedColor.join(' ')} /${this.id} ${op}`);
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
}
|
|
1639
|
+
|
|
1640
|
+
var pattern = {
|
|
1641
|
+
PDFTilingPattern
|
|
1642
|
+
};
|
|
1643
|
+
|
|
1541
1644
|
const {
|
|
1542
1645
|
PDFGradient: PDFGradient$1,
|
|
1543
1646
|
PDFLinearGradient: PDFLinearGradient$1,
|
|
1544
1647
|
PDFRadialGradient: PDFRadialGradient$1
|
|
1545
1648
|
} = Gradient;
|
|
1649
|
+
const {
|
|
1650
|
+
PDFTilingPattern: PDFTilingPattern$1
|
|
1651
|
+
} = pattern;
|
|
1546
1652
|
var ColorMixin = {
|
|
1547
1653
|
initColor() {
|
|
1548
1654
|
// The opacity dictionaries
|
|
1549
1655
|
this._opacityRegistry = {};
|
|
1550
1656
|
this._opacityCount = 0;
|
|
1657
|
+
this._patternCount = 0;
|
|
1551
1658
|
return this._gradCount = 0;
|
|
1552
1659
|
},
|
|
1553
1660
|
|
|
1554
1661
|
_normalizeColor(color) {
|
|
1555
|
-
if (color instanceof PDFGradient$1) {
|
|
1556
|
-
return color;
|
|
1557
|
-
}
|
|
1558
|
-
|
|
1559
1662
|
if (typeof color === 'string') {
|
|
1560
1663
|
if (color.charAt(0) === '#') {
|
|
1561
1664
|
if (color.length === 4) {
|
|
@@ -1584,6 +1687,19 @@ var ColorMixin = {
|
|
|
1584
1687
|
},
|
|
1585
1688
|
|
|
1586
1689
|
_setColor(color, stroke) {
|
|
1690
|
+
if (color instanceof PDFGradient$1) {
|
|
1691
|
+
color.apply(stroke);
|
|
1692
|
+
return true; // see if tiling pattern, decode & apply it it
|
|
1693
|
+
} else if (Array.isArray(color) && color[0] instanceof PDFTilingPattern$1) {
|
|
1694
|
+
color[0].apply(stroke, color[1]);
|
|
1695
|
+
return true;
|
|
1696
|
+
} // any other case should be a normal color and not a pattern
|
|
1697
|
+
|
|
1698
|
+
|
|
1699
|
+
return this._setColorCore(color, stroke);
|
|
1700
|
+
},
|
|
1701
|
+
|
|
1702
|
+
_setColorCore(color, stroke) {
|
|
1587
1703
|
color = this._normalizeColor(color);
|
|
1588
1704
|
|
|
1589
1705
|
if (!color) {
|
|
@@ -1592,19 +1708,12 @@ var ColorMixin = {
|
|
|
1592
1708
|
|
|
1593
1709
|
const op = stroke ? 'SCN' : 'scn';
|
|
1594
1710
|
|
|
1595
|
-
|
|
1596
|
-
this._setColorSpace('Pattern', stroke);
|
|
1597
|
-
|
|
1598
|
-
color.apply(op);
|
|
1599
|
-
} else {
|
|
1600
|
-
const space = color.length === 4 ? 'DeviceCMYK' : 'DeviceRGB';
|
|
1601
|
-
|
|
1602
|
-
this._setColorSpace(space, stroke);
|
|
1711
|
+
const space = this._getColorSpace(color);
|
|
1603
1712
|
|
|
1604
|
-
|
|
1605
|
-
this.addContent(`${color} ${op}`);
|
|
1606
|
-
}
|
|
1713
|
+
this._setColorSpace(space, stroke);
|
|
1607
1714
|
|
|
1715
|
+
color = color.join(' ');
|
|
1716
|
+
this.addContent(`${color} ${op}`);
|
|
1608
1717
|
return true;
|
|
1609
1718
|
},
|
|
1610
1719
|
|
|
@@ -1613,6 +1722,10 @@ var ColorMixin = {
|
|
|
1613
1722
|
return this.addContent(`/${space} ${op}`);
|
|
1614
1723
|
},
|
|
1615
1724
|
|
|
1725
|
+
_getColorSpace(color) {
|
|
1726
|
+
return color.length === 4 ? 'DeviceCMYK' : 'DeviceRGB';
|
|
1727
|
+
},
|
|
1728
|
+
|
|
1616
1729
|
fillColor(color, opacity) {
|
|
1617
1730
|
const set = this._setColor(color, false);
|
|
1618
1731
|
|
|
@@ -1703,6 +1816,10 @@ var ColorMixin = {
|
|
|
1703
1816
|
|
|
1704
1817
|
radialGradient(x1, y1, r1, x2, y2, r2) {
|
|
1705
1818
|
return new PDFRadialGradient$1(this, x1, y1, r1, x2, y2, r2);
|
|
1819
|
+
},
|
|
1820
|
+
|
|
1821
|
+
pattern(bbox, xStep, yStep, stream) {
|
|
1822
|
+
return new PDFTilingPattern$1(this, bbox, xStep, yStep, stream);
|
|
1706
1823
|
}
|
|
1707
1824
|
|
|
1708
1825
|
};
|
|
@@ -3175,6 +3292,14 @@ class EmbeddedFont extends PDFFont {
|
|
|
3175
3292
|
descriptor.data.FontFile2 = fontFile;
|
|
3176
3293
|
}
|
|
3177
3294
|
|
|
3295
|
+
if (this.document.subset) {
|
|
3296
|
+
const CIDSet = Buffer.from('FFFFFFFFC0', 'hex');
|
|
3297
|
+
const CIDSetRef = this.document.ref();
|
|
3298
|
+
CIDSetRef.write(CIDSet);
|
|
3299
|
+
CIDSetRef.end();
|
|
3300
|
+
descriptor.data.CIDSet = CIDSetRef;
|
|
3301
|
+
}
|
|
3302
|
+
|
|
3178
3303
|
descriptor.end();
|
|
3179
3304
|
const descendantFontData = {
|
|
3180
3305
|
Type: 'Font',
|
|
@@ -5946,6 +6071,219 @@ function isEqual(a, b) {
|
|
|
5946
6071
|
return a.Subtype === b.Subtype && a.Params.CheckSum.toString() === b.Params.CheckSum.toString() && a.Params.Size === b.Params.Size && a.Params.CreationDate === b.Params.CreationDate && a.Params.ModDate === b.Params.ModDate;
|
|
5947
6072
|
}
|
|
5948
6073
|
|
|
6074
|
+
var PDFA = {
|
|
6075
|
+
initPDFA(pSubset) {
|
|
6076
|
+
if (pSubset.charAt(pSubset.length - 3) === '-') {
|
|
6077
|
+
this.subset_conformance = pSubset.charAt(pSubset.length - 1).toUpperCase();
|
|
6078
|
+
this.subset = parseInt(pSubset.charAt(pSubset.length - 2));
|
|
6079
|
+
} else {
|
|
6080
|
+
// Default to Basic conformance when user doesn't specify
|
|
6081
|
+
this.subset_conformance = 'B';
|
|
6082
|
+
this.subset = parseInt(pSubset.charAt(pSubset.length - 1));
|
|
6083
|
+
}
|
|
6084
|
+
},
|
|
6085
|
+
|
|
6086
|
+
endSubset() {
|
|
6087
|
+
this._addPdfaMetadata();
|
|
6088
|
+
|
|
6089
|
+
const jsPath = `${__dirname}/data/sRGB_IEC61966_2_1.icc`;
|
|
6090
|
+
const jestPath = `${__dirname}/../color_profiles/sRGB_IEC61966_2_1.icc`;
|
|
6091
|
+
|
|
6092
|
+
this._addColorOutputIntent(fs.existsSync(jsPath) ? jsPath : jestPath);
|
|
6093
|
+
},
|
|
6094
|
+
|
|
6095
|
+
_addColorOutputIntent(pICCPath) {
|
|
6096
|
+
const iccProfile = fs.readFileSync(pICCPath);
|
|
6097
|
+
const colorProfileRef = this.ref({
|
|
6098
|
+
Length: iccProfile.length,
|
|
6099
|
+
N: 3
|
|
6100
|
+
});
|
|
6101
|
+
colorProfileRef.write(iccProfile);
|
|
6102
|
+
colorProfileRef.end();
|
|
6103
|
+
const intentRef = this.ref({
|
|
6104
|
+
Type: 'OutputIntent',
|
|
6105
|
+
S: 'GTS_PDFA1',
|
|
6106
|
+
Info: new String('sRGB IEC61966-2.1'),
|
|
6107
|
+
OutputConditionIdentifier: new String('sRGB IEC61966-2.1'),
|
|
6108
|
+
DestOutputProfile: colorProfileRef
|
|
6109
|
+
});
|
|
6110
|
+
intentRef.end();
|
|
6111
|
+
this._root.data.OutputIntents = [intentRef];
|
|
6112
|
+
},
|
|
6113
|
+
|
|
6114
|
+
_getPdfaid() {
|
|
6115
|
+
return `
|
|
6116
|
+
<rdf:Description xmlns:pdfaid="http://www.aiim.org/pdfa/ns/id/" rdf:about="">
|
|
6117
|
+
<pdfaid:part>${this.subset}</pdfaid:part>
|
|
6118
|
+
<pdfaid:conformance>${this.subset_conformance}</pdfaid:conformance>
|
|
6119
|
+
</rdf:Description>
|
|
6120
|
+
`;
|
|
6121
|
+
},
|
|
6122
|
+
|
|
6123
|
+
_addPdfaMetadata() {
|
|
6124
|
+
this.appendXML(this._getPdfaid());
|
|
6125
|
+
}
|
|
6126
|
+
|
|
6127
|
+
};
|
|
6128
|
+
|
|
6129
|
+
var SubsetMixin = {
|
|
6130
|
+
_importSubset(subset) {
|
|
6131
|
+
Object.assign(this, subset);
|
|
6132
|
+
},
|
|
6133
|
+
|
|
6134
|
+
initSubset(options) {
|
|
6135
|
+
switch (options.subset) {
|
|
6136
|
+
case 'PDF/A-1':
|
|
6137
|
+
case 'PDF/A-1a':
|
|
6138
|
+
case 'PDF/A-1b':
|
|
6139
|
+
case 'PDF/A-2':
|
|
6140
|
+
case 'PDF/A-2a':
|
|
6141
|
+
case 'PDF/A-2b':
|
|
6142
|
+
case 'PDF/A-3':
|
|
6143
|
+
case 'PDF/A-3a':
|
|
6144
|
+
case 'PDF/A-3b':
|
|
6145
|
+
this._importSubset(PDFA);
|
|
6146
|
+
|
|
6147
|
+
this.initPDFA(options.subset);
|
|
6148
|
+
break;
|
|
6149
|
+
}
|
|
6150
|
+
}
|
|
6151
|
+
|
|
6152
|
+
};
|
|
6153
|
+
|
|
6154
|
+
class PDFMetadata {
|
|
6155
|
+
constructor() {
|
|
6156
|
+
this._metadata = `
|
|
6157
|
+
<?xpacket begin="\ufeff" id="W5M0MpCehiHzreSzNTczkc9d"?>
|
|
6158
|
+
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
|
6159
|
+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
|
6160
|
+
`;
|
|
6161
|
+
}
|
|
6162
|
+
|
|
6163
|
+
_closeTags() {
|
|
6164
|
+
this._metadata = this._metadata.concat(`
|
|
6165
|
+
</rdf:RDF>
|
|
6166
|
+
</x:xmpmeta>
|
|
6167
|
+
<?xpacket end="w"?>
|
|
6168
|
+
`);
|
|
6169
|
+
}
|
|
6170
|
+
|
|
6171
|
+
append(xml, newline = true) {
|
|
6172
|
+
this._metadata = this._metadata.concat(xml);
|
|
6173
|
+
if (newline) this._metadata = this._metadata.concat('\n');
|
|
6174
|
+
}
|
|
6175
|
+
|
|
6176
|
+
getXML() {
|
|
6177
|
+
return this._metadata;
|
|
6178
|
+
}
|
|
6179
|
+
|
|
6180
|
+
getLength() {
|
|
6181
|
+
return this._metadata.length;
|
|
6182
|
+
}
|
|
6183
|
+
|
|
6184
|
+
end() {
|
|
6185
|
+
this._closeTags();
|
|
6186
|
+
|
|
6187
|
+
this._metadata = this._metadata.trim();
|
|
6188
|
+
}
|
|
6189
|
+
|
|
6190
|
+
}
|
|
6191
|
+
|
|
6192
|
+
var MetadataMixin = {
|
|
6193
|
+
initMetadata() {
|
|
6194
|
+
this.metadata = new PDFMetadata();
|
|
6195
|
+
},
|
|
6196
|
+
|
|
6197
|
+
appendXML(xml, newline = true) {
|
|
6198
|
+
this.metadata.append(xml, newline);
|
|
6199
|
+
},
|
|
6200
|
+
|
|
6201
|
+
_addInfo() {
|
|
6202
|
+
this.appendXML(`
|
|
6203
|
+
<rdf:Description rdf:about="" xmlns:xmp="http://ns.adobe.com/xap/1.0/">
|
|
6204
|
+
<xmp:CreateDate>${this.info.CreationDate.toISOString().split('.')[0] + "Z"}</xmp:CreateDate>
|
|
6205
|
+
<xmp:CreatorTool>${this.info.Creator}</xmp:CreatorTool>
|
|
6206
|
+
</rdf:Description>
|
|
6207
|
+
`);
|
|
6208
|
+
|
|
6209
|
+
if (this.info.Title || this.info.Author || this.info.Subject) {
|
|
6210
|
+
this.appendXML(`
|
|
6211
|
+
<rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
|
6212
|
+
`);
|
|
6213
|
+
|
|
6214
|
+
if (this.info.Title) {
|
|
6215
|
+
this.appendXML(`
|
|
6216
|
+
<dc:title>
|
|
6217
|
+
<rdf:Alt>
|
|
6218
|
+
<rdf:li xml:lang="x-default">${this.info.Title}</rdf:li>
|
|
6219
|
+
</rdf:Alt>
|
|
6220
|
+
</dc:title>
|
|
6221
|
+
`);
|
|
6222
|
+
}
|
|
6223
|
+
|
|
6224
|
+
if (this.info.Author) {
|
|
6225
|
+
this.appendXML(`
|
|
6226
|
+
<dc:creator>
|
|
6227
|
+
<rdf:Seq>
|
|
6228
|
+
<rdf:li>${this.info.Author}</rdf:li>
|
|
6229
|
+
</rdf:Seq>
|
|
6230
|
+
</dc:creator>
|
|
6231
|
+
`);
|
|
6232
|
+
}
|
|
6233
|
+
|
|
6234
|
+
if (this.info.Subject) {
|
|
6235
|
+
this.appendXML(`
|
|
6236
|
+
<dc:description>
|
|
6237
|
+
<rdf:Alt>
|
|
6238
|
+
<rdf:li xml:lang="x-default">${this.info.Subject}</rdf:li>
|
|
6239
|
+
</rdf:Alt>
|
|
6240
|
+
</dc:description>
|
|
6241
|
+
`);
|
|
6242
|
+
}
|
|
6243
|
+
|
|
6244
|
+
this.appendXML(`
|
|
6245
|
+
</rdf:Description>
|
|
6246
|
+
`);
|
|
6247
|
+
}
|
|
6248
|
+
|
|
6249
|
+
this.appendXML(`
|
|
6250
|
+
<rdf:Description rdf:about="" xmlns:pdf="http://ns.adobe.com/pdf/1.3/">
|
|
6251
|
+
<pdf:Producer>${this.info.Creator}</pdf:Producer>`, false);
|
|
6252
|
+
|
|
6253
|
+
if (this.info.Keywords) {
|
|
6254
|
+
this.appendXML(`
|
|
6255
|
+
<pdf:Keywords>${this.info.Keywords}</pdf:Keywords>`, false);
|
|
6256
|
+
}
|
|
6257
|
+
|
|
6258
|
+
this.appendXML(`
|
|
6259
|
+
</rdf:Description>
|
|
6260
|
+
`);
|
|
6261
|
+
},
|
|
6262
|
+
|
|
6263
|
+
endMetadata() {
|
|
6264
|
+
this._addInfo();
|
|
6265
|
+
|
|
6266
|
+
this.metadata.end();
|
|
6267
|
+
/*
|
|
6268
|
+
Metadata was introduced in PDF 1.4, so adding it to 1.3
|
|
6269
|
+
will likely only take up more space.
|
|
6270
|
+
*/
|
|
6271
|
+
|
|
6272
|
+
if (this.version != 1.3) {
|
|
6273
|
+
this.metadataRef = this.ref({
|
|
6274
|
+
length: this.metadata.getLength(),
|
|
6275
|
+
Type: 'Metadata',
|
|
6276
|
+
Subtype: 'XML'
|
|
6277
|
+
});
|
|
6278
|
+
this.metadataRef.compress = false;
|
|
6279
|
+
this.metadataRef.write(Buffer.from(this.metadata.getXML(), 'utf-8'));
|
|
6280
|
+
this.metadataRef.end();
|
|
6281
|
+
this._root.data.Metadata = this.metadataRef;
|
|
6282
|
+
}
|
|
6283
|
+
}
|
|
6284
|
+
|
|
6285
|
+
};
|
|
6286
|
+
|
|
5949
6287
|
/*
|
|
5950
6288
|
PDFDocument - represents an entire PDF document
|
|
5951
6289
|
By Devon Govett
|
|
@@ -6009,13 +6347,15 @@ class PDFDocument extends stream.Readable {
|
|
|
6009
6347
|
|
|
6010
6348
|
this.page = null; // Initialize mixins
|
|
6011
6349
|
|
|
6350
|
+
this.initMetadata();
|
|
6012
6351
|
this.initColor();
|
|
6013
6352
|
this.initVector();
|
|
6014
6353
|
this.initFonts(options.font);
|
|
6015
6354
|
this.initText();
|
|
6016
6355
|
this.initImages();
|
|
6017
6356
|
this.initOutline();
|
|
6018
|
-
this.initMarkings(options);
|
|
6357
|
+
this.initMarkings(options);
|
|
6358
|
+
this.initSubset(options); // Initialize the metadata
|
|
6019
6359
|
|
|
6020
6360
|
this.info = {
|
|
6021
6361
|
Producer: 'PDFKit',
|
|
@@ -6236,6 +6576,12 @@ Please pipe the document into a Node stream.\
|
|
|
6236
6576
|
this.endOutline();
|
|
6237
6577
|
this.endMarkings();
|
|
6238
6578
|
|
|
6579
|
+
if (this.subset) {
|
|
6580
|
+
this.endSubset();
|
|
6581
|
+
}
|
|
6582
|
+
|
|
6583
|
+
this.endMetadata();
|
|
6584
|
+
|
|
6239
6585
|
this._root.end();
|
|
6240
6586
|
|
|
6241
6587
|
this._root.data.Pages.end();
|
|
@@ -6311,6 +6657,7 @@ const mixin = methods => {
|
|
|
6311
6657
|
Object.assign(PDFDocument.prototype, methods);
|
|
6312
6658
|
};
|
|
6313
6659
|
|
|
6660
|
+
mixin(MetadataMixin);
|
|
6314
6661
|
mixin(ColorMixin);
|
|
6315
6662
|
mixin(VectorMixin);
|
|
6316
6663
|
mixin(FontsMixin);
|
|
@@ -6321,13 +6668,14 @@ mixin(OutlineMixin);
|
|
|
6321
6668
|
mixin(MarkingsMixin);
|
|
6322
6669
|
mixin(AcroFormMixin);
|
|
6323
6670
|
mixin(AttachmentsMixin);
|
|
6671
|
+
mixin(SubsetMixin);
|
|
6324
6672
|
PDFDocument.LineWrapper = LineWrapper;
|
|
6325
6673
|
|
|
6326
6674
|
module.exports = PDFDocument;
|
|
6327
6675
|
|
|
6328
6676
|
|
|
6329
|
-
}).call(this,require("buffer").Buffer)
|
|
6330
|
-
},{"buffer":55,"crypto-js":
|
|
6677
|
+
}).call(this,require("buffer").Buffer,"/js")
|
|
6678
|
+
},{"buffer":55,"crypto-js":201,"events":231,"fontkit":232,"fs":54,"linebreak":240,"png-js":242,"stream":277,"zlib":42}],2:[function(require,module,exports){
|
|
6331
6679
|
(function (global){
|
|
6332
6680
|
'use strict';
|
|
6333
6681
|
|
|
@@ -7443,7 +7791,7 @@ function hasOwnProperty(obj, prop) {
|
|
|
7443
7791
|
}
|
|
7444
7792
|
|
|
7445
7793
|
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
7446
|
-
},{"./support/isBuffer":4,"_process":
|
|
7794
|
+
},{"./support/isBuffer":4,"_process":244,"inherits":3}],6:[function(require,module,exports){
|
|
7447
7795
|
module.exports = { "default": require("core-js/library/fn/array/from"), __esModule: true };
|
|
7448
7796
|
},{"core-js/library/fn/array/from":57}],7:[function(require,module,exports){
|
|
7449
7797
|
module.exports = { "default": require("core-js/library/fn/get-iterator"), __esModule: true };
|
|
@@ -10007,7 +10355,7 @@ Zlib.prototype._reset = function () {
|
|
|
10007
10355
|
|
|
10008
10356
|
exports.Zlib = Zlib;
|
|
10009
10357
|
}).call(this,require('_process'),require("buffer").Buffer)
|
|
10010
|
-
},{"_process":
|
|
10358
|
+
},{"_process":244,"assert":2,"buffer":55,"pako/lib/zlib/constants":45,"pako/lib/zlib/deflate.js":47,"pako/lib/zlib/inflate.js":49,"pako/lib/zlib/zstream":53}],42:[function(require,module,exports){
|
|
10011
10359
|
(function (process){
|
|
10012
10360
|
'use strict';
|
|
10013
10361
|
|
|
@@ -10619,7 +10967,7 @@ util.inherits(DeflateRaw, Zlib);
|
|
|
10619
10967
|
util.inherits(InflateRaw, Zlib);
|
|
10620
10968
|
util.inherits(Unzip, Zlib);
|
|
10621
10969
|
}).call(this,require('_process'))
|
|
10622
|
-
},{"./binding":41,"_process":
|
|
10970
|
+
},{"./binding":41,"_process":244,"assert":2,"buffer":55,"stream":277,"util":287}],43:[function(require,module,exports){
|
|
10623
10971
|
'use strict';
|
|
10624
10972
|
|
|
10625
10973
|
|
|
@@ -18124,7 +18472,7 @@ function numberIsNaN (obj) {
|
|
|
18124
18472
|
return obj !== obj // eslint-disable-line no-self-compare
|
|
18125
18473
|
}
|
|
18126
18474
|
|
|
18127
|
-
},{"base64-js":28,"ieee754":
|
|
18475
|
+
},{"base64-js":28,"ieee754":233}],56:[function(require,module,exports){
|
|
18128
18476
|
(function (Buffer){
|
|
18129
18477
|
var clone = (function() {
|
|
18130
18478
|
'use strict';
|
|
@@ -20887,7 +21235,7 @@ function objectToString(o) {
|
|
|
20887
21235
|
}
|
|
20888
21236
|
|
|
20889
21237
|
}).call(this,{"isBuffer":require("../../is-buffer/index.js")})
|
|
20890
|
-
},{"../../is-buffer/index.js":
|
|
21238
|
+
},{"../../is-buffer/index.js":235}],191:[function(require,module,exports){
|
|
20891
21239
|
;(function (root, factory, undef) {
|
|
20892
21240
|
if (typeof exports === "object") {
|
|
20893
21241
|
// CommonJS
|
|
@@ -21122,7 +21470,479 @@ function objectToString(o) {
|
|
|
21122
21470
|
return CryptoJS.AES;
|
|
21123
21471
|
|
|
21124
21472
|
}));
|
|
21125
|
-
},{"./cipher-core":
|
|
21473
|
+
},{"./cipher-core":193,"./core":194,"./enc-base64":195,"./evpkdf":198,"./md5":203}],192:[function(require,module,exports){
|
|
21474
|
+
;(function (root, factory, undef) {
|
|
21475
|
+
if (typeof exports === "object") {
|
|
21476
|
+
// CommonJS
|
|
21477
|
+
module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core"));
|
|
21478
|
+
}
|
|
21479
|
+
else if (typeof define === "function" && define.amd) {
|
|
21480
|
+
// AMD
|
|
21481
|
+
define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory);
|
|
21482
|
+
}
|
|
21483
|
+
else {
|
|
21484
|
+
// Global (browser)
|
|
21485
|
+
factory(root.CryptoJS);
|
|
21486
|
+
}
|
|
21487
|
+
}(this, function (CryptoJS) {
|
|
21488
|
+
|
|
21489
|
+
(function () {
|
|
21490
|
+
// Shortcuts
|
|
21491
|
+
var C = CryptoJS;
|
|
21492
|
+
var C_lib = C.lib;
|
|
21493
|
+
var BlockCipher = C_lib.BlockCipher;
|
|
21494
|
+
var C_algo = C.algo;
|
|
21495
|
+
|
|
21496
|
+
const N = 16;
|
|
21497
|
+
|
|
21498
|
+
//Origin pbox and sbox, derived from PI
|
|
21499
|
+
const ORIG_P = [
|
|
21500
|
+
0x243F6A88, 0x85A308D3, 0x13198A2E, 0x03707344,
|
|
21501
|
+
0xA4093822, 0x299F31D0, 0x082EFA98, 0xEC4E6C89,
|
|
21502
|
+
0x452821E6, 0x38D01377, 0xBE5466CF, 0x34E90C6C,
|
|
21503
|
+
0xC0AC29B7, 0xC97C50DD, 0x3F84D5B5, 0xB5470917,
|
|
21504
|
+
0x9216D5D9, 0x8979FB1B
|
|
21505
|
+
];
|
|
21506
|
+
|
|
21507
|
+
const ORIG_S = [
|
|
21508
|
+
[ 0xD1310BA6, 0x98DFB5AC, 0x2FFD72DB, 0xD01ADFB7,
|
|
21509
|
+
0xB8E1AFED, 0x6A267E96, 0xBA7C9045, 0xF12C7F99,
|
|
21510
|
+
0x24A19947, 0xB3916CF7, 0x0801F2E2, 0x858EFC16,
|
|
21511
|
+
0x636920D8, 0x71574E69, 0xA458FEA3, 0xF4933D7E,
|
|
21512
|
+
0x0D95748F, 0x728EB658, 0x718BCD58, 0x82154AEE,
|
|
21513
|
+
0x7B54A41D, 0xC25A59B5, 0x9C30D539, 0x2AF26013,
|
|
21514
|
+
0xC5D1B023, 0x286085F0, 0xCA417918, 0xB8DB38EF,
|
|
21515
|
+
0x8E79DCB0, 0x603A180E, 0x6C9E0E8B, 0xB01E8A3E,
|
|
21516
|
+
0xD71577C1, 0xBD314B27, 0x78AF2FDA, 0x55605C60,
|
|
21517
|
+
0xE65525F3, 0xAA55AB94, 0x57489862, 0x63E81440,
|
|
21518
|
+
0x55CA396A, 0x2AAB10B6, 0xB4CC5C34, 0x1141E8CE,
|
|
21519
|
+
0xA15486AF, 0x7C72E993, 0xB3EE1411, 0x636FBC2A,
|
|
21520
|
+
0x2BA9C55D, 0x741831F6, 0xCE5C3E16, 0x9B87931E,
|
|
21521
|
+
0xAFD6BA33, 0x6C24CF5C, 0x7A325381, 0x28958677,
|
|
21522
|
+
0x3B8F4898, 0x6B4BB9AF, 0xC4BFE81B, 0x66282193,
|
|
21523
|
+
0x61D809CC, 0xFB21A991, 0x487CAC60, 0x5DEC8032,
|
|
21524
|
+
0xEF845D5D, 0xE98575B1, 0xDC262302, 0xEB651B88,
|
|
21525
|
+
0x23893E81, 0xD396ACC5, 0x0F6D6FF3, 0x83F44239,
|
|
21526
|
+
0x2E0B4482, 0xA4842004, 0x69C8F04A, 0x9E1F9B5E,
|
|
21527
|
+
0x21C66842, 0xF6E96C9A, 0x670C9C61, 0xABD388F0,
|
|
21528
|
+
0x6A51A0D2, 0xD8542F68, 0x960FA728, 0xAB5133A3,
|
|
21529
|
+
0x6EEF0B6C, 0x137A3BE4, 0xBA3BF050, 0x7EFB2A98,
|
|
21530
|
+
0xA1F1651D, 0x39AF0176, 0x66CA593E, 0x82430E88,
|
|
21531
|
+
0x8CEE8619, 0x456F9FB4, 0x7D84A5C3, 0x3B8B5EBE,
|
|
21532
|
+
0xE06F75D8, 0x85C12073, 0x401A449F, 0x56C16AA6,
|
|
21533
|
+
0x4ED3AA62, 0x363F7706, 0x1BFEDF72, 0x429B023D,
|
|
21534
|
+
0x37D0D724, 0xD00A1248, 0xDB0FEAD3, 0x49F1C09B,
|
|
21535
|
+
0x075372C9, 0x80991B7B, 0x25D479D8, 0xF6E8DEF7,
|
|
21536
|
+
0xE3FE501A, 0xB6794C3B, 0x976CE0BD, 0x04C006BA,
|
|
21537
|
+
0xC1A94FB6, 0x409F60C4, 0x5E5C9EC2, 0x196A2463,
|
|
21538
|
+
0x68FB6FAF, 0x3E6C53B5, 0x1339B2EB, 0x3B52EC6F,
|
|
21539
|
+
0x6DFC511F, 0x9B30952C, 0xCC814544, 0xAF5EBD09,
|
|
21540
|
+
0xBEE3D004, 0xDE334AFD, 0x660F2807, 0x192E4BB3,
|
|
21541
|
+
0xC0CBA857, 0x45C8740F, 0xD20B5F39, 0xB9D3FBDB,
|
|
21542
|
+
0x5579C0BD, 0x1A60320A, 0xD6A100C6, 0x402C7279,
|
|
21543
|
+
0x679F25FE, 0xFB1FA3CC, 0x8EA5E9F8, 0xDB3222F8,
|
|
21544
|
+
0x3C7516DF, 0xFD616B15, 0x2F501EC8, 0xAD0552AB,
|
|
21545
|
+
0x323DB5FA, 0xFD238760, 0x53317B48, 0x3E00DF82,
|
|
21546
|
+
0x9E5C57BB, 0xCA6F8CA0, 0x1A87562E, 0xDF1769DB,
|
|
21547
|
+
0xD542A8F6, 0x287EFFC3, 0xAC6732C6, 0x8C4F5573,
|
|
21548
|
+
0x695B27B0, 0xBBCA58C8, 0xE1FFA35D, 0xB8F011A0,
|
|
21549
|
+
0x10FA3D98, 0xFD2183B8, 0x4AFCB56C, 0x2DD1D35B,
|
|
21550
|
+
0x9A53E479, 0xB6F84565, 0xD28E49BC, 0x4BFB9790,
|
|
21551
|
+
0xE1DDF2DA, 0xA4CB7E33, 0x62FB1341, 0xCEE4C6E8,
|
|
21552
|
+
0xEF20CADA, 0x36774C01, 0xD07E9EFE, 0x2BF11FB4,
|
|
21553
|
+
0x95DBDA4D, 0xAE909198, 0xEAAD8E71, 0x6B93D5A0,
|
|
21554
|
+
0xD08ED1D0, 0xAFC725E0, 0x8E3C5B2F, 0x8E7594B7,
|
|
21555
|
+
0x8FF6E2FB, 0xF2122B64, 0x8888B812, 0x900DF01C,
|
|
21556
|
+
0x4FAD5EA0, 0x688FC31C, 0xD1CFF191, 0xB3A8C1AD,
|
|
21557
|
+
0x2F2F2218, 0xBE0E1777, 0xEA752DFE, 0x8B021FA1,
|
|
21558
|
+
0xE5A0CC0F, 0xB56F74E8, 0x18ACF3D6, 0xCE89E299,
|
|
21559
|
+
0xB4A84FE0, 0xFD13E0B7, 0x7CC43B81, 0xD2ADA8D9,
|
|
21560
|
+
0x165FA266, 0x80957705, 0x93CC7314, 0x211A1477,
|
|
21561
|
+
0xE6AD2065, 0x77B5FA86, 0xC75442F5, 0xFB9D35CF,
|
|
21562
|
+
0xEBCDAF0C, 0x7B3E89A0, 0xD6411BD3, 0xAE1E7E49,
|
|
21563
|
+
0x00250E2D, 0x2071B35E, 0x226800BB, 0x57B8E0AF,
|
|
21564
|
+
0x2464369B, 0xF009B91E, 0x5563911D, 0x59DFA6AA,
|
|
21565
|
+
0x78C14389, 0xD95A537F, 0x207D5BA2, 0x02E5B9C5,
|
|
21566
|
+
0x83260376, 0x6295CFA9, 0x11C81968, 0x4E734A41,
|
|
21567
|
+
0xB3472DCA, 0x7B14A94A, 0x1B510052, 0x9A532915,
|
|
21568
|
+
0xD60F573F, 0xBC9BC6E4, 0x2B60A476, 0x81E67400,
|
|
21569
|
+
0x08BA6FB5, 0x571BE91F, 0xF296EC6B, 0x2A0DD915,
|
|
21570
|
+
0xB6636521, 0xE7B9F9B6, 0xFF34052E, 0xC5855664,
|
|
21571
|
+
0x53B02D5D, 0xA99F8FA1, 0x08BA4799, 0x6E85076A ],
|
|
21572
|
+
[ 0x4B7A70E9, 0xB5B32944, 0xDB75092E, 0xC4192623,
|
|
21573
|
+
0xAD6EA6B0, 0x49A7DF7D, 0x9CEE60B8, 0x8FEDB266,
|
|
21574
|
+
0xECAA8C71, 0x699A17FF, 0x5664526C, 0xC2B19EE1,
|
|
21575
|
+
0x193602A5, 0x75094C29, 0xA0591340, 0xE4183A3E,
|
|
21576
|
+
0x3F54989A, 0x5B429D65, 0x6B8FE4D6, 0x99F73FD6,
|
|
21577
|
+
0xA1D29C07, 0xEFE830F5, 0x4D2D38E6, 0xF0255DC1,
|
|
21578
|
+
0x4CDD2086, 0x8470EB26, 0x6382E9C6, 0x021ECC5E,
|
|
21579
|
+
0x09686B3F, 0x3EBAEFC9, 0x3C971814, 0x6B6A70A1,
|
|
21580
|
+
0x687F3584, 0x52A0E286, 0xB79C5305, 0xAA500737,
|
|
21581
|
+
0x3E07841C, 0x7FDEAE5C, 0x8E7D44EC, 0x5716F2B8,
|
|
21582
|
+
0xB03ADA37, 0xF0500C0D, 0xF01C1F04, 0x0200B3FF,
|
|
21583
|
+
0xAE0CF51A, 0x3CB574B2, 0x25837A58, 0xDC0921BD,
|
|
21584
|
+
0xD19113F9, 0x7CA92FF6, 0x94324773, 0x22F54701,
|
|
21585
|
+
0x3AE5E581, 0x37C2DADC, 0xC8B57634, 0x9AF3DDA7,
|
|
21586
|
+
0xA9446146, 0x0FD0030E, 0xECC8C73E, 0xA4751E41,
|
|
21587
|
+
0xE238CD99, 0x3BEA0E2F, 0x3280BBA1, 0x183EB331,
|
|
21588
|
+
0x4E548B38, 0x4F6DB908, 0x6F420D03, 0xF60A04BF,
|
|
21589
|
+
0x2CB81290, 0x24977C79, 0x5679B072, 0xBCAF89AF,
|
|
21590
|
+
0xDE9A771F, 0xD9930810, 0xB38BAE12, 0xDCCF3F2E,
|
|
21591
|
+
0x5512721F, 0x2E6B7124, 0x501ADDE6, 0x9F84CD87,
|
|
21592
|
+
0x7A584718, 0x7408DA17, 0xBC9F9ABC, 0xE94B7D8C,
|
|
21593
|
+
0xEC7AEC3A, 0xDB851DFA, 0x63094366, 0xC464C3D2,
|
|
21594
|
+
0xEF1C1847, 0x3215D908, 0xDD433B37, 0x24C2BA16,
|
|
21595
|
+
0x12A14D43, 0x2A65C451, 0x50940002, 0x133AE4DD,
|
|
21596
|
+
0x71DFF89E, 0x10314E55, 0x81AC77D6, 0x5F11199B,
|
|
21597
|
+
0x043556F1, 0xD7A3C76B, 0x3C11183B, 0x5924A509,
|
|
21598
|
+
0xF28FE6ED, 0x97F1FBFA, 0x9EBABF2C, 0x1E153C6E,
|
|
21599
|
+
0x86E34570, 0xEAE96FB1, 0x860E5E0A, 0x5A3E2AB3,
|
|
21600
|
+
0x771FE71C, 0x4E3D06FA, 0x2965DCB9, 0x99E71D0F,
|
|
21601
|
+
0x803E89D6, 0x5266C825, 0x2E4CC978, 0x9C10B36A,
|
|
21602
|
+
0xC6150EBA, 0x94E2EA78, 0xA5FC3C53, 0x1E0A2DF4,
|
|
21603
|
+
0xF2F74EA7, 0x361D2B3D, 0x1939260F, 0x19C27960,
|
|
21604
|
+
0x5223A708, 0xF71312B6, 0xEBADFE6E, 0xEAC31F66,
|
|
21605
|
+
0xE3BC4595, 0xA67BC883, 0xB17F37D1, 0x018CFF28,
|
|
21606
|
+
0xC332DDEF, 0xBE6C5AA5, 0x65582185, 0x68AB9802,
|
|
21607
|
+
0xEECEA50F, 0xDB2F953B, 0x2AEF7DAD, 0x5B6E2F84,
|
|
21608
|
+
0x1521B628, 0x29076170, 0xECDD4775, 0x619F1510,
|
|
21609
|
+
0x13CCA830, 0xEB61BD96, 0x0334FE1E, 0xAA0363CF,
|
|
21610
|
+
0xB5735C90, 0x4C70A239, 0xD59E9E0B, 0xCBAADE14,
|
|
21611
|
+
0xEECC86BC, 0x60622CA7, 0x9CAB5CAB, 0xB2F3846E,
|
|
21612
|
+
0x648B1EAF, 0x19BDF0CA, 0xA02369B9, 0x655ABB50,
|
|
21613
|
+
0x40685A32, 0x3C2AB4B3, 0x319EE9D5, 0xC021B8F7,
|
|
21614
|
+
0x9B540B19, 0x875FA099, 0x95F7997E, 0x623D7DA8,
|
|
21615
|
+
0xF837889A, 0x97E32D77, 0x11ED935F, 0x16681281,
|
|
21616
|
+
0x0E358829, 0xC7E61FD6, 0x96DEDFA1, 0x7858BA99,
|
|
21617
|
+
0x57F584A5, 0x1B227263, 0x9B83C3FF, 0x1AC24696,
|
|
21618
|
+
0xCDB30AEB, 0x532E3054, 0x8FD948E4, 0x6DBC3128,
|
|
21619
|
+
0x58EBF2EF, 0x34C6FFEA, 0xFE28ED61, 0xEE7C3C73,
|
|
21620
|
+
0x5D4A14D9, 0xE864B7E3, 0x42105D14, 0x203E13E0,
|
|
21621
|
+
0x45EEE2B6, 0xA3AAABEA, 0xDB6C4F15, 0xFACB4FD0,
|
|
21622
|
+
0xC742F442, 0xEF6ABBB5, 0x654F3B1D, 0x41CD2105,
|
|
21623
|
+
0xD81E799E, 0x86854DC7, 0xE44B476A, 0x3D816250,
|
|
21624
|
+
0xCF62A1F2, 0x5B8D2646, 0xFC8883A0, 0xC1C7B6A3,
|
|
21625
|
+
0x7F1524C3, 0x69CB7492, 0x47848A0B, 0x5692B285,
|
|
21626
|
+
0x095BBF00, 0xAD19489D, 0x1462B174, 0x23820E00,
|
|
21627
|
+
0x58428D2A, 0x0C55F5EA, 0x1DADF43E, 0x233F7061,
|
|
21628
|
+
0x3372F092, 0x8D937E41, 0xD65FECF1, 0x6C223BDB,
|
|
21629
|
+
0x7CDE3759, 0xCBEE7460, 0x4085F2A7, 0xCE77326E,
|
|
21630
|
+
0xA6078084, 0x19F8509E, 0xE8EFD855, 0x61D99735,
|
|
21631
|
+
0xA969A7AA, 0xC50C06C2, 0x5A04ABFC, 0x800BCADC,
|
|
21632
|
+
0x9E447A2E, 0xC3453484, 0xFDD56705, 0x0E1E9EC9,
|
|
21633
|
+
0xDB73DBD3, 0x105588CD, 0x675FDA79, 0xE3674340,
|
|
21634
|
+
0xC5C43465, 0x713E38D8, 0x3D28F89E, 0xF16DFF20,
|
|
21635
|
+
0x153E21E7, 0x8FB03D4A, 0xE6E39F2B, 0xDB83ADF7 ],
|
|
21636
|
+
[ 0xE93D5A68, 0x948140F7, 0xF64C261C, 0x94692934,
|
|
21637
|
+
0x411520F7, 0x7602D4F7, 0xBCF46B2E, 0xD4A20068,
|
|
21638
|
+
0xD4082471, 0x3320F46A, 0x43B7D4B7, 0x500061AF,
|
|
21639
|
+
0x1E39F62E, 0x97244546, 0x14214F74, 0xBF8B8840,
|
|
21640
|
+
0x4D95FC1D, 0x96B591AF, 0x70F4DDD3, 0x66A02F45,
|
|
21641
|
+
0xBFBC09EC, 0x03BD9785, 0x7FAC6DD0, 0x31CB8504,
|
|
21642
|
+
0x96EB27B3, 0x55FD3941, 0xDA2547E6, 0xABCA0A9A,
|
|
21643
|
+
0x28507825, 0x530429F4, 0x0A2C86DA, 0xE9B66DFB,
|
|
21644
|
+
0x68DC1462, 0xD7486900, 0x680EC0A4, 0x27A18DEE,
|
|
21645
|
+
0x4F3FFEA2, 0xE887AD8C, 0xB58CE006, 0x7AF4D6B6,
|
|
21646
|
+
0xAACE1E7C, 0xD3375FEC, 0xCE78A399, 0x406B2A42,
|
|
21647
|
+
0x20FE9E35, 0xD9F385B9, 0xEE39D7AB, 0x3B124E8B,
|
|
21648
|
+
0x1DC9FAF7, 0x4B6D1856, 0x26A36631, 0xEAE397B2,
|
|
21649
|
+
0x3A6EFA74, 0xDD5B4332, 0x6841E7F7, 0xCA7820FB,
|
|
21650
|
+
0xFB0AF54E, 0xD8FEB397, 0x454056AC, 0xBA489527,
|
|
21651
|
+
0x55533A3A, 0x20838D87, 0xFE6BA9B7, 0xD096954B,
|
|
21652
|
+
0x55A867BC, 0xA1159A58, 0xCCA92963, 0x99E1DB33,
|
|
21653
|
+
0xA62A4A56, 0x3F3125F9, 0x5EF47E1C, 0x9029317C,
|
|
21654
|
+
0xFDF8E802, 0x04272F70, 0x80BB155C, 0x05282CE3,
|
|
21655
|
+
0x95C11548, 0xE4C66D22, 0x48C1133F, 0xC70F86DC,
|
|
21656
|
+
0x07F9C9EE, 0x41041F0F, 0x404779A4, 0x5D886E17,
|
|
21657
|
+
0x325F51EB, 0xD59BC0D1, 0xF2BCC18F, 0x41113564,
|
|
21658
|
+
0x257B7834, 0x602A9C60, 0xDFF8E8A3, 0x1F636C1B,
|
|
21659
|
+
0x0E12B4C2, 0x02E1329E, 0xAF664FD1, 0xCAD18115,
|
|
21660
|
+
0x6B2395E0, 0x333E92E1, 0x3B240B62, 0xEEBEB922,
|
|
21661
|
+
0x85B2A20E, 0xE6BA0D99, 0xDE720C8C, 0x2DA2F728,
|
|
21662
|
+
0xD0127845, 0x95B794FD, 0x647D0862, 0xE7CCF5F0,
|
|
21663
|
+
0x5449A36F, 0x877D48FA, 0xC39DFD27, 0xF33E8D1E,
|
|
21664
|
+
0x0A476341, 0x992EFF74, 0x3A6F6EAB, 0xF4F8FD37,
|
|
21665
|
+
0xA812DC60, 0xA1EBDDF8, 0x991BE14C, 0xDB6E6B0D,
|
|
21666
|
+
0xC67B5510, 0x6D672C37, 0x2765D43B, 0xDCD0E804,
|
|
21667
|
+
0xF1290DC7, 0xCC00FFA3, 0xB5390F92, 0x690FED0B,
|
|
21668
|
+
0x667B9FFB, 0xCEDB7D9C, 0xA091CF0B, 0xD9155EA3,
|
|
21669
|
+
0xBB132F88, 0x515BAD24, 0x7B9479BF, 0x763BD6EB,
|
|
21670
|
+
0x37392EB3, 0xCC115979, 0x8026E297, 0xF42E312D,
|
|
21671
|
+
0x6842ADA7, 0xC66A2B3B, 0x12754CCC, 0x782EF11C,
|
|
21672
|
+
0x6A124237, 0xB79251E7, 0x06A1BBE6, 0x4BFB6350,
|
|
21673
|
+
0x1A6B1018, 0x11CAEDFA, 0x3D25BDD8, 0xE2E1C3C9,
|
|
21674
|
+
0x44421659, 0x0A121386, 0xD90CEC6E, 0xD5ABEA2A,
|
|
21675
|
+
0x64AF674E, 0xDA86A85F, 0xBEBFE988, 0x64E4C3FE,
|
|
21676
|
+
0x9DBC8057, 0xF0F7C086, 0x60787BF8, 0x6003604D,
|
|
21677
|
+
0xD1FD8346, 0xF6381FB0, 0x7745AE04, 0xD736FCCC,
|
|
21678
|
+
0x83426B33, 0xF01EAB71, 0xB0804187, 0x3C005E5F,
|
|
21679
|
+
0x77A057BE, 0xBDE8AE24, 0x55464299, 0xBF582E61,
|
|
21680
|
+
0x4E58F48F, 0xF2DDFDA2, 0xF474EF38, 0x8789BDC2,
|
|
21681
|
+
0x5366F9C3, 0xC8B38E74, 0xB475F255, 0x46FCD9B9,
|
|
21682
|
+
0x7AEB2661, 0x8B1DDF84, 0x846A0E79, 0x915F95E2,
|
|
21683
|
+
0x466E598E, 0x20B45770, 0x8CD55591, 0xC902DE4C,
|
|
21684
|
+
0xB90BACE1, 0xBB8205D0, 0x11A86248, 0x7574A99E,
|
|
21685
|
+
0xB77F19B6, 0xE0A9DC09, 0x662D09A1, 0xC4324633,
|
|
21686
|
+
0xE85A1F02, 0x09F0BE8C, 0x4A99A025, 0x1D6EFE10,
|
|
21687
|
+
0x1AB93D1D, 0x0BA5A4DF, 0xA186F20F, 0x2868F169,
|
|
21688
|
+
0xDCB7DA83, 0x573906FE, 0xA1E2CE9B, 0x4FCD7F52,
|
|
21689
|
+
0x50115E01, 0xA70683FA, 0xA002B5C4, 0x0DE6D027,
|
|
21690
|
+
0x9AF88C27, 0x773F8641, 0xC3604C06, 0x61A806B5,
|
|
21691
|
+
0xF0177A28, 0xC0F586E0, 0x006058AA, 0x30DC7D62,
|
|
21692
|
+
0x11E69ED7, 0x2338EA63, 0x53C2DD94, 0xC2C21634,
|
|
21693
|
+
0xBBCBEE56, 0x90BCB6DE, 0xEBFC7DA1, 0xCE591D76,
|
|
21694
|
+
0x6F05E409, 0x4B7C0188, 0x39720A3D, 0x7C927C24,
|
|
21695
|
+
0x86E3725F, 0x724D9DB9, 0x1AC15BB4, 0xD39EB8FC,
|
|
21696
|
+
0xED545578, 0x08FCA5B5, 0xD83D7CD3, 0x4DAD0FC4,
|
|
21697
|
+
0x1E50EF5E, 0xB161E6F8, 0xA28514D9, 0x6C51133C,
|
|
21698
|
+
0x6FD5C7E7, 0x56E14EC4, 0x362ABFCE, 0xDDC6C837,
|
|
21699
|
+
0xD79A3234, 0x92638212, 0x670EFA8E, 0x406000E0 ],
|
|
21700
|
+
[ 0x3A39CE37, 0xD3FAF5CF, 0xABC27737, 0x5AC52D1B,
|
|
21701
|
+
0x5CB0679E, 0x4FA33742, 0xD3822740, 0x99BC9BBE,
|
|
21702
|
+
0xD5118E9D, 0xBF0F7315, 0xD62D1C7E, 0xC700C47B,
|
|
21703
|
+
0xB78C1B6B, 0x21A19045, 0xB26EB1BE, 0x6A366EB4,
|
|
21704
|
+
0x5748AB2F, 0xBC946E79, 0xC6A376D2, 0x6549C2C8,
|
|
21705
|
+
0x530FF8EE, 0x468DDE7D, 0xD5730A1D, 0x4CD04DC6,
|
|
21706
|
+
0x2939BBDB, 0xA9BA4650, 0xAC9526E8, 0xBE5EE304,
|
|
21707
|
+
0xA1FAD5F0, 0x6A2D519A, 0x63EF8CE2, 0x9A86EE22,
|
|
21708
|
+
0xC089C2B8, 0x43242EF6, 0xA51E03AA, 0x9CF2D0A4,
|
|
21709
|
+
0x83C061BA, 0x9BE96A4D, 0x8FE51550, 0xBA645BD6,
|
|
21710
|
+
0x2826A2F9, 0xA73A3AE1, 0x4BA99586, 0xEF5562E9,
|
|
21711
|
+
0xC72FEFD3, 0xF752F7DA, 0x3F046F69, 0x77FA0A59,
|
|
21712
|
+
0x80E4A915, 0x87B08601, 0x9B09E6AD, 0x3B3EE593,
|
|
21713
|
+
0xE990FD5A, 0x9E34D797, 0x2CF0B7D9, 0x022B8B51,
|
|
21714
|
+
0x96D5AC3A, 0x017DA67D, 0xD1CF3ED6, 0x7C7D2D28,
|
|
21715
|
+
0x1F9F25CF, 0xADF2B89B, 0x5AD6B472, 0x5A88F54C,
|
|
21716
|
+
0xE029AC71, 0xE019A5E6, 0x47B0ACFD, 0xED93FA9B,
|
|
21717
|
+
0xE8D3C48D, 0x283B57CC, 0xF8D56629, 0x79132E28,
|
|
21718
|
+
0x785F0191, 0xED756055, 0xF7960E44, 0xE3D35E8C,
|
|
21719
|
+
0x15056DD4, 0x88F46DBA, 0x03A16125, 0x0564F0BD,
|
|
21720
|
+
0xC3EB9E15, 0x3C9057A2, 0x97271AEC, 0xA93A072A,
|
|
21721
|
+
0x1B3F6D9B, 0x1E6321F5, 0xF59C66FB, 0x26DCF319,
|
|
21722
|
+
0x7533D928, 0xB155FDF5, 0x03563482, 0x8ABA3CBB,
|
|
21723
|
+
0x28517711, 0xC20AD9F8, 0xABCC5167, 0xCCAD925F,
|
|
21724
|
+
0x4DE81751, 0x3830DC8E, 0x379D5862, 0x9320F991,
|
|
21725
|
+
0xEA7A90C2, 0xFB3E7BCE, 0x5121CE64, 0x774FBE32,
|
|
21726
|
+
0xA8B6E37E, 0xC3293D46, 0x48DE5369, 0x6413E680,
|
|
21727
|
+
0xA2AE0810, 0xDD6DB224, 0x69852DFD, 0x09072166,
|
|
21728
|
+
0xB39A460A, 0x6445C0DD, 0x586CDECF, 0x1C20C8AE,
|
|
21729
|
+
0x5BBEF7DD, 0x1B588D40, 0xCCD2017F, 0x6BB4E3BB,
|
|
21730
|
+
0xDDA26A7E, 0x3A59FF45, 0x3E350A44, 0xBCB4CDD5,
|
|
21731
|
+
0x72EACEA8, 0xFA6484BB, 0x8D6612AE, 0xBF3C6F47,
|
|
21732
|
+
0xD29BE463, 0x542F5D9E, 0xAEC2771B, 0xF64E6370,
|
|
21733
|
+
0x740E0D8D, 0xE75B1357, 0xF8721671, 0xAF537D5D,
|
|
21734
|
+
0x4040CB08, 0x4EB4E2CC, 0x34D2466A, 0x0115AF84,
|
|
21735
|
+
0xE1B00428, 0x95983A1D, 0x06B89FB4, 0xCE6EA048,
|
|
21736
|
+
0x6F3F3B82, 0x3520AB82, 0x011A1D4B, 0x277227F8,
|
|
21737
|
+
0x611560B1, 0xE7933FDC, 0xBB3A792B, 0x344525BD,
|
|
21738
|
+
0xA08839E1, 0x51CE794B, 0x2F32C9B7, 0xA01FBAC9,
|
|
21739
|
+
0xE01CC87E, 0xBCC7D1F6, 0xCF0111C3, 0xA1E8AAC7,
|
|
21740
|
+
0x1A908749, 0xD44FBD9A, 0xD0DADECB, 0xD50ADA38,
|
|
21741
|
+
0x0339C32A, 0xC6913667, 0x8DF9317C, 0xE0B12B4F,
|
|
21742
|
+
0xF79E59B7, 0x43F5BB3A, 0xF2D519FF, 0x27D9459C,
|
|
21743
|
+
0xBF97222C, 0x15E6FC2A, 0x0F91FC71, 0x9B941525,
|
|
21744
|
+
0xFAE59361, 0xCEB69CEB, 0xC2A86459, 0x12BAA8D1,
|
|
21745
|
+
0xB6C1075E, 0xE3056A0C, 0x10D25065, 0xCB03A442,
|
|
21746
|
+
0xE0EC6E0E, 0x1698DB3B, 0x4C98A0BE, 0x3278E964,
|
|
21747
|
+
0x9F1F9532, 0xE0D392DF, 0xD3A0342B, 0x8971F21E,
|
|
21748
|
+
0x1B0A7441, 0x4BA3348C, 0xC5BE7120, 0xC37632D8,
|
|
21749
|
+
0xDF359F8D, 0x9B992F2E, 0xE60B6F47, 0x0FE3F11D,
|
|
21750
|
+
0xE54CDA54, 0x1EDAD891, 0xCE6279CF, 0xCD3E7E6F,
|
|
21751
|
+
0x1618B166, 0xFD2C1D05, 0x848FD2C5, 0xF6FB2299,
|
|
21752
|
+
0xF523F357, 0xA6327623, 0x93A83531, 0x56CCCD02,
|
|
21753
|
+
0xACF08162, 0x5A75EBB5, 0x6E163697, 0x88D273CC,
|
|
21754
|
+
0xDE966292, 0x81B949D0, 0x4C50901B, 0x71C65614,
|
|
21755
|
+
0xE6C6C7BD, 0x327A140A, 0x45E1D006, 0xC3F27B9A,
|
|
21756
|
+
0xC9AA53FD, 0x62A80F00, 0xBB25BFE2, 0x35BDD2F6,
|
|
21757
|
+
0x71126905, 0xB2040222, 0xB6CBCF7C, 0xCD769C2B,
|
|
21758
|
+
0x53113EC0, 0x1640E3D3, 0x38ABBD60, 0x2547ADF0,
|
|
21759
|
+
0xBA38209C, 0xF746CE76, 0x77AFA1C5, 0x20756060,
|
|
21760
|
+
0x85CBFE4E, 0x8AE88DD8, 0x7AAAF9B0, 0x4CF9AA7E,
|
|
21761
|
+
0x1948C25C, 0x02FB8A8C, 0x01C36AE4, 0xD6EBE1F9,
|
|
21762
|
+
0x90D4F869, 0xA65CDEA0, 0x3F09252D, 0xC208E69F,
|
|
21763
|
+
0xB74E6132, 0xCE77E25B, 0x578FDFE3, 0x3AC372E6 ]
|
|
21764
|
+
];
|
|
21765
|
+
|
|
21766
|
+
var BLOWFISH_CTX = {
|
|
21767
|
+
pbox: [],
|
|
21768
|
+
sbox: []
|
|
21769
|
+
}
|
|
21770
|
+
|
|
21771
|
+
function F(ctx, x){
|
|
21772
|
+
let a = (x >> 24) & 0xFF;
|
|
21773
|
+
let b = (x >> 16) & 0xFF;
|
|
21774
|
+
let c = (x >> 8) & 0xFF;
|
|
21775
|
+
let d = x & 0xFF;
|
|
21776
|
+
|
|
21777
|
+
let y = ctx.sbox[0][a] + ctx.sbox[1][b];
|
|
21778
|
+
y = y ^ ctx.sbox[2][c];
|
|
21779
|
+
y = y + ctx.sbox[3][d];
|
|
21780
|
+
|
|
21781
|
+
return y;
|
|
21782
|
+
}
|
|
21783
|
+
|
|
21784
|
+
function BlowFish_Encrypt(ctx, left, right){
|
|
21785
|
+
let Xl = left;
|
|
21786
|
+
let Xr = right;
|
|
21787
|
+
let temp;
|
|
21788
|
+
|
|
21789
|
+
for(let i = 0; i < N; ++i){
|
|
21790
|
+
Xl = Xl ^ ctx.pbox[i];
|
|
21791
|
+
Xr = F(ctx, Xl) ^ Xr;
|
|
21792
|
+
|
|
21793
|
+
temp = Xl;
|
|
21794
|
+
Xl = Xr;
|
|
21795
|
+
Xr = temp;
|
|
21796
|
+
}
|
|
21797
|
+
|
|
21798
|
+
temp = Xl;
|
|
21799
|
+
Xl = Xr;
|
|
21800
|
+
Xr = temp;
|
|
21801
|
+
|
|
21802
|
+
Xr = Xr ^ ctx.pbox[N];
|
|
21803
|
+
Xl = Xl ^ ctx.pbox[N + 1];
|
|
21804
|
+
|
|
21805
|
+
return {left: Xl, right: Xr};
|
|
21806
|
+
}
|
|
21807
|
+
|
|
21808
|
+
function BlowFish_Decrypt(ctx, left, right){
|
|
21809
|
+
let Xl = left;
|
|
21810
|
+
let Xr = right;
|
|
21811
|
+
let temp;
|
|
21812
|
+
|
|
21813
|
+
for(let i = N + 1; i > 1; --i){
|
|
21814
|
+
Xl = Xl ^ ctx.pbox[i];
|
|
21815
|
+
Xr = F(ctx, Xl) ^ Xr;
|
|
21816
|
+
|
|
21817
|
+
temp = Xl;
|
|
21818
|
+
Xl = Xr;
|
|
21819
|
+
Xr = temp;
|
|
21820
|
+
}
|
|
21821
|
+
|
|
21822
|
+
temp = Xl;
|
|
21823
|
+
Xl = Xr;
|
|
21824
|
+
Xr = temp;
|
|
21825
|
+
|
|
21826
|
+
Xr = Xr ^ ctx.pbox[1];
|
|
21827
|
+
Xl = Xl ^ ctx.pbox[0];
|
|
21828
|
+
|
|
21829
|
+
return {left: Xl, right: Xr};
|
|
21830
|
+
}
|
|
21831
|
+
|
|
21832
|
+
/**
|
|
21833
|
+
* Initialization ctx's pbox and sbox.
|
|
21834
|
+
*
|
|
21835
|
+
* @param {Object} ctx The object has pbox and sbox.
|
|
21836
|
+
* @param {Array} key An array of 32-bit words.
|
|
21837
|
+
* @param {int} keysize The length of the key.
|
|
21838
|
+
*
|
|
21839
|
+
* @example
|
|
21840
|
+
*
|
|
21841
|
+
* BlowFishInit(BLOWFISH_CTX, key, 128/32);
|
|
21842
|
+
*/
|
|
21843
|
+
function BlowFishInit(ctx, key, keysize)
|
|
21844
|
+
{
|
|
21845
|
+
for(let Row = 0; Row < 4; Row++)
|
|
21846
|
+
{
|
|
21847
|
+
ctx.sbox[Row] = [];
|
|
21848
|
+
for(let Col = 0; Col < 256; Col++)
|
|
21849
|
+
{
|
|
21850
|
+
ctx.sbox[Row][Col] = ORIG_S[Row][Col];
|
|
21851
|
+
}
|
|
21852
|
+
}
|
|
21853
|
+
|
|
21854
|
+
let keyIndex = 0;
|
|
21855
|
+
for(let index = 0; index < N + 2; index++)
|
|
21856
|
+
{
|
|
21857
|
+
ctx.pbox[index] = ORIG_P[index] ^ key[keyIndex];
|
|
21858
|
+
keyIndex++;
|
|
21859
|
+
if(keyIndex >= keysize)
|
|
21860
|
+
{
|
|
21861
|
+
keyIndex = 0;
|
|
21862
|
+
}
|
|
21863
|
+
}
|
|
21864
|
+
|
|
21865
|
+
let Data1 = 0;
|
|
21866
|
+
let Data2 = 0;
|
|
21867
|
+
let res = 0;
|
|
21868
|
+
for(let i = 0; i < N + 2; i += 2)
|
|
21869
|
+
{
|
|
21870
|
+
res = BlowFish_Encrypt(ctx, Data1, Data2);
|
|
21871
|
+
Data1 = res.left;
|
|
21872
|
+
Data2 = res.right;
|
|
21873
|
+
ctx.pbox[i] = Data1;
|
|
21874
|
+
ctx.pbox[i + 1] = Data2;
|
|
21875
|
+
}
|
|
21876
|
+
|
|
21877
|
+
for(let i = 0; i < 4; i++)
|
|
21878
|
+
{
|
|
21879
|
+
for(let j = 0; j < 256; j += 2)
|
|
21880
|
+
{
|
|
21881
|
+
res = BlowFish_Encrypt(ctx, Data1, Data2);
|
|
21882
|
+
Data1 = res.left;
|
|
21883
|
+
Data2 = res.right;
|
|
21884
|
+
ctx.sbox[i][j] = Data1;
|
|
21885
|
+
ctx.sbox[i][j + 1] = Data2;
|
|
21886
|
+
}
|
|
21887
|
+
}
|
|
21888
|
+
|
|
21889
|
+
return true;
|
|
21890
|
+
}
|
|
21891
|
+
|
|
21892
|
+
/**
|
|
21893
|
+
* Blowfish block cipher algorithm.
|
|
21894
|
+
*/
|
|
21895
|
+
var Blowfish = C_algo.Blowfish = BlockCipher.extend({
|
|
21896
|
+
_doReset: function () {
|
|
21897
|
+
// Skip reset of nRounds has been set before and key did not change
|
|
21898
|
+
if (this._keyPriorReset === this._key) {
|
|
21899
|
+
return;
|
|
21900
|
+
}
|
|
21901
|
+
|
|
21902
|
+
// Shortcuts
|
|
21903
|
+
var key = this._keyPriorReset = this._key;
|
|
21904
|
+
var keyWords = key.words;
|
|
21905
|
+
var keySize = key.sigBytes / 4;
|
|
21906
|
+
|
|
21907
|
+
//Initialization pbox and sbox
|
|
21908
|
+
BlowFishInit(BLOWFISH_CTX, keyWords, keySize);
|
|
21909
|
+
},
|
|
21910
|
+
|
|
21911
|
+
encryptBlock: function (M, offset) {
|
|
21912
|
+
var res = BlowFish_Encrypt(BLOWFISH_CTX, M[offset], M[offset + 1]);
|
|
21913
|
+
M[offset] = res.left;
|
|
21914
|
+
M[offset + 1] = res.right;
|
|
21915
|
+
},
|
|
21916
|
+
|
|
21917
|
+
decryptBlock: function (M, offset) {
|
|
21918
|
+
var res = BlowFish_Decrypt(BLOWFISH_CTX, M[offset], M[offset + 1]);
|
|
21919
|
+
M[offset] = res.left;
|
|
21920
|
+
M[offset + 1] = res.right;
|
|
21921
|
+
},
|
|
21922
|
+
|
|
21923
|
+
blockSize: 64/32,
|
|
21924
|
+
|
|
21925
|
+
keySize: 128/32,
|
|
21926
|
+
|
|
21927
|
+
ivSize: 64/32
|
|
21928
|
+
});
|
|
21929
|
+
|
|
21930
|
+
/**
|
|
21931
|
+
* Shortcut functions to the cipher's object interface.
|
|
21932
|
+
*
|
|
21933
|
+
* @example
|
|
21934
|
+
*
|
|
21935
|
+
* var ciphertext = CryptoJS.Blowfish.encrypt(message, key, cfg);
|
|
21936
|
+
* var plaintext = CryptoJS.Blowfish.decrypt(ciphertext, key, cfg);
|
|
21937
|
+
*/
|
|
21938
|
+
C.Blowfish = BlockCipher._createHelper(Blowfish);
|
|
21939
|
+
}());
|
|
21940
|
+
|
|
21941
|
+
|
|
21942
|
+
return CryptoJS.Blowfish;
|
|
21943
|
+
|
|
21944
|
+
}));
|
|
21945
|
+
},{"./cipher-core":193,"./core":194,"./enc-base64":195,"./evpkdf":198,"./md5":203}],193:[function(require,module,exports){
|
|
21126
21946
|
;(function (root, factory, undef) {
|
|
21127
21947
|
if (typeof exports === "object") {
|
|
21128
21948
|
// CommonJS
|
|
@@ -21905,14 +22725,19 @@ function objectToString(o) {
|
|
|
21905
22725
|
* var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);
|
|
21906
22726
|
* var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');
|
|
21907
22727
|
*/
|
|
21908
|
-
execute: function (password, keySize, ivSize, salt) {
|
|
22728
|
+
execute: function (password, keySize, ivSize, salt, hasher) {
|
|
21909
22729
|
// Generate random salt
|
|
21910
22730
|
if (!salt) {
|
|
21911
22731
|
salt = WordArray.random(64/8);
|
|
21912
22732
|
}
|
|
21913
22733
|
|
|
21914
22734
|
// Derive key and IV
|
|
21915
|
-
|
|
22735
|
+
if (!hasher) {
|
|
22736
|
+
var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt);
|
|
22737
|
+
} else {
|
|
22738
|
+
var key = EvpKDF.create({ keySize: keySize + ivSize, hasher: hasher }).compute(password, salt);
|
|
22739
|
+
}
|
|
22740
|
+
|
|
21916
22741
|
|
|
21917
22742
|
// Separate key and IV
|
|
21918
22743
|
var iv = WordArray.create(key.words.slice(keySize), ivSize * 4);
|
|
@@ -21959,7 +22784,7 @@ function objectToString(o) {
|
|
|
21959
22784
|
cfg = this.cfg.extend(cfg);
|
|
21960
22785
|
|
|
21961
22786
|
// Derive key and other params
|
|
21962
|
-
var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize);
|
|
22787
|
+
var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, cfg.salt, cfg.hasher);
|
|
21963
22788
|
|
|
21964
22789
|
// Add IV to config
|
|
21965
22790
|
cfg.iv = derivedParams.iv;
|
|
@@ -21998,7 +22823,7 @@ function objectToString(o) {
|
|
|
21998
22823
|
ciphertext = this._parse(ciphertext, cfg.format);
|
|
21999
22824
|
|
|
22000
22825
|
// Derive key and other params
|
|
22001
|
-
var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt);
|
|
22826
|
+
var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt, cfg.hasher);
|
|
22002
22827
|
|
|
22003
22828
|
// Add IV to config
|
|
22004
22829
|
cfg.iv = derivedParams.iv;
|
|
@@ -22013,7 +22838,7 @@ function objectToString(o) {
|
|
|
22013
22838
|
|
|
22014
22839
|
|
|
22015
22840
|
}));
|
|
22016
|
-
},{"./core":
|
|
22841
|
+
},{"./core":194,"./evpkdf":198}],194:[function(require,module,exports){
|
|
22017
22842
|
(function (global){
|
|
22018
22843
|
;(function (root, factory) {
|
|
22019
22844
|
if (typeof exports === "object") {
|
|
@@ -22044,6 +22869,16 @@ function objectToString(o) {
|
|
|
22044
22869
|
crypto = window.crypto;
|
|
22045
22870
|
}
|
|
22046
22871
|
|
|
22872
|
+
// Native crypto in web worker (Browser)
|
|
22873
|
+
if (typeof self !== 'undefined' && self.crypto) {
|
|
22874
|
+
crypto = self.crypto;
|
|
22875
|
+
}
|
|
22876
|
+
|
|
22877
|
+
// Native crypto from worker
|
|
22878
|
+
if (typeof globalThis !== 'undefined' && globalThis.crypto) {
|
|
22879
|
+
crypto = globalThis.crypto;
|
|
22880
|
+
}
|
|
22881
|
+
|
|
22047
22882
|
// Native (experimental IE 11) crypto from window (Browser)
|
|
22048
22883
|
if (!crypto && typeof window !== 'undefined' && window.msCrypto) {
|
|
22049
22884
|
crypto = window.msCrypto;
|
|
@@ -22104,7 +22939,7 @@ function objectToString(o) {
|
|
|
22104
22939
|
|
|
22105
22940
|
return subtype;
|
|
22106
22941
|
};
|
|
22107
|
-
}())
|
|
22942
|
+
}());
|
|
22108
22943
|
|
|
22109
22944
|
/**
|
|
22110
22945
|
* CryptoJS namespace.
|
|
@@ -22315,8 +23150,8 @@ function objectToString(o) {
|
|
|
22315
23150
|
}
|
|
22316
23151
|
} else {
|
|
22317
23152
|
// Copy one word at a time
|
|
22318
|
-
for (var
|
|
22319
|
-
thisWords[(thisSigBytes +
|
|
23153
|
+
for (var j = 0; j < thatSigBytes; j += 4) {
|
|
23154
|
+
thisWords[(thisSigBytes + j) >>> 2] = thatWords[j >>> 2];
|
|
22320
23155
|
}
|
|
22321
23156
|
}
|
|
22322
23157
|
this.sigBytes += thatSigBytes;
|
|
@@ -22813,7 +23648,7 @@ function objectToString(o) {
|
|
|
22813
23648
|
|
|
22814
23649
|
}));
|
|
22815
23650
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
22816
|
-
},{"crypto":54}],
|
|
23651
|
+
},{"crypto":54}],195:[function(require,module,exports){
|
|
22817
23652
|
;(function (root, factory) {
|
|
22818
23653
|
if (typeof exports === "object") {
|
|
22819
23654
|
// CommonJS
|
|
@@ -22950,7 +23785,156 @@ function objectToString(o) {
|
|
|
22950
23785
|
return CryptoJS.enc.Base64;
|
|
22951
23786
|
|
|
22952
23787
|
}));
|
|
22953
|
-
},{"./core":
|
|
23788
|
+
},{"./core":194}],196:[function(require,module,exports){
|
|
23789
|
+
;(function (root, factory) {
|
|
23790
|
+
if (typeof exports === "object") {
|
|
23791
|
+
// CommonJS
|
|
23792
|
+
module.exports = exports = factory(require("./core"));
|
|
23793
|
+
}
|
|
23794
|
+
else if (typeof define === "function" && define.amd) {
|
|
23795
|
+
// AMD
|
|
23796
|
+
define(["./core"], factory);
|
|
23797
|
+
}
|
|
23798
|
+
else {
|
|
23799
|
+
// Global (browser)
|
|
23800
|
+
factory(root.CryptoJS);
|
|
23801
|
+
}
|
|
23802
|
+
}(this, function (CryptoJS) {
|
|
23803
|
+
|
|
23804
|
+
(function () {
|
|
23805
|
+
// Shortcuts
|
|
23806
|
+
var C = CryptoJS;
|
|
23807
|
+
var C_lib = C.lib;
|
|
23808
|
+
var WordArray = C_lib.WordArray;
|
|
23809
|
+
var C_enc = C.enc;
|
|
23810
|
+
|
|
23811
|
+
/**
|
|
23812
|
+
* Base64url encoding strategy.
|
|
23813
|
+
*/
|
|
23814
|
+
var Base64url = C_enc.Base64url = {
|
|
23815
|
+
/**
|
|
23816
|
+
* Converts a word array to a Base64url string.
|
|
23817
|
+
*
|
|
23818
|
+
* @param {WordArray} wordArray The word array.
|
|
23819
|
+
*
|
|
23820
|
+
* @param {boolean} urlSafe Whether to use url safe
|
|
23821
|
+
*
|
|
23822
|
+
* @return {string} The Base64url string.
|
|
23823
|
+
*
|
|
23824
|
+
* @static
|
|
23825
|
+
*
|
|
23826
|
+
* @example
|
|
23827
|
+
*
|
|
23828
|
+
* var base64String = CryptoJS.enc.Base64url.stringify(wordArray);
|
|
23829
|
+
*/
|
|
23830
|
+
stringify: function (wordArray, urlSafe) {
|
|
23831
|
+
if (urlSafe === undefined) {
|
|
23832
|
+
urlSafe = true
|
|
23833
|
+
}
|
|
23834
|
+
// Shortcuts
|
|
23835
|
+
var words = wordArray.words;
|
|
23836
|
+
var sigBytes = wordArray.sigBytes;
|
|
23837
|
+
var map = urlSafe ? this._safe_map : this._map;
|
|
23838
|
+
|
|
23839
|
+
// Clamp excess bits
|
|
23840
|
+
wordArray.clamp();
|
|
23841
|
+
|
|
23842
|
+
// Convert
|
|
23843
|
+
var base64Chars = [];
|
|
23844
|
+
for (var i = 0; i < sigBytes; i += 3) {
|
|
23845
|
+
var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;
|
|
23846
|
+
var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff;
|
|
23847
|
+
var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff;
|
|
23848
|
+
|
|
23849
|
+
var triplet = (byte1 << 16) | (byte2 << 8) | byte3;
|
|
23850
|
+
|
|
23851
|
+
for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) {
|
|
23852
|
+
base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f));
|
|
23853
|
+
}
|
|
23854
|
+
}
|
|
23855
|
+
|
|
23856
|
+
// Add padding
|
|
23857
|
+
var paddingChar = map.charAt(64);
|
|
23858
|
+
if (paddingChar) {
|
|
23859
|
+
while (base64Chars.length % 4) {
|
|
23860
|
+
base64Chars.push(paddingChar);
|
|
23861
|
+
}
|
|
23862
|
+
}
|
|
23863
|
+
|
|
23864
|
+
return base64Chars.join('');
|
|
23865
|
+
},
|
|
23866
|
+
|
|
23867
|
+
/**
|
|
23868
|
+
* Converts a Base64url string to a word array.
|
|
23869
|
+
*
|
|
23870
|
+
* @param {string} base64Str The Base64url string.
|
|
23871
|
+
*
|
|
23872
|
+
* @param {boolean} urlSafe Whether to use url safe
|
|
23873
|
+
*
|
|
23874
|
+
* @return {WordArray} The word array.
|
|
23875
|
+
*
|
|
23876
|
+
* @static
|
|
23877
|
+
*
|
|
23878
|
+
* @example
|
|
23879
|
+
*
|
|
23880
|
+
* var wordArray = CryptoJS.enc.Base64url.parse(base64String);
|
|
23881
|
+
*/
|
|
23882
|
+
parse: function (base64Str, urlSafe) {
|
|
23883
|
+
if (urlSafe === undefined) {
|
|
23884
|
+
urlSafe = true
|
|
23885
|
+
}
|
|
23886
|
+
|
|
23887
|
+
// Shortcuts
|
|
23888
|
+
var base64StrLength = base64Str.length;
|
|
23889
|
+
var map = urlSafe ? this._safe_map : this._map;
|
|
23890
|
+
var reverseMap = this._reverseMap;
|
|
23891
|
+
|
|
23892
|
+
if (!reverseMap) {
|
|
23893
|
+
reverseMap = this._reverseMap = [];
|
|
23894
|
+
for (var j = 0; j < map.length; j++) {
|
|
23895
|
+
reverseMap[map.charCodeAt(j)] = j;
|
|
23896
|
+
}
|
|
23897
|
+
}
|
|
23898
|
+
|
|
23899
|
+
// Ignore padding
|
|
23900
|
+
var paddingChar = map.charAt(64);
|
|
23901
|
+
if (paddingChar) {
|
|
23902
|
+
var paddingIndex = base64Str.indexOf(paddingChar);
|
|
23903
|
+
if (paddingIndex !== -1) {
|
|
23904
|
+
base64StrLength = paddingIndex;
|
|
23905
|
+
}
|
|
23906
|
+
}
|
|
23907
|
+
|
|
23908
|
+
// Convert
|
|
23909
|
+
return parseLoop(base64Str, base64StrLength, reverseMap);
|
|
23910
|
+
|
|
23911
|
+
},
|
|
23912
|
+
|
|
23913
|
+
_map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=',
|
|
23914
|
+
_safe_map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_',
|
|
23915
|
+
};
|
|
23916
|
+
|
|
23917
|
+
function parseLoop(base64Str, base64StrLength, reverseMap) {
|
|
23918
|
+
var words = [];
|
|
23919
|
+
var nBytes = 0;
|
|
23920
|
+
for (var i = 0; i < base64StrLength; i++) {
|
|
23921
|
+
if (i % 4) {
|
|
23922
|
+
var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2);
|
|
23923
|
+
var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2);
|
|
23924
|
+
var bitsCombined = bits1 | bits2;
|
|
23925
|
+
words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8);
|
|
23926
|
+
nBytes++;
|
|
23927
|
+
}
|
|
23928
|
+
}
|
|
23929
|
+
return WordArray.create(words, nBytes);
|
|
23930
|
+
}
|
|
23931
|
+
}());
|
|
23932
|
+
|
|
23933
|
+
|
|
23934
|
+
return CryptoJS.enc.Base64url;
|
|
23935
|
+
|
|
23936
|
+
}));
|
|
23937
|
+
},{"./core":194}],197:[function(require,module,exports){
|
|
22954
23938
|
;(function (root, factory) {
|
|
22955
23939
|
if (typeof exports === "object") {
|
|
22956
23940
|
// CommonJS
|
|
@@ -23100,7 +24084,7 @@ function objectToString(o) {
|
|
|
23100
24084
|
return CryptoJS.enc.Utf16;
|
|
23101
24085
|
|
|
23102
24086
|
}));
|
|
23103
|
-
},{"./core":
|
|
24087
|
+
},{"./core":194}],198:[function(require,module,exports){
|
|
23104
24088
|
;(function (root, factory, undef) {
|
|
23105
24089
|
if (typeof exports === "object") {
|
|
23106
24090
|
// CommonJS
|
|
@@ -23235,7 +24219,7 @@ function objectToString(o) {
|
|
|
23235
24219
|
return CryptoJS.EvpKDF;
|
|
23236
24220
|
|
|
23237
24221
|
}));
|
|
23238
|
-
},{"./core":
|
|
24222
|
+
},{"./core":194,"./hmac":200,"./sha1":219}],199:[function(require,module,exports){
|
|
23239
24223
|
;(function (root, factory, undef) {
|
|
23240
24224
|
if (typeof exports === "object") {
|
|
23241
24225
|
// CommonJS
|
|
@@ -23302,7 +24286,7 @@ function objectToString(o) {
|
|
|
23302
24286
|
return CryptoJS.format.Hex;
|
|
23303
24287
|
|
|
23304
24288
|
}));
|
|
23305
|
-
},{"./cipher-core":
|
|
24289
|
+
},{"./cipher-core":193,"./core":194}],200:[function(require,module,exports){
|
|
23306
24290
|
;(function (root, factory) {
|
|
23307
24291
|
if (typeof exports === "object") {
|
|
23308
24292
|
// CommonJS
|
|
@@ -23446,15 +24430,15 @@ function objectToString(o) {
|
|
|
23446
24430
|
|
|
23447
24431
|
|
|
23448
24432
|
}));
|
|
23449
|
-
},{"./core":
|
|
24433
|
+
},{"./core":194}],201:[function(require,module,exports){
|
|
23450
24434
|
;(function (root, factory, undef) {
|
|
23451
24435
|
if (typeof exports === "object") {
|
|
23452
24436
|
// CommonJS
|
|
23453
|
-
module.exports = exports = factory(require("./core"), require("./x64-core"), require("./lib-typedarrays"), require("./enc-utf16"), require("./enc-base64"), require("./md5"), require("./sha1"), require("./sha256"), require("./sha224"), require("./sha512"), require("./sha384"), require("./sha3"), require("./ripemd160"), require("./hmac"), require("./pbkdf2"), require("./evpkdf"), require("./cipher-core"), require("./mode-cfb"), require("./mode-ctr"), require("./mode-ctr-gladman"), require("./mode-ofb"), require("./mode-ecb"), require("./pad-ansix923"), require("./pad-iso10126"), require("./pad-iso97971"), require("./pad-zeropadding"), require("./pad-nopadding"), require("./format-hex"), require("./aes"), require("./tripledes"), require("./rc4"), require("./rabbit"), require("./rabbit-legacy"));
|
|
24437
|
+
module.exports = exports = factory(require("./core"), require("./x64-core"), require("./lib-typedarrays"), require("./enc-utf16"), require("./enc-base64"), require("./enc-base64url"), require("./md5"), require("./sha1"), require("./sha256"), require("./sha224"), require("./sha512"), require("./sha384"), require("./sha3"), require("./ripemd160"), require("./hmac"), require("./pbkdf2"), require("./evpkdf"), require("./cipher-core"), require("./mode-cfb"), require("./mode-ctr"), require("./mode-ctr-gladman"), require("./mode-ofb"), require("./mode-ecb"), require("./pad-ansix923"), require("./pad-iso10126"), require("./pad-iso97971"), require("./pad-zeropadding"), require("./pad-nopadding"), require("./format-hex"), require("./aes"), require("./tripledes"), require("./rc4"), require("./rabbit"), require("./rabbit-legacy"), require("./blowfish"));
|
|
23454
24438
|
}
|
|
23455
24439
|
else if (typeof define === "function" && define.amd) {
|
|
23456
24440
|
// AMD
|
|
23457
|
-
define(["./core", "./x64-core", "./lib-typedarrays", "./enc-utf16", "./enc-base64", "./md5", "./sha1", "./sha256", "./sha224", "./sha512", "./sha384", "./sha3", "./ripemd160", "./hmac", "./pbkdf2", "./evpkdf", "./cipher-core", "./mode-cfb", "./mode-ctr", "./mode-ctr-gladman", "./mode-ofb", "./mode-ecb", "./pad-ansix923", "./pad-iso10126", "./pad-iso97971", "./pad-zeropadding", "./pad-nopadding", "./format-hex", "./aes", "./tripledes", "./rc4", "./rabbit", "./rabbit-legacy"], factory);
|
|
24441
|
+
define(["./core", "./x64-core", "./lib-typedarrays", "./enc-utf16", "./enc-base64", "./enc-base64url", "./md5", "./sha1", "./sha256", "./sha224", "./sha512", "./sha384", "./sha3", "./ripemd160", "./hmac", "./pbkdf2", "./evpkdf", "./cipher-core", "./mode-cfb", "./mode-ctr", "./mode-ctr-gladman", "./mode-ofb", "./mode-ecb", "./pad-ansix923", "./pad-iso10126", "./pad-iso97971", "./pad-zeropadding", "./pad-nopadding", "./format-hex", "./aes", "./tripledes", "./rc4", "./rabbit", "./rabbit-legacy", "./blowfish"], factory);
|
|
23458
24442
|
}
|
|
23459
24443
|
else {
|
|
23460
24444
|
// Global (browser)
|
|
@@ -23465,7 +24449,7 @@ function objectToString(o) {
|
|
|
23465
24449
|
return CryptoJS;
|
|
23466
24450
|
|
|
23467
24451
|
}));
|
|
23468
|
-
},{"./aes":191,"./cipher-core":
|
|
24452
|
+
},{"./aes":191,"./blowfish":192,"./cipher-core":193,"./core":194,"./enc-base64":195,"./enc-base64url":196,"./enc-utf16":197,"./evpkdf":198,"./format-hex":199,"./hmac":200,"./lib-typedarrays":202,"./md5":203,"./mode-cfb":204,"./mode-ctr":206,"./mode-ctr-gladman":205,"./mode-ecb":207,"./mode-ofb":208,"./pad-ansix923":209,"./pad-iso10126":210,"./pad-iso97971":211,"./pad-nopadding":212,"./pad-zeropadding":213,"./pbkdf2":214,"./rabbit":216,"./rabbit-legacy":215,"./rc4":217,"./ripemd160":218,"./sha1":219,"./sha224":220,"./sha256":221,"./sha3":222,"./sha384":223,"./sha512":224,"./tripledes":225,"./x64-core":226}],202:[function(require,module,exports){
|
|
23469
24453
|
;(function (root, factory) {
|
|
23470
24454
|
if (typeof exports === "object") {
|
|
23471
24455
|
// CommonJS
|
|
@@ -23542,7 +24526,7 @@ function objectToString(o) {
|
|
|
23542
24526
|
return CryptoJS.lib.WordArray;
|
|
23543
24527
|
|
|
23544
24528
|
}));
|
|
23545
|
-
},{"./core":
|
|
24529
|
+
},{"./core":194}],203:[function(require,module,exports){
|
|
23546
24530
|
;(function (root, factory) {
|
|
23547
24531
|
if (typeof exports === "object") {
|
|
23548
24532
|
// CommonJS
|
|
@@ -23620,7 +24604,7 @@ function objectToString(o) {
|
|
|
23620
24604
|
var M_offset_14 = M[offset + 14];
|
|
23621
24605
|
var M_offset_15 = M[offset + 15];
|
|
23622
24606
|
|
|
23623
|
-
// Working
|
|
24607
|
+
// Working variables
|
|
23624
24608
|
var a = H[0];
|
|
23625
24609
|
var b = H[1];
|
|
23626
24610
|
var c = H[2];
|
|
@@ -23811,7 +24795,7 @@ function objectToString(o) {
|
|
|
23811
24795
|
return CryptoJS.MD5;
|
|
23812
24796
|
|
|
23813
24797
|
}));
|
|
23814
|
-
},{"./core":
|
|
24798
|
+
},{"./core":194}],204:[function(require,module,exports){
|
|
23815
24799
|
;(function (root, factory, undef) {
|
|
23816
24800
|
if (typeof exports === "object") {
|
|
23817
24801
|
// CommonJS
|
|
@@ -23892,7 +24876,7 @@ function objectToString(o) {
|
|
|
23892
24876
|
return CryptoJS.mode.CFB;
|
|
23893
24877
|
|
|
23894
24878
|
}));
|
|
23895
|
-
},{"./cipher-core":
|
|
24879
|
+
},{"./cipher-core":193,"./core":194}],205:[function(require,module,exports){
|
|
23896
24880
|
;(function (root, factory, undef) {
|
|
23897
24881
|
if (typeof exports === "object") {
|
|
23898
24882
|
// CommonJS
|
|
@@ -24009,7 +24993,7 @@ function objectToString(o) {
|
|
|
24009
24993
|
return CryptoJS.mode.CTRGladman;
|
|
24010
24994
|
|
|
24011
24995
|
}));
|
|
24012
|
-
},{"./cipher-core":
|
|
24996
|
+
},{"./cipher-core":193,"./core":194}],206:[function(require,module,exports){
|
|
24013
24997
|
;(function (root, factory, undef) {
|
|
24014
24998
|
if (typeof exports === "object") {
|
|
24015
24999
|
// CommonJS
|
|
@@ -24068,7 +25052,7 @@ function objectToString(o) {
|
|
|
24068
25052
|
return CryptoJS.mode.CTR;
|
|
24069
25053
|
|
|
24070
25054
|
}));
|
|
24071
|
-
},{"./cipher-core":
|
|
25055
|
+
},{"./cipher-core":193,"./core":194}],207:[function(require,module,exports){
|
|
24072
25056
|
;(function (root, factory, undef) {
|
|
24073
25057
|
if (typeof exports === "object") {
|
|
24074
25058
|
// CommonJS
|
|
@@ -24109,7 +25093,7 @@ function objectToString(o) {
|
|
|
24109
25093
|
return CryptoJS.mode.ECB;
|
|
24110
25094
|
|
|
24111
25095
|
}));
|
|
24112
|
-
},{"./cipher-core":
|
|
25096
|
+
},{"./cipher-core":193,"./core":194}],208:[function(require,module,exports){
|
|
24113
25097
|
;(function (root, factory, undef) {
|
|
24114
25098
|
if (typeof exports === "object") {
|
|
24115
25099
|
// CommonJS
|
|
@@ -24164,7 +25148,7 @@ function objectToString(o) {
|
|
|
24164
25148
|
return CryptoJS.mode.OFB;
|
|
24165
25149
|
|
|
24166
25150
|
}));
|
|
24167
|
-
},{"./cipher-core":
|
|
25151
|
+
},{"./cipher-core":193,"./core":194}],209:[function(require,module,exports){
|
|
24168
25152
|
;(function (root, factory, undef) {
|
|
24169
25153
|
if (typeof exports === "object") {
|
|
24170
25154
|
// CommonJS
|
|
@@ -24214,7 +25198,7 @@ function objectToString(o) {
|
|
|
24214
25198
|
return CryptoJS.pad.Ansix923;
|
|
24215
25199
|
|
|
24216
25200
|
}));
|
|
24217
|
-
},{"./cipher-core":
|
|
25201
|
+
},{"./cipher-core":193,"./core":194}],210:[function(require,module,exports){
|
|
24218
25202
|
;(function (root, factory, undef) {
|
|
24219
25203
|
if (typeof exports === "object") {
|
|
24220
25204
|
// CommonJS
|
|
@@ -24259,7 +25243,7 @@ function objectToString(o) {
|
|
|
24259
25243
|
return CryptoJS.pad.Iso10126;
|
|
24260
25244
|
|
|
24261
25245
|
}));
|
|
24262
|
-
},{"./cipher-core":
|
|
25246
|
+
},{"./cipher-core":193,"./core":194}],211:[function(require,module,exports){
|
|
24263
25247
|
;(function (root, factory, undef) {
|
|
24264
25248
|
if (typeof exports === "object") {
|
|
24265
25249
|
// CommonJS
|
|
@@ -24300,7 +25284,7 @@ function objectToString(o) {
|
|
|
24300
25284
|
return CryptoJS.pad.Iso97971;
|
|
24301
25285
|
|
|
24302
25286
|
}));
|
|
24303
|
-
},{"./cipher-core":
|
|
25287
|
+
},{"./cipher-core":193,"./core":194}],212:[function(require,module,exports){
|
|
24304
25288
|
;(function (root, factory, undef) {
|
|
24305
25289
|
if (typeof exports === "object") {
|
|
24306
25290
|
// CommonJS
|
|
@@ -24331,7 +25315,7 @@ function objectToString(o) {
|
|
|
24331
25315
|
return CryptoJS.pad.NoPadding;
|
|
24332
25316
|
|
|
24333
25317
|
}));
|
|
24334
|
-
},{"./cipher-core":
|
|
25318
|
+
},{"./cipher-core":193,"./core":194}],213:[function(require,module,exports){
|
|
24335
25319
|
;(function (root, factory, undef) {
|
|
24336
25320
|
if (typeof exports === "object") {
|
|
24337
25321
|
// CommonJS
|
|
@@ -24379,15 +25363,15 @@ function objectToString(o) {
|
|
|
24379
25363
|
return CryptoJS.pad.ZeroPadding;
|
|
24380
25364
|
|
|
24381
25365
|
}));
|
|
24382
|
-
},{"./cipher-core":
|
|
25366
|
+
},{"./cipher-core":193,"./core":194}],214:[function(require,module,exports){
|
|
24383
25367
|
;(function (root, factory, undef) {
|
|
24384
25368
|
if (typeof exports === "object") {
|
|
24385
25369
|
// CommonJS
|
|
24386
|
-
module.exports = exports = factory(require("./core"), require("./
|
|
25370
|
+
module.exports = exports = factory(require("./core"), require("./sha256"), require("./hmac"));
|
|
24387
25371
|
}
|
|
24388
25372
|
else if (typeof define === "function" && define.amd) {
|
|
24389
25373
|
// AMD
|
|
24390
|
-
define(["./core", "./
|
|
25374
|
+
define(["./core", "./sha256", "./hmac"], factory);
|
|
24391
25375
|
}
|
|
24392
25376
|
else {
|
|
24393
25377
|
// Global (browser)
|
|
@@ -24402,7 +25386,7 @@ function objectToString(o) {
|
|
|
24402
25386
|
var Base = C_lib.Base;
|
|
24403
25387
|
var WordArray = C_lib.WordArray;
|
|
24404
25388
|
var C_algo = C.algo;
|
|
24405
|
-
var
|
|
25389
|
+
var SHA256 = C_algo.SHA256;
|
|
24406
25390
|
var HMAC = C_algo.HMAC;
|
|
24407
25391
|
|
|
24408
25392
|
/**
|
|
@@ -24413,13 +25397,13 @@ function objectToString(o) {
|
|
|
24413
25397
|
* Configuration options.
|
|
24414
25398
|
*
|
|
24415
25399
|
* @property {number} keySize The key size in words to generate. Default: 4 (128 bits)
|
|
24416
|
-
* @property {Hasher} hasher The hasher to use. Default:
|
|
24417
|
-
* @property {number} iterations The number of iterations to perform. Default:
|
|
25400
|
+
* @property {Hasher} hasher The hasher to use. Default: SHA256
|
|
25401
|
+
* @property {number} iterations The number of iterations to perform. Default: 250000
|
|
24418
25402
|
*/
|
|
24419
25403
|
cfg: Base.extend({
|
|
24420
25404
|
keySize: 128/32,
|
|
24421
|
-
hasher:
|
|
24422
|
-
iterations:
|
|
25405
|
+
hasher: SHA256,
|
|
25406
|
+
iterations: 250000
|
|
24423
25407
|
}),
|
|
24424
25408
|
|
|
24425
25409
|
/**
|
|
@@ -24525,7 +25509,7 @@ function objectToString(o) {
|
|
|
24525
25509
|
return CryptoJS.PBKDF2;
|
|
24526
25510
|
|
|
24527
25511
|
}));
|
|
24528
|
-
},{"./core":
|
|
25512
|
+
},{"./core":194,"./hmac":200,"./sha256":221}],215:[function(require,module,exports){
|
|
24529
25513
|
;(function (root, factory, undef) {
|
|
24530
25514
|
if (typeof exports === "object") {
|
|
24531
25515
|
// CommonJS
|
|
@@ -24716,7 +25700,7 @@ function objectToString(o) {
|
|
|
24716
25700
|
return CryptoJS.RabbitLegacy;
|
|
24717
25701
|
|
|
24718
25702
|
}));
|
|
24719
|
-
},{"./cipher-core":
|
|
25703
|
+
},{"./cipher-core":193,"./core":194,"./enc-base64":195,"./evpkdf":198,"./md5":203}],216:[function(require,module,exports){
|
|
24720
25704
|
;(function (root, factory, undef) {
|
|
24721
25705
|
if (typeof exports === "object") {
|
|
24722
25706
|
// CommonJS
|
|
@@ -24909,7 +25893,7 @@ function objectToString(o) {
|
|
|
24909
25893
|
return CryptoJS.Rabbit;
|
|
24910
25894
|
|
|
24911
25895
|
}));
|
|
24912
|
-
},{"./cipher-core":
|
|
25896
|
+
},{"./cipher-core":193,"./core":194,"./enc-base64":195,"./evpkdf":198,"./md5":203}],217:[function(require,module,exports){
|
|
24913
25897
|
;(function (root, factory, undef) {
|
|
24914
25898
|
if (typeof exports === "object") {
|
|
24915
25899
|
// CommonJS
|
|
@@ -25049,7 +26033,7 @@ function objectToString(o) {
|
|
|
25049
26033
|
return CryptoJS.RC4;
|
|
25050
26034
|
|
|
25051
26035
|
}));
|
|
25052
|
-
},{"./cipher-core":
|
|
26036
|
+
},{"./cipher-core":193,"./core":194,"./enc-base64":195,"./evpkdf":198,"./md5":203}],218:[function(require,module,exports){
|
|
25053
26037
|
;(function (root, factory) {
|
|
25054
26038
|
if (typeof exports === "object") {
|
|
25055
26039
|
// CommonJS
|
|
@@ -25317,7 +26301,7 @@ function objectToString(o) {
|
|
|
25317
26301
|
return CryptoJS.RIPEMD160;
|
|
25318
26302
|
|
|
25319
26303
|
}));
|
|
25320
|
-
},{"./core":
|
|
26304
|
+
},{"./core":194}],219:[function(require,module,exports){
|
|
25321
26305
|
;(function (root, factory) {
|
|
25322
26306
|
if (typeof exports === "object") {
|
|
25323
26307
|
// CommonJS
|
|
@@ -25468,7 +26452,7 @@ function objectToString(o) {
|
|
|
25468
26452
|
return CryptoJS.SHA1;
|
|
25469
26453
|
|
|
25470
26454
|
}));
|
|
25471
|
-
},{"./core":
|
|
26455
|
+
},{"./core":194}],220:[function(require,module,exports){
|
|
25472
26456
|
;(function (root, factory, undef) {
|
|
25473
26457
|
if (typeof exports === "object") {
|
|
25474
26458
|
// CommonJS
|
|
@@ -25549,7 +26533,7 @@ function objectToString(o) {
|
|
|
25549
26533
|
return CryptoJS.SHA224;
|
|
25550
26534
|
|
|
25551
26535
|
}));
|
|
25552
|
-
},{"./core":
|
|
26536
|
+
},{"./core":194,"./sha256":221}],221:[function(require,module,exports){
|
|
25553
26537
|
;(function (root, factory) {
|
|
25554
26538
|
if (typeof exports === "object") {
|
|
25555
26539
|
// CommonJS
|
|
@@ -25749,7 +26733,7 @@ function objectToString(o) {
|
|
|
25749
26733
|
return CryptoJS.SHA256;
|
|
25750
26734
|
|
|
25751
26735
|
}));
|
|
25752
|
-
},{"./core":
|
|
26736
|
+
},{"./core":194}],222:[function(require,module,exports){
|
|
25753
26737
|
;(function (root, factory, undef) {
|
|
25754
26738
|
if (typeof exports === "object") {
|
|
25755
26739
|
// CommonJS
|
|
@@ -26076,7 +27060,7 @@ function objectToString(o) {
|
|
|
26076
27060
|
return CryptoJS.SHA3;
|
|
26077
27061
|
|
|
26078
27062
|
}));
|
|
26079
|
-
},{"./core":
|
|
27063
|
+
},{"./core":194,"./x64-core":226}],223:[function(require,module,exports){
|
|
26080
27064
|
;(function (root, factory, undef) {
|
|
26081
27065
|
if (typeof exports === "object") {
|
|
26082
27066
|
// CommonJS
|
|
@@ -26160,7 +27144,7 @@ function objectToString(o) {
|
|
|
26160
27144
|
return CryptoJS.SHA384;
|
|
26161
27145
|
|
|
26162
27146
|
}));
|
|
26163
|
-
},{"./core":
|
|
27147
|
+
},{"./core":194,"./sha512":224,"./x64-core":226}],224:[function(require,module,exports){
|
|
26164
27148
|
;(function (root, factory, undef) {
|
|
26165
27149
|
if (typeof exports === "object") {
|
|
26166
27150
|
// CommonJS
|
|
@@ -26487,7 +27471,7 @@ function objectToString(o) {
|
|
|
26487
27471
|
return CryptoJS.SHA512;
|
|
26488
27472
|
|
|
26489
27473
|
}));
|
|
26490
|
-
},{"./core":
|
|
27474
|
+
},{"./core":194,"./x64-core":226}],225:[function(require,module,exports){
|
|
26491
27475
|
;(function (root, factory, undef) {
|
|
26492
27476
|
if (typeof exports === "object") {
|
|
26493
27477
|
// CommonJS
|
|
@@ -27267,7 +28251,7 @@ function objectToString(o) {
|
|
|
27267
28251
|
return CryptoJS.TripleDES;
|
|
27268
28252
|
|
|
27269
28253
|
}));
|
|
27270
|
-
},{"./cipher-core":
|
|
28254
|
+
},{"./cipher-core":193,"./core":194,"./enc-base64":195,"./evpkdf":198,"./md5":203}],226:[function(require,module,exports){
|
|
27271
28255
|
;(function (root, factory) {
|
|
27272
28256
|
if (typeof exports === "object") {
|
|
27273
28257
|
// CommonJS
|
|
@@ -27572,7 +28556,7 @@ function objectToString(o) {
|
|
|
27572
28556
|
return CryptoJS;
|
|
27573
28557
|
|
|
27574
28558
|
}));
|
|
27575
|
-
},{"./core":
|
|
28559
|
+
},{"./core":194}],227:[function(require,module,exports){
|
|
27576
28560
|
var pSlice = Array.prototype.slice;
|
|
27577
28561
|
var objectKeys = require('./lib/keys.js');
|
|
27578
28562
|
var isArguments = require('./lib/is_arguments.js');
|
|
@@ -27668,7 +28652,7 @@ function objEquiv(a, b, opts) {
|
|
|
27668
28652
|
return typeof a === typeof b;
|
|
27669
28653
|
}
|
|
27670
28654
|
|
|
27671
|
-
},{"./lib/is_arguments.js":
|
|
28655
|
+
},{"./lib/is_arguments.js":228,"./lib/keys.js":229}],228:[function(require,module,exports){
|
|
27672
28656
|
var supportsArgumentsClass = (function(){
|
|
27673
28657
|
return Object.prototype.toString.call(arguments)
|
|
27674
28658
|
})() == '[object Arguments]';
|
|
@@ -27690,7 +28674,7 @@ function unsupported(object){
|
|
|
27690
28674
|
false;
|
|
27691
28675
|
};
|
|
27692
28676
|
|
|
27693
|
-
},{}],
|
|
28677
|
+
},{}],229:[function(require,module,exports){
|
|
27694
28678
|
exports = module.exports = typeof Object.keys === 'function'
|
|
27695
28679
|
? Object.keys : shim;
|
|
27696
28680
|
|
|
@@ -27701,7 +28685,7 @@ function shim (obj) {
|
|
|
27701
28685
|
return keys;
|
|
27702
28686
|
}
|
|
27703
28687
|
|
|
27704
|
-
},{}],
|
|
28688
|
+
},{}],230:[function(require,module,exports){
|
|
27705
28689
|
'use strict';
|
|
27706
28690
|
|
|
27707
28691
|
var INITIAL_STATE = 1;
|
|
@@ -27794,7 +28778,7 @@ class StateMachine {
|
|
|
27794
28778
|
module.exports = StateMachine;
|
|
27795
28779
|
|
|
27796
28780
|
|
|
27797
|
-
},{}],
|
|
28781
|
+
},{}],231:[function(require,module,exports){
|
|
27798
28782
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
27799
28783
|
//
|
|
27800
28784
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -28319,7 +29303,7 @@ function functionBindPolyfill(context) {
|
|
|
28319
29303
|
};
|
|
28320
29304
|
}
|
|
28321
29305
|
|
|
28322
|
-
},{}],
|
|
29306
|
+
},{}],232:[function(require,module,exports){
|
|
28323
29307
|
(function (Buffer){
|
|
28324
29308
|
'use strict';
|
|
28325
29309
|
function _interopDefault(ex) {
|
|
@@ -59677,7 +60661,7 @@ fontkit.registerFormat(TrueTypeCollection);
|
|
|
59677
60661
|
fontkit.registerFormat(DFont);
|
|
59678
60662
|
module.exports = fontkit;
|
|
59679
60663
|
}).call(this,require("buffer").Buffer)
|
|
59680
|
-
},{"babel-runtime/core-js/array/from":6,"babel-runtime/core-js/get-iterator":7,"babel-runtime/core-js/map":8,"babel-runtime/core-js/number/epsilon":9,"babel-runtime/core-js/object/assign":10,"babel-runtime/core-js/object/define-properties":12,"babel-runtime/core-js/object/define-property":13,"babel-runtime/core-js/object/freeze":14,"babel-runtime/core-js/object/get-own-property-descriptor":15,"babel-runtime/core-js/object/keys":16,"babel-runtime/core-js/promise":18,"babel-runtime/core-js/set":19,"babel-runtime/core-js/string/from-code-point":20,"babel-runtime/helpers/classCallCheck":23,"babel-runtime/helpers/createClass":24,"babel-runtime/helpers/inherits":25,"babel-runtime/helpers/possibleConstructorReturn":26,"babel-runtime/helpers/typeof":27,"brotli/decompress":39,"buffer":55,"clone":56,"deep-equal":
|
|
60664
|
+
},{"babel-runtime/core-js/array/from":6,"babel-runtime/core-js/get-iterator":7,"babel-runtime/core-js/map":8,"babel-runtime/core-js/number/epsilon":9,"babel-runtime/core-js/object/assign":10,"babel-runtime/core-js/object/define-properties":12,"babel-runtime/core-js/object/define-property":13,"babel-runtime/core-js/object/freeze":14,"babel-runtime/core-js/object/get-own-property-descriptor":15,"babel-runtime/core-js/object/keys":16,"babel-runtime/core-js/promise":18,"babel-runtime/core-js/set":19,"babel-runtime/core-js/string/from-code-point":20,"babel-runtime/helpers/classCallCheck":23,"babel-runtime/helpers/createClass":24,"babel-runtime/helpers/inherits":25,"babel-runtime/helpers/possibleConstructorReturn":26,"babel-runtime/helpers/typeof":27,"brotli/decompress":39,"buffer":55,"clone":56,"deep-equal":227,"dfa":230,"fs":54,"iconv-lite":54,"restructure":259,"restructure/src/utils":275,"tiny-inflate":279,"unicode-properties":283,"unicode-trie":284}],233:[function(require,module,exports){
|
|
59681
60665
|
exports.read = function (buffer, offset, isLE, mLen, nBytes) {
|
|
59682
60666
|
var e, m
|
|
59683
60667
|
var eLen = (nBytes * 8) - mLen - 1
|
|
@@ -59763,9 +60747,9 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
|
|
|
59763
60747
|
buffer[offset + i - d] |= s * 128
|
|
59764
60748
|
}
|
|
59765
60749
|
|
|
59766
|
-
},{}],
|
|
60750
|
+
},{}],234:[function(require,module,exports){
|
|
59767
60751
|
arguments[4][3][0].apply(exports,arguments)
|
|
59768
|
-
},{"dup":3}],
|
|
60752
|
+
},{"dup":3}],235:[function(require,module,exports){
|
|
59769
60753
|
/*!
|
|
59770
60754
|
* Determine if an object is a Buffer
|
|
59771
60755
|
*
|
|
@@ -59788,14 +60772,14 @@ function isSlowBuffer (obj) {
|
|
|
59788
60772
|
return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))
|
|
59789
60773
|
}
|
|
59790
60774
|
|
|
59791
|
-
},{}],
|
|
60775
|
+
},{}],236:[function(require,module,exports){
|
|
59792
60776
|
var toString = {}.toString;
|
|
59793
60777
|
|
|
59794
60778
|
module.exports = Array.isArray || function (arr) {
|
|
59795
60779
|
return toString.call(arr) == '[object Array]';
|
|
59796
60780
|
};
|
|
59797
60781
|
|
|
59798
|
-
},{}],
|
|
60782
|
+
},{}],237:[function(require,module,exports){
|
|
59799
60783
|
var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
59800
60784
|
|
|
59801
60785
|
;(function (exports) {
|
|
@@ -59921,7 +60905,7 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
|
59921
60905
|
exports.fromByteArray = uint8ToBase64
|
|
59922
60906
|
}(typeof exports === 'undefined' ? (this.base64js = {}) : exports))
|
|
59923
60907
|
|
|
59924
|
-
},{}],
|
|
60908
|
+
},{}],238:[function(require,module,exports){
|
|
59925
60909
|
const inflate = require('tiny-inflate');
|
|
59926
60910
|
|
|
59927
60911
|
// Shift size for getting the index-1 table offset.
|
|
@@ -60053,7 +61037,7 @@ class UnicodeTrie {
|
|
|
60053
61037
|
}
|
|
60054
61038
|
|
|
60055
61039
|
module.exports = UnicodeTrie;
|
|
60056
|
-
},{"tiny-inflate":
|
|
61040
|
+
},{"tiny-inflate":279}],239:[function(require,module,exports){
|
|
60057
61041
|
// The following break classes are handled by the pair table
|
|
60058
61042
|
|
|
60059
61043
|
exports.OP = 0; // Opening punctuation
|
|
@@ -60099,7 +61083,7 @@ exports.SG = 37; // Surrogates
|
|
|
60099
61083
|
exports.SP = 38; // Space
|
|
60100
61084
|
exports.XX = 39; // Unknown
|
|
60101
61085
|
|
|
60102
|
-
},{}],
|
|
61086
|
+
},{}],240:[function(require,module,exports){
|
|
60103
61087
|
let AI, AL, BA, BK, CB, CJ, CR, ID, LF, NL, NS, SA, SG, SP, WJ, XX;
|
|
60104
61088
|
const UnicodeTrie = require('unicode-trie');
|
|
60105
61089
|
|
|
@@ -60231,7 +61215,7 @@ class LineBreaker {
|
|
|
60231
61215
|
|
|
60232
61216
|
module.exports = LineBreaker;
|
|
60233
61217
|
|
|
60234
|
-
},{"./classes":
|
|
61218
|
+
},{"./classes":239,"./pairs":241,"base64-js":237,"unicode-trie":238}],241:[function(require,module,exports){
|
|
60235
61219
|
let CI_BRK, CP_BRK, DI_BRK, IN_BRK, PR_BRK;
|
|
60236
61220
|
exports.DI_BRK = (DI_BRK = 0); // Direct break opportunity
|
|
60237
61221
|
exports.IN_BRK = (IN_BRK = 1); // Indirect break opportunity
|
|
@@ -60271,7 +61255,7 @@ exports.pairTable = [
|
|
|
60271
61255
|
[DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK],
|
|
60272
61256
|
[DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK]
|
|
60273
61257
|
];
|
|
60274
|
-
},{}],
|
|
61258
|
+
},{}],242:[function(require,module,exports){
|
|
60275
61259
|
(function (Buffer){
|
|
60276
61260
|
/*
|
|
60277
61261
|
* MIT LICENSE
|
|
@@ -60677,7 +61661,7 @@ module.exports = class PNG {
|
|
|
60677
61661
|
};
|
|
60678
61662
|
|
|
60679
61663
|
}).call(this,require("buffer").Buffer)
|
|
60680
|
-
},{"buffer":55,"fs":54,"zlib":42}],
|
|
61664
|
+
},{"buffer":55,"fs":54,"zlib":42}],243:[function(require,module,exports){
|
|
60681
61665
|
(function (process){
|
|
60682
61666
|
'use strict';
|
|
60683
61667
|
|
|
@@ -60725,7 +61709,7 @@ function nextTick(fn, arg1, arg2, arg3) {
|
|
|
60725
61709
|
|
|
60726
61710
|
|
|
60727
61711
|
}).call(this,require('_process'))
|
|
60728
|
-
},{"_process":
|
|
61712
|
+
},{"_process":244}],244:[function(require,module,exports){
|
|
60729
61713
|
// shim for using process in browser
|
|
60730
61714
|
var process = module.exports = {};
|
|
60731
61715
|
|
|
@@ -60911,10 +61895,10 @@ process.chdir = function (dir) {
|
|
|
60911
61895
|
};
|
|
60912
61896
|
process.umask = function() { return 0; };
|
|
60913
61897
|
|
|
60914
|
-
},{}],
|
|
61898
|
+
},{}],245:[function(require,module,exports){
|
|
60915
61899
|
module.exports = require('./lib/_stream_duplex.js');
|
|
60916
61900
|
|
|
60917
|
-
},{"./lib/_stream_duplex.js":
|
|
61901
|
+
},{"./lib/_stream_duplex.js":246}],246:[function(require,module,exports){
|
|
60918
61902
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
60919
61903
|
//
|
|
60920
61904
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -61046,7 +62030,7 @@ Duplex.prototype._destroy = function (err, cb) {
|
|
|
61046
62030
|
|
|
61047
62031
|
pna.nextTick(cb, err);
|
|
61048
62032
|
};
|
|
61049
|
-
},{"./_stream_readable":
|
|
62033
|
+
},{"./_stream_readable":248,"./_stream_writable":250,"core-util-is":190,"inherits":234,"process-nextick-args":243}],247:[function(require,module,exports){
|
|
61050
62034
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
61051
62035
|
//
|
|
61052
62036
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -61094,7 +62078,7 @@ function PassThrough(options) {
|
|
|
61094
62078
|
PassThrough.prototype._transform = function (chunk, encoding, cb) {
|
|
61095
62079
|
cb(null, chunk);
|
|
61096
62080
|
};
|
|
61097
|
-
},{"./_stream_transform":
|
|
62081
|
+
},{"./_stream_transform":249,"core-util-is":190,"inherits":234}],248:[function(require,module,exports){
|
|
61098
62082
|
(function (process,global){
|
|
61099
62083
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
61100
62084
|
//
|
|
@@ -62116,7 +63100,7 @@ function indexOf(xs, x) {
|
|
|
62116
63100
|
return -1;
|
|
62117
63101
|
}
|
|
62118
63102
|
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
62119
|
-
},{"./_stream_duplex":
|
|
63103
|
+
},{"./_stream_duplex":246,"./internal/streams/BufferList":251,"./internal/streams/destroy":252,"./internal/streams/stream":253,"_process":244,"core-util-is":190,"events":231,"inherits":234,"isarray":236,"process-nextick-args":243,"safe-buffer":276,"string_decoder/":254,"util":40}],249:[function(require,module,exports){
|
|
62120
63104
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
62121
63105
|
//
|
|
62122
63106
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -62331,7 +63315,7 @@ function done(stream, er, data) {
|
|
|
62331
63315
|
|
|
62332
63316
|
return stream.push(null);
|
|
62333
63317
|
}
|
|
62334
|
-
},{"./_stream_duplex":
|
|
63318
|
+
},{"./_stream_duplex":246,"core-util-is":190,"inherits":234}],250:[function(require,module,exports){
|
|
62335
63319
|
(function (process,global,setImmediate){
|
|
62336
63320
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
62337
63321
|
//
|
|
@@ -63021,7 +64005,7 @@ Writable.prototype._destroy = function (err, cb) {
|
|
|
63021
64005
|
cb(err);
|
|
63022
64006
|
};
|
|
63023
64007
|
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("timers").setImmediate)
|
|
63024
|
-
},{"./_stream_duplex":
|
|
64008
|
+
},{"./_stream_duplex":246,"./internal/streams/destroy":252,"./internal/streams/stream":253,"_process":244,"core-util-is":190,"inherits":234,"process-nextick-args":243,"safe-buffer":276,"timers":278,"util-deprecate":285}],251:[function(require,module,exports){
|
|
63025
64009
|
'use strict';
|
|
63026
64010
|
|
|
63027
64011
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -63101,7 +64085,7 @@ if (util && util.inspect && util.inspect.custom) {
|
|
|
63101
64085
|
return this.constructor.name + ' ' + obj;
|
|
63102
64086
|
};
|
|
63103
64087
|
}
|
|
63104
|
-
},{"safe-buffer":
|
|
64088
|
+
},{"safe-buffer":276,"util":40}],252:[function(require,module,exports){
|
|
63105
64089
|
'use strict';
|
|
63106
64090
|
|
|
63107
64091
|
/*<replacement>*/
|
|
@@ -63176,13 +64160,310 @@ module.exports = {
|
|
|
63176
64160
|
destroy: destroy,
|
|
63177
64161
|
undestroy: undestroy
|
|
63178
64162
|
};
|
|
63179
|
-
},{"process-nextick-args":
|
|
64163
|
+
},{"process-nextick-args":243}],253:[function(require,module,exports){
|
|
63180
64164
|
module.exports = require('events').EventEmitter;
|
|
63181
64165
|
|
|
63182
|
-
},{"events":
|
|
64166
|
+
},{"events":231}],254:[function(require,module,exports){
|
|
64167
|
+
// Copyright Joyent, Inc. and other Node contributors.
|
|
64168
|
+
//
|
|
64169
|
+
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
64170
|
+
// copy of this software and associated documentation files (the
|
|
64171
|
+
// "Software"), to deal in the Software without restriction, including
|
|
64172
|
+
// without limitation the rights to use, copy, modify, merge, publish,
|
|
64173
|
+
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
64174
|
+
// persons to whom the Software is furnished to do so, subject to the
|
|
64175
|
+
// following conditions:
|
|
64176
|
+
//
|
|
64177
|
+
// The above copyright notice and this permission notice shall be included
|
|
64178
|
+
// in all copies or substantial portions of the Software.
|
|
64179
|
+
//
|
|
64180
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
64181
|
+
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
64182
|
+
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
64183
|
+
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
64184
|
+
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
64185
|
+
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
64186
|
+
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
64187
|
+
|
|
64188
|
+
'use strict';
|
|
64189
|
+
|
|
64190
|
+
/*<replacement>*/
|
|
64191
|
+
|
|
64192
|
+
var Buffer = require('safe-buffer').Buffer;
|
|
64193
|
+
/*</replacement>*/
|
|
64194
|
+
|
|
64195
|
+
var isEncoding = Buffer.isEncoding || function (encoding) {
|
|
64196
|
+
encoding = '' + encoding;
|
|
64197
|
+
switch (encoding && encoding.toLowerCase()) {
|
|
64198
|
+
case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
|
|
64199
|
+
return true;
|
|
64200
|
+
default:
|
|
64201
|
+
return false;
|
|
64202
|
+
}
|
|
64203
|
+
};
|
|
64204
|
+
|
|
64205
|
+
function _normalizeEncoding(enc) {
|
|
64206
|
+
if (!enc) return 'utf8';
|
|
64207
|
+
var retried;
|
|
64208
|
+
while (true) {
|
|
64209
|
+
switch (enc) {
|
|
64210
|
+
case 'utf8':
|
|
64211
|
+
case 'utf-8':
|
|
64212
|
+
return 'utf8';
|
|
64213
|
+
case 'ucs2':
|
|
64214
|
+
case 'ucs-2':
|
|
64215
|
+
case 'utf16le':
|
|
64216
|
+
case 'utf-16le':
|
|
64217
|
+
return 'utf16le';
|
|
64218
|
+
case 'latin1':
|
|
64219
|
+
case 'binary':
|
|
64220
|
+
return 'latin1';
|
|
64221
|
+
case 'base64':
|
|
64222
|
+
case 'ascii':
|
|
64223
|
+
case 'hex':
|
|
64224
|
+
return enc;
|
|
64225
|
+
default:
|
|
64226
|
+
if (retried) return; // undefined
|
|
64227
|
+
enc = ('' + enc).toLowerCase();
|
|
64228
|
+
retried = true;
|
|
64229
|
+
}
|
|
64230
|
+
}
|
|
64231
|
+
};
|
|
64232
|
+
|
|
64233
|
+
// Do not cache `Buffer.isEncoding` when checking encoding names as some
|
|
64234
|
+
// modules monkey-patch it to support additional encodings
|
|
64235
|
+
function normalizeEncoding(enc) {
|
|
64236
|
+
var nenc = _normalizeEncoding(enc);
|
|
64237
|
+
if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
|
|
64238
|
+
return nenc || enc;
|
|
64239
|
+
}
|
|
64240
|
+
|
|
64241
|
+
// StringDecoder provides an interface for efficiently splitting a series of
|
|
64242
|
+
// buffers into a series of JS strings without breaking apart multi-byte
|
|
64243
|
+
// characters.
|
|
64244
|
+
exports.StringDecoder = StringDecoder;
|
|
64245
|
+
function StringDecoder(encoding) {
|
|
64246
|
+
this.encoding = normalizeEncoding(encoding);
|
|
64247
|
+
var nb;
|
|
64248
|
+
switch (this.encoding) {
|
|
64249
|
+
case 'utf16le':
|
|
64250
|
+
this.text = utf16Text;
|
|
64251
|
+
this.end = utf16End;
|
|
64252
|
+
nb = 4;
|
|
64253
|
+
break;
|
|
64254
|
+
case 'utf8':
|
|
64255
|
+
this.fillLast = utf8FillLast;
|
|
64256
|
+
nb = 4;
|
|
64257
|
+
break;
|
|
64258
|
+
case 'base64':
|
|
64259
|
+
this.text = base64Text;
|
|
64260
|
+
this.end = base64End;
|
|
64261
|
+
nb = 3;
|
|
64262
|
+
break;
|
|
64263
|
+
default:
|
|
64264
|
+
this.write = simpleWrite;
|
|
64265
|
+
this.end = simpleEnd;
|
|
64266
|
+
return;
|
|
64267
|
+
}
|
|
64268
|
+
this.lastNeed = 0;
|
|
64269
|
+
this.lastTotal = 0;
|
|
64270
|
+
this.lastChar = Buffer.allocUnsafe(nb);
|
|
64271
|
+
}
|
|
64272
|
+
|
|
64273
|
+
StringDecoder.prototype.write = function (buf) {
|
|
64274
|
+
if (buf.length === 0) return '';
|
|
64275
|
+
var r;
|
|
64276
|
+
var i;
|
|
64277
|
+
if (this.lastNeed) {
|
|
64278
|
+
r = this.fillLast(buf);
|
|
64279
|
+
if (r === undefined) return '';
|
|
64280
|
+
i = this.lastNeed;
|
|
64281
|
+
this.lastNeed = 0;
|
|
64282
|
+
} else {
|
|
64283
|
+
i = 0;
|
|
64284
|
+
}
|
|
64285
|
+
if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
|
|
64286
|
+
return r || '';
|
|
64287
|
+
};
|
|
64288
|
+
|
|
64289
|
+
StringDecoder.prototype.end = utf8End;
|
|
64290
|
+
|
|
64291
|
+
// Returns only complete characters in a Buffer
|
|
64292
|
+
StringDecoder.prototype.text = utf8Text;
|
|
64293
|
+
|
|
64294
|
+
// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
|
|
64295
|
+
StringDecoder.prototype.fillLast = function (buf) {
|
|
64296
|
+
if (this.lastNeed <= buf.length) {
|
|
64297
|
+
buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
|
|
64298
|
+
return this.lastChar.toString(this.encoding, 0, this.lastTotal);
|
|
64299
|
+
}
|
|
64300
|
+
buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
|
|
64301
|
+
this.lastNeed -= buf.length;
|
|
64302
|
+
};
|
|
64303
|
+
|
|
64304
|
+
// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
|
|
64305
|
+
// continuation byte. If an invalid byte is detected, -2 is returned.
|
|
64306
|
+
function utf8CheckByte(byte) {
|
|
64307
|
+
if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
|
|
64308
|
+
return byte >> 6 === 0x02 ? -1 : -2;
|
|
64309
|
+
}
|
|
64310
|
+
|
|
64311
|
+
// Checks at most 3 bytes at the end of a Buffer in order to detect an
|
|
64312
|
+
// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
|
|
64313
|
+
// needed to complete the UTF-8 character (if applicable) are returned.
|
|
64314
|
+
function utf8CheckIncomplete(self, buf, i) {
|
|
64315
|
+
var j = buf.length - 1;
|
|
64316
|
+
if (j < i) return 0;
|
|
64317
|
+
var nb = utf8CheckByte(buf[j]);
|
|
64318
|
+
if (nb >= 0) {
|
|
64319
|
+
if (nb > 0) self.lastNeed = nb - 1;
|
|
64320
|
+
return nb;
|
|
64321
|
+
}
|
|
64322
|
+
if (--j < i || nb === -2) return 0;
|
|
64323
|
+
nb = utf8CheckByte(buf[j]);
|
|
64324
|
+
if (nb >= 0) {
|
|
64325
|
+
if (nb > 0) self.lastNeed = nb - 2;
|
|
64326
|
+
return nb;
|
|
64327
|
+
}
|
|
64328
|
+
if (--j < i || nb === -2) return 0;
|
|
64329
|
+
nb = utf8CheckByte(buf[j]);
|
|
64330
|
+
if (nb >= 0) {
|
|
64331
|
+
if (nb > 0) {
|
|
64332
|
+
if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
|
|
64333
|
+
}
|
|
64334
|
+
return nb;
|
|
64335
|
+
}
|
|
64336
|
+
return 0;
|
|
64337
|
+
}
|
|
64338
|
+
|
|
64339
|
+
// Validates as many continuation bytes for a multi-byte UTF-8 character as
|
|
64340
|
+
// needed or are available. If we see a non-continuation byte where we expect
|
|
64341
|
+
// one, we "replace" the validated continuation bytes we've seen so far with
|
|
64342
|
+
// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
|
|
64343
|
+
// behavior. The continuation byte check is included three times in the case
|
|
64344
|
+
// where all of the continuation bytes for a character exist in the same buffer.
|
|
64345
|
+
// It is also done this way as a slight performance increase instead of using a
|
|
64346
|
+
// loop.
|
|
64347
|
+
function utf8CheckExtraBytes(self, buf, p) {
|
|
64348
|
+
if ((buf[0] & 0xC0) !== 0x80) {
|
|
64349
|
+
self.lastNeed = 0;
|
|
64350
|
+
return '\ufffd';
|
|
64351
|
+
}
|
|
64352
|
+
if (self.lastNeed > 1 && buf.length > 1) {
|
|
64353
|
+
if ((buf[1] & 0xC0) !== 0x80) {
|
|
64354
|
+
self.lastNeed = 1;
|
|
64355
|
+
return '\ufffd';
|
|
64356
|
+
}
|
|
64357
|
+
if (self.lastNeed > 2 && buf.length > 2) {
|
|
64358
|
+
if ((buf[2] & 0xC0) !== 0x80) {
|
|
64359
|
+
self.lastNeed = 2;
|
|
64360
|
+
return '\ufffd';
|
|
64361
|
+
}
|
|
64362
|
+
}
|
|
64363
|
+
}
|
|
64364
|
+
}
|
|
64365
|
+
|
|
64366
|
+
// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
|
|
64367
|
+
function utf8FillLast(buf) {
|
|
64368
|
+
var p = this.lastTotal - this.lastNeed;
|
|
64369
|
+
var r = utf8CheckExtraBytes(this, buf, p);
|
|
64370
|
+
if (r !== undefined) return r;
|
|
64371
|
+
if (this.lastNeed <= buf.length) {
|
|
64372
|
+
buf.copy(this.lastChar, p, 0, this.lastNeed);
|
|
64373
|
+
return this.lastChar.toString(this.encoding, 0, this.lastTotal);
|
|
64374
|
+
}
|
|
64375
|
+
buf.copy(this.lastChar, p, 0, buf.length);
|
|
64376
|
+
this.lastNeed -= buf.length;
|
|
64377
|
+
}
|
|
64378
|
+
|
|
64379
|
+
// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
|
|
64380
|
+
// partial character, the character's bytes are buffered until the required
|
|
64381
|
+
// number of bytes are available.
|
|
64382
|
+
function utf8Text(buf, i) {
|
|
64383
|
+
var total = utf8CheckIncomplete(this, buf, i);
|
|
64384
|
+
if (!this.lastNeed) return buf.toString('utf8', i);
|
|
64385
|
+
this.lastTotal = total;
|
|
64386
|
+
var end = buf.length - (total - this.lastNeed);
|
|
64387
|
+
buf.copy(this.lastChar, 0, end);
|
|
64388
|
+
return buf.toString('utf8', i, end);
|
|
64389
|
+
}
|
|
64390
|
+
|
|
64391
|
+
// For UTF-8, a replacement character is added when ending on a partial
|
|
64392
|
+
// character.
|
|
64393
|
+
function utf8End(buf) {
|
|
64394
|
+
var r = buf && buf.length ? this.write(buf) : '';
|
|
64395
|
+
if (this.lastNeed) return r + '\ufffd';
|
|
64396
|
+
return r;
|
|
64397
|
+
}
|
|
64398
|
+
|
|
64399
|
+
// UTF-16LE typically needs two bytes per character, but even if we have an even
|
|
64400
|
+
// number of bytes available, we need to check if we end on a leading/high
|
|
64401
|
+
// surrogate. In that case, we need to wait for the next two bytes in order to
|
|
64402
|
+
// decode the last character properly.
|
|
64403
|
+
function utf16Text(buf, i) {
|
|
64404
|
+
if ((buf.length - i) % 2 === 0) {
|
|
64405
|
+
var r = buf.toString('utf16le', i);
|
|
64406
|
+
if (r) {
|
|
64407
|
+
var c = r.charCodeAt(r.length - 1);
|
|
64408
|
+
if (c >= 0xD800 && c <= 0xDBFF) {
|
|
64409
|
+
this.lastNeed = 2;
|
|
64410
|
+
this.lastTotal = 4;
|
|
64411
|
+
this.lastChar[0] = buf[buf.length - 2];
|
|
64412
|
+
this.lastChar[1] = buf[buf.length - 1];
|
|
64413
|
+
return r.slice(0, -1);
|
|
64414
|
+
}
|
|
64415
|
+
}
|
|
64416
|
+
return r;
|
|
64417
|
+
}
|
|
64418
|
+
this.lastNeed = 1;
|
|
64419
|
+
this.lastTotal = 2;
|
|
64420
|
+
this.lastChar[0] = buf[buf.length - 1];
|
|
64421
|
+
return buf.toString('utf16le', i, buf.length - 1);
|
|
64422
|
+
}
|
|
64423
|
+
|
|
64424
|
+
// For UTF-16LE we do not explicitly append special replacement characters if we
|
|
64425
|
+
// end on a partial character, we simply let v8 handle that.
|
|
64426
|
+
function utf16End(buf) {
|
|
64427
|
+
var r = buf && buf.length ? this.write(buf) : '';
|
|
64428
|
+
if (this.lastNeed) {
|
|
64429
|
+
var end = this.lastTotal - this.lastNeed;
|
|
64430
|
+
return r + this.lastChar.toString('utf16le', 0, end);
|
|
64431
|
+
}
|
|
64432
|
+
return r;
|
|
64433
|
+
}
|
|
64434
|
+
|
|
64435
|
+
function base64Text(buf, i) {
|
|
64436
|
+
var n = (buf.length - i) % 3;
|
|
64437
|
+
if (n === 0) return buf.toString('base64', i);
|
|
64438
|
+
this.lastNeed = 3 - n;
|
|
64439
|
+
this.lastTotal = 3;
|
|
64440
|
+
if (n === 1) {
|
|
64441
|
+
this.lastChar[0] = buf[buf.length - 1];
|
|
64442
|
+
} else {
|
|
64443
|
+
this.lastChar[0] = buf[buf.length - 2];
|
|
64444
|
+
this.lastChar[1] = buf[buf.length - 1];
|
|
64445
|
+
}
|
|
64446
|
+
return buf.toString('base64', i, buf.length - n);
|
|
64447
|
+
}
|
|
64448
|
+
|
|
64449
|
+
function base64End(buf) {
|
|
64450
|
+
var r = buf && buf.length ? this.write(buf) : '';
|
|
64451
|
+
if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
|
|
64452
|
+
return r;
|
|
64453
|
+
}
|
|
64454
|
+
|
|
64455
|
+
// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
|
|
64456
|
+
function simpleWrite(buf) {
|
|
64457
|
+
return buf.toString(this.encoding);
|
|
64458
|
+
}
|
|
64459
|
+
|
|
64460
|
+
function simpleEnd(buf) {
|
|
64461
|
+
return buf && buf.length ? this.write(buf) : '';
|
|
64462
|
+
}
|
|
64463
|
+
},{"safe-buffer":276}],255:[function(require,module,exports){
|
|
63183
64464
|
module.exports = require('./readable').PassThrough
|
|
63184
64465
|
|
|
63185
|
-
},{"./readable":
|
|
64466
|
+
},{"./readable":256}],256:[function(require,module,exports){
|
|
63186
64467
|
exports = module.exports = require('./lib/_stream_readable.js');
|
|
63187
64468
|
exports.Stream = exports;
|
|
63188
64469
|
exports.Readable = exports;
|
|
@@ -63191,13 +64472,13 @@ exports.Duplex = require('./lib/_stream_duplex.js');
|
|
|
63191
64472
|
exports.Transform = require('./lib/_stream_transform.js');
|
|
63192
64473
|
exports.PassThrough = require('./lib/_stream_passthrough.js');
|
|
63193
64474
|
|
|
63194
|
-
},{"./lib/_stream_duplex.js":
|
|
64475
|
+
},{"./lib/_stream_duplex.js":246,"./lib/_stream_passthrough.js":247,"./lib/_stream_readable.js":248,"./lib/_stream_transform.js":249,"./lib/_stream_writable.js":250}],257:[function(require,module,exports){
|
|
63195
64476
|
module.exports = require('./readable').Transform
|
|
63196
64477
|
|
|
63197
|
-
},{"./readable":
|
|
64478
|
+
},{"./readable":256}],258:[function(require,module,exports){
|
|
63198
64479
|
module.exports = require('./lib/_stream_writable.js');
|
|
63199
64480
|
|
|
63200
|
-
},{"./lib/_stream_writable.js":
|
|
64481
|
+
},{"./lib/_stream_writable.js":250}],259:[function(require,module,exports){
|
|
63201
64482
|
(function () {
|
|
63202
64483
|
var key, val, _ref, _ref1;
|
|
63203
64484
|
exports.EncodeStream = require('./src/EncodeStream');
|
|
@@ -63224,7 +64505,7 @@ module.exports = require('./lib/_stream_writable.js');
|
|
|
63224
64505
|
exports[key] = val;
|
|
63225
64506
|
}
|
|
63226
64507
|
}.call(this));
|
|
63227
|
-
},{"./src/Array":
|
|
64508
|
+
},{"./src/Array":260,"./src/Bitfield":261,"./src/Boolean":262,"./src/Buffer":263,"./src/DecodeStream":264,"./src/EncodeStream":265,"./src/Enum":266,"./src/LazyArray":267,"./src/Number":268,"./src/Optional":269,"./src/Pointer":270,"./src/Reserved":271,"./src/String":272,"./src/Struct":273,"./src/VersionedStruct":274}],260:[function(require,module,exports){
|
|
63228
64509
|
(function () {
|
|
63229
64510
|
var ArrayT, NumberT, utils;
|
|
63230
64511
|
NumberT = require('./Number').Number;
|
|
@@ -63311,7 +64592,7 @@ module.exports = require('./lib/_stream_writable.js');
|
|
|
63311
64592
|
}();
|
|
63312
64593
|
module.exports = ArrayT;
|
|
63313
64594
|
}.call(this));
|
|
63314
|
-
},{"./Number":
|
|
64595
|
+
},{"./Number":268,"./utils":275}],261:[function(require,module,exports){
|
|
63315
64596
|
(function () {
|
|
63316
64597
|
var Bitfield;
|
|
63317
64598
|
Bitfield = function () {
|
|
@@ -63353,7 +64634,7 @@ module.exports = require('./lib/_stream_writable.js');
|
|
|
63353
64634
|
}();
|
|
63354
64635
|
module.exports = Bitfield;
|
|
63355
64636
|
}.call(this));
|
|
63356
|
-
},{}],
|
|
64637
|
+
},{}],262:[function(require,module,exports){
|
|
63357
64638
|
(function () {
|
|
63358
64639
|
var BooleanT;
|
|
63359
64640
|
BooleanT = function () {
|
|
@@ -63373,7 +64654,7 @@ module.exports = require('./lib/_stream_writable.js');
|
|
|
63373
64654
|
}();
|
|
63374
64655
|
module.exports = BooleanT;
|
|
63375
64656
|
}.call(this));
|
|
63376
|
-
},{}],
|
|
64657
|
+
},{}],263:[function(require,module,exports){
|
|
63377
64658
|
(function () {
|
|
63378
64659
|
var BufferT, NumberT, utils;
|
|
63379
64660
|
utils = require('./utils');
|
|
@@ -63403,7 +64684,7 @@ module.exports = require('./lib/_stream_writable.js');
|
|
|
63403
64684
|
}();
|
|
63404
64685
|
module.exports = BufferT;
|
|
63405
64686
|
}.call(this));
|
|
63406
|
-
},{"./Number":
|
|
64687
|
+
},{"./Number":268,"./utils":275}],264:[function(require,module,exports){
|
|
63407
64688
|
(function (Buffer){
|
|
63408
64689
|
(function () {
|
|
63409
64690
|
var DecodeStream, iconv;
|
|
@@ -63494,7 +64775,7 @@ module.exports = require('./lib/_stream_writable.js');
|
|
|
63494
64775
|
module.exports = DecodeStream;
|
|
63495
64776
|
}.call(this));
|
|
63496
64777
|
}).call(this,require("buffer").Buffer)
|
|
63497
|
-
},{"buffer":55,"iconv-lite":54}],
|
|
64778
|
+
},{"buffer":55,"iconv-lite":54}],265:[function(require,module,exports){
|
|
63498
64779
|
(function (Buffer){
|
|
63499
64780
|
(function () {
|
|
63500
64781
|
var DecodeStream, EncodeStream, iconv, stream, __hasProp = {}.hasOwnProperty, __extends = function (child, parent) {
|
|
@@ -63637,7 +64918,7 @@ module.exports = require('./lib/_stream_writable.js');
|
|
|
63637
64918
|
module.exports = EncodeStream;
|
|
63638
64919
|
}.call(this));
|
|
63639
64920
|
}).call(this,require("buffer").Buffer)
|
|
63640
|
-
},{"./DecodeStream":
|
|
64921
|
+
},{"./DecodeStream":264,"buffer":55,"iconv-lite":54,"stream":277}],266:[function(require,module,exports){
|
|
63641
64922
|
(function () {
|
|
63642
64923
|
var Enum;
|
|
63643
64924
|
Enum = function () {
|
|
@@ -63665,7 +64946,7 @@ module.exports = require('./lib/_stream_writable.js');
|
|
|
63665
64946
|
}();
|
|
63666
64947
|
module.exports = Enum;
|
|
63667
64948
|
}.call(this));
|
|
63668
|
-
},{}],
|
|
64949
|
+
},{}],267:[function(require,module,exports){
|
|
63669
64950
|
(function () {
|
|
63670
64951
|
var ArrayT, LazyArray, LazyArrayT, NumberT, inspect, utils, __hasProp = {}.hasOwnProperty, __extends = function (child, parent) {
|
|
63671
64952
|
for (var key in parent) {
|
|
@@ -63756,7 +65037,7 @@ module.exports = require('./lib/_stream_writable.js');
|
|
|
63756
65037
|
}();
|
|
63757
65038
|
module.exports = LazyArrayT;
|
|
63758
65039
|
}.call(this));
|
|
63759
|
-
},{"./Array":
|
|
65040
|
+
},{"./Array":260,"./Number":268,"./utils":275,"util":287}],268:[function(require,module,exports){
|
|
63760
65041
|
(function () {
|
|
63761
65042
|
var DecodeStream, Fixed, NumberT, __hasProp = {}.hasOwnProperty, __extends = function (child, parent) {
|
|
63762
65043
|
for (var key in parent) {
|
|
@@ -63834,7 +65115,7 @@ module.exports = require('./lib/_stream_writable.js');
|
|
|
63834
65115
|
exports.fixed32be = exports.fixed32 = new Fixed(32, 'BE');
|
|
63835
65116
|
exports.fixed32le = new Fixed(32, 'LE');
|
|
63836
65117
|
}.call(this));
|
|
63837
|
-
},{"./DecodeStream":
|
|
65118
|
+
},{"./DecodeStream":264}],269:[function(require,module,exports){
|
|
63838
65119
|
(function () {
|
|
63839
65120
|
var Optional;
|
|
63840
65121
|
Optional = function () {
|
|
@@ -63878,7 +65159,7 @@ module.exports = require('./lib/_stream_writable.js');
|
|
|
63878
65159
|
}();
|
|
63879
65160
|
module.exports = Optional;
|
|
63880
65161
|
}.call(this));
|
|
63881
|
-
},{}],
|
|
65162
|
+
},{}],270:[function(require,module,exports){
|
|
63882
65163
|
(function () {
|
|
63883
65164
|
var Pointer, VoidPointer, utils;
|
|
63884
65165
|
utils = require('./utils');
|
|
@@ -64039,7 +65320,7 @@ module.exports = require('./lib/_stream_writable.js');
|
|
|
64039
65320
|
exports.Pointer = Pointer;
|
|
64040
65321
|
exports.VoidPointer = VoidPointer;
|
|
64041
65322
|
}.call(this));
|
|
64042
|
-
},{"./utils":
|
|
65323
|
+
},{"./utils":275}],271:[function(require,module,exports){
|
|
64043
65324
|
(function () {
|
|
64044
65325
|
var Reserved, utils;
|
|
64045
65326
|
utils = require('./utils');
|
|
@@ -64064,7 +65345,7 @@ module.exports = require('./lib/_stream_writable.js');
|
|
|
64064
65345
|
}();
|
|
64065
65346
|
module.exports = Reserved;
|
|
64066
65347
|
}.call(this));
|
|
64067
|
-
},{"./utils":
|
|
65348
|
+
},{"./utils":275}],272:[function(require,module,exports){
|
|
64068
65349
|
(function (Buffer){
|
|
64069
65350
|
(function () {
|
|
64070
65351
|
var NumberT, StringT, utils;
|
|
@@ -64138,7 +65419,7 @@ module.exports = require('./lib/_stream_writable.js');
|
|
|
64138
65419
|
module.exports = StringT;
|
|
64139
65420
|
}.call(this));
|
|
64140
65421
|
}).call(this,require("buffer").Buffer)
|
|
64141
|
-
},{"./Number":
|
|
65422
|
+
},{"./Number":268,"./utils":275,"buffer":55}],273:[function(require,module,exports){
|
|
64142
65423
|
(function () {
|
|
64143
65424
|
var Struct, utils;
|
|
64144
65425
|
utils = require('./utils');
|
|
@@ -64247,7 +65528,7 @@ module.exports = require('./lib/_stream_writable.js');
|
|
|
64247
65528
|
}();
|
|
64248
65529
|
module.exports = Struct;
|
|
64249
65530
|
}.call(this));
|
|
64250
|
-
},{"./utils":
|
|
65531
|
+
},{"./utils":275}],274:[function(require,module,exports){
|
|
64251
65532
|
(function () {
|
|
64252
65533
|
var Struct, VersionedStruct, __hasProp = {}.hasOwnProperty, __extends = function (child, parent) {
|
|
64253
65534
|
for (var key in parent) {
|
|
@@ -64383,7 +65664,7 @@ module.exports = require('./lib/_stream_writable.js');
|
|
|
64383
65664
|
}(Struct);
|
|
64384
65665
|
module.exports = VersionedStruct;
|
|
64385
65666
|
}.call(this));
|
|
64386
|
-
},{"./Struct":
|
|
65667
|
+
},{"./Struct":273}],275:[function(require,module,exports){
|
|
64387
65668
|
(function () {
|
|
64388
65669
|
var NumberT, PropertyDescriptor;
|
|
64389
65670
|
NumberT = require('./Number').Number;
|
|
@@ -64420,7 +65701,7 @@ module.exports = require('./lib/_stream_writable.js');
|
|
|
64420
65701
|
}();
|
|
64421
65702
|
exports.PropertyDescriptor = PropertyDescriptor;
|
|
64422
65703
|
}.call(this));
|
|
64423
|
-
},{"./Number":
|
|
65704
|
+
},{"./Number":268}],276:[function(require,module,exports){
|
|
64424
65705
|
/* eslint-disable node/no-deprecated-api */
|
|
64425
65706
|
var buffer = require('buffer')
|
|
64426
65707
|
var Buffer = buffer.Buffer
|
|
@@ -64484,7 +65765,7 @@ SafeBuffer.allocUnsafeSlow = function (size) {
|
|
|
64484
65765
|
return buffer.SlowBuffer(size)
|
|
64485
65766
|
}
|
|
64486
65767
|
|
|
64487
|
-
},{"buffer":55}],
|
|
65768
|
+
},{"buffer":55}],277:[function(require,module,exports){
|
|
64488
65769
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
64489
65770
|
//
|
|
64490
65771
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -64613,304 +65894,7 @@ Stream.prototype.pipe = function(dest, options) {
|
|
|
64613
65894
|
return dest;
|
|
64614
65895
|
};
|
|
64615
65896
|
|
|
64616
|
-
},{"events":
|
|
64617
|
-
// Copyright Joyent, Inc. and other Node contributors.
|
|
64618
|
-
//
|
|
64619
|
-
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
64620
|
-
// copy of this software and associated documentation files (the
|
|
64621
|
-
// "Software"), to deal in the Software without restriction, including
|
|
64622
|
-
// without limitation the rights to use, copy, modify, merge, publish,
|
|
64623
|
-
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
64624
|
-
// persons to whom the Software is furnished to do so, subject to the
|
|
64625
|
-
// following conditions:
|
|
64626
|
-
//
|
|
64627
|
-
// The above copyright notice and this permission notice shall be included
|
|
64628
|
-
// in all copies or substantial portions of the Software.
|
|
64629
|
-
//
|
|
64630
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
64631
|
-
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
64632
|
-
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
64633
|
-
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
64634
|
-
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
64635
|
-
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
64636
|
-
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
64637
|
-
|
|
64638
|
-
'use strict';
|
|
64639
|
-
|
|
64640
|
-
/*<replacement>*/
|
|
64641
|
-
|
|
64642
|
-
var Buffer = require('safe-buffer').Buffer;
|
|
64643
|
-
/*</replacement>*/
|
|
64644
|
-
|
|
64645
|
-
var isEncoding = Buffer.isEncoding || function (encoding) {
|
|
64646
|
-
encoding = '' + encoding;
|
|
64647
|
-
switch (encoding && encoding.toLowerCase()) {
|
|
64648
|
-
case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
|
|
64649
|
-
return true;
|
|
64650
|
-
default:
|
|
64651
|
-
return false;
|
|
64652
|
-
}
|
|
64653
|
-
};
|
|
64654
|
-
|
|
64655
|
-
function _normalizeEncoding(enc) {
|
|
64656
|
-
if (!enc) return 'utf8';
|
|
64657
|
-
var retried;
|
|
64658
|
-
while (true) {
|
|
64659
|
-
switch (enc) {
|
|
64660
|
-
case 'utf8':
|
|
64661
|
-
case 'utf-8':
|
|
64662
|
-
return 'utf8';
|
|
64663
|
-
case 'ucs2':
|
|
64664
|
-
case 'ucs-2':
|
|
64665
|
-
case 'utf16le':
|
|
64666
|
-
case 'utf-16le':
|
|
64667
|
-
return 'utf16le';
|
|
64668
|
-
case 'latin1':
|
|
64669
|
-
case 'binary':
|
|
64670
|
-
return 'latin1';
|
|
64671
|
-
case 'base64':
|
|
64672
|
-
case 'ascii':
|
|
64673
|
-
case 'hex':
|
|
64674
|
-
return enc;
|
|
64675
|
-
default:
|
|
64676
|
-
if (retried) return; // undefined
|
|
64677
|
-
enc = ('' + enc).toLowerCase();
|
|
64678
|
-
retried = true;
|
|
64679
|
-
}
|
|
64680
|
-
}
|
|
64681
|
-
};
|
|
64682
|
-
|
|
64683
|
-
// Do not cache `Buffer.isEncoding` when checking encoding names as some
|
|
64684
|
-
// modules monkey-patch it to support additional encodings
|
|
64685
|
-
function normalizeEncoding(enc) {
|
|
64686
|
-
var nenc = _normalizeEncoding(enc);
|
|
64687
|
-
if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
|
|
64688
|
-
return nenc || enc;
|
|
64689
|
-
}
|
|
64690
|
-
|
|
64691
|
-
// StringDecoder provides an interface for efficiently splitting a series of
|
|
64692
|
-
// buffers into a series of JS strings without breaking apart multi-byte
|
|
64693
|
-
// characters.
|
|
64694
|
-
exports.StringDecoder = StringDecoder;
|
|
64695
|
-
function StringDecoder(encoding) {
|
|
64696
|
-
this.encoding = normalizeEncoding(encoding);
|
|
64697
|
-
var nb;
|
|
64698
|
-
switch (this.encoding) {
|
|
64699
|
-
case 'utf16le':
|
|
64700
|
-
this.text = utf16Text;
|
|
64701
|
-
this.end = utf16End;
|
|
64702
|
-
nb = 4;
|
|
64703
|
-
break;
|
|
64704
|
-
case 'utf8':
|
|
64705
|
-
this.fillLast = utf8FillLast;
|
|
64706
|
-
nb = 4;
|
|
64707
|
-
break;
|
|
64708
|
-
case 'base64':
|
|
64709
|
-
this.text = base64Text;
|
|
64710
|
-
this.end = base64End;
|
|
64711
|
-
nb = 3;
|
|
64712
|
-
break;
|
|
64713
|
-
default:
|
|
64714
|
-
this.write = simpleWrite;
|
|
64715
|
-
this.end = simpleEnd;
|
|
64716
|
-
return;
|
|
64717
|
-
}
|
|
64718
|
-
this.lastNeed = 0;
|
|
64719
|
-
this.lastTotal = 0;
|
|
64720
|
-
this.lastChar = Buffer.allocUnsafe(nb);
|
|
64721
|
-
}
|
|
64722
|
-
|
|
64723
|
-
StringDecoder.prototype.write = function (buf) {
|
|
64724
|
-
if (buf.length === 0) return '';
|
|
64725
|
-
var r;
|
|
64726
|
-
var i;
|
|
64727
|
-
if (this.lastNeed) {
|
|
64728
|
-
r = this.fillLast(buf);
|
|
64729
|
-
if (r === undefined) return '';
|
|
64730
|
-
i = this.lastNeed;
|
|
64731
|
-
this.lastNeed = 0;
|
|
64732
|
-
} else {
|
|
64733
|
-
i = 0;
|
|
64734
|
-
}
|
|
64735
|
-
if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
|
|
64736
|
-
return r || '';
|
|
64737
|
-
};
|
|
64738
|
-
|
|
64739
|
-
StringDecoder.prototype.end = utf8End;
|
|
64740
|
-
|
|
64741
|
-
// Returns only complete characters in a Buffer
|
|
64742
|
-
StringDecoder.prototype.text = utf8Text;
|
|
64743
|
-
|
|
64744
|
-
// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
|
|
64745
|
-
StringDecoder.prototype.fillLast = function (buf) {
|
|
64746
|
-
if (this.lastNeed <= buf.length) {
|
|
64747
|
-
buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
|
|
64748
|
-
return this.lastChar.toString(this.encoding, 0, this.lastTotal);
|
|
64749
|
-
}
|
|
64750
|
-
buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
|
|
64751
|
-
this.lastNeed -= buf.length;
|
|
64752
|
-
};
|
|
64753
|
-
|
|
64754
|
-
// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
|
|
64755
|
-
// continuation byte. If an invalid byte is detected, -2 is returned.
|
|
64756
|
-
function utf8CheckByte(byte) {
|
|
64757
|
-
if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
|
|
64758
|
-
return byte >> 6 === 0x02 ? -1 : -2;
|
|
64759
|
-
}
|
|
64760
|
-
|
|
64761
|
-
// Checks at most 3 bytes at the end of a Buffer in order to detect an
|
|
64762
|
-
// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
|
|
64763
|
-
// needed to complete the UTF-8 character (if applicable) are returned.
|
|
64764
|
-
function utf8CheckIncomplete(self, buf, i) {
|
|
64765
|
-
var j = buf.length - 1;
|
|
64766
|
-
if (j < i) return 0;
|
|
64767
|
-
var nb = utf8CheckByte(buf[j]);
|
|
64768
|
-
if (nb >= 0) {
|
|
64769
|
-
if (nb > 0) self.lastNeed = nb - 1;
|
|
64770
|
-
return nb;
|
|
64771
|
-
}
|
|
64772
|
-
if (--j < i || nb === -2) return 0;
|
|
64773
|
-
nb = utf8CheckByte(buf[j]);
|
|
64774
|
-
if (nb >= 0) {
|
|
64775
|
-
if (nb > 0) self.lastNeed = nb - 2;
|
|
64776
|
-
return nb;
|
|
64777
|
-
}
|
|
64778
|
-
if (--j < i || nb === -2) return 0;
|
|
64779
|
-
nb = utf8CheckByte(buf[j]);
|
|
64780
|
-
if (nb >= 0) {
|
|
64781
|
-
if (nb > 0) {
|
|
64782
|
-
if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
|
|
64783
|
-
}
|
|
64784
|
-
return nb;
|
|
64785
|
-
}
|
|
64786
|
-
return 0;
|
|
64787
|
-
}
|
|
64788
|
-
|
|
64789
|
-
// Validates as many continuation bytes for a multi-byte UTF-8 character as
|
|
64790
|
-
// needed or are available. If we see a non-continuation byte where we expect
|
|
64791
|
-
// one, we "replace" the validated continuation bytes we've seen so far with
|
|
64792
|
-
// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
|
|
64793
|
-
// behavior. The continuation byte check is included three times in the case
|
|
64794
|
-
// where all of the continuation bytes for a character exist in the same buffer.
|
|
64795
|
-
// It is also done this way as a slight performance increase instead of using a
|
|
64796
|
-
// loop.
|
|
64797
|
-
function utf8CheckExtraBytes(self, buf, p) {
|
|
64798
|
-
if ((buf[0] & 0xC0) !== 0x80) {
|
|
64799
|
-
self.lastNeed = 0;
|
|
64800
|
-
return '\ufffd';
|
|
64801
|
-
}
|
|
64802
|
-
if (self.lastNeed > 1 && buf.length > 1) {
|
|
64803
|
-
if ((buf[1] & 0xC0) !== 0x80) {
|
|
64804
|
-
self.lastNeed = 1;
|
|
64805
|
-
return '\ufffd';
|
|
64806
|
-
}
|
|
64807
|
-
if (self.lastNeed > 2 && buf.length > 2) {
|
|
64808
|
-
if ((buf[2] & 0xC0) !== 0x80) {
|
|
64809
|
-
self.lastNeed = 2;
|
|
64810
|
-
return '\ufffd';
|
|
64811
|
-
}
|
|
64812
|
-
}
|
|
64813
|
-
}
|
|
64814
|
-
}
|
|
64815
|
-
|
|
64816
|
-
// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
|
|
64817
|
-
function utf8FillLast(buf) {
|
|
64818
|
-
var p = this.lastTotal - this.lastNeed;
|
|
64819
|
-
var r = utf8CheckExtraBytes(this, buf, p);
|
|
64820
|
-
if (r !== undefined) return r;
|
|
64821
|
-
if (this.lastNeed <= buf.length) {
|
|
64822
|
-
buf.copy(this.lastChar, p, 0, this.lastNeed);
|
|
64823
|
-
return this.lastChar.toString(this.encoding, 0, this.lastTotal);
|
|
64824
|
-
}
|
|
64825
|
-
buf.copy(this.lastChar, p, 0, buf.length);
|
|
64826
|
-
this.lastNeed -= buf.length;
|
|
64827
|
-
}
|
|
64828
|
-
|
|
64829
|
-
// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
|
|
64830
|
-
// partial character, the character's bytes are buffered until the required
|
|
64831
|
-
// number of bytes are available.
|
|
64832
|
-
function utf8Text(buf, i) {
|
|
64833
|
-
var total = utf8CheckIncomplete(this, buf, i);
|
|
64834
|
-
if (!this.lastNeed) return buf.toString('utf8', i);
|
|
64835
|
-
this.lastTotal = total;
|
|
64836
|
-
var end = buf.length - (total - this.lastNeed);
|
|
64837
|
-
buf.copy(this.lastChar, 0, end);
|
|
64838
|
-
return buf.toString('utf8', i, end);
|
|
64839
|
-
}
|
|
64840
|
-
|
|
64841
|
-
// For UTF-8, a replacement character is added when ending on a partial
|
|
64842
|
-
// character.
|
|
64843
|
-
function utf8End(buf) {
|
|
64844
|
-
var r = buf && buf.length ? this.write(buf) : '';
|
|
64845
|
-
if (this.lastNeed) return r + '\ufffd';
|
|
64846
|
-
return r;
|
|
64847
|
-
}
|
|
64848
|
-
|
|
64849
|
-
// UTF-16LE typically needs two bytes per character, but even if we have an even
|
|
64850
|
-
// number of bytes available, we need to check if we end on a leading/high
|
|
64851
|
-
// surrogate. In that case, we need to wait for the next two bytes in order to
|
|
64852
|
-
// decode the last character properly.
|
|
64853
|
-
function utf16Text(buf, i) {
|
|
64854
|
-
if ((buf.length - i) % 2 === 0) {
|
|
64855
|
-
var r = buf.toString('utf16le', i);
|
|
64856
|
-
if (r) {
|
|
64857
|
-
var c = r.charCodeAt(r.length - 1);
|
|
64858
|
-
if (c >= 0xD800 && c <= 0xDBFF) {
|
|
64859
|
-
this.lastNeed = 2;
|
|
64860
|
-
this.lastTotal = 4;
|
|
64861
|
-
this.lastChar[0] = buf[buf.length - 2];
|
|
64862
|
-
this.lastChar[1] = buf[buf.length - 1];
|
|
64863
|
-
return r.slice(0, -1);
|
|
64864
|
-
}
|
|
64865
|
-
}
|
|
64866
|
-
return r;
|
|
64867
|
-
}
|
|
64868
|
-
this.lastNeed = 1;
|
|
64869
|
-
this.lastTotal = 2;
|
|
64870
|
-
this.lastChar[0] = buf[buf.length - 1];
|
|
64871
|
-
return buf.toString('utf16le', i, buf.length - 1);
|
|
64872
|
-
}
|
|
64873
|
-
|
|
64874
|
-
// For UTF-16LE we do not explicitly append special replacement characters if we
|
|
64875
|
-
// end on a partial character, we simply let v8 handle that.
|
|
64876
|
-
function utf16End(buf) {
|
|
64877
|
-
var r = buf && buf.length ? this.write(buf) : '';
|
|
64878
|
-
if (this.lastNeed) {
|
|
64879
|
-
var end = this.lastTotal - this.lastNeed;
|
|
64880
|
-
return r + this.lastChar.toString('utf16le', 0, end);
|
|
64881
|
-
}
|
|
64882
|
-
return r;
|
|
64883
|
-
}
|
|
64884
|
-
|
|
64885
|
-
function base64Text(buf, i) {
|
|
64886
|
-
var n = (buf.length - i) % 3;
|
|
64887
|
-
if (n === 0) return buf.toString('base64', i);
|
|
64888
|
-
this.lastNeed = 3 - n;
|
|
64889
|
-
this.lastTotal = 3;
|
|
64890
|
-
if (n === 1) {
|
|
64891
|
-
this.lastChar[0] = buf[buf.length - 1];
|
|
64892
|
-
} else {
|
|
64893
|
-
this.lastChar[0] = buf[buf.length - 2];
|
|
64894
|
-
this.lastChar[1] = buf[buf.length - 1];
|
|
64895
|
-
}
|
|
64896
|
-
return buf.toString('base64', i, buf.length - n);
|
|
64897
|
-
}
|
|
64898
|
-
|
|
64899
|
-
function base64End(buf) {
|
|
64900
|
-
var r = buf && buf.length ? this.write(buf) : '';
|
|
64901
|
-
if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
|
|
64902
|
-
return r;
|
|
64903
|
-
}
|
|
64904
|
-
|
|
64905
|
-
// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
|
|
64906
|
-
function simpleWrite(buf) {
|
|
64907
|
-
return buf.toString(this.encoding);
|
|
64908
|
-
}
|
|
64909
|
-
|
|
64910
|
-
function simpleEnd(buf) {
|
|
64911
|
-
return buf && buf.length ? this.write(buf) : '';
|
|
64912
|
-
}
|
|
64913
|
-
},{"safe-buffer":273}],276:[function(require,module,exports){
|
|
65897
|
+
},{"events":231,"inherits":234,"readable-stream/duplex.js":245,"readable-stream/passthrough.js":255,"readable-stream/readable.js":256,"readable-stream/transform.js":257,"readable-stream/writable.js":258}],278:[function(require,module,exports){
|
|
64914
65898
|
(function (setImmediate,clearImmediate){
|
|
64915
65899
|
var nextTick = require('process/browser.js').nextTick;
|
|
64916
65900
|
var apply = Function.prototype.apply;
|
|
@@ -64989,7 +65973,7 @@ exports.clearImmediate = typeof clearImmediate === "function" ? clearImmediate :
|
|
|
64989
65973
|
delete immediateIds[id];
|
|
64990
65974
|
};
|
|
64991
65975
|
}).call(this,require("timers").setImmediate,require("timers").clearImmediate)
|
|
64992
|
-
},{"process/browser.js":
|
|
65976
|
+
},{"process/browser.js":244,"timers":278}],279:[function(require,module,exports){
|
|
64993
65977
|
var TINF_OK = 0;
|
|
64994
65978
|
var TINF_DATA_ERROR = -3;
|
|
64995
65979
|
|
|
@@ -65366,7 +66350,7 @@ length_base[28] = 258;
|
|
|
65366
66350
|
|
|
65367
66351
|
module.exports = tinf_uncompress;
|
|
65368
66352
|
|
|
65369
|
-
},{}],
|
|
66353
|
+
},{}],280:[function(require,module,exports){
|
|
65370
66354
|
'use strict'
|
|
65371
66355
|
|
|
65372
66356
|
exports.byteLength = byteLength
|
|
@@ -65518,7 +66502,7 @@ function fromByteArray (uint8) {
|
|
|
65518
66502
|
return parts.join('')
|
|
65519
66503
|
}
|
|
65520
66504
|
|
|
65521
|
-
},{}],
|
|
66505
|
+
},{}],281:[function(require,module,exports){
|
|
65522
66506
|
const inflate = require('tiny-inflate');
|
|
65523
66507
|
const { swap32LE } = require('./swap');
|
|
65524
66508
|
|
|
@@ -65655,7 +66639,7 @@ class UnicodeTrie {
|
|
|
65655
66639
|
}
|
|
65656
66640
|
|
|
65657
66641
|
module.exports = UnicodeTrie;
|
|
65658
|
-
},{"./swap":
|
|
66642
|
+
},{"./swap":282,"tiny-inflate":279}],282:[function(require,module,exports){
|
|
65659
66643
|
const isBigEndian = (new Uint8Array(new Uint32Array([0x12345678]).buffer)[0] === 0x12);
|
|
65660
66644
|
|
|
65661
66645
|
const swap = (b, n, m) => {
|
|
@@ -65682,7 +66666,7 @@ module.exports = {
|
|
|
65682
66666
|
swap32LE: swap32LE
|
|
65683
66667
|
};
|
|
65684
66668
|
|
|
65685
|
-
},{}],
|
|
66669
|
+
},{}],283:[function(require,module,exports){
|
|
65686
66670
|
'use strict';
|
|
65687
66671
|
|
|
65688
66672
|
var UnicodeTrie = require('unicode-trie');
|
|
@@ -65829,7 +66813,7 @@ var unicodeProperties = buildUnicodeProperties(data, trie);
|
|
|
65829
66813
|
module.exports = unicodeProperties;
|
|
65830
66814
|
|
|
65831
66815
|
|
|
65832
|
-
},{"base64-js":
|
|
66816
|
+
},{"base64-js":280,"unicode-trie":281}],284:[function(require,module,exports){
|
|
65833
66817
|
// Generated by CoffeeScript 1.7.1
|
|
65834
66818
|
var UnicodeTrie, inflate;
|
|
65835
66819
|
|
|
@@ -65922,7 +66906,7 @@ UnicodeTrie = (function() {
|
|
|
65922
66906
|
|
|
65923
66907
|
module.exports = UnicodeTrie;
|
|
65924
66908
|
|
|
65925
|
-
},{"tiny-inflate":
|
|
66909
|
+
},{"tiny-inflate":279}],285:[function(require,module,exports){
|
|
65926
66910
|
(function (global){
|
|
65927
66911
|
|
|
65928
66912
|
/**
|
|
@@ -65993,9 +66977,9 @@ function config (name) {
|
|
|
65993
66977
|
}
|
|
65994
66978
|
|
|
65995
66979
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
65996
|
-
},{}],
|
|
66980
|
+
},{}],286:[function(require,module,exports){
|
|
65997
66981
|
arguments[4][4][0].apply(exports,arguments)
|
|
65998
|
-
},{"dup":4}],
|
|
66982
|
+
},{"dup":4}],287:[function(require,module,exports){
|
|
65999
66983
|
arguments[4][5][0].apply(exports,arguments)
|
|
66000
|
-
},{"./support/isBuffer":
|
|
66984
|
+
},{"./support/isBuffer":286,"_process":244,"dup":5,"inherits":234}]},{},[1])(1)
|
|
66001
66985
|
});
|