ag-psd 31.0.0 → 31.0.2
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/.v8-cache/v24.13.1-x64-cf738c9d/03e19709 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/1130885f +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/4511bacf +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/7ea06cea +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/932f0770 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/9ed80ba5 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/a7e80865 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/acc36e66 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/b3c2fab7 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/c314aece +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/cfc49f4f +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/cff9434a +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/e03e2acd +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/eeeebdfe +0 -0
- package/CHANGELOG.md +3 -0
- package/dist/abr.js +2 -6
- package/dist/abr.js.map +1 -1
- package/dist/additionalInfo.js +6 -6
- package/dist/additionalInfo.js.map +1 -1
- package/dist/ase.js +2 -0
- package/dist/ase.js.map +1 -1
- package/dist/bundle.js +222 -2282
- package/dist/descriptor.d.ts +2 -2
- package/dist/descriptor.js +4 -3
- package/dist/descriptor.js.map +1 -1
- package/dist/engineData.js +1 -1
- package/dist/helpers.d.ts +3 -1
- package/dist/helpers.js +1 -1
- package/dist/helpers.js.map +1 -1
- package/dist/imageResources.js +12 -7
- package/dist/imageResources.js.map +1 -1
- package/dist/jpeg.js +18 -6
- package/dist/jpeg.js.map +1 -1
- package/dist/psd.d.ts +2 -2
- package/dist/psd.js +2 -0
- package/dist/psd.js.map +1 -1
- package/dist/psdReader.js +49 -19
- package/dist/psdReader.js.map +1 -1
- package/dist/psdWriter.js +9 -3
- package/dist/psdWriter.js.map +1 -1
- package/dist/utf8.js +92 -81
- package/dist/utf8.js.map +1 -1
- package/dist-es/abr.js +2 -6
- package/dist-es/abr.js.map +1 -1
- package/dist-es/additionalInfo.js +6 -6
- package/dist-es/additionalInfo.js.map +1 -1
- package/dist-es/ase.js +2 -0
- package/dist-es/ase.js.map +1 -1
- package/dist-es/descriptor.d.ts +2 -2
- package/dist-es/descriptor.js +4 -3
- package/dist-es/descriptor.js.map +1 -1
- package/dist-es/engineData.js +1 -1
- package/dist-es/helpers.d.ts +3 -1
- package/dist-es/helpers.js +1 -1
- package/dist-es/helpers.js.map +1 -1
- package/dist-es/imageResources.js +12 -7
- package/dist-es/imageResources.js.map +1 -1
- package/dist-es/jpeg.js +18 -6
- package/dist-es/jpeg.js.map +1 -1
- package/dist-es/psd.d.ts +2 -2
- package/dist-es/psd.js +2 -0
- package/dist-es/psd.js.map +1 -1
- package/dist-es/psdReader.js +49 -19
- package/dist-es/psdReader.js.map +1 -1
- package/dist-es/psdWriter.js +9 -3
- package/dist-es/psdWriter.js.map +1 -1
- package/dist-es/utf8.js +92 -81
- package/dist-es/utf8.js.map +1 -1
- package/package.json +1 -1
- package/src/abr.ts +2 -4
- package/src/additionalInfo.ts +6 -6
- package/src/ase.ts +2 -1
- package/src/descriptor.ts +5 -4
- package/src/engineData.ts +1 -1
- package/src/helpers.ts +6 -3
- package/src/imageResources.ts +10 -6
- package/src/jpeg.ts +19 -7
- package/src/psd.ts +4 -2
- package/src/psdReader.ts +51 -16
- package/src/psdWriter.ts +11 -3
- package/src/utf8.ts +178 -168
package/dist/bundle.js
CHANGED
|
@@ -71,7 +71,7 @@ function parseBrushShape(desc) {
|
|
|
71
71
|
case 'dTips': {
|
|
72
72
|
return Object.assign(Object.assign({ type: 'tips', angle: (0, descriptor_1.parseAngle)(desc.Angl), size: (0, descriptor_1.parseUnitsToNumber)(desc.Dmtr, 'Pixels'), shape: dynamicBrushShapeShapes[desc['Shp ']], physics: desc.physics, spacing: (0, descriptor_1.parsePercent)(desc.Spcn), spacingOn: desc.Intr, flipX: desc.flipX, flipY: desc.flipY,
|
|
73
73
|
// tips:
|
|
74
|
-
tipsType: tipsBrushShapeShapes[desc.dtipsType], tipsLengthRatio: (0, descriptor_1.parsePercent)(desc.dtipsLengthRatio), tipsHardness: (0, descriptor_1.parsePercent)(desc.dtipsHardness) }, (desc.dtipsGridSize && desc.dtipsErodibleTipHeightMap ? {
|
|
74
|
+
tipsType: tipsBrushShapeShapes[desc.dtipsType], tipsLengthRatio: (0, descriptor_1.parsePercent)(desc.dtipsLengthRatio), tipsHardness: (0, descriptor_1.parsePercent)(desc.dtipsHardness) }, ((desc.dtipsGridSize && desc.dtipsErodibleTipHeightMap) ? {
|
|
75
75
|
tipsGridSize: desc.dtipsGridSize,
|
|
76
76
|
tipsErodibleTipHeightMap: parseHeightmap(desc.dtipsErodibleTipHeightMap),
|
|
77
77
|
} : {})), {
|
|
@@ -79,7 +79,7 @@ function parseBrushShape(desc) {
|
|
|
79
79
|
tipsAirbrushCutoffAngle: desc.dtipsAirbrushCutoffAngle, tipsAirbrushGranularity: (0, descriptor_1.parsePercent)(desc.dtipsAirbrushGranularity), tipsAirbrushStreakiness: (0, descriptor_1.parsePercent)(desc.dtipsAirbrushStreakiness), tipsAirbrushSplatSize: (0, descriptor_1.parsePercent)(desc.dtipsAirbrushSplatSize), tipsAirbrushSplatCount: desc.dtipsAirbrushSplatCount });
|
|
80
80
|
}
|
|
81
81
|
default:
|
|
82
|
-
console.log(require('util').inspect(desc, false, 99, true));
|
|
82
|
+
// console.log(require('util').inspect(desc, false, 99, true));
|
|
83
83
|
throw new Error(`Unknown brush classId: ${desc._classID}`);
|
|
84
84
|
}
|
|
85
85
|
}
|
|
@@ -313,10 +313,6 @@ function readAbr(buffer, options = {}) {
|
|
|
313
313
|
b.toolOptions.smudgeSampleAllLayers = to.SmdS;
|
|
314
314
|
if ('Prs ' in to)
|
|
315
315
|
b.toolOptions.strength = to['Prs '];
|
|
316
|
-
if ('SmdF' in to)
|
|
317
|
-
b.toolOptions.smudgeFingerPainting = to.SmdF;
|
|
318
|
-
if ('SmdS' in to)
|
|
319
|
-
b.toolOptions.smudgeSampleAllLayers = to.SmdS;
|
|
320
316
|
}
|
|
321
317
|
brushes.push(b);
|
|
322
318
|
}
|
|
@@ -364,7 +360,7 @@ function readAbr(buffer, options = {}) {
|
|
|
364
360
|
return { samples, patterns, brushes };
|
|
365
361
|
}
|
|
366
362
|
|
|
367
|
-
},{"./descriptor":4,"./psdReader":13
|
|
363
|
+
},{"./descriptor":4,"./psdReader":13}],2:[function(require,module,exports){
|
|
368
364
|
"use strict";
|
|
369
365
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
370
366
|
exports.booleanOperations = exports.infoHandlersMap = exports.infoHandlers = void 0;
|
|
@@ -1360,8 +1356,8 @@ addHandler('PlLd', hasKey('placedLayer'), (reader, target, left) => {
|
|
|
1360
1356
|
throw new Error('Placed layer ID must be in a GUID format (example: 20953ddb-9391-11ec-b4f1-c15674f50bc4)');
|
|
1361
1357
|
}
|
|
1362
1358
|
(0, psdWriter_1.writePascalString)(writer, placed.id, 1);
|
|
1363
|
-
(0, psdWriter_1.writeInt32)(writer, 1);
|
|
1364
|
-
(0, psdWriter_1.writeInt32)(writer, 1);
|
|
1359
|
+
(0, psdWriter_1.writeInt32)(writer, placed.pageNumber || 1);
|
|
1360
|
+
(0, psdWriter_1.writeInt32)(writer, placed.totalPages || 1);
|
|
1365
1361
|
(0, psdWriter_1.writeInt32)(writer, 16); // anitAliasPolicy
|
|
1366
1362
|
if (placedLayerTypes.indexOf(placed.type) === -1)
|
|
1367
1363
|
throw new Error('Invalid placedLayer type');
|
|
@@ -2554,8 +2550,8 @@ if (helpers_1.MOCK_HANDLERS) {
|
|
|
2554
2550
|
addHandler('GenI', // generative tech
|
|
2555
2551
|
// generative tech
|
|
2556
2552
|
target => target._GenI !== undefined, (reader, target, left) => {
|
|
2557
|
-
const desc =
|
|
2558
|
-
console.log('GenI', require('util').inspect(desc, false, 99, true));
|
|
2553
|
+
// const desc = readVersionAndDescriptor(reader, true); // as GenIDescriptor;
|
|
2554
|
+
// console.log('GenI', require('util').inspect(desc, false, 99, true));
|
|
2559
2555
|
target._GenI = (0, psdReader_1.readBytes)(reader, left());
|
|
2560
2556
|
}, (writer, target) => {
|
|
2561
2557
|
(0, psdWriter_1.writeBytes)(writer, target._GenI);
|
|
@@ -2913,8 +2909,8 @@ addHandler('levl', adjustmentType('levels'), (reader, target, left) => {
|
|
|
2913
2909
|
(0, psdWriter_1.writeUint16)(writer, 2); // version
|
|
2914
2910
|
writeLevelsChannel(writer, info.rgb || defaultChannel);
|
|
2915
2911
|
writeLevelsChannel(writer, info.red || defaultChannel);
|
|
2916
|
-
writeLevelsChannel(writer, info.blue || defaultChannel);
|
|
2917
2912
|
writeLevelsChannel(writer, info.green || defaultChannel);
|
|
2913
|
+
writeLevelsChannel(writer, info.blue || defaultChannel);
|
|
2918
2914
|
for (let i = 0; i < 59; i++)
|
|
2919
2915
|
writeLevelsChannel(writer, defaultChannel);
|
|
2920
2916
|
});
|
|
@@ -3221,7 +3217,7 @@ addHandler('mixr', adjustmentType('channel mixer'), (reader, target, left) => {
|
|
|
3221
3217
|
writeMixrChannel(writer, info.gray);
|
|
3222
3218
|
}
|
|
3223
3219
|
});
|
|
3224
|
-
const colorLookupType = (0, helpers_1.createEnum)('colorLookupType', '
|
|
3220
|
+
const colorLookupType = (0, helpers_1.createEnum)('colorLookupType', '3dlut', {
|
|
3225
3221
|
'3dlut': '3DLUT',
|
|
3226
3222
|
abstractProfile: 'abstractProfile',
|
|
3227
3223
|
deviceLinkProfile: 'deviceLinkProfile',
|
|
@@ -3844,7 +3840,7 @@ addHandler('tsly', hasKey('transparencyShapesLayer'), (reader, target) => {
|
|
|
3844
3840
|
(0, psdWriter_1.writeZeros)(writer, 3);
|
|
3845
3841
|
});
|
|
3846
3842
|
|
|
3847
|
-
},{"./descriptor":4,"./effectsHelpers":5,"./engineData":6,"./engineData2":7,"./helpers":8,"./psdReader":13,"./psdWriter":14,"./text":15,"base64-js":
|
|
3843
|
+
},{"./descriptor":4,"./effectsHelpers":5,"./engineData":6,"./engineData2":7,"./helpers":8,"./psdReader":13,"./psdWriter":14,"./text":15,"base64-js":17}],3:[function(require,module,exports){
|
|
3848
3844
|
"use strict";
|
|
3849
3845
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3850
3846
|
exports.readCsh = readCsh;
|
|
@@ -5644,6 +5640,7 @@ exports.BlnM = (0, helpers_1.createEnum)('BlnM', 'normal', {
|
|
|
5644
5640
|
'linear height': 'linearHeight',
|
|
5645
5641
|
'height': 'Hght',
|
|
5646
5642
|
'subtraction': 'Sbtr', // 2nd version of subtract ?
|
|
5643
|
+
'pass through': '????', // added for compilation to work, not used in actual files
|
|
5647
5644
|
});
|
|
5648
5645
|
exports.BESl = (0, helpers_1.createEnum)('BESl', 'inner bevel', {
|
|
5649
5646
|
'inner bevel': 'InrB',
|
|
@@ -5745,7 +5742,7 @@ exports.strokeStyleLineAlignment = (0, helpers_1.createEnum)('strokeStyleLineAli
|
|
|
5745
5742
|
center: 'strokeStyleAlignCenter',
|
|
5746
5743
|
outside: 'strokeStyleAlignOutside',
|
|
5747
5744
|
});
|
|
5748
|
-
exports.BlrM = (0, helpers_1.createEnum)('BlrM', '
|
|
5745
|
+
exports.BlrM = (0, helpers_1.createEnum)('BlrM', 'spin', {
|
|
5749
5746
|
spin: 'Spn ',
|
|
5750
5747
|
zoom: 'Zm ',
|
|
5751
5748
|
});
|
|
@@ -5858,7 +5855,7 @@ exports.WndM = (0, helpers_1.createEnum)('WndM', 'wind', {
|
|
|
5858
5855
|
blast: 'Blst',
|
|
5859
5856
|
stagger: 'Stgr',
|
|
5860
5857
|
});
|
|
5861
|
-
exports.Drct = (0, helpers_1.createEnum)('Drct', '
|
|
5858
|
+
exports.Drct = (0, helpers_1.createEnum)('Drct', 'right', {
|
|
5862
5859
|
left: 'Left',
|
|
5863
5860
|
right: 'Rght',
|
|
5864
5861
|
});
|
|
@@ -5881,7 +5878,7 @@ exports.prjM = (0, helpers_1.createEnum)('prjM', 'fisheye', {
|
|
|
5881
5878
|
'auto': 'auto',
|
|
5882
5879
|
'full spherical': 'fusP',
|
|
5883
5880
|
});
|
|
5884
|
-
exports.presetKindType = (0, helpers_1.createEnum)('presetKindType', '
|
|
5881
|
+
exports.presetKindType = (0, helpers_1.createEnum)('presetKindType', 'custom', {
|
|
5885
5882
|
custom: 'presetKindCustom',
|
|
5886
5883
|
default: 'presetKindDefault',
|
|
5887
5884
|
});
|
|
@@ -6406,7 +6403,7 @@ function serializeEngineData(data, condensed = false) {
|
|
|
6406
6403
|
function getKeys(value) {
|
|
6407
6404
|
const keys = Object.keys(value);
|
|
6408
6405
|
if (keys.indexOf('98') !== -1)
|
|
6409
|
-
keys.unshift(...keys.splice(keys.indexOf('
|
|
6406
|
+
keys.unshift(...keys.splice(keys.indexOf('98'), 1));
|
|
6410
6407
|
if (keys.indexOf('99') !== -1)
|
|
6411
6408
|
keys.unshift(...keys.splice(keys.indexOf('99'), 1));
|
|
6412
6409
|
return keys;
|
|
@@ -7010,7 +7007,7 @@ function createEnum(prefix, def, map) {
|
|
|
7010
7007
|
const encode = (val) => {
|
|
7011
7008
|
if (val && !map[val])
|
|
7012
7009
|
throw new Error(`Invalid value for enum: '${val}'`);
|
|
7013
|
-
return `${prefix}.${map[val]
|
|
7010
|
+
return `${prefix}.${val ? map[val] : map[def]}`;
|
|
7014
7011
|
};
|
|
7015
7012
|
return { decode, encode };
|
|
7016
7013
|
}
|
|
@@ -7276,7 +7273,7 @@ function initializeCanvas(createCanvasMethod, createImageDataMethod) {
|
|
|
7276
7273
|
exports.createImageData = createImageDataMethod || exports.createImageData;
|
|
7277
7274
|
}
|
|
7278
7275
|
|
|
7279
|
-
},{"./jpeg":11,"pako":
|
|
7276
|
+
},{"./jpeg":11,"pako":20}],9:[function(require,module,exports){
|
|
7280
7277
|
"use strict";
|
|
7281
7278
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7282
7279
|
exports.resourceHandlersMap = exports.resourceHandlers = void 0;
|
|
@@ -7298,7 +7295,11 @@ const RESOLUTION_UNITS = [undefined, 'PPI', 'PPCM'];
|
|
|
7298
7295
|
const MEASUREMENT_UNITS = [undefined, 'Inches', 'Centimeters', 'Points', 'Picas', 'Columns'];
|
|
7299
7296
|
const hex = '0123456789abcdef';
|
|
7300
7297
|
function charToNibble(code) {
|
|
7301
|
-
|
|
7298
|
+
if (code <= 57)
|
|
7299
|
+
return code - 48; // '0'-'9'
|
|
7300
|
+
if (code >= 97)
|
|
7301
|
+
return code - 87; // 'a'-'f'
|
|
7302
|
+
return code - 55; // 'A'-'F'
|
|
7302
7303
|
}
|
|
7303
7304
|
function byteAt(value, index) {
|
|
7304
7305
|
return (charToNibble(value.charCodeAt(index)) << 4) | charToNibble(value.charCodeAt(index + 1));
|
|
@@ -7322,12 +7323,13 @@ function readEncodedString(reader) {
|
|
|
7322
7323
|
}
|
|
7323
7324
|
}
|
|
7324
7325
|
if (notAscii) {
|
|
7325
|
-
|
|
7326
|
-
|
|
7327
|
-
|
|
7328
|
-
|
|
7329
|
-
|
|
7326
|
+
try {
|
|
7327
|
+
const decoder = new TextDecoder('gbk');
|
|
7328
|
+
return decoder.decode(buffer);
|
|
7329
|
+
}
|
|
7330
|
+
catch (_a) { }
|
|
7330
7331
|
}
|
|
7332
|
+
return (0, utf8_1.decodeString)(buffer);
|
|
7331
7333
|
}
|
|
7332
7334
|
function writeEncodedString(writer, value) {
|
|
7333
7335
|
let ascii = '';
|
|
@@ -8182,7 +8184,7 @@ helpers_1.MOCK_HANDLERS && addHandler(1025, target => target._ir1025 !== undefin
|
|
|
8182
8184
|
}, (writer, target) => {
|
|
8183
8185
|
(0, psdWriter_1.writeBytes)(writer, target._ir1025);
|
|
8184
8186
|
});
|
|
8185
|
-
const FrmD = (0, helpers_1.createEnum)('FrmD', '', {
|
|
8187
|
+
const FrmD = (0, helpers_1.createEnum)('FrmD', 'auto', {
|
|
8186
8188
|
auto: 'Auto',
|
|
8187
8189
|
none: 'None',
|
|
8188
8190
|
dispose: 'Disp',
|
|
@@ -8318,7 +8320,7 @@ target => target._ir4002 !== undefined, (reader, target, left) => {
|
|
|
8318
8320
|
(0, psdWriter_1.writeBytes)(writer, target._ir4002);
|
|
8319
8321
|
});
|
|
8320
8322
|
|
|
8321
|
-
},{"./descriptor":4,"./helpers":8,"./psdReader":13,"./psdWriter":14,"./utf8":16,"base64-js":
|
|
8323
|
+
},{"./descriptor":4,"./helpers":8,"./psdReader":13,"./psdWriter":14,"./utf8":16,"base64-js":17}],10:[function(require,module,exports){
|
|
8322
8324
|
(function (Buffer){(function (){
|
|
8323
8325
|
"use strict";
|
|
8324
8326
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
@@ -8383,7 +8385,7 @@ function writePsdBuffer(psd, options) {
|
|
|
8383
8385
|
}
|
|
8384
8386
|
|
|
8385
8387
|
}).call(this)}).call(this,require("buffer").Buffer)
|
|
8386
|
-
},{"./abr":1,"./csh":3,"./helpers":8,"./psd":12,"./psdReader":13,"./psdWriter":14,"base64-js":
|
|
8388
|
+
},{"./abr":1,"./csh":3,"./helpers":8,"./psd":12,"./psdReader":13,"./psdWriter":14,"base64-js":17,"buffer":18}],11:[function(require,module,exports){
|
|
8387
8389
|
"use strict";
|
|
8388
8390
|
// based on https://github.com/jpeg-js/jpeg-js
|
|
8389
8391
|
/*
|
|
@@ -8916,7 +8918,6 @@ function parse(data) {
|
|
|
8916
8918
|
const self = {
|
|
8917
8919
|
width: 0,
|
|
8918
8920
|
height: 0,
|
|
8919
|
-
comments: [],
|
|
8920
8921
|
adobe: undefined,
|
|
8921
8922
|
components: [],
|
|
8922
8923
|
exifBuffer: undefined,
|
|
@@ -9012,11 +9013,12 @@ function parse(data) {
|
|
|
9012
9013
|
case 0xFFFE: { // COM (Comment)
|
|
9013
9014
|
const appData = readDataBlock();
|
|
9014
9015
|
if (fileMarker === 0xFFFE) {
|
|
9015
|
-
|
|
9016
|
-
|
|
9017
|
-
|
|
9018
|
-
|
|
9019
|
-
|
|
9016
|
+
// ignore comments
|
|
9017
|
+
// let comment = '';
|
|
9018
|
+
// for (let ii = 0; ii < appData.byteLength; ii++) {
|
|
9019
|
+
// comment += String.fromCharCode(appData[ii]);
|
|
9020
|
+
// }
|
|
9021
|
+
// self.comments.push(comment);
|
|
9020
9022
|
}
|
|
9021
9023
|
if (fileMarker === 0xFFE0) {
|
|
9022
9024
|
if (appData[0] === 0x4A && appData[1] === 0x46 && appData[2] === 0x49 &&
|
|
@@ -9369,6 +9371,18 @@ function decodeJpeg(encoded, createImageData) {
|
|
|
9369
9371
|
}
|
|
9370
9372
|
}
|
|
9371
9373
|
break;
|
|
9374
|
+
case 2:
|
|
9375
|
+
for (let y = 0; y < height; y++) {
|
|
9376
|
+
for (let x = 0; x < width; x++) {
|
|
9377
|
+
const Y = data[i++];
|
|
9378
|
+
const A = data[i++];
|
|
9379
|
+
imageDataArray[j++] = Y;
|
|
9380
|
+
imageDataArray[j++] = Y;
|
|
9381
|
+
imageDataArray[j++] = Y;
|
|
9382
|
+
imageDataArray[j++] = A;
|
|
9383
|
+
}
|
|
9384
|
+
}
|
|
9385
|
+
break;
|
|
9372
9386
|
case 3:
|
|
9373
9387
|
for (let y = 0; y < height; y++) {
|
|
9374
9388
|
for (let x = 0; x < width; x++) {
|
|
@@ -9416,6 +9430,8 @@ var ColorMode;
|
|
|
9416
9430
|
ColorMode[ColorMode["Indexed"] = 2] = "Indexed";
|
|
9417
9431
|
ColorMode[ColorMode["RGB"] = 3] = "RGB";
|
|
9418
9432
|
ColorMode[ColorMode["CMYK"] = 4] = "CMYK";
|
|
9433
|
+
// 5
|
|
9434
|
+
// 6
|
|
9419
9435
|
ColorMode[ColorMode["Multichannel"] = 7] = "Multichannel";
|
|
9420
9436
|
ColorMode[ColorMode["Duotone"] = 8] = "Duotone";
|
|
9421
9437
|
ColorMode[ColorMode["Lab"] = 9] = "Lab";
|
|
@@ -9514,7 +9530,7 @@ const helpers_1 = require("./helpers");
|
|
|
9514
9530
|
const additionalInfo_1 = require("./additionalInfo");
|
|
9515
9531
|
const imageResources_1 = require("./imageResources");
|
|
9516
9532
|
exports.supportedColorModes = [0 /* ColorMode.Bitmap */, 1 /* ColorMode.Grayscale */, 3 /* ColorMode.RGB */, 2 /* ColorMode.Indexed */];
|
|
9517
|
-
const colorModes = ['bitmap', 'grayscale', 'indexed', 'RGB', 'CMYK', 'multichannel', 'duotone', 'lab'];
|
|
9533
|
+
const colorModes = ['bitmap', 'grayscale', 'indexed', 'RGB', 'CMYK', '', '', 'multichannel', 'duotone', 'lab'];
|
|
9518
9534
|
function setupGrayscale(data) {
|
|
9519
9535
|
const size = data.width * data.height * 4;
|
|
9520
9536
|
for (let i = 0; i < size; i += 4) {
|
|
@@ -9694,8 +9710,9 @@ function readPsd(reader, readOptions = {}) {
|
|
|
9694
9710
|
Object.assign(reader, readOptions);
|
|
9695
9711
|
reader.large = version === 2;
|
|
9696
9712
|
reader.globalAlpha = false;
|
|
9697
|
-
if (!reader
|
|
9713
|
+
if (!('totalMemoryLimit' in reader)) { // setting totalMemoryLimit to undefined explicitly disables memory limit
|
|
9698
9714
|
reader.totalMemoryLimit = 2 * 1024 * 1024 * 1024; // default 2GB memory limit
|
|
9715
|
+
}
|
|
9699
9716
|
// color mode data
|
|
9700
9717
|
readSection(reader, 1, left => {
|
|
9701
9718
|
if (!left())
|
|
@@ -9746,7 +9763,7 @@ function readPsd(reader, readOptions = {}) {
|
|
|
9746
9763
|
}
|
|
9747
9764
|
});
|
|
9748
9765
|
const { layersGroup, layerGroupsEnabledId } = imageResources, rest = __rest(imageResources, ["layersGroup", "layerGroupsEnabledId"]);
|
|
9749
|
-
if (Object.keys(rest)) {
|
|
9766
|
+
if (Object.keys(rest).length) {
|
|
9750
9767
|
psd.imageResources = rest;
|
|
9751
9768
|
}
|
|
9752
9769
|
// layer and mask info
|
|
@@ -9857,6 +9874,8 @@ function readLayerRecord(reader, psd, imageResources) {
|
|
|
9857
9874
|
layer.left = readInt32(reader);
|
|
9858
9875
|
layer.bottom = readInt32(reader);
|
|
9859
9876
|
layer.right = readInt32(reader);
|
|
9877
|
+
if (!isValidBoxSize(layer, reader))
|
|
9878
|
+
throw new Error('Invalid layer size');
|
|
9860
9879
|
const channelCount = readUint16(reader);
|
|
9861
9880
|
const channels = [];
|
|
9862
9881
|
for (let i = 0; i < channelCount; i++) {
|
|
@@ -9901,6 +9920,12 @@ function readLayerRecord(reader, psd, imageResources) {
|
|
|
9901
9920
|
});
|
|
9902
9921
|
return { layer, channels };
|
|
9903
9922
|
}
|
|
9923
|
+
function isValidBoxSize(box, reader) {
|
|
9924
|
+
const width = (box.right || 0) - (box.left || 0);
|
|
9925
|
+
const height = (box.bottom || 0) - (box.top || 0);
|
|
9926
|
+
const maxSize = reader.large ? 300000 : 30000;
|
|
9927
|
+
return width >= 0 && height >= 0 && width <= maxSize && height <= maxSize;
|
|
9928
|
+
}
|
|
9904
9929
|
function readLayerMaskData(reader, layer) {
|
|
9905
9930
|
return readSection(reader, 1, left => {
|
|
9906
9931
|
if (!left())
|
|
@@ -9911,6 +9936,8 @@ function readLayerMaskData(reader, layer) {
|
|
|
9911
9936
|
mask.left = readInt32(reader);
|
|
9912
9937
|
mask.bottom = readInt32(reader);
|
|
9913
9938
|
mask.right = readInt32(reader);
|
|
9939
|
+
if (!isValidBoxSize(mask, reader))
|
|
9940
|
+
throw new Error('Invalid mask size');
|
|
9914
9941
|
mask.defaultColor = readUint8(reader);
|
|
9915
9942
|
const flags = readUint8(reader);
|
|
9916
9943
|
mask.positionRelativeToLayer = (flags & 1 /* LayerMaskFlags.PositionRelativeToLayer */) !== 0;
|
|
@@ -9928,6 +9955,8 @@ function readLayerMaskData(reader, layer) {
|
|
|
9928
9955
|
realMask.left = readInt32(reader);
|
|
9929
9956
|
realMask.bottom = readInt32(reader);
|
|
9930
9957
|
realMask.right = readInt32(reader);
|
|
9958
|
+
if (!isValidBoxSize(realMask, reader))
|
|
9959
|
+
throw new Error('Invalid realMask size');
|
|
9931
9960
|
}
|
|
9932
9961
|
if (flags & 16 /* LayerMaskFlags.MaskHasParametersAppliedToIt */) {
|
|
9933
9962
|
const params = readUint8(reader);
|
|
@@ -10052,21 +10081,21 @@ function decodeLayerPixels(layer, useImageData) {
|
|
|
10052
10081
|
function decodeLayerImageData(layer, options) {
|
|
10053
10082
|
var _a, _b, _c;
|
|
10054
10083
|
let { throwForMissingFeatures, useImageData } = options;
|
|
10055
|
-
const imageData = getDataFromLayer(layer, LayerDataType.Layer, throwForMissingFeatures, options.
|
|
10084
|
+
const imageData = getDataFromLayer(layer, LayerDataType.Layer, throwForMissingFeatures, options.totalMemoryLimit);
|
|
10056
10085
|
setImageDataOrCanvas(layer, imageData, useImageData);
|
|
10057
|
-
if (options.
|
|
10058
|
-
options.
|
|
10086
|
+
if (options.totalMemoryLimit !== undefined)
|
|
10087
|
+
options.totalMemoryLimit -= (_a = imageData === null || imageData === void 0 ? void 0 : imageData.data.byteLength) !== null && _a !== void 0 ? _a : 0;
|
|
10059
10088
|
if (layer.mask) {
|
|
10060
|
-
const maskData = getDataFromLayer(layer, LayerDataType.Mask, throwForMissingFeatures, options.
|
|
10089
|
+
const maskData = getDataFromLayer(layer, LayerDataType.Mask, throwForMissingFeatures, options.totalMemoryLimit);
|
|
10061
10090
|
setImageDataOrCanvas(layer.mask, maskData, useImageData);
|
|
10062
|
-
if (options.
|
|
10063
|
-
options.
|
|
10091
|
+
if (options.totalMemoryLimit !== undefined)
|
|
10092
|
+
options.totalMemoryLimit -= (_b = maskData === null || maskData === void 0 ? void 0 : maskData.data.byteLength) !== null && _b !== void 0 ? _b : 0;
|
|
10064
10093
|
}
|
|
10065
10094
|
if (layer.realMask) {
|
|
10066
|
-
const maskData = getDataFromLayer(layer, LayerDataType.RealMask, throwForMissingFeatures, options.
|
|
10095
|
+
const maskData = getDataFromLayer(layer, LayerDataType.RealMask, throwForMissingFeatures, options.totalMemoryLimit);
|
|
10067
10096
|
setImageDataOrCanvas(layer.realMask, maskData, useImageData);
|
|
10068
|
-
if (options.
|
|
10069
|
-
options.
|
|
10097
|
+
if (options.totalMemoryLimit !== undefined)
|
|
10098
|
+
options.totalMemoryLimit -= (_c = maskData === null || maskData === void 0 ? void 0 : maskData.data.byteLength) !== null && _c !== void 0 ? _c : 0;
|
|
10070
10099
|
}
|
|
10071
10100
|
delete layer.rawData;
|
|
10072
10101
|
}
|
|
@@ -10080,8 +10109,8 @@ function getDataFromLayer(layer, read, throwForMissingFeatures, memoryLimit) {
|
|
|
10080
10109
|
if (!layer.rawData)
|
|
10081
10110
|
return undefined;
|
|
10082
10111
|
const { colorMode, bitsPerChannel, channels, large } = layer.rawData;
|
|
10083
|
-
const layerWidth = (layer.right || 0) - (layer.left || 0);
|
|
10084
|
-
const layerHeight = (layer.bottom || 0) - (layer.top || 0);
|
|
10112
|
+
const layerWidth = Math.max(0, (layer.right || 0) - (layer.left || 0));
|
|
10113
|
+
const layerHeight = Math.max(0, (layer.bottom || 0) - (layer.top || 0));
|
|
10085
10114
|
const cmyk = colorMode === 4 /* ColorMode.CMYK */;
|
|
10086
10115
|
let imageData;
|
|
10087
10116
|
let maskData;
|
|
@@ -10112,10 +10141,8 @@ function getDataFromLayer(layer, read, throwForMissingFeatures, memoryLimit) {
|
|
|
10112
10141
|
const mask = id === -2 /* ChannelID.UserMask */ ? layer.mask : layer.realMask;
|
|
10113
10142
|
if (!mask)
|
|
10114
10143
|
throw new Error(`Missing layer ${id === -2 /* ChannelID.UserMask */ ? 'mask' : 'real mask'} data`);
|
|
10115
|
-
const maskWidth = (mask.right || 0) - (mask.left || 0);
|
|
10116
|
-
const maskHeight = (mask.bottom || 0) - (mask.top || 0);
|
|
10117
|
-
if (maskWidth < 0 || maskHeight < 0 || maskWidth > 30000 || maskHeight > 30000)
|
|
10118
|
-
throw new Error('Invalid mask size');
|
|
10144
|
+
const maskWidth = Math.max(0, (mask.right || 0) - (mask.left || 0));
|
|
10145
|
+
const maskHeight = Math.max(0, (mask.bottom || 0) - (mask.top || 0));
|
|
10119
10146
|
if (maskWidth && maskHeight) {
|
|
10120
10147
|
maskData = createImageDataBitDepth(maskWidth, maskHeight, bitsPerChannel, 4, memoryLimit);
|
|
10121
10148
|
readData(dataReader, data.byteLength, maskData, compression, maskWidth, maskHeight, bitsPerChannel, 0, large, 4);
|
|
@@ -10568,6 +10595,7 @@ function readDataRLE(reader, pixelData, width, height, _bitDepth, step, offsets,
|
|
|
10568
10595
|
const data = pixelData && pixelData.data;
|
|
10569
10596
|
let lengths;
|
|
10570
10597
|
if (large) {
|
|
10598
|
+
consumeMemory(reader, offsets.length * height * 4);
|
|
10571
10599
|
lengths = new Uint32Array(offsets.length * height);
|
|
10572
10600
|
for (let o = 0, li = 0; o < offsets.length; o++) {
|
|
10573
10601
|
for (let y = 0; y < height; y++, li++) {
|
|
@@ -10576,6 +10604,7 @@ function readDataRLE(reader, pixelData, width, height, _bitDepth, step, offsets,
|
|
|
10576
10604
|
}
|
|
10577
10605
|
}
|
|
10578
10606
|
else {
|
|
10607
|
+
consumeMemory(reader, offsets.length * height * 2);
|
|
10579
10608
|
lengths = new Uint16Array(offsets.length * height);
|
|
10580
10609
|
for (let o = 0, li = 0; o < offsets.length; o++) {
|
|
10581
10610
|
for (let y = 0; y < height; y++, li++) {
|
|
@@ -10622,6 +10651,7 @@ function readDataRLE(reader, pixelData, width, height, _bitDepth, step, offsets,
|
|
|
10622
10651
|
}
|
|
10623
10652
|
}
|
|
10624
10653
|
}
|
|
10654
|
+
recoverMemory(reader, lengths.byteLength);
|
|
10625
10655
|
}
|
|
10626
10656
|
function readSection(reader, round, func, skipEmpty = true, eightBytes = false) {
|
|
10627
10657
|
let length = readUint32(reader);
|
|
@@ -10734,7 +10764,9 @@ function readPattern(reader) {
|
|
|
10734
10764
|
const channelsCount = readUint32(reader);
|
|
10735
10765
|
const width = right - left;
|
|
10736
10766
|
const height = bottom - top;
|
|
10737
|
-
const
|
|
10767
|
+
const size = width * height * 4;
|
|
10768
|
+
consumeMemory(reader, size);
|
|
10769
|
+
const data = new Uint8Array(size);
|
|
10738
10770
|
for (let i = 3; i < data.byteLength; i += 4) {
|
|
10739
10771
|
data[i] = 255;
|
|
10740
10772
|
}
|
|
@@ -10800,6 +10832,7 @@ function readPattern(reader) {
|
|
|
10800
10832
|
}
|
|
10801
10833
|
}
|
|
10802
10834
|
else if (compressionMode === 1) {
|
|
10835
|
+
consumeMemory(reader, w * h);
|
|
10803
10836
|
const pixelData = { data, width, height };
|
|
10804
10837
|
const tempData = { data: new Uint8Array(w * h), width: w, height: h };
|
|
10805
10838
|
const cdataReader = createReader(cdata.buffer, cdata.byteOffset, cdata.byteLength);
|
|
@@ -10816,6 +10849,7 @@ function readPattern(reader) {
|
|
|
10816
10849
|
// TODO:
|
|
10817
10850
|
throw new Error('Indexed pattern color mode not implemented');
|
|
10818
10851
|
}
|
|
10852
|
+
recoverMemory(reader, w * h);
|
|
10819
10853
|
}
|
|
10820
10854
|
else {
|
|
10821
10855
|
throw new Error('Invalid pattern compression mode');
|
|
@@ -10838,8 +10872,20 @@ function copyChannelToRGBA(srcData, dstData, ox, oy, offset) {
|
|
|
10838
10872
|
}
|
|
10839
10873
|
}
|
|
10840
10874
|
}
|
|
10875
|
+
function consumeMemory(reader, size) {
|
|
10876
|
+
if (reader.totalMemoryLimit !== undefined) {
|
|
10877
|
+
if (reader.totalMemoryLimit < size)
|
|
10878
|
+
throw new Error('Exceeded memory limit');
|
|
10879
|
+
reader.totalMemoryLimit -= size;
|
|
10880
|
+
}
|
|
10881
|
+
}
|
|
10882
|
+
function recoverMemory(reader, size) {
|
|
10883
|
+
if (reader.totalMemoryLimit !== undefined) {
|
|
10884
|
+
reader.totalMemoryLimit += size;
|
|
10885
|
+
}
|
|
10886
|
+
}
|
|
10841
10887
|
|
|
10842
|
-
},{"./additionalInfo":2,"./helpers":8,"./imageResources":9,"pako":
|
|
10888
|
+
},{"./additionalInfo":2,"./helpers":8,"./imageResources":9,"pako":20}],14:[function(require,module,exports){
|
|
10843
10889
|
"use strict";
|
|
10844
10890
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10845
10891
|
exports.createWriter = createWriter;
|
|
@@ -10991,8 +11037,14 @@ function writeUnicodeStringWithPadding(writer, text) {
|
|
|
10991
11037
|
function getLargestLayerSize(layers = []) {
|
|
10992
11038
|
let max = 0;
|
|
10993
11039
|
for (const layer of layers) {
|
|
10994
|
-
|
|
10995
|
-
|
|
11040
|
+
const { width, height } = getLayerDimentions(layer);
|
|
11041
|
+
max = Math.max(max, 2 * height + 2 * width * height);
|
|
11042
|
+
if (layer.mask) {
|
|
11043
|
+
const { width, height } = getLayerDimentions(layer.mask);
|
|
11044
|
+
max = Math.max(max, 2 * height + 2 * width * height);
|
|
11045
|
+
}
|
|
11046
|
+
if (layer.realMask) {
|
|
11047
|
+
const { width, height } = getLayerDimentions(layer.realMask);
|
|
10996
11048
|
max = Math.max(max, 2 * height + 2 * width * height);
|
|
10997
11049
|
}
|
|
10998
11050
|
if (layer.children) {
|
|
@@ -11277,7 +11329,7 @@ function writeGlobalLayerMaskInfo(writer, info) {
|
|
|
11277
11329
|
writeUint16(writer, info.colorSpace2);
|
|
11278
11330
|
writeUint16(writer, info.colorSpace3);
|
|
11279
11331
|
writeUint16(writer, info.colorSpace4);
|
|
11280
|
-
writeUint16(writer, info.opacity * 0xff);
|
|
11332
|
+
writeUint16(writer, Math.round(info.opacity * 0xff));
|
|
11281
11333
|
writeUint8(writer, info.kind);
|
|
11282
11334
|
writeZeros(writer, 3);
|
|
11283
11335
|
}
|
|
@@ -12250,24 +12302,30 @@ function charLengthInBytes(code) {
|
|
|
12250
12302
|
return 4;
|
|
12251
12303
|
}
|
|
12252
12304
|
}
|
|
12305
|
+
// Reads a scalar value at index `i`, replacing unpaired surrogates with U+FFFD,
|
|
12306
|
+
// matching how TextEncoder converts a string to a sequence of Unicode scalar values.
|
|
12307
|
+
function codePointAt(value, i) {
|
|
12308
|
+
const code = value.charCodeAt(i);
|
|
12309
|
+
// high surrogate
|
|
12310
|
+
if (code >= 0xd800 && code <= 0xdbff && (i + 1) < value.length) {
|
|
12311
|
+
const extra = value.charCodeAt(i + 1);
|
|
12312
|
+
// low surrogate
|
|
12313
|
+
if (extra >= 0xdc00 && extra <= 0xdfff) {
|
|
12314
|
+
return { code: ((code & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000, size: 2 };
|
|
12315
|
+
}
|
|
12316
|
+
}
|
|
12317
|
+
// unpaired surrogate (lone high or lone low)
|
|
12318
|
+
if (code >= 0xd800 && code <= 0xdfff) {
|
|
12319
|
+
return { code: 0xfffd, size: 1 };
|
|
12320
|
+
}
|
|
12321
|
+
return { code, size: 1 };
|
|
12322
|
+
}
|
|
12253
12323
|
function stringLengthInBytes(value) {
|
|
12254
12324
|
let result = 0;
|
|
12255
|
-
for (let i = 0; i < value.length;
|
|
12256
|
-
const code = value
|
|
12257
|
-
|
|
12258
|
-
|
|
12259
|
-
if ((i + 1) < value.length) {
|
|
12260
|
-
const extra = value.charCodeAt(i + 1);
|
|
12261
|
-
// low surrogate
|
|
12262
|
-
if ((extra & 0xfc00) === 0xdc00) {
|
|
12263
|
-
i++;
|
|
12264
|
-
result += charLengthInBytes(((code & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000);
|
|
12265
|
-
}
|
|
12266
|
-
}
|
|
12267
|
-
}
|
|
12268
|
-
else {
|
|
12269
|
-
result += charLengthInBytes(code);
|
|
12270
|
-
}
|
|
12325
|
+
for (let i = 0; i < value.length;) {
|
|
12326
|
+
const { code, size } = codePointAt(value, i);
|
|
12327
|
+
result += charLengthInBytes(code);
|
|
12328
|
+
i += size;
|
|
12271
12329
|
}
|
|
12272
12330
|
return result;
|
|
12273
12331
|
}
|
|
@@ -12296,23 +12354,10 @@ function writeCharacter(buffer, offset, code) {
|
|
|
12296
12354
|
return length;
|
|
12297
12355
|
}
|
|
12298
12356
|
function encodeStringTo(buffer, offset, value) {
|
|
12299
|
-
for (let i = 0; i < value.length;
|
|
12300
|
-
const code = value
|
|
12301
|
-
|
|
12302
|
-
|
|
12303
|
-
if ((i + 1) < value.length) {
|
|
12304
|
-
const extra = value.charCodeAt(i + 1);
|
|
12305
|
-
// low surrogate
|
|
12306
|
-
if ((extra & 0xfc00) === 0xdc00) {
|
|
12307
|
-
i++;
|
|
12308
|
-
const fullCode = ((code & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000;
|
|
12309
|
-
offset += writeCharacter(buffer, offset, fullCode);
|
|
12310
|
-
}
|
|
12311
|
-
}
|
|
12312
|
-
}
|
|
12313
|
-
else {
|
|
12314
|
-
offset += writeCharacter(buffer, offset, code);
|
|
12315
|
-
}
|
|
12357
|
+
for (let i = 0; i < value.length;) {
|
|
12358
|
+
const { code, size } = codePointAt(value, i);
|
|
12359
|
+
offset += writeCharacter(buffer, offset, code);
|
|
12360
|
+
i += size;
|
|
12316
12361
|
}
|
|
12317
12362
|
return offset;
|
|
12318
12363
|
}
|
|
@@ -12324,122 +12369,88 @@ function encodeString(value) {
|
|
|
12324
12369
|
encodeStringTo(buffer, 0, value);
|
|
12325
12370
|
return buffer;
|
|
12326
12371
|
}
|
|
12327
|
-
|
|
12328
|
-
|
|
12329
|
-
throw Error('Invalid byte index');
|
|
12330
|
-
}
|
|
12331
|
-
const continuationByte = buffer[index];
|
|
12332
|
-
if ((continuationByte & 0xC0) === 0x80) {
|
|
12333
|
-
return continuationByte & 0x3F;
|
|
12334
|
-
}
|
|
12335
|
-
else {
|
|
12336
|
-
throw Error('Invalid continuation byte');
|
|
12337
|
-
}
|
|
12338
|
-
}
|
|
12372
|
+
// UTF-8 decoder implementing the WHATWG Encoding Standard's non-fatal error handling,
|
|
12373
|
+
// so malformed byte sequences are replaced with U+FFFD instead of throwing, matching TextDecoder.
|
|
12339
12374
|
function decodeString(value) {
|
|
12340
12375
|
if (value.byteLength > 1000 && typeof TextDecoder !== 'undefined') {
|
|
12341
12376
|
return (new TextDecoder()).decode(value);
|
|
12342
12377
|
}
|
|
12343
|
-
|
|
12344
|
-
|
|
12345
|
-
|
|
12346
|
-
|
|
12347
|
-
|
|
12348
|
-
code =
|
|
12349
|
-
}
|
|
12350
|
-
else if ((byte1 & 0xe0) === 0xc0) {
|
|
12351
|
-
const byte2 = continuationByte(value, i++);
|
|
12352
|
-
code = ((byte1 & 0x1f) << 6) | byte2;
|
|
12353
|
-
if (code < 0x80) {
|
|
12354
|
-
throw Error('Invalid continuation byte');
|
|
12355
|
-
}
|
|
12378
|
+
const result = [];
|
|
12379
|
+
function pushCodePoint(code) {
|
|
12380
|
+
if (code > 0xffff) {
|
|
12381
|
+
code -= 0x10000;
|
|
12382
|
+
result.push(String.fromCharCode((code >>> 10 & 0x3ff) | 0xd800));
|
|
12383
|
+
code = 0xdc00 | (code & 0x3ff);
|
|
12356
12384
|
}
|
|
12357
|
-
|
|
12358
|
-
|
|
12359
|
-
|
|
12360
|
-
|
|
12361
|
-
|
|
12362
|
-
|
|
12385
|
+
result.push(String.fromCharCode(code));
|
|
12386
|
+
}
|
|
12387
|
+
let codePoint = 0;
|
|
12388
|
+
let bytesSeen = 0;
|
|
12389
|
+
let bytesNeeded = 0;
|
|
12390
|
+
let lowerBoundary = 0x80;
|
|
12391
|
+
let upperBoundary = 0xbf;
|
|
12392
|
+
for (let i = 0; i < value.length; i++) {
|
|
12393
|
+
const byte = value[i];
|
|
12394
|
+
if (bytesNeeded === 0) {
|
|
12395
|
+
if (byte <= 0x7f) {
|
|
12396
|
+
pushCodePoint(byte);
|
|
12363
12397
|
}
|
|
12364
|
-
if (
|
|
12365
|
-
|
|
12398
|
+
else if (byte >= 0xc2 && byte <= 0xdf) {
|
|
12399
|
+
bytesNeeded = 1;
|
|
12400
|
+
codePoint = byte & 0x1f;
|
|
12366
12401
|
}
|
|
12367
|
-
|
|
12368
|
-
|
|
12369
|
-
|
|
12370
|
-
|
|
12371
|
-
|
|
12372
|
-
|
|
12373
|
-
|
|
12374
|
-
throw Error('Invalid continuation byte');
|
|
12402
|
+
else if (byte >= 0xe0 && byte <= 0xef) {
|
|
12403
|
+
if (byte === 0xe0)
|
|
12404
|
+
lowerBoundary = 0xa0;
|
|
12405
|
+
if (byte === 0xed)
|
|
12406
|
+
upperBoundary = 0x9f;
|
|
12407
|
+
bytesNeeded = 2;
|
|
12408
|
+
codePoint = byte & 0x0f;
|
|
12375
12409
|
}
|
|
12410
|
+
else if (byte >= 0xf0 && byte <= 0xf4) {
|
|
12411
|
+
if (byte === 0xf0)
|
|
12412
|
+
lowerBoundary = 0x90;
|
|
12413
|
+
if (byte === 0xf4)
|
|
12414
|
+
upperBoundary = 0x8f;
|
|
12415
|
+
bytesNeeded = 3;
|
|
12416
|
+
codePoint = byte & 0x07;
|
|
12417
|
+
}
|
|
12418
|
+
else {
|
|
12419
|
+
// invalid leading byte
|
|
12420
|
+
pushCodePoint(0xfffd);
|
|
12421
|
+
}
|
|
12422
|
+
continue;
|
|
12376
12423
|
}
|
|
12377
|
-
|
|
12378
|
-
|
|
12379
|
-
|
|
12380
|
-
|
|
12381
|
-
|
|
12382
|
-
|
|
12383
|
-
|
|
12424
|
+
if (byte < lowerBoundary || byte > upperBoundary) {
|
|
12425
|
+
// invalid continuation byte: emit replacement and reprocess this byte as a new sequence start
|
|
12426
|
+
codePoint = 0;
|
|
12427
|
+
bytesNeeded = 0;
|
|
12428
|
+
bytesSeen = 0;
|
|
12429
|
+
lowerBoundary = 0x80;
|
|
12430
|
+
upperBoundary = 0xbf;
|
|
12431
|
+
pushCodePoint(0xfffd);
|
|
12432
|
+
i--;
|
|
12433
|
+
continue;
|
|
12384
12434
|
}
|
|
12385
|
-
|
|
12435
|
+
lowerBoundary = 0x80;
|
|
12436
|
+
upperBoundary = 0xbf;
|
|
12437
|
+
codePoint = (codePoint << 6) | (byte & 0x3f);
|
|
12438
|
+
bytesSeen++;
|
|
12439
|
+
if (bytesSeen !== bytesNeeded)
|
|
12440
|
+
continue;
|
|
12441
|
+
pushCodePoint(codePoint);
|
|
12442
|
+
codePoint = 0;
|
|
12443
|
+
bytesNeeded = 0;
|
|
12444
|
+
bytesSeen = 0;
|
|
12445
|
+
}
|
|
12446
|
+
// truncated sequence at end of input
|
|
12447
|
+
if (bytesNeeded !== 0) {
|
|
12448
|
+
pushCodePoint(0xfffd);
|
|
12386
12449
|
}
|
|
12387
12450
|
return result.join('');
|
|
12388
12451
|
}
|
|
12389
12452
|
|
|
12390
12453
|
},{}],17:[function(require,module,exports){
|
|
12391
|
-
|
|
12392
|
-
/**
|
|
12393
|
-
* Array#filter.
|
|
12394
|
-
*
|
|
12395
|
-
* @param {Array} arr
|
|
12396
|
-
* @param {Function} fn
|
|
12397
|
-
* @param {Object=} self
|
|
12398
|
-
* @return {Array}
|
|
12399
|
-
* @throw TypeError
|
|
12400
|
-
*/
|
|
12401
|
-
|
|
12402
|
-
module.exports = function (arr, fn, self) {
|
|
12403
|
-
if (arr.filter) return arr.filter(fn, self);
|
|
12404
|
-
if (void 0 === arr || null === arr) throw new TypeError;
|
|
12405
|
-
if ('function' != typeof fn) throw new TypeError;
|
|
12406
|
-
var ret = [];
|
|
12407
|
-
for (var i = 0; i < arr.length; i++) {
|
|
12408
|
-
if (!hasOwn.call(arr, i)) continue;
|
|
12409
|
-
var val = arr[i];
|
|
12410
|
-
if (fn.call(self, val, i, arr)) ret.push(val);
|
|
12411
|
-
}
|
|
12412
|
-
return ret;
|
|
12413
|
-
};
|
|
12414
|
-
|
|
12415
|
-
var hasOwn = Object.prototype.hasOwnProperty;
|
|
12416
|
-
|
|
12417
|
-
},{}],18:[function(require,module,exports){
|
|
12418
|
-
(function (global){(function (){
|
|
12419
|
-
'use strict';
|
|
12420
|
-
|
|
12421
|
-
var filter = require('array-filter');
|
|
12422
|
-
|
|
12423
|
-
module.exports = function availableTypedArrays() {
|
|
12424
|
-
return filter([
|
|
12425
|
-
'BigInt64Array',
|
|
12426
|
-
'BigUint64Array',
|
|
12427
|
-
'Float32Array',
|
|
12428
|
-
'Float64Array',
|
|
12429
|
-
'Int16Array',
|
|
12430
|
-
'Int32Array',
|
|
12431
|
-
'Int8Array',
|
|
12432
|
-
'Uint16Array',
|
|
12433
|
-
'Uint32Array',
|
|
12434
|
-
'Uint8Array',
|
|
12435
|
-
'Uint8ClampedArray'
|
|
12436
|
-
], function (typedArray) {
|
|
12437
|
-
return typeof global[typedArray] === 'function';
|
|
12438
|
-
});
|
|
12439
|
-
};
|
|
12440
|
-
|
|
12441
|
-
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
12442
|
-
},{"array-filter":17}],19:[function(require,module,exports){
|
|
12443
12454
|
'use strict'
|
|
12444
12455
|
|
|
12445
12456
|
exports.byteLength = byteLength
|
|
@@ -12591,7 +12602,7 @@ function fromByteArray (uint8) {
|
|
|
12591
12602
|
return parts.join('')
|
|
12592
12603
|
}
|
|
12593
12604
|
|
|
12594
|
-
},{}],
|
|
12605
|
+
},{}],18:[function(require,module,exports){
|
|
12595
12606
|
(function (Buffer){(function (){
|
|
12596
12607
|
/*!
|
|
12597
12608
|
* The buffer module from node.js, for the browser.
|
|
@@ -14372,609 +14383,7 @@ function numberIsNaN (obj) {
|
|
|
14372
14383
|
}
|
|
14373
14384
|
|
|
14374
14385
|
}).call(this)}).call(this,require("buffer").Buffer)
|
|
14375
|
-
},{"base64-js":
|
|
14376
|
-
'use strict';
|
|
14377
|
-
|
|
14378
|
-
var GetIntrinsic = require('get-intrinsic');
|
|
14379
|
-
|
|
14380
|
-
var callBind = require('./');
|
|
14381
|
-
|
|
14382
|
-
var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
|
|
14383
|
-
|
|
14384
|
-
module.exports = function callBoundIntrinsic(name, allowMissing) {
|
|
14385
|
-
var intrinsic = GetIntrinsic(name, !!allowMissing);
|
|
14386
|
-
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
|
|
14387
|
-
return callBind(intrinsic);
|
|
14388
|
-
}
|
|
14389
|
-
return intrinsic;
|
|
14390
|
-
};
|
|
14391
|
-
|
|
14392
|
-
},{"./":22,"get-intrinsic":27}],22:[function(require,module,exports){
|
|
14393
|
-
'use strict';
|
|
14394
|
-
|
|
14395
|
-
var bind = require('function-bind');
|
|
14396
|
-
var GetIntrinsic = require('get-intrinsic');
|
|
14397
|
-
|
|
14398
|
-
var $apply = GetIntrinsic('%Function.prototype.apply%');
|
|
14399
|
-
var $call = GetIntrinsic('%Function.prototype.call%');
|
|
14400
|
-
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
|
|
14401
|
-
|
|
14402
|
-
var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
|
|
14403
|
-
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
|
14404
|
-
var $max = GetIntrinsic('%Math.max%');
|
|
14405
|
-
|
|
14406
|
-
if ($defineProperty) {
|
|
14407
|
-
try {
|
|
14408
|
-
$defineProperty({}, 'a', { value: 1 });
|
|
14409
|
-
} catch (e) {
|
|
14410
|
-
// IE 8 has a broken defineProperty
|
|
14411
|
-
$defineProperty = null;
|
|
14412
|
-
}
|
|
14413
|
-
}
|
|
14414
|
-
|
|
14415
|
-
module.exports = function callBind(originalFunction) {
|
|
14416
|
-
var func = $reflectApply(bind, $call, arguments);
|
|
14417
|
-
if ($gOPD && $defineProperty) {
|
|
14418
|
-
var desc = $gOPD(func, 'length');
|
|
14419
|
-
if (desc.configurable) {
|
|
14420
|
-
// original length, plus the receiver, minus any additional arguments (after the receiver)
|
|
14421
|
-
$defineProperty(
|
|
14422
|
-
func,
|
|
14423
|
-
'length',
|
|
14424
|
-
{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
|
|
14425
|
-
);
|
|
14426
|
-
}
|
|
14427
|
-
}
|
|
14428
|
-
return func;
|
|
14429
|
-
};
|
|
14430
|
-
|
|
14431
|
-
var applyBind = function applyBind() {
|
|
14432
|
-
return $reflectApply(bind, $apply, arguments);
|
|
14433
|
-
};
|
|
14434
|
-
|
|
14435
|
-
if ($defineProperty) {
|
|
14436
|
-
$defineProperty(module.exports, 'apply', { value: applyBind });
|
|
14437
|
-
} else {
|
|
14438
|
-
module.exports.apply = applyBind;
|
|
14439
|
-
}
|
|
14440
|
-
|
|
14441
|
-
},{"function-bind":26,"get-intrinsic":27}],23:[function(require,module,exports){
|
|
14442
|
-
'use strict';
|
|
14443
|
-
|
|
14444
|
-
var GetIntrinsic = require('get-intrinsic');
|
|
14445
|
-
|
|
14446
|
-
var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
|
|
14447
|
-
if ($gOPD) {
|
|
14448
|
-
try {
|
|
14449
|
-
$gOPD([], 'length');
|
|
14450
|
-
} catch (e) {
|
|
14451
|
-
// IE 8 has a broken gOPD
|
|
14452
|
-
$gOPD = null;
|
|
14453
|
-
}
|
|
14454
|
-
}
|
|
14455
|
-
|
|
14456
|
-
module.exports = $gOPD;
|
|
14457
|
-
|
|
14458
|
-
},{"get-intrinsic":27}],24:[function(require,module,exports){
|
|
14459
|
-
|
|
14460
|
-
var hasOwn = Object.prototype.hasOwnProperty;
|
|
14461
|
-
var toString = Object.prototype.toString;
|
|
14462
|
-
|
|
14463
|
-
module.exports = function forEach (obj, fn, ctx) {
|
|
14464
|
-
if (toString.call(fn) !== '[object Function]') {
|
|
14465
|
-
throw new TypeError('iterator must be a function');
|
|
14466
|
-
}
|
|
14467
|
-
var l = obj.length;
|
|
14468
|
-
if (l === +l) {
|
|
14469
|
-
for (var i = 0; i < l; i++) {
|
|
14470
|
-
fn.call(ctx, obj[i], i, obj);
|
|
14471
|
-
}
|
|
14472
|
-
} else {
|
|
14473
|
-
for (var k in obj) {
|
|
14474
|
-
if (hasOwn.call(obj, k)) {
|
|
14475
|
-
fn.call(ctx, obj[k], k, obj);
|
|
14476
|
-
}
|
|
14477
|
-
}
|
|
14478
|
-
}
|
|
14479
|
-
};
|
|
14480
|
-
|
|
14481
|
-
|
|
14482
|
-
},{}],25:[function(require,module,exports){
|
|
14483
|
-
'use strict';
|
|
14484
|
-
|
|
14485
|
-
/* eslint no-invalid-this: 1 */
|
|
14486
|
-
|
|
14487
|
-
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
|
|
14488
|
-
var toStr = Object.prototype.toString;
|
|
14489
|
-
var max = Math.max;
|
|
14490
|
-
var funcType = '[object Function]';
|
|
14491
|
-
|
|
14492
|
-
var concatty = function concatty(a, b) {
|
|
14493
|
-
var arr = [];
|
|
14494
|
-
|
|
14495
|
-
for (var i = 0; i < a.length; i += 1) {
|
|
14496
|
-
arr[i] = a[i];
|
|
14497
|
-
}
|
|
14498
|
-
for (var j = 0; j < b.length; j += 1) {
|
|
14499
|
-
arr[j + a.length] = b[j];
|
|
14500
|
-
}
|
|
14501
|
-
|
|
14502
|
-
return arr;
|
|
14503
|
-
};
|
|
14504
|
-
|
|
14505
|
-
var slicy = function slicy(arrLike, offset) {
|
|
14506
|
-
var arr = [];
|
|
14507
|
-
for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
|
|
14508
|
-
arr[j] = arrLike[i];
|
|
14509
|
-
}
|
|
14510
|
-
return arr;
|
|
14511
|
-
};
|
|
14512
|
-
|
|
14513
|
-
var joiny = function (arr, joiner) {
|
|
14514
|
-
var str = '';
|
|
14515
|
-
for (var i = 0; i < arr.length; i += 1) {
|
|
14516
|
-
str += arr[i];
|
|
14517
|
-
if (i + 1 < arr.length) {
|
|
14518
|
-
str += joiner;
|
|
14519
|
-
}
|
|
14520
|
-
}
|
|
14521
|
-
return str;
|
|
14522
|
-
};
|
|
14523
|
-
|
|
14524
|
-
module.exports = function bind(that) {
|
|
14525
|
-
var target = this;
|
|
14526
|
-
if (typeof target !== 'function' || toStr.apply(target) !== funcType) {
|
|
14527
|
-
throw new TypeError(ERROR_MESSAGE + target);
|
|
14528
|
-
}
|
|
14529
|
-
var args = slicy(arguments, 1);
|
|
14530
|
-
|
|
14531
|
-
var bound;
|
|
14532
|
-
var binder = function () {
|
|
14533
|
-
if (this instanceof bound) {
|
|
14534
|
-
var result = target.apply(
|
|
14535
|
-
this,
|
|
14536
|
-
concatty(args, arguments)
|
|
14537
|
-
);
|
|
14538
|
-
if (Object(result) === result) {
|
|
14539
|
-
return result;
|
|
14540
|
-
}
|
|
14541
|
-
return this;
|
|
14542
|
-
}
|
|
14543
|
-
return target.apply(
|
|
14544
|
-
that,
|
|
14545
|
-
concatty(args, arguments)
|
|
14546
|
-
);
|
|
14547
|
-
|
|
14548
|
-
};
|
|
14549
|
-
|
|
14550
|
-
var boundLength = max(0, target.length - args.length);
|
|
14551
|
-
var boundArgs = [];
|
|
14552
|
-
for (var i = 0; i < boundLength; i++) {
|
|
14553
|
-
boundArgs[i] = '$' + i;
|
|
14554
|
-
}
|
|
14555
|
-
|
|
14556
|
-
bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
|
|
14557
|
-
|
|
14558
|
-
if (target.prototype) {
|
|
14559
|
-
var Empty = function Empty() {};
|
|
14560
|
-
Empty.prototype = target.prototype;
|
|
14561
|
-
bound.prototype = new Empty();
|
|
14562
|
-
Empty.prototype = null;
|
|
14563
|
-
}
|
|
14564
|
-
|
|
14565
|
-
return bound;
|
|
14566
|
-
};
|
|
14567
|
-
|
|
14568
|
-
},{}],26:[function(require,module,exports){
|
|
14569
|
-
'use strict';
|
|
14570
|
-
|
|
14571
|
-
var implementation = require('./implementation');
|
|
14572
|
-
|
|
14573
|
-
module.exports = Function.prototype.bind || implementation;
|
|
14574
|
-
|
|
14575
|
-
},{"./implementation":25}],27:[function(require,module,exports){
|
|
14576
|
-
'use strict';
|
|
14577
|
-
|
|
14578
|
-
var undefined;
|
|
14579
|
-
|
|
14580
|
-
var $SyntaxError = SyntaxError;
|
|
14581
|
-
var $Function = Function;
|
|
14582
|
-
var $TypeError = TypeError;
|
|
14583
|
-
|
|
14584
|
-
// eslint-disable-next-line consistent-return
|
|
14585
|
-
var getEvalledConstructor = function (expressionSyntax) {
|
|
14586
|
-
try {
|
|
14587
|
-
return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
|
|
14588
|
-
} catch (e) {}
|
|
14589
|
-
};
|
|
14590
|
-
|
|
14591
|
-
var $gOPD = Object.getOwnPropertyDescriptor;
|
|
14592
|
-
if ($gOPD) {
|
|
14593
|
-
try {
|
|
14594
|
-
$gOPD({}, '');
|
|
14595
|
-
} catch (e) {
|
|
14596
|
-
$gOPD = null; // this is IE 8, which has a broken gOPD
|
|
14597
|
-
}
|
|
14598
|
-
}
|
|
14599
|
-
|
|
14600
|
-
var throwTypeError = function () {
|
|
14601
|
-
throw new $TypeError();
|
|
14602
|
-
};
|
|
14603
|
-
var ThrowTypeError = $gOPD
|
|
14604
|
-
? (function () {
|
|
14605
|
-
try {
|
|
14606
|
-
// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
|
|
14607
|
-
arguments.callee; // IE 8 does not throw here
|
|
14608
|
-
return throwTypeError;
|
|
14609
|
-
} catch (calleeThrows) {
|
|
14610
|
-
try {
|
|
14611
|
-
// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
|
|
14612
|
-
return $gOPD(arguments, 'callee').get;
|
|
14613
|
-
} catch (gOPDthrows) {
|
|
14614
|
-
return throwTypeError;
|
|
14615
|
-
}
|
|
14616
|
-
}
|
|
14617
|
-
}())
|
|
14618
|
-
: throwTypeError;
|
|
14619
|
-
|
|
14620
|
-
var hasSymbols = require('has-symbols')();
|
|
14621
|
-
|
|
14622
|
-
var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
|
|
14623
|
-
|
|
14624
|
-
var needsEval = {};
|
|
14625
|
-
|
|
14626
|
-
var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);
|
|
14627
|
-
|
|
14628
|
-
var INTRINSICS = {
|
|
14629
|
-
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
|
|
14630
|
-
'%Array%': Array,
|
|
14631
|
-
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
|
|
14632
|
-
'%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,
|
|
14633
|
-
'%AsyncFromSyncIteratorPrototype%': undefined,
|
|
14634
|
-
'%AsyncFunction%': needsEval,
|
|
14635
|
-
'%AsyncGenerator%': needsEval,
|
|
14636
|
-
'%AsyncGeneratorFunction%': needsEval,
|
|
14637
|
-
'%AsyncIteratorPrototype%': needsEval,
|
|
14638
|
-
'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
|
|
14639
|
-
'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
|
|
14640
|
-
'%Boolean%': Boolean,
|
|
14641
|
-
'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
|
|
14642
|
-
'%Date%': Date,
|
|
14643
|
-
'%decodeURI%': decodeURI,
|
|
14644
|
-
'%decodeURIComponent%': decodeURIComponent,
|
|
14645
|
-
'%encodeURI%': encodeURI,
|
|
14646
|
-
'%encodeURIComponent%': encodeURIComponent,
|
|
14647
|
-
'%Error%': Error,
|
|
14648
|
-
'%eval%': eval, // eslint-disable-line no-eval
|
|
14649
|
-
'%EvalError%': EvalError,
|
|
14650
|
-
'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
|
|
14651
|
-
'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
|
|
14652
|
-
'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
|
|
14653
|
-
'%Function%': $Function,
|
|
14654
|
-
'%GeneratorFunction%': needsEval,
|
|
14655
|
-
'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
|
|
14656
|
-
'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
|
|
14657
|
-
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
|
|
14658
|
-
'%isFinite%': isFinite,
|
|
14659
|
-
'%isNaN%': isNaN,
|
|
14660
|
-
'%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,
|
|
14661
|
-
'%JSON%': typeof JSON === 'object' ? JSON : undefined,
|
|
14662
|
-
'%Map%': typeof Map === 'undefined' ? undefined : Map,
|
|
14663
|
-
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),
|
|
14664
|
-
'%Math%': Math,
|
|
14665
|
-
'%Number%': Number,
|
|
14666
|
-
'%Object%': Object,
|
|
14667
|
-
'%parseFloat%': parseFloat,
|
|
14668
|
-
'%parseInt%': parseInt,
|
|
14669
|
-
'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
|
|
14670
|
-
'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
|
|
14671
|
-
'%RangeError%': RangeError,
|
|
14672
|
-
'%ReferenceError%': ReferenceError,
|
|
14673
|
-
'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
|
|
14674
|
-
'%RegExp%': RegExp,
|
|
14675
|
-
'%Set%': typeof Set === 'undefined' ? undefined : Set,
|
|
14676
|
-
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),
|
|
14677
|
-
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
|
|
14678
|
-
'%String%': String,
|
|
14679
|
-
'%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,
|
|
14680
|
-
'%Symbol%': hasSymbols ? Symbol : undefined,
|
|
14681
|
-
'%SyntaxError%': $SyntaxError,
|
|
14682
|
-
'%ThrowTypeError%': ThrowTypeError,
|
|
14683
|
-
'%TypedArray%': TypedArray,
|
|
14684
|
-
'%TypeError%': $TypeError,
|
|
14685
|
-
'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
|
|
14686
|
-
'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
|
|
14687
|
-
'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
|
|
14688
|
-
'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
|
|
14689
|
-
'%URIError%': URIError,
|
|
14690
|
-
'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
|
|
14691
|
-
'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
|
|
14692
|
-
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
|
|
14693
|
-
};
|
|
14694
|
-
|
|
14695
|
-
var doEval = function doEval(name) {
|
|
14696
|
-
var value;
|
|
14697
|
-
if (name === '%AsyncFunction%') {
|
|
14698
|
-
value = getEvalledConstructor('async function () {}');
|
|
14699
|
-
} else if (name === '%GeneratorFunction%') {
|
|
14700
|
-
value = getEvalledConstructor('function* () {}');
|
|
14701
|
-
} else if (name === '%AsyncGeneratorFunction%') {
|
|
14702
|
-
value = getEvalledConstructor('async function* () {}');
|
|
14703
|
-
} else if (name === '%AsyncGenerator%') {
|
|
14704
|
-
var fn = doEval('%AsyncGeneratorFunction%');
|
|
14705
|
-
if (fn) {
|
|
14706
|
-
value = fn.prototype;
|
|
14707
|
-
}
|
|
14708
|
-
} else if (name === '%AsyncIteratorPrototype%') {
|
|
14709
|
-
var gen = doEval('%AsyncGenerator%');
|
|
14710
|
-
if (gen) {
|
|
14711
|
-
value = getProto(gen.prototype);
|
|
14712
|
-
}
|
|
14713
|
-
}
|
|
14714
|
-
|
|
14715
|
-
INTRINSICS[name] = value;
|
|
14716
|
-
|
|
14717
|
-
return value;
|
|
14718
|
-
};
|
|
14719
|
-
|
|
14720
|
-
var LEGACY_ALIASES = {
|
|
14721
|
-
'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
|
|
14722
|
-
'%ArrayPrototype%': ['Array', 'prototype'],
|
|
14723
|
-
'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
|
|
14724
|
-
'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
|
|
14725
|
-
'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
|
|
14726
|
-
'%ArrayProto_values%': ['Array', 'prototype', 'values'],
|
|
14727
|
-
'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
|
|
14728
|
-
'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
|
|
14729
|
-
'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
|
|
14730
|
-
'%BooleanPrototype%': ['Boolean', 'prototype'],
|
|
14731
|
-
'%DataViewPrototype%': ['DataView', 'prototype'],
|
|
14732
|
-
'%DatePrototype%': ['Date', 'prototype'],
|
|
14733
|
-
'%ErrorPrototype%': ['Error', 'prototype'],
|
|
14734
|
-
'%EvalErrorPrototype%': ['EvalError', 'prototype'],
|
|
14735
|
-
'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
|
|
14736
|
-
'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
|
|
14737
|
-
'%FunctionPrototype%': ['Function', 'prototype'],
|
|
14738
|
-
'%Generator%': ['GeneratorFunction', 'prototype'],
|
|
14739
|
-
'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
|
|
14740
|
-
'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
|
|
14741
|
-
'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
|
|
14742
|
-
'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
|
|
14743
|
-
'%JSONParse%': ['JSON', 'parse'],
|
|
14744
|
-
'%JSONStringify%': ['JSON', 'stringify'],
|
|
14745
|
-
'%MapPrototype%': ['Map', 'prototype'],
|
|
14746
|
-
'%NumberPrototype%': ['Number', 'prototype'],
|
|
14747
|
-
'%ObjectPrototype%': ['Object', 'prototype'],
|
|
14748
|
-
'%ObjProto_toString%': ['Object', 'prototype', 'toString'],
|
|
14749
|
-
'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
|
|
14750
|
-
'%PromisePrototype%': ['Promise', 'prototype'],
|
|
14751
|
-
'%PromiseProto_then%': ['Promise', 'prototype', 'then'],
|
|
14752
|
-
'%Promise_all%': ['Promise', 'all'],
|
|
14753
|
-
'%Promise_reject%': ['Promise', 'reject'],
|
|
14754
|
-
'%Promise_resolve%': ['Promise', 'resolve'],
|
|
14755
|
-
'%RangeErrorPrototype%': ['RangeError', 'prototype'],
|
|
14756
|
-
'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
|
|
14757
|
-
'%RegExpPrototype%': ['RegExp', 'prototype'],
|
|
14758
|
-
'%SetPrototype%': ['Set', 'prototype'],
|
|
14759
|
-
'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
|
|
14760
|
-
'%StringPrototype%': ['String', 'prototype'],
|
|
14761
|
-
'%SymbolPrototype%': ['Symbol', 'prototype'],
|
|
14762
|
-
'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
|
|
14763
|
-
'%TypedArrayPrototype%': ['TypedArray', 'prototype'],
|
|
14764
|
-
'%TypeErrorPrototype%': ['TypeError', 'prototype'],
|
|
14765
|
-
'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
|
|
14766
|
-
'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
|
|
14767
|
-
'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
|
|
14768
|
-
'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
|
|
14769
|
-
'%URIErrorPrototype%': ['URIError', 'prototype'],
|
|
14770
|
-
'%WeakMapPrototype%': ['WeakMap', 'prototype'],
|
|
14771
|
-
'%WeakSetPrototype%': ['WeakSet', 'prototype']
|
|
14772
|
-
};
|
|
14773
|
-
|
|
14774
|
-
var bind = require('function-bind');
|
|
14775
|
-
var hasOwn = require('has');
|
|
14776
|
-
var $concat = bind.call(Function.call, Array.prototype.concat);
|
|
14777
|
-
var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
|
|
14778
|
-
var $replace = bind.call(Function.call, String.prototype.replace);
|
|
14779
|
-
var $strSlice = bind.call(Function.call, String.prototype.slice);
|
|
14780
|
-
var $exec = bind.call(Function.call, RegExp.prototype.exec);
|
|
14781
|
-
|
|
14782
|
-
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
|
14783
|
-
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
14784
|
-
var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
|
|
14785
|
-
var stringToPath = function stringToPath(string) {
|
|
14786
|
-
var first = $strSlice(string, 0, 1);
|
|
14787
|
-
var last = $strSlice(string, -1);
|
|
14788
|
-
if (first === '%' && last !== '%') {
|
|
14789
|
-
throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
|
|
14790
|
-
} else if (last === '%' && first !== '%') {
|
|
14791
|
-
throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
|
|
14792
|
-
}
|
|
14793
|
-
var result = [];
|
|
14794
|
-
$replace(string, rePropName, function (match, number, quote, subString) {
|
|
14795
|
-
result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
|
|
14796
|
-
});
|
|
14797
|
-
return result;
|
|
14798
|
-
};
|
|
14799
|
-
/* end adaptation */
|
|
14800
|
-
|
|
14801
|
-
var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
|
|
14802
|
-
var intrinsicName = name;
|
|
14803
|
-
var alias;
|
|
14804
|
-
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
|
|
14805
|
-
alias = LEGACY_ALIASES[intrinsicName];
|
|
14806
|
-
intrinsicName = '%' + alias[0] + '%';
|
|
14807
|
-
}
|
|
14808
|
-
|
|
14809
|
-
if (hasOwn(INTRINSICS, intrinsicName)) {
|
|
14810
|
-
var value = INTRINSICS[intrinsicName];
|
|
14811
|
-
if (value === needsEval) {
|
|
14812
|
-
value = doEval(intrinsicName);
|
|
14813
|
-
}
|
|
14814
|
-
if (typeof value === 'undefined' && !allowMissing) {
|
|
14815
|
-
throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
|
|
14816
|
-
}
|
|
14817
|
-
|
|
14818
|
-
return {
|
|
14819
|
-
alias: alias,
|
|
14820
|
-
name: intrinsicName,
|
|
14821
|
-
value: value
|
|
14822
|
-
};
|
|
14823
|
-
}
|
|
14824
|
-
|
|
14825
|
-
throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
|
|
14826
|
-
};
|
|
14827
|
-
|
|
14828
|
-
module.exports = function GetIntrinsic(name, allowMissing) {
|
|
14829
|
-
if (typeof name !== 'string' || name.length === 0) {
|
|
14830
|
-
throw new $TypeError('intrinsic name must be a non-empty string');
|
|
14831
|
-
}
|
|
14832
|
-
if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
|
|
14833
|
-
throw new $TypeError('"allowMissing" argument must be a boolean');
|
|
14834
|
-
}
|
|
14835
|
-
|
|
14836
|
-
if ($exec(/^%?[^%]*%?$/g, name) === null) {
|
|
14837
|
-
throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
|
|
14838
|
-
}
|
|
14839
|
-
var parts = stringToPath(name);
|
|
14840
|
-
var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
|
|
14841
|
-
|
|
14842
|
-
var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
|
|
14843
|
-
var intrinsicRealName = intrinsic.name;
|
|
14844
|
-
var value = intrinsic.value;
|
|
14845
|
-
var skipFurtherCaching = false;
|
|
14846
|
-
|
|
14847
|
-
var alias = intrinsic.alias;
|
|
14848
|
-
if (alias) {
|
|
14849
|
-
intrinsicBaseName = alias[0];
|
|
14850
|
-
$spliceApply(parts, $concat([0, 1], alias));
|
|
14851
|
-
}
|
|
14852
|
-
|
|
14853
|
-
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
|
14854
|
-
var part = parts[i];
|
|
14855
|
-
var first = $strSlice(part, 0, 1);
|
|
14856
|
-
var last = $strSlice(part, -1);
|
|
14857
|
-
if (
|
|
14858
|
-
(
|
|
14859
|
-
(first === '"' || first === "'" || first === '`')
|
|
14860
|
-
|| (last === '"' || last === "'" || last === '`')
|
|
14861
|
-
)
|
|
14862
|
-
&& first !== last
|
|
14863
|
-
) {
|
|
14864
|
-
throw new $SyntaxError('property names with quotes must have matching quotes');
|
|
14865
|
-
}
|
|
14866
|
-
if (part === 'constructor' || !isOwn) {
|
|
14867
|
-
skipFurtherCaching = true;
|
|
14868
|
-
}
|
|
14869
|
-
|
|
14870
|
-
intrinsicBaseName += '.' + part;
|
|
14871
|
-
intrinsicRealName = '%' + intrinsicBaseName + '%';
|
|
14872
|
-
|
|
14873
|
-
if (hasOwn(INTRINSICS, intrinsicRealName)) {
|
|
14874
|
-
value = INTRINSICS[intrinsicRealName];
|
|
14875
|
-
} else if (value != null) {
|
|
14876
|
-
if (!(part in value)) {
|
|
14877
|
-
if (!allowMissing) {
|
|
14878
|
-
throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
|
|
14879
|
-
}
|
|
14880
|
-
return void undefined;
|
|
14881
|
-
}
|
|
14882
|
-
if ($gOPD && (i + 1) >= parts.length) {
|
|
14883
|
-
var desc = $gOPD(value, part);
|
|
14884
|
-
isOwn = !!desc;
|
|
14885
|
-
|
|
14886
|
-
// By convention, when a data property is converted to an accessor
|
|
14887
|
-
// property to emulate a data property that does not suffer from
|
|
14888
|
-
// the override mistake, that accessor's getter is marked with
|
|
14889
|
-
// an `originalValue` property. Here, when we detect this, we
|
|
14890
|
-
// uphold the illusion by pretending to see that original data
|
|
14891
|
-
// property, i.e., returning the value rather than the getter
|
|
14892
|
-
// itself.
|
|
14893
|
-
if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
|
|
14894
|
-
value = desc.get;
|
|
14895
|
-
} else {
|
|
14896
|
-
value = value[part];
|
|
14897
|
-
}
|
|
14898
|
-
} else {
|
|
14899
|
-
isOwn = hasOwn(value, part);
|
|
14900
|
-
value = value[part];
|
|
14901
|
-
}
|
|
14902
|
-
|
|
14903
|
-
if (isOwn && !skipFurtherCaching) {
|
|
14904
|
-
INTRINSICS[intrinsicRealName] = value;
|
|
14905
|
-
}
|
|
14906
|
-
}
|
|
14907
|
-
}
|
|
14908
|
-
return value;
|
|
14909
|
-
};
|
|
14910
|
-
|
|
14911
|
-
},{"function-bind":26,"has":30,"has-symbols":28}],28:[function(require,module,exports){
|
|
14912
|
-
'use strict';
|
|
14913
|
-
|
|
14914
|
-
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
|
14915
|
-
var hasSymbolSham = require('./shams');
|
|
14916
|
-
|
|
14917
|
-
module.exports = function hasNativeSymbols() {
|
|
14918
|
-
if (typeof origSymbol !== 'function') { return false; }
|
|
14919
|
-
if (typeof Symbol !== 'function') { return false; }
|
|
14920
|
-
if (typeof origSymbol('foo') !== 'symbol') { return false; }
|
|
14921
|
-
if (typeof Symbol('bar') !== 'symbol') { return false; }
|
|
14922
|
-
|
|
14923
|
-
return hasSymbolSham();
|
|
14924
|
-
};
|
|
14925
|
-
|
|
14926
|
-
},{"./shams":29}],29:[function(require,module,exports){
|
|
14927
|
-
'use strict';
|
|
14928
|
-
|
|
14929
|
-
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
|
14930
|
-
module.exports = function hasSymbols() {
|
|
14931
|
-
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
|
|
14932
|
-
if (typeof Symbol.iterator === 'symbol') { return true; }
|
|
14933
|
-
|
|
14934
|
-
var obj = {};
|
|
14935
|
-
var sym = Symbol('test');
|
|
14936
|
-
var symObj = Object(sym);
|
|
14937
|
-
if (typeof sym === 'string') { return false; }
|
|
14938
|
-
|
|
14939
|
-
if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
|
|
14940
|
-
if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
|
|
14941
|
-
|
|
14942
|
-
// temp disabled per https://github.com/ljharb/object.assign/issues/17
|
|
14943
|
-
// if (sym instanceof Symbol) { return false; }
|
|
14944
|
-
// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
|
|
14945
|
-
// if (!(symObj instanceof Symbol)) { return false; }
|
|
14946
|
-
|
|
14947
|
-
// if (typeof Symbol.prototype.toString !== 'function') { return false; }
|
|
14948
|
-
// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
|
|
14949
|
-
|
|
14950
|
-
var symVal = 42;
|
|
14951
|
-
obj[sym] = symVal;
|
|
14952
|
-
for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
|
|
14953
|
-
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
|
|
14954
|
-
|
|
14955
|
-
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
|
|
14956
|
-
|
|
14957
|
-
var syms = Object.getOwnPropertySymbols(obj);
|
|
14958
|
-
if (syms.length !== 1 || syms[0] !== sym) { return false; }
|
|
14959
|
-
|
|
14960
|
-
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
|
|
14961
|
-
|
|
14962
|
-
if (typeof Object.getOwnPropertyDescriptor === 'function') {
|
|
14963
|
-
var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
|
|
14964
|
-
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
|
|
14965
|
-
}
|
|
14966
|
-
|
|
14967
|
-
return true;
|
|
14968
|
-
};
|
|
14969
|
-
|
|
14970
|
-
},{}],30:[function(require,module,exports){
|
|
14971
|
-
'use strict';
|
|
14972
|
-
|
|
14973
|
-
var bind = require('function-bind');
|
|
14974
|
-
|
|
14975
|
-
module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
|
|
14976
|
-
|
|
14977
|
-
},{"function-bind":26}],31:[function(require,module,exports){
|
|
14386
|
+
},{"base64-js":17,"buffer":18,"ieee754":19}],19:[function(require,module,exports){
|
|
14978
14387
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
14979
14388
|
exports.read = function (buffer, offset, isLE, mLen, nBytes) {
|
|
14980
14389
|
var e, m
|
|
@@ -15061,170 +14470,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
|
|
|
15061
14470
|
buffer[offset + i - d] |= s * 128
|
|
15062
14471
|
}
|
|
15063
14472
|
|
|
15064
|
-
},{}],
|
|
15065
|
-
if (typeof Object.create === 'function') {
|
|
15066
|
-
// implementation from standard node.js 'util' module
|
|
15067
|
-
module.exports = function inherits(ctor, superCtor) {
|
|
15068
|
-
if (superCtor) {
|
|
15069
|
-
ctor.super_ = superCtor
|
|
15070
|
-
ctor.prototype = Object.create(superCtor.prototype, {
|
|
15071
|
-
constructor: {
|
|
15072
|
-
value: ctor,
|
|
15073
|
-
enumerable: false,
|
|
15074
|
-
writable: true,
|
|
15075
|
-
configurable: true
|
|
15076
|
-
}
|
|
15077
|
-
})
|
|
15078
|
-
}
|
|
15079
|
-
};
|
|
15080
|
-
} else {
|
|
15081
|
-
// old school shim for old browsers
|
|
15082
|
-
module.exports = function inherits(ctor, superCtor) {
|
|
15083
|
-
if (superCtor) {
|
|
15084
|
-
ctor.super_ = superCtor
|
|
15085
|
-
var TempCtor = function () {}
|
|
15086
|
-
TempCtor.prototype = superCtor.prototype
|
|
15087
|
-
ctor.prototype = new TempCtor()
|
|
15088
|
-
ctor.prototype.constructor = ctor
|
|
15089
|
-
}
|
|
15090
|
-
}
|
|
15091
|
-
}
|
|
15092
|
-
|
|
15093
|
-
},{}],33:[function(require,module,exports){
|
|
15094
|
-
'use strict';
|
|
15095
|
-
|
|
15096
|
-
var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
|
|
15097
|
-
var callBound = require('call-bind/callBound');
|
|
15098
|
-
|
|
15099
|
-
var $toString = callBound('Object.prototype.toString');
|
|
15100
|
-
|
|
15101
|
-
var isStandardArguments = function isArguments(value) {
|
|
15102
|
-
if (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) {
|
|
15103
|
-
return false;
|
|
15104
|
-
}
|
|
15105
|
-
return $toString(value) === '[object Arguments]';
|
|
15106
|
-
};
|
|
15107
|
-
|
|
15108
|
-
var isLegacyArguments = function isArguments(value) {
|
|
15109
|
-
if (isStandardArguments(value)) {
|
|
15110
|
-
return true;
|
|
15111
|
-
}
|
|
15112
|
-
return value !== null &&
|
|
15113
|
-
typeof value === 'object' &&
|
|
15114
|
-
typeof value.length === 'number' &&
|
|
15115
|
-
value.length >= 0 &&
|
|
15116
|
-
$toString(value) !== '[object Array]' &&
|
|
15117
|
-
$toString(value.callee) === '[object Function]';
|
|
15118
|
-
};
|
|
15119
|
-
|
|
15120
|
-
var supportsStandardArguments = (function () {
|
|
15121
|
-
return isStandardArguments(arguments);
|
|
15122
|
-
}());
|
|
15123
|
-
|
|
15124
|
-
isStandardArguments.isLegacyArguments = isLegacyArguments; // for tests
|
|
15125
|
-
|
|
15126
|
-
module.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;
|
|
15127
|
-
|
|
15128
|
-
},{"call-bind/callBound":21}],34:[function(require,module,exports){
|
|
15129
|
-
'use strict';
|
|
15130
|
-
|
|
15131
|
-
var toStr = Object.prototype.toString;
|
|
15132
|
-
var fnToStr = Function.prototype.toString;
|
|
15133
|
-
var isFnRegex = /^\s*(?:function)?\*/;
|
|
15134
|
-
var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
|
|
15135
|
-
var getProto = Object.getPrototypeOf;
|
|
15136
|
-
var getGeneratorFunc = function () { // eslint-disable-line consistent-return
|
|
15137
|
-
if (!hasToStringTag) {
|
|
15138
|
-
return false;
|
|
15139
|
-
}
|
|
15140
|
-
try {
|
|
15141
|
-
return Function('return function*() {}')();
|
|
15142
|
-
} catch (e) {
|
|
15143
|
-
}
|
|
15144
|
-
};
|
|
15145
|
-
var generatorFunc = getGeneratorFunc();
|
|
15146
|
-
var GeneratorFunction = getProto && generatorFunc ? getProto(generatorFunc) : false;
|
|
15147
|
-
|
|
15148
|
-
module.exports = function isGeneratorFunction(fn) {
|
|
15149
|
-
if (typeof fn !== 'function') {
|
|
15150
|
-
return false;
|
|
15151
|
-
}
|
|
15152
|
-
if (isFnRegex.test(fnToStr.call(fn))) {
|
|
15153
|
-
return true;
|
|
15154
|
-
}
|
|
15155
|
-
if (!hasToStringTag) {
|
|
15156
|
-
var str = toStr.call(fn);
|
|
15157
|
-
return str === '[object GeneratorFunction]';
|
|
15158
|
-
}
|
|
15159
|
-
return getProto && getProto(fn) === GeneratorFunction;
|
|
15160
|
-
};
|
|
15161
|
-
|
|
15162
|
-
},{}],35:[function(require,module,exports){
|
|
15163
|
-
(function (global){(function (){
|
|
15164
|
-
'use strict';
|
|
15165
|
-
|
|
15166
|
-
var forEach = require('foreach');
|
|
15167
|
-
var availableTypedArrays = require('available-typed-arrays');
|
|
15168
|
-
var callBound = require('call-bind/callBound');
|
|
15169
|
-
|
|
15170
|
-
var $toString = callBound('Object.prototype.toString');
|
|
15171
|
-
var hasSymbols = require('has-symbols')();
|
|
15172
|
-
var hasToStringTag = hasSymbols && typeof Symbol.toStringTag === 'symbol';
|
|
15173
|
-
|
|
15174
|
-
var typedArrays = availableTypedArrays();
|
|
15175
|
-
|
|
15176
|
-
var $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) {
|
|
15177
|
-
for (var i = 0; i < array.length; i += 1) {
|
|
15178
|
-
if (array[i] === value) {
|
|
15179
|
-
return i;
|
|
15180
|
-
}
|
|
15181
|
-
}
|
|
15182
|
-
return -1;
|
|
15183
|
-
};
|
|
15184
|
-
var $slice = callBound('String.prototype.slice');
|
|
15185
|
-
var toStrTags = {};
|
|
15186
|
-
var gOPD = require('es-abstract/helpers/getOwnPropertyDescriptor');
|
|
15187
|
-
var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');
|
|
15188
|
-
if (hasToStringTag && gOPD && getPrototypeOf) {
|
|
15189
|
-
forEach(typedArrays, function (typedArray) {
|
|
15190
|
-
var arr = new global[typedArray]();
|
|
15191
|
-
if (!(Symbol.toStringTag in arr)) {
|
|
15192
|
-
throw new EvalError('this engine has support for Symbol.toStringTag, but ' + typedArray + ' does not have the property! Please report this.');
|
|
15193
|
-
}
|
|
15194
|
-
var proto = getPrototypeOf(arr);
|
|
15195
|
-
var descriptor = gOPD(proto, Symbol.toStringTag);
|
|
15196
|
-
if (!descriptor) {
|
|
15197
|
-
var superProto = getPrototypeOf(proto);
|
|
15198
|
-
descriptor = gOPD(superProto, Symbol.toStringTag);
|
|
15199
|
-
}
|
|
15200
|
-
toStrTags[typedArray] = descriptor.get;
|
|
15201
|
-
});
|
|
15202
|
-
}
|
|
15203
|
-
|
|
15204
|
-
var tryTypedArrays = function tryAllTypedArrays(value) {
|
|
15205
|
-
var anyTrue = false;
|
|
15206
|
-
forEach(toStrTags, function (getter, typedArray) {
|
|
15207
|
-
if (!anyTrue) {
|
|
15208
|
-
try {
|
|
15209
|
-
anyTrue = getter.call(value) === typedArray;
|
|
15210
|
-
} catch (e) { /**/ }
|
|
15211
|
-
}
|
|
15212
|
-
});
|
|
15213
|
-
return anyTrue;
|
|
15214
|
-
};
|
|
15215
|
-
|
|
15216
|
-
module.exports = function isTypedArray(value) {
|
|
15217
|
-
if (!value || typeof value !== 'object') { return false; }
|
|
15218
|
-
if (!hasToStringTag) {
|
|
15219
|
-
var tag = $slice($toString(value), 8, -1);
|
|
15220
|
-
return $indexOf(typedArrays, tag) > -1;
|
|
15221
|
-
}
|
|
15222
|
-
if (!gOPD) { return false; }
|
|
15223
|
-
return tryTypedArrays(value);
|
|
15224
|
-
};
|
|
15225
|
-
|
|
15226
|
-
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
15227
|
-
},{"available-typed-arrays":18,"call-bind/callBound":21,"es-abstract/helpers/getOwnPropertyDescriptor":23,"foreach":24,"has-symbols":28}],36:[function(require,module,exports){
|
|
14473
|
+
},{}],20:[function(require,module,exports){
|
|
15228
14474
|
// Top level file is just a mixin of submodules & constants
|
|
15229
14475
|
'use strict';
|
|
15230
14476
|
|
|
@@ -15244,7 +14490,7 @@ module.exports.inflateRaw = inflateRaw;
|
|
|
15244
14490
|
module.exports.ungzip = ungzip;
|
|
15245
14491
|
module.exports.constants = constants;
|
|
15246
14492
|
|
|
15247
|
-
},{"./lib/deflate":
|
|
14493
|
+
},{"./lib/deflate":21,"./lib/inflate":22,"./lib/zlib/constants":26}],21:[function(require,module,exports){
|
|
15248
14494
|
'use strict';
|
|
15249
14495
|
|
|
15250
14496
|
|
|
@@ -15626,7 +14872,7 @@ module.exports.deflateRaw = deflateRaw;
|
|
|
15626
14872
|
module.exports.gzip = gzip;
|
|
15627
14873
|
module.exports.constants = require('./zlib/constants');
|
|
15628
14874
|
|
|
15629
|
-
},{"./utils/common":
|
|
14875
|
+
},{"./utils/common":23,"./utils/strings":24,"./zlib/constants":26,"./zlib/deflate":28,"./zlib/messages":33,"./zlib/zstream":35}],22:[function(require,module,exports){
|
|
15630
14876
|
'use strict';
|
|
15631
14877
|
|
|
15632
14878
|
|
|
@@ -16047,7 +15293,7 @@ module.exports.inflateRaw = inflateRaw;
|
|
|
16047
15293
|
module.exports.ungzip = inflate;
|
|
16048
15294
|
module.exports.constants = require('./zlib/constants');
|
|
16049
15295
|
|
|
16050
|
-
},{"./utils/common":
|
|
15296
|
+
},{"./utils/common":23,"./utils/strings":24,"./zlib/constants":26,"./zlib/gzheader":29,"./zlib/inflate":31,"./zlib/messages":33,"./zlib/zstream":35}],23:[function(require,module,exports){
|
|
16051
15297
|
'use strict';
|
|
16052
15298
|
|
|
16053
15299
|
|
|
@@ -16097,7 +15343,7 @@ module.exports.flattenChunks = (chunks) => {
|
|
|
16097
15343
|
return result;
|
|
16098
15344
|
};
|
|
16099
15345
|
|
|
16100
|
-
},{}],
|
|
15346
|
+
},{}],24:[function(require,module,exports){
|
|
16101
15347
|
// String encode/decode helpers
|
|
16102
15348
|
'use strict';
|
|
16103
15349
|
|
|
@@ -16273,7 +15519,7 @@ module.exports.utf8border = (buf, max) => {
|
|
|
16273
15519
|
return (pos + _utf8len[buf[pos]] > max) ? pos : max;
|
|
16274
15520
|
};
|
|
16275
15521
|
|
|
16276
|
-
},{}],
|
|
15522
|
+
},{}],25:[function(require,module,exports){
|
|
16277
15523
|
'use strict';
|
|
16278
15524
|
|
|
16279
15525
|
// Note: adler32 takes 12% for level 0 and 2% for level 6.
|
|
@@ -16326,7 +15572,7 @@ const adler32 = (adler, buf, len, pos) => {
|
|
|
16326
15572
|
|
|
16327
15573
|
module.exports = adler32;
|
|
16328
15574
|
|
|
16329
|
-
},{}],
|
|
15575
|
+
},{}],26:[function(require,module,exports){
|
|
16330
15576
|
'use strict';
|
|
16331
15577
|
|
|
16332
15578
|
// (C) 1995-2013 Jean-loup Gailly and Mark Adler
|
|
@@ -16396,7 +15642,7 @@ module.exports = {
|
|
|
16396
15642
|
//Z_NULL: null // Use -1 or null inline, depending on var type
|
|
16397
15643
|
};
|
|
16398
15644
|
|
|
16399
|
-
},{}],
|
|
15645
|
+
},{}],27:[function(require,module,exports){
|
|
16400
15646
|
'use strict';
|
|
16401
15647
|
|
|
16402
15648
|
// Note: we can't get significant speed boost here.
|
|
@@ -16457,7 +15703,7 @@ const crc32 = (crc, buf, len, pos) => {
|
|
|
16457
15703
|
|
|
16458
15704
|
module.exports = crc32;
|
|
16459
15705
|
|
|
16460
|
-
},{}],
|
|
15706
|
+
},{}],28:[function(require,module,exports){
|
|
16461
15707
|
'use strict';
|
|
16462
15708
|
|
|
16463
15709
|
// (C) 1995-2013 Jean-loup Gailly and Mark Adler
|
|
@@ -18507,7 +17753,7 @@ module.exports.deflatePrime = deflatePrime;
|
|
|
18507
17753
|
module.exports.deflateTune = deflateTune;
|
|
18508
17754
|
*/
|
|
18509
17755
|
|
|
18510
|
-
},{"./adler32":
|
|
17756
|
+
},{"./adler32":25,"./constants":26,"./crc32":27,"./messages":33,"./trees":34}],29:[function(require,module,exports){
|
|
18511
17757
|
'use strict';
|
|
18512
17758
|
|
|
18513
17759
|
// (C) 1995-2013 Jean-loup Gailly and Mark Adler
|
|
@@ -18567,7 +17813,7 @@ function GZheader() {
|
|
|
18567
17813
|
|
|
18568
17814
|
module.exports = GZheader;
|
|
18569
17815
|
|
|
18570
|
-
},{}],
|
|
17816
|
+
},{}],30:[function(require,module,exports){
|
|
18571
17817
|
'use strict';
|
|
18572
17818
|
|
|
18573
17819
|
// (C) 1995-2013 Jean-loup Gailly and Mark Adler
|
|
@@ -18913,7 +18159,7 @@ module.exports = function inflate_fast(strm, start) {
|
|
|
18913
18159
|
return;
|
|
18914
18160
|
};
|
|
18915
18161
|
|
|
18916
|
-
},{}],
|
|
18162
|
+
},{}],31:[function(require,module,exports){
|
|
18917
18163
|
'use strict';
|
|
18918
18164
|
|
|
18919
18165
|
// (C) 1995-2013 Jean-loup Gailly and Mark Adler
|
|
@@ -20487,7 +19733,7 @@ module.exports.inflateUndermine = inflateUndermine;
|
|
|
20487
19733
|
module.exports.inflateValidate = inflateValidate;
|
|
20488
19734
|
*/
|
|
20489
19735
|
|
|
20490
|
-
},{"./adler32":
|
|
19736
|
+
},{"./adler32":25,"./constants":26,"./crc32":27,"./inffast":30,"./inftrees":32}],32:[function(require,module,exports){
|
|
20491
19737
|
'use strict';
|
|
20492
19738
|
|
|
20493
19739
|
// (C) 1995-2013 Jean-loup Gailly and Mark Adler
|
|
@@ -20829,7 +20075,7 @@ const inflate_table = (type, lens, lens_index, codes, table, table_index, work,
|
|
|
20829
20075
|
|
|
20830
20076
|
module.exports = inflate_table;
|
|
20831
20077
|
|
|
20832
|
-
},{}],
|
|
20078
|
+
},{}],33:[function(require,module,exports){
|
|
20833
20079
|
'use strict';
|
|
20834
20080
|
|
|
20835
20081
|
// (C) 1995-2013 Jean-loup Gailly and Mark Adler
|
|
@@ -20863,7 +20109,7 @@ module.exports = {
|
|
|
20863
20109
|
'-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */
|
|
20864
20110
|
};
|
|
20865
20111
|
|
|
20866
|
-
},{}],
|
|
20112
|
+
},{}],34:[function(require,module,exports){
|
|
20867
20113
|
'use strict';
|
|
20868
20114
|
|
|
20869
20115
|
// (C) 1995-2013 Jean-loup Gailly and Mark Adler
|
|
@@ -22044,7 +21290,7 @@ module.exports._tr_flush_block = _tr_flush_block;
|
|
|
22044
21290
|
module.exports._tr_tally = _tr_tally;
|
|
22045
21291
|
module.exports._tr_align = _tr_align;
|
|
22046
21292
|
|
|
22047
|
-
},{}],
|
|
21293
|
+
},{}],35:[function(require,module,exports){
|
|
22048
21294
|
'use strict';
|
|
22049
21295
|
|
|
22050
21296
|
// (C) 1995-2013 Jean-loup Gailly and Mark Adler
|
|
@@ -22093,1311 +21339,5 @@ function ZStream() {
|
|
|
22093
21339
|
|
|
22094
21340
|
module.exports = ZStream;
|
|
22095
21341
|
|
|
22096
|
-
},{}],
|
|
22097
|
-
// shim for using process in browser
|
|
22098
|
-
var process = module.exports = {};
|
|
22099
|
-
|
|
22100
|
-
// cached from whatever global is present so that test runners that stub it
|
|
22101
|
-
// don't break things. But we need to wrap it in a try catch in case it is
|
|
22102
|
-
// wrapped in strict mode code which doesn't define any globals. It's inside a
|
|
22103
|
-
// function because try/catches deoptimize in certain engines.
|
|
22104
|
-
|
|
22105
|
-
var cachedSetTimeout;
|
|
22106
|
-
var cachedClearTimeout;
|
|
22107
|
-
|
|
22108
|
-
function defaultSetTimout() {
|
|
22109
|
-
throw new Error('setTimeout has not been defined');
|
|
22110
|
-
}
|
|
22111
|
-
function defaultClearTimeout () {
|
|
22112
|
-
throw new Error('clearTimeout has not been defined');
|
|
22113
|
-
}
|
|
22114
|
-
(function () {
|
|
22115
|
-
try {
|
|
22116
|
-
if (typeof setTimeout === 'function') {
|
|
22117
|
-
cachedSetTimeout = setTimeout;
|
|
22118
|
-
} else {
|
|
22119
|
-
cachedSetTimeout = defaultSetTimout;
|
|
22120
|
-
}
|
|
22121
|
-
} catch (e) {
|
|
22122
|
-
cachedSetTimeout = defaultSetTimout;
|
|
22123
|
-
}
|
|
22124
|
-
try {
|
|
22125
|
-
if (typeof clearTimeout === 'function') {
|
|
22126
|
-
cachedClearTimeout = clearTimeout;
|
|
22127
|
-
} else {
|
|
22128
|
-
cachedClearTimeout = defaultClearTimeout;
|
|
22129
|
-
}
|
|
22130
|
-
} catch (e) {
|
|
22131
|
-
cachedClearTimeout = defaultClearTimeout;
|
|
22132
|
-
}
|
|
22133
|
-
} ())
|
|
22134
|
-
function runTimeout(fun) {
|
|
22135
|
-
if (cachedSetTimeout === setTimeout) {
|
|
22136
|
-
//normal enviroments in sane situations
|
|
22137
|
-
return setTimeout(fun, 0);
|
|
22138
|
-
}
|
|
22139
|
-
// if setTimeout wasn't available but was latter defined
|
|
22140
|
-
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
|
22141
|
-
cachedSetTimeout = setTimeout;
|
|
22142
|
-
return setTimeout(fun, 0);
|
|
22143
|
-
}
|
|
22144
|
-
try {
|
|
22145
|
-
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
22146
|
-
return cachedSetTimeout(fun, 0);
|
|
22147
|
-
} catch(e){
|
|
22148
|
-
try {
|
|
22149
|
-
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
22150
|
-
return cachedSetTimeout.call(null, fun, 0);
|
|
22151
|
-
} catch(e){
|
|
22152
|
-
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
|
|
22153
|
-
return cachedSetTimeout.call(this, fun, 0);
|
|
22154
|
-
}
|
|
22155
|
-
}
|
|
22156
|
-
|
|
22157
|
-
|
|
22158
|
-
}
|
|
22159
|
-
function runClearTimeout(marker) {
|
|
22160
|
-
if (cachedClearTimeout === clearTimeout) {
|
|
22161
|
-
//normal enviroments in sane situations
|
|
22162
|
-
return clearTimeout(marker);
|
|
22163
|
-
}
|
|
22164
|
-
// if clearTimeout wasn't available but was latter defined
|
|
22165
|
-
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
|
22166
|
-
cachedClearTimeout = clearTimeout;
|
|
22167
|
-
return clearTimeout(marker);
|
|
22168
|
-
}
|
|
22169
|
-
try {
|
|
22170
|
-
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
22171
|
-
return cachedClearTimeout(marker);
|
|
22172
|
-
} catch (e){
|
|
22173
|
-
try {
|
|
22174
|
-
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
22175
|
-
return cachedClearTimeout.call(null, marker);
|
|
22176
|
-
} catch (e){
|
|
22177
|
-
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
|
|
22178
|
-
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
|
|
22179
|
-
return cachedClearTimeout.call(this, marker);
|
|
22180
|
-
}
|
|
22181
|
-
}
|
|
22182
|
-
|
|
22183
|
-
|
|
22184
|
-
|
|
22185
|
-
}
|
|
22186
|
-
var queue = [];
|
|
22187
|
-
var draining = false;
|
|
22188
|
-
var currentQueue;
|
|
22189
|
-
var queueIndex = -1;
|
|
22190
|
-
|
|
22191
|
-
function cleanUpNextTick() {
|
|
22192
|
-
if (!draining || !currentQueue) {
|
|
22193
|
-
return;
|
|
22194
|
-
}
|
|
22195
|
-
draining = false;
|
|
22196
|
-
if (currentQueue.length) {
|
|
22197
|
-
queue = currentQueue.concat(queue);
|
|
22198
|
-
} else {
|
|
22199
|
-
queueIndex = -1;
|
|
22200
|
-
}
|
|
22201
|
-
if (queue.length) {
|
|
22202
|
-
drainQueue();
|
|
22203
|
-
}
|
|
22204
|
-
}
|
|
22205
|
-
|
|
22206
|
-
function drainQueue() {
|
|
22207
|
-
if (draining) {
|
|
22208
|
-
return;
|
|
22209
|
-
}
|
|
22210
|
-
var timeout = runTimeout(cleanUpNextTick);
|
|
22211
|
-
draining = true;
|
|
22212
|
-
|
|
22213
|
-
var len = queue.length;
|
|
22214
|
-
while(len) {
|
|
22215
|
-
currentQueue = queue;
|
|
22216
|
-
queue = [];
|
|
22217
|
-
while (++queueIndex < len) {
|
|
22218
|
-
if (currentQueue) {
|
|
22219
|
-
currentQueue[queueIndex].run();
|
|
22220
|
-
}
|
|
22221
|
-
}
|
|
22222
|
-
queueIndex = -1;
|
|
22223
|
-
len = queue.length;
|
|
22224
|
-
}
|
|
22225
|
-
currentQueue = null;
|
|
22226
|
-
draining = false;
|
|
22227
|
-
runClearTimeout(timeout);
|
|
22228
|
-
}
|
|
22229
|
-
|
|
22230
|
-
process.nextTick = function (fun) {
|
|
22231
|
-
var args = new Array(arguments.length - 1);
|
|
22232
|
-
if (arguments.length > 1) {
|
|
22233
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
22234
|
-
args[i - 1] = arguments[i];
|
|
22235
|
-
}
|
|
22236
|
-
}
|
|
22237
|
-
queue.push(new Item(fun, args));
|
|
22238
|
-
if (queue.length === 1 && !draining) {
|
|
22239
|
-
runTimeout(drainQueue);
|
|
22240
|
-
}
|
|
22241
|
-
};
|
|
22242
|
-
|
|
22243
|
-
// v8 likes predictible objects
|
|
22244
|
-
function Item(fun, array) {
|
|
22245
|
-
this.fun = fun;
|
|
22246
|
-
this.array = array;
|
|
22247
|
-
}
|
|
22248
|
-
Item.prototype.run = function () {
|
|
22249
|
-
this.fun.apply(null, this.array);
|
|
22250
|
-
};
|
|
22251
|
-
process.title = 'browser';
|
|
22252
|
-
process.browser = true;
|
|
22253
|
-
process.env = {};
|
|
22254
|
-
process.argv = [];
|
|
22255
|
-
process.version = ''; // empty string to avoid regexp issues
|
|
22256
|
-
process.versions = {};
|
|
22257
|
-
|
|
22258
|
-
function noop() {}
|
|
22259
|
-
|
|
22260
|
-
process.on = noop;
|
|
22261
|
-
process.addListener = noop;
|
|
22262
|
-
process.once = noop;
|
|
22263
|
-
process.off = noop;
|
|
22264
|
-
process.removeListener = noop;
|
|
22265
|
-
process.removeAllListeners = noop;
|
|
22266
|
-
process.emit = noop;
|
|
22267
|
-
process.prependListener = noop;
|
|
22268
|
-
process.prependOnceListener = noop;
|
|
22269
|
-
|
|
22270
|
-
process.listeners = function (name) { return [] }
|
|
22271
|
-
|
|
22272
|
-
process.binding = function (name) {
|
|
22273
|
-
throw new Error('process.binding is not supported');
|
|
22274
|
-
};
|
|
22275
|
-
|
|
22276
|
-
process.cwd = function () { return '/' };
|
|
22277
|
-
process.chdir = function (dir) {
|
|
22278
|
-
throw new Error('process.chdir is not supported');
|
|
22279
|
-
};
|
|
22280
|
-
process.umask = function() { return 0; };
|
|
22281
|
-
|
|
22282
|
-
},{}],53:[function(require,module,exports){
|
|
22283
|
-
module.exports = function isBuffer(arg) {
|
|
22284
|
-
return arg && typeof arg === 'object'
|
|
22285
|
-
&& typeof arg.copy === 'function'
|
|
22286
|
-
&& typeof arg.fill === 'function'
|
|
22287
|
-
&& typeof arg.readUInt8 === 'function';
|
|
22288
|
-
}
|
|
22289
|
-
},{}],54:[function(require,module,exports){
|
|
22290
|
-
// Currently in sync with Node.js lib/internal/util/types.js
|
|
22291
|
-
// https://github.com/nodejs/node/commit/112cc7c27551254aa2b17098fb774867f05ed0d9
|
|
22292
|
-
|
|
22293
|
-
'use strict';
|
|
22294
|
-
|
|
22295
|
-
var isArgumentsObject = require('is-arguments');
|
|
22296
|
-
var isGeneratorFunction = require('is-generator-function');
|
|
22297
|
-
var whichTypedArray = require('which-typed-array');
|
|
22298
|
-
var isTypedArray = require('is-typed-array');
|
|
22299
|
-
|
|
22300
|
-
function uncurryThis(f) {
|
|
22301
|
-
return f.call.bind(f);
|
|
22302
|
-
}
|
|
22303
|
-
|
|
22304
|
-
var BigIntSupported = typeof BigInt !== 'undefined';
|
|
22305
|
-
var SymbolSupported = typeof Symbol !== 'undefined';
|
|
22306
|
-
|
|
22307
|
-
var ObjectToString = uncurryThis(Object.prototype.toString);
|
|
22308
|
-
|
|
22309
|
-
var numberValue = uncurryThis(Number.prototype.valueOf);
|
|
22310
|
-
var stringValue = uncurryThis(String.prototype.valueOf);
|
|
22311
|
-
var booleanValue = uncurryThis(Boolean.prototype.valueOf);
|
|
22312
|
-
|
|
22313
|
-
if (BigIntSupported) {
|
|
22314
|
-
var bigIntValue = uncurryThis(BigInt.prototype.valueOf);
|
|
22315
|
-
}
|
|
22316
|
-
|
|
22317
|
-
if (SymbolSupported) {
|
|
22318
|
-
var symbolValue = uncurryThis(Symbol.prototype.valueOf);
|
|
22319
|
-
}
|
|
22320
|
-
|
|
22321
|
-
function checkBoxedPrimitive(value, prototypeValueOf) {
|
|
22322
|
-
if (typeof value !== 'object') {
|
|
22323
|
-
return false;
|
|
22324
|
-
}
|
|
22325
|
-
try {
|
|
22326
|
-
prototypeValueOf(value);
|
|
22327
|
-
return true;
|
|
22328
|
-
} catch(e) {
|
|
22329
|
-
return false;
|
|
22330
|
-
}
|
|
22331
|
-
}
|
|
22332
|
-
|
|
22333
|
-
exports.isArgumentsObject = isArgumentsObject;
|
|
22334
|
-
exports.isGeneratorFunction = isGeneratorFunction;
|
|
22335
|
-
exports.isTypedArray = isTypedArray;
|
|
22336
|
-
|
|
22337
|
-
// Taken from here and modified for better browser support
|
|
22338
|
-
// https://github.com/sindresorhus/p-is-promise/blob/cda35a513bda03f977ad5cde3a079d237e82d7ef/index.js
|
|
22339
|
-
function isPromise(input) {
|
|
22340
|
-
return (
|
|
22341
|
-
(
|
|
22342
|
-
typeof Promise !== 'undefined' &&
|
|
22343
|
-
input instanceof Promise
|
|
22344
|
-
) ||
|
|
22345
|
-
(
|
|
22346
|
-
input !== null &&
|
|
22347
|
-
typeof input === 'object' &&
|
|
22348
|
-
typeof input.then === 'function' &&
|
|
22349
|
-
typeof input.catch === 'function'
|
|
22350
|
-
)
|
|
22351
|
-
);
|
|
22352
|
-
}
|
|
22353
|
-
exports.isPromise = isPromise;
|
|
22354
|
-
|
|
22355
|
-
function isArrayBufferView(value) {
|
|
22356
|
-
if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {
|
|
22357
|
-
return ArrayBuffer.isView(value);
|
|
22358
|
-
}
|
|
22359
|
-
|
|
22360
|
-
return (
|
|
22361
|
-
isTypedArray(value) ||
|
|
22362
|
-
isDataView(value)
|
|
22363
|
-
);
|
|
22364
|
-
}
|
|
22365
|
-
exports.isArrayBufferView = isArrayBufferView;
|
|
22366
|
-
|
|
22367
|
-
|
|
22368
|
-
function isUint8Array(value) {
|
|
22369
|
-
return whichTypedArray(value) === 'Uint8Array';
|
|
22370
|
-
}
|
|
22371
|
-
exports.isUint8Array = isUint8Array;
|
|
22372
|
-
|
|
22373
|
-
function isUint8ClampedArray(value) {
|
|
22374
|
-
return whichTypedArray(value) === 'Uint8ClampedArray';
|
|
22375
|
-
}
|
|
22376
|
-
exports.isUint8ClampedArray = isUint8ClampedArray;
|
|
22377
|
-
|
|
22378
|
-
function isUint16Array(value) {
|
|
22379
|
-
return whichTypedArray(value) === 'Uint16Array';
|
|
22380
|
-
}
|
|
22381
|
-
exports.isUint16Array = isUint16Array;
|
|
22382
|
-
|
|
22383
|
-
function isUint32Array(value) {
|
|
22384
|
-
return whichTypedArray(value) === 'Uint32Array';
|
|
22385
|
-
}
|
|
22386
|
-
exports.isUint32Array = isUint32Array;
|
|
22387
|
-
|
|
22388
|
-
function isInt8Array(value) {
|
|
22389
|
-
return whichTypedArray(value) === 'Int8Array';
|
|
22390
|
-
}
|
|
22391
|
-
exports.isInt8Array = isInt8Array;
|
|
22392
|
-
|
|
22393
|
-
function isInt16Array(value) {
|
|
22394
|
-
return whichTypedArray(value) === 'Int16Array';
|
|
22395
|
-
}
|
|
22396
|
-
exports.isInt16Array = isInt16Array;
|
|
22397
|
-
|
|
22398
|
-
function isInt32Array(value) {
|
|
22399
|
-
return whichTypedArray(value) === 'Int32Array';
|
|
22400
|
-
}
|
|
22401
|
-
exports.isInt32Array = isInt32Array;
|
|
22402
|
-
|
|
22403
|
-
function isFloat32Array(value) {
|
|
22404
|
-
return whichTypedArray(value) === 'Float32Array';
|
|
22405
|
-
}
|
|
22406
|
-
exports.isFloat32Array = isFloat32Array;
|
|
22407
|
-
|
|
22408
|
-
function isFloat64Array(value) {
|
|
22409
|
-
return whichTypedArray(value) === 'Float64Array';
|
|
22410
|
-
}
|
|
22411
|
-
exports.isFloat64Array = isFloat64Array;
|
|
22412
|
-
|
|
22413
|
-
function isBigInt64Array(value) {
|
|
22414
|
-
return whichTypedArray(value) === 'BigInt64Array';
|
|
22415
|
-
}
|
|
22416
|
-
exports.isBigInt64Array = isBigInt64Array;
|
|
22417
|
-
|
|
22418
|
-
function isBigUint64Array(value) {
|
|
22419
|
-
return whichTypedArray(value) === 'BigUint64Array';
|
|
22420
|
-
}
|
|
22421
|
-
exports.isBigUint64Array = isBigUint64Array;
|
|
22422
|
-
|
|
22423
|
-
function isMapToString(value) {
|
|
22424
|
-
return ObjectToString(value) === '[object Map]';
|
|
22425
|
-
}
|
|
22426
|
-
isMapToString.working = (
|
|
22427
|
-
typeof Map !== 'undefined' &&
|
|
22428
|
-
isMapToString(new Map())
|
|
22429
|
-
);
|
|
22430
|
-
|
|
22431
|
-
function isMap(value) {
|
|
22432
|
-
if (typeof Map === 'undefined') {
|
|
22433
|
-
return false;
|
|
22434
|
-
}
|
|
22435
|
-
|
|
22436
|
-
return isMapToString.working
|
|
22437
|
-
? isMapToString(value)
|
|
22438
|
-
: value instanceof Map;
|
|
22439
|
-
}
|
|
22440
|
-
exports.isMap = isMap;
|
|
22441
|
-
|
|
22442
|
-
function isSetToString(value) {
|
|
22443
|
-
return ObjectToString(value) === '[object Set]';
|
|
22444
|
-
}
|
|
22445
|
-
isSetToString.working = (
|
|
22446
|
-
typeof Set !== 'undefined' &&
|
|
22447
|
-
isSetToString(new Set())
|
|
22448
|
-
);
|
|
22449
|
-
function isSet(value) {
|
|
22450
|
-
if (typeof Set === 'undefined') {
|
|
22451
|
-
return false;
|
|
22452
|
-
}
|
|
22453
|
-
|
|
22454
|
-
return isSetToString.working
|
|
22455
|
-
? isSetToString(value)
|
|
22456
|
-
: value instanceof Set;
|
|
22457
|
-
}
|
|
22458
|
-
exports.isSet = isSet;
|
|
22459
|
-
|
|
22460
|
-
function isWeakMapToString(value) {
|
|
22461
|
-
return ObjectToString(value) === '[object WeakMap]';
|
|
22462
|
-
}
|
|
22463
|
-
isWeakMapToString.working = (
|
|
22464
|
-
typeof WeakMap !== 'undefined' &&
|
|
22465
|
-
isWeakMapToString(new WeakMap())
|
|
22466
|
-
);
|
|
22467
|
-
function isWeakMap(value) {
|
|
22468
|
-
if (typeof WeakMap === 'undefined') {
|
|
22469
|
-
return false;
|
|
22470
|
-
}
|
|
22471
|
-
|
|
22472
|
-
return isWeakMapToString.working
|
|
22473
|
-
? isWeakMapToString(value)
|
|
22474
|
-
: value instanceof WeakMap;
|
|
22475
|
-
}
|
|
22476
|
-
exports.isWeakMap = isWeakMap;
|
|
22477
|
-
|
|
22478
|
-
function isWeakSetToString(value) {
|
|
22479
|
-
return ObjectToString(value) === '[object WeakSet]';
|
|
22480
|
-
}
|
|
22481
|
-
isWeakSetToString.working = (
|
|
22482
|
-
typeof WeakSet !== 'undefined' &&
|
|
22483
|
-
isWeakSetToString(new WeakSet())
|
|
22484
|
-
);
|
|
22485
|
-
function isWeakSet(value) {
|
|
22486
|
-
return isWeakSetToString(value);
|
|
22487
|
-
}
|
|
22488
|
-
exports.isWeakSet = isWeakSet;
|
|
22489
|
-
|
|
22490
|
-
function isArrayBufferToString(value) {
|
|
22491
|
-
return ObjectToString(value) === '[object ArrayBuffer]';
|
|
22492
|
-
}
|
|
22493
|
-
isArrayBufferToString.working = (
|
|
22494
|
-
typeof ArrayBuffer !== 'undefined' &&
|
|
22495
|
-
isArrayBufferToString(new ArrayBuffer())
|
|
22496
|
-
);
|
|
22497
|
-
function isArrayBuffer(value) {
|
|
22498
|
-
if (typeof ArrayBuffer === 'undefined') {
|
|
22499
|
-
return false;
|
|
22500
|
-
}
|
|
22501
|
-
|
|
22502
|
-
return isArrayBufferToString.working
|
|
22503
|
-
? isArrayBufferToString(value)
|
|
22504
|
-
: value instanceof ArrayBuffer;
|
|
22505
|
-
}
|
|
22506
|
-
exports.isArrayBuffer = isArrayBuffer;
|
|
22507
|
-
|
|
22508
|
-
function isDataViewToString(value) {
|
|
22509
|
-
return ObjectToString(value) === '[object DataView]';
|
|
22510
|
-
}
|
|
22511
|
-
isDataViewToString.working = (
|
|
22512
|
-
typeof ArrayBuffer !== 'undefined' &&
|
|
22513
|
-
typeof DataView !== 'undefined' &&
|
|
22514
|
-
isDataViewToString(new DataView(new ArrayBuffer(1), 0, 1))
|
|
22515
|
-
);
|
|
22516
|
-
function isDataView(value) {
|
|
22517
|
-
if (typeof DataView === 'undefined') {
|
|
22518
|
-
return false;
|
|
22519
|
-
}
|
|
22520
|
-
|
|
22521
|
-
return isDataViewToString.working
|
|
22522
|
-
? isDataViewToString(value)
|
|
22523
|
-
: value instanceof DataView;
|
|
22524
|
-
}
|
|
22525
|
-
exports.isDataView = isDataView;
|
|
22526
|
-
|
|
22527
|
-
function isSharedArrayBufferToString(value) {
|
|
22528
|
-
return ObjectToString(value) === '[object SharedArrayBuffer]';
|
|
22529
|
-
}
|
|
22530
|
-
isSharedArrayBufferToString.working = (
|
|
22531
|
-
typeof SharedArrayBuffer !== 'undefined' &&
|
|
22532
|
-
isSharedArrayBufferToString(new SharedArrayBuffer())
|
|
22533
|
-
);
|
|
22534
|
-
function isSharedArrayBuffer(value) {
|
|
22535
|
-
if (typeof SharedArrayBuffer === 'undefined') {
|
|
22536
|
-
return false;
|
|
22537
|
-
}
|
|
22538
|
-
|
|
22539
|
-
return isSharedArrayBufferToString.working
|
|
22540
|
-
? isSharedArrayBufferToString(value)
|
|
22541
|
-
: value instanceof SharedArrayBuffer;
|
|
22542
|
-
}
|
|
22543
|
-
exports.isSharedArrayBuffer = isSharedArrayBuffer;
|
|
22544
|
-
|
|
22545
|
-
function isAsyncFunction(value) {
|
|
22546
|
-
return ObjectToString(value) === '[object AsyncFunction]';
|
|
22547
|
-
}
|
|
22548
|
-
exports.isAsyncFunction = isAsyncFunction;
|
|
22549
|
-
|
|
22550
|
-
function isMapIterator(value) {
|
|
22551
|
-
return ObjectToString(value) === '[object Map Iterator]';
|
|
22552
|
-
}
|
|
22553
|
-
exports.isMapIterator = isMapIterator;
|
|
22554
|
-
|
|
22555
|
-
function isSetIterator(value) {
|
|
22556
|
-
return ObjectToString(value) === '[object Set Iterator]';
|
|
22557
|
-
}
|
|
22558
|
-
exports.isSetIterator = isSetIterator;
|
|
22559
|
-
|
|
22560
|
-
function isGeneratorObject(value) {
|
|
22561
|
-
return ObjectToString(value) === '[object Generator]';
|
|
22562
|
-
}
|
|
22563
|
-
exports.isGeneratorObject = isGeneratorObject;
|
|
22564
|
-
|
|
22565
|
-
function isWebAssemblyCompiledModule(value) {
|
|
22566
|
-
return ObjectToString(value) === '[object WebAssembly.Module]';
|
|
22567
|
-
}
|
|
22568
|
-
exports.isWebAssemblyCompiledModule = isWebAssemblyCompiledModule;
|
|
22569
|
-
|
|
22570
|
-
function isNumberObject(value) {
|
|
22571
|
-
return checkBoxedPrimitive(value, numberValue);
|
|
22572
|
-
}
|
|
22573
|
-
exports.isNumberObject = isNumberObject;
|
|
22574
|
-
|
|
22575
|
-
function isStringObject(value) {
|
|
22576
|
-
return checkBoxedPrimitive(value, stringValue);
|
|
22577
|
-
}
|
|
22578
|
-
exports.isStringObject = isStringObject;
|
|
22579
|
-
|
|
22580
|
-
function isBooleanObject(value) {
|
|
22581
|
-
return checkBoxedPrimitive(value, booleanValue);
|
|
22582
|
-
}
|
|
22583
|
-
exports.isBooleanObject = isBooleanObject;
|
|
22584
|
-
|
|
22585
|
-
function isBigIntObject(value) {
|
|
22586
|
-
return BigIntSupported && checkBoxedPrimitive(value, bigIntValue);
|
|
22587
|
-
}
|
|
22588
|
-
exports.isBigIntObject = isBigIntObject;
|
|
22589
|
-
|
|
22590
|
-
function isSymbolObject(value) {
|
|
22591
|
-
return SymbolSupported && checkBoxedPrimitive(value, symbolValue);
|
|
22592
|
-
}
|
|
22593
|
-
exports.isSymbolObject = isSymbolObject;
|
|
22594
|
-
|
|
22595
|
-
function isBoxedPrimitive(value) {
|
|
22596
|
-
return (
|
|
22597
|
-
isNumberObject(value) ||
|
|
22598
|
-
isStringObject(value) ||
|
|
22599
|
-
isBooleanObject(value) ||
|
|
22600
|
-
isBigIntObject(value) ||
|
|
22601
|
-
isSymbolObject(value)
|
|
22602
|
-
);
|
|
22603
|
-
}
|
|
22604
|
-
exports.isBoxedPrimitive = isBoxedPrimitive;
|
|
22605
|
-
|
|
22606
|
-
function isAnyArrayBuffer(value) {
|
|
22607
|
-
return typeof Uint8Array !== 'undefined' && (
|
|
22608
|
-
isArrayBuffer(value) ||
|
|
22609
|
-
isSharedArrayBuffer(value)
|
|
22610
|
-
);
|
|
22611
|
-
}
|
|
22612
|
-
exports.isAnyArrayBuffer = isAnyArrayBuffer;
|
|
22613
|
-
|
|
22614
|
-
['isProxy', 'isExternal', 'isModuleNamespaceObject'].forEach(function(method) {
|
|
22615
|
-
Object.defineProperty(exports, method, {
|
|
22616
|
-
enumerable: false,
|
|
22617
|
-
value: function() {
|
|
22618
|
-
throw new Error(method + ' is not supported in userland');
|
|
22619
|
-
}
|
|
22620
|
-
});
|
|
22621
|
-
});
|
|
22622
|
-
|
|
22623
|
-
},{"is-arguments":33,"is-generator-function":34,"is-typed-array":35,"which-typed-array":56}],55:[function(require,module,exports){
|
|
22624
|
-
(function (process){(function (){
|
|
22625
|
-
// Copyright Joyent, Inc. and other Node contributors.
|
|
22626
|
-
//
|
|
22627
|
-
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
22628
|
-
// copy of this software and associated documentation files (the
|
|
22629
|
-
// "Software"), to deal in the Software without restriction, including
|
|
22630
|
-
// without limitation the rights to use, copy, modify, merge, publish,
|
|
22631
|
-
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
22632
|
-
// persons to whom the Software is furnished to do so, subject to the
|
|
22633
|
-
// following conditions:
|
|
22634
|
-
//
|
|
22635
|
-
// The above copyright notice and this permission notice shall be included
|
|
22636
|
-
// in all copies or substantial portions of the Software.
|
|
22637
|
-
//
|
|
22638
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
22639
|
-
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
22640
|
-
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
22641
|
-
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
22642
|
-
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
22643
|
-
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
22644
|
-
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
22645
|
-
|
|
22646
|
-
var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors ||
|
|
22647
|
-
function getOwnPropertyDescriptors(obj) {
|
|
22648
|
-
var keys = Object.keys(obj);
|
|
22649
|
-
var descriptors = {};
|
|
22650
|
-
for (var i = 0; i < keys.length; i++) {
|
|
22651
|
-
descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);
|
|
22652
|
-
}
|
|
22653
|
-
return descriptors;
|
|
22654
|
-
};
|
|
22655
|
-
|
|
22656
|
-
var formatRegExp = /%[sdj%]/g;
|
|
22657
|
-
exports.format = function(f) {
|
|
22658
|
-
if (!isString(f)) {
|
|
22659
|
-
var objects = [];
|
|
22660
|
-
for (var i = 0; i < arguments.length; i++) {
|
|
22661
|
-
objects.push(inspect(arguments[i]));
|
|
22662
|
-
}
|
|
22663
|
-
return objects.join(' ');
|
|
22664
|
-
}
|
|
22665
|
-
|
|
22666
|
-
var i = 1;
|
|
22667
|
-
var args = arguments;
|
|
22668
|
-
var len = args.length;
|
|
22669
|
-
var str = String(f).replace(formatRegExp, function(x) {
|
|
22670
|
-
if (x === '%%') return '%';
|
|
22671
|
-
if (i >= len) return x;
|
|
22672
|
-
switch (x) {
|
|
22673
|
-
case '%s': return String(args[i++]);
|
|
22674
|
-
case '%d': return Number(args[i++]);
|
|
22675
|
-
case '%j':
|
|
22676
|
-
try {
|
|
22677
|
-
return JSON.stringify(args[i++]);
|
|
22678
|
-
} catch (_) {
|
|
22679
|
-
return '[Circular]';
|
|
22680
|
-
}
|
|
22681
|
-
default:
|
|
22682
|
-
return x;
|
|
22683
|
-
}
|
|
22684
|
-
});
|
|
22685
|
-
for (var x = args[i]; i < len; x = args[++i]) {
|
|
22686
|
-
if (isNull(x) || !isObject(x)) {
|
|
22687
|
-
str += ' ' + x;
|
|
22688
|
-
} else {
|
|
22689
|
-
str += ' ' + inspect(x);
|
|
22690
|
-
}
|
|
22691
|
-
}
|
|
22692
|
-
return str;
|
|
22693
|
-
};
|
|
22694
|
-
|
|
22695
|
-
|
|
22696
|
-
// Mark that a method should not be used.
|
|
22697
|
-
// Returns a modified function which warns once by default.
|
|
22698
|
-
// If --no-deprecation is set, then it is a no-op.
|
|
22699
|
-
exports.deprecate = function(fn, msg) {
|
|
22700
|
-
if (typeof process !== 'undefined' && process.noDeprecation === true) {
|
|
22701
|
-
return fn;
|
|
22702
|
-
}
|
|
22703
|
-
|
|
22704
|
-
// Allow for deprecating things in the process of starting up.
|
|
22705
|
-
if (typeof process === 'undefined') {
|
|
22706
|
-
return function() {
|
|
22707
|
-
return exports.deprecate(fn, msg).apply(this, arguments);
|
|
22708
|
-
};
|
|
22709
|
-
}
|
|
22710
|
-
|
|
22711
|
-
var warned = false;
|
|
22712
|
-
function deprecated() {
|
|
22713
|
-
if (!warned) {
|
|
22714
|
-
if (process.throwDeprecation) {
|
|
22715
|
-
throw new Error(msg);
|
|
22716
|
-
} else if (process.traceDeprecation) {
|
|
22717
|
-
console.trace(msg);
|
|
22718
|
-
} else {
|
|
22719
|
-
console.error(msg);
|
|
22720
|
-
}
|
|
22721
|
-
warned = true;
|
|
22722
|
-
}
|
|
22723
|
-
return fn.apply(this, arguments);
|
|
22724
|
-
}
|
|
22725
|
-
|
|
22726
|
-
return deprecated;
|
|
22727
|
-
};
|
|
22728
|
-
|
|
22729
|
-
|
|
22730
|
-
var debugs = {};
|
|
22731
|
-
var debugEnvRegex = /^$/;
|
|
22732
|
-
|
|
22733
|
-
if (process.env.NODE_DEBUG) {
|
|
22734
|
-
var debugEnv = process.env.NODE_DEBUG;
|
|
22735
|
-
debugEnv = debugEnv.replace(/[|\\{}()[\]^$+?.]/g, '\\$&')
|
|
22736
|
-
.replace(/\*/g, '.*')
|
|
22737
|
-
.replace(/,/g, '$|^')
|
|
22738
|
-
.toUpperCase();
|
|
22739
|
-
debugEnvRegex = new RegExp('^' + debugEnv + '$', 'i');
|
|
22740
|
-
}
|
|
22741
|
-
exports.debuglog = function(set) {
|
|
22742
|
-
set = set.toUpperCase();
|
|
22743
|
-
if (!debugs[set]) {
|
|
22744
|
-
if (debugEnvRegex.test(set)) {
|
|
22745
|
-
var pid = process.pid;
|
|
22746
|
-
debugs[set] = function() {
|
|
22747
|
-
var msg = exports.format.apply(exports, arguments);
|
|
22748
|
-
console.error('%s %d: %s', set, pid, msg);
|
|
22749
|
-
};
|
|
22750
|
-
} else {
|
|
22751
|
-
debugs[set] = function() {};
|
|
22752
|
-
}
|
|
22753
|
-
}
|
|
22754
|
-
return debugs[set];
|
|
22755
|
-
};
|
|
22756
|
-
|
|
22757
|
-
|
|
22758
|
-
/**
|
|
22759
|
-
* Echos the value of a value. Trys to print the value out
|
|
22760
|
-
* in the best way possible given the different types.
|
|
22761
|
-
*
|
|
22762
|
-
* @param {Object} obj The object to print out.
|
|
22763
|
-
* @param {Object} opts Optional options object that alters the output.
|
|
22764
|
-
*/
|
|
22765
|
-
/* legacy: obj, showHidden, depth, colors*/
|
|
22766
|
-
function inspect(obj, opts) {
|
|
22767
|
-
// default options
|
|
22768
|
-
var ctx = {
|
|
22769
|
-
seen: [],
|
|
22770
|
-
stylize: stylizeNoColor
|
|
22771
|
-
};
|
|
22772
|
-
// legacy...
|
|
22773
|
-
if (arguments.length >= 3) ctx.depth = arguments[2];
|
|
22774
|
-
if (arguments.length >= 4) ctx.colors = arguments[3];
|
|
22775
|
-
if (isBoolean(opts)) {
|
|
22776
|
-
// legacy...
|
|
22777
|
-
ctx.showHidden = opts;
|
|
22778
|
-
} else if (opts) {
|
|
22779
|
-
// got an "options" object
|
|
22780
|
-
exports._extend(ctx, opts);
|
|
22781
|
-
}
|
|
22782
|
-
// set default options
|
|
22783
|
-
if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
|
|
22784
|
-
if (isUndefined(ctx.depth)) ctx.depth = 2;
|
|
22785
|
-
if (isUndefined(ctx.colors)) ctx.colors = false;
|
|
22786
|
-
if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
|
|
22787
|
-
if (ctx.colors) ctx.stylize = stylizeWithColor;
|
|
22788
|
-
return formatValue(ctx, obj, ctx.depth);
|
|
22789
|
-
}
|
|
22790
|
-
exports.inspect = inspect;
|
|
22791
|
-
|
|
22792
|
-
|
|
22793
|
-
// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
|
|
22794
|
-
inspect.colors = {
|
|
22795
|
-
'bold' : [1, 22],
|
|
22796
|
-
'italic' : [3, 23],
|
|
22797
|
-
'underline' : [4, 24],
|
|
22798
|
-
'inverse' : [7, 27],
|
|
22799
|
-
'white' : [37, 39],
|
|
22800
|
-
'grey' : [90, 39],
|
|
22801
|
-
'black' : [30, 39],
|
|
22802
|
-
'blue' : [34, 39],
|
|
22803
|
-
'cyan' : [36, 39],
|
|
22804
|
-
'green' : [32, 39],
|
|
22805
|
-
'magenta' : [35, 39],
|
|
22806
|
-
'red' : [31, 39],
|
|
22807
|
-
'yellow' : [33, 39]
|
|
22808
|
-
};
|
|
22809
|
-
|
|
22810
|
-
// Don't use 'blue' not visible on cmd.exe
|
|
22811
|
-
inspect.styles = {
|
|
22812
|
-
'special': 'cyan',
|
|
22813
|
-
'number': 'yellow',
|
|
22814
|
-
'boolean': 'yellow',
|
|
22815
|
-
'undefined': 'grey',
|
|
22816
|
-
'null': 'bold',
|
|
22817
|
-
'string': 'green',
|
|
22818
|
-
'date': 'magenta',
|
|
22819
|
-
// "name": intentionally not styling
|
|
22820
|
-
'regexp': 'red'
|
|
22821
|
-
};
|
|
22822
|
-
|
|
22823
|
-
|
|
22824
|
-
function stylizeWithColor(str, styleType) {
|
|
22825
|
-
var style = inspect.styles[styleType];
|
|
22826
|
-
|
|
22827
|
-
if (style) {
|
|
22828
|
-
return '\u001b[' + inspect.colors[style][0] + 'm' + str +
|
|
22829
|
-
'\u001b[' + inspect.colors[style][1] + 'm';
|
|
22830
|
-
} else {
|
|
22831
|
-
return str;
|
|
22832
|
-
}
|
|
22833
|
-
}
|
|
22834
|
-
|
|
22835
|
-
|
|
22836
|
-
function stylizeNoColor(str, styleType) {
|
|
22837
|
-
return str;
|
|
22838
|
-
}
|
|
22839
|
-
|
|
22840
|
-
|
|
22841
|
-
function arrayToHash(array) {
|
|
22842
|
-
var hash = {};
|
|
22843
|
-
|
|
22844
|
-
array.forEach(function(val, idx) {
|
|
22845
|
-
hash[val] = true;
|
|
22846
|
-
});
|
|
22847
|
-
|
|
22848
|
-
return hash;
|
|
22849
|
-
}
|
|
22850
|
-
|
|
22851
|
-
|
|
22852
|
-
function formatValue(ctx, value, recurseTimes) {
|
|
22853
|
-
// Provide a hook for user-specified inspect functions.
|
|
22854
|
-
// Check that value is an object with an inspect function on it
|
|
22855
|
-
if (ctx.customInspect &&
|
|
22856
|
-
value &&
|
|
22857
|
-
isFunction(value.inspect) &&
|
|
22858
|
-
// Filter out the util module, it's inspect function is special
|
|
22859
|
-
value.inspect !== exports.inspect &&
|
|
22860
|
-
// Also filter out any prototype objects using the circular check.
|
|
22861
|
-
!(value.constructor && value.constructor.prototype === value)) {
|
|
22862
|
-
var ret = value.inspect(recurseTimes, ctx);
|
|
22863
|
-
if (!isString(ret)) {
|
|
22864
|
-
ret = formatValue(ctx, ret, recurseTimes);
|
|
22865
|
-
}
|
|
22866
|
-
return ret;
|
|
22867
|
-
}
|
|
22868
|
-
|
|
22869
|
-
// Primitive types cannot have properties
|
|
22870
|
-
var primitive = formatPrimitive(ctx, value);
|
|
22871
|
-
if (primitive) {
|
|
22872
|
-
return primitive;
|
|
22873
|
-
}
|
|
22874
|
-
|
|
22875
|
-
// Look up the keys of the object.
|
|
22876
|
-
var keys = Object.keys(value);
|
|
22877
|
-
var visibleKeys = arrayToHash(keys);
|
|
22878
|
-
|
|
22879
|
-
if (ctx.showHidden) {
|
|
22880
|
-
keys = Object.getOwnPropertyNames(value);
|
|
22881
|
-
}
|
|
22882
|
-
|
|
22883
|
-
// IE doesn't make error fields non-enumerable
|
|
22884
|
-
// http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
|
|
22885
|
-
if (isError(value)
|
|
22886
|
-
&& (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
|
|
22887
|
-
return formatError(value);
|
|
22888
|
-
}
|
|
22889
|
-
|
|
22890
|
-
// Some type of object without properties can be shortcutted.
|
|
22891
|
-
if (keys.length === 0) {
|
|
22892
|
-
if (isFunction(value)) {
|
|
22893
|
-
var name = value.name ? ': ' + value.name : '';
|
|
22894
|
-
return ctx.stylize('[Function' + name + ']', 'special');
|
|
22895
|
-
}
|
|
22896
|
-
if (isRegExp(value)) {
|
|
22897
|
-
return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
|
|
22898
|
-
}
|
|
22899
|
-
if (isDate(value)) {
|
|
22900
|
-
return ctx.stylize(Date.prototype.toString.call(value), 'date');
|
|
22901
|
-
}
|
|
22902
|
-
if (isError(value)) {
|
|
22903
|
-
return formatError(value);
|
|
22904
|
-
}
|
|
22905
|
-
}
|
|
22906
|
-
|
|
22907
|
-
var base = '', array = false, braces = ['{', '}'];
|
|
22908
|
-
|
|
22909
|
-
// Make Array say that they are Array
|
|
22910
|
-
if (isArray(value)) {
|
|
22911
|
-
array = true;
|
|
22912
|
-
braces = ['[', ']'];
|
|
22913
|
-
}
|
|
22914
|
-
|
|
22915
|
-
// Make functions say that they are functions
|
|
22916
|
-
if (isFunction(value)) {
|
|
22917
|
-
var n = value.name ? ': ' + value.name : '';
|
|
22918
|
-
base = ' [Function' + n + ']';
|
|
22919
|
-
}
|
|
22920
|
-
|
|
22921
|
-
// Make RegExps say that they are RegExps
|
|
22922
|
-
if (isRegExp(value)) {
|
|
22923
|
-
base = ' ' + RegExp.prototype.toString.call(value);
|
|
22924
|
-
}
|
|
22925
|
-
|
|
22926
|
-
// Make dates with properties first say the date
|
|
22927
|
-
if (isDate(value)) {
|
|
22928
|
-
base = ' ' + Date.prototype.toUTCString.call(value);
|
|
22929
|
-
}
|
|
22930
|
-
|
|
22931
|
-
// Make error with message first say the error
|
|
22932
|
-
if (isError(value)) {
|
|
22933
|
-
base = ' ' + formatError(value);
|
|
22934
|
-
}
|
|
22935
|
-
|
|
22936
|
-
if (keys.length === 0 && (!array || value.length == 0)) {
|
|
22937
|
-
return braces[0] + base + braces[1];
|
|
22938
|
-
}
|
|
22939
|
-
|
|
22940
|
-
if (recurseTimes < 0) {
|
|
22941
|
-
if (isRegExp(value)) {
|
|
22942
|
-
return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
|
|
22943
|
-
} else {
|
|
22944
|
-
return ctx.stylize('[Object]', 'special');
|
|
22945
|
-
}
|
|
22946
|
-
}
|
|
22947
|
-
|
|
22948
|
-
ctx.seen.push(value);
|
|
22949
|
-
|
|
22950
|
-
var output;
|
|
22951
|
-
if (array) {
|
|
22952
|
-
output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
|
|
22953
|
-
} else {
|
|
22954
|
-
output = keys.map(function(key) {
|
|
22955
|
-
return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
|
|
22956
|
-
});
|
|
22957
|
-
}
|
|
22958
|
-
|
|
22959
|
-
ctx.seen.pop();
|
|
22960
|
-
|
|
22961
|
-
return reduceToSingleString(output, base, braces);
|
|
22962
|
-
}
|
|
22963
|
-
|
|
22964
|
-
|
|
22965
|
-
function formatPrimitive(ctx, value) {
|
|
22966
|
-
if (isUndefined(value))
|
|
22967
|
-
return ctx.stylize('undefined', 'undefined');
|
|
22968
|
-
if (isString(value)) {
|
|
22969
|
-
var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
|
|
22970
|
-
.replace(/'/g, "\\'")
|
|
22971
|
-
.replace(/\\"/g, '"') + '\'';
|
|
22972
|
-
return ctx.stylize(simple, 'string');
|
|
22973
|
-
}
|
|
22974
|
-
if (isNumber(value))
|
|
22975
|
-
return ctx.stylize('' + value, 'number');
|
|
22976
|
-
if (isBoolean(value))
|
|
22977
|
-
return ctx.stylize('' + value, 'boolean');
|
|
22978
|
-
// For some reason typeof null is "object", so special case here.
|
|
22979
|
-
if (isNull(value))
|
|
22980
|
-
return ctx.stylize('null', 'null');
|
|
22981
|
-
}
|
|
22982
|
-
|
|
22983
|
-
|
|
22984
|
-
function formatError(value) {
|
|
22985
|
-
return '[' + Error.prototype.toString.call(value) + ']';
|
|
22986
|
-
}
|
|
22987
|
-
|
|
22988
|
-
|
|
22989
|
-
function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
|
|
22990
|
-
var output = [];
|
|
22991
|
-
for (var i = 0, l = value.length; i < l; ++i) {
|
|
22992
|
-
if (hasOwnProperty(value, String(i))) {
|
|
22993
|
-
output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
|
|
22994
|
-
String(i), true));
|
|
22995
|
-
} else {
|
|
22996
|
-
output.push('');
|
|
22997
|
-
}
|
|
22998
|
-
}
|
|
22999
|
-
keys.forEach(function(key) {
|
|
23000
|
-
if (!key.match(/^\d+$/)) {
|
|
23001
|
-
output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
|
|
23002
|
-
key, true));
|
|
23003
|
-
}
|
|
23004
|
-
});
|
|
23005
|
-
return output;
|
|
23006
|
-
}
|
|
23007
|
-
|
|
23008
|
-
|
|
23009
|
-
function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
|
|
23010
|
-
var name, str, desc;
|
|
23011
|
-
desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
|
|
23012
|
-
if (desc.get) {
|
|
23013
|
-
if (desc.set) {
|
|
23014
|
-
str = ctx.stylize('[Getter/Setter]', 'special');
|
|
23015
|
-
} else {
|
|
23016
|
-
str = ctx.stylize('[Getter]', 'special');
|
|
23017
|
-
}
|
|
23018
|
-
} else {
|
|
23019
|
-
if (desc.set) {
|
|
23020
|
-
str = ctx.stylize('[Setter]', 'special');
|
|
23021
|
-
}
|
|
23022
|
-
}
|
|
23023
|
-
if (!hasOwnProperty(visibleKeys, key)) {
|
|
23024
|
-
name = '[' + key + ']';
|
|
23025
|
-
}
|
|
23026
|
-
if (!str) {
|
|
23027
|
-
if (ctx.seen.indexOf(desc.value) < 0) {
|
|
23028
|
-
if (isNull(recurseTimes)) {
|
|
23029
|
-
str = formatValue(ctx, desc.value, null);
|
|
23030
|
-
} else {
|
|
23031
|
-
str = formatValue(ctx, desc.value, recurseTimes - 1);
|
|
23032
|
-
}
|
|
23033
|
-
if (str.indexOf('\n') > -1) {
|
|
23034
|
-
if (array) {
|
|
23035
|
-
str = str.split('\n').map(function(line) {
|
|
23036
|
-
return ' ' + line;
|
|
23037
|
-
}).join('\n').substr(2);
|
|
23038
|
-
} else {
|
|
23039
|
-
str = '\n' + str.split('\n').map(function(line) {
|
|
23040
|
-
return ' ' + line;
|
|
23041
|
-
}).join('\n');
|
|
23042
|
-
}
|
|
23043
|
-
}
|
|
23044
|
-
} else {
|
|
23045
|
-
str = ctx.stylize('[Circular]', 'special');
|
|
23046
|
-
}
|
|
23047
|
-
}
|
|
23048
|
-
if (isUndefined(name)) {
|
|
23049
|
-
if (array && key.match(/^\d+$/)) {
|
|
23050
|
-
return str;
|
|
23051
|
-
}
|
|
23052
|
-
name = JSON.stringify('' + key);
|
|
23053
|
-
if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
|
|
23054
|
-
name = name.substr(1, name.length - 2);
|
|
23055
|
-
name = ctx.stylize(name, 'name');
|
|
23056
|
-
} else {
|
|
23057
|
-
name = name.replace(/'/g, "\\'")
|
|
23058
|
-
.replace(/\\"/g, '"')
|
|
23059
|
-
.replace(/(^"|"$)/g, "'");
|
|
23060
|
-
name = ctx.stylize(name, 'string');
|
|
23061
|
-
}
|
|
23062
|
-
}
|
|
23063
|
-
|
|
23064
|
-
return name + ': ' + str;
|
|
23065
|
-
}
|
|
23066
|
-
|
|
23067
|
-
|
|
23068
|
-
function reduceToSingleString(output, base, braces) {
|
|
23069
|
-
var numLinesEst = 0;
|
|
23070
|
-
var length = output.reduce(function(prev, cur) {
|
|
23071
|
-
numLinesEst++;
|
|
23072
|
-
if (cur.indexOf('\n') >= 0) numLinesEst++;
|
|
23073
|
-
return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
|
|
23074
|
-
}, 0);
|
|
23075
|
-
|
|
23076
|
-
if (length > 60) {
|
|
23077
|
-
return braces[0] +
|
|
23078
|
-
(base === '' ? '' : base + '\n ') +
|
|
23079
|
-
' ' +
|
|
23080
|
-
output.join(',\n ') +
|
|
23081
|
-
' ' +
|
|
23082
|
-
braces[1];
|
|
23083
|
-
}
|
|
23084
|
-
|
|
23085
|
-
return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
|
|
23086
|
-
}
|
|
23087
|
-
|
|
23088
|
-
|
|
23089
|
-
// NOTE: These type checking functions intentionally don't use `instanceof`
|
|
23090
|
-
// because it is fragile and can be easily faked with `Object.create()`.
|
|
23091
|
-
exports.types = require('./support/types');
|
|
23092
|
-
|
|
23093
|
-
function isArray(ar) {
|
|
23094
|
-
return Array.isArray(ar);
|
|
23095
|
-
}
|
|
23096
|
-
exports.isArray = isArray;
|
|
23097
|
-
|
|
23098
|
-
function isBoolean(arg) {
|
|
23099
|
-
return typeof arg === 'boolean';
|
|
23100
|
-
}
|
|
23101
|
-
exports.isBoolean = isBoolean;
|
|
23102
|
-
|
|
23103
|
-
function isNull(arg) {
|
|
23104
|
-
return arg === null;
|
|
23105
|
-
}
|
|
23106
|
-
exports.isNull = isNull;
|
|
23107
|
-
|
|
23108
|
-
function isNullOrUndefined(arg) {
|
|
23109
|
-
return arg == null;
|
|
23110
|
-
}
|
|
23111
|
-
exports.isNullOrUndefined = isNullOrUndefined;
|
|
23112
|
-
|
|
23113
|
-
function isNumber(arg) {
|
|
23114
|
-
return typeof arg === 'number';
|
|
23115
|
-
}
|
|
23116
|
-
exports.isNumber = isNumber;
|
|
23117
|
-
|
|
23118
|
-
function isString(arg) {
|
|
23119
|
-
return typeof arg === 'string';
|
|
23120
|
-
}
|
|
23121
|
-
exports.isString = isString;
|
|
23122
|
-
|
|
23123
|
-
function isSymbol(arg) {
|
|
23124
|
-
return typeof arg === 'symbol';
|
|
23125
|
-
}
|
|
23126
|
-
exports.isSymbol = isSymbol;
|
|
23127
|
-
|
|
23128
|
-
function isUndefined(arg) {
|
|
23129
|
-
return arg === void 0;
|
|
23130
|
-
}
|
|
23131
|
-
exports.isUndefined = isUndefined;
|
|
23132
|
-
|
|
23133
|
-
function isRegExp(re) {
|
|
23134
|
-
return isObject(re) && objectToString(re) === '[object RegExp]';
|
|
23135
|
-
}
|
|
23136
|
-
exports.isRegExp = isRegExp;
|
|
23137
|
-
exports.types.isRegExp = isRegExp;
|
|
23138
|
-
|
|
23139
|
-
function isObject(arg) {
|
|
23140
|
-
return typeof arg === 'object' && arg !== null;
|
|
23141
|
-
}
|
|
23142
|
-
exports.isObject = isObject;
|
|
23143
|
-
|
|
23144
|
-
function isDate(d) {
|
|
23145
|
-
return isObject(d) && objectToString(d) === '[object Date]';
|
|
23146
|
-
}
|
|
23147
|
-
exports.isDate = isDate;
|
|
23148
|
-
exports.types.isDate = isDate;
|
|
23149
|
-
|
|
23150
|
-
function isError(e) {
|
|
23151
|
-
return isObject(e) &&
|
|
23152
|
-
(objectToString(e) === '[object Error]' || e instanceof Error);
|
|
23153
|
-
}
|
|
23154
|
-
exports.isError = isError;
|
|
23155
|
-
exports.types.isNativeError = isError;
|
|
23156
|
-
|
|
23157
|
-
function isFunction(arg) {
|
|
23158
|
-
return typeof arg === 'function';
|
|
23159
|
-
}
|
|
23160
|
-
exports.isFunction = isFunction;
|
|
23161
|
-
|
|
23162
|
-
function isPrimitive(arg) {
|
|
23163
|
-
return arg === null ||
|
|
23164
|
-
typeof arg === 'boolean' ||
|
|
23165
|
-
typeof arg === 'number' ||
|
|
23166
|
-
typeof arg === 'string' ||
|
|
23167
|
-
typeof arg === 'symbol' || // ES6 symbol
|
|
23168
|
-
typeof arg === 'undefined';
|
|
23169
|
-
}
|
|
23170
|
-
exports.isPrimitive = isPrimitive;
|
|
23171
|
-
|
|
23172
|
-
exports.isBuffer = require('./support/isBuffer');
|
|
23173
|
-
|
|
23174
|
-
function objectToString(o) {
|
|
23175
|
-
return Object.prototype.toString.call(o);
|
|
23176
|
-
}
|
|
23177
|
-
|
|
23178
|
-
|
|
23179
|
-
function pad(n) {
|
|
23180
|
-
return n < 10 ? '0' + n.toString(10) : n.toString(10);
|
|
23181
|
-
}
|
|
23182
|
-
|
|
23183
|
-
|
|
23184
|
-
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
|
|
23185
|
-
'Oct', 'Nov', 'Dec'];
|
|
23186
|
-
|
|
23187
|
-
// 26 Feb 16:19:34
|
|
23188
|
-
function timestamp() {
|
|
23189
|
-
var d = new Date();
|
|
23190
|
-
var time = [pad(d.getHours()),
|
|
23191
|
-
pad(d.getMinutes()),
|
|
23192
|
-
pad(d.getSeconds())].join(':');
|
|
23193
|
-
return [d.getDate(), months[d.getMonth()], time].join(' ');
|
|
23194
|
-
}
|
|
23195
|
-
|
|
23196
|
-
|
|
23197
|
-
// log is just a thin wrapper to console.log that prepends a timestamp
|
|
23198
|
-
exports.log = function() {
|
|
23199
|
-
console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
|
|
23200
|
-
};
|
|
23201
|
-
|
|
23202
|
-
|
|
23203
|
-
/**
|
|
23204
|
-
* Inherit the prototype methods from one constructor into another.
|
|
23205
|
-
*
|
|
23206
|
-
* The Function.prototype.inherits from lang.js rewritten as a standalone
|
|
23207
|
-
* function (not on Function.prototype). NOTE: If this file is to be loaded
|
|
23208
|
-
* during bootstrapping this function needs to be rewritten using some native
|
|
23209
|
-
* functions as prototype setup using normal JavaScript does not work as
|
|
23210
|
-
* expected during bootstrapping (see mirror.js in r114903).
|
|
23211
|
-
*
|
|
23212
|
-
* @param {function} ctor Constructor function which needs to inherit the
|
|
23213
|
-
* prototype.
|
|
23214
|
-
* @param {function} superCtor Constructor function to inherit prototype from.
|
|
23215
|
-
*/
|
|
23216
|
-
exports.inherits = require('inherits');
|
|
23217
|
-
|
|
23218
|
-
exports._extend = function(origin, add) {
|
|
23219
|
-
// Don't do anything if add isn't an object
|
|
23220
|
-
if (!add || !isObject(add)) return origin;
|
|
23221
|
-
|
|
23222
|
-
var keys = Object.keys(add);
|
|
23223
|
-
var i = keys.length;
|
|
23224
|
-
while (i--) {
|
|
23225
|
-
origin[keys[i]] = add[keys[i]];
|
|
23226
|
-
}
|
|
23227
|
-
return origin;
|
|
23228
|
-
};
|
|
23229
|
-
|
|
23230
|
-
function hasOwnProperty(obj, prop) {
|
|
23231
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
23232
|
-
}
|
|
23233
|
-
|
|
23234
|
-
var kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined;
|
|
23235
|
-
|
|
23236
|
-
exports.promisify = function promisify(original) {
|
|
23237
|
-
if (typeof original !== 'function')
|
|
23238
|
-
throw new TypeError('The "original" argument must be of type Function');
|
|
23239
|
-
|
|
23240
|
-
if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {
|
|
23241
|
-
var fn = original[kCustomPromisifiedSymbol];
|
|
23242
|
-
if (typeof fn !== 'function') {
|
|
23243
|
-
throw new TypeError('The "util.promisify.custom" argument must be of type Function');
|
|
23244
|
-
}
|
|
23245
|
-
Object.defineProperty(fn, kCustomPromisifiedSymbol, {
|
|
23246
|
-
value: fn, enumerable: false, writable: false, configurable: true
|
|
23247
|
-
});
|
|
23248
|
-
return fn;
|
|
23249
|
-
}
|
|
23250
|
-
|
|
23251
|
-
function fn() {
|
|
23252
|
-
var promiseResolve, promiseReject;
|
|
23253
|
-
var promise = new Promise(function (resolve, reject) {
|
|
23254
|
-
promiseResolve = resolve;
|
|
23255
|
-
promiseReject = reject;
|
|
23256
|
-
});
|
|
23257
|
-
|
|
23258
|
-
var args = [];
|
|
23259
|
-
for (var i = 0; i < arguments.length; i++) {
|
|
23260
|
-
args.push(arguments[i]);
|
|
23261
|
-
}
|
|
23262
|
-
args.push(function (err, value) {
|
|
23263
|
-
if (err) {
|
|
23264
|
-
promiseReject(err);
|
|
23265
|
-
} else {
|
|
23266
|
-
promiseResolve(value);
|
|
23267
|
-
}
|
|
23268
|
-
});
|
|
23269
|
-
|
|
23270
|
-
try {
|
|
23271
|
-
original.apply(this, args);
|
|
23272
|
-
} catch (err) {
|
|
23273
|
-
promiseReject(err);
|
|
23274
|
-
}
|
|
23275
|
-
|
|
23276
|
-
return promise;
|
|
23277
|
-
}
|
|
23278
|
-
|
|
23279
|
-
Object.setPrototypeOf(fn, Object.getPrototypeOf(original));
|
|
23280
|
-
|
|
23281
|
-
if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {
|
|
23282
|
-
value: fn, enumerable: false, writable: false, configurable: true
|
|
23283
|
-
});
|
|
23284
|
-
return Object.defineProperties(
|
|
23285
|
-
fn,
|
|
23286
|
-
getOwnPropertyDescriptors(original)
|
|
23287
|
-
);
|
|
23288
|
-
}
|
|
23289
|
-
|
|
23290
|
-
exports.promisify.custom = kCustomPromisifiedSymbol
|
|
23291
|
-
|
|
23292
|
-
function callbackifyOnRejected(reason, cb) {
|
|
23293
|
-
// `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M).
|
|
23294
|
-
// Because `null` is a special error value in callbacks which means "no error
|
|
23295
|
-
// occurred", we error-wrap so the callback consumer can distinguish between
|
|
23296
|
-
// "the promise rejected with null" or "the promise fulfilled with undefined".
|
|
23297
|
-
if (!reason) {
|
|
23298
|
-
var newReason = new Error('Promise was rejected with a falsy value');
|
|
23299
|
-
newReason.reason = reason;
|
|
23300
|
-
reason = newReason;
|
|
23301
|
-
}
|
|
23302
|
-
return cb(reason);
|
|
23303
|
-
}
|
|
23304
|
-
|
|
23305
|
-
function callbackify(original) {
|
|
23306
|
-
if (typeof original !== 'function') {
|
|
23307
|
-
throw new TypeError('The "original" argument must be of type Function');
|
|
23308
|
-
}
|
|
23309
|
-
|
|
23310
|
-
// We DO NOT return the promise as it gives the user a false sense that
|
|
23311
|
-
// the promise is actually somehow related to the callback's execution
|
|
23312
|
-
// and that the callback throwing will reject the promise.
|
|
23313
|
-
function callbackified() {
|
|
23314
|
-
var args = [];
|
|
23315
|
-
for (var i = 0; i < arguments.length; i++) {
|
|
23316
|
-
args.push(arguments[i]);
|
|
23317
|
-
}
|
|
23318
|
-
|
|
23319
|
-
var maybeCb = args.pop();
|
|
23320
|
-
if (typeof maybeCb !== 'function') {
|
|
23321
|
-
throw new TypeError('The last argument must be of type Function');
|
|
23322
|
-
}
|
|
23323
|
-
var self = this;
|
|
23324
|
-
var cb = function() {
|
|
23325
|
-
return maybeCb.apply(self, arguments);
|
|
23326
|
-
};
|
|
23327
|
-
// In true node style we process the callback on `nextTick` with all the
|
|
23328
|
-
// implications (stack, `uncaughtException`, `async_hooks`)
|
|
23329
|
-
original.apply(this, args)
|
|
23330
|
-
.then(function(ret) { process.nextTick(cb.bind(null, null, ret)) },
|
|
23331
|
-
function(rej) { process.nextTick(callbackifyOnRejected.bind(null, rej, cb)) });
|
|
23332
|
-
}
|
|
23333
|
-
|
|
23334
|
-
Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));
|
|
23335
|
-
Object.defineProperties(callbackified,
|
|
23336
|
-
getOwnPropertyDescriptors(original));
|
|
23337
|
-
return callbackified;
|
|
23338
|
-
}
|
|
23339
|
-
exports.callbackify = callbackify;
|
|
23340
|
-
|
|
23341
|
-
}).call(this)}).call(this,require('_process'))
|
|
23342
|
-
},{"./support/isBuffer":53,"./support/types":54,"_process":52,"inherits":32}],56:[function(require,module,exports){
|
|
23343
|
-
(function (global){(function (){
|
|
23344
|
-
'use strict';
|
|
23345
|
-
|
|
23346
|
-
var forEach = require('foreach');
|
|
23347
|
-
var availableTypedArrays = require('available-typed-arrays');
|
|
23348
|
-
var callBound = require('call-bind/callBound');
|
|
23349
|
-
|
|
23350
|
-
var $toString = callBound('Object.prototype.toString');
|
|
23351
|
-
var hasSymbols = require('has-symbols')();
|
|
23352
|
-
var hasToStringTag = hasSymbols && typeof Symbol.toStringTag === 'symbol';
|
|
23353
|
-
|
|
23354
|
-
var typedArrays = availableTypedArrays();
|
|
23355
|
-
|
|
23356
|
-
var $slice = callBound('String.prototype.slice');
|
|
23357
|
-
var toStrTags = {};
|
|
23358
|
-
var gOPD = require('es-abstract/helpers/getOwnPropertyDescriptor');
|
|
23359
|
-
var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');
|
|
23360
|
-
if (hasToStringTag && gOPD && getPrototypeOf) {
|
|
23361
|
-
forEach(typedArrays, function (typedArray) {
|
|
23362
|
-
if (typeof global[typedArray] === 'function') {
|
|
23363
|
-
var arr = new global[typedArray]();
|
|
23364
|
-
if (!(Symbol.toStringTag in arr)) {
|
|
23365
|
-
throw new EvalError('this engine has support for Symbol.toStringTag, but ' + typedArray + ' does not have the property! Please report this.');
|
|
23366
|
-
}
|
|
23367
|
-
var proto = getPrototypeOf(arr);
|
|
23368
|
-
var descriptor = gOPD(proto, Symbol.toStringTag);
|
|
23369
|
-
if (!descriptor) {
|
|
23370
|
-
var superProto = getPrototypeOf(proto);
|
|
23371
|
-
descriptor = gOPD(superProto, Symbol.toStringTag);
|
|
23372
|
-
}
|
|
23373
|
-
toStrTags[typedArray] = descriptor.get;
|
|
23374
|
-
}
|
|
23375
|
-
});
|
|
23376
|
-
}
|
|
23377
|
-
|
|
23378
|
-
var tryTypedArrays = function tryAllTypedArrays(value) {
|
|
23379
|
-
var foundName = false;
|
|
23380
|
-
forEach(toStrTags, function (getter, typedArray) {
|
|
23381
|
-
if (!foundName) {
|
|
23382
|
-
try {
|
|
23383
|
-
var name = getter.call(value);
|
|
23384
|
-
if (name === typedArray) {
|
|
23385
|
-
foundName = name;
|
|
23386
|
-
}
|
|
23387
|
-
} catch (e) {}
|
|
23388
|
-
}
|
|
23389
|
-
});
|
|
23390
|
-
return foundName;
|
|
23391
|
-
};
|
|
23392
|
-
|
|
23393
|
-
var isTypedArray = require('is-typed-array');
|
|
23394
|
-
|
|
23395
|
-
module.exports = function whichTypedArray(value) {
|
|
23396
|
-
if (!isTypedArray(value)) { return false; }
|
|
23397
|
-
if (!hasToStringTag) { return $slice($toString(value), 8, -1); }
|
|
23398
|
-
return tryTypedArrays(value);
|
|
23399
|
-
};
|
|
23400
|
-
|
|
23401
|
-
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
23402
|
-
},{"available-typed-arrays":18,"call-bind/callBound":21,"es-abstract/helpers/getOwnPropertyDescriptor":23,"foreach":24,"has-symbols":28,"is-typed-array":35}]},{},[10])(10)
|
|
21342
|
+
},{}]},{},[10])(10)
|
|
23403
21343
|
});
|